@tangle-network/agent-app 0.63.57 → 0.63.59

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 (32) hide show
  1. package/dist/agent-profiles/d1.js +3 -3
  2. package/dist/agent-profiles/index.js +3 -3
  3. package/dist/assistant/index.js +7 -4
  4. package/dist/assistant/index.js.map +1 -1
  5. package/dist/chat-routes/index.js +4 -4
  6. package/dist/{chunk-RLMLHEEQ.js → chunk-5C3RXQQ7.js} +2 -2
  7. package/dist/{chunk-RDIHNSVZ.js → chunk-6XSQCP6W.js} +2 -2
  8. package/dist/{chunk-5I5ZB2EZ.js → chunk-DCGATWZ5.js} +5 -5
  9. package/dist/chunk-DCGATWZ5.js.map +1 -0
  10. package/dist/{chunk-H7CSSEP7.js → chunk-LAZCUQFZ.js} +14 -6
  11. package/dist/{chunk-H7CSSEP7.js.map → chunk-LAZCUQFZ.js.map} +1 -1
  12. package/dist/{chunk-YE7S5UAE.js → chunk-PIGW5LRM.js} +3 -3
  13. package/dist/{chunk-7TBF3DC2.js → chunk-SRA7VAVK.js} +2 -2
  14. package/dist/platform/delegated-keys.d.ts +5 -5
  15. package/dist/platform/index.js +10 -11
  16. package/dist/platform/index.js.map +1 -1
  17. package/dist/preset-cloudflare/index.js +2 -2
  18. package/dist/public-consultation/index.js +4 -4
  19. package/dist/sandbox/index.js +4 -4
  20. package/dist/theme/tokens.css +141 -36
  21. package/dist/tools/index.js +4 -4
  22. package/dist/web-react/chat-message-types.d.ts +12 -4
  23. package/dist/web-react/chat-tool-call.d.ts +4 -1
  24. package/dist/web-react/index.d.ts +1 -1
  25. package/dist/web-react/index.js +3 -1
  26. package/dist/work-product/index.js +2 -2
  27. package/package.json +15 -15
  28. package/dist/chunk-5I5ZB2EZ.js.map +0 -1
  29. /package/dist/{chunk-RLMLHEEQ.js.map → chunk-5C3RXQQ7.js.map} +0 -0
  30. /package/dist/{chunk-RDIHNSVZ.js.map → chunk-6XSQCP6W.js.map} +0 -0
  31. /package/dist/{chunk-YE7S5UAE.js.map → chunk-PIGW5LRM.js.map} +0 -0
  32. /package/dist/{chunk-7TBF3DC2.js.map → chunk-SRA7VAVK.js.map} +0 -0
@@ -4,12 +4,12 @@ import {
4
4
  } from "./chunk-OY7A6M7S.js";
5
5
  import {
6
6
  parseRenderUiSchema
7
- } from "./chunk-RDIHNSVZ.js";
7
+ } from "./chunk-6XSQCP6W.js";
8
8
  import {
9
9
  buildAppToolOpenAITools,
10
10
  findCustomTool,
11
11
  isAppToolName
12
- } from "./chunk-7TBF3DC2.js";
12
+ } from "./chunk-SRA7VAVK.js";
13
13
  import {
14
14
  ToolInputError
15
15
  } from "./chunk-F4XBNR5L.js";
@@ -212,4 +212,4 @@ export {
212
212
  createAppToolRuntimeExecutor,
213
213
  handleAppToolRequest
214
214
  };
215
- //# sourceMappingURL=chunk-YE7S5UAE.js.map
215
+ //# sourceMappingURL=chunk-PIGW5LRM.js.map
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  OPENUI_NODE_JSON_SCHEMA,
6
6
  OPENUI_NODE_TYPES
7
- } from "./chunk-5I5ZB2EZ.js";
7
+ } from "./chunk-DCGATWZ5.js";
8
8
 
9
9
  // src/tools/openai.ts
10
10
  var APP_TOOL_NAMES = ["submit_proposal", "schedule_followup", "render_ui", "add_citation"];
@@ -117,4 +117,4 @@ export {
117
117
  customToolToOpenAI,
118
118
  findCustomTool
119
119
  };
120
- //# sourceMappingURL=chunk-7TBF3DC2.js.map
120
+ //# sourceMappingURL=chunk-SRA7VAVK.js.map
@@ -130,11 +130,11 @@ export interface DelegatedKeyVerdict {
130
130
  expiresAt?: string;
131
131
  }
132
132
  /**
133
- * Identifies a key's slot for Platform's service-authenticated `revoke-slot`. Without `name` and `product`,
134
- * the client reads them from the key itself (`GET /v1/keys/:id`, which an SSO source may call), so a
135
- * provisioner restarted since the mint can still retire the key. Tax and Legal need `sourceKeyId`; GTM
136
- * and Builder admit `revoke-slot` only for their protected and preview keys, so their other keys keep
137
- * the refused DELETE as a typed error.
133
+ * Identifies a key's slot for Platform's service-authenticated `revoke-slot`. Without `name`, `product` or
134
+ * `sourceKeyId`, the client reads them from the key itself (`GET /v1/keys/:id`, which an SSO source may
135
+ * call; the child's parent is its source key), so a provisioner restarted since the mint can still retire
136
+ * the key. Health, Tax and Legal bind the slot to its source key; GTM and Builder admit `revoke-slot` only
137
+ * for their protected and preview keys, so their other keys keep the refused DELETE as a typed error.
138
138
  */
139
139
  export interface DelegatedKeySlotRef {
140
140
  userId: string;
@@ -1027,18 +1027,17 @@ function createPlatformDelegatedKeyClient(options) {
1027
1027
  return { succeeded: true, value: null };
1028
1028
  }
1029
1029
  if (result.status === 403 && slot) {
1030
- let name = slot.name;
1031
- let product = slot.product;
1032
- if (!name || !product) {
1030
+ let { name, product, sourceKeyId } = slot;
1031
+ if (!name || !product || !sourceKeyId) {
1033
1032
  const row = await call(`/v1/keys/${encodeURIComponent(keyId)}`, { method: "GET", bearer: sourceKey, service: false });
1034
- const data = record2(row?.body?.data);
1035
1033
  if (row?.status === 404) return { succeeded: true, value: null };
1036
- if (!row || row.status !== 200 || typeof data?.name !== "string" || typeof data.product !== "string") {
1037
- return { succeeded: false, error: refusal3(row?.status ?? 503, null) };
1038
- }
1039
- if (data.revokedAt) return { succeeded: true, value: null };
1040
- name = data.name;
1041
- product = data.product;
1034
+ const data = row?.status === 200 ? record2(row.body?.data) : null;
1035
+ if (data?.revokedAt) return { succeeded: true, value: null };
1036
+ const text2 = (value) => typeof value === "string" && value ? value : void 0;
1037
+ name ||= text2(data?.name);
1038
+ product ||= text2(data?.product);
1039
+ sourceKeyId ||= text2(data?.parentKeyId);
1040
+ if (!name || !product) return { succeeded: false, error: refusal3(row?.status ?? 503, null) };
1042
1041
  }
1043
1042
  const retired = await call("/v1/keys/auto-provisioned/revoke-slot", {
1044
1043
  method: "POST",
@@ -1049,7 +1048,7 @@ function createPlatformDelegatedKeyClient(options) {
1049
1048
  name,
1050
1049
  product,
1051
1050
  childKeyId: keyId,
1052
- ...slot.sourceKeyId ? { sourceKeyId: slot.sourceKeyId } : {}
1051
+ ...sourceKeyId ? { sourceKeyId } : {}
1053
1052
  }
1054
1053
  });
1055
1054
  if (!retired) return { succeeded: false, error: refusal3(503, null) };