@agent-native/dispatch 0.7.0 → 0.8.0
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/README.md +37 -0
- package/dist/actions/apply-dream-proposal.d.ts +3 -0
- package/dist/actions/apply-dream-proposal.d.ts.map +1 -0
- package/dist/actions/apply-dream-proposal.js +11 -0
- package/dist/actions/apply-dream-proposal.js.map +1 -0
- package/dist/actions/create-dream-report.d.ts +3 -0
- package/dist/actions/create-dream-report.d.ts.map +1 -0
- package/dist/actions/create-dream-report.js +67 -0
- package/dist/actions/create-dream-report.js.map +1 -0
- package/dist/actions/create-workspace-resource.js +3 -3
- package/dist/actions/create-workspace-resource.js.map +1 -1
- package/dist/actions/delete-workspace-resource.js +1 -1
- package/dist/actions/delete-workspace-resource.js.map +1 -1
- package/dist/actions/ensure-dream-job.d.ts +3 -0
- package/dist/actions/ensure-dream-job.d.ts.map +1 -0
- package/dist/actions/ensure-dream-job.js +73 -0
- package/dist/actions/ensure-dream-job.js.map +1 -0
- package/dist/actions/get-dream-settings.d.ts +3 -0
- package/dist/actions/get-dream-settings.d.ts.map +1 -0
- package/dist/actions/get-dream-settings.js +11 -0
- package/dist/actions/get-dream-settings.js.map +1 -0
- package/dist/actions/get-dream.d.ts +3 -0
- package/dist/actions/get-dream.d.ts.map +1 -0
- package/dist/actions/get-dream.js +13 -0
- package/dist/actions/get-dream.js.map +1 -0
- package/dist/actions/get-workspace-resource-effective-context.d.ts +3 -0
- package/dist/actions/get-workspace-resource-effective-context.d.ts.map +1 -0
- package/dist/actions/get-workspace-resource-effective-context.js +27 -0
- package/dist/actions/get-workspace-resource-effective-context.js.map +1 -0
- package/dist/actions/index.d.ts.map +1 -1
- package/dist/actions/index.js +30 -4
- package/dist/actions/index.js.map +1 -1
- package/dist/actions/list-dream-candidates.d.ts +3 -0
- package/dist/actions/list-dream-candidates.d.ts.map +1 -0
- package/dist/actions/list-dream-candidates.js +68 -0
- package/dist/actions/list-dream-candidates.js.map +1 -0
- package/dist/actions/list-dreams.d.ts +3 -0
- package/dist/actions/list-dreams.d.ts.map +1 -0
- package/dist/actions/list-dreams.js +17 -0
- package/dist/actions/list-dreams.js.map +1 -0
- package/dist/actions/list-workspace-resources-for-app.d.ts +3 -0
- package/dist/actions/list-workspace-resources-for-app.d.ts.map +1 -0
- package/dist/actions/list-workspace-resources-for-app.js +12 -0
- package/dist/actions/list-workspace-resources-for-app.js.map +1 -0
- package/dist/actions/list-workspace-resources.js +1 -1
- package/dist/actions/list-workspace-resources.js.map +1 -1
- package/dist/actions/navigate.d.ts +1 -0
- package/dist/actions/navigate.d.ts.map +1 -1
- package/dist/actions/navigate.js +2 -1
- package/dist/actions/navigate.js.map +1 -1
- package/dist/actions/preview-dream-proposal.d.ts +3 -0
- package/dist/actions/preview-dream-proposal.d.ts.map +1 -0
- package/dist/actions/preview-dream-proposal.js +13 -0
- package/dist/actions/preview-dream-proposal.js.map +1 -0
- package/dist/actions/preview-workspace-resource-change.d.ts +3 -0
- package/dist/actions/preview-workspace-resource-change.d.ts.map +1 -0
- package/dist/actions/preview-workspace-resource-change.js +24 -0
- package/dist/actions/preview-workspace-resource-change.js.map +1 -0
- package/dist/actions/reject-dream-proposal.d.ts +3 -0
- package/dist/actions/reject-dream-proposal.d.ts.map +1 -0
- package/dist/actions/reject-dream-proposal.js +12 -0
- package/dist/actions/reject-dream-proposal.js.map +1 -0
- package/dist/actions/restore-starter-workspace-resources.d.ts +3 -0
- package/dist/actions/restore-starter-workspace-resources.d.ts.map +1 -0
- package/dist/actions/restore-starter-workspace-resources.js +14 -0
- package/dist/actions/restore-starter-workspace-resources.js.map +1 -0
- package/dist/actions/send-code-agent-remote-command.d.ts +3 -0
- package/dist/actions/send-code-agent-remote-command.d.ts.map +1 -0
- package/dist/actions/send-code-agent-remote-command.js +53 -0
- package/dist/actions/send-code-agent-remote-command.js.map +1 -0
- package/dist/actions/set-dream-settings.d.ts +3 -0
- package/dist/actions/set-dream-settings.d.ts.map +1 -0
- package/dist/actions/set-dream-settings.js +41 -0
- package/dist/actions/set-dream-settings.js.map +1 -0
- package/dist/actions/update-workspace-resource.js +1 -1
- package/dist/actions/update-workspace-resource.js.map +1 -1
- package/dist/actions/view-screen.d.ts.map +1 -1
- package/dist/actions/view-screen.js +73 -2
- package/dist/actions/view-screen.js.map +1 -1
- package/dist/components/approval-value-block.d.ts +7 -0
- package/dist/components/approval-value-block.d.ts.map +1 -0
- package/dist/components/approval-value-block.js +22 -0
- package/dist/components/approval-value-block.js.map +1 -0
- package/dist/components/create-app-popover.d.ts.map +1 -1
- package/dist/components/create-app-popover.js +3 -2
- package/dist/components/create-app-popover.js.map +1 -1
- package/dist/components/layout/Layout.d.ts.map +1 -1
- package/dist/components/layout/Layout.js +8 -1
- package/dist/components/layout/Layout.js.map +1 -1
- package/dist/components/ui/chart.d.ts +1 -1
- package/dist/components/workspace-app-card.d.ts.map +1 -1
- package/dist/components/workspace-app-card.js +25 -4
- package/dist/components/workspace-app-card.js.map +1 -1
- package/dist/components/workspace-resource-effective-stack.d.ts +11 -0
- package/dist/components/workspace-resource-effective-stack.d.ts.map +1 -0
- package/dist/components/workspace-resource-effective-stack.js +59 -0
- package/dist/components/workspace-resource-effective-stack.js.map +1 -0
- package/dist/components/workspace-resource-impact-preview.d.ts +9 -0
- package/dist/components/workspace-resource-impact-preview.d.ts.map +1 -0
- package/dist/components/workspace-resource-impact-preview.js +39 -0
- package/dist/components/workspace-resource-impact-preview.js.map +1 -0
- package/dist/db/migrations.d.ts.map +1 -1
- package/dist/db/migrations.js +59 -0
- package/dist/db/migrations.js.map +1 -1
- package/dist/db/schema.d.ts +714 -0
- package/dist/db/schema.d.ts.map +1 -1
- package/dist/db/schema.js +44 -2
- package/dist/db/schema.js.map +1 -1
- package/dist/hooks/use-navigation-state.d.ts +3 -0
- package/dist/hooks/use-navigation-state.d.ts.map +1 -1
- package/dist/hooks/use-navigation-state.js +23 -3
- package/dist/hooks/use-navigation-state.js.map +1 -1
- package/dist/lib/utils.d.ts +2 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +5 -1
- package/dist/lib/utils.js.map +1 -1
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +1 -0
- package/dist/routes/index.js.map +1 -1
- package/dist/routes/pages/approval.d.ts.map +1 -1
- package/dist/routes/pages/approval.js +4 -1
- package/dist/routes/pages/approval.js.map +1 -1
- package/dist/routes/pages/approvals.js +1 -1
- package/dist/routes/pages/approvals.js.map +1 -1
- package/dist/routes/pages/dream-settings.d.ts +34 -0
- package/dist/routes/pages/dream-settings.d.ts.map +1 -0
- package/dist/routes/pages/dream-settings.js +68 -0
- package/dist/routes/pages/dream-settings.js.map +1 -0
- package/dist/routes/pages/dreams.d.ts +5 -0
- package/dist/routes/pages/dreams.d.ts.map +1 -0
- package/dist/routes/pages/dreams.js +435 -0
- package/dist/routes/pages/dreams.js.map +1 -0
- package/dist/routes/pages/workspace.d.ts.map +1 -1
- package/dist/routes/pages/workspace.js +187 -35
- package/dist/routes/pages/workspace.js.map +1 -1
- package/dist/server/lib/app-creation-store.d.ts.map +1 -1
- package/dist/server/lib/app-creation-store.js +3 -2
- package/dist/server/lib/app-creation-store.js.map +1 -1
- package/dist/server/lib/dispatch-integrations.d.ts +1 -1
- package/dist/server/lib/dispatch-integrations.d.ts.map +1 -1
- package/dist/server/lib/dispatch-integrations.js +9 -4
- package/dist/server/lib/dispatch-integrations.js.map +1 -1
- package/dist/server/lib/dispatch-remote-commands.d.ts +83 -0
- package/dist/server/lib/dispatch-remote-commands.d.ts.map +1 -0
- package/dist/server/lib/dispatch-remote-commands.js +256 -0
- package/dist/server/lib/dispatch-remote-commands.js.map +1 -0
- package/dist/server/lib/dispatch-store.d.ts +26 -0
- package/dist/server/lib/dispatch-store.d.ts.map +1 -1
- package/dist/server/lib/dispatch-store.js +17 -1
- package/dist/server/lib/dispatch-store.js.map +1 -1
- package/dist/server/lib/dreams-store.d.ts +398 -0
- package/dist/server/lib/dreams-store.d.ts.map +1 -0
- package/dist/server/lib/dreams-store.js +2330 -0
- package/dist/server/lib/dreams-store.js.map +1 -0
- package/dist/server/lib/thread-debug-store.d.ts +2 -2
- package/dist/server/lib/vault-store.d.ts +1 -1
- package/dist/server/lib/workspace-resources-store.d.ts +181 -17
- package/dist/server/lib/workspace-resources-store.d.ts.map +1 -1
- package/dist/server/lib/workspace-resources-store.js +737 -108
- package/dist/server/lib/workspace-resources-store.js.map +1 -1
- package/package.json +4 -2
- package/src/actions/apply-dream-proposal.ts +12 -0
- package/src/actions/create-dream-report.ts +76 -0
- package/src/actions/create-workspace-resource.ts +3 -3
- package/src/actions/delete-workspace-resource.ts +1 -1
- package/src/actions/ensure-dream-job.ts +76 -0
- package/src/actions/get-dream-settings.ts +12 -0
- package/src/actions/get-dream.ts +14 -0
- package/src/actions/get-workspace-resource-effective-context.ts +34 -0
- package/src/actions/index.spec.ts +26 -0
- package/src/actions/index.ts +31 -4
- package/src/actions/list-dream-candidates.ts +77 -0
- package/src/actions/list-dreams.ts +17 -0
- package/src/actions/list-workspace-resources-for-app.ts +13 -0
- package/src/actions/list-workspace-resources.ts +1 -1
- package/src/actions/navigate.ts +2 -1
- package/src/actions/preview-dream-proposal.ts +14 -0
- package/src/actions/preview-workspace-resource-change.ts +25 -0
- package/src/actions/reject-dream-proposal.ts +12 -0
- package/src/actions/restore-starter-workspace-resources.ts +17 -0
- package/src/actions/send-code-agent-remote-command.ts +59 -0
- package/src/actions/set-dream-settings.spec.ts +81 -0
- package/src/actions/set-dream-settings.ts +44 -0
- package/src/actions/update-workspace-resource.ts +1 -1
- package/src/actions/view-screen.ts +90 -2
- package/src/components/approval-value-block.spec.tsx +59 -0
- package/src/components/approval-value-block.tsx +33 -0
- package/src/components/create-app-popover.tsx +3 -2
- package/src/components/layout/Layout.tsx +8 -0
- package/src/components/workspace-app-card.tsx +166 -1
- package/src/components/workspace-resource-effective-stack.spec.tsx +125 -0
- package/src/components/workspace-resource-effective-stack.tsx +141 -0
- package/src/components/workspace-resource-impact-preview.spec.tsx +147 -0
- package/src/components/workspace-resource-impact-preview.tsx +116 -0
- package/src/db/migrations.ts +59 -0
- package/src/db/schema.ts +46 -2
- package/src/hooks/use-navigation-state.ts +24 -5
- package/src/lib/utils.ts +6 -1
- package/src/routes/index.ts +1 -0
- package/src/routes/pages/approval.tsx +14 -1
- package/src/routes/pages/approvals.tsx +1 -1
- package/src/routes/pages/dream-settings.spec.ts +130 -0
- package/src/routes/pages/dream-settings.ts +103 -0
- package/src/routes/pages/dreams.tsx +1828 -0
- package/src/routes/pages/workspace.tsx +577 -97
- package/src/server/lib/app-creation-store.ts +3 -2
- package/src/server/lib/dispatch-integrations.ts +10 -3
- package/src/server/lib/dispatch-remote-commands.spec.ts +167 -0
- package/src/server/lib/dispatch-remote-commands.ts +375 -0
- package/src/server/lib/dispatch-store.ts +37 -1
- package/src/server/lib/dreams-store.spec.ts +1492 -0
- package/src/server/lib/dreams-store.ts +3168 -0
- package/src/server/lib/workspace-resource-approval-lifecycle.spec.ts +236 -0
- package/src/server/lib/workspace-resources-store.spec.ts +1106 -0
- package/src/server/lib/workspace-resources-store.ts +1001 -134
- package/dist/actions/sync-workspace-resources-to-all.d.ts +0 -3
- package/dist/actions/sync-workspace-resources-to-all.d.ts.map +0 -1
- package/dist/actions/sync-workspace-resources-to-all.js +0 -9
- package/dist/actions/sync-workspace-resources-to-all.js.map +0 -1
- package/dist/actions/sync-workspace-resources-to-app.d.ts +0 -3
- package/dist/actions/sync-workspace-resources-to-app.d.ts.map +0 -1
- package/dist/actions/sync-workspace-resources-to-app.js +0 -11
- package/dist/actions/sync-workspace-resources-to-app.js.map +0 -1
- package/src/actions/sync-workspace-resources-to-all.ts +0 -10
- package/src/actions/sync-workspace-resources-to-app.ts +0 -12
package/src/actions/index.ts
CHANGED
|
@@ -8,14 +8,19 @@ import createVaultGrant from "./create-vault-grant.js";
|
|
|
8
8
|
import createVaultSecret from "./create-vault-secret.js";
|
|
9
9
|
import createWorkspaceResourceGrant from "./create-workspace-resource-grant.js";
|
|
10
10
|
import createWorkspaceResource from "./create-workspace-resource.js";
|
|
11
|
+
import createDreamReport from "./create-dream-report.js";
|
|
11
12
|
import deleteDestination from "./delete-destination.js";
|
|
12
13
|
import deleteVaultSecret from "./delete-vault-secret.js";
|
|
13
14
|
import deleteWorkspaceResource from "./delete-workspace-resource.js";
|
|
14
15
|
import denyVaultRequest from "./deny-vault-request.js";
|
|
16
|
+
import ensureDreamJob from "./ensure-dream-job.js";
|
|
15
17
|
import getAppCreationSettings from "./get-app-creation-settings.js";
|
|
16
18
|
import getAgentThreadDebug from "./get-agent-thread-debug.js";
|
|
19
|
+
import getDream from "./get-dream.js";
|
|
20
|
+
import getDreamSettings from "./get-dream-settings.js";
|
|
17
21
|
import getDispatchSettings from "./get-dispatch-settings.js";
|
|
18
22
|
import getVaultAccessSettings from "./get-vault-access-settings.js";
|
|
23
|
+
import getWorkspaceResourceEffectiveContext from "./get-workspace-resource-effective-context.js";
|
|
19
24
|
import getWorkspaceInfo from "./get-workspace-info.js";
|
|
20
25
|
import grantWorkspaceResourcesToApp from "./grant-workspace-resources-to-app.js";
|
|
21
26
|
import grantVaultSecretsToApp from "./grant-vault-secrets-to-app.js";
|
|
@@ -27,6 +32,8 @@ import listDispatchApprovals from "./list-dispatch-approvals.js";
|
|
|
27
32
|
import listDispatchAudit from "./list-dispatch-audit.js";
|
|
28
33
|
import listDispatchOverview from "./list-dispatch-overview.js";
|
|
29
34
|
import listDispatchUsageMetrics from "./list-dispatch-usage-metrics.js";
|
|
35
|
+
import listDreamCandidates from "./list-dream-candidates.js";
|
|
36
|
+
import listDreams from "./list-dreams.js";
|
|
30
37
|
import listIntegrationsCatalog from "./list-integrations-catalog.js";
|
|
31
38
|
import listLinkedIdentities from "./list-linked-identities.js";
|
|
32
39
|
import listVaultAudit from "./list-vault-audit.js";
|
|
@@ -37,23 +44,29 @@ import listVaultSecrets from "./list-vault-secrets.js";
|
|
|
37
44
|
import listWorkspaceApps from "./list-workspace-apps.js";
|
|
38
45
|
import listWorkspaceResourceOptions from "./list-workspace-resource-options.js";
|
|
39
46
|
import listWorkspaceResourceGrants from "./list-workspace-resource-grants.js";
|
|
47
|
+
import listWorkspaceResourcesForApp from "./list-workspace-resources-for-app.js";
|
|
40
48
|
import listWorkspaceResources from "./list-workspace-resources.js";
|
|
41
49
|
import navigate from "./navigate.js";
|
|
50
|
+
import applyDreamProposal from "./apply-dream-proposal.js";
|
|
51
|
+
import previewDreamProposal from "./preview-dream-proposal.js";
|
|
52
|
+
import previewWorkspaceResourceChange from "./preview-workspace-resource-change.js";
|
|
42
53
|
import rejectDispatchChange from "./reject-dispatch-change.js";
|
|
54
|
+
import rejectDreamProposal from "./reject-dream-proposal.js";
|
|
43
55
|
import removePendingWorkspaceApp from "./remove-pending-workspace-app.js";
|
|
44
56
|
import requestVaultSecret from "./request-vault-secret.js";
|
|
45
57
|
import revokeVaultGrant from "./revoke-vault-grant.js";
|
|
46
58
|
import revokeWorkspaceResourceGrant from "./revoke-workspace-resource-grant.js";
|
|
59
|
+
import restoreStarterWorkspaceResources from "./restore-starter-workspace-resources.js";
|
|
47
60
|
import scaffoldWorkspaceApp from "./scaffold-workspace-app.js";
|
|
48
61
|
import searchAgentThreads from "./search-agent-threads.js";
|
|
62
|
+
import sendCodeAgentRemoteCommand from "./send-code-agent-remote-command.js";
|
|
49
63
|
import sendPlatformMessage from "./send-platform-message.js";
|
|
50
64
|
import setAppCreationSettings from "./set-app-creation-settings.js";
|
|
51
65
|
import setDispatchApprovalPolicy from "./set-dispatch-approval-policy.js";
|
|
66
|
+
import setDreamSettings from "./set-dream-settings.js";
|
|
52
67
|
import setVaultAccessSettings from "./set-vault-access-settings.js";
|
|
53
68
|
import startWorkspaceAppCreation from "./start-workspace-app-creation.js";
|
|
54
69
|
import syncVaultToApp from "./sync-vault-to-app.js";
|
|
55
|
-
import syncWorkspaceResourcesToAll from "./sync-workspace-resources-to-all.js";
|
|
56
|
-
import syncWorkspaceResourcesToApp from "./sync-workspace-resources-to-app.js";
|
|
57
70
|
import unarchiveWorkspaceApp from "./unarchive-workspace-app.js";
|
|
58
71
|
import updateWorkspaceAppMetadata from "./update-workspace-app-metadata.js";
|
|
59
72
|
import updateVaultSecret from "./update-vault-secret.js";
|
|
@@ -77,14 +90,20 @@ export const dispatchActions: Record<string, ActionEntry> = {
|
|
|
77
90
|
"create-vault-secret": createVaultSecret,
|
|
78
91
|
"create-workspace-resource-grant": createWorkspaceResourceGrant,
|
|
79
92
|
"create-workspace-resource": createWorkspaceResource,
|
|
93
|
+
"create-dream-report": createDreamReport,
|
|
80
94
|
"delete-destination": deleteDestination,
|
|
81
95
|
"delete-vault-secret": deleteVaultSecret,
|
|
82
96
|
"delete-workspace-resource": deleteWorkspaceResource,
|
|
83
97
|
"deny-vault-request": denyVaultRequest,
|
|
98
|
+
"ensure-dream-job": ensureDreamJob,
|
|
84
99
|
"get-app-creation-settings": getAppCreationSettings,
|
|
85
100
|
"get-agent-thread-debug": getAgentThreadDebug,
|
|
101
|
+
"get-dream": getDream,
|
|
102
|
+
"get-dream-settings": getDreamSettings,
|
|
86
103
|
"get-dispatch-settings": getDispatchSettings,
|
|
87
104
|
"get-vault-access-settings": getVaultAccessSettings,
|
|
105
|
+
"get-workspace-resource-effective-context":
|
|
106
|
+
getWorkspaceResourceEffectiveContext,
|
|
88
107
|
"get-workspace-info": getWorkspaceInfo,
|
|
89
108
|
"grant-workspace-resources-to-app": grantWorkspaceResourcesToApp,
|
|
90
109
|
"grant-vault-secrets-to-app": grantVaultSecretsToApp,
|
|
@@ -96,6 +115,8 @@ export const dispatchActions: Record<string, ActionEntry> = {
|
|
|
96
115
|
"list-dispatch-audit": listDispatchAudit,
|
|
97
116
|
"list-dispatch-overview": listDispatchOverview,
|
|
98
117
|
"list-dispatch-usage-metrics": listDispatchUsageMetrics,
|
|
118
|
+
"list-dream-candidates": listDreamCandidates,
|
|
119
|
+
"list-dreams": listDreams,
|
|
99
120
|
"list-integrations-catalog": listIntegrationsCatalog,
|
|
100
121
|
"list-linked-identities": listLinkedIdentities,
|
|
101
122
|
"list-vault-audit": listVaultAudit,
|
|
@@ -106,23 +127,29 @@ export const dispatchActions: Record<string, ActionEntry> = {
|
|
|
106
127
|
"list-workspace-apps": listWorkspaceApps,
|
|
107
128
|
"list-workspace-resource-options": listWorkspaceResourceOptions,
|
|
108
129
|
"list-workspace-resource-grants": listWorkspaceResourceGrants,
|
|
130
|
+
"list-workspace-resources-for-app": listWorkspaceResourcesForApp,
|
|
109
131
|
"list-workspace-resources": listWorkspaceResources,
|
|
110
132
|
navigate: navigate,
|
|
133
|
+
"apply-dream-proposal": applyDreamProposal,
|
|
134
|
+
"preview-dream-proposal": previewDreamProposal,
|
|
135
|
+
"preview-workspace-resource-change": previewWorkspaceResourceChange,
|
|
111
136
|
"reject-dispatch-change": rejectDispatchChange,
|
|
137
|
+
"reject-dream-proposal": rejectDreamProposal,
|
|
112
138
|
"remove-pending-workspace-app": removePendingWorkspaceApp,
|
|
113
139
|
"request-vault-secret": requestVaultSecret,
|
|
114
140
|
"revoke-vault-grant": revokeVaultGrant,
|
|
115
141
|
"revoke-workspace-resource-grant": revokeWorkspaceResourceGrant,
|
|
142
|
+
"restore-starter-workspace-resources": restoreStarterWorkspaceResources,
|
|
116
143
|
"scaffold-workspace-app": scaffoldWorkspaceApp,
|
|
117
144
|
"search-agent-threads": searchAgentThreads,
|
|
145
|
+
"send-code-agent-remote-command": sendCodeAgentRemoteCommand,
|
|
118
146
|
"send-platform-message": sendPlatformMessage,
|
|
119
147
|
"set-app-creation-settings": setAppCreationSettings,
|
|
120
148
|
"set-dispatch-approval-policy": setDispatchApprovalPolicy,
|
|
149
|
+
"set-dream-settings": setDreamSettings,
|
|
121
150
|
"set-vault-access-settings": setVaultAccessSettings,
|
|
122
151
|
"start-workspace-app-creation": startWorkspaceAppCreation,
|
|
123
152
|
"sync-vault-to-app": syncVaultToApp,
|
|
124
|
-
"sync-workspace-resources-to-all": syncWorkspaceResourcesToAll,
|
|
125
|
-
"sync-workspace-resources-to-app": syncWorkspaceResourcesToApp,
|
|
126
153
|
"unarchive-workspace-app": unarchiveWorkspaceApp,
|
|
127
154
|
"update-workspace-app-metadata": updateWorkspaceAppMetadata,
|
|
128
155
|
"update-vault-secret": updateVaultSecret,
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { listDreamCandidates } from "../server/lib/dreams-store.js";
|
|
4
|
+
|
|
5
|
+
export default defineAction({
|
|
6
|
+
description:
|
|
7
|
+
"List recent agent threads worth reviewing in a Dispatch dream pass, scored from grounded signals like corrections, failures, tool errors, feedback, evals, and satisfaction.",
|
|
8
|
+
schema: z.object({
|
|
9
|
+
sourceId: z
|
|
10
|
+
.string()
|
|
11
|
+
.default("current")
|
|
12
|
+
.describe(
|
|
13
|
+
"Thread debug source id from list-agent-thread-sources. Use 'all' to scan every connected source.",
|
|
14
|
+
),
|
|
15
|
+
sourceIds: z
|
|
16
|
+
.array(z.string().min(1))
|
|
17
|
+
.optional()
|
|
18
|
+
.describe(
|
|
19
|
+
"Optional explicit source ids to scan together. When provided, sourceId is treated as aggregate.",
|
|
20
|
+
),
|
|
21
|
+
allSources: z.coerce
|
|
22
|
+
.boolean()
|
|
23
|
+
.default(false)
|
|
24
|
+
.describe(
|
|
25
|
+
"Scan every connected thread-debug source with partial results.",
|
|
26
|
+
),
|
|
27
|
+
query: z
|
|
28
|
+
.string()
|
|
29
|
+
.optional()
|
|
30
|
+
.describe("Optional search term to focus candidate discovery."),
|
|
31
|
+
ownerEmail: z
|
|
32
|
+
.string()
|
|
33
|
+
.optional()
|
|
34
|
+
.describe(
|
|
35
|
+
"Optional owner email filter. Admins may pass '*' or omit to use their admin-visible scope.",
|
|
36
|
+
),
|
|
37
|
+
limit: z.coerce.number().int().min(1).max(50).default(20),
|
|
38
|
+
sourceTimeoutMs: z.coerce
|
|
39
|
+
.number()
|
|
40
|
+
.int()
|
|
41
|
+
.min(1000)
|
|
42
|
+
.max(60000)
|
|
43
|
+
.default(15000)
|
|
44
|
+
.describe("Per-source timeout in milliseconds for partial scans."),
|
|
45
|
+
sourceConcurrency: z.coerce
|
|
46
|
+
.number()
|
|
47
|
+
.int()
|
|
48
|
+
.min(1)
|
|
49
|
+
.max(8)
|
|
50
|
+
.default(2)
|
|
51
|
+
.describe("How many thread-debug sources to scan at once."),
|
|
52
|
+
sourceStartStaggerMs: z.coerce
|
|
53
|
+
.number()
|
|
54
|
+
.int()
|
|
55
|
+
.min(0)
|
|
56
|
+
.max(5000)
|
|
57
|
+
.default(250)
|
|
58
|
+
.describe("Delay between source starts within a scan batch."),
|
|
59
|
+
threadConcurrency: z.coerce
|
|
60
|
+
.number()
|
|
61
|
+
.int()
|
|
62
|
+
.min(1)
|
|
63
|
+
.max(10)
|
|
64
|
+
.default(3)
|
|
65
|
+
.describe("How many threads to inspect at once within each source."),
|
|
66
|
+
threadTimeoutMs: z.coerce
|
|
67
|
+
.number()
|
|
68
|
+
.int()
|
|
69
|
+
.min(1000)
|
|
70
|
+
.max(30000)
|
|
71
|
+
.default(8000)
|
|
72
|
+
.describe("Per-thread debug timeout in milliseconds."),
|
|
73
|
+
}),
|
|
74
|
+
http: { method: "GET" },
|
|
75
|
+
readOnly: true,
|
|
76
|
+
run: async (input) => listDreamCandidates(input),
|
|
77
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { listDreams } from "../server/lib/dreams-store.js";
|
|
4
|
+
|
|
5
|
+
export default defineAction({
|
|
6
|
+
description: "List Dispatch dream reports with proposal status counts.",
|
|
7
|
+
schema: z.object({
|
|
8
|
+
limit: z.coerce.number().int().min(1).max(100).default(25),
|
|
9
|
+
status: z
|
|
10
|
+
.enum(["running", "completed", "failed", "all"])
|
|
11
|
+
.default("all")
|
|
12
|
+
.describe("Optional dream status filter."),
|
|
13
|
+
}),
|
|
14
|
+
http: { method: "GET" },
|
|
15
|
+
readOnly: true,
|
|
16
|
+
run: async (input) => listDreams(input),
|
|
17
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { listWorkspaceResourcesForApp } from "../server/lib/workspace-resources-store.js";
|
|
4
|
+
|
|
5
|
+
export default defineAction({
|
|
6
|
+
description:
|
|
7
|
+
"List the inherited workspace and explicitly granted resources an app receives, including auto-loaded instructions.",
|
|
8
|
+
schema: z.object({
|
|
9
|
+
appId: z.string().describe("Workspace app ID"),
|
|
10
|
+
}),
|
|
11
|
+
http: { method: "GET" },
|
|
12
|
+
run: async (args) => listWorkspaceResourcesForApp(args.appId),
|
|
13
|
+
});
|
|
@@ -4,7 +4,7 @@ import { listWorkspaceResources } from "../server/lib/workspace-resources-store.
|
|
|
4
4
|
|
|
5
5
|
export default defineAction({
|
|
6
6
|
description:
|
|
7
|
-
"List all workspace-wide resources (skills, instructions,
|
|
7
|
+
"List all workspace-wide resources (skills, instructions, agent profiles, and reference resources) that apps inherit at runtime.",
|
|
8
8
|
schema: z.object({
|
|
9
9
|
kind: z
|
|
10
10
|
.enum(["skill", "instruction", "agent", "knowledge"])
|
package/src/actions/navigate.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Usage:
|
|
7
7
|
* pnpm action navigate --view=overview
|
|
8
|
+
* pnpm action navigate --view=dreams
|
|
8
9
|
* pnpm action navigate --view=<custom-dispatch-extension-id>
|
|
9
10
|
* pnpm action navigate --path=/some/route
|
|
10
11
|
*
|
|
@@ -25,7 +26,7 @@ export default defineAction({
|
|
|
25
26
|
.string()
|
|
26
27
|
.optional()
|
|
27
28
|
.describe(
|
|
28
|
-
"Named dispatch view to navigate to. Built-in views include overview, apps, metrics, new-app, vault, integrations, messaging, workspace, agents, destinations, identities, approvals, audit, thread-debug, and team. Generated Dispatch extension tabs can also use their nav item id.",
|
|
29
|
+
"Named dispatch view to navigate to. Built-in views include overview, apps, metrics, new-app, vault, integrations, messaging, workspace, agents, destinations, identities, approvals, audit, thread-debug, dreams, and team. Generated Dispatch extension tabs can also use their nav item id.",
|
|
29
30
|
),
|
|
30
31
|
path: z.string().optional().describe("URL path to navigate to"),
|
|
31
32
|
}),
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { previewDreamProposal } from "../server/lib/dreams-store.js";
|
|
4
|
+
|
|
5
|
+
export default defineAction({
|
|
6
|
+
description:
|
|
7
|
+
"Preview one Dispatch dream proposal before applying it, including target, current content, proposed content, and approval behavior.",
|
|
8
|
+
schema: z.object({
|
|
9
|
+
id: z.string().min(1).describe("Dream proposal id."),
|
|
10
|
+
}),
|
|
11
|
+
http: { method: "GET" },
|
|
12
|
+
readOnly: true,
|
|
13
|
+
run: async ({ id }) => previewDreamProposal(id),
|
|
14
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { previewWorkspaceResourceChange } from "../server/lib/workspace-resources-store.js";
|
|
4
|
+
|
|
5
|
+
export default defineAction({
|
|
6
|
+
description:
|
|
7
|
+
"Preview the impact of creating, updating, or deleting a workspace resource, including All-app reach, overrides, and whether Dispatch approval will be requested.",
|
|
8
|
+
schema: z.object({
|
|
9
|
+
operation: z
|
|
10
|
+
.enum(["create", "update", "delete"])
|
|
11
|
+
.optional()
|
|
12
|
+
.describe("Change operation to preview."),
|
|
13
|
+
resourceId: z.string().optional().describe("Existing resource id."),
|
|
14
|
+
path: z
|
|
15
|
+
.string()
|
|
16
|
+
.optional()
|
|
17
|
+
.describe("Resource path, such as context/brand.md."),
|
|
18
|
+
scope: z
|
|
19
|
+
.enum(["all", "selected"])
|
|
20
|
+
.optional()
|
|
21
|
+
.describe("Resulting resource scope after the change."),
|
|
22
|
+
}),
|
|
23
|
+
http: { method: "GET" },
|
|
24
|
+
run: async (args) => previewWorkspaceResourceChange(args),
|
|
25
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { rejectDreamProposal } from "../server/lib/dreams-store.js";
|
|
4
|
+
|
|
5
|
+
export default defineAction({
|
|
6
|
+
description: "Reject one pending Dispatch dream proposal.",
|
|
7
|
+
schema: z.object({
|
|
8
|
+
id: z.string().min(1).describe("Dream proposal id."),
|
|
9
|
+
reason: z.string().optional().describe("Optional rejection reason."),
|
|
10
|
+
}),
|
|
11
|
+
run: async ({ id, reason }) => rejectDreamProposal(id, reason),
|
|
12
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { restoreStarterWorkspaceResources } from "../server/lib/workspace-resources-store.js";
|
|
4
|
+
|
|
5
|
+
export default defineAction({
|
|
6
|
+
description:
|
|
7
|
+
"Restore missing starter global workspace resources such as company, brand, messaging, guardrails, and company voice. Existing resources are left unchanged.",
|
|
8
|
+
schema: z.object({
|
|
9
|
+
paths: z
|
|
10
|
+
.array(z.string())
|
|
11
|
+
.optional()
|
|
12
|
+
.describe(
|
|
13
|
+
"Optional starter resource paths to restore. Omit to restore every missing starter resource.",
|
|
14
|
+
),
|
|
15
|
+
}),
|
|
16
|
+
run: async (args) => restoreStarterWorkspaceResources(args),
|
|
17
|
+
});
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { getRequestUserEmail } from "@agent-native/core/server";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import {
|
|
5
|
+
enqueueRemoteCodeCommand,
|
|
6
|
+
type RemoteCodeCommandEnvelope,
|
|
7
|
+
} from "../server/lib/dispatch-remote-commands.js";
|
|
8
|
+
|
|
9
|
+
const commandSchema = z.discriminatedUnion("type", [
|
|
10
|
+
z.object({ type: z.literal("create"), prompt: z.string().min(1) }),
|
|
11
|
+
z.object({ type: z.literal("list") }),
|
|
12
|
+
z.object({ type: z.literal("status"), runRef: z.string().optional() }),
|
|
13
|
+
z.object({
|
|
14
|
+
type: z.literal("continue"),
|
|
15
|
+
runRef: z.string().min(1),
|
|
16
|
+
text: z.string().min(1),
|
|
17
|
+
}),
|
|
18
|
+
z.object({ type: z.literal("approve"), approvalId: z.string().min(1) }),
|
|
19
|
+
z.object({ type: z.literal("deny"), approvalId: z.string().min(1) }),
|
|
20
|
+
z.object({ type: z.literal("stop"), runRef: z.string().min(1) }),
|
|
21
|
+
]);
|
|
22
|
+
|
|
23
|
+
export default defineAction({
|
|
24
|
+
description:
|
|
25
|
+
"Route a command to the remote Agent-Native Code host through the integration relay.",
|
|
26
|
+
schema: z.object({
|
|
27
|
+
command: commandSchema,
|
|
28
|
+
source: z
|
|
29
|
+
.object({
|
|
30
|
+
platform: z.string().default("dispatch"),
|
|
31
|
+
externalThreadId: z.string().default("dispatch"),
|
|
32
|
+
senderId: z.string().optional(),
|
|
33
|
+
senderName: z.string().optional(),
|
|
34
|
+
messageId: z.string().optional(),
|
|
35
|
+
timestamp: z.number().optional(),
|
|
36
|
+
})
|
|
37
|
+
.optional(),
|
|
38
|
+
}),
|
|
39
|
+
run: async ({ command, source }) => {
|
|
40
|
+
const ownerEmail = getRequestUserEmail();
|
|
41
|
+
if (!ownerEmail) throw new Error("no authenticated user");
|
|
42
|
+
|
|
43
|
+
const envelope: RemoteCodeCommandEnvelope = {
|
|
44
|
+
kind: "code-agent",
|
|
45
|
+
ownerEmail,
|
|
46
|
+
command,
|
|
47
|
+
source: {
|
|
48
|
+
platform: source?.platform || "dispatch",
|
|
49
|
+
externalThreadId: source?.externalThreadId || "dispatch",
|
|
50
|
+
senderId: source?.senderId,
|
|
51
|
+
senderName: source?.senderName,
|
|
52
|
+
messageId: source?.messageId,
|
|
53
|
+
timestamp: source?.timestamp ?? Date.now(),
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
return enqueueRemoteCodeCommand(envelope);
|
|
58
|
+
},
|
|
59
|
+
});
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
2
|
+
|
|
3
|
+
const mocks = vi.hoisted(() => ({
|
|
4
|
+
setDreamSettings: vi.fn(),
|
|
5
|
+
}));
|
|
6
|
+
|
|
7
|
+
vi.mock("../server/lib/dreams-store.js", () => ({
|
|
8
|
+
setDreamSettings: mocks.setDreamSettings,
|
|
9
|
+
}));
|
|
10
|
+
|
|
11
|
+
import action from "./set-dream-settings.js";
|
|
12
|
+
|
|
13
|
+
describe("set-dream-settings action", () => {
|
|
14
|
+
beforeEach(() => {
|
|
15
|
+
vi.clearAllMocks();
|
|
16
|
+
mocks.setDreamSettings.mockImplementation(async (input) => ({
|
|
17
|
+
enabled: false,
|
|
18
|
+
schedule: "0 9 * * 1",
|
|
19
|
+
sourceId: "all",
|
|
20
|
+
sourceIds: [],
|
|
21
|
+
allSources: true,
|
|
22
|
+
query: null,
|
|
23
|
+
limit: 8,
|
|
24
|
+
sourceTimeoutMs: 30000,
|
|
25
|
+
sourceConcurrency: 2,
|
|
26
|
+
sourceStartStaggerMs: 250,
|
|
27
|
+
threadConcurrency: 3,
|
|
28
|
+
threadTimeoutMs: 8000,
|
|
29
|
+
minCandidateCount: 1,
|
|
30
|
+
...input,
|
|
31
|
+
}));
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it("coerces numeric fields and preserves explicit clears", async () => {
|
|
35
|
+
await action.run({
|
|
36
|
+
enabled: true,
|
|
37
|
+
schedule: "0 8 * * 2",
|
|
38
|
+
sourceId: "current",
|
|
39
|
+
sourceIds: [],
|
|
40
|
+
allSources: false,
|
|
41
|
+
query: "",
|
|
42
|
+
limit: "50",
|
|
43
|
+
sourceTimeoutMs: "60000",
|
|
44
|
+
sourceConcurrency: "8",
|
|
45
|
+
sourceStartStaggerMs: "5000",
|
|
46
|
+
threadConcurrency: "10",
|
|
47
|
+
threadTimeoutMs: "30000",
|
|
48
|
+
minCandidateCount: "0",
|
|
49
|
+
} as any);
|
|
50
|
+
|
|
51
|
+
expect(mocks.setDreamSettings).toHaveBeenCalledWith({
|
|
52
|
+
enabled: true,
|
|
53
|
+
schedule: "0 8 * * 2",
|
|
54
|
+
sourceId: "current",
|
|
55
|
+
sourceIds: [],
|
|
56
|
+
allSources: false,
|
|
57
|
+
query: "",
|
|
58
|
+
limit: 50,
|
|
59
|
+
sourceTimeoutMs: 60000,
|
|
60
|
+
sourceConcurrency: 8,
|
|
61
|
+
sourceStartStaggerMs: 5000,
|
|
62
|
+
threadConcurrency: 10,
|
|
63
|
+
threadTimeoutMs: 30000,
|
|
64
|
+
minCandidateCount: 0,
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it("rejects out-of-range numeric settings before writing", async () => {
|
|
69
|
+
await expect(action.run({ limit: "0" } as any)).rejects.toThrow(
|
|
70
|
+
/Invalid action parameters/,
|
|
71
|
+
);
|
|
72
|
+
await expect(
|
|
73
|
+
action.run({ sourceTimeoutMs: "60001" } as any),
|
|
74
|
+
).rejects.toThrow(/Invalid action parameters/);
|
|
75
|
+
await expect(
|
|
76
|
+
action.run({ threadTimeoutMs: "30001" } as any),
|
|
77
|
+
).rejects.toThrow(/Invalid action parameters/);
|
|
78
|
+
|
|
79
|
+
expect(mocks.setDreamSettings).not.toHaveBeenCalled();
|
|
80
|
+
});
|
|
81
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { setDreamSettings } from "../server/lib/dreams-store.js";
|
|
4
|
+
|
|
5
|
+
export default defineAction({
|
|
6
|
+
description:
|
|
7
|
+
"Update recurring Dispatch dream settings without immediately running or applying a dream pass.",
|
|
8
|
+
schema: z.object({
|
|
9
|
+
enabled: z
|
|
10
|
+
.boolean()
|
|
11
|
+
.optional()
|
|
12
|
+
.describe("Whether recurring dreams are on."),
|
|
13
|
+
schedule: z
|
|
14
|
+
.string()
|
|
15
|
+
.optional()
|
|
16
|
+
.describe('Five-field cron schedule, for example "0 9 * * 1".'),
|
|
17
|
+
sourceId: z
|
|
18
|
+
.string()
|
|
19
|
+
.optional()
|
|
20
|
+
.describe(
|
|
21
|
+
"Thread debug source id. Use 'all' for every connected source.",
|
|
22
|
+
),
|
|
23
|
+
sourceIds: z
|
|
24
|
+
.array(z.string().min(1))
|
|
25
|
+
.optional()
|
|
26
|
+
.describe("Optional explicit source ids to scan together."),
|
|
27
|
+
allSources: z.coerce
|
|
28
|
+
.boolean()
|
|
29
|
+
.optional()
|
|
30
|
+
.describe("Scan every connected thread-debug source."),
|
|
31
|
+
query: z
|
|
32
|
+
.string()
|
|
33
|
+
.optional()
|
|
34
|
+
.describe("Optional search term for recurring dream passes."),
|
|
35
|
+
limit: z.coerce.number().int().min(1).max(50).optional(),
|
|
36
|
+
sourceTimeoutMs: z.coerce.number().int().min(1000).max(60000).optional(),
|
|
37
|
+
sourceConcurrency: z.coerce.number().int().min(1).max(8).optional(),
|
|
38
|
+
sourceStartStaggerMs: z.coerce.number().int().min(0).max(5000).optional(),
|
|
39
|
+
threadConcurrency: z.coerce.number().int().min(1).max(10).optional(),
|
|
40
|
+
threadTimeoutMs: z.coerce.number().int().min(1000).max(30000).optional(),
|
|
41
|
+
minCandidateCount: z.coerce.number().int().min(0).max(50).optional(),
|
|
42
|
+
}),
|
|
43
|
+
run: async (input) => setDreamSettings(input),
|
|
44
|
+
});
|
|
@@ -4,7 +4,7 @@ import { updateWorkspaceResource } from "../server/lib/workspace-resources-store
|
|
|
4
4
|
|
|
5
5
|
export default defineAction({
|
|
6
6
|
description:
|
|
7
|
-
"Update a workspace resource's name, description, content, or scope.",
|
|
7
|
+
"Update a workspace resource's name, description, content, or scope. When Dispatch approval policy is enabled, changes that affect All-app resources queue an approval request before taking effect.",
|
|
8
8
|
schema: z.object({
|
|
9
9
|
id: z.string().describe("Resource ID"),
|
|
10
10
|
name: z.string().optional().describe("New name"),
|
|
@@ -20,13 +20,36 @@ import {
|
|
|
20
20
|
} from "../server/lib/vault-store.js";
|
|
21
21
|
import { listWorkspaceApps } from "../server/lib/app-creation-store.js";
|
|
22
22
|
import { listDispatchUsageMetrics } from "../server/lib/usage-metrics-store.js";
|
|
23
|
-
import {
|
|
23
|
+
import {
|
|
24
|
+
listWorkspaceResourceOptions,
|
|
25
|
+
listWorkspaceResourcesForApp,
|
|
26
|
+
} from "../server/lib/workspace-resources-store.js";
|
|
24
27
|
import {
|
|
25
28
|
getAgentThreadDebug,
|
|
26
29
|
listThreadDebugSources,
|
|
27
30
|
searchAgentThreads,
|
|
28
31
|
} from "../server/lib/thread-debug-store.js";
|
|
29
32
|
|
|
33
|
+
async function runLocalDispatchAction(
|
|
34
|
+
name: string,
|
|
35
|
+
args: Record<string, unknown>,
|
|
36
|
+
) {
|
|
37
|
+
const modulePath = `./${name}.js`;
|
|
38
|
+
const module = (await import(/* @vite-ignore */ modulePath)) as {
|
|
39
|
+
default?: {
|
|
40
|
+
run: (args: Record<string, unknown>) => unknown | Promise<unknown>;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
if (!module.default) throw new Error(`Dispatch action not found: ${name}`);
|
|
44
|
+
return module.default.run(stripUndefined(args));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function stripUndefined(args: Record<string, unknown>) {
|
|
48
|
+
return Object.fromEntries(
|
|
49
|
+
Object.entries(args).filter(([, value]) => value !== undefined),
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
30
53
|
export default defineAction({
|
|
31
54
|
description:
|
|
32
55
|
"See what the user is currently looking at in the dispatch UI, including navigation state and a compact operational summary.",
|
|
@@ -57,9 +80,32 @@ export default defineAction({
|
|
|
57
80
|
navigation?.view === "apps" ||
|
|
58
81
|
navigation?.view === "new-app"
|
|
59
82
|
) {
|
|
60
|
-
|
|
83
|
+
const workspaceApps = await listWorkspaceApps({
|
|
61
84
|
includeAgentCards: true,
|
|
62
85
|
});
|
|
86
|
+
screen.workspaceApps = workspaceApps;
|
|
87
|
+
if (navigation?.view === "apps") {
|
|
88
|
+
screen.workspaceAppResources = await Promise.all(
|
|
89
|
+
workspaceApps
|
|
90
|
+
.filter((app) => !app.isDispatch)
|
|
91
|
+
.slice(0, 12)
|
|
92
|
+
.map(async (app) => {
|
|
93
|
+
const result = await listWorkspaceResourcesForApp(app.id);
|
|
94
|
+
return {
|
|
95
|
+
appId: app.id,
|
|
96
|
+
appName: app.name,
|
|
97
|
+
counts: result.counts,
|
|
98
|
+
resources: result.resources.map((resource) => ({
|
|
99
|
+
name: resource.name,
|
|
100
|
+
path: resource.path,
|
|
101
|
+
kind: resource.kind,
|
|
102
|
+
source: resource.source,
|
|
103
|
+
autoLoaded: resource.autoLoaded,
|
|
104
|
+
})),
|
|
105
|
+
};
|
|
106
|
+
}),
|
|
107
|
+
);
|
|
108
|
+
}
|
|
63
109
|
}
|
|
64
110
|
if (navigation?.view === "metrics") {
|
|
65
111
|
try {
|
|
@@ -99,6 +145,16 @@ export default defineAction({
|
|
|
99
145
|
}
|
|
100
146
|
if (navigation?.view === "workspace" || navigation?.view === "new-app") {
|
|
101
147
|
screen.workspaceResources = await listWorkspaceResourceOptions();
|
|
148
|
+
screen.workspaceResourceEffectiveContext = {
|
|
149
|
+
action: "get-workspace-resource-effective-context",
|
|
150
|
+
description:
|
|
151
|
+
"Preview workspace -> organization/app -> personal precedence for a resource path and optional app/user. All-app resources are inherited at runtime; selected resources are app-specific exceptions.",
|
|
152
|
+
};
|
|
153
|
+
screen.workspaceResourceImpactPreview = {
|
|
154
|
+
action: "preview-workspace-resource-change",
|
|
155
|
+
description:
|
|
156
|
+
"Preview All-app reach, overrides, and approval behavior before creating, updating, or deleting a workspace resource.",
|
|
157
|
+
};
|
|
102
158
|
}
|
|
103
159
|
if (navigation?.view === "thread-debug") {
|
|
104
160
|
try {
|
|
@@ -136,6 +192,38 @@ export default defineAction({
|
|
|
136
192
|
error instanceof Error ? error.message : String(error);
|
|
137
193
|
}
|
|
138
194
|
}
|
|
195
|
+
if (navigation?.view === "dreams") {
|
|
196
|
+
try {
|
|
197
|
+
const nav = navigation as Record<string, any>;
|
|
198
|
+
const [sources, candidates, dreams, settings] = await Promise.all([
|
|
199
|
+
listThreadDebugSources(),
|
|
200
|
+
runLocalDispatchAction("list-dream-candidates", {
|
|
201
|
+
sourceId: nav.sourceId,
|
|
202
|
+
ownerEmail: nav.ownerEmail,
|
|
203
|
+
limit: 10,
|
|
204
|
+
}),
|
|
205
|
+
runLocalDispatchAction("list-dreams", {
|
|
206
|
+
status: nav.status,
|
|
207
|
+
limit: 10,
|
|
208
|
+
}),
|
|
209
|
+
runLocalDispatchAction("get-dream-settings", {}),
|
|
210
|
+
]);
|
|
211
|
+
screen.dreamSources = sources;
|
|
212
|
+
screen.dreamCandidates = candidates;
|
|
213
|
+
screen.latestDreams = dreams;
|
|
214
|
+
screen.dreamSettings = settings;
|
|
215
|
+
|
|
216
|
+
const dreamId = nav.dreamId ?? nav.id;
|
|
217
|
+
if (dreamId) {
|
|
218
|
+
screen.dreamDetail = await runLocalDispatchAction("get-dream", {
|
|
219
|
+
id: dreamId,
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
} catch (error) {
|
|
223
|
+
screen.dreamsError =
|
|
224
|
+
error instanceof Error ? error.message : String(error);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
139
227
|
|
|
140
228
|
if (Object.keys(screen).length === 0) {
|
|
141
229
|
return "No application state found. Is the app running?";
|