@agent-native/dispatch 0.8.17 → 0.8.19
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/create-workspace-resource-grant.js +1 -1
- package/dist/actions/create-workspace-resource-grant.js.map +1 -1
- package/dist/actions/create-workspace-resource.js +5 -7
- package/dist/actions/create-workspace-resource.js.map +1 -1
- package/dist/actions/grant-workspace-resources-to-app.js +1 -1
- package/dist/actions/grant-workspace-resources-to-app.js.map +1 -1
- package/dist/actions/list-workspace-resource-grants.js +1 -1
- package/dist/actions/list-workspace-resource-grants.js.map +1 -1
- package/dist/actions/list-workspace-resource-options.js +1 -1
- package/dist/actions/list-workspace-resource-options.js.map +1 -1
- package/dist/actions/list-workspace-resources.js +2 -2
- package/dist/actions/list-workspace-resources.js.map +1 -1
- package/dist/actions/navigate.js +1 -1
- package/dist/actions/navigate.js.map +1 -1
- package/dist/actions/view-screen.d.ts.map +1 -1
- package/dist/actions/view-screen.js +6 -0
- package/dist/actions/view-screen.js.map +1 -1
- 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 +91 -14
- package/dist/components/layout/Layout.js.map +1 -1
- package/dist/db/schema.js +2 -2
- package/dist/db/schema.js.map +1 -1
- package/dist/hooks/use-navigation-state.js +5 -0
- package/dist/hooks/use-navigation-state.js.map +1 -1
- package/dist/lib/overview-chat.d.ts +3 -1
- package/dist/lib/overview-chat.d.ts.map +1 -1
- package/dist/lib/overview-chat.js +2 -1
- package/dist/lib/overview-chat.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/_index.js +1 -1
- package/dist/routes/pages/_index.js.map +1 -1
- package/dist/routes/pages/chat.d.ts +5 -0
- package/dist/routes/pages/chat.d.ts.map +1 -0
- package/dist/routes/pages/chat.js +55 -0
- package/dist/routes/pages/chat.js.map +1 -0
- package/dist/routes/pages/overview.d.ts.map +1 -1
- package/dist/routes/pages/overview.js +20 -7
- package/dist/routes/pages/overview.js.map +1 -1
- package/dist/routes/pages/workspace.d.ts.map +1 -1
- package/dist/routes/pages/workspace.js +18 -5
- package/dist/routes/pages/workspace.js.map +1 -1
- package/dist/server/lib/workspace-resources-store.d.ts +2 -1
- package/dist/server/lib/workspace-resources-store.d.ts.map +1 -1
- package/dist/server/lib/workspace-resources-store.js +7 -1
- package/dist/server/lib/workspace-resources-store.js.map +1 -1
- package/dist/server/plugins/integrations.js +2 -2
- package/dist/server/plugins/integrations.js.map +1 -1
- package/package.json +1 -1
- package/src/actions/create-workspace-resource-grant.ts +1 -1
- package/src/actions/create-workspace-resource.ts +7 -7
- package/src/actions/grant-workspace-resources-to-app.ts +1 -1
- package/src/actions/list-workspace-resource-grants.ts +1 -1
- package/src/actions/list-workspace-resource-options.ts +1 -1
- package/src/actions/list-workspace-resources.ts +2 -2
- package/src/actions/navigate.ts +1 -1
- package/src/actions/view-screen.ts +7 -0
- package/src/components/create-app-popover.tsx +1 -1
- package/src/components/layout/Layout.tsx +187 -18
- package/src/db/schema.ts +2 -2
- package/src/hooks/use-navigation-state.spec.ts +7 -0
- package/src/hooks/use-navigation-state.ts +4 -0
- package/src/lib/overview-chat.spec.ts +15 -0
- package/src/lib/overview-chat.ts +2 -0
- package/src/routes/index.ts +1 -0
- package/src/routes/pages/_index.tsx +1 -1
- package/src/routes/pages/chat.tsx +99 -0
- package/src/routes/pages/overview.tsx +21 -5
- package/src/routes/pages/workspace.tsx +41 -7
- package/src/server/lib/workspace-resources-store.spec.ts +2 -0
- package/src/server/lib/workspace-resources-store.ts +13 -5
- package/src/server/plugins/integrations.ts +2 -2
- package/src/styles/dispatch-css.spec.ts +9 -0
- package/src/styles/dispatch.css +103 -0
|
@@ -186,7 +186,8 @@ export type WorkspaceResourceKind =
|
|
|
186
186
|
| "skill"
|
|
187
187
|
| "instruction"
|
|
188
188
|
| "agent"
|
|
189
|
-
| "knowledge"
|
|
189
|
+
| "knowledge"
|
|
190
|
+
| "mcp-server";
|
|
190
191
|
export type WorkspaceResourceScope = "all" | "selected";
|
|
191
192
|
|
|
192
193
|
export interface WorkspaceResourceInput {
|
|
@@ -969,10 +970,6 @@ export async function getWorkspaceResourceEffectiveContext(input: {
|
|
|
969
970
|
await materializeGlobalResource(row);
|
|
970
971
|
}
|
|
971
972
|
|
|
972
|
-
const coreContext: EffectiveResourceContext = await resourceEffectiveContext(
|
|
973
|
-
userEmail,
|
|
974
|
-
path,
|
|
975
|
-
);
|
|
976
973
|
const resource = row ? workspaceResourceOption(row) : null;
|
|
977
974
|
const activeGrant =
|
|
978
975
|
resource?.scope === "selected" && appId
|
|
@@ -985,6 +982,15 @@ export async function getWorkspaceResourceEffectiveContext(input: {
|
|
|
985
982
|
appId,
|
|
986
983
|
activeGrantId: activeGrant?.id ?? null,
|
|
987
984
|
});
|
|
985
|
+
const resolveEffectiveContext = resourceEffectiveContext as (
|
|
986
|
+
userEmail: string,
|
|
987
|
+
path: string,
|
|
988
|
+
options?: { workspaceAppId?: string | null; orgId?: string | null },
|
|
989
|
+
) => Promise<EffectiveResourceContext>;
|
|
990
|
+
const coreContext = await resolveEffectiveContext(userEmail, path, {
|
|
991
|
+
workspaceAppId: appId,
|
|
992
|
+
orgId: ctx.orgId,
|
|
993
|
+
});
|
|
988
994
|
|
|
989
995
|
return {
|
|
990
996
|
appId,
|
|
@@ -1373,6 +1379,7 @@ export async function listWorkspaceResourcesOverview() {
|
|
|
1373
1379
|
const instructions = resources.filter((r) => r.kind === "instruction");
|
|
1374
1380
|
const agents = resources.filter((r) => r.kind === "agent");
|
|
1375
1381
|
const knowledge = resources.filter((r) => r.kind === "knowledge");
|
|
1382
|
+
const mcpServers = resources.filter((r) => r.kind === "mcp-server");
|
|
1376
1383
|
const activeGrants = grants.filter((g) => g.status === "active");
|
|
1377
1384
|
|
|
1378
1385
|
return {
|
|
@@ -1380,6 +1387,7 @@ export async function listWorkspaceResourcesOverview() {
|
|
|
1380
1387
|
instructionCount: instructions.length,
|
|
1381
1388
|
agentCount: agents.length,
|
|
1382
1389
|
knowledgeCount: knowledge.length,
|
|
1390
|
+
mcpServerCount: mcpServers.length,
|
|
1383
1391
|
totalResources: resources.length,
|
|
1384
1392
|
activeGrantCount: activeGrants.length,
|
|
1385
1393
|
};
|
|
@@ -10,7 +10,7 @@ const DISPATCH_INTEGRATION_SYSTEM_PROMPT = `You are the central dispatch for thi
|
|
|
10
10
|
|
|
11
11
|
Default posture:
|
|
12
12
|
- Treat Slack, Telegram, and email as shared entrypoints into the workspace.
|
|
13
|
-
- Heavily delegate domain work to specialized agents through A2A (call-agent) when another app owns the job. Apps you can delegate to include slides (decks/presentations), analytics (data/dashboards), content (docs/articles), videos (Remotion compositions), forms (form builder), clips (screen recordings), design (visual designs), and
|
|
13
|
+
- Heavily delegate domain work to specialized agents through A2A (call-agent) when another app owns the job. Apps you can delegate to include slides (decks/presentations), analytics (data/dashboards), content (docs/articles), videos (Remotion compositions), forms (form builder), clips (screen recordings), design (visual designs), and assets (brand libraries plus generated images/videos).
|
|
14
14
|
- Use the available-apps prompt context first, then list-connected-agents when you need fresh details, to see what agents are available before assuming a request must be handled locally.
|
|
15
15
|
- When asked whether workspace apps expose agent cards or A2A endpoints, call list-workspace-apps with includeAgentCards=true. Without that probe, missing agent-card fields mean unchecked, not unavailable.
|
|
16
16
|
- Treat first-party apps such as Mail, Calendar, Analytics, Brain, 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.
|
|
@@ -18,7 +18,7 @@ Default posture:
|
|
|
18
18
|
- Reply in the originating thread unless the user explicitly asks you to send to a saved destination.
|
|
19
19
|
|
|
20
20
|
When a user asks for something:
|
|
21
|
-
- If it belongs to analytics, content, slides, videos,
|
|
21
|
+
- If it belongs to analytics, content, slides, videos, assets, etc., delegate via call-agent — do not re-implement the domain logic in dispatch.
|
|
22
22
|
- After call-agent returns an answer, RELAY IT DIRECTLY to the user with at most a one-line preface — do not rephrase, summarize, or add commentary. The downstream agent already crafted the answer; your job is delivery, not editing. This minimizes round-trips and keeps the user-visible reply fast.
|
|
23
23
|
- Exception: if the downstream agent reports a missing model/provider credential, do not name exact env vars, Vault keys, tokens, or secrets. Say the target app needs an LLM connection and recommend connecting Builder/managed LLM for that app; keep bring-your-own provider keys as a secondary option only if the user asks.
|
|
24
24
|
- If the user asks to create, build, make, scaffold, or generate an "agent" from Dispatch chat or by tagging @agent-native in Slack, email, or Telegram, first classify the ask. If it is a simple Dispatch-native behavior like a reminder, digest, monitor, routing rule, saved instruction, or recurring workflow, create or update the recurring job/resource/destination in Dispatch. If it is a robust unique product or teammate that needs its own UI, data model, actions, integrations, or domain workflow, treat it as a new workspace app and call start-workspace-app-creation.
|
|
@@ -52,4 +52,13 @@ describe("dispatch route shells", () => {
|
|
|
52
52
|
expect(indexRoute).toContain("HydrateFallback");
|
|
53
53
|
expect(indexRoute).toContain("@agent-native/dispatch/routes/pages/_index");
|
|
54
54
|
});
|
|
55
|
+
|
|
56
|
+
it("re-exports the chat route from the Dispatch template", () => {
|
|
57
|
+
const chatRoute = fs.readFileSync(
|
|
58
|
+
path.join(repoRoot, "templates/dispatch/app/routes/chat.tsx"),
|
|
59
|
+
"utf-8",
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
expect(chatRoute).toContain("@agent-native/dispatch/routes/pages/chat");
|
|
63
|
+
});
|
|
55
64
|
});
|
package/src/styles/dispatch.css
CHANGED
|
@@ -7,3 +7,106 @@
|
|
|
7
7
|
@source "../components/**/*.{js,mjs,ts,tsx}";
|
|
8
8
|
@source "../hooks/**/*.{js,mjs,ts,tsx}";
|
|
9
9
|
@source "../routes/**/*.{js,mjs,ts,tsx}";
|
|
10
|
+
|
|
11
|
+
.dispatch-chat-panel [data-agent-empty-state="centered"] {
|
|
12
|
+
justify-content: center;
|
|
13
|
+
padding-bottom: clamp(4rem, 12vh, 8rem);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.dispatch-chat-intro {
|
|
17
|
+
display: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.dispatch-chat-panel [data-agent-empty-state="centered"] .dispatch-chat-intro {
|
|
21
|
+
display: grid;
|
|
22
|
+
width: min(760px, calc(100vw - 3rem));
|
|
23
|
+
max-width: 760px;
|
|
24
|
+
gap: 0.5rem;
|
|
25
|
+
margin: 0 auto 1rem;
|
|
26
|
+
text-align: center;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.dispatch-chat-intro h1 {
|
|
30
|
+
margin: 0;
|
|
31
|
+
color: hsl(var(--foreground));
|
|
32
|
+
font-size: 2.5rem;
|
|
33
|
+
font-weight: 600;
|
|
34
|
+
letter-spacing: 0;
|
|
35
|
+
line-height: 1.12;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.dispatch-chat-intro p {
|
|
39
|
+
margin: 0;
|
|
40
|
+
color: hsl(var(--muted-foreground));
|
|
41
|
+
font-size: 0.9375rem;
|
|
42
|
+
line-height: 1.5;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.dispatch-chat-panel [data-agent-empty-state="centered"] .agent-chat-scroll {
|
|
46
|
+
flex: 0 0 auto;
|
|
47
|
+
min-height: 0;
|
|
48
|
+
overflow: visible;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.dispatch-chat-panel [data-agent-empty-state="centered"] .agent-composer-area {
|
|
52
|
+
width: min(760px, calc(100vw - 3rem));
|
|
53
|
+
max-width: 760px;
|
|
54
|
+
padding: 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.dispatch-chat-panel [data-agent-empty-state="centered"] .agent-composer-root {
|
|
58
|
+
min-height: 10.5rem;
|
|
59
|
+
border-color: hsl(var(--border));
|
|
60
|
+
border-radius: 1rem;
|
|
61
|
+
background: hsl(var(--card));
|
|
62
|
+
box-shadow:
|
|
63
|
+
0 20px 60px hsl(220 10% 2% / 0.12),
|
|
64
|
+
0 0 0 1px hsl(var(--border) / 0.45);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.dark
|
|
68
|
+
.dispatch-chat-panel
|
|
69
|
+
[data-agent-empty-state="centered"]
|
|
70
|
+
.agent-composer-root {
|
|
71
|
+
box-shadow:
|
|
72
|
+
0 24px 80px hsl(220 10% 2% / 0.4),
|
|
73
|
+
0 0 0 1px hsl(var(--border) / 0.7);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.dispatch-chat-panel
|
|
77
|
+
[data-agent-empty-state="centered"]
|
|
78
|
+
.agent-composer-prosemirror {
|
|
79
|
+
min-height: 6.75rem;
|
|
80
|
+
font-size: 1rem;
|
|
81
|
+
line-height: 1.625rem;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@media (max-width: 767px) {
|
|
85
|
+
.dispatch-chat-panel [data-agent-empty-state="centered"] {
|
|
86
|
+
padding: 1rem;
|
|
87
|
+
padding-bottom: 5rem;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.dispatch-chat-panel
|
|
91
|
+
[data-agent-empty-state="centered"]
|
|
92
|
+
.dispatch-chat-intro {
|
|
93
|
+
width: 100%;
|
|
94
|
+
margin-bottom: 0.875rem;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.dispatch-chat-intro h1 {
|
|
98
|
+
font-size: 1.75rem;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.dispatch-chat-panel
|
|
102
|
+
[data-agent-empty-state="centered"]
|
|
103
|
+
.agent-composer-area {
|
|
104
|
+
width: 100%;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.dispatch-chat-panel
|
|
108
|
+
[data-agent-empty-state="centered"]
|
|
109
|
+
.agent-composer-root {
|
|
110
|
+
min-height: 9rem;
|
|
111
|
+
}
|
|
112
|
+
}
|