@agent-native/core 0.101.2 → 0.101.3

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 (55) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/core/CHANGELOG.md +18 -0
  3. package/corpus/core/package.json +1 -1
  4. package/corpus/core/src/credentials/index.ts +41 -8
  5. package/corpus/core/src/extensions/fetch-tool.ts +33 -3
  6. package/corpus/core/src/notifications/channels.ts +20 -6
  7. package/corpus/core/src/secrets/crypto.ts +26 -10
  8. package/corpus/core/src/secrets/storage.ts +16 -3
  9. package/corpus/core/src/server/agent-chat-plugin.ts +60 -7
  10. package/corpus/core/src/server/derived-secret.ts +5 -1
  11. package/corpus/templates/analytics/changelog/2026-07-14-long-running-cross-app-analyses-now-continue-reliably-in-the.md +6 -0
  12. package/corpus/templates/analytics/server/plugins/agent-chat.ts +8 -4
  13. package/corpus/templates/clips/app/components/player/share-dialog.tsx +44 -81
  14. package/corpus/templates/clips/app/i18n/ar-SA.ts +0 -8
  15. package/corpus/templates/clips/app/i18n/de-DE.ts +0 -9
  16. package/corpus/templates/clips/app/i18n/en-US.ts +0 -8
  17. package/corpus/templates/clips/app/i18n/es-ES.ts +0 -9
  18. package/corpus/templates/clips/app/i18n/fr-FR.ts +0 -9
  19. package/corpus/templates/clips/app/i18n/hi-IN.ts +0 -8
  20. package/corpus/templates/clips/app/i18n/ja-JP.ts +0 -9
  21. package/corpus/templates/clips/app/i18n/ko-KR.ts +0 -9
  22. package/corpus/templates/clips/app/i18n/pt-BR.ts +0 -9
  23. package/corpus/templates/clips/app/i18n/zh-CN.ts +0 -7
  24. package/corpus/templates/clips/app/i18n/zh-TW.ts +0 -7
  25. package/corpus/templates/clips/changelog/2026-07-14-share-dialogs-show-separate-links-for-people-and-agents.md +6 -0
  26. package/corpus/templates/dispatch/changelog/2026-07-14-dispatch-now-distinguishes-connected-agents-from-locally-mou.md +6 -0
  27. package/dist/credentials/index.d.ts +12 -7
  28. package/dist/credentials/index.d.ts.map +1 -1
  29. package/dist/credentials/index.js +33 -8
  30. package/dist/credentials/index.js.map +1 -1
  31. package/dist/extensions/fetch-tool.d.ts +13 -1
  32. package/dist/extensions/fetch-tool.d.ts.map +1 -1
  33. package/dist/extensions/fetch-tool.js +9 -2
  34. package/dist/extensions/fetch-tool.js.map +1 -1
  35. package/dist/notifications/channels.js +20 -4
  36. package/dist/notifications/channels.js.map +1 -1
  37. package/dist/notifications/routes.d.ts +3 -3
  38. package/dist/observability/routes.d.ts +1 -1
  39. package/dist/resources/handlers.d.ts +1 -1
  40. package/dist/secrets/crypto.d.ts +15 -7
  41. package/dist/secrets/crypto.d.ts.map +1 -1
  42. package/dist/secrets/crypto.js +23 -10
  43. package/dist/secrets/crypto.js.map +1 -1
  44. package/dist/secrets/storage.d.ts.map +1 -1
  45. package/dist/secrets/storage.js +16 -3
  46. package/dist/secrets/storage.js.map +1 -1
  47. package/dist/server/agent-chat-plugin.d.ts +20 -0
  48. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  49. package/dist/server/agent-chat-plugin.js +38 -4
  50. package/dist/server/agent-chat-plugin.js.map +1 -1
  51. package/dist/server/derived-secret.d.ts +1 -1
  52. package/dist/server/derived-secret.d.ts.map +1 -1
  53. package/dist/server/derived-secret.js.map +1 -1
  54. package/package.json +2 -2
  55. package/corpus/templates/clips/app/components/sharing/slack-share-hint.tsx +0 -68
@@ -1,3 +1,3 @@
1
1
  export declare function deriveServerSecret(rootSecret: string, purpose: string): string;
2
- export declare function getWorkspaceA2ADerivedSecret(purpose: "better-auth" | "oauth-state" | "short-lived-token"): string | undefined;
2
+ export declare function getWorkspaceA2ADerivedSecret(purpose: "better-auth" | "oauth-state" | "short-lived-token" | "secrets-encryption"): string | undefined;
3
3
  //# sourceMappingURL=derived-secret.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"derived-secret.d.ts","sourceRoot":"","sources":["../../src/server/derived-secret.ts"],"names":[],"mappings":"AAWA,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,GACd,MAAM,CAKR;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,aAAa,GAAG,aAAa,GAAG,mBAAmB,GAC3D,MAAM,GAAG,SAAS,CAIpB"}
1
+ {"version":3,"file":"derived-secret.d.ts","sourceRoot":"","sources":["../../src/server/derived-secret.ts"],"names":[],"mappings":"AAWA,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,GACd,MAAM,CAKR;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EACH,aAAa,GACb,aAAa,GACb,mBAAmB,GACnB,oBAAoB,GACvB,MAAM,GAAG,SAAS,CAIpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"derived-secret.js","sourceRoot":"","sources":["../../src/server/derived-secret.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,MAAM,qBAAqB,GAAG,gCAAgC,CAAC;AAE/D,SAAS,kBAAkB;IACzB,OAAO,CACL,OAAO,CAAC,GAAG,CAAC,sBAAsB,KAAK,GAAG;QAC1C,OAAO,CAAC,GAAG,CAAC,2BAA2B,KAAK,GAAG,CAChD,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,UAAkB,EAClB,OAAe;IAEf,OAAO,MAAM;SACV,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC;SAChC,MAAM,CAAC,GAAG,qBAAqB,IAAI,OAAO,EAAE,CAAC;SAC7C,MAAM,CAAC,KAAK,CAAC,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,4BAA4B,CAC1C,OAA4D;IAE5D,IAAI,CAAC,kBAAkB,EAAE;QAAE,OAAO,SAAS,CAAC;IAC5C,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC;IAClD,OAAO,UAAU,CAAC,CAAC,CAAC,kBAAkB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1E,CAAC","sourcesContent":["import crypto from \"node:crypto\";\n\nconst DERIVED_SECRET_PREFIX = \"agent-native:derived-secret:v1\";\n\nfunction isWorkspaceRuntime(): boolean {\n return (\n process.env.AGENT_NATIVE_WORKSPACE === \"1\" ||\n process.env.VITE_AGENT_NATIVE_WORKSPACE === \"1\"\n );\n}\n\nexport function deriveServerSecret(\n rootSecret: string,\n purpose: string,\n): string {\n return crypto\n .createHmac(\"sha256\", rootSecret)\n .update(`${DERIVED_SECRET_PREFIX}:${purpose}`)\n .digest(\"hex\");\n}\n\nexport function getWorkspaceA2ADerivedSecret(\n purpose: \"better-auth\" | \"oauth-state\" | \"short-lived-token\",\n): string | undefined {\n if (!isWorkspaceRuntime()) return undefined;\n const rootSecret = process.env.A2A_SECRET?.trim();\n return rootSecret ? deriveServerSecret(rootSecret, purpose) : undefined;\n}\n"]}
1
+ {"version":3,"file":"derived-secret.js","sourceRoot":"","sources":["../../src/server/derived-secret.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,MAAM,qBAAqB,GAAG,gCAAgC,CAAC;AAE/D,SAAS,kBAAkB;IACzB,OAAO,CACL,OAAO,CAAC,GAAG,CAAC,sBAAsB,KAAK,GAAG;QAC1C,OAAO,CAAC,GAAG,CAAC,2BAA2B,KAAK,GAAG,CAChD,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,UAAkB,EAClB,OAAe;IAEf,OAAO,MAAM;SACV,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC;SAChC,MAAM,CAAC,GAAG,qBAAqB,IAAI,OAAO,EAAE,CAAC;SAC7C,MAAM,CAAC,KAAK,CAAC,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,4BAA4B,CAC1C,OAIwB;IAExB,IAAI,CAAC,kBAAkB,EAAE;QAAE,OAAO,SAAS,CAAC;IAC5C,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC;IAClD,OAAO,UAAU,CAAC,CAAC,CAAC,kBAAkB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1E,CAAC","sourcesContent":["import crypto from \"node:crypto\";\n\nconst DERIVED_SECRET_PREFIX = \"agent-native:derived-secret:v1\";\n\nfunction isWorkspaceRuntime(): boolean {\n return (\n process.env.AGENT_NATIVE_WORKSPACE === \"1\" ||\n process.env.VITE_AGENT_NATIVE_WORKSPACE === \"1\"\n );\n}\n\nexport function deriveServerSecret(\n rootSecret: string,\n purpose: string,\n): string {\n return crypto\n .createHmac(\"sha256\", rootSecret)\n .update(`${DERIVED_SECRET_PREFIX}:${purpose}`)\n .digest(\"hex\");\n}\n\nexport function getWorkspaceA2ADerivedSecret(\n purpose:\n | \"better-auth\"\n | \"oauth-state\"\n | \"short-lived-token\"\n | \"secrets-encryption\",\n): string | undefined {\n if (!isWorkspaceRuntime()) return undefined;\n const rootSecret = process.env.A2A_SECRET?.trim();\n return rootSecret ? deriveServerSecret(rootSecret, purpose) : undefined;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.101.2",
3
+ "version": "0.101.3",
4
4
  "description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
5
5
  "homepage": "https://github.com/BuilderIO/agent-native#readme",
6
6
  "bugs": {
@@ -335,7 +335,7 @@
335
335
  "y-protocols": "^1.0.7",
336
336
  "yjs": "^13.6.31",
337
337
  "zod": "^4.3.6",
338
- "@agent-native/recap-cli": "0.3.0",
338
+ "@agent-native/recap-cli": "0.4.0",
339
339
  "@agent-native/toolkit": "^0.4.10"
340
340
  },
341
341
  "devDependencies": {
@@ -1,68 +0,0 @@
1
- import { appPath, useActionQuery, useT } from "@agent-native/core/client";
2
- import { IconBrandSlack } from "@tabler/icons-react";
3
-
4
- interface SlackInstallation {
5
- status: string;
6
- }
7
-
8
- interface SlackInstallationsResponse {
9
- oauthConfigured: boolean;
10
- installations: SlackInstallation[];
11
- }
12
-
13
- /**
14
- * Contextual nudge shown in the share popover's Link tab for public clips.
15
- *
16
- * A public Clips link unfurls into a playable video when pasted in a connected
17
- * Slack workspace, but that integration is otherwise only discoverable in
18
- * Settings. When a workspace is connected we confirm the payoff; when none is,
19
- * clip owners/admins get a one-click link to connect one in Settings.
20
- *
21
- * Only rendered for public clips (the caller gates on `isPublic`), so the
22
- * `list-slack-installations` query never runs for private shares.
23
- */
24
- export function SlackShareHint({ canManage }: { canManage: boolean }) {
25
- const t = useT();
26
- const slack = useActionQuery<SlackInstallationsResponse>(
27
- "list-slack-installations",
28
- undefined,
29
- { retry: false },
30
- );
31
-
32
- const data = slack.data;
33
- const connected =
34
- data?.installations?.some((i) => i.status === "connected") ?? false;
35
-
36
- if (connected) {
37
- return (
38
- <div className="flex items-center gap-2 rounded-md bg-muted/35 px-2.5 py-1.5 text-xs text-muted-foreground">
39
- <IconBrandSlack className="h-4 w-4 shrink-0 text-muted-foreground" />
40
- <span className="min-w-0 truncate">
41
- {t("slackShareHint.playsInline")}
42
- </span>
43
- </div>
44
- );
45
- }
46
-
47
- // No workspace connected yet. Connecting needs the deployment's Slack OAuth
48
- // credentials, so only point managers at Settings when it's actually set up —
49
- // otherwise the Connect button there is disabled and the link is a dead end.
50
- // While the query is loading or errored, `data` is undefined and we render
51
- // nothing rather than guess at the workspace state.
52
- if (!data || !canManage || !data.oauthConfigured) return null;
53
-
54
- return (
55
- <a
56
- href={appPath("/settings#slack")}
57
- className="flex items-center gap-2 rounded-md bg-muted/35 px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-muted/55"
58
- >
59
- <IconBrandSlack className="h-4 w-4 shrink-0 text-muted-foreground" />
60
- <span className="min-w-0 flex-1 truncate">
61
- {t("slackShareHint.makeInline")}
62
- </span>
63
- <span className="shrink-0 font-medium text-primary">
64
- {t("slackShareHint.connect")}
65
- </span>
66
- </a>
67
- );
68
- }