Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,7 @@ ANTHROPIC_API_KEY=
#
DEMO_SEED=

# Dev orchestration overrides (bin/dev.ts, bin/seed.ts)
#
# bin/dev.ts publishes the seed tool packages as the seed admin against
# the seed tenant. Set these to point it at a non-seed hub without
# editing the script. Unset values fall back to the seed defaults shown.
# HUB_ADMIN_EMAIL=alice@example.com
# HUB_ADMIN_PASSWORD=password123
# HUB_TENANT_SLUG=acme
# HUB_TENANT_NAME=Acme Corp
# Seed overrides (bin/seed.ts)
#
# Base URL bin/seed.ts targets when seeding via the hub API.
# HUB_URL=http://localhost:3000
65 changes: 30 additions & 35 deletions DEV.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion LAYOUT.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Server-only packages that compose the portable core and environment-specific imp
| Package | Purpose |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `@intx/hub-agent` | Sidecar-side orchestrator (`createSidecarOrchestrator`, the core seam `apps/sidecar` wires together). Wires the package-side pieces of the sidecar runtime — the per-agent key and repo stores, a session manager, and the hub WebSocket link — into a single start/close handle and forwards a spawned child's verified inference events back to the hub. In-process harness construction and agent provisioning are retired: every agent runs as a supervised workflow-process child on the workflow-run substrate (see `@intx/workflow-host`). |
| `@intx/tool-packaging` | Hub-side closure resolver and sidecar-side loader for the npm-distributed tool-package format. Resolves a manifest's dependency closure, materializes tarballs into a content-addressable cache, and lays out a per-instance nested `node_modules/` so a tool package and its transitives resolve bare-specifier imports against the manifest closure. Used by both `apps/hub` and `apps/sidecar`. |
| `@intx/tool-packaging` | Hub-side closure resolver and sidecar-side closure materialization for the npm-distributed tool-package format. Resolves a manifest's dependency closure, materializes tarballs into a content-addressable cache, and lays out a per-instance nested `node_modules/` so a tool package and its transitives resolve bare-specifier imports against the manifest closure. Used by both `apps/hub` and `apps/sidecar`. |
| `@intx/workflow-host` | Supervisor and child orchestration for running agents as supervised workflow-process children: the dispatch loop, inbox claim-check, the `SubprocessSpawner`/`SubprocessHandle` spawn seam, the per-step step-invoker, and recycle/drain. It also holds the deploy program, the child substrate factory, the probe protocol, durable conversation state, and the per-run grants reader. Consumes the `@intx/hub-sessions/substrate` repo primitives and takes its spawner, mail bus, and step invoker as injected bindings. Intended to stay host-agnostic so an alternate host reuses it with a different tool/agent runtime — see the open item under Dependency Rules. Its `./local` subpath (the step invoker, step tool builders, authorize closure, and local credentials snapshot) imports no Node or Bun module and bundles for a browser, so `runLocal` callers run definitions outside a sidecar. |
| `@intx/workflow-deploy` | Deploy-time validation and derivation over the workflow-run substrate: the capability walk and operator-approval gate (`walkCapabilities`, `createApprovalSetGate`), the child grant cap (`collectDeclaredResources`, `filterGrantsToDeclaredResources`), the runtime grant projections of the walk (`runtimeGrantRules`, `credentialUseGrantRules`), pure deployment-address and workflow-run repo-id derivation (`deriveRunAddress`, `deriveWorkflowRunRepoId`), and per-step inference-source pinning (`pickStepInferenceSource`). An agent-runtime package (it depends on `@intx/agent`, `@intx/authz`, and `@intx/workflow`) consumed by `apps/sidecar`, `@intx/hub-sessions`, and `@intx/workflow-host` (its `./local` entry) on the host side and reached into by `@intx/hub-api` on the control-plane side — one of the enumerated crossings in the Dependency Rules. |

Expand Down
8 changes: 1 addition & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,6 @@ format: FORCE
docs: FORCE
$(BUN) bin/gen-api-docs.ts

builtins: FORCE
$(BUN) run bin/build-builtins.ts

publish-builtins: builtins
$(BUN) bin/publish-tool-packages.ts --registry workspace-builtins --from dist/builtins

clean:
rm -f .env-checked .eslintcache
find . -type f -name tsconfig.tsbuildinfo -a ! -path '*/node_modules/*' | xargs rm -f
Expand All @@ -142,5 +136,5 @@ clean:

include .env-checked

.PHONY: all build build-admin-ui lint test test-unit test-workflow test-core test-load test-e2e test-e2e-run test-storage-browser verify-tool-load format docs clean builtins publish-builtins
.PHONY: all build build-admin-ui lint test test-unit test-workflow test-core test-load test-e2e test-e2e-run test-storage-browser verify-tool-load format docs clean
FORCE:
19 changes: 4 additions & 15 deletions apps/hub/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ import {
recoverSenderDeploy,
DEFAULT_SIDECAR_ALLOCATION_CONCURRENCY,
pushCredentialReconcile,
WORKSPACE_BUILTINS_REGISTRY,
type SidecarLookups,
type SidecarProvisioner,
type SidecarProvisionerChooser,
Expand Down Expand Up @@ -185,10 +184,10 @@ export async function createHubServer({
),
});

// 10 MiB is the production cap for tool-package tarballs uploaded via
// the package-registry PUT endpoint. The npm registry's own per-tarball
// soft cap is several times this, but the substrate's tool packages are
// the curated subset the operator vets; an upload pushing past 10 MiB
// 10 MiB is the production cap for tarballs uploaded via the
// package-registry PUT endpoint. The npm registry's own per-tarball
// soft cap is several times this, but these uploads are the curated
// subset the operator vets; an upload pushing past 10 MiB
// is far more likely to be misuse than a legitimate build. The
// HUB_MAX_TARBALL_BYTES env var lets an operator opt into a different
// cap without a code change.
Expand Down Expand Up @@ -404,16 +403,6 @@ export async function createHubServer({
toolPackageRegistries: {
httpRegistries,
defaultRegistry: "npmjs",
// The `workspace-builtins` package-registry asset hosts the
// three in-tree tool packages (`@intx/tools-mail`,
// `@intx/tools-posix`, `@intx/tools-lsp`). Routing the `@intx`
// scope through it keeps an agent's pin set readable
// (`{ name: "@intx/tools-mail" }`) without forcing every pin to
// carry an explicit `registry` field. Operators who shadow this
// asset at a child tenancy with their own `workspace-builtins`
// asset get the closer-scope win for free, since the session
// service builds the per-launch registry map leaf-to-root.
scopeRouting: [{ scope: "@intx", registry: WORKSPACE_BUILTINS_REGISTRY }],
},
});

Expand Down
4 changes: 2 additions & 2 deletions apps/sidecar/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,8 @@ const buildHarness = createDefaultHarnessBuilder({ adapters });
// lays out a probe frame's frozen closure under a per-probe scratch dir
// (rooted here so it shares the sidecar data dir's lifecycle); the executor
// spawns the one-shot child that evaluates the workflow entry against it.
// The cache/registry caps are the same boot-edge-resolved values the tool
// loader uses.
// The cache/registry caps are the same boot-edge-resolved values the deploy
// path's closure apply uses.
// The probe delivers source assets inline in one frame (see
// `WorkflowProbeRequestFrame`). A git-sourced asset that grows past the shared
// inline-payload cap is the signal to move the probe's asset delivery to the
Expand Down
2 changes: 1 addition & 1 deletion apps/sidecar/src/sidecar-materialization-config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Process edge for the tool-package materialization boundary.
// Process edge for the workflow closure materialization boundary.
//
// `parseToolRegistries` and `hostPlatform` in `@intx/tool-packaging`
// own the `SIDECAR_TOOL_REGISTRIES` rules and the npm `os`/`cpu`
Expand Down
Loading
Loading