@tangle-network/sandbox 1.0.242 → 1.0.244

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.
Files changed (59) hide show
  1. package/dist/agent/index.d.ts +4 -4
  2. package/dist/agent/index.js +5 -5
  3. package/dist/agent/preview.d.ts +1 -1
  4. package/dist/agent/preview.js +2 -2
  5. package/dist/{agent-execution-preparation-CjKTjmJ9.js → agent-execution-preparation-N1ksNIIJ.js} +3 -3
  6. package/dist/{agent-execution-preparation-receipt-AihkqLnd.js → agent-execution-preparation-receipt-j1Z7Om0k.js} +4 -4
  7. package/dist/{agent-run-outcome-CUfQje-w.d.ts → agent-run-outcome-ozWNjNhL.d.ts} +2 -2
  8. package/dist/{api-request-BWT7PYL0.js → api-request-BjSvgUY_.js} +2 -2
  9. package/dist/auth/index.js +2 -2
  10. package/dist/{browser-interactive-control-controller-B0bioynZ.js → browser-interactive-control-controller-BO15Bwap.js} +14 -14
  11. package/dist/{browser-interactive-control-controller-D9plWzEP.d.ts → browser-interactive-control-controller-DS7pHEUa.d.ts} +1 -1
  12. package/dist/{chunked-upload-O-8ZfTgv.js → chunked-upload-B_CfWth1.js} +1 -1
  13. package/dist/{chunked-upload-file-Cko41h8C.js → chunked-upload-file-16t2BxYx.js} +1 -1
  14. package/dist/{cli-auth-bundle-C6DtK7GX-DoqlFTT-.js → cli-auth-bundle-C6DtK7GX-D8681c7j.js} +1 -1
  15. package/dist/cli-auth-bundle-D5ZBMpZ7.js +2 -0
  16. package/dist/{client-CjekYXSa.js → client-BqsozHqq.js} +8 -8
  17. package/dist/{client-Tv6glrZu.d.ts → client-CgYnVVB8.d.ts} +5 -5
  18. package/dist/collaboration/index.js +1 -1
  19. package/dist/{collaboration-DKC-ShI6.js → collaboration-B1rRNtfI.js} +2 -2
  20. package/dist/core.d.ts +6 -6
  21. package/dist/core.js +5 -5
  22. package/dist/{error-catalog-LyHHTFoQ.js → error-catalog-CH_n2ubl.js} +1 -0
  23. package/dist/{errors-BY-3SBlL.js → errors-LJAXbFuF.js} +1 -1
  24. package/dist/{file-download-C-u5Ejk6.js → file-download-BQZCoO5d.js} +1 -1
  25. package/dist/{harness-C5lXV9e5.js → harness--g8UQ5TZ.js} +4 -4
  26. package/dist/{index-D_q6Yfb-.d.ts → index-CO8UEqXd.d.ts} +5 -5
  27. package/dist/index.d.ts +9 -9
  28. package/dist/index.js +12 -12
  29. package/dist/intelligence/index.js +3 -3
  30. package/dist/interactive-control.d.ts +1 -1
  31. package/dist/interactive-control.js +1 -1
  32. package/dist/{interactive-controller-9ILeAfX9.js → interactive-controller-Drq_P1i_.js} +7 -7
  33. package/dist/{interactive-controller-CG6mx72N.d.ts → interactive-controller-mQvTLQaB.d.ts} +3 -3
  34. package/dist/{lines-BNaFiqBy.js → lines-CIkCYod2.js} +1 -1
  35. package/dist/{lines-DuXPjPJT.d.ts → lines-Dtgmj3fv.d.ts} +1 -1
  36. package/dist/lines.d.ts +1 -1
  37. package/dist/lines.js +1 -1
  38. package/dist/{local-cli-auth-DrNihS9-.js → local-cli-auth-wyO74fdb.js} +1 -1
  39. package/dist/{mcp-local-BAUbr-VS.js → mcp-local-LiNITCkH.js} +2 -2
  40. package/dist/{preview-C_9PQGix.d.ts → preview-CmzyytTg.d.ts} +3 -3
  41. package/dist/{profile-schema-C0n0VgmA.js → profile-schema-B11dRfGB.js} +352 -441
  42. package/dist/{public-templates-CBH6Qrnn.d.ts → public-templates-CL-BhKOA.d.ts} +2 -2
  43. package/dist/public-templates.d.ts +1 -1
  44. package/dist/public-templates.js +1 -1
  45. package/dist/{raw-evidence-archive-CpPxVqUK.js → raw-evidence-archive-Bg8v2G0F.js} +1 -1
  46. package/dist/runtime.d.ts +5 -5
  47. package/dist/runtime.js +5 -5
  48. package/dist/{sandbox-Bu3jceX_.js → sandbox-yHsqmP2_.js} +18 -17
  49. package/dist/{select-seat--yEFCKqb.js → select-seat-Bn2J3IsQ.js} +5 -5
  50. package/dist/select-seat-command.d.ts +2 -2
  51. package/dist/select-seat-command.js +2 -2
  52. package/dist/session-gateway/index.js +1 -1
  53. package/dist/tangle/index.d.ts +1 -1
  54. package/dist/tangle/index.js +1 -1
  55. package/dist/{tangle-BtTPZXhK.js → tangle-DQJLMJo6.js} +3 -3
  56. package/dist/{terminal-stream-types-DQNUfdKj.d.ts → terminal-stream-types-CbtlD2UT.d.ts} +15 -14
  57. package/dist/{types-jIqZ_dPk.d.ts → types-7MzBACDM.d.ts} +1 -1
  58. package/package.json +7 -7
  59. package/dist/cli-auth-bundle-BinY89CX.js +0 -2
@@ -1,6 +1,6 @@
1
- import { C as boundedIdentifierSchema, O as isBoundedJsonMaterial, _ as CONTRACT_MAX_ARRAY_LENGTH, a as agentCandidateSecretRefSchema, c as environmentNameSchema, d as isSafeExecutable, f as isSafeRelativePath, g as sha256DigestSchema, i as trainedModelIdForArtifact, l as headerNameSchema, m as looksLikeCredential, n as REASONING_EFFORTS, o as canonicalCandidateDigest, p as isWellFormedUnicode, s as canonicalCandidateJson, t as harnessTypeSchema, v as CONTRACT_MAX_JSON_NODES } from "./harness-C5lXV9e5.js";
1
+ import { C as boundedIdentifierSchema, O as isBoundedJsonMaterial, _ as CONTRACT_MAX_ARRAY_LENGTH, a as agentCandidateSecretRefSchema, c as environmentNameSchema, d as isSafeExecutable, f as isSafeRelativePath, g as sha256DigestSchema, i as trainedModelIdForArtifact, l as headerNameSchema, m as looksLikeCredential, n as REASONING_EFFORTS, o as canonicalCandidateDigest, p as isWellFormedUnicode, s as canonicalCandidateJson, t as harnessTypeSchema, v as CONTRACT_MAX_JSON_NODES } from "./harness--g8UQ5TZ.js";
2
2
  import { z } from "zod";
3
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/deep-freeze.js
3
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.20/node_modules/@tangle-network/agent-interface/dist/deep-freeze.js
4
4
  /**
5
5
  * Make a validated value immutable before it is handed out.
6
6
  *
@@ -20,7 +20,7 @@ function deepFreeze(value, seen = /* @__PURE__ */ new Set()) {
20
20
  return Object.freeze(value);
21
21
  }
22
22
  //#endregion
23
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/profile-knowledge.js
23
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.20/node_modules/@tangle-network/agent-interface/dist/profile-knowledge.js
24
24
  /** Immutable Hub generation identities, never aliases such as latest or a caller's scope. */
25
25
  const agentProfileKnowledgeRefSchema = z.strictObject({
26
26
  sourceId: z.string().regex(/^[A-Za-z0-9_-]{1,128}$/),
@@ -38,7 +38,7 @@ const agentProfileKnowledgeRefsSchema = z.array(agentProfileKnowledgeRefSchema).
38
38
  });
39
39
  });
40
40
  //#endregion
41
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/agent-profile-canonical.js
41
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.20/node_modules/@tangle-network/agent-interface/dist/agent-profile-canonical.js
42
42
  /** Why a value cannot be AgentProfile JSON, with the path of the offending entry. */
43
43
  var AgentProfileValueError = class extends Error {
44
44
  path;
@@ -114,7 +114,7 @@ function renderPath(path) {
114
114
  return path.length === 0 ? "root" : path.join(".");
115
115
  }
116
116
  //#endregion
117
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/own-property-record.js
117
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.20/node_modules/@tangle-network/agent-interface/dist/own-property-record.js
118
118
  /**
119
119
  * Zod records currently assign parsed values onto an ordinary object. The
120
120
  * special own key `__proto__` therefore invokes the legacy prototype setter
@@ -197,7 +197,7 @@ function decodeRecordKey(value) {
197
197
  return decoded;
198
198
  }
199
199
  //#endregion
200
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/proxy-secrets.js
200
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.20/node_modules/@tangle-network/agent-interface/dist/proxy-secrets.js
201
201
  /**
202
202
  * Declarations request authority. The issuer intersects scope/expiry with authenticated tenant,
203
203
  * issuer policy and lineage, without personal/team fallback, pinning immutable secret ID/revision.
@@ -363,427 +363,70 @@ z.strictObject({
363
363
  requireInPlace: z.boolean().optional()
364
364
  });
365
365
  //#endregion
366
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/harness-capabilities.js
367
- /** Canonical harness/model, effort and prompt controls. Model-specific capability comes from the serving catalog. */
368
- /** low → high. `none` = thinking off; `ultracode` = max (claude-code mode). */
369
- const reasoningLadder = REASONING_EFFORTS;
370
- /** Provider prefix of a canonical model id (`anthropic/claude-…` → `anthropic`), or null. */
371
- function modelProvider(modelId) {
372
- const slash = modelId.indexOf("/");
373
- return slash > 0 ? modelId.slice(0, slash) : null;
374
- }
375
- /**
376
- * Model families whose bare ids belong to one provider. The Router catalog serves most ids without a
377
- * prefix (`claude-sonnet-5-5`, `gpt-5.5`, `glm-5.3`) and names the provider beside them, so a check
378
- * that read every bare id as "any provider" offered `claude-code` with `glm-5.3`.
379
- */
380
- const bareModelFamilyProviders = [
381
- [/^claude-/, "anthropic"],
382
- [/^(gpt-|chatgpt-|codex-|o\d+(-|$))/, "openai"],
383
- [/^(kimi-|moonshot-)/, "moonshot"],
384
- [/^gemini-/, "google"],
385
- [/^glm-/, "zai"],
386
- [/^deepseek-/, "deepseek"],
387
- [/^grok-/, "xai"]
388
- ];
389
- /**
390
- * The provider a model id belongs to: its explicit prefix, else the provider of its bare-id family
391
- * (`claude-sonnet-5-5` → `anthropic`). `null` for an id outside every family, such as the `default`
392
- * sentinel, whose provider only the serving harness knows.
393
- */
394
- function resolveModelProvider(modelId) {
395
- const explicit = modelProvider(modelId);
396
- if (explicit) return explicit;
397
- const id = modelId.trim().toLowerCase();
398
- for (const [family, provider] of bareModelFamilyProviders) if (family.test(id)) return provider;
399
- return null;
400
- }
401
- const SANDBOX_HARNESS_MATRIX_EVIDENCE = "https://github.com/tangle-network/agent-container/issues/9382";
402
- /**
403
- * Pairs a router-backed harness cannot run, measured on production with the Router credential: one
404
- * prompt per pair, profile reasoning effort `medium` (2026-10-05). The same run passed pi with
405
- * `openai/gpt-5.5` and `zai/glm-5.3`, and opencode with every model listed here. Pairs not listed
406
- * were not measured to fail. An entry is removed when its harness adapter or the Router is fixed and
407
- * the pair passes a new production measurement.
408
- *
409
- * pi's chat-completions client (pi-ai 0.85.1) marks a model as reasoning only when the profile asks
410
- * for a reasoning effort, and only a reasoning model is sent the `developer` role and
411
- * `reasoning_effort`; that is why the first two entries need a reasoning effort.
412
- */
413
- const harnessModelExclusions = [
414
- {
415
- harness: "pi",
416
- models: /^anthropic\//,
417
- onlyWithReasoningEffort: true,
418
- reason: "the Router's chat-completions route for Anthropic models rejects the \"developer\" role pi sends to a reasoning model (400 Unexpected role \"developer\")",
419
- measuredOn: "2026-10-05",
420
- evidence: SANDBOX_HARNESS_MATRIX_EVIDENCE
421
- },
422
- {
423
- harness: "pi",
424
- models: /^openai\/gpt-5\.6-luna$/,
425
- onlyWithReasoningEffort: true,
426
- reason: "OpenAI does not accept function tools together with reasoning_effort for this model on /v1/chat/completions, the only route pi speaks",
427
- measuredOn: "2026-10-05",
428
- evidence: SANDBOX_HARNESS_MATRIX_EVIDENCE
429
- },
430
- {
431
- harness: "pi",
432
- models: /^google\/gemini-3\.8-flash$/,
433
- onlyWithReasoningEffort: false,
434
- reason: "the model requires each function call to return its thought_signature, which pi's chat-completions client does not send back (400 Function call is missing a thought_signature)",
435
- measuredOn: "2026-10-05",
436
- evidence: SANDBOX_HARNESS_MATRIX_EVIDENCE
437
- }
438
- ];
439
- /**
440
- * Whether a harness can run a model, and why not. A bare id resolves its provider through
441
- * {@link resolveModelProvider}; an id whose provider cannot be resolved (a sentinel like `default`)
442
- * is left to the harness, because its provider only the serving harness knows. Only the measured
443
- * {@link harnessModelExclusions} are refused.
444
- */
445
- function harnessModelSupport(harness, modelId, options = {}) {
446
- const trimmed = modelId.trim();
447
- const provider = resolveModelProvider(trimmed);
448
- const model = provider !== null && modelProvider(trimmed) === null ? `${provider}/${trimmed}` : trimmed;
449
- if (provider === null) return {
450
- supported: true,
451
- model,
452
- provider
453
- };
454
- const reasoning = options.reasoningEffort !== void 0 && options.reasoningEffort !== null && options.reasoningEffort !== "none";
455
- const exclusion = harnessModelExclusions.find((entry) => entry.harness === harness && entry.models.test(model) && (!entry.onlyWithReasoningEffort || reasoning));
456
- if (exclusion) return {
457
- supported: false,
458
- model,
459
- provider,
460
- exclusion,
461
- message: `Harness ${harness} cannot run ${model}` + (exclusion.onlyWithReasoningEffort ? " with a reasoning effort" : "") + `: ${exclusion.reason} (measured ${exclusion.measuredOn}, ${exclusion.evidence}). ` + (exclusion.onlyWithReasoningEffort ? "Remove model.reasoningEffort, or choose another harness or model." : "Choose another harness or model.")
366
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.20/node_modules/@tangle-network/agent-interface/dist/profile-kb/entry.js
367
+ function claim(text, source, basis = "documented", audience = "operator") {
368
+ return {
369
+ text,
370
+ basis,
371
+ audience,
372
+ sources: [source]
462
373
  };
374
+ }
375
+ /** Keep public string arrays and entry citations derived from the same claim records. */
376
+ function kbEntry(entry) {
377
+ const sources = /* @__PURE__ */ new Map();
378
+ for (const claim of entry.claims) for (const source of claim.sources) sources.set(JSON.stringify(source), source);
379
+ const textFor = (audience) => entry.claims.filter((claim) => claim.audience === audience && claim.basis !== "hypothesis").map((claim) => claim.text);
463
380
  return {
464
- supported: true,
465
- model,
466
- provider
381
+ ...entry,
382
+ sources: [...sources.values()],
383
+ prompt: textFor("agent"),
384
+ operator: textFor("operator")
467
385
  };
468
386
  }
469
- /**
470
- * The explicit reasoning-effort set a harness's runtime accepts when it ISN'T a plain `none…ceiling`
471
- * slice — measured against the pinned CLI binaries, NOT inferred from the canonical ladder:
472
- * - codex: `model_reasoning_effort` accepts `none|minimal|low|medium|high|xhigh|max`, plus `ultra`
473
- * which the API's own enumeration omits but accepts end-to-end; canonical `ultracode` maps to
474
- * native `ultra`. Per-model catalog data narrows this list.
475
- * - claude-code: `--effort` accepts `low|medium|high|xhigh|max`; canonical `ultracode` maps to
476
- * native `max`. It cannot express `none` or `minimal`, and an unsupported value is warned about
477
- * and silently replaced with the default rather than rejected — so the set must not overstate.
478
- * - pi: `--thinking` accepts `off|minimal|low|medium|high|xhigh|max` (pi 1.4.0
479
- * `cli/args.js`); canonical `none` maps to `off` and `ultracode` to `max`.
480
- * - prime: the prime fork of the pi line accepts the same `--thinking` set
481
- * (`off|minimal|low|medium|high|xhigh|max`); canonical `none` maps to `off` and `ultracode` to
482
- * `max`.
483
- * - openclaw: `--thinking` accepts `off|minimal|low|medium|high|xhigh|max` (and `adaptive`, which
484
- * defers the choice rather than naming a rung); canonical `none` maps to `off` and `ultracode`
485
- * to `max`.
486
- * - kimi-code: `--thinking` is binary. Canonical `none` emits `--no-thinking`; any non-none level
487
- * emits `--thinking`, represented here by `high`.
488
- */
489
- const harnessReasoningEffortsOverride = {
490
- "claude-code": [
491
- "low",
492
- "medium",
493
- "high",
494
- "xhigh",
495
- "ultracode"
496
- ],
497
- "kimi-code": ["none", "high"]
498
- };
499
- /**
500
- * The ceiling for harnesses whose set IS a plain `none…ceiling` slice. Only the no-thinking runners
501
- * need an entry (`cli-base` has no agent; `nanoclaw` sends no thinking flag). Harnesses with a
502
- * provider-clamped or non-contiguous set live in {@link harnessReasoningEffortsOverride}; router /
503
- * model-driven harnesses (opencode, gemini, …) have no entry → default to the full ladder, narrowed
504
- * by the model's own capability.
505
- */
506
- const harnessReasoningCeiling = {
507
- "cli-base": "none",
508
- nanoclaw: "none"
509
- };
510
- /** The reasoning efforts a harness can express, independent of model — its explicit override set, or
511
- * `none` up to its ceiling (default `ultracode` for router/model-driven harnesses). */
512
- function harnessReasoningEfforts(harness) {
513
- const override = harnessReasoningEffortsOverride[harness];
514
- if (override) return override;
515
- const ceiling = harnessReasoningCeiling[harness] ?? "ultracode";
516
- return reasoningLadder.slice(0, reasoningLadder.indexOf(ceiling) + 1);
387
+ //#endregion
388
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.20/node_modules/@tangle-network/agent-interface/dist/profile-kb/models.js
389
+ const CHECKED = "2026-10-04";
390
+ const source = (url, locator) => ({
391
+ url,
392
+ locator,
393
+ checkedAt: CHECKED,
394
+ authority: "primary"
395
+ });
396
+ const claudeDocs = "https://platform.claude.com/docs/en";
397
+ const opusGuide = source(`${claudeDocs}/build-with-claude/prompt-engineering/prompting-claude-opus-5-5`, "Tools for complex visual inputs; unattended agentic runs; time signals for multiagent harnesses");
398
+ const fableGuide = source(`${claudeDocs}/build-with-claude/prompt-engineering/prompting-claude-fable-5-1`, "Finish the whole task; batch independent tool calls; keep the conversation history append-only");
399
+ const sonnetGuide = source(`${claudeDocs}/build-with-claude/prompt-engineering/prompting-claude-sonnet-5`, "Code review harnesses; tone and writing style");
400
+ const deepseekModel = source("https://api-docs.deepseek.com/quick_start/pricing/#model-details", "Model details; footnote 1");
401
+ const deepseekThinking = source("https://api-docs.deepseek.com/guides/thinking_mode/", "Thinking mode toggle and effort control; tool calls");
402
+ const glmModel = source("https://docs.z.ai/guides/llm/glm-5.3#feature-changes", "Feature changes");
403
+ const kimiModel = source("https://platform.kimi.ai/docs/guide/kimi-k3-quickstart", "Reasoning effort; vision input; important limits");
404
+ /** `opencode models opencode --verbose` on OpenCode 1.18.33: the keyless free routes, all priced at 0. */
405
+ function opencodeFreeClaim(route, limits) {
406
+ return claim(`OpenCode serves ${route} keyless (no provider key), at zero cost: ${limits}. A free route can change or leave the catalog without notice.`, {
407
+ url: "https://opencode.ai/inference/openai/v1",
408
+ checkedAt: "2026-11-02",
409
+ authority: "local",
410
+ locator: `opencode 1.18.33 models opencode --verbose; ${route}`
411
+ }, "local-observation");
517
412
  }
518
- /**
519
- * Harnesses whose runner DROPS a per-turn selector — grounded in the cli-bridge adapter audit, NOT a
520
- * guess. Most harnesses honor both selectors, so only the exceptions are listed; a harness absent from
521
- * a set honors that selector.
522
- *
523
- * - model dropped: `amp` (own agent picks the model), `openclaw` (dispatcher routes by its own
524
- * config), `nanoclaw` (socket-bridge runner is config/env-driven).
525
- * - effort dropped: `amp`, `factory-droids`, `hermes`, `nanoclaw`, and `acp` (no thinking flag is
526
- * plumbed to the underlying CLI — the runner reads no `reasoningEffort`).
527
- *
528
- * This is distinct from {@link reasoningEffortsFor} (which levels a harness can EXPRESS): a picker uses
529
- * these to trim or mark harnesses up front, so a user's model/effort choice is never silently ignored.
530
- */
531
- const harnessIgnoresModel = new Set([
532
- "amp",
533
- "openclaw",
534
- "nanoclaw"
535
- ]);
536
- const harnessIgnoresEffort = new Set([
537
- "amp",
538
- "factory-droids",
539
- "hermes",
540
- "nanoclaw",
541
- "acp"
542
- ]);
543
- /** Whether the harness's runner honors a per-turn MODEL override (vs. picking the model itself). */
544
- function harnessHonorsModel(harness) {
545
- return !harnessIgnoresModel.has(harness);
413
+ /** Historical acceptance records, not a current serving or quality check. */
414
+ function routerClaim(note) {
415
+ return claim(`The 2026-09-22 record reports ${note}; this audit recovered no attached trace and made no new router request.`, {
416
+ url: "https://router.tangle.tools/v1/chat/completions",
417
+ checkedAt: "2026-09-22",
418
+ authority: "local",
419
+ locator: "models.ts at d949682; historical routerCheck note"
420
+ }, "local-observation");
546
421
  }
547
- /** Whether the harness's runner honors a reasoning-EFFORT override (vs. dropping it). */
548
- function harnessHonorsEffort(harness) {
549
- return !harnessIgnoresEffort.has(harness);
550
- }
551
- /**
552
- * The system-prompt intents a harness's own controls can execute, measured by reading the request
553
- * each installed CLI sends — NOT taken from its help text:
554
- *
555
- * - claude-code 2.1.222 and pi 0.83.0 own both. `--system-prompt` drops the built-in prompt from
556
- * the request (27,673 B → the caller's bytes on claude-code, 2,582 B → the caller's on pi);
557
- * `--append-system-prompt` leaves it in place and adds the caller's text after it.
558
- * - codex 0.146.0 owns replacement only: the `model_instructions_file` config key becomes the
559
- * request's entire instructions text. It has no additive control — its AGENTS.md lands in a
560
- * developer/user message, not the system channel.
561
- * - gemini 0.26.0 owns replacement only: `.gemini/system.md` under `GEMINI_SYSTEM_MD=1` replaces
562
- * the base prompt. Its one additive path is GEMINI.md memory, which IS the `instructions`
563
- * surface, so an addition lowered there would be byte-indistinguishable from `instructions`.
564
- * - opencode 1.17.18 owns addition only THROUGH A WORKSPACE: config-declared `instructions[]`
565
- * files compose into the same single `role: "system"` message as its built-in prompt, which
566
- * stays in place. Its replacement control (`agent.<name>.prompt`) binds to one agent chosen at
567
- * launch, which a workspace plan cannot guarantee — but an executor that selects that agent
568
- * can, so `replace: false` here is the plan-forwarding answer, not opencode's ceiling.
569
- *
570
- * Every other harness owns NEITHER, including the ones whose prompt path is a `role: "system"` chat
571
- * message: that message is flattened into the user turn before the CLI sees it, so it is not a
572
- * system-prompt channel at all — honoring an intent through it would put the caller's text in
573
- * ordinary user content while the harness's own prompt ran unchanged. A harness with no entry
574
- * refuses both, so one added later cannot inherit a capability by omission.
575
- */
576
- const harnessSystemPromptControls = {
577
- "claude-code": {
578
- replace: true,
579
- append: true
580
- },
581
- pi: {
582
- replace: true,
583
- append: true
584
- },
585
- prime: {
586
- replace: true,
587
- append: true
588
- },
589
- codex: {
590
- replace: true,
591
- append: false
592
- },
593
- gemini: {
594
- replace: true,
595
- append: false
596
- },
597
- opencode: {
598
- replace: false,
599
- append: true
600
- }
601
- };
602
- const noSystemPromptControls = {
603
- replace: false,
604
- append: false
605
- };
606
- /**
607
- * Which system-prompt intents a harness honors THROUGH A WORKSPACE — the value an adapter that
608
- * lowers a profile to files, env vars, and CLI flags and then hands the result to a launcher it
609
- * does not own should declare as {@link AgentProfileCapabilities.systemPrompt}. That is the shape
610
- * of every caller today (the cli-bridge and tangle providers both forward a plan), which is why
611
- * this answer depends on the harness alone.
612
- *
613
- * It is NOT the whole truth for an adapter that starts the harness itself, because one control in
614
- * the table above lives outside any workspace: opencode's `agent.<name>.prompt` really does replace
615
- * its built-in prompt, but it binds to the single agent whoever starts the server selects. A plan
616
- * cannot name that agent, so `opencode` reads `replace: false` here — while an adapter that writes
617
- * opencode's server config AND picks the primary agent (`sdk-provider-opencode`) does honor
618
- * replacement, and declares `replace: true` for itself. The capability is a property of the
619
- * (harness, executor) pair; this function answers it for the plan-forwarding executor.
620
- *
621
- * Do not widen the table to close that gap: a harness-keyed `true` would promise the intent to
622
- * every plan-forwarding caller, and those callers cannot deliver it. An executor that owns a
623
- * launcher control states so where it binds it — `materializeProfile`'s `binds` option in
624
- * `@tangle-network/agent-profile-materialize`, which turns the plan's refusal into a binding that
625
- * executor must then apply.
626
- *
627
- * Pass `undefined` when the harness is not known at declaration time: the answer is then
628
- * `{ replace: false, append: false }`, because an adapter that cannot name its harness cannot
629
- * promise either intent, and `false` means "refuse" rather than "silently substitute the other".
630
- * An adapter that forwards a profile to some other layer must still declare what that layer's
631
- * harness really does — being able to put the field on the wire is not the same as honoring it.
632
- */
633
- function harnessSystemPromptIntents(harness) {
634
- if (!harness) return noSystemPromptControls;
635
- return harnessSystemPromptControls[harness] ?? noSystemPromptControls;
636
- }
637
- //#endregion
638
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/profile-kb/entry.js
639
- function claim(text, source, basis = "documented", audience = "operator") {
640
- return {
641
- text,
642
- basis,
643
- audience,
644
- sources: [source]
645
- };
646
- }
647
- /** Keep public string arrays and entry citations derived from the same claim records. */
648
- function kbEntry(entry) {
649
- const sources = /* @__PURE__ */ new Map();
650
- for (const claim of entry.claims) for (const source of claim.sources) sources.set(JSON.stringify(source), source);
651
- const textFor = (audience) => entry.claims.filter((claim) => claim.audience === audience && claim.basis !== "hypothesis").map((claim) => claim.text);
652
- return {
653
- ...entry,
654
- sources: [...sources.values()],
655
- prompt: textFor("agent"),
656
- operator: textFor("operator")
657
- };
658
- }
659
- //#endregion
660
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/profile-kb/harnesses.js
661
- const CHECKED$1 = "2026-10-04";
662
- const source$1 = (url, locator) => ({
663
- url,
664
- locator,
665
- checkedAt: CHECKED$1,
666
- authority: "primary"
667
- });
668
- const claudeCli = source$1("https://code.claude.com/docs/en/cli-reference", "CLI flags: --print, --bg, --bare, system prompt flags");
669
- const claudeAgents = source$1("https://code.claude.com/docs/en/sub-agents", "How subagents work; forked subagents");
670
- const codexConfig = source$1("https://learn.chatgpt.com/docs/config-file/config-reference", "model_instructions_file; model_reasoning_effort");
671
- const codexAgents = source$1("https://learn.chatgpt.com/docs/agent-configuration/subagents", "Availability; approvals and sandbox controls");
672
- const codexCommands = source$1("https://learn.chatgpt.com/docs/developer-commands", "Set or view a task goal with /goal");
673
- const piBase = "https://github.com/earendil-works/pi/blob/200387122ca450d6387f033949423114a270b96c/packages/coding-agent/";
674
- const piCli = source$1(`${piBase}docs/cli.md`, "Invocation and output; models; prompts and process");
675
- const piRpc = source$1(`${piBase}docs/rpc.md#run-lifecycle`, "Run lifecycle");
676
- const piCommands = source$1(`${piBase}docs/rpc-commands.md`, "steer; follow_up; get_available_thinking_levels");
677
- const opencodeCli = source$1("https://opencode.ai/docs/cli/", "run; serve; acp");
678
- const opencodePrompt = source$1("https://github.com/anomalyco/opencode/blob/907b3bc518fa48e90e8ec24dd327d13eee71c36c/packages/opencode/src/session/llm/request.ts#L51-L70", "LLMRequestPrep.prepare");
679
- const kimiCli = source$1("https://moonshotai.github.io/kimi-code/en/reference/kimi-command.html", "Flag conflict rules; non-interactive execution");
680
- const kimiConfig = source$1("https://moonshotai.github.io/kimi-code/en/configuration/config-files.html", "Config file location; thinking; complete example");
681
- /** Source-qualified launch knowledge; versions describe checked sources, not every host's installation. */
682
- const profileKbHarnesses = [
683
- kbEntry({
684
- id: "claude-code",
685
- name: "Claude Code",
686
- version: "2.1.289",
687
- claims: [
688
- claim("For a non-forked subagent, supply the context needed for its task; forked subagents inherit the parent conversation.", claudeAgents, "documented", "agent"),
689
- claim("Headless: claude -p <prompt> --model <id> --effort <level> --output-format stream-json --verbose. --bg is a separate background-session mode and cannot combine with -p.", claudeCli),
690
- claim("--append-system-prompt adds to the default; --system-prompt replaces it. On resume, prompt changes may wait for compaction.", claudeCli),
691
- claim("--bare skips automatic discovery; explicitly supplied context can still load. It is not an established speed improvement for this workload.", claudeCli),
692
- claim("--max-budget-usd caps the print invocation's spend, excluding restored prior spend; --json-schema constrains output structure, not correctness.", claudeCli)
693
- ]
694
- }),
695
- kbEntry({
696
- id: "codex",
697
- name: "Codex CLI",
698
- version: "0.160.0",
699
- claims: [
700
- claim("Observed on the Mac: codex exec <prompt> -m <model> -c model_reasoning_effort=<level> --json -o <file>; --output-schema, review, resume and fork are available.", {
701
- url: "cli:codex --version; codex exec --help",
702
- checkedAt: CHECKED$1,
703
- authority: "local",
704
- locator: "Codex 0.160.0, Mac; research/anthropic-openai.md#local-codex-catalog-evidence"
705
- }, "local-observation"),
706
- claim("model_instructions_file replaces model instructions. Reasoning support is model/client-specific; a requested effort does not establish the effective effort.", codexConfig),
707
- claim("Current local Codex spawns subagents after a direct request or applicable project/skill instruction. Enabled features do not establish tool exposure in another integration.", codexAgents),
708
- claim("/goal tracks an interactive objective; it does not establish recovery across host or process restarts.", codexCommands)
709
- ]
710
- }),
711
- kbEntry({
712
- id: "opencode",
713
- name: "OpenCode",
714
- version: "1.18.34",
715
- claims: [
716
- claim("Headless: opencode run <message> -m <provider/model> --agent <name> --variant <variant> --format json. Variants are provider-specific.", opencodeCli),
717
- claim("A configured agent.prompt replaces the provider prompt before system/user additions; plugins can transform it further. Do not assume the provider prompt is retained.", opencodePrompt),
718
- claim("serve exposes an HTTP API, run --attach reuses that server, and acp exposes an IDE protocol; these capabilities do not establish a particular parent adapter's support.", opencodeCli)
719
- ]
720
- }),
721
- kbEntry({
722
- id: "pi",
723
- name: "Pi",
724
- version: "1.0.2",
725
- claims: [
726
- claim("Headless: pi -p <prompt> --model <provider/id[:thinking]> --mode json. Model arguments can fuzzy-match; inspect the selected identity. --thinking clamps to model capability.", piCli),
727
- claim("--system-prompt replaces the default; --append-system-prompt adds to it. JSON mode exits after supplied prompts; RPC stays alive on stdin/stdout.", piCli),
728
- claim("In Pi 1.0.2 RPC, prompt acceptance and agent_end do not prove settlement: wait for agent_settled, except a handled prompt that began no run.", piRpc),
729
- claim("RPC steering arrives after current tool calls, before the next model call; follow-ups wait for tool calls and steering to drain. Query get_available_thinking_levels for the selected model.", piCommands)
730
- ]
731
- }),
732
- kbEntry({
733
- id: "kimi-code",
734
- name: "Kimi Code CLI",
735
- version: "2.1.1",
736
- claims: [
737
- claim("Headless: kimi -p <prompt> -m <configured-alias> --output-format stream-json. Print mode already uses auto policy with static deny rules; it rejects --auto, --yolo and --plan.", kimiCli),
738
- claim("--agent-file selects a new session's custom agent and cannot combine with resume/continue.", kimiCli),
739
- claim("kimi-code/k3 is a configured coding-provider alias, not Moonshot's public API ID kimi-k3. Configuration lives under KIMI_CODE_HOME or ~/.kimi-code.", kimiConfig),
740
- claim("[thinking].effort is model-dependent; unsupported settings fall back to the model default. The documented K3 configuration supports low, high and max.", kimiConfig)
741
- ]
742
- })
743
- ];
744
- //#endregion
745
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/profile-kb/models.js
746
- const CHECKED = "2026-10-04";
747
- const source = (url, locator) => ({
748
- url,
749
- locator,
750
- checkedAt: CHECKED,
751
- authority: "primary"
752
- });
753
- const claudeDocs = "https://platform.claude.com/docs/en";
754
- const opusGuide = source(`${claudeDocs}/build-with-claude/prompt-engineering/prompting-claude-opus-5-5`, "Tools for complex visual inputs; unattended agentic runs; time signals for multiagent harnesses");
755
- const fableGuide = source(`${claudeDocs}/build-with-claude/prompt-engineering/prompting-claude-fable-5-1`, "Finish the whole task; batch independent tool calls; keep the conversation history append-only");
756
- const sonnetGuide = source(`${claudeDocs}/build-with-claude/prompt-engineering/prompting-claude-sonnet-5`, "Code review harnesses; tone and writing style");
757
- const deepseekModel = source("https://api-docs.deepseek.com/quick_start/pricing/#model-details", "Model details; footnote 1");
758
- const deepseekThinking = source("https://api-docs.deepseek.com/guides/thinking_mode/", "Thinking mode toggle and effort control; tool calls");
759
- const glmModel = source("https://docs.z.ai/guides/llm/glm-5.3#feature-changes", "Feature changes");
760
- const kimiModel = source("https://platform.kimi.ai/docs/guide/kimi-k3-quickstart", "Reasoning effort; vision input; important limits");
761
- /** `opencode models opencode --verbose` on OpenCode 1.18.33: the keyless free routes, all priced at 0. */
762
- function opencodeFreeClaim(route, limits) {
763
- return claim(`OpenCode serves ${route} keyless (no provider key), at zero cost: ${limits}. A free route can change or leave the catalog without notice.`, {
764
- url: "https://opencode.ai/inference/openai/v1",
765
- checkedAt: "2026-11-02",
766
- authority: "local",
767
- locator: `opencode 1.18.33 models opencode --verbose; ${route}`
768
- }, "local-observation");
769
- }
770
- /** Historical acceptance records, not a current serving or quality check. */
771
- function routerClaim(note) {
772
- return claim(`The 2026-09-22 record reports ${note}; this audit recovered no attached trace and made no new router request.`, {
773
- url: "https://router.tangle.tools/v1/chat/completions",
774
- checkedAt: "2026-09-22",
775
- authority: "local",
776
- locator: "models.ts at d949682; historical routerCheck note"
777
- }, "local-observation");
778
- }
779
- /** Each row refers to the dated catalog in the retained source audit. */
780
- function codexCatalogClaim(id, defaultEffort, ultra) {
781
- return claim(`Codex cache observed at 2026-10-04T05:31:58Z (client 0.160.0): 272000 context, default ${defaultEffort}, efforts low through max${ultra ? " plus ultra" : ""}. This account/client catalog is not a serving receipt; a later cache written by 0.155.0 lacked GPT-6.1 Sol.`, {
782
- url: "file://~/.codex/models_cache.json",
783
- checkedAt: CHECKED,
784
- authority: "local",
785
- locator: `research/anthropic-openai.md#local-codex-catalog-evidence; slug ${id}`
786
- }, "local-observation");
422
+ /** Each row refers to the dated catalog in the retained source audit. */
423
+ function codexCatalogClaim(id, defaultEffort, ultra) {
424
+ return claim(`Codex cache observed at 2026-10-04T05:31:58Z (client 0.160.0): 272000 context, default ${defaultEffort}, efforts low through max${ultra ? " plus ultra" : ""}. This account/client catalog is not a serving receipt; a later cache written by 0.155.0 lacked GPT-6.1 Sol.`, {
425
+ url: "file://~/.codex/models_cache.json",
426
+ checkedAt: CHECKED,
427
+ authority: "local",
428
+ locator: `research/anthropic-openai.md#local-codex-catalog-evidence; slug ${id}`
429
+ }, "local-observation");
787
430
  }
788
431
  function historicalCodexClaim(id, catalogSource) {
789
432
  const note = catalogSource ? `codex-cli 0.156.1 served list; \`codex exec -m ${id}\` returned OK` : "codex-cli 0.156.1 on a ChatGPT account returned OK";
@@ -985,6 +628,14 @@ const profileKbModels = [
985
628
  "deepseek/deepseek-v4.1-flash",
986
629
  "opencode/deepseek-v4.1-flash-free"
987
630
  ],
631
+ nativeEfforts: {
632
+ minimal: "low",
633
+ low: "low",
634
+ medium: "high",
635
+ high: "high",
636
+ xhigh: "high",
637
+ ultracode: "max"
638
+ },
988
639
  claims: [
989
640
  claim("DeepSeek API ID deepseek-flash denotes V4.1-Flash: 1M context, 384K output, vision and tools; non-thinking mode is available. Router naming is a separate contract.", deepseekModel),
990
641
  claim("Thinking defaults on at high. Native efforts are low, high and max; minimal maps to low, medium/xhigh to high, and ultra to max. With tools, preserve all previous reasoning_content, including turns without tool calls.", deepseekThinking),
@@ -1029,32 +680,292 @@ const profileKbModels = [
1029
680
  ]
1030
681
  })
1031
682
  ];
1032
- //#endregion
1033
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/profile-kb/records.js
1034
- /**
1035
- * Lessons this platform measured itself. A lesson enters only after an
1036
- * agent-eval check reproduced it strongly; none has met that bar yet, so the
1037
- * list is empty rather than filled with single-run observations.
1038
- */
1039
- const profileKbLearnings = [];
1040
- deepFreeze(structuredClone(profileKbHarnesses));
1041
683
  const modelSnapshot = deepFreeze(structuredClone(profileKbModels));
1042
- deepFreeze(structuredClone(profileKbLearnings));
1043
684
  const modelIndex = (() => {
1044
685
  const index = /* @__PURE__ */ new Map();
1045
- modelSnapshot.forEach((model, position) => {
1046
- for (const name of [model.id, ...model.aliases]) {
1047
- const key = name.toLowerCase();
1048
- if (index.has(key)) throw new Error(`profile-kb: model name ${name} is declared twice`);
1049
- index.set(key, position);
1050
- }
1051
- });
686
+ for (const model of modelSnapshot) for (const name of [model.id, ...model.aliases]) {
687
+ const key = name.toLowerCase();
688
+ if (index.has(key)) throw new Error(`profile-kb: model name ${name} is declared twice`);
689
+ index.set(key, model);
690
+ }
1052
691
  return index;
1053
692
  })();
1054
- /** Whether the knowledge base lists this exact spelling: a model id or one of its aliases, such as `zai-coding-plan/glm-5.3`. */
693
+ /** Whether this exact spelling is a declared model id or alias. */
1055
694
  const profileKbNamesModel = (name) => modelIndex.has(name.trim().toLowerCase());
1056
695
  //#endregion
1057
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/sandbox-size.js
696
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.20/node_modules/@tangle-network/agent-interface/dist/harness-capabilities.js
697
+ /** Canonical harness/model, effort and prompt controls. Model-specific capability comes from the serving catalog. */
698
+ /** low → high. `none` = thinking off; `ultracode` = max (claude-code mode). */
699
+ const reasoningLadder = REASONING_EFFORTS;
700
+ /** Provider prefix of a canonical model id (`anthropic/claude-…` → `anthropic`), or null. */
701
+ function modelProvider(modelId) {
702
+ const slash = modelId.indexOf("/");
703
+ return slash > 0 ? modelId.slice(0, slash) : null;
704
+ }
705
+ /**
706
+ * Model families whose bare ids belong to one provider. The Router catalog serves most ids without a
707
+ * prefix (`claude-sonnet-5-5`, `gpt-5.5`, `glm-5.3`) and names the provider beside them, so a check
708
+ * that read every bare id as "any provider" offered `claude-code` with `glm-5.3`.
709
+ */
710
+ const bareModelFamilyProviders = [
711
+ [/^claude-/, "anthropic"],
712
+ [/^(gpt-|chatgpt-|codex-|o\d+(-|$))/, "openai"],
713
+ [/^(kimi-|moonshot-)/, "moonshot"],
714
+ [/^gemini-/, "google"],
715
+ [/^glm-/, "zai"],
716
+ [/^deepseek-/, "deepseek"],
717
+ [/^grok-/, "xai"]
718
+ ];
719
+ /**
720
+ * The provider a model id belongs to: its explicit prefix, else the provider of its bare-id family
721
+ * (`claude-sonnet-5-5` → `anthropic`). `null` for an id outside every family, such as the `default`
722
+ * sentinel, whose provider only the serving harness knows.
723
+ */
724
+ function resolveModelProvider(modelId) {
725
+ const explicit = modelProvider(modelId);
726
+ if (explicit) return explicit;
727
+ const id = modelId.trim().toLowerCase();
728
+ for (const [family, provider] of bareModelFamilyProviders) if (family.test(id)) return provider;
729
+ return null;
730
+ }
731
+ const SANDBOX_HARNESS_MATRIX_EVIDENCE = "https://github.com/tangle-network/agent-container/issues/9382";
732
+ /**
733
+ * Pairs a router-backed harness cannot run, measured on production with the Router credential: one
734
+ * prompt per pair, profile reasoning effort `medium` (2026-10-05). The same run passed pi with
735
+ * `openai/gpt-5.5` and `zai/glm-5.3`, and opencode with every model listed here. Pairs not listed
736
+ * were not measured to fail. An entry is removed when its harness adapter or the Router is fixed and
737
+ * the pair passes a new production measurement.
738
+ *
739
+ * pi's chat-completions client (pi-ai 0.85.1) marks a model as reasoning only when the profile asks
740
+ * for a reasoning effort, and only a reasoning model is sent the `developer` role and
741
+ * `reasoning_effort`; that is why the first two entries need a reasoning effort.
742
+ */
743
+ const harnessModelExclusions = [
744
+ {
745
+ harness: "pi",
746
+ models: /^anthropic\//,
747
+ onlyWithReasoningEffort: true,
748
+ reason: "the Router's chat-completions route for Anthropic models rejects the \"developer\" role pi sends to a reasoning model (400 Unexpected role \"developer\")",
749
+ measuredOn: "2026-10-05",
750
+ evidence: SANDBOX_HARNESS_MATRIX_EVIDENCE
751
+ },
752
+ {
753
+ harness: "pi",
754
+ models: /^openai\/gpt-5\.6-luna$/,
755
+ onlyWithReasoningEffort: true,
756
+ reason: "OpenAI does not accept function tools together with reasoning_effort for this model on /v1/chat/completions, the only route pi speaks",
757
+ measuredOn: "2026-10-05",
758
+ evidence: SANDBOX_HARNESS_MATRIX_EVIDENCE
759
+ },
760
+ {
761
+ harness: "pi",
762
+ models: /^google\/gemini-3\.8-flash$/,
763
+ onlyWithReasoningEffort: false,
764
+ reason: "the model requires each function call to return its thought_signature, which pi's chat-completions client does not send back (400 Function call is missing a thought_signature)",
765
+ measuredOn: "2026-10-05",
766
+ evidence: SANDBOX_HARNESS_MATRIX_EVIDENCE
767
+ }
768
+ ];
769
+ /**
770
+ * Whether a harness can run a model, and why not. A bare id resolves its provider through
771
+ * {@link resolveModelProvider}; an id whose provider cannot be resolved (a sentinel like `default`)
772
+ * is left to the harness, because its provider only the serving harness knows. Only the measured
773
+ * {@link harnessModelExclusions} are refused.
774
+ */
775
+ function harnessModelSupport(harness, modelId, options = {}) {
776
+ const trimmed = modelId.trim();
777
+ const provider = resolveModelProvider(trimmed);
778
+ const model = provider !== null && modelProvider(trimmed) === null ? `${provider}/${trimmed}` : trimmed;
779
+ if (provider === null) return {
780
+ supported: true,
781
+ model,
782
+ provider
783
+ };
784
+ const reasoning = options.reasoningEffort !== void 0 && options.reasoningEffort !== null && options.reasoningEffort !== "none";
785
+ const exclusion = harnessModelExclusions.find((entry) => entry.harness === harness && entry.models.test(model) && (!entry.onlyWithReasoningEffort || reasoning));
786
+ if (exclusion) return {
787
+ supported: false,
788
+ model,
789
+ provider,
790
+ exclusion,
791
+ message: `Harness ${harness} cannot run ${model}` + (exclusion.onlyWithReasoningEffort ? " with a reasoning effort" : "") + `: ${exclusion.reason} (measured ${exclusion.measuredOn}, ${exclusion.evidence}). ` + (exclusion.onlyWithReasoningEffort ? "Remove model.reasoningEffort, or choose another harness or model." : "Choose another harness or model.")
792
+ };
793
+ return {
794
+ supported: true,
795
+ model,
796
+ provider
797
+ };
798
+ }
799
+ /**
800
+ * The explicit reasoning-effort set a harness's runtime accepts when it ISN'T a plain `none…ceiling`
801
+ * slice — measured against the pinned CLI binaries, NOT inferred from the canonical ladder:
802
+ * - codex: `model_reasoning_effort` accepts `none|minimal|low|medium|high|xhigh|max`, plus `ultra`
803
+ * which the API's own enumeration omits but accepts end-to-end; canonical `ultracode` maps to
804
+ * native `ultra`. Per-model catalog data narrows this list.
805
+ * - claude-code: `--effort` accepts `low|medium|high|xhigh|max`; canonical `ultracode` maps to
806
+ * native `max`. It cannot express `none` or `minimal`, and an unsupported value is warned about
807
+ * and silently replaced with the default rather than rejected — so the set must not overstate.
808
+ * - pi: `--thinking` accepts `off|minimal|low|medium|high|xhigh|max` (pi 1.4.0
809
+ * `cli/args.js`); canonical `none` maps to `off` and `ultracode` to `max`.
810
+ * - prime: the prime fork of the pi line accepts the same `--thinking` set
811
+ * (`off|minimal|low|medium|high|xhigh|max`); canonical `none` maps to `off` and `ultracode` to
812
+ * `max`.
813
+ * - openclaw: `--thinking` accepts `off|minimal|low|medium|high|xhigh|max` (and `adaptive`, which
814
+ * defers the choice rather than naming a rung); canonical `none` maps to `off` and `ultracode`
815
+ * to `max`.
816
+ * - kimi-code: `--thinking` is binary. Canonical `none` emits `--no-thinking`; any non-none level
817
+ * emits `--thinking`, represented here by `high`.
818
+ */
819
+ const harnessReasoningEffortsOverride = {
820
+ "claude-code": [
821
+ "low",
822
+ "medium",
823
+ "high",
824
+ "xhigh",
825
+ "ultracode"
826
+ ],
827
+ "kimi-code": ["none", "high"]
828
+ };
829
+ /**
830
+ * The ceiling for harnesses whose set IS a plain `none…ceiling` slice. Only the no-thinking runners
831
+ * need an entry (`cli-base` has no agent; `nanoclaw` sends no thinking flag). Harnesses with a
832
+ * provider-clamped or non-contiguous set live in {@link harnessReasoningEffortsOverride}; router /
833
+ * model-driven harnesses (opencode, gemini, …) have no entry → default to the full ladder, narrowed
834
+ * by the model's own capability.
835
+ */
836
+ const harnessReasoningCeiling = {
837
+ "cli-base": "none",
838
+ nanoclaw: "none"
839
+ };
840
+ /** The reasoning efforts a harness can express, independent of model — its explicit override set, or
841
+ * `none` up to its ceiling (default `ultracode` for router/model-driven harnesses). */
842
+ function harnessReasoningEfforts(harness) {
843
+ const override = harnessReasoningEffortsOverride[harness];
844
+ if (override) return override;
845
+ const ceiling = harnessReasoningCeiling[harness] ?? "ultracode";
846
+ return reasoningLadder.slice(0, reasoningLadder.indexOf(ceiling) + 1);
847
+ }
848
+ /**
849
+ * Harnesses whose runner DROPS a per-turn selector — grounded in the cli-bridge adapter audit, NOT a
850
+ * guess. Most harnesses honor both selectors, so only the exceptions are listed; a harness absent from
851
+ * a set honors that selector.
852
+ *
853
+ * - model dropped: `amp` (own agent picks the model), `openclaw` (dispatcher routes by its own
854
+ * config), `nanoclaw` (socket-bridge runner is config/env-driven).
855
+ * - effort dropped: `amp`, `factory-droids`, `hermes`, `nanoclaw`, and `acp` (no thinking flag is
856
+ * plumbed to the underlying CLI — the runner reads no `reasoningEffort`).
857
+ *
858
+ * This is distinct from {@link reasoningEffortsFor} (which levels a harness can EXPRESS): a picker uses
859
+ * these to trim or mark harnesses up front, so a user's model/effort choice is never silently ignored.
860
+ */
861
+ const harnessIgnoresModel = new Set([
862
+ "amp",
863
+ "openclaw",
864
+ "nanoclaw"
865
+ ]);
866
+ const harnessIgnoresEffort = new Set([
867
+ "amp",
868
+ "factory-droids",
869
+ "hermes",
870
+ "nanoclaw",
871
+ "acp"
872
+ ]);
873
+ /** Whether the harness's runner honors a per-turn MODEL override (vs. picking the model itself). */
874
+ function harnessHonorsModel(harness) {
875
+ return !harnessIgnoresModel.has(harness);
876
+ }
877
+ /** Whether the harness's runner honors a reasoning-EFFORT override (vs. dropping it). */
878
+ function harnessHonorsEffort(harness) {
879
+ return !harnessIgnoresEffort.has(harness);
880
+ }
881
+ /**
882
+ * The system-prompt intents a harness's own controls can execute, measured by reading the request
883
+ * each installed CLI sends — NOT taken from its help text:
884
+ *
885
+ * - claude-code 2.1.222 and pi 0.83.0 own both. `--system-prompt` drops the built-in prompt from
886
+ * the request (27,673 B → the caller's bytes on claude-code, 2,582 B → the caller's on pi);
887
+ * `--append-system-prompt` leaves it in place and adds the caller's text after it.
888
+ * - codex 0.146.0 owns replacement only: the `model_instructions_file` config key becomes the
889
+ * request's entire instructions text. It has no additive control — its AGENTS.md lands in a
890
+ * developer/user message, not the system channel.
891
+ * - gemini 0.26.0 owns replacement only: `.gemini/system.md` under `GEMINI_SYSTEM_MD=1` replaces
892
+ * the base prompt. Its one additive path is GEMINI.md memory, which IS the `instructions`
893
+ * surface, so an addition lowered there would be byte-indistinguishable from `instructions`.
894
+ * - opencode 1.17.18 owns addition only THROUGH A WORKSPACE: config-declared `instructions[]`
895
+ * files compose into the same single `role: "system"` message as its built-in prompt, which
896
+ * stays in place. Its replacement control (`agent.<name>.prompt`) binds to one agent chosen at
897
+ * launch, which a workspace plan cannot guarantee — but an executor that selects that agent
898
+ * can, so `replace: false` here is the plan-forwarding answer, not opencode's ceiling.
899
+ *
900
+ * Every other harness owns NEITHER, including the ones whose prompt path is a `role: "system"` chat
901
+ * message: that message is flattened into the user turn before the CLI sees it, so it is not a
902
+ * system-prompt channel at all — honoring an intent through it would put the caller's text in
903
+ * ordinary user content while the harness's own prompt ran unchanged. A harness with no entry
904
+ * refuses both, so one added later cannot inherit a capability by omission.
905
+ */
906
+ const harnessSystemPromptControls = {
907
+ "claude-code": {
908
+ replace: true,
909
+ append: true
910
+ },
911
+ pi: {
912
+ replace: true,
913
+ append: true
914
+ },
915
+ prime: {
916
+ replace: true,
917
+ append: true
918
+ },
919
+ codex: {
920
+ replace: true,
921
+ append: false
922
+ },
923
+ gemini: {
924
+ replace: true,
925
+ append: false
926
+ },
927
+ opencode: {
928
+ replace: false,
929
+ append: true
930
+ }
931
+ };
932
+ const noSystemPromptControls = {
933
+ replace: false,
934
+ append: false
935
+ };
936
+ /**
937
+ * Which system-prompt intents a harness honors THROUGH A WORKSPACE — the value an adapter that
938
+ * lowers a profile to files, env vars, and CLI flags and then hands the result to a launcher it
939
+ * does not own should declare as {@link AgentProfileCapabilities.systemPrompt}. That is the shape
940
+ * of every caller today (the cli-bridge and tangle providers both forward a plan), which is why
941
+ * this answer depends on the harness alone.
942
+ *
943
+ * It is NOT the whole truth for an adapter that starts the harness itself, because one control in
944
+ * the table above lives outside any workspace: opencode's `agent.<name>.prompt` really does replace
945
+ * its built-in prompt, but it binds to the single agent whoever starts the server selects. A plan
946
+ * cannot name that agent, so `opencode` reads `replace: false` here — while an adapter that writes
947
+ * opencode's server config AND picks the primary agent (`sdk-provider-opencode`) does honor
948
+ * replacement, and declares `replace: true` for itself. The capability is a property of the
949
+ * (harness, executor) pair; this function answers it for the plan-forwarding executor.
950
+ *
951
+ * Do not widen the table to close that gap: a harness-keyed `true` would promise the intent to
952
+ * every plan-forwarding caller, and those callers cannot deliver it. An executor that owns a
953
+ * launcher control states so where it binds it — `materializeProfile`'s `binds` option in
954
+ * `@tangle-network/agent-profile-materialize`, which turns the plan's refusal into a binding that
955
+ * executor must then apply.
956
+ *
957
+ * Pass `undefined` when the harness is not known at declaration time: the answer is then
958
+ * `{ replace: false, append: false }`, because an adapter that cannot name its harness cannot
959
+ * promise either intent, and `false` means "refuse" rather than "silently substitute the other".
960
+ * An adapter that forwards a profile to some other layer must still declare what that layer's
961
+ * harness really does — being able to put the field on the wire is not the same as honoring it.
962
+ */
963
+ function harnessSystemPromptIntents(harness) {
964
+ if (!harness) return noSystemPromptControls;
965
+ return harnessSystemPromptControls[harness] ?? noSystemPromptControls;
966
+ }
967
+ //#endregion
968
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.20/node_modules/@tangle-network/agent-interface/dist/sandbox-size.js
1058
969
  /**
1059
970
  * Portable sandbox size vocabulary.
1060
971
  *
@@ -1077,7 +988,7 @@ const SANDBOX_SIZE_PRESET_NAMES = [
1077
988
  "large"
1078
989
  ];
1079
990
  //#endregion
1080
- //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.19/node_modules/@tangle-network/agent-interface/dist/profile-schema.js
991
+ //#region ../../../node_modules/.pnpm/@tangle-network+agent-interface@5.10.20/node_modules/@tangle-network/agent-interface/dist/profile-schema.js
1081
992
  const profileOpaqueValueSchema = z.unknown().transform((value, context) => {
1082
993
  if (value === void 0 || isBoundedJsonMaterial(value, {
1083
994
  dataPropertiesOnly: true,