@agent-native/dispatch 0.15.3 → 0.15.5
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.
- package/dist/actions/index.d.ts.map +1 -1
- package/dist/actions/index.js +2 -0
- package/dist/actions/index.js.map +1 -1
- package/dist/actions/provider-api-register.d.ts +11 -11
- package/dist/actions/resolve-integration-source-context.d.ts +5 -0
- package/dist/actions/resolve-integration-source-context.d.ts.map +1 -0
- package/dist/actions/resolve-integration-source-context.js +30 -0
- package/dist/actions/resolve-integration-source-context.js.map +1 -0
- package/dist/actions/update-workspace-resource.d.ts +13 -13
- package/dist/server/plugins/agent-chat.js +1 -0
- package/dist/server/plugins/agent-chat.js.map +1 -1
- package/package.json +3 -3
- package/src/actions/index.ts +2 -0
- package/src/actions/resolve-integration-source-context.spec.ts +78 -0
- package/src/actions/resolve-integration-source-context.ts +37 -0
- package/src/server/plugins/agent-chat.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AA8F7D;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CA6FvD,CAAC"}
|
package/dist/actions/index.js
CHANGED
|
@@ -68,6 +68,7 @@ import rejectDreamProposal from "./reject-dream-proposal.js";
|
|
|
68
68
|
import remixWorkspaceTemplate from "./remix-workspace-template.js";
|
|
69
69
|
import removePendingWorkspaceApp from "./remove-pending-workspace-app.js";
|
|
70
70
|
import requestVaultSecret from "./request-vault-secret.js";
|
|
71
|
+
import resolveIntegrationSourceContext from "./resolve-integration-source-context.js";
|
|
71
72
|
import restoreStarterWorkspaceResources from "./restore-starter-workspace-resources.js";
|
|
72
73
|
import revokeVaultGrant from "./revoke-vault-grant.js";
|
|
73
74
|
import revokeWorkspaceResourceGrant from "./revoke-workspace-resource-grant.js";
|
|
@@ -163,6 +164,7 @@ export const dispatchActions = {
|
|
|
163
164
|
"reject-dispatch-change": rejectDispatchChange,
|
|
164
165
|
"reject-dream-proposal": rejectDreamProposal,
|
|
165
166
|
"remove-pending-workspace-app": removePendingWorkspaceApp,
|
|
167
|
+
"resolve-integration-source-context": resolveIntegrationSourceContext,
|
|
166
168
|
"remix-workspace-template": remixWorkspaceTemplate,
|
|
167
169
|
"request-vault-secret": requestVaultSecret,
|
|
168
170
|
"revoke-vault-grant": revokeVaultGrant,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAEA,OAAO,kBAAkB,MAAM,2BAA2B,CAAC;AAC3D,OAAO,qBAAqB,MAAM,8BAA8B,CAAC;AACjE,OAAO,mBAAmB,MAAM,4BAA4B,CAAC;AAC7D,OAAO,mBAAmB,MAAM,4BAA4B,CAAC;AAC7D,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AACzD,OAAO,eAAe,MAAM,wBAAwB,CAAC;AACrD,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AACzD,OAAO,gBAAgB,MAAM,yBAAyB,CAAC;AACvD,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AACzD,OAAO,4BAA4B,MAAM,sCAAsC,CAAC;AAChF,OAAO,uBAAuB,MAAM,gCAAgC,CAAC;AACrE,OAAO,kBAAkB,MAAM,2BAA2B,CAAC;AAC3D,OAAO,iBAAiB,MAAM,yBAAyB,CAAC;AACxD,OAAO,mBAAmB,MAAM,4BAA4B,CAAC;AAC7D,OA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AkB;IAC1C,wBAAwB,EAAE,oBAAoB;IAC9C,uBAAuB,EAAE,mBAAmB;IAC5C,8BAA8B,EAAE,yBAAyB;IACzD,0BAA0B,EAAE,sBAAsB;IAClD,sBAAsB,EAAE,kBAAkB;IAC1C,oBAAoB,EAAE,gBAAgB;IACtC,iCAAiC,EAAE,4BAA4B;IAC/D,qCAAqC,EAAE,gCAAgC;IACvE,wBAAwB,EAAE,oBAAoB;IAC9C,sBAAsB,EAAE,kBAAkB;IAC1C,gCAAgC,EAAE,0BAA0B;IAC5D,uBAAuB,EAAE,mBAAmB;IAC5C,2BAA2B,EAAE,sBAAsB;IACnD,8BAA8B,EAAE,yBAAyB;IACzD,oBAAoB,EAAE,gBAAgB;IACtC,oBAAoB,EAAE,eAAe;IACrC,2BAA2B,EAAE,sBAAsB;IACnD,8BAA8B,EAAE,yBAAyB;IACzD,mBAAmB,EAAE,cAAc;IACnC,yBAAyB,EAAE,qBAAqB;IAChD,+BAA+B,EAAE,0BAA0B;IAC3D,qBAAqB,EAAE,iBAAiB;IACxC,2BAA2B,EAAE,uBAAuB;IACpD,oBAAoB,EAAE,iBAAiB;IACvC,aAAa,EAAE,UAAU;CAC1B,CAAC","sourcesContent":["import type { ActionEntry } from \"@agent-native/core/server\";\n\nimport applyDreamProposal from \"./apply-dream-proposal.js\";\nimport approveDispatchChange from \"./approve-dispatch-change.js\";\nimport approveVaultRequest from \"./approve-vault-request.js\";\nimport archiveWorkspaceApp from \"./archive-workspace-app.js\";\nimport askApp from \"./ask_app.js\";\nimport askAppStatus from \"./ask_app_status.js\";\nimport createDreamReport from \"./create-dream-report.js\";\nimport createLinkToken from \"./create-link-token.js\";\nimport createPylonTicket from \"./create-pylon-ticket.js\";\nimport createVaultGrant from \"./create-vault-grant.js\";\nimport createVaultSecret from \"./create-vault-secret.js\";\nimport createWorkspaceResourceGrant from \"./create-workspace-resource-grant.js\";\nimport createWorkspaceResource from \"./create-workspace-resource.js\";\nimport createEmbedSession from \"./create_embed_session.js\";\nimport deleteDestination from \"./delete-destination.js\";\nimport deleteStagedDataset from \"./delete-staged-dataset.js\";\nimport deleteVaultSecret from \"./delete-vault-secret.js\";\nimport deleteWorkspaceResource from \"./delete-workspace-resource.js\";\nimport denyVaultRequest from \"./deny-vault-request.js\";\nimport ensureDreamJob from \"./ensure-dream-job.js\";\nimport getAgentThreadDebug from \"./get-agent-thread-debug.js\";\nimport getAppCreationSettings from \"./get-app-creation-settings.js\";\nimport getDispatchSettings from \"./get-dispatch-settings.js\";\nimport getDreamSettings from \"./get-dream-settings.js\";\nimport getDream from \"./get-dream.js\";\nimport getVaultAccessSettings from \"./get-vault-access-settings.js\";\nimport getWorkspaceInfo from \"./get-workspace-info.js\";\nimport getWorkspaceResourceEffectiveContext from \"./get-workspace-resource-effective-context.js\";\nimport grantVaultSecretsToApp from \"./grant-vault-secrets-to-app.js\";\nimport grantWorkspaceResourcesToApp from \"./grant-workspace-resources-to-app.js\";\nimport listAgentThreadSources from \"./list-agent-thread-sources.js\";\nimport listAvailableWorkspaceTemplates from \"./list-available-workspace-templates.js\";\nimport listConnectedAgents from \"./list-connected-agents.js\";\nimport listCuratedWorkspaceTemplates from \"./list-curated-workspace-templates.js\";\nimport listDestinations from \"./list-destinations.js\";\nimport listDispatchApprovals from \"./list-dispatch-approvals.js\";\nimport listDispatchAudit from \"./list-dispatch-audit.js\";\nimport listDispatchOverview from \"./list-dispatch-overview.js\";\nimport listDispatchUsageMetrics from \"./list-dispatch-usage-metrics.js\";\nimport listDreamCandidates from \"./list-dream-candidates.js\";\nimport listDreams from \"./list-dreams.js\";\nimport listIntegrationsCatalog from \"./list-integrations-catalog.js\";\nimport listLinkedIdentities from \"./list-linked-identities.js\";\nimport listMcpAppAccess from \"./list-mcp-app-access.js\";\nimport listStagedDatasets from \"./list-staged-datasets.js\";\nimport listVaultAudit from \"./list-vault-audit.js\";\nimport listVaultGrants from \"./list-vault-grants.js\";\nimport listVaultRequests from \"./list-vault-requests.js\";\nimport listVaultSecretOptions from \"./list-vault-secret-options.js\";\nimport listVaultSecrets from \"./list-vault-secrets.js\";\nimport listWorkspaceApps from \"./list-workspace-apps.js\";\nimport listWorkspaceResourceGrants from \"./list-workspace-resource-grants.js\";\nimport listWorkspaceResourceOptions from \"./list-workspace-resource-options.js\";\nimport listWorkspaceResourcesForApp from \"./list-workspace-resources-for-app.js\";\nimport listWorkspaceResources from \"./list-workspace-resources.js\";\nimport listApps from \"./list_apps.js\";\nimport navigate from \"./navigate.js\";\nimport openApp from \"./open_app.js\";\nimport previewDreamProposal from \"./preview-dream-proposal.js\";\nimport previewWorkspaceResourceChange from \"./preview-workspace-resource-change.js\";\nimport providerApiCatalog from \"./provider-api-catalog.js\";\nimport providerApiDocs from \"./provider-api-docs.js\";\nimport providerApiRegister from \"./provider-api-register.js\";\nimport providerApiRequest from \"./provider-api-request.js\";\nimport queryStagedDataset from \"./query-staged-dataset.js\";\nimport rejectDispatchChange from \"./reject-dispatch-change.js\";\nimport rejectDreamProposal from \"./reject-dream-proposal.js\";\nimport remixWorkspaceTemplate from \"./remix-workspace-template.js\";\nimport removePendingWorkspaceApp from \"./remove-pending-workspace-app.js\";\nimport requestVaultSecret from \"./request-vault-secret.js\";\nimport restoreStarterWorkspaceResources from \"./restore-starter-workspace-resources.js\";\nimport revokeVaultGrant from \"./revoke-vault-grant.js\";\nimport revokeWorkspaceResourceGrant from \"./revoke-workspace-resource-grant.js\";\nimport scaffoldWorkspaceApp from \"./scaffold-workspace-app.js\";\nimport searchAgentThreads from \"./search-agent-threads.js\";\nimport sendCodeAgentRemoteCommand from \"./send-code-agent-remote-command.js\";\nimport sendPlatformMessage from \"./send-platform-message.js\";\nimport setAppCreationSettings from \"./set-app-creation-settings.js\";\nimport setDispatchApprovalPolicy from \"./set-dispatch-approval-policy.js\";\nimport setDreamSettings from \"./set-dream-settings.js\";\nimport setMcpAppAccess from \"./set-mcp-app-access.js\";\nimport setVaultAccessSettings from \"./set-vault-access-settings.js\";\nimport startWorkspaceAppCreation from \"./start-workspace-app-creation.js\";\nimport syncVaultToApp from \"./sync-vault-to-app.js\";\nimport unarchiveWorkspaceApp from \"./unarchive-workspace-app.js\";\nimport updateVaultSecret from \"./update-vault-secret.js\";\nimport updateWorkspaceAppMetadata from \"./update-workspace-app-metadata.js\";\nimport updateWorkspaceResource from \"./update-workspace-resource.js\";\nimport upsertDestination from \"./upsert-destination.js\";\nimport viewScreen from \"./view-screen.js\";\n\n/**\n * Dispatch's actions registered as a flat name→entry map. Imported by\n * `@agent-native/dispatch/server`'s side-effect block, which calls\n * `registerPackageActions(dispatchActions)` so the framework's action\n * loader picks them up.\n */\nexport const dispatchActions: Record<string, ActionEntry> = {\n \"approve-dispatch-change\": approveDispatchChange,\n \"approve-vault-request\": approveVaultRequest,\n \"archive-workspace-app\": archiveWorkspaceApp,\n ask_app: askApp,\n ask_app_status: askAppStatus,\n \"create-link-token\": createLinkToken,\n \"create-pylon-ticket\": createPylonTicket,\n \"create-vault-grant\": createVaultGrant,\n \"create-vault-secret\": createVaultSecret,\n \"create-workspace-resource-grant\": createWorkspaceResourceGrant,\n \"create-workspace-resource\": createWorkspaceResource,\n \"create-dream-report\": createDreamReport,\n create_embed_session: createEmbedSession,\n \"delete-staged-dataset\": deleteStagedDataset,\n \"delete-destination\": deleteDestination,\n \"delete-vault-secret\": deleteVaultSecret,\n \"delete-workspace-resource\": deleteWorkspaceResource,\n \"deny-vault-request\": denyVaultRequest,\n \"ensure-dream-job\": ensureDreamJob,\n \"get-app-creation-settings\": getAppCreationSettings,\n \"get-agent-thread-debug\": getAgentThreadDebug,\n \"get-dream\": getDream,\n \"get-dream-settings\": getDreamSettings,\n \"get-dispatch-settings\": getDispatchSettings,\n \"get-vault-access-settings\": getVaultAccessSettings,\n \"get-workspace-resource-effective-context\":\n getWorkspaceResourceEffectiveContext,\n \"get-workspace-info\": getWorkspaceInfo,\n \"grant-workspace-resources-to-app\": grantWorkspaceResourcesToApp,\n \"grant-vault-secrets-to-app\": grantVaultSecretsToApp,\n \"list-agent-thread-sources\": listAgentThreadSources,\n \"list-available-workspace-templates\": listAvailableWorkspaceTemplates,\n \"list-curated-workspace-templates\": listCuratedWorkspaceTemplates,\n \"list-connected-agents\": listConnectedAgents,\n \"list-destinations\": listDestinations,\n \"list-dispatch-approvals\": listDispatchApprovals,\n \"list-dispatch-audit\": listDispatchAudit,\n \"list-dispatch-overview\": listDispatchOverview,\n \"list-dispatch-usage-metrics\": listDispatchUsageMetrics,\n \"list-dream-candidates\": listDreamCandidates,\n \"list-dreams\": listDreams,\n \"list-integrations-catalog\": listIntegrationsCatalog,\n \"list-linked-identities\": listLinkedIdentities,\n \"list-mcp-app-access\": listMcpAppAccess,\n list_apps: listApps,\n \"list-staged-datasets\": listStagedDatasets,\n \"list-vault-audit\": listVaultAudit,\n \"list-vault-grants\": listVaultGrants,\n \"list-vault-requests\": listVaultRequests,\n \"list-vault-secret-options\": listVaultSecretOptions,\n \"list-vault-secrets\": listVaultSecrets,\n \"list-workspace-apps\": listWorkspaceApps,\n \"list-workspace-resource-options\": listWorkspaceResourceOptions,\n \"list-workspace-resource-grants\": listWorkspaceResourceGrants,\n \"list-workspace-resources-for-app\": listWorkspaceResourcesForApp,\n \"list-workspace-resources\": listWorkspaceResources,\n navigate: navigate,\n open_app: openApp,\n \"apply-dream-proposal\": applyDreamProposal,\n \"preview-dream-proposal\": previewDreamProposal,\n \"preview-workspace-resource-change\": previewWorkspaceResourceChange,\n \"provider-api-catalog\": providerApiCatalog,\n \"provider-api-docs\": providerApiDocs,\n \"provider-api-register\": providerApiRegister,\n \"provider-api-request\": providerApiRequest,\n \"query-staged-dataset\": queryStagedDataset,\n \"reject-dispatch-change\": rejectDispatchChange,\n \"reject-dream-proposal\": rejectDreamProposal,\n \"remove-pending-workspace-app\": removePendingWorkspaceApp,\n \"remix-workspace-template\": remixWorkspaceTemplate,\n \"request-vault-secret\": requestVaultSecret,\n \"revoke-vault-grant\": revokeVaultGrant,\n \"revoke-workspace-resource-grant\": revokeWorkspaceResourceGrant,\n \"restore-starter-workspace-resources\": restoreStarterWorkspaceResources,\n \"scaffold-workspace-app\": scaffoldWorkspaceApp,\n \"search-agent-threads\": searchAgentThreads,\n \"send-code-agent-remote-command\": sendCodeAgentRemoteCommand,\n \"send-platform-message\": sendPlatformMessage,\n \"set-app-creation-settings\": setAppCreationSettings,\n \"set-dispatch-approval-policy\": setDispatchApprovalPolicy,\n \"set-dream-settings\": setDreamSettings,\n \"set-mcp-app-access\": setMcpAppAccess,\n \"set-vault-access-settings\": setVaultAccessSettings,\n \"start-workspace-app-creation\": startWorkspaceAppCreation,\n \"sync-vault-to-app\": syncVaultToApp,\n \"unarchive-workspace-app\": unarchiveWorkspaceApp,\n \"update-workspace-app-metadata\": updateWorkspaceAppMetadata,\n \"update-vault-secret\": updateVaultSecret,\n \"update-workspace-resource\": updateWorkspaceResource,\n \"upsert-destination\": upsertDestination,\n \"view-screen\": viewScreen,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAEA,OAAO,kBAAkB,MAAM,2BAA2B,CAAC;AAC3D,OAAO,qBAAqB,MAAM,8BAA8B,CAAC;AACjE,OAAO,mBAAmB,MAAM,4BAA4B,CAAC;AAC7D,OAAO,mBAAmB,MAAM,4BAA4B,CAAC;AAC7D,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AACzD,OAAO,eAAe,MAAM,wBAAwB,CAAC;AACrD,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AACzD,OAAO,gBAAgB,MAAM,yBAAyB,CAAC;AACvD,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AACzD,OAAO,4BAA4B,MAAM,sCAAsC,CAAC;AAChF,OAAO,uBAAuB,MAAM,gCAAgC,CAAC;AACrE,OAAO,kBAAkB,MAAM,2BAA2B,CAAC;AAC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sB,EAAE,kBAAkB;IAC1C,mBAAmB,EAAE,eAAe;IACpC,uBAAuB,EAAE,mBAAmB;IAC5C,sBAAsB,EAAE,kBAAkB;IAC1C,sBAAsB,EAAE,kBAAkB;IAC1C,wBAAwB,EAAE,oBAAoB;IAC9C,uBAAuB,EAAE,mBAAmB;IAC5C,8BAA8B,EAAE,yBAAyB;IACzD,oCAAoC,EAAE,+BAA+B;IACrE,0BAA0B,EAAE,sBAAsB;IAClD,sBAAsB,EAAE,kBAAkB;IAC1C,oBAAoB,EAAE,gBAAgB;IACtC,iCAAiC,EAAE,4BAA4B;IAC/D,qCAAqC,EAAE,gCAAgC;IACvE,wBAAwB,EAAE,oBAAoB;IAC9C,sBAAsB,EAAE,kBAAkB;IAC1C,gCAAgC,EAAE,0BAA0B;IAC5D,uBAAuB,EAAE,mBAAmB;IAC5C,2BAA2B,EAAE,sBAAsB;IACnD,8BAA8B,EAAE,yBAAyB;IACzD,oBAAoB,EAAE,gBAAgB;IACtC,oBAAoB,EAAE,eAAe;IACrC,2BAA2B,EAAE,sBAAsB;IACnD,8BAA8B,EAAE,yBAAyB;IACzD,mBAAmB,EAAE,cAAc;IACnC,yBAAyB,EAAE,qBAAqB;IAChD,+BAA+B,EAAE,0BAA0B;IAC3D,qBAAqB,EAAE,iBAAiB;IACxC,2BAA2B,EAAE,uBAAuB;IACpD,oBAAoB,EAAE,iBAAiB;IACvC,aAAa,EAAE,UAAU;CAC1B,CAAC","sourcesContent":["import type { ActionEntry } from \"@agent-native/core/server\";\n\nimport applyDreamProposal from \"./apply-dream-proposal.js\";\nimport approveDispatchChange from \"./approve-dispatch-change.js\";\nimport approveVaultRequest from \"./approve-vault-request.js\";\nimport archiveWorkspaceApp from \"./archive-workspace-app.js\";\nimport askApp from \"./ask_app.js\";\nimport askAppStatus from \"./ask_app_status.js\";\nimport createDreamReport from \"./create-dream-report.js\";\nimport createLinkToken from \"./create-link-token.js\";\nimport createPylonTicket from \"./create-pylon-ticket.js\";\nimport createVaultGrant from \"./create-vault-grant.js\";\nimport createVaultSecret from \"./create-vault-secret.js\";\nimport createWorkspaceResourceGrant from \"./create-workspace-resource-grant.js\";\nimport createWorkspaceResource from \"./create-workspace-resource.js\";\nimport createEmbedSession from \"./create_embed_session.js\";\nimport deleteDestination from \"./delete-destination.js\";\nimport deleteStagedDataset from \"./delete-staged-dataset.js\";\nimport deleteVaultSecret from \"./delete-vault-secret.js\";\nimport deleteWorkspaceResource from \"./delete-workspace-resource.js\";\nimport denyVaultRequest from \"./deny-vault-request.js\";\nimport ensureDreamJob from \"./ensure-dream-job.js\";\nimport getAgentThreadDebug from \"./get-agent-thread-debug.js\";\nimport getAppCreationSettings from \"./get-app-creation-settings.js\";\nimport getDispatchSettings from \"./get-dispatch-settings.js\";\nimport getDreamSettings from \"./get-dream-settings.js\";\nimport getDream from \"./get-dream.js\";\nimport getVaultAccessSettings from \"./get-vault-access-settings.js\";\nimport getWorkspaceInfo from \"./get-workspace-info.js\";\nimport getWorkspaceResourceEffectiveContext from \"./get-workspace-resource-effective-context.js\";\nimport grantVaultSecretsToApp from \"./grant-vault-secrets-to-app.js\";\nimport grantWorkspaceResourcesToApp from \"./grant-workspace-resources-to-app.js\";\nimport listAgentThreadSources from \"./list-agent-thread-sources.js\";\nimport listAvailableWorkspaceTemplates from \"./list-available-workspace-templates.js\";\nimport listConnectedAgents from \"./list-connected-agents.js\";\nimport listCuratedWorkspaceTemplates from \"./list-curated-workspace-templates.js\";\nimport listDestinations from \"./list-destinations.js\";\nimport listDispatchApprovals from \"./list-dispatch-approvals.js\";\nimport listDispatchAudit from \"./list-dispatch-audit.js\";\nimport listDispatchOverview from \"./list-dispatch-overview.js\";\nimport listDispatchUsageMetrics from \"./list-dispatch-usage-metrics.js\";\nimport listDreamCandidates from \"./list-dream-candidates.js\";\nimport listDreams from \"./list-dreams.js\";\nimport listIntegrationsCatalog from \"./list-integrations-catalog.js\";\nimport listLinkedIdentities from \"./list-linked-identities.js\";\nimport listMcpAppAccess from \"./list-mcp-app-access.js\";\nimport listStagedDatasets from \"./list-staged-datasets.js\";\nimport listVaultAudit from \"./list-vault-audit.js\";\nimport listVaultGrants from \"./list-vault-grants.js\";\nimport listVaultRequests from \"./list-vault-requests.js\";\nimport listVaultSecretOptions from \"./list-vault-secret-options.js\";\nimport listVaultSecrets from \"./list-vault-secrets.js\";\nimport listWorkspaceApps from \"./list-workspace-apps.js\";\nimport listWorkspaceResourceGrants from \"./list-workspace-resource-grants.js\";\nimport listWorkspaceResourceOptions from \"./list-workspace-resource-options.js\";\nimport listWorkspaceResourcesForApp from \"./list-workspace-resources-for-app.js\";\nimport listWorkspaceResources from \"./list-workspace-resources.js\";\nimport listApps from \"./list_apps.js\";\nimport navigate from \"./navigate.js\";\nimport openApp from \"./open_app.js\";\nimport previewDreamProposal from \"./preview-dream-proposal.js\";\nimport previewWorkspaceResourceChange from \"./preview-workspace-resource-change.js\";\nimport providerApiCatalog from \"./provider-api-catalog.js\";\nimport providerApiDocs from \"./provider-api-docs.js\";\nimport providerApiRegister from \"./provider-api-register.js\";\nimport providerApiRequest from \"./provider-api-request.js\";\nimport queryStagedDataset from \"./query-staged-dataset.js\";\nimport rejectDispatchChange from \"./reject-dispatch-change.js\";\nimport rejectDreamProposal from \"./reject-dream-proposal.js\";\nimport remixWorkspaceTemplate from \"./remix-workspace-template.js\";\nimport removePendingWorkspaceApp from \"./remove-pending-workspace-app.js\";\nimport requestVaultSecret from \"./request-vault-secret.js\";\nimport resolveIntegrationSourceContext from \"./resolve-integration-source-context.js\";\nimport restoreStarterWorkspaceResources from \"./restore-starter-workspace-resources.js\";\nimport revokeVaultGrant from \"./revoke-vault-grant.js\";\nimport revokeWorkspaceResourceGrant from \"./revoke-workspace-resource-grant.js\";\nimport scaffoldWorkspaceApp from \"./scaffold-workspace-app.js\";\nimport searchAgentThreads from \"./search-agent-threads.js\";\nimport sendCodeAgentRemoteCommand from \"./send-code-agent-remote-command.js\";\nimport sendPlatformMessage from \"./send-platform-message.js\";\nimport setAppCreationSettings from \"./set-app-creation-settings.js\";\nimport setDispatchApprovalPolicy from \"./set-dispatch-approval-policy.js\";\nimport setDreamSettings from \"./set-dream-settings.js\";\nimport setMcpAppAccess from \"./set-mcp-app-access.js\";\nimport setVaultAccessSettings from \"./set-vault-access-settings.js\";\nimport startWorkspaceAppCreation from \"./start-workspace-app-creation.js\";\nimport syncVaultToApp from \"./sync-vault-to-app.js\";\nimport unarchiveWorkspaceApp from \"./unarchive-workspace-app.js\";\nimport updateVaultSecret from \"./update-vault-secret.js\";\nimport updateWorkspaceAppMetadata from \"./update-workspace-app-metadata.js\";\nimport updateWorkspaceResource from \"./update-workspace-resource.js\";\nimport upsertDestination from \"./upsert-destination.js\";\nimport viewScreen from \"./view-screen.js\";\n\n/**\n * Dispatch's actions registered as a flat name→entry map. Imported by\n * `@agent-native/dispatch/server`'s side-effect block, which calls\n * `registerPackageActions(dispatchActions)` so the framework's action\n * loader picks them up.\n */\nexport const dispatchActions: Record<string, ActionEntry> = {\n \"approve-dispatch-change\": approveDispatchChange,\n \"approve-vault-request\": approveVaultRequest,\n \"archive-workspace-app\": archiveWorkspaceApp,\n ask_app: askApp,\n ask_app_status: askAppStatus,\n \"create-link-token\": createLinkToken,\n \"create-pylon-ticket\": createPylonTicket,\n \"create-vault-grant\": createVaultGrant,\n \"create-vault-secret\": createVaultSecret,\n \"create-workspace-resource-grant\": createWorkspaceResourceGrant,\n \"create-workspace-resource\": createWorkspaceResource,\n \"create-dream-report\": createDreamReport,\n create_embed_session: createEmbedSession,\n \"delete-staged-dataset\": deleteStagedDataset,\n \"delete-destination\": deleteDestination,\n \"delete-vault-secret\": deleteVaultSecret,\n \"delete-workspace-resource\": deleteWorkspaceResource,\n \"deny-vault-request\": denyVaultRequest,\n \"ensure-dream-job\": ensureDreamJob,\n \"get-app-creation-settings\": getAppCreationSettings,\n \"get-agent-thread-debug\": getAgentThreadDebug,\n \"get-dream\": getDream,\n \"get-dream-settings\": getDreamSettings,\n \"get-dispatch-settings\": getDispatchSettings,\n \"get-vault-access-settings\": getVaultAccessSettings,\n \"get-workspace-resource-effective-context\":\n getWorkspaceResourceEffectiveContext,\n \"get-workspace-info\": getWorkspaceInfo,\n \"grant-workspace-resources-to-app\": grantWorkspaceResourcesToApp,\n \"grant-vault-secrets-to-app\": grantVaultSecretsToApp,\n \"list-agent-thread-sources\": listAgentThreadSources,\n \"list-available-workspace-templates\": listAvailableWorkspaceTemplates,\n \"list-curated-workspace-templates\": listCuratedWorkspaceTemplates,\n \"list-connected-agents\": listConnectedAgents,\n \"list-destinations\": listDestinations,\n \"list-dispatch-approvals\": listDispatchApprovals,\n \"list-dispatch-audit\": listDispatchAudit,\n \"list-dispatch-overview\": listDispatchOverview,\n \"list-dispatch-usage-metrics\": listDispatchUsageMetrics,\n \"list-dream-candidates\": listDreamCandidates,\n \"list-dreams\": listDreams,\n \"list-integrations-catalog\": listIntegrationsCatalog,\n \"list-linked-identities\": listLinkedIdentities,\n \"list-mcp-app-access\": listMcpAppAccess,\n list_apps: listApps,\n \"list-staged-datasets\": listStagedDatasets,\n \"list-vault-audit\": listVaultAudit,\n \"list-vault-grants\": listVaultGrants,\n \"list-vault-requests\": listVaultRequests,\n \"list-vault-secret-options\": listVaultSecretOptions,\n \"list-vault-secrets\": listVaultSecrets,\n \"list-workspace-apps\": listWorkspaceApps,\n \"list-workspace-resource-options\": listWorkspaceResourceOptions,\n \"list-workspace-resource-grants\": listWorkspaceResourceGrants,\n \"list-workspace-resources-for-app\": listWorkspaceResourcesForApp,\n \"list-workspace-resources\": listWorkspaceResources,\n navigate: navigate,\n open_app: openApp,\n \"apply-dream-proposal\": applyDreamProposal,\n \"preview-dream-proposal\": previewDreamProposal,\n \"preview-workspace-resource-change\": previewWorkspaceResourceChange,\n \"provider-api-catalog\": providerApiCatalog,\n \"provider-api-docs\": providerApiDocs,\n \"provider-api-register\": providerApiRegister,\n \"provider-api-request\": providerApiRequest,\n \"query-staged-dataset\": queryStagedDataset,\n \"reject-dispatch-change\": rejectDispatchChange,\n \"reject-dream-proposal\": rejectDreamProposal,\n \"remove-pending-workspace-app\": removePendingWorkspaceApp,\n \"resolve-integration-source-context\": resolveIntegrationSourceContext,\n \"remix-workspace-template\": remixWorkspaceTemplate,\n \"request-vault-secret\": requestVaultSecret,\n \"revoke-vault-grant\": revokeVaultGrant,\n \"revoke-workspace-resource-grant\": revokeWorkspaceResourceGrant,\n \"restore-starter-workspace-resources\": restoreStarterWorkspaceResources,\n \"scaffold-workspace-app\": scaffoldWorkspaceApp,\n \"search-agent-threads\": searchAgentThreads,\n \"send-code-agent-remote-command\": sendCodeAgentRemoteCommand,\n \"send-platform-message\": sendPlatformMessage,\n \"set-app-creation-settings\": setAppCreationSettings,\n \"set-dispatch-approval-policy\": setDispatchApprovalPolicy,\n \"set-dream-settings\": setDreamSettings,\n \"set-mcp-app-access\": setMcpAppAccess,\n \"set-vault-access-settings\": setVaultAccessSettings,\n \"start-workspace-app-creation\": startWorkspaceAppCreation,\n \"sync-vault-to-app\": syncVaultToApp,\n \"unarchive-workspace-app\": unarchiveWorkspaceApp,\n \"update-workspace-app-metadata\": updateWorkspaceAppMetadata,\n \"update-vault-secret\": updateVaultSecret,\n \"update-workspace-resource\": updateWorkspaceResource,\n \"upsert-destination\": upsertDestination,\n \"view-screen\": viewScreen,\n};\n"]}
|
|
@@ -47,9 +47,9 @@ 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
|
-
deleted?: undefined;
|
|
51
50
|
id?: undefined;
|
|
52
|
-
|
|
51
|
+
provider?: undefined;
|
|
52
|
+
deleted?: undefined;
|
|
53
53
|
providers: {
|
|
54
54
|
id: string;
|
|
55
55
|
label: string;
|
|
@@ -60,46 +60,46 @@ declare const _default: import("node_modules/@agent-native/core/dist").ActionDef
|
|
|
60
60
|
updatedAt: number;
|
|
61
61
|
}[];
|
|
62
62
|
count: number;
|
|
63
|
-
|
|
63
|
+
found?: undefined;
|
|
64
64
|
registered?: undefined;
|
|
65
65
|
label?: undefined;
|
|
66
66
|
message?: undefined;
|
|
67
67
|
} | {
|
|
68
|
-
deleted?: undefined;
|
|
69
|
-
count?: undefined;
|
|
70
68
|
id?: undefined;
|
|
69
|
+
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
74
|
registered?: undefined;
|
|
75
75
|
label?: undefined;
|
|
76
76
|
message?: undefined;
|
|
77
77
|
} | {
|
|
78
|
+
provider?: undefined;
|
|
78
79
|
deleted?: undefined;
|
|
79
|
-
count?: undefined;
|
|
80
80
|
providers?: undefined;
|
|
81
|
-
|
|
81
|
+
count?: undefined;
|
|
82
82
|
found: boolean;
|
|
83
83
|
id: string;
|
|
84
84
|
registered?: undefined;
|
|
85
85
|
label?: undefined;
|
|
86
86
|
message?: undefined;
|
|
87
87
|
} | {
|
|
88
|
+
provider?: undefined;
|
|
89
|
+
providers?: undefined;
|
|
88
90
|
count?: undefined;
|
|
89
91
|
found?: undefined;
|
|
90
|
-
providers?: undefined;
|
|
91
|
-
provider?: undefined;
|
|
92
92
|
deleted: boolean;
|
|
93
93
|
id: string;
|
|
94
94
|
registered?: undefined;
|
|
95
95
|
label?: undefined;
|
|
96
96
|
message?: undefined;
|
|
97
97
|
} | {
|
|
98
|
+
provider?: undefined;
|
|
98
99
|
deleted?: undefined;
|
|
100
|
+
providers?: undefined;
|
|
99
101
|
count?: undefined;
|
|
100
102
|
found?: undefined;
|
|
101
|
-
providers?: undefined;
|
|
102
|
-
provider?: undefined;
|
|
103
103
|
registered: boolean;
|
|
104
104
|
id: string;
|
|
105
105
|
label: string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
declare const _default: import("@agent-native/core").ActionDefinition<{
|
|
2
|
+
integrationTaskId: string;
|
|
3
|
+
}, import("@agent-native/core/integrations").ResolvedIntegrationSourceContext | null>;
|
|
4
|
+
export default _default;
|
|
5
|
+
//# sourceMappingURL=resolve-integration-source-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-integration-source-context.d.ts","sourceRoot":"","sources":["../../src/actions/resolve-integration-source-context.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { resolveIntegrationSourceContext } from "@agent-native/core/integrations";
|
|
3
|
+
import { getRequestOrgId, getRequestUserEmail, } from "@agent-native/core/server";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
export default defineAction({
|
|
6
|
+
description: "Resolve trusted Slack source provenance for an integration task owned by the authenticated caller.",
|
|
7
|
+
schema: z.object({
|
|
8
|
+
integrationTaskId: z
|
|
9
|
+
.string()
|
|
10
|
+
.min(1)
|
|
11
|
+
.max(256)
|
|
12
|
+
.describe("Opaque integration task id"),
|
|
13
|
+
}),
|
|
14
|
+
http: { method: "GET" },
|
|
15
|
+
readOnly: true,
|
|
16
|
+
parallelSafe: true,
|
|
17
|
+
publicAgent: {
|
|
18
|
+
expose: true,
|
|
19
|
+
readOnly: true,
|
|
20
|
+
requiresAuth: true,
|
|
21
|
+
isConsequential: false,
|
|
22
|
+
},
|
|
23
|
+
run: async ({ integrationTaskId }) => {
|
|
24
|
+
const ownerEmail = getRequestUserEmail();
|
|
25
|
+
if (!ownerEmail)
|
|
26
|
+
throw new Error("An authenticated user is required");
|
|
27
|
+
return resolveIntegrationSourceContext(integrationTaskId, ownerEmail, getRequestOrgId() ?? null);
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
//# sourceMappingURL=resolve-integration-source-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-integration-source-context.js","sourceRoot":"","sources":["../../src/actions/resolve-integration-source-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,+BAA+B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,EACL,eAAe,EACf,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAe,YAAY,CAAC;IAC1B,WAAW,EACT,oGAAoG;IACtG,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,iBAAiB,EAAE,CAAC;aACjB,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,GAAG,CAAC;aACR,QAAQ,CAAC,4BAA4B,CAAC;KAC1C,CAAC;IACF,IAAI,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;IACvB,QAAQ,EAAE,IAAI;IACd,YAAY,EAAE,IAAI;IAClB,WAAW,EAAE;QACX,MAAM,EAAE,IAAI;QACZ,QAAQ,EAAE,IAAI;QACd,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE,KAAK;KACvB;IACD,GAAG,EAAE,KAAK,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE;QACnC,MAAM,UAAU,GAAG,mBAAmB,EAAE,CAAC;QACzC,IAAI,CAAC,UAAU;YAAE,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;QACtE,OAAO,+BAA+B,CACpC,iBAAiB,EACjB,UAAU,EACV,eAAe,EAAE,IAAI,IAAI,CAC1B,CAAC;IACJ,CAAC;CACF,CAAC,CAAC","sourcesContent":["import { defineAction } from \"@agent-native/core\";\nimport { resolveIntegrationSourceContext } from \"@agent-native/core/integrations\";\nimport {\n getRequestOrgId,\n getRequestUserEmail,\n} from \"@agent-native/core/server\";\nimport { z } from \"zod\";\n\nexport default defineAction({\n description:\n \"Resolve trusted Slack source provenance for an integration task owned by the authenticated caller.\",\n schema: z.object({\n integrationTaskId: z\n .string()\n .min(1)\n .max(256)\n .describe(\"Opaque integration task id\"),\n }),\n http: { method: \"GET\" },\n readOnly: true,\n parallelSafe: true,\n publicAgent: {\n expose: true,\n readOnly: true,\n requiresAuth: true,\n isConsequential: false,\n },\n run: async ({ integrationTaskId }) => {\n const ownerEmail = getRequestUserEmail();\n if (!ownerEmail) throw new Error(\"An authenticated user is required\");\n return resolveIntegrationSourceContext(\n integrationTaskId,\n ownerEmail,\n getRequestOrgId() ?? null,\n );\n },\n});\n"]}
|
|
@@ -5,6 +5,19 @@ declare const _default: import("@agent-native/core").ActionDefinition<{
|
|
|
5
5
|
content?: string | undefined;
|
|
6
6
|
scope?: "all" | "selected" | undefined;
|
|
7
7
|
}, {
|
|
8
|
+
id: string;
|
|
9
|
+
ownerEmail: string;
|
|
10
|
+
orgId: string | null;
|
|
11
|
+
kind: string;
|
|
12
|
+
name: string;
|
|
13
|
+
description: string | null;
|
|
14
|
+
path: string;
|
|
15
|
+
content: string;
|
|
16
|
+
scope: string;
|
|
17
|
+
createdBy: string;
|
|
18
|
+
createdAt: number;
|
|
19
|
+
updatedAt: number;
|
|
20
|
+
} | {
|
|
8
21
|
id: string;
|
|
9
22
|
ownerEmail: string;
|
|
10
23
|
orgId: string | null;
|
|
@@ -21,19 +34,6 @@ declare const _default: import("@agent-native/core").ActionDefinition<{
|
|
|
21
34
|
reviewedAt: number | null;
|
|
22
35
|
createdAt: number;
|
|
23
36
|
updatedAt: number;
|
|
24
|
-
} | {
|
|
25
|
-
id: string;
|
|
26
|
-
ownerEmail: string;
|
|
27
|
-
orgId: string | null;
|
|
28
|
-
kind: string;
|
|
29
|
-
name: string;
|
|
30
|
-
description: string | null;
|
|
31
|
-
path: string;
|
|
32
|
-
content: string;
|
|
33
|
-
scope: string;
|
|
34
|
-
createdBy: string;
|
|
35
|
-
createdAt: number;
|
|
36
|
-
updatedAt: number;
|
|
37
37
|
}>;
|
|
38
38
|
export default _default;
|
|
39
39
|
//# sourceMappingURL=update-workspace-resource.d.ts.map
|
|
@@ -27,6 +27,7 @@ const INITIAL_TOOL_NAMES = [
|
|
|
27
27
|
export default createAgentChatPlugin({
|
|
28
28
|
appId: "dispatch",
|
|
29
29
|
initialToolNames: INITIAL_TOOL_NAMES,
|
|
30
|
+
connectorCatalog: ["resolve-integration-source-context"],
|
|
30
31
|
// Without this, AGENT_ORG_ID is never set on agent action calls and every
|
|
31
32
|
// row written through the frontend (vault secrets, destinations, workspace
|
|
32
33
|
// resources) lands with org_id=NULL — breaking data isolation across orgs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-chat.js","sourceRoot":"","sources":["../../../src/server/plugins/agent-chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,kBAAkB,GAAG;IACzB,aAAa;IACb,qBAAqB;IACrB,uBAAuB;IACvB,SAAS;IACT,UAAU;IACV,0BAA0B;IAC1B,2BAA2B;IAC3B,2BAA2B;IAC3B,oBAAoB;IACpB,sBAAsB;IACtB,qBAAqB;IACrB,mBAAmB;IACnB,oBAAoB;IACpB,aAAa;IACb,8BAA8B;IAC9B,oCAAoC;IACpC,sBAAsB;IACtB,mBAAmB;IACnB,sBAAsB;IACtB,sBAAsB;IACtB,UAAU;CACX,CAAC;AAEF,eAAe,qBAAqB,CAAC;IACnC,KAAK,EAAE,UAAU;IACjB,gBAAgB,EAAE,kBAAkB;IACpC,0EAA0E;IAC1E,2EAA2E;IAC3E,2EAA2E;IAC3E,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;QAC5B,MAAM,GAAG,GAAG,MAAM,aAAa,CAAC,KAAK,CAAC,CAAC;QACvC,OAAO,GAAG,CAAC,KAAK,CAAC;IACnB,CAAC;IACD,2EAA2E;IAC3E,2EAA2E;IAC3E,wEAAwE;IACxE,OAAO,EAAE,eAAe;IACxB,aAAa,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE;IAC1C,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;4EAwB4D;CAC3E,CAAC,CAAC","sourcesContent":["import { getOrgContext } from \"@agent-native/core/org\";\nimport { createAgentChatPlugin } from \"@agent-native/core/server\";\n\nimport { dispatchActions } from \"../../actions/index.js\";\n\nconst INITIAL_TOOL_NAMES = [\n \"view-screen\",\n \"list-workspace-apps\",\n \"list-connected-agents\",\n \"ask_app\",\n \"open_app\",\n \"list-workspace-resources\",\n \"create-workspace-resource\",\n \"update-workspace-resource\",\n \"list-vault-secrets\",\n \"request-vault-secret\",\n \"create-vault-secret\",\n \"list-destinations\",\n \"upsert-destination\",\n \"list-dreams\",\n \"start-workspace-app-creation\",\n \"list-available-workspace-templates\",\n \"provider-api-catalog\",\n \"provider-api-docs\",\n \"provider-api-request\",\n \"query-staged-dataset\",\n \"navigate\",\n];\n\nexport default createAgentChatPlugin({\n appId: \"dispatch\",\n initialToolNames: INITIAL_TOOL_NAMES,\n // Without this, AGENT_ORG_ID is never set on agent action calls and every\n // row written through the frontend (vault secrets, destinations, workspace\n // resources) lands with org_id=NULL — breaking data isolation across orgs.\n resolveOrgId: async (event) => {\n const ctx = await getOrgContext(event);\n return ctx.orgId;\n },\n // Read actions directly from the package's own action map rather than from\n // a build-time-generated `.generated/actions-registry.ts` (the latter is a\n // template-only construct that the Vite plugin emits next to actions/).\n actions: dispatchActions,\n codeExecution: { production: \"sandboxed\" },\n systemPrompt: `You are the central dispatch for this workspace.\n\nDefault posture:\n- Treat Slack and Telegram as shared entrypoints into the workspace.\n- Heavily delegate domain work to specialized agents through A2A when another app owns the job.\n- Keep durable memory and operating instructions in resources rather than ephemeral chat.\n- Prefer replying in the current external thread unless the user explicitly asks you to send to a saved destination.\n\nUse the standard workspace primitives:\n- Read and update resources like AGENTS.md, LEARNINGS.md, jobs/*.md, agents/*.md, and remote-agents/*.json when appropriate.\n- Use recurring jobs for scheduled behavior.\n- Use custom agent profiles in agents/*.md for local spawned work and remote-agents/*.json for remote A2A apps.\n- You receive a compact available-apps block with sibling workspace app names and descriptions. Use it to pick the right A2A target, and call list-connected-agents or tool-search only when you need fresh details.\n- Hosted/connected A2A neighbors such as Analytics and Content come from the available-apps context or list-connected-agents. list-workspace-apps only inventories apps mounted inside this workspace deployment; never use a missing row there to conclude that a connected agent is unavailable.\n- When answering whether a mounted workspace app exposes an agent card or A2A endpoint, call list-workspace-apps with includeAgentCards=true. If you have not requested that probe, absence of agent-card fields means unchecked, not unavailable.\n- When creating a new workspace app, create a separate app under apps/<app-id> with apps/<app-id>/package.json including a concise generated description, mount it at /<app-id>, use relative /<app-id> links, never hardcode localhost or dev ports, use shadcn/ui with @tabler/icons-react rather than lucide-react, and ensure the React Router client entry preserves APP_BASE_PATH/VITE_APP_BASE_PATH via appBasePath(). There is no separate workspace app registry to edit.\n- If the chat template is used, treat it as scaffolding only: the finished app must be branded as the requested app with its own home screen/navigation/package metadata/manifest, and must not leave visible \"Chat\", \"Starter\", \"Blank app\", or \"New app\" UI behind.\n- Treat first-party apps such as Mail, Calendar, Analytics, Brain, Assets, and Dispatch as existing hosted/connected neighbors available through links and A2A/default connected agents. Do not create wrapper apps, child apps, nested routes, or cloned template copies just to give a new app access to them; build only the genuinely new workflow and delegate cross-app work to those existing apps.\n- Integration grants are not provider capability limits. For ad hoc provider inspection, querying, reporting, or troubleshooting, call provider-api-catalog/provider-api-docs, then provider-api-request against the provider's real HTTP API. Use connectionId for a specific shared grant and accountId for a specific OAuth account. Never expose secret values or silently widen app access while doing this.\n- For broad provider searches, joins, classification, corpus counts, or absence claims, fetch every relevant page or an explicitly bounded cohort, stage/save large responses with stageAs/saveToFile/fetchAllPages, and reduce them with query-staged-dataset or run-code. Report source, filters, row counts, pagination, truncation, failed pages, and uncovered gaps.\n\nWhen a user asks for something like a digest, reminder, routing rule, or saved behavior:\n- First decide whether it should be a resource, a recurring job, a destination, or a delegated task.\n- Keep responses concise and operational.\n- Avoid inventing integrations or destinations that are not configured yet.`,\n});\n"]}
|
|
1
|
+
{"version":3,"file":"agent-chat.js","sourceRoot":"","sources":["../../../src/server/plugins/agent-chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,kBAAkB,GAAG;IACzB,aAAa;IACb,qBAAqB;IACrB,uBAAuB;IACvB,SAAS;IACT,UAAU;IACV,0BAA0B;IAC1B,2BAA2B;IAC3B,2BAA2B;IAC3B,oBAAoB;IACpB,sBAAsB;IACtB,qBAAqB;IACrB,mBAAmB;IACnB,oBAAoB;IACpB,aAAa;IACb,8BAA8B;IAC9B,oCAAoC;IACpC,sBAAsB;IACtB,mBAAmB;IACnB,sBAAsB;IACtB,sBAAsB;IACtB,UAAU;CACX,CAAC;AAEF,eAAe,qBAAqB,CAAC;IACnC,KAAK,EAAE,UAAU;IACjB,gBAAgB,EAAE,kBAAkB;IACpC,gBAAgB,EAAE,CAAC,oCAAoC,CAAC;IACxD,0EAA0E;IAC1E,2EAA2E;IAC3E,2EAA2E;IAC3E,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;QAC5B,MAAM,GAAG,GAAG,MAAM,aAAa,CAAC,KAAK,CAAC,CAAC;QACvC,OAAO,GAAG,CAAC,KAAK,CAAC;IACnB,CAAC;IACD,2EAA2E;IAC3E,2EAA2E;IAC3E,wEAAwE;IACxE,OAAO,EAAE,eAAe;IACxB,aAAa,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE;IAC1C,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;4EAwB4D;CAC3E,CAAC,CAAC","sourcesContent":["import { getOrgContext } from \"@agent-native/core/org\";\nimport { createAgentChatPlugin } from \"@agent-native/core/server\";\n\nimport { dispatchActions } from \"../../actions/index.js\";\n\nconst INITIAL_TOOL_NAMES = [\n \"view-screen\",\n \"list-workspace-apps\",\n \"list-connected-agents\",\n \"ask_app\",\n \"open_app\",\n \"list-workspace-resources\",\n \"create-workspace-resource\",\n \"update-workspace-resource\",\n \"list-vault-secrets\",\n \"request-vault-secret\",\n \"create-vault-secret\",\n \"list-destinations\",\n \"upsert-destination\",\n \"list-dreams\",\n \"start-workspace-app-creation\",\n \"list-available-workspace-templates\",\n \"provider-api-catalog\",\n \"provider-api-docs\",\n \"provider-api-request\",\n \"query-staged-dataset\",\n \"navigate\",\n];\n\nexport default createAgentChatPlugin({\n appId: \"dispatch\",\n initialToolNames: INITIAL_TOOL_NAMES,\n connectorCatalog: [\"resolve-integration-source-context\"],\n // Without this, AGENT_ORG_ID is never set on agent action calls and every\n // row written through the frontend (vault secrets, destinations, workspace\n // resources) lands with org_id=NULL — breaking data isolation across orgs.\n resolveOrgId: async (event) => {\n const ctx = await getOrgContext(event);\n return ctx.orgId;\n },\n // Read actions directly from the package's own action map rather than from\n // a build-time-generated `.generated/actions-registry.ts` (the latter is a\n // template-only construct that the Vite plugin emits next to actions/).\n actions: dispatchActions,\n codeExecution: { production: \"sandboxed\" },\n systemPrompt: `You are the central dispatch for this workspace.\n\nDefault posture:\n- Treat Slack and Telegram as shared entrypoints into the workspace.\n- Heavily delegate domain work to specialized agents through A2A when another app owns the job.\n- Keep durable memory and operating instructions in resources rather than ephemeral chat.\n- Prefer replying in the current external thread unless the user explicitly asks you to send to a saved destination.\n\nUse the standard workspace primitives:\n- Read and update resources like AGENTS.md, LEARNINGS.md, jobs/*.md, agents/*.md, and remote-agents/*.json when appropriate.\n- Use recurring jobs for scheduled behavior.\n- Use custom agent profiles in agents/*.md for local spawned work and remote-agents/*.json for remote A2A apps.\n- You receive a compact available-apps block with sibling workspace app names and descriptions. Use it to pick the right A2A target, and call list-connected-agents or tool-search only when you need fresh details.\n- Hosted/connected A2A neighbors such as Analytics and Content come from the available-apps context or list-connected-agents. list-workspace-apps only inventories apps mounted inside this workspace deployment; never use a missing row there to conclude that a connected agent is unavailable.\n- When answering whether a mounted workspace app exposes an agent card or A2A endpoint, call list-workspace-apps with includeAgentCards=true. If you have not requested that probe, absence of agent-card fields means unchecked, not unavailable.\n- When creating a new workspace app, create a separate app under apps/<app-id> with apps/<app-id>/package.json including a concise generated description, mount it at /<app-id>, use relative /<app-id> links, never hardcode localhost or dev ports, use shadcn/ui with @tabler/icons-react rather than lucide-react, and ensure the React Router client entry preserves APP_BASE_PATH/VITE_APP_BASE_PATH via appBasePath(). There is no separate workspace app registry to edit.\n- If the chat template is used, treat it as scaffolding only: the finished app must be branded as the requested app with its own home screen/navigation/package metadata/manifest, and must not leave visible \"Chat\", \"Starter\", \"Blank app\", or \"New app\" UI behind.\n- Treat first-party apps such as Mail, Calendar, Analytics, Brain, Assets, and Dispatch as existing hosted/connected neighbors available through links and A2A/default connected agents. Do not create wrapper apps, child apps, nested routes, or cloned template copies just to give a new app access to them; build only the genuinely new workflow and delegate cross-app work to those existing apps.\n- Integration grants are not provider capability limits. For ad hoc provider inspection, querying, reporting, or troubleshooting, call provider-api-catalog/provider-api-docs, then provider-api-request against the provider's real HTTP API. Use connectionId for a specific shared grant and accountId for a specific OAuth account. Never expose secret values or silently widen app access while doing this.\n- For broad provider searches, joins, classification, corpus counts, or absence claims, fetch every relevant page or an explicitly bounded cohort, stage/save large responses with stageAs/saveToFile/fetchAllPages, and reduce them with query-staged-dataset or run-code. Report source, filters, row counts, pagination, truncation, failed pages, and uncovered gaps.\n\nWhen a user asks for something like a digest, reminder, routing rule, or saved behavior:\n- First decide whether it should be a resource, a recurring job, a destination, or a delegated task.\n- Keep responses concise and operational.\n- Avoid inventing integrations or destinations that are not configured yet.`,\n});\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/dispatch",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.5",
|
|
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": {
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"tailwind-merge": "^3.5.0",
|
|
87
87
|
"vaul": "^1.1.2",
|
|
88
88
|
"zod": "^4.3.6",
|
|
89
|
-
"@agent-native/toolkit": "0.
|
|
89
|
+
"@agent-native/toolkit": "0.8.0"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
92
|
"@react-router/dev": "^8.1.0",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"typescript-7": "npm:typescript@^7.0.2",
|
|
101
101
|
"vite": "8.1.0",
|
|
102
102
|
"vitest": "^4.1.5",
|
|
103
|
-
"@agent-native/core": "0.
|
|
103
|
+
"@agent-native/core": "0.114.4"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
106
|
"@agent-native/core": ">=0.8.0",
|
package/src/actions/index.ts
CHANGED
|
@@ -70,6 +70,7 @@ import rejectDreamProposal from "./reject-dream-proposal.js";
|
|
|
70
70
|
import remixWorkspaceTemplate from "./remix-workspace-template.js";
|
|
71
71
|
import removePendingWorkspaceApp from "./remove-pending-workspace-app.js";
|
|
72
72
|
import requestVaultSecret from "./request-vault-secret.js";
|
|
73
|
+
import resolveIntegrationSourceContext from "./resolve-integration-source-context.js";
|
|
73
74
|
import restoreStarterWorkspaceResources from "./restore-starter-workspace-resources.js";
|
|
74
75
|
import revokeVaultGrant from "./revoke-vault-grant.js";
|
|
75
76
|
import revokeWorkspaceResourceGrant from "./revoke-workspace-resource-grant.js";
|
|
@@ -167,6 +168,7 @@ export const dispatchActions: Record<string, ActionEntry> = {
|
|
|
167
168
|
"reject-dispatch-change": rejectDispatchChange,
|
|
168
169
|
"reject-dream-proposal": rejectDreamProposal,
|
|
169
170
|
"remove-pending-workspace-app": removePendingWorkspaceApp,
|
|
171
|
+
"resolve-integration-source-context": resolveIntegrationSourceContext,
|
|
170
172
|
"remix-workspace-template": remixWorkspaceTemplate,
|
|
171
173
|
"request-vault-secret": requestVaultSecret,
|
|
172
174
|
"revoke-vault-grant": revokeVaultGrant,
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
2
|
+
|
|
3
|
+
const mocks = vi.hoisted(() => ({
|
|
4
|
+
resolveIntegrationSourceContext: vi.fn(),
|
|
5
|
+
getRequestUserEmail: vi.fn((): string | undefined => "member@example.com"),
|
|
6
|
+
getRequestOrgId: vi.fn((): string | undefined => "org-a"),
|
|
7
|
+
}));
|
|
8
|
+
|
|
9
|
+
vi.mock("@agent-native/core/integrations", () => ({
|
|
10
|
+
resolveIntegrationSourceContext: mocks.resolveIntegrationSourceContext,
|
|
11
|
+
}));
|
|
12
|
+
|
|
13
|
+
vi.mock("@agent-native/core/server", () => ({
|
|
14
|
+
getRequestUserEmail: mocks.getRequestUserEmail,
|
|
15
|
+
getRequestOrgId: mocks.getRequestOrgId,
|
|
16
|
+
}));
|
|
17
|
+
|
|
18
|
+
const action = (await import("./resolve-integration-source-context.js"))
|
|
19
|
+
.default;
|
|
20
|
+
|
|
21
|
+
describe("resolve-integration-source-context", () => {
|
|
22
|
+
beforeEach(() => {
|
|
23
|
+
vi.clearAllMocks();
|
|
24
|
+
mocks.getRequestUserEmail.mockReturnValue("member@example.com");
|
|
25
|
+
mocks.getRequestOrgId.mockReturnValue("org-a");
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it("is an authenticated, read-only, non-consequential public action", () => {
|
|
29
|
+
expect(action.readOnly).toBe(true);
|
|
30
|
+
expect(action.parallelSafe).toBe(true);
|
|
31
|
+
expect(action.publicAgent).toEqual({
|
|
32
|
+
expose: true,
|
|
33
|
+
readOnly: true,
|
|
34
|
+
requiresAuth: true,
|
|
35
|
+
isConsequential: false,
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it("resolves provenance only within the caller's exact owner and org scope", async () => {
|
|
40
|
+
mocks.resolveIntegrationSourceContext.mockResolvedValue({
|
|
41
|
+
platform: "slack",
|
|
42
|
+
sourceUrl: "https://example.slack.com/archives/C1/p1",
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
await expect(action.run({ integrationTaskId: "task-1" })).resolves.toEqual({
|
|
46
|
+
platform: "slack",
|
|
47
|
+
sourceUrl: "https://example.slack.com/archives/C1/p1",
|
|
48
|
+
});
|
|
49
|
+
expect(mocks.resolveIntegrationSourceContext).toHaveBeenCalledWith(
|
|
50
|
+
"task-1",
|
|
51
|
+
"member@example.com",
|
|
52
|
+
"org-a",
|
|
53
|
+
);
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
it("passes a null org exactly when the request has no organization", async () => {
|
|
57
|
+
mocks.getRequestOrgId.mockReturnValue(undefined);
|
|
58
|
+
mocks.resolveIntegrationSourceContext.mockResolvedValue(null);
|
|
59
|
+
|
|
60
|
+
await expect(
|
|
61
|
+
action.run({ integrationTaskId: "task-personal" }),
|
|
62
|
+
).resolves.toBeNull();
|
|
63
|
+
expect(mocks.resolveIntegrationSourceContext).toHaveBeenCalledWith(
|
|
64
|
+
"task-personal",
|
|
65
|
+
"member@example.com",
|
|
66
|
+
null,
|
|
67
|
+
);
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
it("fails closed without an authenticated request identity", async () => {
|
|
71
|
+
mocks.getRequestUserEmail.mockReturnValue(undefined);
|
|
72
|
+
|
|
73
|
+
await expect(action.run({ integrationTaskId: "task-1" })).rejects.toThrow(
|
|
74
|
+
"authenticated user",
|
|
75
|
+
);
|
|
76
|
+
expect(mocks.resolveIntegrationSourceContext).not.toHaveBeenCalled();
|
|
77
|
+
});
|
|
78
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { resolveIntegrationSourceContext } from "@agent-native/core/integrations";
|
|
3
|
+
import {
|
|
4
|
+
getRequestOrgId,
|
|
5
|
+
getRequestUserEmail,
|
|
6
|
+
} from "@agent-native/core/server";
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
|
|
9
|
+
export default defineAction({
|
|
10
|
+
description:
|
|
11
|
+
"Resolve trusted Slack source provenance for an integration task owned by the authenticated caller.",
|
|
12
|
+
schema: z.object({
|
|
13
|
+
integrationTaskId: z
|
|
14
|
+
.string()
|
|
15
|
+
.min(1)
|
|
16
|
+
.max(256)
|
|
17
|
+
.describe("Opaque integration task id"),
|
|
18
|
+
}),
|
|
19
|
+
http: { method: "GET" },
|
|
20
|
+
readOnly: true,
|
|
21
|
+
parallelSafe: true,
|
|
22
|
+
publicAgent: {
|
|
23
|
+
expose: true,
|
|
24
|
+
readOnly: true,
|
|
25
|
+
requiresAuth: true,
|
|
26
|
+
isConsequential: false,
|
|
27
|
+
},
|
|
28
|
+
run: async ({ integrationTaskId }) => {
|
|
29
|
+
const ownerEmail = getRequestUserEmail();
|
|
30
|
+
if (!ownerEmail) throw new Error("An authenticated user is required");
|
|
31
|
+
return resolveIntegrationSourceContext(
|
|
32
|
+
integrationTaskId,
|
|
33
|
+
ownerEmail,
|
|
34
|
+
getRequestOrgId() ?? null,
|
|
35
|
+
);
|
|
36
|
+
},
|
|
37
|
+
});
|
|
@@ -30,6 +30,7 @@ const INITIAL_TOOL_NAMES = [
|
|
|
30
30
|
export default createAgentChatPlugin({
|
|
31
31
|
appId: "dispatch",
|
|
32
32
|
initialToolNames: INITIAL_TOOL_NAMES,
|
|
33
|
+
connectorCatalog: ["resolve-integration-source-context"],
|
|
33
34
|
// Without this, AGENT_ORG_ID is never set on agent action calls and every
|
|
34
35
|
// row written through the frontend (vault secrets, destinations, workspace
|
|
35
36
|
// resources) lands with org_id=NULL — breaking data isolation across orgs.
|