@agimon-ai/po-session 0.0.0-alpha.21 → 0.0.0-alpha.211

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/LICENSE +21 -149
  2. package/README.md +47 -1
  3. package/dist/apiContracts.cjs +34 -2
  4. package/dist/apiContracts.cjs.map +1 -1
  5. package/dist/apiContracts.d.mts +2 -2
  6. package/dist/apiContracts.d.mts.map +1 -1
  7. package/dist/apiContracts.mjs +35 -2
  8. package/dist/apiContracts.mjs.map +1 -1
  9. package/dist/extensions/native.mjs +410 -0
  10. package/dist/extensions/native.mjs.map +1 -0
  11. package/dist/extensions/server.cjs +1661 -113
  12. package/dist/extensions/server.cjs.map +1 -1
  13. package/dist/extensions/server.d.mts.map +1 -1
  14. package/dist/extensions/server.mjs +1657 -109
  15. package/dist/extensions/server.mjs.map +1 -1
  16. package/dist/extensions/web.mjs +361 -0
  17. package/dist/extensions/web.mjs.map +1 -0
  18. package/dist/index.cjs +410 -25
  19. package/dist/index.cjs.map +1 -0
  20. package/dist/index.d.mts +599 -82
  21. package/dist/index.d.mts.map +1 -1
  22. package/dist/index.mjs +358 -1
  23. package/dist/index.mjs.map +1 -0
  24. package/dist/po-runtime-identity.json +1 -0
  25. package/dist/type-BlbiS10p.mjs +2622 -0
  26. package/dist/type-BlbiS10p.mjs.map +1 -0
  27. package/dist/type-DZtqhE4a.cjs +3083 -0
  28. package/dist/type-DZtqhE4a.cjs.map +1 -0
  29. package/llms.txt +4 -1
  30. package/locales/vi.json +29 -0
  31. package/locales/zh-CN.json +29 -0
  32. package/package.json +96 -11
  33. package/src/prompts/codemode-how-to-network/SKILL.md +49 -0
  34. package/src/prompts/codemode-how-to-session/SKILL.md +25 -0
  35. package/dist/sessionDelivery-4svjzWUW.mjs +0 -1028
  36. package/dist/sessionDelivery-4svjzWUW.mjs.map +0 -1
  37. package/dist/sessionDelivery-CGWuQyLV.cjs +0 -1219
  38. package/dist/sessionDelivery-CGWuQyLV.cjs.map +0 -1
@@ -0,0 +1,361 @@
1
+ import { defineFill, defineHostStore, defineToolRenderer, defineWebLifecycle, defineWebPlugin, useT } from "@agimon-ai/po-core/web";
2
+ import { Button, Dialog, DialogBody, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Dot, EmptyState, MessageIcon, MessageItem, MessageItemBody, MessageItemHeader, MessageItemStatus, OptionLabel, OptionRow, PickerList, SendIcon, Textarea, resultTextLines, toolTone } from "@agimon-ai/po-web-components";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ import { useEffect, useState } from "react";
5
+ //#region src/extensions/workspaces/sessions/(frontend)/_lib/sendToSessionDelivery.ts
6
+ /**
7
+ * Delivers one send through the started runtime that owns the sending session.
8
+ *
9
+ * DESIGN PATTERNS:
10
+ * - Host-neutral and stateless: the web and native request files each keep
11
+ * their own runtime list (from their own po-core entry) and pass it in.
12
+ * The phone starts one runtime per computer; a send goes through the one
13
+ * that owns the sending session, with that computer's local ids.
14
+ *
15
+ * AVOID:
16
+ * - Value imports from a po-core entry here. Native plugins may not import
17
+ * `po-core/web`, and web plugins may not import `po-core/native`.
18
+ */
19
+ /** The runtime that owns `from`, with both ids as its computer knows them; undefined when none does. */
20
+ function route(runtimes, input) {
21
+ return runtimes.flatMap((runtime) => {
22
+ try {
23
+ const from = runtime.localSessionId?.(input.from) ?? input.from;
24
+ const to = runtime.localSessionId?.(input.to) ?? input.to;
25
+ return from !== input.from || (runtime.qualifySessionId?.(input.from) ?? input.from) === input.from ? [{
26
+ runtime,
27
+ from,
28
+ to
29
+ }] : [];
30
+ } catch {
31
+ return [];
32
+ }
33
+ }).at(-1);
34
+ }
35
+ /** Steers `text` into session `to`. Resolves to the reason shown when it was refused, or undefined once delivered. */
36
+ async function deliverToSession(runtimes, input) {
37
+ const owner = route(runtimes, input);
38
+ if (!owner) return "Po is not connected. Your text is kept; try again.";
39
+ try {
40
+ await owner.runtime.invokeServerMethod({
41
+ mount: { scope: "host" },
42
+ service: "sessions",
43
+ method: "sendToSession",
44
+ input: {
45
+ from: owner.from,
46
+ to: owner.to,
47
+ text: input.text
48
+ }
49
+ });
50
+ return;
51
+ } catch (error) {
52
+ return error instanceof Error && error.message !== "" ? error.message : "The message was not delivered.";
53
+ }
54
+ }
55
+ //#endregion
56
+ //#region src/extensions/workspaces/sessions/(frontend)/_lib/sendToSessionRequest.ts
57
+ const request = defineHostStore(void 0);
58
+ const runtimes = defineHostStore([]);
59
+ function startSendToSessionRuntime(runtime) {
60
+ runtimes.update((current) => [...current, runtime]);
61
+ return () => runtimes.update((current) => current.filter((entry) => entry !== runtime));
62
+ }
63
+ function requestSendToSession(text) {
64
+ request.update(() => ({ text }));
65
+ }
66
+ function subscribeSendToSessionRequest(listener) {
67
+ const deliver = () => {
68
+ const next = request.store.state;
69
+ if (!next) return;
70
+ request.reset();
71
+ listener(next);
72
+ };
73
+ const subscription = request.store.subscribe(deliver);
74
+ deliver();
75
+ return () => subscription.unsubscribe();
76
+ }
77
+ /** Steers `text` into session `to`. Resolves to the reason shown when it was refused, or undefined once delivered. */
78
+ function sendToSession(input) {
79
+ return deliverToSession(runtimes.store.state, input);
80
+ }
81
+ //#endregion
82
+ //#region src/extensions/workspaces/sessions/(frontend)/fill/_components/SendToSessionMenuItem.tsx
83
+ /**
84
+ * "Send to session…" in the composer's '+' menu.
85
+ *
86
+ * DESIGN PATTERNS:
87
+ * - Stateless on purpose. The menu unmounts this on close, so the click takes
88
+ * the draft and publishes it; the dialog lives in the overlay.
89
+ * - Hidden in hosts that cannot list sessions or take the draft.
90
+ */
91
+ function SendToSessionMenuItem({ takeComposerDraft, listSessions }) {
92
+ const t = useT();
93
+ if (!takeComposerDraft || !listSessions) return null;
94
+ return /* @__PURE__ */ jsxs(OptionRow, {
95
+ role: "menuitem",
96
+ density: "compact",
97
+ "data-testid": "composer-menu-send-to-session",
98
+ className: "w-full text-po-text hover:bg-po-tint-blue",
99
+ onClick: () => requestSendToSession(takeComposerDraft()),
100
+ children: [/* @__PURE__ */ jsx(SendIcon, {
101
+ "aria-hidden": true,
102
+ className: "h-3 w-3 shrink-0"
103
+ }), /* @__PURE__ */ jsx(OptionLabel, {
104
+ density: "compact",
105
+ children: t("session.ui.sendToSessionMenu", "Send to session…")
106
+ })]
107
+ });
108
+ }
109
+ //#endregion
110
+ //#region src/extensions/workspaces/sessions/(frontend)/fill/SendToSession.composer-menu.web.tsx
111
+ var SendToSession_composer_menu_web_default = defineFill({ component: SendToSessionMenuItem });
112
+ //#endregion
113
+ //#region src/extensions/workspaces/sessions/(frontend)/fill/_components/SendToSessionDialog.tsx
114
+ /** Running is Po at work (jade); waiting is a gentle ask of the person (rose). */
115
+ const TONE = {
116
+ running: "green",
117
+ waiting: "magenta",
118
+ idle: "neutral"
119
+ };
120
+ /**
121
+ * The "Send to session" dialog, drawn from the approved SessionMessagingDesign story.
122
+ *
123
+ * DESIGN PATTERNS:
124
+ * - Controlled: the overlay host owns the text, pick and error, so a refusal
125
+ * keeps what the person wrote.
126
+ * - One jade primary action; red only for a real refusal.
127
+ */
128
+ function SendToSessionDialog({ open, sessions, to, text, error, sending, onPick, onTextChange, onCancel, onSend }) {
129
+ const t = useT();
130
+ const target = sessions.find((session) => session.id === to);
131
+ return /* @__PURE__ */ jsx(Dialog, {
132
+ open,
133
+ onOpenChange: (next) => next ? void 0 : onCancel(),
134
+ children: /* @__PURE__ */ jsxs(DialogContent, {
135
+ width: "md",
136
+ "data-testid": "send-to-session-dialog",
137
+ children: [/* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { children: t("session.ui.sendToSession", "Send to session") }) }), /* @__PURE__ */ jsxs(DialogBody, {
138
+ className: "flex flex-col gap-3",
139
+ children: [
140
+ /* @__PURE__ */ jsx(DialogDescription, { children: t("session.ui.sendImmediatelyDescription", "It reaches that session right away, in its current turn, as a message from you.") }),
141
+ sessions.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {
142
+ size: "compact",
143
+ icon: /* @__PURE__ */ jsx(MessageIcon, {}),
144
+ title: t("session.ui.noOtherSessionRunning", "No other session is running"),
145
+ description: t("session.ui.openThenSend", "Open one, then send.")
146
+ }) : /* @__PURE__ */ jsx(PickerList, {
147
+ label: t("session.ui.sessions", "Sessions"),
148
+ items: sessions.map((session) => ({
149
+ value: session.id,
150
+ title: session.name,
151
+ subtitle: session.detail,
152
+ lead: /* @__PURE__ */ jsx(Dot, {
153
+ tone: TONE[session.state],
154
+ size: "md"
155
+ })
156
+ })),
157
+ value: to === void 0 ? [] : [to],
158
+ filterable: true,
159
+ filterPlaceholder: t("session.ui.searchSessions", "Search sessions"),
160
+ onSelect: onPick,
161
+ className: "max-h-56 rounded-md border border-po-border"
162
+ }),
163
+ /* @__PURE__ */ jsx(Textarea, {
164
+ "aria-label": t("session.ui.message", "Message"),
165
+ rows: 3,
166
+ value: text,
167
+ "data-testid": "send-to-session-text",
168
+ onChange: (event) => onTextChange(event.currentTarget.value)
169
+ }),
170
+ error === "" ? null : /* @__PURE__ */ jsx("p", {
171
+ role: "alert",
172
+ className: "text-sm text-po-red",
173
+ children: error
174
+ }),
175
+ /* @__PURE__ */ jsxs(DialogFooter, { children: [/* @__PURE__ */ jsx(Button, {
176
+ variant: "outline",
177
+ size: "md",
178
+ onClick: onCancel,
179
+ children: t("session.ui.cancel", "Cancel")
180
+ }), /* @__PURE__ */ jsxs(Button, {
181
+ variant: "primary",
182
+ size: "md",
183
+ className: "gap-1.5",
184
+ "data-testid": "send-to-session-send",
185
+ disabled: target === void 0 || text.trim() === "" || sending,
186
+ onClick: onSend,
187
+ children: [/* @__PURE__ */ jsx(SendIcon, {
188
+ "aria-hidden": true,
189
+ className: "size-3.5"
190
+ }), target === void 0 ? t("session.ui.send", "Send") : t("session.ui.sendToName", "Send to {name}", { name: target.name })]
191
+ })] })
192
+ ]
193
+ })]
194
+ })
195
+ });
196
+ }
197
+ //#endregion
198
+ //#region src/extensions/workspaces/sessions/(frontend)/fill/_components/SendToSessionDialogHost.tsx
199
+ /**
200
+ * The send dialog's state. It fills an overlay, which stays mounted for the
201
+ * page, because the '+' row that opens it unmounts when the menu closes.
202
+ *
203
+ * AVOID:
204
+ * - Rendering anything while closed. This sits over the whole cockpit.
205
+ */
206
+ function SendToSessionDialogHost({ sessionId, listSessions, appendComposerDraft }) {
207
+ const [open, setOpen] = useState(false);
208
+ const [sessions, setSessions] = useState([]);
209
+ const [to, setTo] = useState(void 0);
210
+ const [text, setText] = useState("");
211
+ const [error, setError] = useState("");
212
+ const [sending, setSending] = useState(false);
213
+ useEffect(() => subscribeSendToSessionRequest((request) => {
214
+ setSessions(listSessions?.() ?? []);
215
+ setTo(void 0);
216
+ setText(request.text);
217
+ setError("");
218
+ setOpen(true);
219
+ }), [listSessions]);
220
+ if (!open || sessionId === null) return null;
221
+ const cancel = () => {
222
+ if (sending) return;
223
+ appendComposerDraft(text);
224
+ setOpen(false);
225
+ };
226
+ const send = async () => {
227
+ if (to === void 0) return;
228
+ setSending(true);
229
+ const refusal = await sendToSession({
230
+ from: sessionId,
231
+ to,
232
+ text: text.trim()
233
+ });
234
+ setSending(false);
235
+ if (refusal === void 0) setOpen(false);
236
+ else setError(refusal);
237
+ };
238
+ return /* @__PURE__ */ jsx(SendToSessionDialog, {
239
+ open: true,
240
+ sessions,
241
+ to,
242
+ text,
243
+ error,
244
+ sending,
245
+ onPick: setTo,
246
+ onTextChange: setText,
247
+ onCancel: cancel,
248
+ onSend: () => void send()
249
+ });
250
+ }
251
+ //#endregion
252
+ //#region src/extensions/workspaces/sessions/(frontend)/fill/SendToSessionDialog.overlay.web.tsx
253
+ var SendToSessionDialog_overlay_web_default = defineFill({ component: SendToSessionDialogHost });
254
+ //#endregion
255
+ //#region src/extensions/workspaces/sessions/(frontend)/lifecycle/start.web.ts
256
+ var start_web_default = defineWebLifecycle(startSendToSessionRuntime);
257
+ //#endregion
258
+ //#region src/extensions/workspaces/sessions/(frontend)/tool/_lib/networkActivity.ts
259
+ const ACTIVITY_CHARS = 72;
260
+ function asString(value) {
261
+ return typeof value === "string" ? value : "";
262
+ }
263
+ function clip(text) {
264
+ const flat = text.replace(/\s+/g, " ").trim();
265
+ return flat.length > ACTIVITY_CHARS ? `${flat.slice(0, 71)}…` : flat;
266
+ }
267
+ /** Who a message is for, or what it answers. */
268
+ function networkSummary(toolName, args) {
269
+ const verb = toolName.split(".").at(-1) ?? toolName;
270
+ return toolName === "network.reply" ? "reply" : `${verb} ${asString(args.to)}`.trim();
271
+ }
272
+ /** One line per outgoing session message: who it went to and what it said. */
273
+ function networkActivity({ toolName, args, isError }) {
274
+ const text = clip(asString(args.text));
275
+ if (isError || !text) return [];
276
+ if (toolName === "network.reply") return [`Replied "${text}"`];
277
+ return [`→ ${asString(args.to) || "session"}${toolName === "network.ask" ? " asks" : ""} "${text}"`];
278
+ }
279
+ //#endregion
280
+ //#region src/extensions/workspaces/sessions/(frontend)/tool/_components/NetworkToolMessage.tsx
281
+ /** A network.send, network.ask or network.reply recorded inside an exec. Collapsed to its summary; the body is the result text. */
282
+ function NetworkToolMessage({ args, result, output, running, isError, toolName }) {
283
+ const t = useT();
284
+ const lines = resultTextLines(result, output);
285
+ return /* @__PURE__ */ jsx(MessageItem, {
286
+ tone: toolTone({
287
+ running,
288
+ isError
289
+ }),
290
+ expandable: lines.length > 0,
291
+ children: ({ expanded }) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(MessageItemHeader, {
292
+ title: "network",
293
+ children: /* @__PURE__ */ jsx("span", {
294
+ "data-testid": "tool-call-network",
295
+ className: "min-w-0 flex-1 truncate text-po-text",
296
+ children: networkSummary(toolName, args)
297
+ })
298
+ }), expanded ? /* @__PURE__ */ jsxs(MessageItemBody, {
299
+ "data-testid": "tool-result-network",
300
+ className: "flex flex-col gap-1",
301
+ children: [running ? /* @__PURE__ */ jsx(MessageItemStatus, {
302
+ tone: "running",
303
+ children: t("session.ui.working", "working")
304
+ }) : null, lines.map((line, index) => /* @__PURE__ */ jsx("span", {
305
+ className: `whitespace-pre-wrap break-words ${isError ? "text-po-red" : "text-po-dim"}`,
306
+ children: line
307
+ }, `${String(index)}-${line}`))]
308
+ }) : null] })
309
+ });
310
+ }
311
+ //#endregion
312
+ //#region src/extensions/workspaces/sessions/(frontend)/tool/network.web.tsx
313
+ /** The network namespace's recorded calls. Named by hand: the dotted tool names are not a filename. */
314
+ var network_web_default = defineToolRenderer({
315
+ tools: [
316
+ "network.send",
317
+ "network.ask",
318
+ "network.reply"
319
+ ],
320
+ message: NetworkToolMessage,
321
+ activity: networkActivity
322
+ });
323
+ //#endregion
324
+ //#region generated/web.ts
325
+ const via = (identity, value) => {
326
+ if (value === void 0) return void 0;
327
+ const declaration = value;
328
+ return {
329
+ ...identity,
330
+ ...declaration,
331
+ ...declaration.relations === void 0 ? {} : { relations: declaration.relations.map((relation) => ({
332
+ evidence: "declared",
333
+ ...relation
334
+ })) }
335
+ };
336
+ };
337
+ const webPlugin = defineWebPlugin({
338
+ id: "sessions",
339
+ packageName: "@agimon-ai/po-session",
340
+ session: {
341
+ get fills() {
342
+ return [via({
343
+ slot: "composer-menu",
344
+ id: "send-to-session"
345
+ }, SendToSession_composer_menu_web_default), via({
346
+ slot: "overlay",
347
+ id: "send-to-session-dialog"
348
+ }, SendToSessionDialog_overlay_web_default)];
349
+ },
350
+ get start() {
351
+ return start_web_default;
352
+ },
353
+ get toolRenderers() {
354
+ return [via({ tools: ["network"] }, network_web_default)];
355
+ }
356
+ }
357
+ });
358
+ //#endregion
359
+ export { webPlugin };
360
+
361
+ //# sourceMappingURL=web.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.mjs","names":["fillSendToSession","fillSendToSessionDialog","lifecycleStart","toolNetwork"],"sources":["../../src/extensions/workspaces/sessions/(frontend)/_lib/sendToSessionDelivery.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/sendToSessionRequest.ts","../../src/extensions/workspaces/sessions/(frontend)/fill/_components/SendToSessionMenuItem.tsx","../../src/extensions/workspaces/sessions/(frontend)/fill/SendToSession.composer-menu.web.tsx","../../src/extensions/workspaces/sessions/(frontend)/fill/_components/SendToSessionDialog.tsx","../../src/extensions/workspaces/sessions/(frontend)/fill/_components/SendToSessionDialogHost.tsx","../../src/extensions/workspaces/sessions/(frontend)/fill/SendToSessionDialog.overlay.web.tsx","../../src/extensions/workspaces/sessions/(frontend)/lifecycle/start.web.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/networkActivity.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/NetworkToolMessage.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/network.web.tsx","../../generated/web.ts"],"sourcesContent":["import type { WebPluginRuntime } from '@agimon-ai/po-core/web';\n\n/**\n * Delivers one send through the started runtime that owns the sending session.\n *\n * DESIGN PATTERNS:\n * - Host-neutral and stateless: the web and native request files each keep\n * their own runtime list (from their own po-core entry) and pass it in.\n * The phone starts one runtime per computer; a send goes through the one\n * that owns the sending session, with that computer's local ids.\n *\n * AVOID:\n * - Value imports from a po-core entry here. Native plugins may not import\n * `po-core/web`, and web plugins may not import `po-core/native`.\n */\n\n/** The runtime that owns `from`, with both ids as its computer knows them; undefined when none does. */\nfunction route(runtimes: readonly WebPluginRuntime[], input: { from: string; to: string }) {\n const owners = runtimes.flatMap((runtime) => {\n try {\n const from = runtime.localSessionId?.(input.from) ?? input.from;\n const to = runtime.localSessionId?.(input.to) ?? input.to;\n // An unqualified id belongs to the computer that would leave it unqualified (the local hub).\n const owns = from !== input.from || (runtime.qualifySessionId?.(input.from) ?? input.from) === input.from;\n return owns ? [{ runtime, from, to }] : [];\n } catch {\n // localSessionId refuses an id of another computer: this runtime does not own the send.\n return [];\n }\n });\n return owners.at(-1);\n}\n\n/** Steers `text` into session `to`. Resolves to the reason shown when it was refused, or undefined once delivered. */\nexport async function deliverToSession(\n runtimes: readonly WebPluginRuntime[],\n input: { from: string; to: string; text: string },\n): Promise<string | undefined> {\n const owner = route(runtimes, input);\n if (!owner) return 'Po is not connected. Your text is kept; try again.';\n try {\n await owner.runtime.invokeServerMethod({\n mount: { scope: 'host' },\n service: 'sessions',\n method: 'sendToSession',\n input: { from: owner.from, to: owner.to, text: input.text },\n });\n return undefined;\n } catch (error) {\n return error instanceof Error && error.message !== '' ? error.message : 'The message was not delivered.';\n }\n}\n","import { defineHostStore, type WebPluginRuntime } from '@agimon-ai/po-core/web';\n\nimport { deliverToSession } from './sendToSessionDelivery';\n\n/**\n * Package-local handoff from the composer's '+' row to the dialog that sends,\n * plus the page runtime the dialog calls the server through.\n *\n * DESIGN PATTERNS:\n * - The menu row unmounts the moment the menu closes, so it publishes one\n * short-lived request carrying the draft it took; the overlay owns the dialog.\n * - The lifecycle keeps each started runtime here, because slot props carry no\n * server method call. sendToSessionDelivery picks the one that owns the send.\n * - sendToSessionRequest.native.ts is the phone's copy of the runtime list; it\n * imports po-core/native, which a native plugin may load and this file may not.\n *\n * AVOID:\n * - Persisting the taken draft. Cancel hands it back to the composer instead.\n */\n\n/** One ask to send; `text` is the draft the row took, possibly empty. */\nexport interface SendToSessionRequest {\n text: string;\n}\n\nconst request = defineHostStore<SendToSessionRequest | undefined>(undefined);\nconst runtimes = defineHostStore<readonly WebPluginRuntime[]>([]);\n\nexport function startSendToSessionRuntime(runtime: WebPluginRuntime): () => void {\n runtimes.update((current) => [...current, runtime]);\n return () => runtimes.update((current) => current.filter((entry) => entry !== runtime));\n}\n\nexport function requestSendToSession(text: string): void {\n request.update(() => ({ text }));\n}\n\nexport function subscribeSendToSessionRequest(listener: (request: SendToSessionRequest) => void): () => void {\n const deliver = (): void => {\n const next = request.store.state;\n if (!next) return;\n request.reset();\n listener(next);\n };\n const subscription = request.store.subscribe(deliver);\n deliver();\n return () => subscription.unsubscribe();\n}\n\n/** Steers `text` into session `to`. Resolves to the reason shown when it was refused, or undefined once delivered. */\nexport function sendToSession(input: { from: string; to: string; text: string }): Promise<string | undefined> {\n return deliverToSession(runtimes.store.state, input);\n}\n","import { useT } from '@agimon-ai/po-core/web';\nimport type { WebPluginSlotProps } from '@agimon-ai/po-core/web';\nimport { OptionLabel, OptionRow, SendIcon } from '@agimon-ai/po-web-components';\n\nimport { requestSendToSession } from '../../_lib/sendToSessionRequest';\n\n/**\n * \"Send to session…\" in the composer's '+' menu.\n *\n * DESIGN PATTERNS:\n * - Stateless on purpose. The menu unmounts this on close, so the click takes\n * the draft and publishes it; the dialog lives in the overlay.\n * - Hidden in hosts that cannot list sessions or take the draft.\n */\nexport function SendToSessionMenuItem({ takeComposerDraft, listSessions }: WebPluginSlotProps) {\n const t = useT();\n if (!takeComposerDraft || !listSessions) return null;\n return (\n <OptionRow\n role=\"menuitem\"\n density=\"compact\"\n data-testid=\"composer-menu-send-to-session\"\n className=\"w-full text-po-text hover:bg-po-tint-blue\"\n onClick={() => requestSendToSession(takeComposerDraft())}\n >\n <SendIcon aria-hidden className=\"h-3 w-3 shrink-0\" />\n <OptionLabel density=\"compact\">{t('session.ui.sendToSessionMenu', 'Send to session…')}</OptionLabel>\n </OptionRow>\n );\n}\n","import { defineFill } from '@agimon-ai/po-core/web';\n\nimport { SendToSessionMenuItem } from './_components/SendToSessionMenuItem';\nexport default defineFill({ component: SendToSessionMenuItem });\n","import { useT } from '@agimon-ai/po-core/web';\nimport type { WebPluginSessionOption } from '@agimon-ai/po-core/web';\nimport {\n Button,\n Dialog,\n DialogBody,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n Dot,\n EmptyState,\n MessageIcon,\n PickerList,\n SendIcon,\n Textarea,\n} from '@agimon-ai/po-web-components';\n\n/** Running is Po at work (jade); waiting is a gentle ask of the person (rose). */\nconst TONE = { running: 'green', waiting: 'magenta', idle: 'neutral' } as const;\n\nexport interface SendToSessionDialogProps {\n open: boolean;\n sessions: readonly WebPluginSessionOption[];\n to: string | undefined;\n text: string;\n error: string;\n sending: boolean;\n onPick: (to: string) => void;\n onTextChange: (text: string) => void;\n onCancel: () => void;\n onSend: () => void;\n}\n\n/**\n * The \"Send to session\" dialog, drawn from the approved SessionMessagingDesign story.\n *\n * DESIGN PATTERNS:\n * - Controlled: the overlay host owns the text, pick and error, so a refusal\n * keeps what the person wrote.\n * - One jade primary action; red only for a real refusal.\n */\nexport function SendToSessionDialog({\n open,\n sessions,\n to,\n text,\n error,\n sending,\n onPick,\n onTextChange,\n onCancel,\n onSend,\n}: SendToSessionDialogProps) {\n const t = useT();\n const target = sessions.find((session) => session.id === to);\n return (\n <Dialog open={open} onOpenChange={(next) => (next ? undefined : onCancel())}>\n <DialogContent width=\"md\" data-testid=\"send-to-session-dialog\">\n <DialogHeader>\n <DialogTitle>{t('session.ui.sendToSession', 'Send to session')}</DialogTitle>\n </DialogHeader>\n <DialogBody className=\"flex flex-col gap-3\">\n <DialogDescription>\n {t(\n 'session.ui.sendImmediatelyDescription',\n 'It reaches that session right away, in its current turn, as a message from you.',\n )}\n </DialogDescription>\n {sessions.length === 0 ? (\n <EmptyState\n size=\"compact\"\n icon={<MessageIcon />}\n title={t('session.ui.noOtherSessionRunning', 'No other session is running')}\n description={t('session.ui.openThenSend', 'Open one, then send.')}\n />\n ) : (\n <PickerList\n label={t('session.ui.sessions', 'Sessions')}\n items={sessions.map((session) => ({\n value: session.id,\n title: session.name,\n subtitle: session.detail,\n lead: <Dot tone={TONE[session.state]} size=\"md\" />,\n }))}\n value={to === undefined ? [] : [to]}\n filterable\n filterPlaceholder={t('session.ui.searchSessions', 'Search sessions')}\n onSelect={onPick}\n className=\"max-h-56 rounded-md border border-po-border\"\n />\n )}\n <Textarea\n aria-label={t('session.ui.message', 'Message')}\n rows={3}\n value={text}\n data-testid=\"send-to-session-text\"\n onChange={(event) => onTextChange(event.currentTarget.value)}\n />\n {error === '' ? null : (\n <p role=\"alert\" className=\"text-sm text-po-red\">\n {error}\n </p>\n )}\n <DialogFooter>\n <Button variant=\"outline\" size=\"md\" onClick={onCancel}>\n {t('session.ui.cancel', 'Cancel')}\n </Button>\n <Button\n variant=\"primary\"\n size=\"md\"\n className=\"gap-1.5\"\n data-testid=\"send-to-session-send\"\n disabled={target === undefined || text.trim() === '' || sending}\n onClick={onSend}\n >\n <SendIcon aria-hidden className=\"size-3.5\" />\n {target === undefined\n ? t('session.ui.send', 'Send')\n : t('session.ui.sendToName', 'Send to {name}', { name: target.name })}\n </Button>\n </DialogFooter>\n </DialogBody>\n </DialogContent>\n </Dialog>\n );\n}\n","import type { WebPluginSessionOption, WebPluginSlotProps } from '@agimon-ai/po-core/web';\nimport { useEffect, useState } from 'react';\n\nimport { sendToSession, subscribeSendToSessionRequest } from '../../_lib/sendToSessionRequest';\nimport { SendToSessionDialog } from './SendToSessionDialog';\n\n/**\n * The send dialog's state. It fills an overlay, which stays mounted for the\n * page, because the '+' row that opens it unmounts when the menu closes.\n *\n * AVOID:\n * - Rendering anything while closed. This sits over the whole cockpit.\n */\nexport function SendToSessionDialogHost({ sessionId, listSessions, appendComposerDraft }: WebPluginSlotProps) {\n const [open, setOpen] = useState(false);\n const [sessions, setSessions] = useState<readonly WebPluginSessionOption[]>([]);\n const [to, setTo] = useState<string | undefined>(undefined);\n const [text, setText] = useState('');\n const [error, setError] = useState('');\n const [sending, setSending] = useState(false);\n\n useEffect(\n () =>\n subscribeSendToSessionRequest((request) => {\n setSessions(listSessions?.() ?? []);\n setTo(undefined);\n setText(request.text);\n setError('');\n setOpen(true);\n }),\n [listSessions],\n );\n\n if (!open || sessionId === null) return null;\n\n const cancel = (): void => {\n if (sending) return;\n // The text came out of the composer; a cancel puts it back.\n appendComposerDraft(text);\n setOpen(false);\n };\n\n const send = async (): Promise<void> => {\n if (to === undefined) return;\n setSending(true);\n const refusal = await sendToSession({ from: sessionId, to, text: text.trim() });\n setSending(false);\n if (refusal === undefined) setOpen(false);\n else setError(refusal);\n };\n\n return (\n <SendToSessionDialog\n open\n sessions={sessions}\n to={to}\n text={text}\n error={error}\n sending={sending}\n onPick={setTo}\n onTextChange={setText}\n onCancel={cancel}\n onSend={() => void send()}\n />\n );\n}\n","import { defineFill } from '@agimon-ai/po-core/web';\n\nimport { SendToSessionDialogHost } from './_components/SendToSessionDialogHost';\nexport default defineFill({ component: SendToSessionDialogHost });\n","import { defineWebLifecycle } from '@agimon-ai/po-core/web';\n\nimport { startSendToSessionRuntime } from '../_lib/sendToSessionRequest';\n\nexport default defineWebLifecycle(startSendToSessionRuntime);\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/web';\n\nconst ACTIVITY_CHARS = 72;\n\nfunction asString(value: unknown): string {\n return typeof value === 'string' ? value : '';\n}\n\nfunction clip(text: string): string {\n const flat = text.replace(/\\s+/g, ' ').trim();\n return flat.length > ACTIVITY_CHARS ? `${flat.slice(0, ACTIVITY_CHARS - 1)}…` : flat;\n}\n\n/** Who a message is for, or what it answers. */\nexport function networkSummary(toolName: string, args: Record<string, unknown>): string {\n const verb = toolName.split('.').at(-1) ?? toolName;\n return toolName === 'network.reply' ? 'reply' : `${verb} ${asString(args.to)}`.trim();\n}\n\n/** One line per outgoing session message: who it went to and what it said. */\nexport function networkActivity({\n toolName,\n args,\n isError,\n}: Pick<ToolMessageRenderProps, 'toolName' | 'args' | 'isError'>): string[] {\n const text = clip(asString(args.text));\n if (isError || !text) return [];\n if (toolName === 'network.reply') return [`Replied \"${text}\"`];\n const to = asString(args.to) || 'session';\n return [`→ ${to}${toolName === 'network.ask' ? ' asks' : ''} \"${text}\"`];\n}\n","import { useT } from '@agimon-ai/po-core/web';\nimport type { ToolMessageRenderProps } from '@agimon-ai/po-core/web';\nimport {\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\n resultTextLines,\n toolTone,\n} from '@agimon-ai/po-web-components';\n\nimport { networkSummary } from '../_lib/networkActivity';\n\n/** A network.send, network.ask or network.reply recorded inside an exec. Collapsed to its summary; the body is the result text. */\nexport function NetworkToolMessage({ args, result, output, running, isError, toolName }: ToolMessageRenderProps) {\n const t = useT();\n const lines = resultTextLines(result, output);\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable={lines.length > 0}>\n {({ expanded }) => (\n <>\n {/* no-untranslated-jsx: ignore - Preserve the technical tool identifier. */}\n <MessageItemHeader title=\"network\">\n <span data-testid=\"tool-call-network\" className=\"min-w-0 flex-1 truncate text-po-text\">\n {networkSummary(toolName, args)}\n </span>\n </MessageItemHeader>\n {expanded ? (\n <MessageItemBody data-testid=\"tool-result-network\" className=\"flex flex-col gap-1\">\n {running ? (\n <MessageItemStatus tone=\"running\">{t('session.ui.working', 'working')}</MessageItemStatus>\n ) : null}\n {lines.map((line, index) => (\n <span\n key={`${String(index)}-${line}`}\n className={`whitespace-pre-wrap break-words ${isError ? 'text-po-red' : 'text-po-dim'}`}\n >\n {line}\n </span>\n ))}\n </MessageItemBody>\n ) : null}\n </>\n )}\n </MessageItem>\n );\n}\n","import { defineToolRenderer } from '@agimon-ai/po-core/web';\n\nimport { NetworkToolMessage } from './_components/NetworkToolMessage';\nimport { networkActivity } from './_lib/networkActivity';\n\n/** The network namespace's recorded calls. Named by hand: the dotted tool names are not a filename. */\nexport default defineToolRenderer({\n tools: ['network.send', 'network.ask', 'network.reply'],\n message: NetworkToolMessage,\n activity: networkActivity,\n});\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineWebPlugin, type WebPluginContributions } from '@agimon-ai/po-core/web';\n\nimport fillSendToSession from '../src/extensions/workspaces/sessions/(frontend)/fill/SendToSession.composer-menu.web';\nimport fillSendToSessionDialog from '../src/extensions/workspaces/sessions/(frontend)/fill/SendToSessionDialog.overlay.web';\nimport lifecycleStart from '../src/extensions/workspaces/sessions/(frontend)/lifecycle/start.web';\nimport toolNetwork from '../src/extensions/workspaces/sessions/(frontend)/tool/network.web';\n\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T => {\n if (value === undefined) return undefined as T;\n const declaration = value as { relations?: readonly Record<string, unknown>[] };\n return { ...identity, ...declaration, ...(declaration.relations === undefined ? {} : {\n relations: declaration.relations.map((relation) => ({ evidence: 'declared', ...relation })),\n }) } as T;\n};\n\nexport const webPlugin = defineWebPlugin({\n id: 'sessions',\n packageName: '@agimon-ai/po-session',\n session: {\n get fills(): WebPluginContributions['fills'] { return [via({ slot: 'composer-menu', id: 'send-to-session' }, fillSendToSession), via({ slot: 'overlay', id: 'send-to-session-dialog' }, fillSendToSessionDialog)]; },\n get start(): WebPluginContributions['start'] { return lifecycleStart; },\n get toolRenderers(): WebPluginContributions['toolRenderers'] { return [via({ tools: ['network'] }, toolNetwork)]; },\n },\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAiBA,SAAS,MAAM,UAAuC,OAAqC;CAazF,OAZe,SAAS,SAAS,YAAY;EAC3C,IAAI;GACF,MAAM,OAAO,QAAQ,iBAAiB,MAAM,IAAI,KAAK,MAAM;GAC3D,MAAM,KAAK,QAAQ,iBAAiB,MAAM,EAAE,KAAK,MAAM;GAGvD,OADa,SAAS,MAAM,SAAS,QAAQ,mBAAmB,MAAM,IAAI,KAAK,MAAM,UAAU,MAAM,OACvF,CAAC;IAAE;IAAS;IAAM;GAAG,CAAC,IAAI,CAAC;EAC3C,QAAQ;GAEN,OAAO,CAAC;EACV;CACF,CACY,CAAC,CAAC,GAAG,EAAE;AACrB;;AAGA,eAAsB,iBACpB,UACA,OAC6B;CAC7B,MAAM,QAAQ,MAAM,UAAU,KAAK;CACnC,IAAI,CAAC,OAAO,OAAO;CACnB,IAAI;EACF,MAAM,MAAM,QAAQ,mBAAmB;GACrC,OAAO,EAAE,OAAO,OAAO;GACvB,SAAS;GACT,QAAQ;GACR,OAAO;IAAE,MAAM,MAAM;IAAM,IAAI,MAAM;IAAI,MAAM,MAAM;GAAK;EAC5D,CAAC;EACD;CACF,SAAS,OAAO;EACd,OAAO,iBAAiB,SAAS,MAAM,YAAY,KAAK,MAAM,UAAU;CAC1E;AACF;;;AC1BA,MAAM,UAAU,gBAAkD,KAAA,CAAS;AAC3E,MAAM,WAAW,gBAA6C,CAAC,CAAC;AAEhE,SAAgB,0BAA0B,SAAuC;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