Files
archie/.okf/codebase/internal/agentexec/runtime.md
T
sam 7c34bdae5a okf: scaffold knowledge bundle and MCP server config
Adds a harvested .okf/ knowledge bundle (codebase concepts + starter
architecture/services/rules scaffolding) and .mcp.json pointing at the
shared okf MCP service (http://localhost:8765/archie-core/), which
serves multiple projects' bundles from a single process.
2026-07-22 04:36:50 +10:00

1.1 KiB

description, resource, tags, timestamp, title, type
description resource tags timestamp title type
Source module internal/agentexec/runtime.go (23 lines). internal/agentexec/runtime.go
go
source
2026-07-21T18:36:22Z runtime.go Module

Module runtime.go

Path: internal/agentexec/runtime.go
Lines: 23

Snippet Preview

package agentexec

import "github.com/samcharles93/ai-sdk/runtime"

// NewRuntime builds the provider runtime shared by archied's in-process mode
// and the archie-agent worker. Nil means no providers were configured.
func NewRuntime(providers map[string]Provider) *runtime.Runtime {
	if len(providers) == 0 {
		return nil
	}
	runtime.RegisterBuiltinClasses()
	catalog := make(map[string]runtime.ProviderConfig, len(providers))
	for name, provider := range providers {
		cfg := runtime.ProviderConfig{ID: name, Class: provider.Class, BaseURL: provider.BaseURL}
		if provider.APIKeyEnv == "" {
			cfg.Auth = runtime.AuthConfig{Type: runtime.AuthTypeNone}
		} else {
			cfg.Auth = runtime.AuthConfig{APIKeyEnv: provider.APIKeyEnv}
		}
		catalog[name] = cfg
	}
	return runtime.NewRuntime(runtime.Config{Providers: catalog})
}