@tangle-network/agent-app 1.0.26 → 2.0.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.
Files changed (47) hide show
  1. package/dist/assistant/index.js +4 -4
  2. package/dist/chat-react/index.js +3 -3
  3. package/dist/chat-routes/index.js +3 -3
  4. package/dist/{chunk-NZMP7PFG.js → chunk-7IVRHG3L.js} +3 -3
  5. package/dist/{chunk-XCUT52I3.js → chunk-GLZMHETS.js} +2 -2
  6. package/dist/chunk-GLZMHETS.js.map +1 -0
  7. package/dist/{chunk-Z5Y6OYAP.js → chunk-HFCPHY5D.js} +2 -2
  8. package/dist/{chunk-OZWHBH4T.js → chunk-HFWKZHTZ.js} +21 -5
  9. package/dist/chunk-HFWKZHTZ.js.map +1 -0
  10. package/dist/{chunk-OVVVGEF6.js → chunk-MS5S4IVF.js} +2 -2
  11. package/dist/{chunk-B2X2GGV5.js → chunk-PKBNDVGR.js} +2 -2
  12. package/dist/{chunk-RCSAAWOH.js → chunk-SUWAECFT.js} +2 -1
  13. package/dist/chunk-SUWAECFT.js.map +1 -0
  14. package/dist/harness/index.js +1 -1
  15. package/dist/hosted-agent/react/index.js +1 -1
  16. package/dist/hosted-agent/react/index.js.map +1 -1
  17. package/dist/public-consultation/index.js +3 -3
  18. package/dist/sandbox/index.js +2 -2
  19. package/dist/sandbox/prompt-profile.d.ts +1 -1
  20. package/dist/settings-react/index.js +146 -93
  21. package/dist/settings-react/index.js.map +1 -1
  22. package/dist/skills-placement/box.js +2 -2
  23. package/dist/skills-placement/index.js +2 -2
  24. package/dist/teams/index.d.ts +2 -2
  25. package/dist/teams-react/components/index.d.ts +0 -2
  26. package/dist/teams-react/components/invitation-detail.d.ts +1 -1
  27. package/dist/teams-react/components/member-access.d.ts +2 -2
  28. package/dist/teams-react/contracts.d.ts +3 -68
  29. package/dist/teams-react/index.d.ts +5 -6
  30. package/dist/teams-react/index.js +46 -335
  31. package/dist/teams-react/index.js.map +1 -1
  32. package/dist/web-react/agent-profile-editor.js +3 -3
  33. package/dist/web-react/index.js +4 -4
  34. package/package.json +3 -3
  35. package/dist/chunk-OZWHBH4T.js.map +0 -1
  36. package/dist/chunk-RCSAAWOH.js.map +0 -1
  37. package/dist/chunk-XCUT52I3.js.map +0 -1
  38. package/dist/chunk-YL5JDX7K.js +0 -70
  39. package/dist/chunk-YL5JDX7K.js.map +0 -1
  40. package/dist/stories/settings/team-panels-demo.d.ts +0 -21
  41. package/dist/teams-react/components/InvitationsPanel.d.ts +0 -13
  42. package/dist/teams-react/components/InviteForm.d.ts +0 -20
  43. package/dist/teams-react/components/MembersPanel.d.ts +0 -18
  44. /package/dist/{chunk-NZMP7PFG.js.map → chunk-7IVRHG3L.js.map} +0 -0
  45. /package/dist/{chunk-Z5Y6OYAP.js.map → chunk-HFCPHY5D.js.map} +0 -0
  46. /package/dist/{chunk-OVVVGEF6.js.map → chunk-MS5S4IVF.js.map} +0 -0
  47. /package/dist/{chunk-B2X2GGV5.js.map → chunk-PKBNDVGR.js.map} +0 -0
@@ -8,14 +8,14 @@ import "../chunk-3HUFJ5LO.js";
8
8
  import "../chunk-7PULOECS.js";
9
9
  import "../chunk-E4AY62T2.js";
10
10
  import "../chunk-ZOS3D26Z.js";
11
- import "../chunk-NZMP7PFG.js";
11
+ import "../chunk-7IVRHG3L.js";
12
12
  import "../chunk-Y6PRDUFJ.js";
13
13
  import "../chunk-GEYACSFW.js";
14
14
  import {
15
15
  ChatComposer
16
- } from "../chunk-Z5Y6OYAP.js";
16
+ } from "../chunk-HFCPHY5D.js";
17
17
  import "../chunk-L7MB2LLM.js";
18
- import "../chunk-B2X2GGV5.js";
18
+ import "../chunk-PKBNDVGR.js";
19
19
  import "../chunk-4W6MDZQH.js";
20
20
  import "../chunk-2HQP2CTA.js";
21
21
  import "../chunk-UN3PDU3M.js";
@@ -40,7 +40,7 @@ import "../chunk-TB6KNPFI.js";
40
40
  import "../chunk-K2JPSXKI.js";
41
41
  import "../chunk-KSLTD4FI.js";
42
42
  import "../chunk-PV33JZKV.js";
43
- import "../chunk-RCSAAWOH.js";
43
+ import "../chunk-SUWAECFT.js";
44
44
  import "../chunk-4PIN6QYQ.js";
45
45
  import "../chunk-TXD5HXLE.js";
46
46
 
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  ComposerModeControls,
3
3
  EntryComposer
4
- } from "../chunk-Z5Y6OYAP.js";
4
+ } from "../chunk-HFCPHY5D.js";
5
5
  import "../chunk-L7MB2LLM.js";
6
- import "../chunk-B2X2GGV5.js";
6
+ import "../chunk-PKBNDVGR.js";
7
7
  import "../chunk-2HQP2CTA.js";
8
8
  import "../chunk-UN3PDU3M.js";
9
9
  import "../chunk-6CDNITEO.js";
@@ -13,7 +13,7 @@ import "../chunk-RASGKEAL.js";
13
13
  import "../chunk-IAK227OO.js";
14
14
  import "../chunk-K2JPSXKI.js";
15
15
  import "../chunk-KSLTD4FI.js";
16
- import "../chunk-RCSAAWOH.js";
16
+ import "../chunk-SUWAECFT.js";
17
17
  import "../chunk-TXD5HXLE.js";
18
18
  export {
19
19
  ComposerModeControls,
@@ -82,13 +82,13 @@ import {
82
82
  turnCarriesFiles,
83
83
  turnPromptText,
84
84
  withProducerStream
85
- } from "../chunk-OVVVGEF6.js";
85
+ } from "../chunk-MS5S4IVF.js";
86
86
  import "../chunk-SBHFMDR7.js";
87
87
  import "../chunk-H6BRJU5M.js";
88
88
  import "../chunk-4DBHC63F.js";
89
89
  import "../chunk-RN4WPTBH.js";
90
90
  import "../chunk-MM6RLOXF.js";
91
- import "../chunk-OZWHBH4T.js";
91
+ import "../chunk-HFWKZHTZ.js";
92
92
  import "../chunk-F4TUZYMX.js";
93
93
  import {
94
94
  redactErrorMessage
@@ -182,7 +182,7 @@ import {
182
182
  sniffMimeFromName
183
183
  } from "../chunk-5VE4IDSU.js";
184
184
  import "../chunk-67CSI5PU.js";
185
- import "../chunk-RCSAAWOH.js";
185
+ import "../chunk-SUWAECFT.js";
186
186
  import {
187
187
  readSandboxBinaryBytes,
188
188
  statSandboxFileSize
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HarnessPicker,
3
3
  filterAcceptedFiles
4
- } from "./chunk-B2X2GGV5.js";
4
+ } from "./chunk-PKBNDVGR.js";
5
5
  import {
6
6
  EffortPicker,
7
7
  ModelPicker,
@@ -19,7 +19,7 @@ import {
19
19
  import {
20
20
  isModelCompatibleWithHarness,
21
21
  snapModelToHarness
22
- } from "./chunk-RCSAAWOH.js";
22
+ } from "./chunk-SUWAECFT.js";
23
23
 
24
24
  // src/web-react/agent-profile-editor.tsx
25
25
  import { useEffect as useEffect4, useId as useId5, useMemo as useMemo3, useState as useState7 } from "react";
@@ -2382,4 +2382,4 @@ export {
2382
2382
  AGENT_PROFILE_EDITOR_SECTIONS,
2383
2383
  AgentProfileEditor
2384
2384
  };
2385
- //# sourceMappingURL=chunk-NZMP7PFG.js.map
2385
+ //# sourceMappingURL=chunk-7IVRHG3L.js.map
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-76MPX7JQ.js";
5
5
  import {
6
6
  KNOWN_HARNESSES
7
- } from "./chunk-RCSAAWOH.js";
7
+ } from "./chunk-SUWAECFT.js";
8
8
 
9
9
  // src/skills-placement/index.ts
10
10
  import { defineInlineResource } from "@tangle-network/agent-interface/profile";
@@ -101,4 +101,4 @@ export {
101
101
  skillSupportFileMounts,
102
102
  withSkillSupportFiles
103
103
  };
104
- //# sourceMappingURL=chunk-XCUT52I3.js.map
104
+ //# sourceMappingURL=chunk-GLZMHETS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/skills-placement/index.ts"],"sourcesContent":["/**\n * Harness-native skill directory resolution — the one place agent-app binds\n * to the platform's authoritative per-harness skill-dir map.\n *\n * `../skills` renders skill CONTENT (parse, tier-filter, `inline`/`mounted`\n * delivery) but deliberately stops short of naming WHICH cwd path a `mounted`\n * skill lands at on a given harness — that mapping is owned by the platform\n * materializer (`@tangle-network/agent-profile-materialize`'s\n * `skillDirForHarness`), not by app-shell. This subpath exists so no product\n * — and no other agent-app module — ever writes a skill path literal\n * (`~/.claude/skills/...`, `.opencode/skills`, ...) of its own; it bridges\n * agent-app's `Harness` taxonomy onto the platform's `HarnessId` and asks the\n * platform for the answer.\n *\n * Requires the OPTIONAL peer `@tangle-network/agent-profile-materialize`.\n * Products that don't install it simply don't import this subpath — every\n * other agent-app skills surface (`../skills`, `ProfileChannels.skillRefs`)\n * works without it, falling back to `inline` delivery.\n */\n\nimport type { AgentProfile, AgentProfileFileMount } from '@tangle-network/agent-interface'\nimport { defineInlineResource } from '@tangle-network/agent-interface/profile'\nimport { KNOWN_HARNESSES, type Harness } from '../harness/index'\nimport { skillDirForHarness, type HarnessId } from '@tangle-network/agent-profile-materialize'\nimport { composeSkills, renderInlineSkills, type ComposedSkills, type SkillEntry } from '../skills/index'\n\n/** agent-app `Harness` -> platform `HarnessId`, identity-mapped for exactly\n * the harnesses the platform map covers. Harnesses absent here (`amp`,\n * `factory-droids`, `forge`, `grok`, `acp`, `cursor`, `cli-base`) resolve to `null` —\n * {@link composeSkillsForHarness} refuses by default rather than silently\n * delivering `inline`; a caller that genuinely needs `inline` on one of\n * these opts in explicitly (`onNoSkillDir: 'inline'`). `cursor`'s adapter\n * supports `resources.skills` bespokely but isn't in the platform map yet;\n * treating it as unbridged is the safe posture until the map covers it,\n * rather than guessing its cwd skill dir here. */\nconst HARNESS_BRIDGE: Partial<Record<Harness, HarnessId>> = {\n opencode: 'opencode',\n 'claude-code': 'claude-code',\n nanoclaw: 'nanoclaw',\n 'kimi-code': 'kimi-code',\n codex: 'codex',\n pi: 'pi',\n prime: 'prime',\n hermes: 'hermes',\n openclaw: 'openclaw',\n}\n\n/** Resolve the cwd-relative skill dir `resources.skills` refs materialize\n * into on `harness` — via the platform's `skillDirForHarness`. `null` when\n * `harness` isn't bridged (see {@link HARNESS_BRIDGE}) or when the platform\n * itself has no cwd skill primitive for it (e.g. `hermes`, user-dir-only). */\nexport function resolveSkillDir(harness: Harness): string | null {\n const bridged = HARNESS_BRIDGE[harness]\n if (!bridged) return null\n return skillDirForHarness(bridged)\n}\n\n/** Filter `harnesses` down to those with no mounted skill dir (deduped,\n * first-seen order preserved) — the set that must fall back to `inline`\n * delivery, or that a caller should warn about before offering \"mounted\"\n * install UX. */\nexport function unsupportedSkillHarnesses(harnesses: Iterable<Harness>): Harness[] {\n const seen = new Set<Harness>()\n const out: Harness[] = []\n for (const harness of harnesses) {\n if (resolveSkillDir(harness) !== null) continue\n if (seen.has(harness)) continue\n seen.add(harness)\n out.push(harness)\n }\n return out\n}\n\n/** Inputs to {@link composeSkillsForHarness}. */\nexport interface ComposeSkillsForHarnessInput {\n skills: SkillEntry[]\n harness: Harness\n tier?: string\n heading?: string\n /**\n * What to do when `harness` has no native skill-mount directory (see\n * {@link resolveSkillDir}). Default `'throw'`: refuse rather than silently\n * inlining every skill BODY into the system prompt. Pass `'inline'` only as\n * a deliberate, auditable opt-in — the caller has decided every skill must\n * reach this harness even though it will be concatenated into the prompt.\n */\n onNoSkillDir?: 'throw' | 'inline'\n}\n\n/** `KNOWN_HARNESSES` filtered to those the platform materializer can mount\n * skill files onto natively (a non-null {@link resolveSkillDir}). Computed\n * fresh rather than cached — the platform map can grow without a release\n * here. Used only to build the actionable error in\n * {@link composeSkillsForHarness}; not exported because it duplicates\n * {@link unsupportedSkillHarnesses}'s complement and callers should reach\n * for that instead when they need the harness list at runtime. */\nfunction nativeSkillMountHarnesses(): Harness[] {\n return KNOWN_HARNESSES.filter((harness) => resolveSkillDir(harness) !== null)\n}\n\n/**\n * Compose {@link ComposedSkills} for `harness`.\n *\n * `mounted` delivery is the standard path: whenever the platform names a cwd\n * skill dir for `harness`, skills ride the typed `resources.skills` channel\n * and the platform materializer writes each one to that directory as a real\n * file — the agent reads it on demand with its own file tools.\n *\n * `inline` delivery — every skill BODY rendered straight into the system\n * prompt — is a NARROW fallback for harnesses with no native skill dir, never\n * a co-equal mode. An `AgentProfile` is a RECIPE that materializes into a\n * sandbox, not a prompt template: skill bodies belong in a file mount, and\n * `prompt.systemPrompt` should carry only what the agent must obey without a\n * tool call (identity, tool-call contract, safety rules, output format) plus\n * a short index of what's mounted. Concatenating skill bodies into the prompt\n * degrades the model toward empty answers once it grows large enough — one\n * product reproduced a 151,882-byte prompt exactly this way, from an\n * unnoticed inline fallback.\n *\n * Because of that, `onNoSkillDir` defaults to `'throw'`: a harness with no\n * skill dir refuses instead of silently inlining. The thrown error names the\n * harness, the skill count, the byte size that would have been inlined, and\n * the harnesses that DO support native mounting. Pass `onNoSkillDir:\n * 'inline'` only as a deliberate, auditable opt-in when every skill genuinely\n * must reach this harness regardless of prompt cost.\n *\n * The one function a product calls instead of hand-checking `resolveSkillDir`\n * and branching between {@link composeSkills}'s two modes itself.\n */\nexport function composeSkillsForHarness(input: ComposeSkillsForHarnessInput): ComposedSkills {\n const { skills, harness, tier, heading, onNoSkillDir = 'throw' } = input\n const skillDir = resolveSkillDir(harness)\n if (skillDir) return composeSkills({ skills, mode: 'mounted', skillDir, tier, heading })\n if (onNoSkillDir === 'inline') return composeSkills({ skills, mode: 'inline', tier, heading })\n\n const relevant = tier ? skills.filter((s) => s.tier === tier) : skills\n const promptSection = renderInlineSkills({ skills, tier, heading })\n const bytes = new TextEncoder().encode(promptSection).byteLength\n const mountable = nativeSkillMountHarnesses()\n throw new Error(\n `composeSkillsForHarness: \"${harness}\" has no native skill-mount directory. ` +\n `Inlining ${relevant.length} skill(s) (${bytes} bytes) into its system prompt would silently ` +\n `convert mounted skills into prompt text — a 151,882-byte prompt shipped this way once, and ` +\n `oversized prompts degrade toward empty answers. Mount the skills instead: pick a harness with ` +\n `native skill support (${mountable.join(', ')}), or pass onNoSkillDir: 'inline' to opt in ` +\n `explicitly and accept the inlined bytes.`,\n )\n}\n\nexport type { ComposedSkills, SkillEntry } from '../skills/index'\n\n/** A file that rides BESIDE a skill entry (kit sources, references, pinned\n * requirements — anything the SKILL.md tells the agent to read or run).\n * `path` is skill-dir-relative (`kit/iso-kit.mjs`, `references/x.md`). */\nexport interface SkillSupportFile {\n path: string\n content: string\n}\n\n/** Optional naming and reconciliation policies for skill support files. */\nexport interface SkillSupportFileOptions {\n /** Resource name for newly created mounts. Defaults to `<skillId>/<path>`. */\n resourceName?: (file: SkillSupportFile) => string\n /**\n * `retain` (default) keeps identical mounts at their desired paths.\n * `replace` removes owned mounts and appends canonical mounts in file order.\n * Foreign mounts always keep their paths. On a supported harness, if they\n * occupy every desired path, `replace` leaves the original profile unchanged.\n */\n reconcileExisting?: 'retain' | 'replace'\n}\n\n/** Inline file mounts placing a skill's support files beside its entry on\n * `harness`: `<skillDir>/<skillId>/<path>`. Empty when the harness has no\n * cwd skill dir — the same posture as `resources.skills` itself (the\n * platform skips skills there too), so nothing orphan lands in a workspace\n * a harness will never read.\n *\n * This is the placement primitive for kit-carrying skills (vendored\n * executable kits, reference trees). A growing program belongs in THESE\n * mounts — never in an env var: runtimeSecrets values are capped (8192\n * chars on the sandbox SDK) and a skill tree outgrew that cap in production\n * once, taking every isolated turn down with a secret-provider refusal. */\nexport function skillSupportFileMounts(\n harness: Harness,\n skillId: string,\n files: readonly SkillSupportFile[],\n options: Pick<SkillSupportFileOptions, 'resourceName'> = {},\n): AgentProfileFileMount[] {\n const skillDir = resolveSkillDir(harness)\n if (!skillDir || files.length === 0) return []\n return files.map((file) => ({\n path: `${skillDir}/${skillId}/${file.path}`,\n resource: defineInlineResource(\n options.resourceName ? options.resourceName(file) : `${skillId}/${file.path}`,\n file.content,\n ),\n }))\n}\n\n/** Attach a skill's support files to `profile` for `harness`, idempotently.\n *\n * Replacement is by EXACT CONTENT under the skill's own subtree (any path\n * ending `/<skillId>/<path>` whose bytes match a support file of THIS call):\n * re-deriving the same profile for another harness replaces this skill's\n * own mounts wherever they previously pointed, while pack-declared files\n * with similar paths stay untouched. With no skill dir the skill's own\n * mounts are dropped (and nothing added) — mirroring how the platform\n * treats the skill entry itself on that harness. `options` can customize\n * new resource names and opt into replacing owned mounts in file order. */\nexport function withSkillSupportFiles<\n P extends { resources?: AgentProfile['resources'] },\n>(\n profile: P,\n harness: Harness,\n skillId: string,\n files: readonly SkillSupportFile[],\n options: SkillSupportFileOptions = {},\n): P {\n const hasSkillDir = resolveSkillDir(harness) !== null\n const desired = skillSupportFileMounts(harness, skillId, files, options)\n const desiredByPath = new Map(\n desired.map((mount) => [mount.path, mount.resource] as const),\n )\n const byRelPath = new Map(files.map((file) => [file.path, file.content] as const))\n const suffix = `/${skillId}/`\n const relUnderSkill = (path: string): string | null => {\n const at = path.lastIndexOf(suffix)\n return at < 0 ? null : path.slice(at + suffix.length)\n }\n // \"Ours\" = a mount under THIS skill's subtree whose bytes match a support\n // file of this call. It is STALE when the harness has no skill dir (there\n // is nowhere to place it — mirroring how the platform skips the skill\n // entry itself) or when this call would place it at a different path\n // (re-derivation for another harness). Exact-content identity only: a\n // foreign mount at one of our paths keeps the location (pack-declared\n // files win at their declared paths). By default an identical mount is\n // kept as-is; the replace policy regenerates owned mounts in file order.\n const shouldDropMount = (mount: AgentProfileFileMount): boolean => {\n if (mount.resource.kind !== 'inline') return false\n const rel = relUnderSkill(mount.path)\n if (rel === null || byRelPath.get(rel) !== mount.resource.content) return false\n if (options.reconcileExisting === 'replace') return true\n const desiredHere = desiredByPath.get(mount.path)\n return (\n !hasSkillDir ||\n desiredHere === undefined ||\n desiredHere.kind !== 'inline' ||\n desiredHere.content !== mount.resource.content\n )\n }\n const existing = profile.resources?.files ?? []\n const retained = existing.filter((mount) => !shouldDropMount(mount))\n const taken = new Set(retained.map((mount) => mount.path))\n const additions = desired.filter((mount) => !taken.has(mount.path))\n // Preserve the replace policy's no-op when foreign mounts occupy every\n // destination; without a skill dir, owned mounts are still removed.\n if (additions.length === 0 && (\n retained.length === existing.length ||\n (hasSkillDir && options.reconcileExisting === 'replace')\n )) return profile\n return {\n ...profile,\n resources: { ...(profile.resources ?? {}), files: [...retained, ...additions] },\n }\n}\n"],"mappings":";;;;;;;;;AAqBA,SAA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QAAO;AACpD,UAAM,cAAc,cAAc,IAAI,MAAM,IAAI;AAChD,WACE,CAAC,eACD,gBAAgB,UAChB,YAAY,SAAS,YACrB,YAAY,YAAY,MAAM,SAAS;AAAA,EAE3C;AACA,QAAM,WAAW,QAAQ,WAAW,SAAS,CAAC;AAC9C,QAAM,WAAW,SAAS,OAAO,CAAC,UAAU,CAAC,gBAAgB,KAAK,CAAC;AACnE,QAAM,QAAQ,IAAI,IAAI,SAAS,IAAI,CAAC,UAAU,MAAM,IAAI,CAAC;AACzD,QAAM,YAAY,QAAQ,OAAO,CAAC,UAAU,CAAC,MAAM,IAAI,MAAM,IAAI,CAAC;AAGlE,MAAI,UAAU,WAAW,MACvB,SAAS,WAAW,SAAS,UAC5B,eAAe,QAAQ,sBAAsB,WAC7C,QAAO;AACV,SAAO;AAAA,IACL,GAAG;AAAA,IACH,WAAW,EAAE,GAAI,QAAQ,aAAa,CAAC,GAAI,OAAO,CAAC,GAAG,UAAU,GAAG,SAAS,EAAE;AAAA,EAChF;AACF;","names":[]}
@@ -7,7 +7,7 @@ import {
7
7
  filterAcceptedFiles,
8
8
  isAcceptedFileType,
9
9
  renamePastedImages
10
- } from "./chunk-B2X2GGV5.js";
10
+ } from "./chunk-PKBNDVGR.js";
11
11
  import {
12
12
  useWorkspacePrewarmHandle
13
13
  } from "./chunk-2HQP2CTA.js";
@@ -1853,4 +1853,4 @@ export {
1853
1853
  ComposerModeControls,
1854
1854
  EntryComposer
1855
1855
  };
1856
- //# sourceMappingURL=chunk-Z5Y6OYAP.js.map
1856
+ //# sourceMappingURL=chunk-HFCPHY5D.js.map
@@ -55,7 +55,7 @@ import {
55
55
  DEFAULT_HARNESS,
56
56
  assertHarnessModelCompatible,
57
57
  isHarness
58
- } from "./chunk-RCSAAWOH.js";
58
+ } from "./chunk-SUWAECFT.js";
59
59
  import {
60
60
  isWorkspaceFileExportable
61
61
  } from "./chunk-TXD5HXLE.js";
@@ -554,6 +554,7 @@ function createSandboxPrewarmer(shell, options) {
554
554
  }
555
555
 
556
556
  // src/sandbox/prompt-profile.ts
557
+ import { parseBackendType } from "@tangle-network/sandbox";
557
558
  import { mergeAgentProfiles } from "@tangle-network/agent-interface/profile";
558
559
 
559
560
  // src/sandbox/payload-limits.ts
@@ -767,7 +768,10 @@ async function resolveSandboxPromptBackend(shell, options, operation = "sandbox
767
768
  options.onProfileResolved(await fingerprintAgentProfile(profile, { model: model?.model, harness }));
768
769
  }
769
770
  return {
770
- type: harness,
771
+ // BackendConfig admits dispatchable backend ids only; parseBackendType
772
+ // fails fast (and type-narrows) for historical-only harness identities
773
+ // such as `forge` instead of letting the platform reject them remotely.
774
+ type: parseBackendType(harness),
771
775
  profile,
772
776
  ...model ? backendModelFields(model) : {},
773
777
  ...options.runtimeAttachments ? { runtimeAttachments: options.runtimeAttachments } : {},
@@ -3380,6 +3384,9 @@ async function peekWorkspaceSandbox(shell, options) {
3380
3384
  return { status: "running", box: match };
3381
3385
  }
3382
3386
 
3387
+ // src/sandbox/workspace-provision.ts
3388
+ import { parseBackendType as parseBackendType2 } from "@tangle-network/sandbox";
3389
+
3383
3390
  // src/sandbox/existing-box.ts
3384
3391
  import { createHash as createHash2 } from "crypto";
3385
3392
  async function resolveWorkspaceRuntimeEnv(shell, scope) {
@@ -3495,7 +3502,14 @@ function normalizedEgressPolicy(policy) {
3495
3502
  const normalized = { ...policy };
3496
3503
  if (policy.mode === "strict") {
3497
3504
  normalized.allowDomains = [...new Set(
3498
- (policy.allowDomains ?? []).map((domain) => domain.trim().toLowerCase()).filter(Boolean)
3505
+ (policy.allowDomains ?? []).map((entry) => {
3506
+ if (typeof entry === "string") {
3507
+ const domain2 = entry.trim().toLowerCase();
3508
+ return domain2 ? JSON.stringify({ domain: domain2, allowPrivateIps: [] }) : null;
3509
+ }
3510
+ const domain = entry.domain.trim().toLowerCase();
3511
+ return domain ? JSON.stringify({ domain, allowPrivateIps: [...new Set(entry.allowPrivateIps)].sort() }) : null;
3512
+ }).filter((entry) => entry !== null)
3499
3513
  )].sort();
3500
3514
  normalized.includeImplicitDomains = policy.includeImplicitDomains !== false;
3501
3515
  } else {
@@ -3983,7 +3997,9 @@ async function prepareWorkspacePayload(shell, workspaceId, userId, scope, harnes
3983
3997
  ...userId ? { permissions: { initialUsers: [{ userId, role }] } } : {},
3984
3998
  env,
3985
3999
  secrets,
3986
- backend: { type: harness, profile, ...model ? backendModelFields(model) : {} },
4000
+ // Fail fast for historical-only harness identities (`forge`) here too,
4001
+ // matching resolveSandboxPromptBackend's dispatch seam.
4002
+ backend: { type: parseBackendType2(harness), profile, ...model ? backendModelFields(model) : {} },
3987
4003
  ...storage ? { storage } : {},
3988
4004
  ...restore ? restore : {},
3989
4005
  ...shell.egressPolicy ? { egressPolicy: shell.egressPolicy } : {},
@@ -4310,4 +4326,4 @@ export {
4310
4326
  deleteSecret,
4311
4327
  mintSandboxScopedToken
4312
4328
  };
4313
- //# sourceMappingURL=chunk-OZWHBH4T.js.map
4329
+ //# sourceMappingURL=chunk-HFWKZHTZ.js.map