@agentproto/runtime 4.1.0 → 5.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalog-models.d.ts +3 -3
- package/dist/catalog-models.mjs.map +1 -1
- package/dist/config-schema.d.ts +2 -2
- package/dist/config-schema.mjs +148 -35
- package/dist/config-schema.mjs.map +1 -1
- package/dist/config.d.ts +50 -3
- package/dist/config.mjs +148 -35
- package/dist/config.mjs.map +1 -1
- package/dist/{context-continuity-Bn99UtVC.d.ts → context-continuity-BfNVbX5W.d.ts} +1 -1
- package/dist/index.d.ts +3792 -8564
- package/dist/index.mjs +6399 -1215
- package/dist/index.mjs.map +1 -1
- package/dist/{session-config-ByfVeEQJ.d.ts → session-config-RyRL2AbD.d.ts} +1 -1
- package/dist/session-presence.mjs +148 -35
- package/dist/session-presence.mjs.map +1 -1
- package/dist/sessions-g4fw_zKx.d.ts +6231 -0
- package/dist/{spawn-defaults-CZj39Znq.d.ts → spawn-defaults-CHvz85DD.d.ts} +13 -1
- package/dist/user-presets.d.ts +6 -94
- package/dist/user-presets.mjs +36 -4
- package/dist/user-presets.mjs.map +1 -1
- package/docs/mcp-tools/agent_start.md +18 -0
- package/package.json +14 -12
package/dist/config-schema.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { DaemonConfig, TunnelConfig, FeaturesConfig, PairingConfig, WorktreesConfig, SpawnConfig, SessionsConfig, ProvenanceConfig, AgentsMdConfig, TitlerConfig, ProfileConfig, AcpAgentConfigEntry, TerminalPreset } from './config.js';
|
|
3
|
-
import { S as SpawnDefaultsConfig } from './spawn-defaults-
|
|
4
|
-
import './context-continuity-
|
|
3
|
+
import { S as SpawnDefaultsConfig } from './spawn-defaults-CHvz85DD.js';
|
|
4
|
+
import './context-continuity-BfNVbX5W.js';
|
|
5
5
|
import '@agentproto/acp';
|
|
6
6
|
import '@agentproto/command-sandbox';
|
|
7
7
|
import '@agentproto/model-catalog';
|
package/dist/config-schema.mjs
CHANGED
|
@@ -16,6 +16,7 @@ import '@agentproto/command-sandbox';
|
|
|
16
16
|
import '@agentproto/plugin-local-browser';
|
|
17
17
|
import '@modelcontextprotocol/sdk/types.js';
|
|
18
18
|
import '@agentproto/provider-kit';
|
|
19
|
+
import '@agentproto/llm-endpoint';
|
|
19
20
|
import '@modelcontextprotocol/sdk/client/index.js';
|
|
20
21
|
import '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
21
22
|
import 'net';
|
|
@@ -1949,6 +1950,29 @@ var init_worktree_identity = __esm({
|
|
|
1949
1950
|
z.object({ worktreeId: z.string() });
|
|
1950
1951
|
}
|
|
1951
1952
|
});
|
|
1953
|
+
var init_mcp_imports = __esm({
|
|
1954
|
+
"src/mcp-imports.ts"() {
|
|
1955
|
+
}
|
|
1956
|
+
});
|
|
1957
|
+
var bundleIdSchema, bundleSchema;
|
|
1958
|
+
var init_bundles = __esm({
|
|
1959
|
+
"src/bundles.ts"() {
|
|
1960
|
+
init_mcp_imports();
|
|
1961
|
+
bundleIdSchema = z.string().regex(/^[a-z0-9][a-z0-9-]*$/, "id must be lowercase kebab-case (letters, digits, hyphens)");
|
|
1962
|
+
bundleSchema = z.object({
|
|
1963
|
+
id: bundleIdSchema,
|
|
1964
|
+
label: z.string().min(1),
|
|
1965
|
+
description: z.string().min(1).optional(),
|
|
1966
|
+
mcpImports: z.array(z.string().min(1)),
|
|
1967
|
+
includeDaemon: z.boolean().optional(),
|
|
1968
|
+
skills: z.array(z.string().min(1))
|
|
1969
|
+
});
|
|
1970
|
+
z.object({
|
|
1971
|
+
version: z.literal(1),
|
|
1972
|
+
bundles: z.array(bundleSchema)
|
|
1973
|
+
});
|
|
1974
|
+
}
|
|
1975
|
+
});
|
|
1952
1976
|
var init_catalog_models = __esm({
|
|
1953
1977
|
"src/catalog-models.ts"() {
|
|
1954
1978
|
init_spawn_defaults();
|
|
@@ -2001,6 +2025,41 @@ var init_canonical_posture = __esm({
|
|
|
2001
2025
|
})();
|
|
2002
2026
|
}
|
|
2003
2027
|
});
|
|
2028
|
+
var effortSchema, postureSchema, routeSchema, userPresetSchema;
|
|
2029
|
+
var init_user_presets = __esm({
|
|
2030
|
+
"src/user-presets.ts"() {
|
|
2031
|
+
effortSchema = z.enum(["low", "medium", "high", "xhigh", "max", "ultracode"]);
|
|
2032
|
+
postureSchema = z.union([
|
|
2033
|
+
z.enum(["default", "plan", "accept-edits", "bypass", "read-only"]),
|
|
2034
|
+
z.object({ harnessModeId: z.string().min(1) })
|
|
2035
|
+
]);
|
|
2036
|
+
routeSchema = z.object({
|
|
2037
|
+
gateway: z.string().min(1),
|
|
2038
|
+
baseUrl: z.string().url().optional()
|
|
2039
|
+
});
|
|
2040
|
+
userPresetSchema = z.object({
|
|
2041
|
+
id: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
|
|
2042
|
+
label: z.string().min(1),
|
|
2043
|
+
adapter: z.string().min(1).optional(),
|
|
2044
|
+
harness: z.string().min(1).optional(),
|
|
2045
|
+
model: z.string().min(1).optional(),
|
|
2046
|
+
route: routeSchema.optional(),
|
|
2047
|
+
access: z.object({ profileRef: z.string().min(1).optional() }).optional(),
|
|
2048
|
+
posture: postureSchema.optional(),
|
|
2049
|
+
effort: effortSchema.optional(),
|
|
2050
|
+
contextProfile: z.string().min(1).optional(),
|
|
2051
|
+
cwd: z.string().min(1).optional(),
|
|
2052
|
+
skills: z.array(z.string().min(1)).optional(),
|
|
2053
|
+
bundles: z.array(z.string().min(1)).optional(),
|
|
2054
|
+
browser: z.union([z.literal("headless"), z.literal(false)]).optional(),
|
|
2055
|
+
lastUsedAt: z.string().min(1).optional()
|
|
2056
|
+
});
|
|
2057
|
+
z.object({
|
|
2058
|
+
version: z.literal(1),
|
|
2059
|
+
presets: z.array(userPresetSchema)
|
|
2060
|
+
});
|
|
2061
|
+
}
|
|
2062
|
+
});
|
|
2004
2063
|
var harnessPresetSchema;
|
|
2005
2064
|
var init_harness_preset_store = __esm({
|
|
2006
2065
|
"src/harness-preset-store.ts"() {
|
|
@@ -2101,6 +2160,10 @@ var init_session_title = __esm({
|
|
|
2101
2160
|
"src/session-title.ts"() {
|
|
2102
2161
|
}
|
|
2103
2162
|
});
|
|
2163
|
+
var init_inference_binding = __esm({
|
|
2164
|
+
"src/inference-binding.ts"() {
|
|
2165
|
+
}
|
|
2166
|
+
});
|
|
2104
2167
|
|
|
2105
2168
|
// src/mcp-credential-deps.ts
|
|
2106
2169
|
var init_mcp_credential_deps = __esm({
|
|
@@ -2152,16 +2215,20 @@ var init_sandbox_adapters = __esm({
|
|
|
2152
2215
|
var init_session_spawn = __esm({
|
|
2153
2216
|
"src/session-spawn.ts"() {
|
|
2154
2217
|
init_sessions();
|
|
2218
|
+
init_transcript_writer();
|
|
2155
2219
|
init_workspaces_config();
|
|
2156
2220
|
init_config();
|
|
2157
2221
|
init_worktree_identity();
|
|
2158
2222
|
init_spawn_defaults();
|
|
2223
|
+
init_bundles();
|
|
2224
|
+
init_mcp_imports();
|
|
2159
2225
|
init_launch_config();
|
|
2160
2226
|
init_claude_code_oauth_source();
|
|
2161
2227
|
init_providers_store();
|
|
2162
2228
|
init_catalog_models();
|
|
2163
2229
|
init_context_continuity();
|
|
2164
2230
|
init_canonical_posture();
|
|
2231
|
+
init_user_presets();
|
|
2165
2232
|
init_harness_preset_store();
|
|
2166
2233
|
init_browser_mount();
|
|
2167
2234
|
init_role();
|
|
@@ -2170,6 +2237,7 @@ var init_session_spawn = __esm({
|
|
|
2170
2237
|
init_agents_md();
|
|
2171
2238
|
init_workspace_rules();
|
|
2172
2239
|
init_session_title();
|
|
2240
|
+
init_inference_binding();
|
|
2173
2241
|
init_mcp_credential_deps();
|
|
2174
2242
|
init_sandbox_agent_session_proxy();
|
|
2175
2243
|
init_sandbox_ledger();
|
|
@@ -2301,6 +2369,9 @@ var init_agent_start_schema = __esm({
|
|
|
2301
2369
|
notifyParentOnCrash: mcpBool.optional().describe(
|
|
2302
2370
|
`Notify this session's parent directly (in-band) if it later crashes. Independent of the global \`notifyUrl\` webhook, which fires either way. ${help("notifyParentOnCrash")}`
|
|
2303
2371
|
),
|
|
2372
|
+
sentinel: mcpBool.optional().describe(
|
|
2373
|
+
`Set false to opt this spawn OUT of sentinel auto-link: a PR this session opens will never get an automatic AIP-60 sentinel watching it, regardless of the daemon's \`sentinel.autoWatchPrs\` config. ${help("sentinel")}`
|
|
2374
|
+
),
|
|
2304
2375
|
allowSharedCwd: mcpBool.optional().describe(
|
|
2305
2376
|
"Acknowledge running a nested spawn in the parent's dirty working tree, silencing the shared-dirty-cwd warning. Only relevant with no `worktree`/`sandbox`; default false = warn."
|
|
2306
2377
|
),
|
|
@@ -2315,6 +2386,12 @@ var init_agent_start_schema = __esm({
|
|
|
2315
2386
|
skills: jsonTolerant(z.array(z.string())).optional().describe(
|
|
2316
2387
|
`Normalized skill ids for this session (e.g. ['agentproto']). REPLACES (not unions) config defaults when set. Adapters with no \`skills\` option (e.g. claude-code) ignore it. ${help("skills")}`
|
|
2317
2388
|
),
|
|
2389
|
+
bundles: jsonTolerant(z.array(z.string())).optional().describe(
|
|
2390
|
+
`Capability bundle ids (\`bundle_list\`) to attach \u2014 each expands to its imported MCPs (mounted as native MCP servers, never via the mcp_imported_* indirection) + skills, and optionally the daemon's own /mcp. REPLACES (not unions) config defaults when set. ${help("bundles")}`
|
|
2391
|
+
),
|
|
2392
|
+
daemonMount: mcpBool.optional().describe(
|
|
2393
|
+
`Explicitly mount the daemon's own scoped /mcp gateway for this spawn \u2014 the only way an adapter outside the default self-mount set (opencode, codex, gemini, \u2026) gets it. Default false. ${help("daemonMount")}`
|
|
2394
|
+
),
|
|
2318
2395
|
model: z.string().optional().describe(
|
|
2319
2396
|
"Model identifier to pass to the adapter. For claude-code, applied via session/set_config_option \u2014 NOT a CLI flag."
|
|
2320
2397
|
),
|
|
@@ -2324,6 +2401,16 @@ var init_agent_start_schema = __esm({
|
|
|
2324
2401
|
route: jsonTolerant(
|
|
2325
2402
|
z.object({ gateway: z.string().min(1), baseUrl: z.string().url().optional() })
|
|
2326
2403
|
).optional().describe("Billing route/gateway. Independent of `model` and `access`."),
|
|
2404
|
+
inference: jsonTolerant(
|
|
2405
|
+
z.object({
|
|
2406
|
+
endpoint: z.string().min(1).optional().describe('A registered local/LAN inference endpoint id (`agentproto llm endpoints list`), or "<id>@<device>" for a paired device\'s own shared endpoint.'),
|
|
2407
|
+
model: z.string().min(1).optional().describe('A bare model id (paired with `endpoint`), or the shorthand "<model>@<device|endpoint>" when `endpoint` is omitted.'),
|
|
2408
|
+
force: mcpBool.optional().describe("Skip the fit-check refusal on a clear miss (the check still runs and still warns)."),
|
|
2409
|
+
headroomPct: z.number().min(0).max(95).optional().describe("Headroom percentage held back from the endpoint's loaded ctx for the fit check. Default 25.")
|
|
2410
|
+
})
|
|
2411
|
+
).optional().describe(
|
|
2412
|
+
`Bind this spawn to a local/LAN inference endpoint instead of a cloud model: \`{endpoint}\`, \`{endpoint, model}\`, or the shorthand \`{model: "<model>@<device|endpoint>"}\`. Runs a fit check (the harness's known first-request size vs the endpoint's loaded ctx) BEFORE spawning and refuses with an actionable error on a clear miss (\`force\` overrides). Defaults \`adapter\`/\`harness\` to "pi" when neither is set. Mutually exclusive with \`model\`/\`route\`/\`access\` \u2014 set those directly instead of \`inference\`, never both. ${help("inference")}`
|
|
2413
|
+
),
|
|
2327
2414
|
access: jsonTolerant(z.object({ profileRef: z.string().min(1).optional() })).optional().describe("Named auth profile to bill at initial spawn; resolved from the local keychain."),
|
|
2328
2415
|
posture: z.string().optional().describe("Canonical agent posture (plan, bypass, accept-edits, read-only) or native harness mode."),
|
|
2329
2416
|
contextProfile: z.string().optional().describe("Context intake profile (for example full or lean)."),
|
|
@@ -2462,39 +2549,6 @@ var init_agent_start_schema = __esm({
|
|
|
2462
2549
|
agentStartInputSchema.omit({ wait: true });
|
|
2463
2550
|
}
|
|
2464
2551
|
});
|
|
2465
|
-
var effortSchema, postureSchema, routeSchema, userPresetSchema;
|
|
2466
|
-
var init_user_presets = __esm({
|
|
2467
|
-
"src/user-presets.ts"() {
|
|
2468
|
-
effortSchema = z.enum(["low", "medium", "high", "xhigh", "max", "ultracode"]);
|
|
2469
|
-
postureSchema = z.union([
|
|
2470
|
-
z.enum(["default", "plan", "accept-edits", "bypass", "read-only"]),
|
|
2471
|
-
z.object({ harnessModeId: z.string().min(1) })
|
|
2472
|
-
]);
|
|
2473
|
-
routeSchema = z.object({
|
|
2474
|
-
gateway: z.string().min(1),
|
|
2475
|
-
baseUrl: z.string().url().optional()
|
|
2476
|
-
});
|
|
2477
|
-
userPresetSchema = z.object({
|
|
2478
|
-
id: z.string().regex(/^[a-z0-9][a-z0-9-]*$/),
|
|
2479
|
-
label: z.string().min(1),
|
|
2480
|
-
adapter: z.string().min(1).optional(),
|
|
2481
|
-
harness: z.string().min(1).optional(),
|
|
2482
|
-
model: z.string().min(1).optional(),
|
|
2483
|
-
route: routeSchema.optional(),
|
|
2484
|
-
access: z.object({ profileRef: z.string().min(1).optional() }).optional(),
|
|
2485
|
-
posture: postureSchema.optional(),
|
|
2486
|
-
effort: effortSchema.optional(),
|
|
2487
|
-
contextProfile: z.string().min(1).optional(),
|
|
2488
|
-
cwd: z.string().min(1).optional(),
|
|
2489
|
-
skills: z.array(z.string().min(1)).optional(),
|
|
2490
|
-
browser: z.union([z.literal("headless"), z.literal(false)]).optional()
|
|
2491
|
-
});
|
|
2492
|
-
z.object({
|
|
2493
|
-
version: z.literal(1),
|
|
2494
|
-
presets: z.array(userPresetSchema)
|
|
2495
|
-
});
|
|
2496
|
-
}
|
|
2497
|
-
});
|
|
2498
2552
|
var init_catalog_provider_models = __esm({
|
|
2499
2553
|
"src/catalog-provider-models.ts"() {
|
|
2500
2554
|
}
|
|
@@ -2579,6 +2633,11 @@ var init_session_observer = __esm({
|
|
|
2579
2633
|
"src/session-observer.ts"() {
|
|
2580
2634
|
}
|
|
2581
2635
|
});
|
|
2636
|
+
var init_session_artifacts = __esm({
|
|
2637
|
+
"src/session-artifacts.ts"() {
|
|
2638
|
+
init_transcript_writer();
|
|
2639
|
+
}
|
|
2640
|
+
});
|
|
2582
2641
|
var DEFAULT_TITLER_MODEL;
|
|
2583
2642
|
var init_session_titler = __esm({
|
|
2584
2643
|
"src/session-titler.ts"() {
|
|
@@ -2654,6 +2713,7 @@ var init_sessions = __esm({
|
|
|
2654
2713
|
init_session_observer();
|
|
2655
2714
|
init_tool_presenter();
|
|
2656
2715
|
init_transcript_writer();
|
|
2716
|
+
init_session_artifacts();
|
|
2657
2717
|
init_session_titler();
|
|
2658
2718
|
init_resume_context_digest();
|
|
2659
2719
|
init_conversation_index();
|
|
@@ -2821,7 +2881,9 @@ var init_config_schema = __esm({
|
|
|
2821
2881
|
skills: z.array(z.string()).optional(),
|
|
2822
2882
|
options: optionsMapSchema.optional(),
|
|
2823
2883
|
auth: defaultsAdapterAuthConfigSchema.optional(),
|
|
2824
|
-
contextContinuity: contextContinuityPolicySchema.optional()
|
|
2884
|
+
contextContinuity: contextContinuityPolicySchema.optional(),
|
|
2885
|
+
bundles: z.array(z.string()).optional(),
|
|
2886
|
+
daemonMount: z.boolean().optional()
|
|
2825
2887
|
}).passthrough();
|
|
2826
2888
|
mcpDefaultsConfigSchema = z.object({
|
|
2827
2889
|
deferredTools: deferredToolsConfigSchema.optional()
|
|
@@ -2830,6 +2892,7 @@ var init_config_schema = __esm({
|
|
|
2830
2892
|
skills: z.array(z.string()).optional(),
|
|
2831
2893
|
options: optionsMapSchema.optional(),
|
|
2832
2894
|
adapters: z.record(z.string(), defaultsAdapterConfigSchema).optional(),
|
|
2895
|
+
bundles: z.array(z.string()).optional(),
|
|
2833
2896
|
contextContinuity: contextContinuityPolicySchema.optional(),
|
|
2834
2897
|
defaultRoleDepthCutoff: z.number().optional(),
|
|
2835
2898
|
maxGrantableDelegation: z.number().optional(),
|
|
@@ -2871,7 +2934,9 @@ var init_config_schema = __esm({
|
|
|
2871
2934
|
}).passthrough();
|
|
2872
2935
|
featuresConfigSchema = z.object({
|
|
2873
2936
|
pty: z.boolean().optional(),
|
|
2874
|
-
llmEndpoint: z.boolean().optional()
|
|
2937
|
+
llmEndpoint: z.boolean().optional(),
|
|
2938
|
+
deviceInferenceShare: z.boolean().optional(),
|
|
2939
|
+
deviceSpawnAllow: z.boolean().optional()
|
|
2875
2940
|
}).passthrough();
|
|
2876
2941
|
worktreesConfigSchema = z.object({
|
|
2877
2942
|
root: z.string().optional(),
|
|
@@ -3211,6 +3276,15 @@ var init_config_schema = __esm({
|
|
|
3211
3276
|
label: "Default options",
|
|
3212
3277
|
help: "AIP-45 options auto-applied to every agent_start spawn."
|
|
3213
3278
|
},
|
|
3279
|
+
{
|
|
3280
|
+
path: "defaults.bundles",
|
|
3281
|
+
schema: strArray,
|
|
3282
|
+
apply: "hot",
|
|
3283
|
+
writable: true,
|
|
3284
|
+
section: "defaults",
|
|
3285
|
+
label: "Default capability bundles",
|
|
3286
|
+
help: "Bundle ids (bundle_list) auto-attached to every agent_start spawn (unioned with per-adapter bundles)."
|
|
3287
|
+
},
|
|
3214
3288
|
{
|
|
3215
3289
|
path: "defaults.defaultRoleDepthCutoff",
|
|
3216
3290
|
schema: num,
|
|
@@ -3437,6 +3511,25 @@ var init_config_schema = __esm({
|
|
|
3437
3511
|
label: "Adapter default options",
|
|
3438
3512
|
help: "AIP-45 options auto-applied to spawns of this adapter."
|
|
3439
3513
|
},
|
|
3514
|
+
{
|
|
3515
|
+
path: "defaults.adapters.*.bundles",
|
|
3516
|
+
schema: strArray,
|
|
3517
|
+
apply: "hot",
|
|
3518
|
+
writable: true,
|
|
3519
|
+
section: "harnesses",
|
|
3520
|
+
label: "Adapter default capability bundles",
|
|
3521
|
+
help: "Bundle ids (bundle_list) auto-attached to spawns of this adapter (unioned with the global default)."
|
|
3522
|
+
},
|
|
3523
|
+
{
|
|
3524
|
+
path: "defaults.adapters.*.daemonMount",
|
|
3525
|
+
schema: z.boolean(),
|
|
3526
|
+
apply: "hot",
|
|
3527
|
+
writable: true,
|
|
3528
|
+
section: "harnesses",
|
|
3529
|
+
label: "Adapter daemon self-mount opt-in",
|
|
3530
|
+
help: "Explicitly mount the daemon's own scoped /mcp for spawns of this adapter, for harnesses outside the default self-mount allowlist (opencode, codex, gemini, \u2026).",
|
|
3531
|
+
default: false
|
|
3532
|
+
},
|
|
3440
3533
|
{
|
|
3441
3534
|
path: "defaults.adapters.*.contextContinuity",
|
|
3442
3535
|
schema: contextContinuityPolicySchema,
|
|
@@ -3680,6 +3773,26 @@ var init_config_schema = __esm({
|
|
|
3680
3773
|
label: "LLM Endpoint feature",
|
|
3681
3774
|
help: "Enable the local LLM Endpoint proxy sidecar (route + MCP tools + child-process lifecycle).",
|
|
3682
3775
|
default: false
|
|
3776
|
+
},
|
|
3777
|
+
{
|
|
3778
|
+
path: "features.deviceInferenceShare",
|
|
3779
|
+
schema: bool,
|
|
3780
|
+
apply: "restart",
|
|
3781
|
+
writable: true,
|
|
3782
|
+
section: "daemon",
|
|
3783
|
+
label: "Device inference sharing",
|
|
3784
|
+
help: "Expose this daemon's local inference endpoint(s) to a paired HOST-scoped controller. Toggle via `agentproto devices share-inference on|off`.",
|
|
3785
|
+
default: false
|
|
3786
|
+
},
|
|
3787
|
+
{
|
|
3788
|
+
path: "features.deviceSpawnAllow",
|
|
3789
|
+
schema: bool,
|
|
3790
|
+
apply: "restart",
|
|
3791
|
+
writable: true,
|
|
3792
|
+
section: "daemon",
|
|
3793
|
+
label: "Device spawn allow",
|
|
3794
|
+
help: 'Allow a paired HOST-scoped controller to spawn/drive agent sessions on this daemon (`agent_start({ sandbox: "device:<name>" })`). Toggle via `agentproto devices allow-spawn on|off`.',
|
|
3795
|
+
default: false
|
|
3683
3796
|
}
|
|
3684
3797
|
];
|
|
3685
3798
|
CONFIG_KEYS_NOT_EXPOSED = [
|