@agentproto/runtime 4.1.0 → 5.1.0

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/config.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { S as SpawnDefaultsConfig } from './spawn-defaults-CZj39Znq.js';
1
+ import { S as SpawnDefaultsConfig } from './spawn-defaults-wQV9AeiG.js';
2
2
  import './context-continuity-Bn99UtVC.js';
3
3
  import '@agentproto/acp';
4
4
  import '@agentproto/command-sandbox';
@@ -183,6 +183,16 @@ interface FeaturesConfig {
183
183
  * an opt-in feature; when off, the `llm-endpoint` custom route is not
184
184
  * registered and the `llm_endpoint_*` MCP tools are not exposed. */
185
185
  llmEndpoint?: boolean;
186
+ /** Expose this daemon's local inference endpoint(s) (the `llmEndpoint`
187
+ * sidecar above) to paired controllers over a HOST-scoped pairing —
188
+ * `GET /device-inference/v1/models` + `POST
189
+ * /device-inference/v1/chat/completions` in http-server.ts. Default
190
+ * false: even with `llmEndpoint` on, a plain remote-control pairing (or
191
+ * `serve --connect`) never gets these routes regardless of this flag —
192
+ * it also requires the pairing itself to be host-scoped (`pair offer
193
+ * --host` + `devices add`). Toggle via `agentproto devices
194
+ * share-inference on|off`. */
195
+ deviceInferenceShare?: boolean;
186
196
  }
187
197
  /**
188
198
  * Policy for `agentproto worktree new` (PLAN.md §1.4 — config carries
@@ -310,6 +320,19 @@ interface ProvenanceConfig {
310
320
  /** Enable the opt-in `gh` provenance PATH shim for spawned sessions. */
311
321
  wrapGh?: boolean;
312
322
  }
323
+ /**
324
+ * Sentinel auto-link policy (AIP-60 §6, step 4) — whether a PR an executor
325
+ * session opens gets a sentinel created for it automatically.
326
+ */
327
+ interface SentinelConfig {
328
+ /** Auto-watch a PR when a session opens one (`recordOpenedPr`, fed by
329
+ * `command_execute`'s stamper and both `pr-provenance-reconciler.ts`
330
+ * lanes). When unset, the daemon defaults to `true` only when the
331
+ * `local-gh` provider is available (i.e. `gh auth status` succeeds) —
332
+ * otherwise `false`, logged once. Explicitly setting this always wins
333
+ * over that probe. Per-spawn opt-out: `agent_start.sentinel: false`. */
334
+ autoWatchPrs?: boolean;
335
+ }
313
336
  /**
314
337
  * Session-presence policy — how the dashboard triages a session into its
315
338
  * `running` / `tending` / `attention` / `quiet` presence state (see
@@ -492,6 +515,8 @@ interface AgentprotoConfig {
492
515
  sessions?: SessionsConfig;
493
516
  /** Provenance policy — the opt-in `gh` PATH shim. See {@link ProvenanceConfig}. */
494
517
  provenance?: ProvenanceConfig;
518
+ /** Sentinel auto-link policy. See {@link SentinelConfig}. */
519
+ sentinel?: SentinelConfig;
495
520
  /** Daemon-side AGENTS.md resolution/injection policy. See {@link AgentsMdConfig}. */
496
521
  agentsMd?: AgentsMdConfig;
497
522
  /** Daemon-side session titler (`session-titler.ts`). DEFAULT OFF — when
@@ -564,4 +589,4 @@ declare function getConfigKey(cfg: AgentprotoConfig, dotted: string): unknown;
564
589
  */
565
590
  declare function setConfigKey(cfg: AgentprotoConfig, dotted: string, value: unknown): AgentprotoConfig;
566
591
 
567
- export { type AcpAgentConfigEntry, type AgentprotoConfig, type AgentsMdConfig, CONFIG_FILE_PATH, CONFIG_VERSION, type DaemonConfig, type FeaturesConfig, type PairingConfig, type ProfileConfig, type ProvenanceConfig, type SessionsConfig, type SpawnAttachMode, type SpawnConfig, type SpawnDedupeMode, type TerminalPreset, type TitlerConfig, type TunnelConfig, type WorktreeIsolationMode, type WorktreesConfig, getConfigKey, loadConfig, saveConfig, setConfigKey };
592
+ export { type AcpAgentConfigEntry, type AgentprotoConfig, type AgentsMdConfig, CONFIG_FILE_PATH, CONFIG_VERSION, type DaemonConfig, type FeaturesConfig, type PairingConfig, type ProfileConfig, type ProvenanceConfig, type SentinelConfig, type SessionsConfig, type SpawnAttachMode, type SpawnConfig, type SpawnDedupeMode, type TerminalPreset, type TitlerConfig, type TunnelConfig, type WorktreeIsolationMode, type WorktreesConfig, getConfigKey, loadConfig, saveConfig, setConfigKey };
package/dist/config.mjs CHANGED
@@ -1944,6 +1944,29 @@ var init_worktree_identity = __esm({
1944
1944
  z.object({ worktreeId: z.string() });
1945
1945
  }
1946
1946
  });
1947
+ var init_mcp_imports = __esm({
1948
+ "src/mcp-imports.ts"() {
1949
+ }
1950
+ });
1951
+ var bundleIdSchema, bundleSchema;
1952
+ var init_bundles = __esm({
1953
+ "src/bundles.ts"() {
1954
+ init_mcp_imports();
1955
+ bundleIdSchema = z.string().regex(/^[a-z0-9][a-z0-9-]*$/, "id must be lowercase kebab-case (letters, digits, hyphens)");
1956
+ bundleSchema = z.object({
1957
+ id: bundleIdSchema,
1958
+ label: z.string().min(1),
1959
+ description: z.string().min(1).optional(),
1960
+ mcpImports: z.array(z.string().min(1)),
1961
+ includeDaemon: z.boolean().optional(),
1962
+ skills: z.array(z.string().min(1))
1963
+ });
1964
+ z.object({
1965
+ version: z.literal(1),
1966
+ bundles: z.array(bundleSchema)
1967
+ });
1968
+ }
1969
+ });
1947
1970
  var init_catalog_models = __esm({
1948
1971
  "src/catalog-models.ts"() {
1949
1972
  init_spawn_defaults();
@@ -2147,10 +2170,13 @@ var init_sandbox_adapters = __esm({
2147
2170
  var init_session_spawn = __esm({
2148
2171
  "src/session-spawn.ts"() {
2149
2172
  init_sessions();
2173
+ init_transcript_writer();
2150
2174
  init_workspaces_config();
2151
2175
  init_config();
2152
2176
  init_worktree_identity();
2153
2177
  init_spawn_defaults();
2178
+ init_bundles();
2179
+ init_mcp_imports();
2154
2180
  init_launch_config();
2155
2181
  init_claude_code_oauth_source();
2156
2182
  init_providers_store();
@@ -2296,6 +2322,9 @@ var init_agent_start_schema = __esm({
2296
2322
  notifyParentOnCrash: mcpBool.optional().describe(
2297
2323
  `Notify this session's parent directly (in-band) if it later crashes. Independent of the global \`notifyUrl\` webhook, which fires either way. ${help("notifyParentOnCrash")}`
2298
2324
  ),
2325
+ sentinel: mcpBool.optional().describe(
2326
+ `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")}`
2327
+ ),
2299
2328
  allowSharedCwd: mcpBool.optional().describe(
2300
2329
  "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."
2301
2330
  ),
@@ -2310,6 +2339,12 @@ var init_agent_start_schema = __esm({
2310
2339
  skills: jsonTolerant(z.array(z.string())).optional().describe(
2311
2340
  `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")}`
2312
2341
  ),
2342
+ bundles: jsonTolerant(z.array(z.string())).optional().describe(
2343
+ `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")}`
2344
+ ),
2345
+ daemonMount: mcpBool.optional().describe(
2346
+ `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")}`
2347
+ ),
2313
2348
  model: z.string().optional().describe(
2314
2349
  "Model identifier to pass to the adapter. For claude-code, applied via session/set_config_option \u2014 NOT a CLI flag."
2315
2350
  ),
@@ -2482,6 +2517,7 @@ var init_user_presets = __esm({
2482
2517
  contextProfile: z.string().min(1).optional(),
2483
2518
  cwd: z.string().min(1).optional(),
2484
2519
  skills: z.array(z.string().min(1)).optional(),
2520
+ bundles: z.array(z.string().min(1)).optional(),
2485
2521
  browser: z.union([z.literal("headless"), z.literal(false)]).optional()
2486
2522
  });
2487
2523
  z.object({
@@ -2574,6 +2610,11 @@ var init_session_observer = __esm({
2574
2610
  "src/session-observer.ts"() {
2575
2611
  }
2576
2612
  });
2613
+ var init_session_artifacts = __esm({
2614
+ "src/session-artifacts.ts"() {
2615
+ init_transcript_writer();
2616
+ }
2617
+ });
2577
2618
  var DEFAULT_TITLER_MODEL;
2578
2619
  var init_session_titler = __esm({
2579
2620
  "src/session-titler.ts"() {
@@ -2649,6 +2690,7 @@ var init_sessions = __esm({
2649
2690
  init_session_observer();
2650
2691
  init_tool_presenter();
2651
2692
  init_transcript_writer();
2693
+ init_session_artifacts();
2652
2694
  init_session_titler();
2653
2695
  init_resume_context_digest();
2654
2696
  init_conversation_index();
@@ -2732,7 +2774,9 @@ var init_config_schema = __esm({
2732
2774
  skills: z.array(z.string()).optional(),
2733
2775
  options: optionsMapSchema.optional(),
2734
2776
  auth: defaultsAdapterAuthConfigSchema.optional(),
2735
- contextContinuity: contextContinuityPolicySchema.optional()
2777
+ contextContinuity: contextContinuityPolicySchema.optional(),
2778
+ bundles: z.array(z.string()).optional(),
2779
+ daemonMount: z.boolean().optional()
2736
2780
  }).passthrough();
2737
2781
  mcpDefaultsConfigSchema = z.object({
2738
2782
  deferredTools: deferredToolsConfigSchema.optional()
@@ -2741,6 +2785,7 @@ var init_config_schema = __esm({
2741
2785
  skills: z.array(z.string()).optional(),
2742
2786
  options: optionsMapSchema.optional(),
2743
2787
  adapters: z.record(z.string(), defaultsAdapterConfigSchema).optional(),
2788
+ bundles: z.array(z.string()).optional(),
2744
2789
  contextContinuity: contextContinuityPolicySchema.optional(),
2745
2790
  defaultRoleDepthCutoff: z.number().optional(),
2746
2791
  maxGrantableDelegation: z.number().optional(),
@@ -2782,7 +2827,8 @@ var init_config_schema = __esm({
2782
2827
  }).passthrough();
2783
2828
  featuresConfigSchema = z.object({
2784
2829
  pty: z.boolean().optional(),
2785
- llmEndpoint: z.boolean().optional()
2830
+ llmEndpoint: z.boolean().optional(),
2831
+ deviceInferenceShare: z.boolean().optional()
2786
2832
  }).passthrough();
2787
2833
  worktreesConfigSchema = z.object({
2788
2834
  root: z.string().optional(),
@@ -3122,6 +3168,15 @@ var init_config_schema = __esm({
3122
3168
  label: "Default options",
3123
3169
  help: "AIP-45 options auto-applied to every agent_start spawn."
3124
3170
  },
3171
+ {
3172
+ path: "defaults.bundles",
3173
+ schema: strArray,
3174
+ apply: "hot",
3175
+ writable: true,
3176
+ section: "defaults",
3177
+ label: "Default capability bundles",
3178
+ help: "Bundle ids (bundle_list) auto-attached to every agent_start spawn (unioned with per-adapter bundles)."
3179
+ },
3125
3180
  {
3126
3181
  path: "defaults.defaultRoleDepthCutoff",
3127
3182
  schema: num,
@@ -3348,6 +3403,25 @@ var init_config_schema = __esm({
3348
3403
  label: "Adapter default options",
3349
3404
  help: "AIP-45 options auto-applied to spawns of this adapter."
3350
3405
  },
3406
+ {
3407
+ path: "defaults.adapters.*.bundles",
3408
+ schema: strArray,
3409
+ apply: "hot",
3410
+ writable: true,
3411
+ section: "harnesses",
3412
+ label: "Adapter default capability bundles",
3413
+ help: "Bundle ids (bundle_list) auto-attached to spawns of this adapter (unioned with the global default)."
3414
+ },
3415
+ {
3416
+ path: "defaults.adapters.*.daemonMount",
3417
+ schema: z.boolean(),
3418
+ apply: "hot",
3419
+ writable: true,
3420
+ section: "harnesses",
3421
+ label: "Adapter daemon self-mount opt-in",
3422
+ 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).",
3423
+ default: false
3424
+ },
3351
3425
  {
3352
3426
  path: "defaults.adapters.*.contextContinuity",
3353
3427
  schema: contextContinuityPolicySchema,
@@ -3591,6 +3665,16 @@ var init_config_schema = __esm({
3591
3665
  label: "LLM Endpoint feature",
3592
3666
  help: "Enable the local LLM Endpoint proxy sidecar (route + MCP tools + child-process lifecycle).",
3593
3667
  default: false
3668
+ },
3669
+ {
3670
+ path: "features.deviceInferenceShare",
3671
+ schema: bool,
3672
+ apply: "restart",
3673
+ writable: true,
3674
+ section: "daemon",
3675
+ label: "Device inference sharing",
3676
+ help: "Expose this daemon's local inference endpoint(s) to a paired HOST-scoped controller. Toggle via `agentproto devices share-inference on|off`.",
3677
+ default: false
3594
3678
  }
3595
3679
  ];
3596
3680
  }