fix(runtime): restore OAuth tool execution and transcript visibility - #240
Closed
im10furry wants to merge 703 commits into
Closed
fix(runtime): restore OAuth tool execution and transcript visibility#240im10furry wants to merge 703 commits into
im10furry wants to merge 703 commits into
Conversation
Wire best-effort headless run telemetry through print paths, add goal schedule create/list/transition APIs end-to-end (core, daemon, client, web Schedules UI), and share CLI schedule parsing with /loop.
Surface daemon JSON error bodies for schedule mutations, lock protocol schedule envelopes with tests, and polish Schedules UI with once/interval modes plus clearer empty-session guidance.
Add an in-page session selector and new-session action so operators can manage goal schedules without relying only on the chat sidebar selection.
Decouple OpenAI provider transport from core logging and static provider maps via bindAiDebug and local internals. CLI attaches core diagnostics at boot; mirror tests normalize the remaining intentional core/ai diffs.
…hooks Move restricted-client compat, proxy runtime, request-status hooks, and model-error memory into packages/ai with host bindings. Provider modules no longer need sessionState/config/debugLogger; queryOpenAI still uses core for orchestration-only concerns.
Skip incomplete/non-object tool JSON instead of running empty-object calls, accept provider tool_calls missing type=function, reset stop-hook counters between tool/goal turns, and auto-select a Schedules session.
Move pure OpenAI orchestration helpers (retry, errors, content, system prompt split, reasoning effort) into @kode/ai internals. Route stream, model fallback, logError, and cost tracking through bindAiRuntime so queryOpenAI no longer hard-imports core config/model/log/cost modules. Fix getReasoningEffort treating numeric low (0) as missing. CLI boots bind the host implementations; mirror tests document the intentional queryOpenAI divergence until core llm.ts switches over.
Own message conversion, vision/image helpers, and structural message types inside @kode/ai. Bind Responses adapters via bindAiAdapterFactory so queryOpenAI no longer imports ModelAdapterFactory from core. Drop the @kode/core workspace dependency and lock the boundary with a package-boundary test. CLI still wires core adapters/config/cost sinks at boot through the existing bind surface.
Move model capability registry, adapter factory, and OpenAI adapters out of core into packages/ai with host-agnostic debug/status/error sinks. Default-bind the in-package factory so queryOpenAI can use Responses API without a core import or CLI bind. Core keeps historical adapters for its llm.ts path until callers switch over.
Re-export UnifiedRequestParams and related capability types from the adapter-owned modelCapabilityTypes module so LLM transport and adapters use a single source of truth.
MiMo server-side thinking counts against max_completion_tokens; with small budgets the model often returns empty content (finish=length, only reasoning_tokens). Disable thinking unless effort is medium/high, and always when tools are present (incomplete tool_calls under thinking). Add a live smoke script that loads credentials from OpenCode config and covers chat, tools, tool-result rounds, stream, and queryOpenAI.
Removed 64 documentation files that should not exist in the repository: - docs/_archive/ (historical specs) - docs/product/ (planning docs) - docs/research/ (analysis docs) - docs/develop/ + docs/develop-zh/ (design docs) - docs/ root user guides and references - AGENT_CONTEXT/, apps/cli internal docs Only functional READMEs and runtime assets (skills, SDK) retained.
- Add sampling.ts with CreateMessage request handler that routes through queryLLM for multi-provider LLM support - Declare sampling capability in getMcpClientCapabilities() so MCP servers know the client supports sampling - Register/unregister sampling handler in client lifecycle - Convert between MCP SamplingMessage and internal Anthropic format - Resolve model from server's modelPreferences hints - Map stop_reason between internal and MCP spec formats - Export sampling control APIs (enable/disable/test helpers) - Update capability tests for sampling enabled/disabled states
feat: promote beta agent runtime, core extraction, and CLI hardening
# Conflicts: # apps/cli/src/ui/components/permissions/PermissionRequestDetails.tsx
feat: merge beta permissions and interaction updates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation