Skip to content

Port bundled CPython and ordered CodeMode into Maple Agent - #897

Draft
AnthonyRonning wants to merge 3 commits into
masterfrom
feature/cpython-codemode-monorepo
Draft

Port bundled CPython and ordered CodeMode into Maple Agent#897
AnthonyRonning wants to merge 3 commits into
masterfrom
feature/cpython-codemode-monorepo

Conversation

@AnthonyRonning

Copy link
Copy Markdown
Contributor

Ports the completed CPython + CodeMode implementation from Maple GPUI Draft PR #69 into apps/maple-agent/, preserving its three commit boundaries and original commit provenance.

The Agent gains a bundled CPython runtime and the normal permission-controlled python_code tool: persistent task namespaces, a continuous asyncio loop, lifecycle/reset fencing, four retained worker slots, and up to 32 permitted Python calls executed in submission order. Other tools retain concurrency. Goose remains on the same published scheduler patch, bf62027fd499ad3133af35db9f0f566de6a5cc4c, with no package-version upgrade or Maple approval-lifecycle migration.

The port retains current monorepo SDK/proxy dependencies, SDK naming and security fixes, Agent update discovery, managed debug identity, and test portability fixes. Python packaging and native/Nix CI coverage move to root Agent CI while preserving its contributor security rules. Agent publication remains inactive.

Preservation review compared all 159 original app/runtime files: 148 are byte-identical; the other eleven contain exactly the changes already present in the monorepo. SDK, proxy, backend, and Research have no changes in this PR. The remaining adaptations are component paths, Cargo/Nix metadata, packaging, root CI and its contract tests, and development guidance.

Validation on macOS ARM64 in the component’s pinned Nix Rust 1.98 environment:

  • Full just ci passed before each of the three commits. Final result: four Clippy configurations, workspace debug build, 784 workspace tests and 30 headless tests; worker suite 18 passed/one Windows-only skip; packaging suite seven passed.
  • Root nix flake check --no-update-lock-file passed all nine native check derivations.
  • All four real CPython ordered integration cases passed separately with GOOSE_STATE_MACHINE=0 and 1.
  • Debug app reports maple-gpui 0.1.0 (97b880f1). Packaged-worker smoke, offline relocation with an empty PATH, and strict ad hoc signature verification after execution passed.

Existing native dependencies emit CoreMedia duplicate-symbol linker diagnostics; linking succeeds. No suppression or native dependency change was introduced.

Authenticated GUI/ACP/live-model workflows, native Windows/Linux/Intel execution, the full installed Linux Nix closure, and browser-download Gatekeeper behavior remain unverified locally. The existing final-value repr failure handling and runtime-unavailable wording observations remain outside this preservation port. Draft only; no merge or release is part of this change.

(cherry picked from commit 4bfeb7177d6103c174d332bcb0128f1f36aa3703)

Adapt Python packaging and worker CI to the monorepo component layout; preserve local SDK/proxy dependencies, managed app identity and inactive Agent publication.
(cherry picked from commit e087b1af4eb0e4f77c036b9fff2f7904a2e9c4f0)

Reapply under apps/maple-agent while preserving monorepo SDK integration, test portability fixes and Agent update routing.
(cherry picked from commit 1c0ade10bfcaa33e6a2f5cd88cbbb48eda45ea1c)

Retain the exact published Goose scheduler patch and source hash in the Agent component dependency graph.
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