@agent-native/dispatch 0.40.28 → 0.40.29

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 (37) hide show
  1. package/CHANGELOG.md +13 -13
  2. package/dist/actions/approve-vault-request.js +4 -0
  3. package/dist/actions/approve-vault-request.js.map +1 -1
  4. package/dist/actions/create-link-token.js +4 -0
  5. package/dist/actions/create-link-token.js.map +1 -1
  6. package/dist/actions/create-vault-grant.js +4 -0
  7. package/dist/actions/create-vault-grant.js.map +1 -1
  8. package/dist/actions/create-vault-secret.js +4 -0
  9. package/dist/actions/create-vault-secret.js.map +1 -1
  10. package/dist/actions/create-workspace-resource.d.ts +13 -13
  11. package/dist/actions/delete-destination.d.ts +12 -12
  12. package/dist/actions/delete-vault-secret.js +4 -0
  13. package/dist/actions/delete-vault-secret.js.map +1 -1
  14. package/dist/actions/delete-workspace-resource.d.ts +13 -13
  15. package/dist/actions/grant-vault-secrets-to-app.js +4 -0
  16. package/dist/actions/grant-vault-secrets-to-app.js.map +1 -1
  17. package/dist/actions/import-agent.d.ts +13 -13
  18. package/dist/actions/provider-api-register.d.ts +17 -17
  19. package/dist/actions/revoke-vault-grant.js +4 -0
  20. package/dist/actions/revoke-vault-grant.js.map +1 -1
  21. package/dist/actions/set-mcp-app-access.js +4 -0
  22. package/dist/actions/set-mcp-app-access.js.map +1 -1
  23. package/dist/actions/set-vault-access-settings.js +4 -0
  24. package/dist/actions/set-vault-access-settings.js.map +1 -1
  25. package/dist/actions/update-vault-secret.js +4 -0
  26. package/dist/actions/update-vault-secret.js.map +1 -1
  27. package/package.json +3 -3
  28. package/src/actions/approve-vault-request.ts +4 -0
  29. package/src/actions/create-link-token.ts +4 -0
  30. package/src/actions/create-vault-grant.ts +4 -0
  31. package/src/actions/create-vault-secret.ts +4 -0
  32. package/src/actions/delete-vault-secret.ts +4 -0
  33. package/src/actions/grant-vault-secrets-to-app.ts +4 -0
  34. package/src/actions/revoke-vault-grant.ts +4 -0
  35. package/src/actions/set-mcp-app-access.ts +4 -0
  36. package/src/actions/set-vault-access-settings.ts +4 -0
  37. package/src/actions/update-vault-secret.ts +4 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @agent-native/dispatch
2
2
 
3
+ ## 0.40.29
4
+
5
+ ### Patch Changes
6
+
7
+ - f60152f: Require approval for `needsApproval` actions on every surface. HTTP action routes and generated Workers entries now run an approval-gated call only for the signed-in app UI (or its MCP directory widget); a bearer token, MCP OAuth token, org service token, A2A peer, or other HTTP caller gets `409 approval_required`, and an unproven browser call gets `403 ui_capability_required`. The app's client now presents its UI capability with every write from a signed-in session, so the 403 and one retry are only the fallback for an expired or rejected capability. `revoke-org-service-token` and the credential, membership, and app-access actions in core, Dispatch, and Scheduling now ask for approval on every call, with "always allow" off.
8
+ - Release all public npm packages with a patch version bump.
9
+ - Updated dependencies [4fdf78c]
10
+ - Updated dependencies [ab1a9e8]
11
+ - Updated dependencies [67514ae]
12
+ - Updated dependencies [b451cb2]
13
+ - Updated dependencies
14
+ - @agent-native/toolkit@0.211.0
15
+
3
16
  ## 0.40.28
4
17
 
5
18
  ### Patch Changes
@@ -1283,17 +1296,4 @@
1283
1296
 
1284
1297
  - 2107a36: Retry cross-app embed session authentication with the shared A2A secret when a workspace target rejects an unsynchronized organization secret.
1285
1298
 
1286
- ## 0.28.0
1287
-
1288
- ### Minor Changes
1289
-
1290
- - d3702a5: Point the chat beside an open workspace app at that app's own agent. Dispatch now proxies `/_agent-native/workspace-app-chat/<appId>/**` to the app's `/_agent-native/agent-chat`, authenticated with the app's own embed session, so the rail has the app's tools, AGENTS.md, skills, app-scoped resources, and dev-mode surface instead of Dispatch's. When the proxy cannot be established the rail shows a retryable error rather than silently answering from Dispatch's agent, and workspace-level chat with no app open is unchanged.
1291
-
1292
- ### Patch Changes
1293
-
1294
- - d3702a5: Allow workspace members to update mounted app names and descriptions from Dispatch.
1295
- - d3702a5: Report the embedded workspace app to the Dispatch agent as structured context. `/apps/<id>` now resolves to a `workspace-app` navigation view that keeps the app id and in-app path instead of collapsing to the apps list, and `view-screen` emits an `embeddedApp` block for both that route and chat-first mode, where the route stays on `/chat` and the open app is named only by `chat-first-pane` state. An app that is open but cannot be identified reports `status: "unknown"` rather than a default or an omitted field.
1296
- - d3702a5: Share the canonical localized authentication copy with native sign-in surfaces
1297
- and allow authenticated packaged callers to mint workspace embed sessions.
1298
-
1299
1299
  For the full list of releases, see the [changelog archive](./changelog/archive/CHANGELOG.md).
@@ -11,6 +11,10 @@ export default defineAction({
11
11
  .optional()
12
12
  .describe("Human-readable name for the secret"),
13
13
  }),
14
+ // It creates, changes, or revokes a credential or who may use one: every
15
+ // call needs the user's approval, and "always allow" is not offered.
16
+ needsApproval: true,
17
+ allowPersistentApproval: false,
14
18
  run: async (args) => approveRequest(args.id, args.secretValue, args.secretName, requireVaultCtx()),
15
19
  });
16
20
  //# sourceMappingURL=approve-vault-request.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"approve-vault-request.js","sourceRoot":"","sources":["../../src/actions/approve-vault-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/E,eAAe,YAAY,CAAC;IAC1B,WAAW,EACT,mIAAmI;IACrI,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;QAChD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;QAC7D,UAAU,EAAE,CAAC;aACV,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,oCAAoC,CAAC;KAClD,CAAC;IACF,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAClB,cAAc,CACZ,IAAI,CAAC,EAAE,EACP,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,UAAU,EACf,eAAe,EAAE,CAClB;CACJ,CAAC,CAAC","sourcesContent":["import { defineAction } from \"@agent-native/core/action\";\nimport { z } from \"zod\";\n\nimport { approveRequest, requireVaultCtx } from \"../server/lib/vault-store.js\";\n\nexport default defineAction({\n description:\n \"Approve a pending vault secret request. Creates the secret (if it doesn't exist) and grants it to the requesting app. Admin only.\",\n schema: z.object({\n id: z.string().describe(\"Request ID to approve\"),\n secretValue: z.string().describe(\"The secret value to store\"),\n secretName: z\n .string()\n .optional()\n .describe(\"Human-readable name for the secret\"),\n }),\n run: async (args) =>\n approveRequest(\n args.id,\n args.secretValue,\n args.secretName,\n requireVaultCtx(),\n ),\n});\n"]}
1
+ {"version":3,"file":"approve-vault-request.js","sourceRoot":"","sources":["../../src/actions/approve-vault-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/E,eAAe,YAAY,CAAC;IAC1B,WAAW,EACT,mIAAmI;IACrI,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;QAChD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;QAC7D,UAAU,EAAE,CAAC;aACV,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,oCAAoC,CAAC;KAClD,CAAC;IACF,yEAAyE;IACzE,qEAAqE;IACrE,aAAa,EAAE,IAAI;IACnB,uBAAuB,EAAE,KAAK;IAC9B,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAClB,cAAc,CACZ,IAAI,CAAC,EAAE,EACP,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,UAAU,EACf,eAAe,EAAE,CAClB;CACJ,CAAC,CAAC","sourcesContent":["import { defineAction } from \"@agent-native/core/action\";\nimport { z } from \"zod\";\n\nimport { approveRequest, requireVaultCtx } from \"../server/lib/vault-store.js\";\n\nexport default defineAction({\n description:\n \"Approve a pending vault secret request. Creates the secret (if it doesn't exist) and grants it to the requesting app. Admin only.\",\n schema: z.object({\n id: z.string().describe(\"Request ID to approve\"),\n secretValue: z.string().describe(\"The secret value to store\"),\n secretName: z\n .string()\n .optional()\n .describe(\"Human-readable name for the secret\"),\n }),\n // It creates, changes, or revokes a credential or who may use one: every\n // call needs the user's approval, and \"always allow\" is not offered.\n needsApproval: true,\n allowPersistentApproval: false,\n run: async (args) =>\n approveRequest(\n args.id,\n args.secretValue,\n args.secretName,\n requireVaultCtx(),\n ),\n});\n"]}
@@ -6,6 +6,10 @@ export default defineAction({
6
6
  schema: z.object({
7
7
  platform: z.enum(["slack", "telegram"]),
8
8
  }),
9
+ // It creates, changes, or revokes a credential or who may use one: every
10
+ // call needs the user's approval, and "always allow" is not offered.
11
+ needsApproval: true,
12
+ allowPersistentApproval: false,
9
13
  run: async ({ platform }) => createLinkToken(platform),
10
14
  });
11
15
  //# sourceMappingURL=create-link-token.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-link-token.js","sourceRoot":"","sources":["../../src/actions/create-link-token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,eAAe,YAAY,CAAC;IAC1B,WAAW,EACT,gGAAgG;IAClG,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;KACxC,CAAC;IACF,GAAG,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,eAAe,CAAC,QAAQ,CAAC;CACvD,CAAC,CAAC","sourcesContent":["import { defineAction } from \"@agent-native/core/action\";\nimport { z } from \"zod\";\n\nimport { createLinkToken } from \"../server/lib/dispatch-store.js\";\n\nexport default defineAction({\n description:\n \"Create a /link token so a Slack or Telegram user can bind to their personal dispatch identity.\",\n schema: z.object({\n platform: z.enum([\"slack\", \"telegram\"]),\n }),\n run: async ({ platform }) => createLinkToken(platform),\n});\n"]}
1
+ {"version":3,"file":"create-link-token.js","sourceRoot":"","sources":["../../src/actions/create-link-token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,eAAe,YAAY,CAAC;IAC1B,WAAW,EACT,gGAAgG;IAClG,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;KACxC,CAAC;IACF,yEAAyE;IACzE,qEAAqE;IACrE,aAAa,EAAE,IAAI;IACnB,uBAAuB,EAAE,KAAK;IAC9B,GAAG,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,eAAe,CAAC,QAAQ,CAAC;CACvD,CAAC,CAAC","sourcesContent":["import { defineAction } from \"@agent-native/core/action\";\nimport { z } from \"zod\";\n\nimport { createLinkToken } from \"../server/lib/dispatch-store.js\";\n\nexport default defineAction({\n description:\n \"Create a /link token so a Slack or Telegram user can bind to their personal dispatch identity.\",\n schema: z.object({\n platform: z.enum([\"slack\", \"telegram\"]),\n }),\n // It creates, changes, or revokes a credential or who may use one: every\n // call needs the user's approval, and \"always allow\" is not offered.\n needsApproval: true,\n allowPersistentApproval: false,\n run: async ({ platform }) => createLinkToken(platform),\n});\n"]}
@@ -9,6 +9,10 @@ export default defineAction({
9
9
  .string()
10
10
  .describe("App ID to grant access to, e.g. mail, calendar"),
11
11
  }),
12
+ // It creates, changes, or revokes a credential or who may use one: every
13
+ // call needs the user's approval, and "always allow" is not offered.
14
+ needsApproval: true,
15
+ allowPersistentApproval: false,
12
16
  run: async (args) => createGrant(args.secretId, args.appId),
13
17
  });
14
18
  //# sourceMappingURL=create-vault-grant.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-vault-grant.js","sourceRoot":"","sources":["../../src/actions/create-vault-grant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,eAAe,YAAY,CAAC;IAC1B,WAAW,EACT,gFAAgF;IAClF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;QAC1D,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,QAAQ,CAAC,gDAAgD,CAAC;KAC9D,CAAC;IACF,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC;CAC5D,CAAC,CAAC","sourcesContent":["import { defineAction } from \"@agent-native/core/action\";\nimport { z } from \"zod\";\n\nimport { createGrant } from \"../server/lib/vault-store.js\";\n\nexport default defineAction({\n description:\n \"Grant an app access to a vault secret in manual vault access mode. Admin only.\",\n schema: z.object({\n secretId: z.string().describe(\"ID of the secret to grant\"),\n appId: z\n .string()\n .describe(\"App ID to grant access to, e.g. mail, calendar\"),\n }),\n run: async (args) => createGrant(args.secretId, args.appId),\n});\n"]}
1
+ {"version":3,"file":"create-vault-grant.js","sourceRoot":"","sources":["../../src/actions/create-vault-grant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,eAAe,YAAY,CAAC;IAC1B,WAAW,EACT,gFAAgF;IAClF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;QAC1D,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,QAAQ,CAAC,gDAAgD,CAAC;KAC9D,CAAC;IACF,yEAAyE;IACzE,qEAAqE;IACrE,aAAa,EAAE,IAAI;IACnB,uBAAuB,EAAE,KAAK;IAC9B,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC;CAC5D,CAAC,CAAC","sourcesContent":["import { defineAction } from \"@agent-native/core/action\";\nimport { z } from \"zod\";\n\nimport { createGrant } from \"../server/lib/vault-store.js\";\n\nexport default defineAction({\n description:\n \"Grant an app access to a vault secret in manual vault access mode. Admin only.\",\n schema: z.object({\n secretId: z.string().describe(\"ID of the secret to grant\"),\n appId: z\n .string()\n .describe(\"App ID to grant access to, e.g. mail, calendar\"),\n }),\n // It creates, changes, or revokes a credential or who may use one: every\n // call needs the user's approval, and \"always allow\" is not offered.\n needsApproval: true,\n allowPersistentApproval: false,\n run: async (args) => createGrant(args.secretId, args.appId),\n});\n"]}
@@ -21,6 +21,10 @@ export default defineAction({
21
21
  // the value. Opt out of input capture so the trail can't become a second
22
22
  // durable credential store.
23
23
  audit: { recordInputs: false },
24
+ // It creates, changes, or revokes a credential or who may use one: every
25
+ // call needs the user's approval, and "always allow" is not offered.
26
+ needsApproval: true,
27
+ allowPersistentApproval: false,
24
28
  run: async (args) => toVaultSecretMetadata(await createSecret(args)),
25
29
  });
26
30
  //# sourceMappingURL=create-vault-secret.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-vault-secret.js","sourceRoot":"","sources":["../../src/actions/create-vault-secret.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,YAAY,EACZ,qBAAqB,GACtB,MAAM,8BAA8B,CAAC;AAEtC,eAAe,YAAY,CAAC;IAC1B,WAAW,EACT,8LAA8L;IAChM,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,aAAa,EAAE,CAAC;aACb,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CAAC,kDAAkD,CAAC;QAC/D,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,kBAAkB,CAAC;QACrD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,sCAAsC,CAAC;QACxE,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,qDAAqD,CAAC;QAClE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;KACpE,CAAC;IACF,2EAA2E;IAC3E,8EAA8E;IAC9E,yEAAyE;IACzE,4BAA4B;IAC5B,KAAK,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE;IAC9B,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,qBAAqB,CAAC,MAAM,YAAY,CAAC,IAAI,CAAC,CAAC;CACrE,CAAC,CAAC","sourcesContent":["import { defineAction } from \"@agent-native/core/action\";\nimport { z } from \"zod\";\n\nimport {\n createSecret,\n toVaultSecretMetadata,\n} from \"../server/lib/vault-store.js\";\n\nexport default defineAction({\n description:\n \"Store a secret in the workspace vault. Admin only. Existing credential keys are updated. By default, saved vault keys are available to every workspace app; manual mode uses per-app grants.\",\n schema: z.object({\n credentialKey: z\n .string()\n .min(1)\n .describe(\"Environment variable name, e.g. GOOGLE_CLIENT_ID\"),\n value: z.string().min(1).describe(\"The secret value\"),\n name: z.string().min(1).describe(\"Human-readable label for this secret\"),\n provider: z\n .string()\n .optional()\n .describe(\"Provider grouping tag, e.g. google, sendgrid, slack\"),\n description: z.string().optional().describe(\"Optional description\"),\n }),\n // This action's whole purpose is to carry a secret `value`. The vault owns\n // secret storage; the audit log must record THAT a secret was created — never\n // the value. Opt out of input capture so the trail can't become a second\n // durable credential store.\n audit: { recordInputs: false },\n run: async (args) => toVaultSecretMetadata(await createSecret(args)),\n});\n"]}
1
+ {"version":3,"file":"create-vault-secret.js","sourceRoot":"","sources":["../../src/actions/create-vault-secret.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,YAAY,EACZ,qBAAqB,GACtB,MAAM,8BAA8B,CAAC;AAEtC,eAAe,YAAY,CAAC;IAC1B,WAAW,EACT,8LAA8L;IAChM,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,aAAa,EAAE,CAAC;aACb,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CAAC,kDAAkD,CAAC;QAC/D,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,kBAAkB,CAAC;QACrD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,sCAAsC,CAAC;QACxE,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,qDAAqD,CAAC;QAClE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;KACpE,CAAC;IACF,2EAA2E;IAC3E,8EAA8E;IAC9E,yEAAyE;IACzE,4BAA4B;IAC5B,KAAK,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE;IAC9B,yEAAyE;IACzE,qEAAqE;IACrE,aAAa,EAAE,IAAI;IACnB,uBAAuB,EAAE,KAAK;IAC9B,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,qBAAqB,CAAC,MAAM,YAAY,CAAC,IAAI,CAAC,CAAC;CACrE,CAAC,CAAC","sourcesContent":["import { defineAction } from \"@agent-native/core/action\";\nimport { z } from \"zod\";\n\nimport {\n createSecret,\n toVaultSecretMetadata,\n} from \"../server/lib/vault-store.js\";\n\nexport default defineAction({\n description:\n \"Store a secret in the workspace vault. Admin only. Existing credential keys are updated. By default, saved vault keys are available to every workspace app; manual mode uses per-app grants.\",\n schema: z.object({\n credentialKey: z\n .string()\n .min(1)\n .describe(\"Environment variable name, e.g. GOOGLE_CLIENT_ID\"),\n value: z.string().min(1).describe(\"The secret value\"),\n name: z.string().min(1).describe(\"Human-readable label for this secret\"),\n provider: z\n .string()\n .optional()\n .describe(\"Provider grouping tag, e.g. google, sendgrid, slack\"),\n description: z.string().optional().describe(\"Optional description\"),\n }),\n // This action's whole purpose is to carry a secret `value`. The vault owns\n // secret storage; the audit log must record THAT a secret was created — never\n // the value. Opt out of input capture so the trail can't become a second\n // durable credential store.\n audit: { recordInputs: false },\n // It creates, changes, or revokes a credential or who may use one: every\n // call needs the user's approval, and \"always allow\" is not offered.\n needsApproval: true,\n allowPersistentApproval: false,\n run: async (args) => toVaultSecretMetadata(await createSecret(args)),\n});\n"]}
@@ -6,19 +6,6 @@ declare const _default: import("@agent-native/core/action").ActionDefinition<{
6
6
  content: string;
7
7
  scope: "all" | "selected";
8
8
  }, {
9
- id: string;
10
- ownerEmail: string;
11
- orgId: string | null;
12
- kind: string;
13
- name: string;
14
- description: string | null;
15
- path: string;
16
- content: string;
17
- scope: string;
18
- createdBy: string;
19
- createdAt: number;
20
- updatedAt: number;
21
- } | {
22
9
  id: string;
23
10
  ownerEmail: string;
24
11
  orgId: string | null;
@@ -35,6 +22,19 @@ declare const _default: import("@agent-native/core/action").ActionDefinition<{
35
22
  reviewedAt: number | null;
36
23
  createdAt: number;
37
24
  updatedAt: number;
25
+ } | {
26
+ id: string;
27
+ ownerEmail: string;
28
+ orgId: string | null;
29
+ kind: string;
30
+ name: string;
31
+ description: string | null;
32
+ path: string;
33
+ content: string;
34
+ scope: string;
35
+ createdBy: string;
36
+ createdAt: number;
37
+ updatedAt: number;
38
38
  }>;
39
39
  export default _default;
40
40
  //# sourceMappingURL=create-workspace-resource.d.ts.map
@@ -1,6 +1,18 @@
1
1
  declare const _default: import("@agent-native/core/action").ActionDefinition<{
2
2
  id: string;
3
3
  }, {
4
+ id: string;
5
+ ownerEmail: string;
6
+ orgId: string | null;
7
+ name: string;
8
+ platform: string;
9
+ destination: string;
10
+ threadRef: string | null;
11
+ notes: string | null;
12
+ createdBy: string;
13
+ createdAt: number;
14
+ updatedAt: number;
15
+ } | {
4
16
  id: string;
5
17
  ownerEmail: string;
6
18
  orgId: string | null;
@@ -17,18 +29,6 @@ declare const _default: import("@agent-native/core/action").ActionDefinition<{
17
29
  reviewedAt: number | null;
18
30
  createdAt: number;
19
31
  updatedAt: number;
20
- } | {
21
- id: string;
22
- ownerEmail: string;
23
- orgId: string | null;
24
- name: string;
25
- platform: string;
26
- destination: string;
27
- threadRef: string | null;
28
- notes: string | null;
29
- createdBy: string;
30
- createdAt: number;
31
- updatedAt: number;
32
32
  }>;
33
33
  export default _default;
34
34
  //# sourceMappingURL=delete-destination.d.ts.map
@@ -6,6 +6,10 @@ export default defineAction({
6
6
  schema: z.object({
7
7
  id: z.string().describe("Secret ID to delete"),
8
8
  }),
9
+ // It creates, changes, or revokes a credential or who may use one: every
10
+ // call needs the user's approval, and "always allow" is not offered.
11
+ needsApproval: true,
12
+ allowPersistentApproval: false,
9
13
  run: async ({ id }) => {
10
14
  await deleteSecret(id);
11
15
  return { deleted: true, id };
@@ -1 +1 @@
1
- {"version":3,"file":"delete-vault-secret.js","sourceRoot":"","sources":["../../src/actions/delete-vault-secret.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,eAAe,YAAY,CAAC;IAC1B,WAAW,EACT,uGAAuG;IACzG,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;KAC/C,CAAC;IACF,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;QACpB,MAAM,YAAY,CAAC,EAAE,CAAC,CAAC;QACvB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;IAC/B,CAAC;CACF,CAAC,CAAC","sourcesContent":["import { defineAction } from \"@agent-native/core/action\";\nimport { z } from \"zod\";\n\nimport { deleteSecret } from \"../server/lib/vault-store.js\";\n\nexport default defineAction({\n description:\n \"Delete a secret from the workspace vault. Also revokes all active grants for this secret. Admin only.\",\n schema: z.object({\n id: z.string().describe(\"Secret ID to delete\"),\n }),\n run: async ({ id }) => {\n await deleteSecret(id);\n return { deleted: true, id };\n },\n});\n"]}
1
+ {"version":3,"file":"delete-vault-secret.js","sourceRoot":"","sources":["../../src/actions/delete-vault-secret.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,eAAe,YAAY,CAAC;IAC1B,WAAW,EACT,uGAAuG;IACzG,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;KAC/C,CAAC;IACF,yEAAyE;IACzE,qEAAqE;IACrE,aAAa,EAAE,IAAI;IACnB,uBAAuB,EAAE,KAAK;IAC9B,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;QACpB,MAAM,YAAY,CAAC,EAAE,CAAC,CAAC;QACvB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;IAC/B,CAAC;CACF,CAAC,CAAC","sourcesContent":["import { defineAction } from \"@agent-native/core/action\";\nimport { z } from \"zod\";\n\nimport { deleteSecret } from \"../server/lib/vault-store.js\";\n\nexport default defineAction({\n description:\n \"Delete a secret from the workspace vault. Also revokes all active grants for this secret. Admin only.\",\n schema: z.object({\n id: z.string().describe(\"Secret ID to delete\"),\n }),\n // It creates, changes, or revokes a credential or who may use one: every\n // call needs the user's approval, and \"always allow\" is not offered.\n needsApproval: true,\n allowPersistentApproval: false,\n run: async ({ id }) => {\n await deleteSecret(id);\n return { deleted: true, id };\n },\n});\n"]}
@@ -1,6 +1,19 @@
1
1
  declare const _default: import("@agent-native/core/action").ActionDefinition<{
2
2
  id: string;
3
3
  }, {
4
+ id: string;
5
+ ownerEmail: string;
6
+ orgId: string | null;
7
+ kind: string;
8
+ name: string;
9
+ description: string | null;
10
+ path: string;
11
+ content: string;
12
+ scope: string;
13
+ createdBy: string;
14
+ createdAt: number;
15
+ updatedAt: number;
16
+ } | {
4
17
  id: string;
5
18
  ownerEmail: string;
6
19
  orgId: string | null;
@@ -17,19 +30,6 @@ declare const _default: import("@agent-native/core/action").ActionDefinition<{
17
30
  reviewedAt: number | null;
18
31
  createdAt: number;
19
32
  updatedAt: number;
20
- } | {
21
- id: string;
22
- ownerEmail: string;
23
- orgId: string | null;
24
- kind: string;
25
- name: string;
26
- description: string | null;
27
- path: string;
28
- content: string;
29
- scope: string;
30
- createdBy: string;
31
- createdAt: number;
32
- updatedAt: number;
33
33
  }>;
34
34
  export default _default;
35
35
  //# sourceMappingURL=delete-workspace-resource.d.ts.map
@@ -14,6 +14,10 @@ export default defineAction({
14
14
  .max(100)
15
15
  .describe("Vault secret IDs to grant to the app"),
16
16
  }),
17
+ // It creates, changes, or revokes a credential or who may use one: every
18
+ // call needs the user's approval, and "always allow" is not offered.
19
+ needsApproval: true,
20
+ allowPersistentApproval: false,
17
21
  run: async (args) => grantSecretsToApp(args.secretIds, args.appId),
18
22
  });
19
23
  //# sourceMappingURL=grant-vault-secrets-to-app.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"grant-vault-secrets-to-app.js","sourceRoot":"","sources":["../../src/actions/grant-vault-secrets-to-app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,eAAe,YAAY,CAAC;IAC1B,WAAW,EACT,uIAAuI;IACzI,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;IACxB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,KAAK,CAAC,wBAAwB,CAAC;aAC/B,QAAQ,CAAC,6CAA6C,CAAC;QAC1D,SAAS,EAAE,CAAC;aACT,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;aACjB,GAAG,CAAC,GAAG,CAAC;aACR,QAAQ,CAAC,sCAAsC,CAAC;KACpD,CAAC;IACF,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC;CACnE,CAAC,CAAC","sourcesContent":["import { defineAction } from \"@agent-native/core/action\";\nimport { z } from \"zod\";\n\nimport { grantSecretsToApp } from \"../server/lib/vault-store.js\";\n\nexport default defineAction({\n description:\n \"Grant multiple Dispatch vault secrets to a workspace app in manual vault access mode. Admin only. Existing active grants are skipped.\",\n http: { method: \"POST\" },\n schema: z.object({\n appId: z\n .string()\n .regex(/^[a-z][a-z0-9-]{0,63}$/)\n .describe(\"Workspace app id/path, e.g. customer-health\"),\n secretIds: z\n .array(z.string())\n .max(100)\n .describe(\"Vault secret IDs to grant to the app\"),\n }),\n run: async (args) => grantSecretsToApp(args.secretIds, args.appId),\n});\n"]}
1
+ {"version":3,"file":"grant-vault-secrets-to-app.js","sourceRoot":"","sources":["../../src/actions/grant-vault-secrets-to-app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,eAAe,YAAY,CAAC;IAC1B,WAAW,EACT,uIAAuI;IACzI,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;IACxB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,KAAK,CAAC,wBAAwB,CAAC;aAC/B,QAAQ,CAAC,6CAA6C,CAAC;QAC1D,SAAS,EAAE,CAAC;aACT,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;aACjB,GAAG,CAAC,GAAG,CAAC;aACR,QAAQ,CAAC,sCAAsC,CAAC;KACpD,CAAC;IACF,yEAAyE;IACzE,qEAAqE;IACrE,aAAa,EAAE,IAAI;IACnB,uBAAuB,EAAE,KAAK;IAC9B,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC;CACnE,CAAC,CAAC","sourcesContent":["import { defineAction } from \"@agent-native/core/action\";\nimport { z } from \"zod\";\n\nimport { grantSecretsToApp } from \"../server/lib/vault-store.js\";\n\nexport default defineAction({\n description:\n \"Grant multiple Dispatch vault secrets to a workspace app in manual vault access mode. Admin only. Existing active grants are skipped.\",\n http: { method: \"POST\" },\n schema: z.object({\n appId: z\n .string()\n .regex(/^[a-z][a-z0-9-]{0,63}$/)\n .describe(\"Workspace app id/path, e.g. customer-health\"),\n secretIds: z\n .array(z.string())\n .max(100)\n .describe(\"Vault secret IDs to grant to the app\"),\n }),\n // It creates, changes, or revokes a credential or who may use one: every\n // call needs the user's approval, and \"always allow\" is not offered.\n needsApproval: true,\n allowPersistentApproval: false,\n run: async (args) => grantSecretsToApp(args.secretIds, args.appId),\n});\n"]}
@@ -23,6 +23,19 @@ declare const _default: import("@agent-native/core/action").ActionDefinition<{
23
23
  } | {
24
24
  status: "created";
25
25
  resource: {
26
+ id: string;
27
+ ownerEmail: string;
28
+ orgId: string | null;
29
+ kind: string;
30
+ name: string;
31
+ description: string | null;
32
+ path: string;
33
+ content: string;
34
+ scope: string;
35
+ createdBy: string;
36
+ createdAt: number;
37
+ updatedAt: number;
38
+ } | {
26
39
  id: string;
27
40
  ownerEmail: string;
28
41
  orgId: string | null;
@@ -39,19 +52,6 @@ declare const _default: import("@agent-native/core/action").ActionDefinition<{
39
52
  reviewedAt: number | null;
40
53
  createdAt: number;
41
54
  updatedAt: number;
42
- } | {
43
- id: string;
44
- ownerEmail: string;
45
- orgId: string | null;
46
- kind: string;
47
- name: string;
48
- description: string | null;
49
- path: string;
50
- content: string;
51
- scope: string;
52
- createdBy: string;
53
- createdAt: number;
54
- updatedAt: number;
55
55
  };
56
56
  source: "claude" | "json" | "markdown";
57
57
  warnings: string[];
@@ -47,10 +47,8 @@ declare const _default: import("node_modules/@agent-native/core/dist").ActionDef
47
47
  notes?: string | undefined;
48
48
  scope?: "org" | "user" | undefined;
49
49
  }, {
50
- provider?: undefined;
50
+ message?: undefined;
51
51
  id?: undefined;
52
- deleted?: undefined;
53
- found?: undefined;
54
52
  providers: {
55
53
  id: string;
56
54
  label: string;
@@ -61,45 +59,47 @@ declare const _default: import("node_modules/@agent-native/core/dist").ActionDef
61
59
  updatedAt: number;
62
60
  }[];
63
61
  count: number;
62
+ provider?: undefined;
63
+ found?: undefined;
64
+ deleted?: undefined;
64
65
  registered?: undefined;
65
66
  label?: undefined;
66
- message?: undefined;
67
67
  } | {
68
+ message?: undefined;
68
69
  id?: undefined;
69
- count?: undefined;
70
- deleted?: undefined;
71
70
  providers?: undefined;
71
+ count?: undefined;
72
72
  found: boolean;
73
73
  provider: import("node_modules/@agent-native/core/dist/provider-api").CustomProviderConfig;
74
+ deleted?: undefined;
74
75
  registered?: undefined;
75
76
  label?: undefined;
76
- message?: undefined;
77
77
  } | {
78
- provider?: undefined;
79
- count?: undefined;
80
- deleted?: undefined;
78
+ message?: undefined;
81
79
  providers?: undefined;
80
+ count?: undefined;
81
+ provider?: undefined;
82
82
  found: boolean;
83
83
  id: string;
84
+ deleted?: undefined;
84
85
  registered?: undefined;
85
86
  label?: undefined;
86
- message?: undefined;
87
87
  } | {
88
- provider?: undefined;
88
+ message?: undefined;
89
+ providers?: undefined;
89
90
  count?: undefined;
91
+ provider?: undefined;
90
92
  found?: undefined;
91
- providers?: undefined;
92
93
  deleted: boolean;
93
94
  id: string;
94
95
  registered?: undefined;
95
96
  label?: undefined;
96
- message?: undefined;
97
97
  } | {
98
- provider?: undefined;
98
+ providers?: undefined;
99
99
  count?: undefined;
100
- deleted?: undefined;
100
+ provider?: undefined;
101
101
  found?: undefined;
102
- providers?: undefined;
102
+ deleted?: undefined;
103
103
  registered: boolean;
104
104
  id: string;
105
105
  label: string;
@@ -6,6 +6,10 @@ export default defineAction({
6
6
  schema: z.object({
7
7
  grantId: z.string().describe("Grant ID to revoke"),
8
8
  }),
9
+ // It creates, changes, or revokes a credential or who may use one: every
10
+ // call needs the user's approval, and "always allow" is not offered.
11
+ needsApproval: true,
12
+ allowPersistentApproval: false,
9
13
  run: async (args) => revokeGrant(args.grantId),
10
14
  });
11
15
  //# sourceMappingURL=revoke-vault-grant.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"revoke-vault-grant.js","sourceRoot":"","sources":["../../src/actions/revoke-vault-grant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,eAAe,YAAY,CAAC;IAC1B,WAAW,EAAE,uDAAuD;IACpE,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC;KACnD,CAAC;IACF,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC;CAC/C,CAAC,CAAC","sourcesContent":["import { defineAction } from \"@agent-native/core/action\";\nimport { z } from \"zod\";\n\nimport { revokeGrant } from \"../server/lib/vault-store.js\";\n\nexport default defineAction({\n description: \"Revoke an app's access to a vault secret. Admin only.\",\n schema: z.object({\n grantId: z.string().describe(\"Grant ID to revoke\"),\n }),\n run: async (args) => revokeGrant(args.grantId),\n});\n"]}
1
+ {"version":3,"file":"revoke-vault-grant.js","sourceRoot":"","sources":["../../src/actions/revoke-vault-grant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,eAAe,YAAY,CAAC;IAC1B,WAAW,EAAE,uDAAuD;IACpE,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC;KACnD,CAAC;IACF,yEAAyE;IACzE,qEAAqE;IACrE,aAAa,EAAE,IAAI;IACnB,uBAAuB,EAAE,KAAK;IAC9B,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC;CAC/C,CAAC,CAAC","sourcesContent":["import { defineAction } from \"@agent-native/core/action\";\nimport { z } from \"zod\";\n\nimport { revokeGrant } from \"../server/lib/vault-store.js\";\n\nexport default defineAction({\n description: \"Revoke an app's access to a vault secret. Admin only.\",\n schema: z.object({\n grantId: z.string().describe(\"Grant ID to revoke\"),\n }),\n // It creates, changes, or revokes a credential or who may use one: every\n // call needs the user's approval, and \"always allow\" is not offered.\n needsApproval: true,\n allowPersistentApproval: false,\n run: async (args) => revokeGrant(args.grantId),\n});\n"]}
@@ -14,6 +14,10 @@ export default defineAction({
14
14
  .default([])
15
15
  .describe("App IDs to expose when mode is selected-apps."),
16
16
  }),
17
+ // It changes who may use an app or what they may do in it: every call
18
+ // needs the user's approval, and "always allow" is not offered.
19
+ needsApproval: true,
20
+ allowPersistentApproval: false,
17
21
  run: async (args) => {
18
22
  const agents = await discoverAgents("dispatch");
19
23
  const knownIds = new Set(["dispatch", ...agents.map((agent) => agent.id)]);
@@ -1 +1 @@
1
- {"version":3,"file":"set-mcp-app-access.js","sourceRoot":"","sources":["../../src/actions/set-mcp-app-access.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,gBAAgB,MAAM,0BAA0B,CAAC;AAExD,MAAM,UAAU,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC;AAEzD,eAAe,YAAY,CAAC;IAC1B,WAAW,EACT,sEAAsE;IACxE,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,UAAU,CAAC,QAAQ,CACvB,6FAA6F,CAC9F;QACD,cAAc,EAAE,CAAC;aACd,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;aACjB,OAAO,CAAC,EAAE,CAAC;aACX,QAAQ,CAAC,+CAA+C,CAAC;KAC7D,CAAC;IACF,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QAClB,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,UAAU,CAAC,CAAC;QAChD,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,CAAC,UAAU,EAAE,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC3E,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAC/B,IAAI,GAAG,CACL,IAAI,CAAC,cAAc;aAChB,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;aACpC,MAAM,CAAC,OAAO,CAAC,CACnB,CACF,CAAC;QACF,MAAM,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QACjE,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CACb,mBAAmB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,qDAAqD,CAC3F,CAAC;QACJ,CAAC;QACD,MAAM,+BAA+B,CAAC;YACpC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,cAAc;SACf,CAAC,CAAC;QACH,MAAM,WAAW,CAAC;YAChB,MAAM,EAAE,oBAAoB;YAC5B,UAAU,EAAE,qBAAqB;YACjC,QAAQ,EAAE,aAAa;YACvB,OAAO,EACL,IAAI,CAAC,IAAI,KAAK,UAAU;gBACtB,CAAC,CAAC,yCAAyC;gBAC3C,CAAC,CAAC,kCAAkC,cAAc,CAAC,MAAM,kBAAkB;YAC/E,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,cAAc,EAAE;SAC9C,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QAEnB,OAAO,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAClC,CAAC;CACF,CAAC,CAAC","sourcesContent":["import { defineAction } from \"@agent-native/core/action\";\nimport { discoverAgents } from \"@agent-native/core/server/agent-discovery\";\nimport { z } from \"zod\";\n\nimport { recordAudit } from \"../server/lib/dispatch-store.js\";\nimport { setDispatchMcpAppAccessSettings } from \"../server/lib/mcp-access-store.js\";\nimport listMcpAppAccess from \"./list-mcp-app-access.js\";\n\nconst modeSchema = z.enum([\"all-apps\", \"selected-apps\"]);\n\nexport default defineAction({\n description:\n \"Set which apps are available through Dispatch's unified MCP gateway.\",\n schema: z.object({\n mode: modeSchema.describe(\n \"Use all-apps to expose every discovered app, or selected-apps to allow only selectedAppIds.\",\n ),\n selectedAppIds: z\n .array(z.string())\n .default([])\n .describe(\"App IDs to expose when mode is selected-apps.\"),\n }),\n run: async (args) => {\n const agents = await discoverAgents(\"dispatch\");\n const knownIds = new Set([\"dispatch\", ...agents.map((agent) => agent.id)]);\n const selectedAppIds = Array.from(\n new Set(\n args.selectedAppIds\n .map((id) => id.trim().toLowerCase())\n .filter(Boolean),\n ),\n );\n const unknown = selectedAppIds.filter((id) => !knownIds.has(id));\n if (unknown.length > 0) {\n throw new Error(\n `Unknown app(s): ${unknown.join(\", \")}. Use list-mcp-app-access to see available app IDs.`,\n );\n }\n await setDispatchMcpAppAccessSettings({\n mode: args.mode,\n selectedAppIds,\n });\n await recordAudit({\n action: \"mcp-access.updated\",\n targetType: \"dispatch-mcp-access\",\n targetId: \"unified-mcp\",\n summary:\n args.mode === \"all-apps\"\n ? \"Allowed Dispatch MCP access to all apps\"\n : `Allowed Dispatch MCP access to ${selectedAppIds.length} selected app(s)`,\n metadata: { mode: args.mode, selectedAppIds },\n }).catch(() => {});\n\n return listMcpAppAccess.run({});\n },\n});\n"]}
1
+ {"version":3,"file":"set-mcp-app-access.js","sourceRoot":"","sources":["../../src/actions/set-mcp-app-access.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,gBAAgB,MAAM,0BAA0B,CAAC;AAExD,MAAM,UAAU,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC;AAEzD,eAAe,YAAY,CAAC;IAC1B,WAAW,EACT,sEAAsE;IACxE,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,UAAU,CAAC,QAAQ,CACvB,6FAA6F,CAC9F;QACD,cAAc,EAAE,CAAC;aACd,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;aACjB,OAAO,CAAC,EAAE,CAAC;aACX,QAAQ,CAAC,+CAA+C,CAAC;KAC7D,CAAC;IACF,sEAAsE;IACtE,gEAAgE;IAChE,aAAa,EAAE,IAAI;IACnB,uBAAuB,EAAE,KAAK;IAC9B,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QAClB,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,UAAU,CAAC,CAAC;QAChD,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,CAAC,UAAU,EAAE,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC3E,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAC/B,IAAI,GAAG,CACL,IAAI,CAAC,cAAc;aAChB,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;aACpC,MAAM,CAAC,OAAO,CAAC,CACnB,CACF,CAAC;QACF,MAAM,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QACjE,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CACb,mBAAmB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,qDAAqD,CAC3F,CAAC;QACJ,CAAC;QACD,MAAM,+BAA+B,CAAC;YACpC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,cAAc;SACf,CAAC,CAAC;QACH,MAAM,WAAW,CAAC;YAChB,MAAM,EAAE,oBAAoB;YAC5B,UAAU,EAAE,qBAAqB;YACjC,QAAQ,EAAE,aAAa;YACvB,OAAO,EACL,IAAI,CAAC,IAAI,KAAK,UAAU;gBACtB,CAAC,CAAC,yCAAyC;gBAC3C,CAAC,CAAC,kCAAkC,cAAc,CAAC,MAAM,kBAAkB;YAC/E,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,cAAc,EAAE;SAC9C,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QAEnB,OAAO,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAClC,CAAC;CACF,CAAC,CAAC","sourcesContent":["import { defineAction } from \"@agent-native/core/action\";\nimport { discoverAgents } from \"@agent-native/core/server/agent-discovery\";\nimport { z } from \"zod\";\n\nimport { recordAudit } from \"../server/lib/dispatch-store.js\";\nimport { setDispatchMcpAppAccessSettings } from \"../server/lib/mcp-access-store.js\";\nimport listMcpAppAccess from \"./list-mcp-app-access.js\";\n\nconst modeSchema = z.enum([\"all-apps\", \"selected-apps\"]);\n\nexport default defineAction({\n description:\n \"Set which apps are available through Dispatch's unified MCP gateway.\",\n schema: z.object({\n mode: modeSchema.describe(\n \"Use all-apps to expose every discovered app, or selected-apps to allow only selectedAppIds.\",\n ),\n selectedAppIds: z\n .array(z.string())\n .default([])\n .describe(\"App IDs to expose when mode is selected-apps.\"),\n }),\n // It changes who may use an app or what they may do in it: every call\n // needs the user's approval, and \"always allow\" is not offered.\n needsApproval: true,\n allowPersistentApproval: false,\n run: async (args) => {\n const agents = await discoverAgents(\"dispatch\");\n const knownIds = new Set([\"dispatch\", ...agents.map((agent) => agent.id)]);\n const selectedAppIds = Array.from(\n new Set(\n args.selectedAppIds\n .map((id) => id.trim().toLowerCase())\n .filter(Boolean),\n ),\n );\n const unknown = selectedAppIds.filter((id) => !knownIds.has(id));\n if (unknown.length > 0) {\n throw new Error(\n `Unknown app(s): ${unknown.join(\", \")}. Use list-mcp-app-access to see available app IDs.`,\n );\n }\n await setDispatchMcpAppAccessSettings({\n mode: args.mode,\n selectedAppIds,\n });\n await recordAudit({\n action: \"mcp-access.updated\",\n targetType: \"dispatch-mcp-access\",\n targetId: \"unified-mcp\",\n summary:\n args.mode === \"all-apps\"\n ? \"Allowed Dispatch MCP access to all apps\"\n : `Allowed Dispatch MCP access to ${selectedAppIds.length} selected app(s)`,\n metadata: { mode: args.mode, selectedAppIds },\n }).catch(() => {});\n\n return listMcpAppAccess.run({});\n },\n});\n"]}
@@ -8,6 +8,10 @@ export default defineAction({
8
8
  .enum(["all-apps", "manual"])
9
9
  .describe("all-apps shares every vault key with every app; manual requires grants"),
10
10
  }),
11
+ // It creates, changes, or revokes a credential or who may use one: every
12
+ // call needs the user's approval, and "always allow" is not offered.
13
+ needsApproval: true,
14
+ allowPersistentApproval: false,
11
15
  run: async (args) => setVaultAccessSettings(args),
12
16
  });
13
17
  //# sourceMappingURL=set-vault-access-settings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"set-vault-access-settings.js","sourceRoot":"","sources":["../../src/actions/set-vault-access-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAEtE,eAAe,YAAY,CAAC;IAC1B,WAAW,EACT,gJAAgJ;IAClJ,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,CAAC;aACJ,IAAI,CAAC,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;aAC5B,QAAQ,CACP,wEAAwE,CACzE;KACJ,CAAC;IACF,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,sBAAsB,CAAC,IAAI,CAAC;CAClD,CAAC,CAAC","sourcesContent":["import { defineAction } from \"@agent-native/core/action\";\nimport { z } from \"zod\";\n\nimport { setVaultAccessSettings } from \"../server/lib/vault-store.js\";\n\nexport default defineAction({\n description:\n \"Set the Dispatch vault access mode. Admin only. Use all-apps for the default workspace-wide mode or manual to require explicit per-app grants.\",\n schema: z.object({\n mode: z\n .enum([\"all-apps\", \"manual\"])\n .describe(\n \"all-apps shares every vault key with every app; manual requires grants\",\n ),\n }),\n run: async (args) => setVaultAccessSettings(args),\n});\n"]}
1
+ {"version":3,"file":"set-vault-access-settings.js","sourceRoot":"","sources":["../../src/actions/set-vault-access-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAEtE,eAAe,YAAY,CAAC;IAC1B,WAAW,EACT,gJAAgJ;IAClJ,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,CAAC;aACJ,IAAI,CAAC,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;aAC5B,QAAQ,CACP,wEAAwE,CACzE;KACJ,CAAC;IACF,yEAAyE;IACzE,qEAAqE;IACrE,aAAa,EAAE,IAAI;IACnB,uBAAuB,EAAE,KAAK;IAC9B,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,sBAAsB,CAAC,IAAI,CAAC;CAClD,CAAC,CAAC","sourcesContent":["import { defineAction } from \"@agent-native/core/action\";\nimport { z } from \"zod\";\n\nimport { setVaultAccessSettings } from \"../server/lib/vault-store.js\";\n\nexport default defineAction({\n description:\n \"Set the Dispatch vault access mode. Admin only. Use all-apps for the default workspace-wide mode or manual to require explicit per-app grants.\",\n schema: z.object({\n mode: z\n .enum([\"all-apps\", \"manual\"])\n .describe(\n \"all-apps shares every vault key with every app; manual requires grants\",\n ),\n }),\n // It creates, changes, or revokes a credential or who may use one: every\n // call needs the user's approval, and \"always allow\" is not offered.\n needsApproval: true,\n allowPersistentApproval: false,\n run: async (args) => setVaultAccessSettings(args),\n});\n"]}
@@ -42,6 +42,10 @@ export default defineAction({
42
42
  // Carries a secret `value`. Record THAT the secret changed, never the value —
43
43
  // keep the audit trail from becoming a second credential store.
44
44
  audit: { recordInputs: false },
45
+ // It creates, changes, or revokes a credential or who may use one: every
46
+ // call needs the user's approval, and "always allow" is not offered.
47
+ needsApproval: true,
48
+ allowPersistentApproval: false,
45
49
  run: async (args) => toVaultSecretMetadata(await updateSecret(args.id, args)),
46
50
  });
47
51
  //# sourceMappingURL=update-vault-secret.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"update-vault-secret.js","sourceRoot":"","sources":["../../src/actions/update-vault-secret.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,qBAAqB,EACrB,YAAY,GACb,MAAM,8BAA8B,CAAC;AAEtC,eAAe,YAAY,CAAC;IAC1B,WAAW,EACT,uGAAuG;IACzG,MAAM,EAAE,CAAC;SACN,MAAM,CAAC;QACN,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC;QAC3C,aAAa,EAAE,CAAC;aACb,MAAM,EAAE;aACR,IAAI,EAAE;aACN,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,EAAE;aACV,QAAQ,CAAC,kDAAkD,CAAC;QAC/D,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,EAAE;aACV,QAAQ,CAAC,mDAAmD,CAAC;QAChE,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,IAAI,EAAE;aACN,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,EAAE;aACV,QAAQ,CAAC,sCAAsC,CAAC;QACnD,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,EAAE;aACV,QAAQ,CAAC,qDAAqD,CAAC;QAClE,WAAW,EAAE,CAAC;aACX,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,EAAE;aACV,QAAQ,CAAC,sBAAsB,CAAC;KACpC,CAAC;SACD,MAAM,CACL,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,EAAE,CACxD,aAAa,KAAK,SAAS;QAC3B,KAAK,KAAK,SAAS;QACnB,IAAI,KAAK,SAAS;QAClB,QAAQ,KAAK,SAAS;QACtB,WAAW,KAAK,SAAS,EAC3B,2CAA2C,CAC5C;IACH,8EAA8E;IAC9E,gEAAgE;IAChE,KAAK,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE;IAC9B,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,qBAAqB,CAAC,MAAM,YAAY,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;CAC9E,CAAC,CAAC","sourcesContent":["import { defineAction } from \"@agent-native/core/action\";\nimport { z } from \"zod\";\n\nimport {\n toVaultSecretMetadata,\n updateSecret,\n} from \"../server/lib/vault-store.js\";\n\nexport default defineAction({\n description:\n \"Update an existing vault secret's label, credential key, value, provider, or description. Admin only.\",\n schema: z\n .object({\n id: z.string().min(1).describe(\"Secret ID\"),\n credentialKey: z\n .string()\n .trim()\n .min(1)\n .optional()\n .describe(\"Environment variable name, e.g. GOOGLE_CLIENT_ID\"),\n value: z\n .string()\n .min(1)\n .optional()\n .describe(\"New secret value; omit to keep the existing value\"),\n name: z\n .string()\n .trim()\n .min(1)\n .optional()\n .describe(\"Human-readable label for this secret\"),\n provider: z\n .string()\n .nullable()\n .optional()\n .describe(\"Provider grouping tag, e.g. google, sendgrid, slack\"),\n description: z\n .string()\n .nullable()\n .optional()\n .describe(\"Optional description\"),\n })\n .refine(\n ({ credentialKey, value, name, provider, description }) =>\n credentialKey !== undefined ||\n value !== undefined ||\n name !== undefined ||\n provider !== undefined ||\n description !== undefined,\n \"At least one secret field must be updated\",\n ),\n // Carries a secret `value`. Record THAT the secret changed, never the value —\n // keep the audit trail from becoming a second credential store.\n audit: { recordInputs: false },\n run: async (args) => toVaultSecretMetadata(await updateSecret(args.id, args)),\n});\n"]}
1
+ {"version":3,"file":"update-vault-secret.js","sourceRoot":"","sources":["../../src/actions/update-vault-secret.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,qBAAqB,EACrB,YAAY,GACb,MAAM,8BAA8B,CAAC;AAEtC,eAAe,YAAY,CAAC;IAC1B,WAAW,EACT,uGAAuG;IACzG,MAAM,EAAE,CAAC;SACN,MAAM,CAAC;QACN,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC;QAC3C,aAAa,EAAE,CAAC;aACb,MAAM,EAAE;aACR,IAAI,EAAE;aACN,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,EAAE;aACV,QAAQ,CAAC,kDAAkD,CAAC;QAC/D,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,EAAE;aACV,QAAQ,CAAC,mDAAmD,CAAC;QAChE,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,IAAI,EAAE;aACN,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,EAAE;aACV,QAAQ,CAAC,sCAAsC,CAAC;QACnD,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,EAAE;aACV,QAAQ,CAAC,qDAAqD,CAAC;QAClE,WAAW,EAAE,CAAC;aACX,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,EAAE;aACV,QAAQ,CAAC,sBAAsB,CAAC;KACpC,CAAC;SACD,MAAM,CACL,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,EAAE,CACxD,aAAa,KAAK,SAAS;QAC3B,KAAK,KAAK,SAAS;QACnB,IAAI,KAAK,SAAS;QAClB,QAAQ,KAAK,SAAS;QACtB,WAAW,KAAK,SAAS,EAC3B,2CAA2C,CAC5C;IACH,8EAA8E;IAC9E,gEAAgE;IAChE,KAAK,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE;IAC9B,yEAAyE;IACzE,qEAAqE;IACrE,aAAa,EAAE,IAAI;IACnB,uBAAuB,EAAE,KAAK;IAC9B,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,qBAAqB,CAAC,MAAM,YAAY,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;CAC9E,CAAC,CAAC","sourcesContent":["import { defineAction } from \"@agent-native/core/action\";\nimport { z } from \"zod\";\n\nimport {\n toVaultSecretMetadata,\n updateSecret,\n} from \"../server/lib/vault-store.js\";\n\nexport default defineAction({\n description:\n \"Update an existing vault secret's label, credential key, value, provider, or description. Admin only.\",\n schema: z\n .object({\n id: z.string().min(1).describe(\"Secret ID\"),\n credentialKey: z\n .string()\n .trim()\n .min(1)\n .optional()\n .describe(\"Environment variable name, e.g. GOOGLE_CLIENT_ID\"),\n value: z\n .string()\n .min(1)\n .optional()\n .describe(\"New secret value; omit to keep the existing value\"),\n name: z\n .string()\n .trim()\n .min(1)\n .optional()\n .describe(\"Human-readable label for this secret\"),\n provider: z\n .string()\n .nullable()\n .optional()\n .describe(\"Provider grouping tag, e.g. google, sendgrid, slack\"),\n description: z\n .string()\n .nullable()\n .optional()\n .describe(\"Optional description\"),\n })\n .refine(\n ({ credentialKey, value, name, provider, description }) =>\n credentialKey !== undefined ||\n value !== undefined ||\n name !== undefined ||\n provider !== undefined ||\n description !== undefined,\n \"At least one secret field must be updated\",\n ),\n // Carries a secret `value`. Record THAT the secret changed, never the value —\n // keep the audit trail from becoming a second credential store.\n audit: { recordInputs: false },\n // It creates, changes, or revokes a credential or who may use one: every\n // call needs the user's approval, and \"always allow\" is not offered.\n needsApproval: true,\n allowPersistentApproval: false,\n run: async (args) => toVaultSecretMetadata(await updateSecret(args.id, args)),\n});\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/dispatch",
3
- "version": "0.40.28",
3
+ "version": "0.40.29",
4
4
  "description": "Dispatch — workspace control plane for agent-native apps. Vault, integrations, destinations, scheduled jobs, and cross-app delegation, shipped as a single drop-in package.",
5
5
  "homepage": "https://github.com/BuilderIO/agent-native#readme",
6
6
  "bugs": {
@@ -89,7 +89,7 @@
89
89
  "tailwind-merge": "^3.5.0",
90
90
  "vaul": "^1.1.2",
91
91
  "zod": "^4.3.6",
92
- "@agent-native/toolkit": "0.210.2"
92
+ "@agent-native/toolkit": "0.211.0"
93
93
  },
94
94
  "devDependencies": {
95
95
  "@react-router/dev": "^8.1.0",
@@ -103,7 +103,7 @@
103
103
  "typescript-7": "npm:typescript@^7.0.2",
104
104
  "vite": "8.1.0",
105
105
  "vitest": "^4.1.5",
106
- "@agent-native/core": "0.210.2"
106
+ "@agent-native/core": "0.211.0"
107
107
  },
108
108
  "peerDependencies": {
109
109
  "@agent-native/core": ">=0.209.1",
@@ -14,6 +14,10 @@ export default defineAction({
14
14
  .optional()
15
15
  .describe("Human-readable name for the secret"),
16
16
  }),
17
+ // It creates, changes, or revokes a credential or who may use one: every
18
+ // call needs the user's approval, and "always allow" is not offered.
19
+ needsApproval: true,
20
+ allowPersistentApproval: false,
17
21
  run: async (args) =>
18
22
  approveRequest(
19
23
  args.id,
@@ -9,5 +9,9 @@ export default defineAction({
9
9
  schema: z.object({
10
10
  platform: z.enum(["slack", "telegram"]),
11
11
  }),
12
+ // It creates, changes, or revokes a credential or who may use one: every
13
+ // call needs the user's approval, and "always allow" is not offered.
14
+ needsApproval: true,
15
+ allowPersistentApproval: false,
12
16
  run: async ({ platform }) => createLinkToken(platform),
13
17
  });
@@ -12,5 +12,9 @@ export default defineAction({
12
12
  .string()
13
13
  .describe("App ID to grant access to, e.g. mail, calendar"),
14
14
  }),
15
+ // It creates, changes, or revokes a credential or who may use one: every
16
+ // call needs the user's approval, and "always allow" is not offered.
17
+ needsApproval: true,
18
+ allowPersistentApproval: false,
15
19
  run: async (args) => createGrant(args.secretId, args.appId),
16
20
  });
@@ -27,5 +27,9 @@ export default defineAction({
27
27
  // the value. Opt out of input capture so the trail can't become a second
28
28
  // durable credential store.
29
29
  audit: { recordInputs: false },
30
+ // It creates, changes, or revokes a credential or who may use one: every
31
+ // call needs the user's approval, and "always allow" is not offered.
32
+ needsApproval: true,
33
+ allowPersistentApproval: false,
30
34
  run: async (args) => toVaultSecretMetadata(await createSecret(args)),
31
35
  });
@@ -9,6 +9,10 @@ export default defineAction({
9
9
  schema: z.object({
10
10
  id: z.string().describe("Secret ID to delete"),
11
11
  }),
12
+ // It creates, changes, or revokes a credential or who may use one: every
13
+ // call needs the user's approval, and "always allow" is not offered.
14
+ needsApproval: true,
15
+ allowPersistentApproval: false,
12
16
  run: async ({ id }) => {
13
17
  await deleteSecret(id);
14
18
  return { deleted: true, id };
@@ -17,5 +17,9 @@ export default defineAction({
17
17
  .max(100)
18
18
  .describe("Vault secret IDs to grant to the app"),
19
19
  }),
20
+ // It creates, changes, or revokes a credential or who may use one: every
21
+ // call needs the user's approval, and "always allow" is not offered.
22
+ needsApproval: true,
23
+ allowPersistentApproval: false,
20
24
  run: async (args) => grantSecretsToApp(args.secretIds, args.appId),
21
25
  });
@@ -8,5 +8,9 @@ export default defineAction({
8
8
  schema: z.object({
9
9
  grantId: z.string().describe("Grant ID to revoke"),
10
10
  }),
11
+ // It creates, changes, or revokes a credential or who may use one: every
12
+ // call needs the user's approval, and "always allow" is not offered.
13
+ needsApproval: true,
14
+ allowPersistentApproval: false,
11
15
  run: async (args) => revokeGrant(args.grantId),
12
16
  });
@@ -20,6 +20,10 @@ export default defineAction({
20
20
  .default([])
21
21
  .describe("App IDs to expose when mode is selected-apps."),
22
22
  }),
23
+ // It changes who may use an app or what they may do in it: every call
24
+ // needs the user's approval, and "always allow" is not offered.
25
+ needsApproval: true,
26
+ allowPersistentApproval: false,
23
27
  run: async (args) => {
24
28
  const agents = await discoverAgents("dispatch");
25
29
  const knownIds = new Set(["dispatch", ...agents.map((agent) => agent.id)]);
@@ -13,5 +13,9 @@ export default defineAction({
13
13
  "all-apps shares every vault key with every app; manual requires grants",
14
14
  ),
15
15
  }),
16
+ // It creates, changes, or revokes a credential or who may use one: every
17
+ // call needs the user's approval, and "always allow" is not offered.
18
+ needsApproval: true,
19
+ allowPersistentApproval: false,
16
20
  run: async (args) => setVaultAccessSettings(args),
17
21
  });
@@ -52,5 +52,9 @@ export default defineAction({
52
52
  // Carries a secret `value`. Record THAT the secret changed, never the value —
53
53
  // keep the audit trail from becoming a second credential store.
54
54
  audit: { recordInputs: false },
55
+ // It creates, changes, or revokes a credential or who may use one: every
56
+ // call needs the user's approval, and "always allow" is not offered.
57
+ needsApproval: true,
58
+ allowPersistentApproval: false,
55
59
  run: async (args) => toVaultSecretMetadata(await updateSecret(args.id, args)),
56
60
  });