Skip to content

refactor: remove duplicate runtime architecture - #2742

Merged
jackwener merged 1 commit into
mainfrom
codex/remove-duplicate-runtime-architecture
Aug 11, 2026
Merged

refactor: remove duplicate runtime architecture#2742
jackwener merged 1 commit into
mainfrom
codex/remove-duplicate-runtime-architecture

Conversation

@jackwener

Copy link
Copy Markdown
Member

Summary

  • replace feature-specific Daily Review, Inspector, Web Search, and ScheduledTask Electron forwarding with one typed, allowlisted Runtime Host query/command transport
  • remove the legacy Automation scheduler, tool, protocol, coordinator, store, schema, and tests; ScheduledTask is now the sole scheduling authority and supports notify, session_resume, and agent_run
  • remove the @maka/core and @maka/runtime root barrels and root package exports; all consumers use explicit domain subpaths
  • consolidate Computer Use scripts behind one dispatcher and update report producer/content-lineage identities to the new paths
  • preserve the native Markdown save dialog as a Desktop-only concern and keep ScheduledTask paging at 64 items with the result byte limit

This is intentionally a clean cut with no backward-compatible duplicate APIs. Relative to main it removes about 10.8k net lines.

Validation

  • npm run build
  • Desktop typecheck
  • node --check for all Computer Use .mjs files
  • package export-target and package.json validation
  • static audits for old Automation symbols, old Runtime Host IPC channels, root imports, deleted-file references, and old script entrypoints
  • git diff --check

Tests were not run locally, per request; CI is the test authority for this PR.

@jackwener
jackwener force-pushed the codex/remove-duplicate-runtime-architecture branch 6 times, most recently from b1bf160 to 0beb4ca Compare August 11, 2026 17:39
@jackwener
jackwener force-pushed the codex/remove-duplicate-runtime-architecture branch from 0beb4ca to 89a05a4 Compare August 11, 2026 17:42
@jackwener
jackwener merged commit bedad81 into main Aug 11, 2026
12 checks passed
sunheyi6 added a commit to sunheyi6/maka-agent that referenced this pull request Aug 26, 2026
…ering contract (apache#1382 slice 1)

First increment of apache#1382: establish a Maka-owned tool
discovery policy on the catalog plus a provider-native lowering contract that
the ModelAdapter (apache#1381 seam) lowers to Anthropic / OpenAI native Tool Search,
with a deterministic `load_tools` fallback for unsupported models.

Add packages/runtime/src/tool-discovery.ts as a pure, provider-package-free
module owning:
- `ToolDiscovery` policy (`direct` | `deferred` + namespace), extending the
  catalog model rather than duplicating it;
- `buildToolDiscoveryPolicy`, deriving policy from product tools + deferred
  catalog surfaces + MCP tools grouped per server (MCP tools default deferred —
  the exact pain point apache#1382 targets: dozens/hundreds of MCP schemas sent every
  request even when the model needs one tool);
- `resolveProviderToolSearchCapability` (anthropic / openai / none by adapter
  kind);
- `lowerToolsForProvider`, the lowering contract: native modes mark deferred
  tools with `deferLoading` (OpenAI also carries `namespace`), exclude them from
  the initial `activeTools`, and add a `tool_search` descriptor kept active;
  `none` is an identity no-op so today's full-surface behavior and the existing
  `load_tools` economy are unchanged.

This is the contract only, not the live `streamText` wiring. Per the RFC:
- Tool Search changes visibility, not authorization; loaded tools still cross
  `ToolRuntime`.
- One authoritative catalog; a search result only selects catalog entries.
- Unsupported models keep the current deterministic behavior (no silent tool
  loss).
- An unclassified tool defaults to `direct` (never silently hidden).

Rebased onto current main: the apache#1381 seam commit was dropped (merged upstream,
evolved); the runtime barrel `index.ts` was retired upstream (apache#2742), so the
contract is exposed via a `./tool-discovery` subpath export in package.json.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant