@tangle-network/agent-app 1.0.25 → 1.0.26

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 (45) hide show
  1. package/dist/assistant/index.js +8 -8
  2. package/dist/catalog/index.js +1 -1
  3. package/dist/chat-react/index.js +5 -5
  4. package/dist/chat-routes/index.js +4 -4
  5. package/dist/{chunk-HWWER7G6.js → chunk-2ARZ4Y7D.js} +2 -2
  6. package/dist/{chunk-MM2GG3IX.js → chunk-4W6MDZQH.js} +3 -3
  7. package/dist/{chunk-SLXJZGXE.js → chunk-6CDNITEO.js} +3 -3
  8. package/dist/chunk-6CDNITEO.js.map +1 -0
  9. package/dist/{chunk-3VEXCVZB.js → chunk-6VRM2RVY.js} +3 -3
  10. package/dist/{chunk-IQZSV5YG.js → chunk-B2X2GGV5.js} +14 -12
  11. package/dist/{chunk-IQZSV5YG.js.map → chunk-B2X2GGV5.js.map} +1 -1
  12. package/dist/{chunk-VLMXVCDQ.js → chunk-KSLTD4FI.js} +8 -2
  13. package/dist/chunk-KSLTD4FI.js.map +1 -0
  14. package/dist/{chunk-GOPBMDCQ.js → chunk-NZMP7PFG.js} +4 -4
  15. package/dist/chunk-NZMP7PFG.js.map +1 -0
  16. package/dist/{chunk-K7HE6EM4.js → chunk-OVVVGEF6.js} +2 -2
  17. package/dist/{chunk-X7PYE5C5.js → chunk-RTJJYBVV.js} +2 -2
  18. package/dist/{chunk-G37LZ2FN.js → chunk-UN3PDU3M.js} +2 -2
  19. package/dist/{chunk-MK7VUZU7.js → chunk-Z5Y6OYAP.js} +4 -4
  20. package/dist/{mention-editor-HLEB37RK.js → mention-editor-XB4LGO3X.js} +3 -3
  21. package/dist/public-consultation/index.js +3 -3
  22. package/dist/runtime/index.js +5 -3
  23. package/dist/runtime/index.js.map +1 -1
  24. package/dist/runtime/model-catalog.d.ts +5 -0
  25. package/dist/runtime/router-turn.js +2 -2
  26. package/dist/settings-react/index.js +2 -2
  27. package/dist/studio-react/index.js +2 -2
  28. package/dist/web-react/agent-profile-editor.js +5 -5
  29. package/dist/web-react/agent-session-controls.d.ts +6 -4
  30. package/dist/web-react/effort-picker.d.ts +7 -6
  31. package/dist/web-react/index.js +8 -8
  32. package/dist/web-react/picker-presentation.d.ts +2 -2
  33. package/dist/workspace-react/index.js +4 -4
  34. package/package.json +1 -1
  35. package/dist/chunk-GOPBMDCQ.js.map +0 -1
  36. package/dist/chunk-SLXJZGXE.js.map +0 -1
  37. package/dist/chunk-VLMXVCDQ.js.map +0 -1
  38. /package/dist/{chunk-HWWER7G6.js.map → chunk-2ARZ4Y7D.js.map} +0 -0
  39. /package/dist/{chunk-MM2GG3IX.js.map → chunk-4W6MDZQH.js.map} +0 -0
  40. /package/dist/{chunk-3VEXCVZB.js.map → chunk-6VRM2RVY.js.map} +0 -0
  41. /package/dist/{chunk-K7HE6EM4.js.map → chunk-OVVVGEF6.js.map} +0 -0
  42. /package/dist/{chunk-X7PYE5C5.js.map → chunk-RTJJYBVV.js.map} +0 -0
  43. /package/dist/{chunk-G37LZ2FN.js.map → chunk-UN3PDU3M.js.map} +0 -0
  44. /package/dist/{chunk-MK7VUZU7.js.map → chunk-Z5Y6OYAP.js.map} +0 -0
  45. /package/dist/{mention-editor-HLEB37RK.js.map → mention-editor-XB4LGO3X.js.map} +0 -0
@@ -2,7 +2,7 @@ import {
2
2
  ProtectedModelSettlementError,
3
3
  createRouterProtectedModelPort,
4
4
  runProtectedRouterTurn
5
- } from "../chunk-X7PYE5C5.js";
5
+ } from "../chunk-RTJJYBVV.js";
6
6
  import {
7
7
  DURABLE_HOP_BUDGET_MS,
8
8
  asksForLanguage,
@@ -26,7 +26,7 @@ import {
26
26
  turnKnowledgeInstructions,
27
27
  workspaceKnowledgeForTurn,
28
28
  workspaceTurnCheckpoints
29
- } from "../chunk-HWWER7G6.js";
29
+ } from "../chunk-2ARZ4Y7D.js";
30
30
  import {
31
31
  DEFAULT_TANGLE_BILLING_ENFORCEMENT_ENV_VAR,
32
32
  DEFAULT_TANGLE_ROUTER_BASE_URL,
@@ -47,13 +47,14 @@ import {
47
47
  MAX_RECOMMENDED_MODELS,
48
48
  __resetCatalogCache,
49
49
  buildCatalog,
50
+ canonicalRouterModelId,
50
51
  catalogModelForId,
51
52
  fetchModelCatalog,
52
53
  isChatCapableModel,
53
54
  normalizeModelId,
54
55
  resolveCatalogModelId,
55
56
  sortModelsByFreshness
56
- } from "../chunk-VLMXVCDQ.js";
57
+ } from "../chunk-KSLTD4FI.js";
57
58
 
58
59
  // src/runtime/certified-delivery.ts
59
60
  import {
@@ -174,6 +175,7 @@ export {
174
175
  asksForLanguage,
175
176
  budgetTurnKnowledge,
176
177
  buildCatalog,
178
+ canonicalRouterModelId,
177
179
  catalogModelForId,
178
180
  composeRouterTurnPrompt,
179
181
  composeRouterTurnPromptSections,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/runtime/certified-delivery.ts","../../src/runtime/surface-profile.ts"],"sourcesContent":["/**\n * Application profile composition using Runtime's certified-guidance source.\n *\n * The shell adapts the prompt source to the application's resolved profile;\n * Runtime owns pulling, cache lifetime, concurrent refresh and retained guidance.\n * Only prompt-compatible guidance is folded here. Tool definitions, execution\n * permissions, MCP servers and files are not installed from certified material.\n * The complete profile remains available through `current()` for inspection and\n * the product's separately authorized materialization path.\n */\nimport {\n createCertifiedPromptSource,\n type CertifiedProfile,\n type CertifiedPromptSourceOptions,\n} from '@tangle-network/agent-runtime/intelligence'\nimport type { ResolvedAgentProfile } from './agent'\n\n/** Pull coordinates, refresh cadence and timeout owned by the shared source. */\nexport type CertifiedDeliveryConfig = CertifiedPromptSourceOptions\n\n/** Adapt certified prompt guidance without granting execution authority. */\nexport interface CertifiedDelivery {\n /** Refresh on the source's cadence and compose the current prompt guidance.\n * Other resolved profile fields pass through unchanged. */\n composeProfile(base: ResolvedAgentProfile): Promise<ResolvedAgentProfile>\n /** Force a pull now, coalescing with an in-flight pull. Best-effort; not a\n * post-activation revision barrier or a permission-revocation protocol. */\n refresh(): Promise<void>\n /** Last successfully pulled profile, or null before a successful pull. */\n current(): CertifiedProfile | null\n}\n\nexport function createCertifiedDelivery(config: CertifiedDeliveryConfig): CertifiedDelivery {\n const source = createCertifiedPromptSource(config)\n return {\n async composeProfile(base) {\n return { ...base, systemPrompt: await source.compose(base.systemPrompt) }\n },\n refresh: () => source.refresh({ force: true }),\n current: source.current,\n }\n}\n","/**\n * Surface-scoped profile overlay — the seam letting any product page (a\n * sequence editor, a brief composer, a dataset view) add MCP servers, a prompt\n * addendum, and permission tightening to the workspace agent profile for turns\n * initiated FROM that surface, without the chat orchestrator knowing any\n * surface's specifics. The orchestrator resolves `(kind, ctx)` through a\n * registry the REQUEST HANDLER constructs per request (construction is a Map\n * build — cheap) and merges the result into the base profile it was about to\n * send to the sandbox. Per-request construction is the trust mechanism, not an\n * optimization target: each `build()` closes over server-trusted request state\n * (env bindings, secrets, the AUTHENTICATED user/workspace), which on Workers\n * exists only per request — a startup-built registry would force identity\n * through the untrusted client `ctx`.\n *\n * SECURITY INVARIANT: the surface `kind` and the ids inside `ctx` arrive on\n * the client request and are pure ROUTING data — never trusted content, never\n * identity. Identity comes from the closure (see above). The registered\n * `build()` runs server-side only: it validates the routing ids against the\n * product's access control, then mints its own URLs from server configuration\n * (`buildHttpMcpServer` in ../tools). A client can therefore never inject an\n * arbitrary MCP url, header, or credential into the agent profile: the\n * overlay's `mcp` values are typed as {@link SurfaceMcpServer} (= the\n * server-built `AppToolMcpServer` entry shape), and only build() constructs\n * them.\n *\n * The credential itself never appears in the overlay. Since the tagged-config\n * contract (`agent-interface` 0.38.0) the `Authorization` header is a\n * `secret-ref` naming a box-environment variable, which the sandbox resolves\n * privately; `build()` supplies that key NAME from server configuration and the\n * product writes the value through `SandboxRuntimeConfig.env` at creation or\n * refreshes it through `SandboxRuntimeConfig.runtimeEnv` before retained-box\n * bootstrap. The value remains workspace-scoped because every member and turn\n * shares the box; runtime renewal does not create a per-user secret channel.\n */\n\nimport type { AppToolMcpServer } from '../tools/mcp'\n\n/** Sandbox permission posture values, ranked deny > ask > allow for merging. */\nexport type SurfacePermissionValue = 'allow' | 'ask' | 'deny'\n\n/** The only MCP entry shape an overlay may carry: the server-built bridge\n * entry from ../tools/mcp (transport, url, headers, and capability token all\n * assembled server-side). The alias exists so overlay authors reach for the\n * builders in ../tools rather than hand-rolling `{ url: ctx.url }` shapes\n * that would let request data become a dialable endpoint. */\nexport type SurfaceMcpServer = AppToolMcpServer\n\n/** What one surface contributes to the agent profile for a single turn. */\nexport interface SurfaceOverlay {\n /** MCP servers to mount for this turn, keyed by tool-routing name. Names\n * must not collide with the base profile's — see {@link mergeSurfaceOverlay}. */\n mcp?: Record<string, SurfaceMcpServer>\n /** Appended to the base system-prompt addendum with a blank-line separator. */\n promptAddendum?: string\n /** Per-key posture the surface wants for its turns. Merging is monotone\n * fail-closed: the stricter of base/overlay wins, so a surface can tighten\n * the workspace posture but never relax it. */\n permissions?: Record<string, SurfacePermissionValue>\n}\n\n/**\n * One registered surface kind. `TCtx` is the shape build() expects — a CLAIM\n * about the client payload, not a guarantee: the registry hands build() the\n * request's `ctx` unvalidated, so build() must treat every field as an\n * untrusted id (resolve it through access control that throws on a bad or\n * foreign id) before minting anything from it.\n */\nexport interface SurfaceKindDefinition<TCtx> {\n kind: string\n build: (ctx: TCtx) => SurfaceOverlay | Promise<SurfaceOverlay>\n}\n\n/** The variance-erased form a registry accepts (`build` is contravariant in\n * `TCtx`, so every concrete definition is assignable to this). */\nexport type AnySurfaceKind = SurfaceKindDefinition<never>\n\n/**\n * Declare one surface kind. The `kind` string is the client-visible routing\n * key (e.g. `'sequences'`); `build` is the server-side factory that turns a\n * validated ctx into the overlay for one turn.\n */\nexport function defineSurfaceKind<TCtx>(opts: {\n kind: string\n build: (ctx: TCtx) => SurfaceOverlay | Promise<SurfaceOverlay>\n}): SurfaceKindDefinition<TCtx> {\n if (typeof opts.kind !== 'string' || opts.kind.length === 0 || /\\s/.test(opts.kind)) {\n throw new Error(`surface kind must be a non-empty string without whitespace (got ${JSON.stringify(opts.kind)})`)\n }\n if (typeof opts.build !== 'function') {\n throw new Error(`surface kind '${opts.kind}' requires a build function`)\n }\n return { kind: opts.kind, build: opts.build }\n}\n\n/** Resolve and build the overlay for a given surface kind within a turn context */\nexport interface SurfaceRegistry {\n /** Build the overlay for one turn. Throws on an unknown kind — an unknown\n * surface is a routing bug (client and server registries drifted), and\n * silently returning an empty overlay would strip the surface's tools from\n * the turn with no signal anywhere. Build errors propagate unwrapped. */\n resolve(kind: string, ctx: unknown): Promise<SurfaceOverlay>\n}\n\n/**\n * Assemble the product's surface registry from its registered kinds. Duplicate\n * kinds throw at construction: two builders behind one routing key would make\n * the mounted toolset depend on registration order.\n */\nexport function createSurfaceRegistry(kinds: readonly AnySurfaceKind[]): SurfaceRegistry {\n const byKind = new Map<string, AnySurfaceKind>()\n for (const definition of kinds) {\n if (byKind.has(definition.kind)) {\n throw new Error(`duplicate surface kind '${definition.kind}' — each kind must be registered exactly once`)\n }\n byKind.set(definition.kind, definition)\n }\n\n return {\n async resolve(kind, ctx) {\n const definition = byKind.get(kind)\n if (!definition) {\n const known = [...byKind.keys()].join(', ') || '(none)'\n throw new Error(\n `unknown surface kind '${kind}' — registered kinds: ${known}. ` +\n 'An unknown surface is a routing bug: register the kind via defineSurfaceKind before clients can reference it.',\n )\n }\n // The trust boundary where static ctx typing ends: the request payload is\n // handed to build() as-is, and build() validates it (see SurfaceKindDefinition).\n const overlay = await definition.build(ctx as never)\n assertSurfaceOverlay(overlay, `surface kind '${kind}'`)\n return overlay\n },\n }\n}\n\n/** Base-profile slice the merge reads/writes. Real callers pass their full\n * profile object; every field outside this slice passes through untouched. */\nexport interface SurfaceMergeBase {\n mcp?: Record<string, unknown>\n systemPromptAddendum?: string\n permissions?: Record<string, SurfacePermissionValue>\n}\n\nconst PERMISSION_SEVERITY: Record<SurfacePermissionValue, number> = { allow: 0, ask: 1, deny: 2 }\n\n/**\n * Merge one surface overlay into a base profile, returning a new object\n * (the base is never mutated; untouched nested records are shared by\n * reference).\n *\n * - `mcp`: overlay servers are added under their own names. A name already\n * present on the base THROWS — a collision is two servers claiming one\n * routing name, and renaming either silently would corrupt tool routing for\n * whichever caller expected the original binding.\n * - `systemPromptAddendum`: the overlay's `promptAddendum` appends after a\n * blank-line separator (no separator when the base has no addendum).\n * - `permissions`: per key the STRICTER value wins (deny > ask > allow). A\n * surface can tighten the base posture for its turns; a base 'deny' survives\n * any overlay.\n */\nexport function mergeSurfaceOverlay<TBase extends SurfaceMergeBase>(\n base: TBase,\n overlay: SurfaceOverlay,\n): TBase & SurfaceMergeBase {\n assertSurfaceOverlay(overlay, 'surface overlay')\n const merged: SurfaceMergeBase = { ...base }\n\n if (overlay.mcp && Object.keys(overlay.mcp).length > 0) {\n const baseMcp = base.mcp ?? {}\n const collisions = Object.keys(overlay.mcp).filter((name) => name in baseMcp)\n if (collisions.length > 0) {\n throw new Error(\n `surface overlay MCP name collision: ${collisions.map((n) => `'${n}'`).join(', ')} already exist on the base profile. ` +\n 'Two servers cannot claim one name — give the surface server a distinct name.',\n )\n }\n merged.mcp = { ...baseMcp, ...overlay.mcp }\n }\n\n if (overlay.promptAddendum !== undefined) {\n merged.systemPromptAddendum = base.systemPromptAddendum\n ? `${base.systemPromptAddendum}\\n\\n${overlay.promptAddendum}`\n : overlay.promptAddendum\n }\n\n if (overlay.permissions && Object.keys(overlay.permissions).length > 0) {\n const permissions: Record<string, SurfacePermissionValue> = { ...(base.permissions ?? {}) }\n for (const [key, value] of Object.entries(overlay.permissions)) {\n const existing = permissions[key]\n permissions[key] =\n existing === undefined || PERMISSION_SEVERITY[value] > PERMISSION_SEVERITY[existing] ? value : existing\n }\n merged.permissions = permissions\n }\n\n // merged began as a shallow copy of base; only the three slice fields were\n // replaced, so the intersection type is the true shape.\n return merged as TBase & SurfaceMergeBase\n}\n\n/** Reject overlays a build() (or hand-rolled caller) malformed, with the exact\n * field named: a relative MCP url, a blank addendum, or an off-vocabulary\n * permission would otherwise surface only as an opaque sandbox failure. */\nfunction assertSurfaceOverlay(overlay: SurfaceOverlay, label: string): void {\n if (overlay.promptAddendum !== undefined) {\n if (typeof overlay.promptAddendum !== 'string' || overlay.promptAddendum.trim().length === 0) {\n throw new Error(`${label}: promptAddendum must be a non-blank string when provided`)\n }\n }\n if (overlay.mcp !== undefined) {\n for (const [name, server] of Object.entries(overlay.mcp)) {\n if (name.trim().length === 0) throw new Error(`${label}: MCP server names must be non-empty`)\n if (server.transport !== 'http') {\n throw new Error(`${label}: MCP server '${name}' must use transport 'http' (got ${JSON.stringify((server as { transport?: unknown }).transport)})`)\n }\n let parsed: URL\n try {\n parsed = new URL(server.url)\n } catch {\n throw new Error(`${label}: MCP server '${name}' url must be an absolute URL (got ${JSON.stringify(server.url)})`)\n }\n if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') {\n throw new Error(`${label}: MCP server '${name}' url must be http(s) (got ${JSON.stringify(server.url)})`)\n }\n }\n }\n if (overlay.permissions !== undefined) {\n for (const [key, value] of Object.entries(overlay.permissions)) {\n if (!(value in PERMISSION_SEVERITY)) {\n throw new Error(`${label}: permission '${key}' must be 'allow' | 'ask' | 'deny' (got ${JSON.stringify(value)})`)\n }\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA;AAAA,EACE;AAAA,OAGK;AAkBA,SAAS,wBAAwB,QAAoD;AAC1F,QAAM,SAAS,4BAA4B,MAAM;AACjD,SAAO;AAAA,IACL,MAAM,eAAe,MAAM;AACzB,aAAO,EAAE,GAAG,MAAM,cAAc,MAAM,OAAO,QAAQ,KAAK,YAAY,EAAE;AAAA,IAC1E;AAAA,IACA,SAAS,MAAM,OAAO,QAAQ,EAAE,OAAO,KAAK,CAAC;AAAA,IAC7C,SAAS,OAAO;AAAA,EAClB;AACF;;;ACwCO,SAAS,kBAAwB,MAGR;AAC9B,MAAI,OAAO,KA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B,cAAM,IAAI,MAAM,GAAG,KAAK,iBAAiB,IAAI,oCAAoC,KAAK,UAAW,OAAmC,SAAS,CAAC,GAAG;AAAA,MACnJ;AACA,UAAI;AACJ,UAAI;AACF,iBAAS,IAAI,IAAI,OAAO,GAAG;AAAA,MAC7B,QAAQ;AACN,cAAM,IAAI,MAAM,GAAG,KAAK,iBAAiB,IAAI,sCAAsC,KAAK,UAAU,OAAO,GAAG,CAAC,GAAG;AAAA,MAClH;AACA,UAAI,OAAO,aAAa,WAAW,OAAO,aAAa,UAAU;AAC/D,cAAM,IAAI,MAAM,GAAG,KAAK,iBAAiB,IAAI,8BAA8B,KAAK,UAAU,OAAO,GAAG,CAAC,GAAG;AAAA,MAC1G;AAAA,IACF;AAAA,EACF;AACA,MAAI,QAAQ,gBAAgB,QAAW;AACrC,eAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,QAAQ,WAAW,GAAG;AAC9D,UAAI,EAAE,SAAS,sBAAsB;AACnC,cAAM,IAAI,MAAM,GAAG,KAAK,iBAAiB,GAAG,2CAA2C,KAAK,UAAU,KAAK,CAAC,GAAG;AAAA,MACjH;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/runtime/certified-delivery.ts","../../src/runtime/surface-profile.ts"],"sourcesContent":["/**\n * Application profile composition using Runtime's certified-guidance source.\n *\n * The shell adapts the prompt source to the application's resolved profile;\n * Runtime owns pulling, cache lifetime, concurrent refresh and retained guidance.\n * Only prompt-compatible guidance is folded here. Tool definitions, execution\n * permissions, MCP servers and files are not installed from certified material.\n * The complete profile remains available through `current()` for inspection and\n * the product's separately authorized materialization path.\n */\nimport {\n createCertifiedPromptSource,\n type CertifiedProfile,\n type CertifiedPromptSourceOptions,\n} from '@tangle-network/agent-runtime/intelligence'\nimport type { ResolvedAgentProfile } from './agent'\n\n/** Pull coordinates, refresh cadence and timeout owned by the shared source. */\nexport type CertifiedDeliveryConfig = CertifiedPromptSourceOptions\n\n/** Adapt certified prompt guidance without granting execution authority. */\nexport interface CertifiedDelivery {\n /** Refresh on the source's cadence and compose the current prompt guidance.\n * Other resolved profile fields pass through unchanged. */\n composeProfile(base: ResolvedAgentProfile): Promise<ResolvedAgentProfile>\n /** Force a pull now, coalescing with an in-flight pull. Best-effort; not a\n * post-activation revision barrier or a permission-revocation protocol. */\n refresh(): Promise<void>\n /** Last successfully pulled profile, or null before a successful pull. */\n current(): CertifiedProfile | null\n}\n\nexport function createCertifiedDelivery(config: CertifiedDeliveryConfig): CertifiedDelivery {\n const source = createCertifiedPromptSource(config)\n return {\n async composeProfile(base) {\n return { ...base, systemPrompt: await source.compose(base.systemPrompt) }\n },\n refresh: () => source.refresh({ force: true }),\n current: source.current,\n }\n}\n","/**\n * Surface-scoped profile overlay — the seam letting any product page (a\n * sequence editor, a brief composer, a dataset view) add MCP servers, a prompt\n * addendum, and permission tightening to the workspace agent profile for turns\n * initiated FROM that surface, without the chat orchestrator knowing any\n * surface's specifics. The orchestrator resolves `(kind, ctx)` through a\n * registry the REQUEST HANDLER constructs per request (construction is a Map\n * build — cheap) and merges the result into the base profile it was about to\n * send to the sandbox. Per-request construction is the trust mechanism, not an\n * optimization target: each `build()` closes over server-trusted request state\n * (env bindings, secrets, the AUTHENTICATED user/workspace), which on Workers\n * exists only per request — a startup-built registry would force identity\n * through the untrusted client `ctx`.\n *\n * SECURITY INVARIANT: the surface `kind` and the ids inside `ctx` arrive on\n * the client request and are pure ROUTING data — never trusted content, never\n * identity. Identity comes from the closure (see above). The registered\n * `build()` runs server-side only: it validates the routing ids against the\n * product's access control, then mints its own URLs from server configuration\n * (`buildHttpMcpServer` in ../tools). A client can therefore never inject an\n * arbitrary MCP url, header, or credential into the agent profile: the\n * overlay's `mcp` values are typed as {@link SurfaceMcpServer} (= the\n * server-built `AppToolMcpServer` entry shape), and only build() constructs\n * them.\n *\n * The credential itself never appears in the overlay. Since the tagged-config\n * contract (`agent-interface` 0.38.0) the `Authorization` header is a\n * `secret-ref` naming a box-environment variable, which the sandbox resolves\n * privately; `build()` supplies that key NAME from server configuration and the\n * product writes the value through `SandboxRuntimeConfig.env` at creation or\n * refreshes it through `SandboxRuntimeConfig.runtimeEnv` before retained-box\n * bootstrap. The value remains workspace-scoped because every member and turn\n * shares the box; runtime renewal does not create a per-user secret channel.\n */\n\nimport type { AppToolMcpServer } from '../tools/mcp'\n\n/** Sandbox permission posture values, ranked deny > ask > allow for merging. */\nexport type SurfacePermissionValue = 'allow' | 'ask' | 'deny'\n\n/** The only MCP entry shape an overlay may carry: the server-built bridge\n * entry from ../tools/mcp (transport, url, headers, and capability token all\n * assembled server-side). The alias exists so overlay authors reach for the\n * builders in ../tools rather than hand-rolling `{ url: ctx.url }` shapes\n * that would let request data become a dialable endpoint. */\nexport type SurfaceMcpServer = AppToolMcpServer\n\n/** What one surface contributes to the agent profile for a single turn. */\nexport interface SurfaceOverlay {\n /** MCP servers to mount for this turn, keyed by tool-routing name. Names\n * must not collide with the base profile's — see {@link mergeSurfaceOverlay}. */\n mcp?: Record<string, SurfaceMcpServer>\n /** Appended to the base system-prompt addendum with a blank-line separator. */\n promptAddendum?: string\n /** Per-key posture the surface wants for its turns. Merging is monotone\n * fail-closed: the stricter of base/overlay wins, so a surface can tighten\n * the workspace posture but never relax it. */\n permissions?: Record<string, SurfacePermissionValue>\n}\n\n/**\n * One registered surface kind. `TCtx` is the shape build() expects — a CLAIM\n * about the client payload, not a guarantee: the registry hands build() the\n * request's `ctx` unvalidated, so build() must treat every field as an\n * untrusted id (resolve it through access control that throws on a bad or\n * foreign id) before minting anything from it.\n */\nexport interface SurfaceKindDefinition<TCtx> {\n kind: string\n build: (ctx: TCtx) => SurfaceOverlay | Promise<SurfaceOverlay>\n}\n\n/** The variance-erased form a registry accepts (`build` is contravariant in\n * `TCtx`, so every concrete definition is assignable to this). */\nexport type AnySurfaceKind = SurfaceKindDefinition<never>\n\n/**\n * Declare one surface kind. The `kind` string is the client-visible routing\n * key (e.g. `'sequences'`); `build` is the server-side factory that turns a\n * validated ctx into the overlay for one turn.\n */\nexport function defineSurfaceKind<TCtx>(opts: {\n kind: string\n build: (ctx: TCtx) => SurfaceOverlay | Promise<SurfaceOverlay>\n}): SurfaceKindDefinition<TCtx> {\n if (typeof opts.kind !== 'string' || opts.kind.length === 0 || /\\s/.test(opts.kind)) {\n throw new Error(`surface kind must be a non-empty string without whitespace (got ${JSON.stringify(opts.kind)})`)\n }\n if (typeof opts.build !== 'function') {\n throw new Error(`surface kind '${opts.kind}' requires a build function`)\n }\n return { kind: opts.kind, build: opts.build }\n}\n\n/** Resolve and build the overlay for a given surface kind within a turn context */\nexport interface SurfaceRegistry {\n /** Build the overlay for one turn. Throws on an unknown kind — an unknown\n * surface is a routing bug (client and server registries drifted), and\n * silently returning an empty overlay would strip the surface's tools from\n * the turn with no signal anywhere. Build errors propagate unwrapped. */\n resolve(kind: string, ctx: unknown): Promise<SurfaceOverlay>\n}\n\n/**\n * Assemble the product's surface registry from its registered kinds. Duplicate\n * kinds throw at construction: two builders behind one routing key would make\n * the mounted toolset depend on registration order.\n */\nexport function createSurfaceRegistry(kinds: readonly AnySurfaceKind[]): SurfaceRegistry {\n const byKind = new Map<string, AnySurfaceKind>()\n for (const definition of kinds) {\n if (byKind.has(definition.kind)) {\n throw new Error(`duplicate surface kind '${definition.kind}' — each kind must be registered exactly once`)\n }\n byKind.set(definition.kind, definition)\n }\n\n return {\n async resolve(kind, ctx) {\n const definition = byKind.get(kind)\n if (!definition) {\n const known = [...byKind.keys()].join(', ') || '(none)'\n throw new Error(\n `unknown surface kind '${kind}' — registered kinds: ${known}. ` +\n 'An unknown surface is a routing bug: register the kind via defineSurfaceKind before clients can reference it.',\n )\n }\n // The trust boundary where static ctx typing ends: the request payload is\n // handed to build() as-is, and build() validates it (see SurfaceKindDefinition).\n const overlay = await definition.build(ctx as never)\n assertSurfaceOverlay(overlay, `surface kind '${kind}'`)\n return overlay\n },\n }\n}\n\n/** Base-profile slice the merge reads/writes. Real callers pass their full\n * profile object; every field outside this slice passes through untouched. */\nexport interface SurfaceMergeBase {\n mcp?: Record<string, unknown>\n systemPromptAddendum?: string\n permissions?: Record<string, SurfacePermissionValue>\n}\n\nconst PERMISSION_SEVERITY: Record<SurfacePermissionValue, number> = { allow: 0, ask: 1, deny: 2 }\n\n/**\n * Merge one surface overlay into a base profile, returning a new object\n * (the base is never mutated; untouched nested records are shared by\n * reference).\n *\n * - `mcp`: overlay servers are added under their own names. A name already\n * present on the base THROWS — a collision is two servers claiming one\n * routing name, and renaming either silently would corrupt tool routing for\n * whichever caller expected the original binding.\n * - `systemPromptAddendum`: the overlay's `promptAddendum` appends after a\n * blank-line separator (no separator when the base has no addendum).\n * - `permissions`: per key the STRICTER value wins (deny > ask > allow). A\n * surface can tighten the base posture for its turns; a base 'deny' survives\n * any overlay.\n */\nexport function mergeSurfaceOverlay<TBase extends SurfaceMergeBase>(\n base: TBase,\n overlay: SurfaceOverlay,\n): TBase & SurfaceMergeBase {\n assertSurfaceOverlay(overlay, 'surface overlay')\n const merged: SurfaceMergeBase = { ...base }\n\n if (overlay.mcp && Object.keys(overlay.mcp).length > 0) {\n const baseMcp = base.mcp ?? {}\n const collisions = Object.keys(overlay.mcp).filter((name) => name in baseMcp)\n if (collisions.length > 0) {\n throw new Error(\n `surface overlay MCP name collision: ${collisions.map((n) => `'${n}'`).join(', ')} already exist on the base profile. ` +\n 'Two servers cannot claim one name — give the surface server a distinct name.',\n )\n }\n merged.mcp = { ...baseMcp, ...overlay.mcp }\n }\n\n if (overlay.promptAddendum !== undefined) {\n merged.systemPromptAddendum = base.systemPromptAddendum\n ? `${base.systemPromptAddendum}\\n\\n${overlay.promptAddendum}`\n : overlay.promptAddendum\n }\n\n if (overlay.permissions && Object.keys(overlay.permissions).length > 0) {\n const permissions: Record<string, SurfacePermissionValue> = { ...(base.permissions ?? {}) }\n for (const [key, value] of Object.entries(overlay.permissions)) {\n const existing = permissions[key]\n permissions[key] =\n existing === undefined || PERMISSION_SEVERITY[value] > PERMISSION_SEVERITY[existing] ? value : existing\n }\n merged.permissions = permissions\n }\n\n // merged began as a shallow copy of base; only the three slice fields were\n // replaced, so the intersection type is the true shape.\n return merged as TBase & SurfaceMergeBase\n}\n\n/** Reject overlays a build() (or hand-rolled caller) malformed, with the exact\n * field named: a relative MCP url, a blank addendum, or an off-vocabulary\n * permission would otherwise surface only as an opaque sandbox failure. */\nfunction assertSurfaceOverlay(overlay: SurfaceOverlay, label: string): void {\n if (overlay.promptAddendum !== undefined) {\n if (typeof overlay.promptAddendum !== 'string' || overlay.promptAddendum.trim().length === 0) {\n throw new Error(`${label}: promptAddendum must be a non-blank string when provided`)\n }\n }\n if (overlay.mcp !== undefined) {\n for (const [name, server] of Object.entries(overlay.mcp)) {\n if (name.trim().length === 0) throw new Error(`${label}: MCP server names must be non-empty`)\n if (server.transport !== 'http') {\n throw new Error(`${label}: MCP server '${name}' must use transport 'http' (got ${JSON.stringify((server as { transport?: unknown }).transport)})`)\n }\n let parsed: URL\n try {\n parsed = new URL(server.url)\n } catch {\n throw new Error(`${label}: MCP server '${name}' url must be an absolute URL (got ${JSON.stringify(server.url)})`)\n }\n if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') {\n throw new Error(`${label}: MCP server '${name}' url must be http(s) (got ${JSON.stringify(server.url)})`)\n }\n }\n }\n if (overlay.permissions !== undefined) {\n for (const [key, value] of Object.entries(overlay.permissions)) {\n if (!(value in PERMISSION_SEVERITY)) {\n throw new Error(`${label}: permission '${key}' must be 'allow' | 'ask' | 'deny' (got ${JSON.stringify(value)})`)\n }\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA;AAAA,EACE;AAAA,OAGK;AAkBA,SAAS,wBAAwB,QAAoD;AAC1F,QAAM,SAAS,4BAA4B,MAAM;AACjD,SAAO;AAAA,IACL,MAAM,eAAe,MAAM;AACzB,aAAO,EAAE,GAAG,MAAM,cAAc,MA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,QAAQ,QAAW;AAC7B,eAAW,CAAC,MAAM,MAAM,KAAK,OAAO,QAAQ,QAAQ,GAAG,GAAG;AACxD,UAAI,KAAK,KAAK,EAAE,WAAW,EAAG,OAAM,IAAI,MAAM,GAAG,KAAK,sCAAsC;AAC5F,UAAI,OAAO,cAAc,QAAQ;AAC/B,cAAM,IAAI,MAAM,GAAG,KAAK,iBAAiB,IAAI,oCAAoC,KAAK,UAAW,OAAmC,SAAS,CAAC,GAAG;AAAA,MACnJ;AACA,UAAI;AACJ,UAAI;AACF,iBAAS,IAAI,IAAI,OAAO,GAAG;AAAA,MAC7B,QAAQ;AACN,cAAM,IAAI,MAAM,GAAG,KAAK,iBAAiB,IAAI,sCAAsC,KAAK,UAAU,OAAO,GAAG,CAAC,GAAG;AAAA,MAClH;AACA,UAAI,OAAO,aAAa,WAAW,OAAO,aAAa,UAAU;AAC/D,cAAM,IAAI,MAAM,GAAG,KAAK,iBAAiB,IAAI,8BAA8B,KAAK,UAAU,OAAO,GAAG,CAAC,GAAG;AAAA,MAC1G;AAAA,IACF;AAAA,EACF;AACA,MAAI,QAAQ,gBAAgB,QAAW;AACrC,eAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,QAAQ,WAAW,GAAG;AAC9D,UAAI,EAAE,SAAS,sBAAsB;AACnC,cAAM,IAAI,MAAM,GAAG,KAAK,iBAAiB,GAAG,2CAA2C,KAAK,UAAU,KAAK,CAAC,GAAG;AAAA,MACjH;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
@@ -83,6 +83,11 @@ export interface ModelCatalog {
83
83
  fetchedAt: string;
84
84
  models: CatalogModel[];
85
85
  }
86
+ /** Canonical router-facing id: "provider/model". Pickers display, products
87
+ * persist, and turns send this form. The prefix is the RAW router provider
88
+ * ('moonshotai/kimi-k2'), never the normalized display alias, so the id is a
89
+ * live router entry that validation admits. */
90
+ export declare function canonicalRouterModelId(model: Pick<RouterModel, 'id' | '_provider' | 'provider' | 'routeability'>): string;
86
91
  /** A short, varied first screen. All other routeable entries remain searchable. */
87
92
  export declare const MAX_RECOMMENDED_MODELS = 8;
88
93
  /** Strip provider prefix, :free suffix, and trailing date stamps. */
@@ -13,10 +13,10 @@ import {
13
13
  turnKnowledgeInstructions,
14
14
  workspaceKnowledgeForTurn,
15
15
  workspaceTurnCheckpoints
16
- } from "../chunk-HWWER7G6.js";
16
+ } from "../chunk-2ARZ4Y7D.js";
17
17
  import "../chunk-LPW4UVAZ.js";
18
18
  import "../chunk-DCPOEDPK.js";
19
- import "../chunk-VLMXVCDQ.js";
19
+ import "../chunk-KSLTD4FI.js";
20
20
  export {
21
21
  DURABLE_HOP_BUDGET_MS,
22
22
  asksForLanguage,
@@ -20,7 +20,7 @@ import {
20
20
  fieldPickerTriggerClass,
21
21
  useBrowserLayoutEffect,
22
22
  usePopover
23
- } from "../chunk-SLXJZGXE.js";
23
+ } from "../chunk-6CDNITEO.js";
24
24
  import {
25
25
  bindSearchPickerNavigation
26
26
  } from "../chunk-ZAMHLXNS.js";
@@ -33,7 +33,7 @@ import {
33
33
  import {
34
34
  useWorkspaceExport
35
35
  } from "../chunk-EZFBGW23.js";
36
- import "../chunk-VLMXVCDQ.js";
36
+ import "../chunk-KSLTD4FI.js";
37
37
 
38
38
  // src/settings-react/settings-layout.tsx
39
39
  import { Button, PageHeader, PageShell } from "@tangle-network/ui/primitives";
@@ -26,14 +26,14 @@ import {
26
26
  POPOVER_SURFACE_ATTR,
27
27
  PopoverSurface,
28
28
  usePopover
29
- } from "../chunk-SLXJZGXE.js";
29
+ } from "../chunk-6CDNITEO.js";
30
30
  import {
31
31
  containDialogTab
32
32
  } from "../chunk-ZAMHLXNS.js";
33
33
  import {
34
34
  ProviderLogo
35
35
  } from "../chunk-RASGKEAL.js";
36
- import "../chunk-VLMXVCDQ.js";
36
+ import "../chunk-KSLTD4FI.js";
37
37
  import {
38
38
  GENERATION_TYPES,
39
39
  aspectRatioFromOptions,
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  AGENT_PROFILE_EDITOR_SECTIONS,
3
3
  AgentProfileEditor
4
- } from "../chunk-GOPBMDCQ.js";
5
- import "../chunk-IQZSV5YG.js";
6
- import "../chunk-G37LZ2FN.js";
7
- import "../chunk-SLXJZGXE.js";
4
+ } from "../chunk-NZMP7PFG.js";
5
+ import "../chunk-B2X2GGV5.js";
6
+ import "../chunk-UN3PDU3M.js";
7
+ import "../chunk-6CDNITEO.js";
8
8
  import "../chunk-ZAMHLXNS.js";
9
9
  import "../chunk-RASGKEAL.js";
10
10
  import "../chunk-B7CL7ENS.js";
11
- import "../chunk-VLMXVCDQ.js";
11
+ import "../chunk-KSLTD4FI.js";
12
12
  import "../chunk-PV33JZKV.js";
13
13
  import "../chunk-RCSAAWOH.js";
14
14
  export {
@@ -21,9 +21,9 @@
21
21
  * - `layout="inline"` (default): model, harness, and effort sit side by side as
22
22
  * pills. This is the original arrangement; existing call sites that mounted
23
23
  * `ModelPicker` + a harness picker + `EffortPicker` in a row get the same UI.
24
- * - `layout="compact"`: the model picker stays inline and visible; the agent
25
- * backend ("harness") and reasoning-effort controls — internal jargon a user
26
- * rarely needs — tuck behind a single gear popover with plain-English copy.
24
+ * - `layout="compact"`: the model picker stays inline and visible; the
25
+ * harness and reasoning-effort controls — settings a user rarely needs —
26
+ * tuck behind a single gear popover with plain-English copy.
27
27
  *
28
28
  * Two trigger treatments, also additive (`variant`, see `PickerVariant` in
29
29
  * `./controls`): `chip` (default) is the bordered pill every child draws
@@ -106,7 +106,9 @@ export interface AgentSessionControlsProps {
106
106
  /** Current harness; harness↔model coherence is enforced on every change. */
107
107
  harness: Harness;
108
108
  onHarnessChange(harness: Harness): void;
109
- /** Harnesses to offer; defaults to the labeled set. */
109
+ /** Harnesses to offer; defaults to the labeled set. Intersected with the
110
+ * harnesses the capability table allows for the selected model — the
111
+ * current harness always stays listed. */
110
112
  availableHarnesses?: ReadonlyArray<Harness>;
111
113
  /** Reasoning-effort value + setter. Shown only when the selected model
112
114
  * `supportsReasoning`, matching `EffortPicker`'s guidance. */
@@ -67,8 +67,8 @@ export interface EffortPickerProps {
67
67
  value: string;
68
68
  onChange: (id: string) => void;
69
69
  /** Selectable levels (engine id + user-facing label). Defaults to the plain
70
- * "Thinking" vocabulary; override to relabel without changing the ids the
71
- * runtime receives.
70
+ * reasoning-effort vocabulary; override to relabel without changing the ids
71
+ * the runtime receives.
72
72
  *
73
73
  * A list that omits the current `value` is not a rendering error the picker
74
74
  * papers over: `value` is reconciled INTO the rendered list under its own
@@ -76,7 +76,8 @@ export interface EffortPickerProps {
76
76
  * the depth the session is running at and never some other list entry. */
77
77
  levels?: readonly EffortLevel[];
78
78
  /** Prefix shown before the active level on the pill — the "what is this"
79
- * context the bare value lacked. Default "Thinking". Pass '' to hide it. */
79
+ * context the bare value lacked. Default "Reasoning effort". Pass '' to
80
+ * hide it. */
80
81
  label?: string;
81
82
  /** Fill the container instead of shrink-wrapping — opt-in, default `false`;
82
83
  * see {@link pickerRootClass} for when and why. */
@@ -89,9 +90,9 @@ export interface EffortPickerProps {
89
90
  id?: string;
90
91
  'aria-describedby'?: string;
91
92
  }
92
- /** Thinking-budget selector pill, styled to match {@link ModelPicker}. Show
93
- * it only when the selected model `supportsReasoning`. "Thinking" is the
94
- * plain-English name for what was internally called "effort".
93
+ /** Reasoning-effort selector pill, styled to match {@link ModelPicker}. Show
94
+ * it only when the selected model `supportsReasoning`. "Reasoning effort" is
95
+ * the plain-English name for what was internally called "effort".
95
96
  *
96
97
  * The CANONICAL ecosystem effort picker — sandbox-ui's reasoning menu (inside
97
98
  * its `chat/AgentSessionControls`) is legacy and frozen. */
@@ -152,7 +152,7 @@ import {
152
152
  withoutRecordGridCreated,
153
153
  withoutRecordGridRemoved,
154
154
  withoutRecordGridUpdate
155
- } from "../chunk-3VEXCVZB.js";
155
+ } from "../chunk-6VRM2RVY.js";
156
156
  import {
157
157
  useInfiniteScroll
158
158
  } from "../chunk-UHSUY6H6.js";
@@ -169,7 +169,7 @@ import {
169
169
  AGENT_PROFILE_EDITOR_SECTIONS,
170
170
  AgentProfileEditor,
171
171
  AgentProfileRegistryError
172
- } from "../chunk-GOPBMDCQ.js";
172
+ } from "../chunk-NZMP7PFG.js";
173
173
  import {
174
174
  EvidenceLineageTable,
175
175
  ExceptionList,
@@ -198,7 +198,7 @@ import {
198
198
  preloadWhenIdle,
199
199
  useComposerAttachments,
200
200
  useDictation
201
- } from "../chunk-MK7VUZU7.js";
201
+ } from "../chunk-Z5Y6OYAP.js";
202
202
  import "../chunk-L7MB2LLM.js";
203
203
  import {
204
204
  AgentSessionControls,
@@ -209,18 +209,18 @@ import {
209
209
  filterAcceptedFiles,
210
210
  isAcceptedFileType,
211
211
  renamePastedImages
212
- } from "../chunk-IQZSV5YG.js";
212
+ } from "../chunk-B2X2GGV5.js";
213
213
  import {
214
214
  WorkspaceInitial,
215
215
  WorkspaceSwitcher
216
- } from "../chunk-MM2GG3IX.js";
216
+ } from "../chunk-4W6MDZQH.js";
217
217
  import {
218
218
  WorkspacePrewarmContext,
219
219
  requestWorkspacePrewarm,
220
220
  useWorkspacePrewarm,
221
221
  useWorkspacePrewarmHandle
222
222
  } from "../chunk-2HQP2CTA.js";
223
- import "../chunk-G37LZ2FN.js";
223
+ import "../chunk-UN3PDU3M.js";
224
224
  import {
225
225
  DEFAULT_EFFORT_LEVELS,
226
226
  EFFORT_METER_SEGMENTS,
@@ -238,7 +238,7 @@ import {
238
238
  reconcileEffortLevels,
239
239
  usePending,
240
240
  usePopover
241
- } from "../chunk-SLXJZGXE.js";
241
+ } from "../chunk-6CDNITEO.js";
242
242
  import "../chunk-ZAMHLXNS.js";
243
243
  import "../chunk-SJWIZT7B.js";
244
244
  import {
@@ -318,7 +318,7 @@ import {
318
318
  mentionKindForPath,
319
319
  settleTurnResponse
320
320
  } from "../chunk-K2JPSXKI.js";
321
- import "../chunk-VLMXVCDQ.js";
321
+ import "../chunk-KSLTD4FI.js";
322
322
  import "../chunk-PV33JZKV.js";
323
323
  import "../chunk-RCSAAWOH.js";
324
324
  import "../chunk-4PIN6QYQ.js";
@@ -34,8 +34,8 @@ export declare const OVERLAY_SHADOW = "shadow-[var(--shadow-overlay)]";
34
34
  * panel wants the opposite — the compact `AgentSessionControls` gear popover
35
35
  * lays its controls out in a column, and a shrink-wrapped root there makes a
36
36
  * trigger's own `w-full` a no-op, since it fills a box the trigger itself
37
- * sized. That is what left Agent backend short of the panel edge and Thinking
38
- * narrower still.
37
+ * sized. That is what left the harness trigger short of the panel edge and
38
+ * the effort picker narrower still.
39
39
  *
40
40
  * The panel is portaled ({@link PopoverSurface}), so widening the root widens
41
41
  * the TRIGGER only. A menu that should follow it declares `matchTriggerWidth`.
@@ -3,20 +3,20 @@ import {
3
3
  ActionDialogButton,
4
4
  WorkspaceInitial,
5
5
  WorkspaceSwitcher
6
- } from "../chunk-MM2GG3IX.js";
6
+ } from "../chunk-4W6MDZQH.js";
7
7
  import {
8
8
  WorkspacePrewarmContext,
9
9
  useWorkspacePrewarm
10
10
  } from "../chunk-2HQP2CTA.js";
11
11
  import {
12
12
  usePopoverDialog
13
- } from "../chunk-G37LZ2FN.js";
13
+ } from "../chunk-UN3PDU3M.js";
14
14
  import {
15
15
  CheckGlyph,
16
16
  OVERLAY_SHADOW,
17
17
  PopoverSurface,
18
18
  usePopover
19
- } from "../chunk-SLXJZGXE.js";
19
+ } from "../chunk-6CDNITEO.js";
20
20
  import "../chunk-ZAMHLXNS.js";
21
21
  import {
22
22
  buildSessionNavItem,
@@ -24,7 +24,7 @@ import {
24
24
  resolveActiveNavId
25
25
  } from "../chunk-SJWIZT7B.js";
26
26
  import "../chunk-RASGKEAL.js";
27
- import "../chunk-VLMXVCDQ.js";
27
+ import "../chunk-KSLTD4FI.js";
28
28
 
29
29
  // src/workspace-react/index.tsx
30
30
  import { SidebarLayout } from "@tangle-network/sandbox-ui/dashboard";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-app",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "packageManager": "pnpm@11.28.8",
5
5
  "description": "Build agent applications with typed chat, tools, sandboxes, integrations, billing, and evaluation.",
6
6
  "keywords": [