Repository navigation
Conversation
ADR 0043: the platform never runs code a model, user or tenant writes. A service that needs code calls an agent in agentctl through the routes of ADR 0028, and agents in agentctl use services through the open API with a tenant key. A dependency rule forbids child_process, vm and worker_threads in the API, the worker and the packages.
This was referenced Oct 29, 2026
This branch has not been deployed
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.
What and why
Proposes ADR 0043: the platform never runs code that a model, a user or a tenant writes. When a service needs code to run, it calls an agent in agentctl, which already gives each agent an isolated computer with mediated network and no real secrets inside.
child_process,vmorworker_threadsin the API, the worker or the packages. A new dependency rule,no-code-execution-in-the-platformin.dependency-cruiser.cjs, enforces it outside test files. Nothing imports them today.spec.tools) or as aremote-agent. Everything ADR 0015 and 0028 keep at the boundary applies unchanged: the grant, the egress guard, secrets bound to the agent's host, untrusted results, timeouts, cost and audit./v1with a tenant key, which can only ask questions. Changes to services go through proposals that a person approves (ADR 0020, 0026).remote-agent/v1endpoint yet, and agentd would need to run on a host a tenant can register.The number is 0043 because 0041 and 0042 are taken by #179 and #125.
How it was tested
npm run boundariespasses with the new rule (1,647 modules). With a temporaryimport { execSync } from 'node:child_process'inpackages/kernel/src, it fails withno-code-execution-in-the-platform.npm run check: 460 test files pass and 1 is skipped (4,906 tests pass, 12 skipped).npx prettier --check docs/adr .dependency-cruiser.cjs.npm run checkpassesChecklist
packages/providers-*docs/architecture/modulesare updated if a contract, boundary or module changed