@agimon-ai/po-session 0.0.0-alpha.193 → 0.0.0-alpha.195
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/LICENSE +21 -149
- package/dist/extensions/native.mjs +14 -14
- package/dist/extensions/native.mjs.map +1 -1
- package/dist/extensions/server.cjs +534 -13
- package/dist/extensions/server.cjs.map +1 -1
- package/dist/extensions/server.mjs +536 -15
- package/dist/extensions/server.mjs.map +1 -1
- package/dist/extensions/web.mjs +6 -4
- package/dist/extensions/web.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/po-runtime-identity.json +1 -1
- package/dist/{type-CsOWjmfl.mjs → type-BlbiS10p.mjs} +2 -2
- package/dist/{type-CsOWjmfl.mjs.map → type-BlbiS10p.mjs.map} +1 -1
- package/dist/{type-CTnURqO7.cjs → type-DZtqhE4a.cjs} +7 -1
- package/dist/{type-CTnURqO7.cjs.map → type-DZtqhE4a.cjs.map} +1 -1
- package/package.json +12 -12
- package/src/prompts/codemode-how-to-network/SKILL.md +9 -0
package/LICENSE
CHANGED
|
@@ -1,149 +1,21 @@
|
|
|
1
|
-
License
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
other Organization. Use by an individual in the course of employment
|
|
23
|
-
or engagement by an Organization is use by that Organization.
|
|
24
|
-
|
|
25
|
-
(b) Small Organization Use. Use by or on behalf of an Organization whose
|
|
26
|
-
Annual Revenue is less than USD 1,000,000.
|
|
27
|
-
|
|
28
|
-
(c) Non-profit, Education and Research Use. Use, regardless of Annual
|
|
29
|
-
Revenue, by (i) an Organization registered or recognized as a
|
|
30
|
-
non-profit or charitable organization under the laws of its
|
|
31
|
-
jurisdiction, for its non-profit purposes; (ii) an accredited school,
|
|
32
|
-
college, or university, for teaching, learning, or academic research;
|
|
33
|
-
or (iii) a publicly funded research institution, for its research.
|
|
34
|
-
|
|
35
|
-
(d) Service Provider Use. Use by a consultant, contractor, agency, or other
|
|
36
|
-
service provider, regardless of its own Annual Revenue, solely to
|
|
37
|
-
build, deploy, host, operate, or support the Licensed Work for a client
|
|
38
|
-
whose own use would be Eligible Use under (a), (b), or (c). A service
|
|
39
|
-
provider's use for its own purposes is Eligible Use only if the service
|
|
40
|
-
provider itself qualifies under (b) or (c).
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
Hosted services. Offering the Licensed Work to third parties as a hosted
|
|
44
|
-
or managed service whose primary value is the Licensed Work is Eligible
|
|
45
|
-
Use only if each such third party's own use would be Eligible Use.
|
|
46
|
-
|
|
47
|
-
Definitions. "Organization" means any company, partnership, sole
|
|
48
|
-
proprietorship, trust, association, government body, or other entity, and
|
|
49
|
-
includes an individual acting in a business or professional capacity.
|
|
50
|
-
"Affiliate" means any entity that directly or indirectly controls, is
|
|
51
|
-
controlled by, or is under common control with an Organization, where
|
|
52
|
-
"control" means ownership of more than 50% of the voting interests of an
|
|
53
|
-
entity or the power to direct its management and policies by contract or
|
|
54
|
-
otherwise. "Annual Revenue" means the total gross revenue of an
|
|
55
|
-
Organization and all of its Affiliates combined, from all sources and
|
|
56
|
-
whether or not related to the Licensed Work, for its most recently
|
|
57
|
-
completed fiscal year, or, if it has not completed a fiscal year, for the
|
|
58
|
-
twelve months before the use (or since its formation, if shorter),
|
|
59
|
-
converted into US dollars at the average exchange rate for that period.
|
|
60
|
-
Proceeds of equity or debt financing are not revenue.
|
|
61
|
-
|
|
62
|
-
Threshold. If an Organization stops qualifying under (b), its existing
|
|
63
|
-
production use remains Eligible Use for 90 days after it stops
|
|
64
|
-
qualifying, after which it must obtain a commercial license or stop
|
|
65
|
-
production use. Use that was Eligible Use when it occurred never requires
|
|
66
|
-
a commercial license after the fact.
|
|
67
|
-
Change Date: Four years from the date a version of the Licensed Work
|
|
68
|
-
is first publicly released by the Licensor.
|
|
69
|
-
Change License: Apache License, Version 2.0
|
|
70
|
-
|
|
71
|
-
For information about alternative licensing arrangements for the Licensed
|
|
72
|
-
Work, please visit: https://agimon.ai/licensing
|
|
73
|
-
|
|
74
|
-
Notice
|
|
75
|
-
|
|
76
|
-
The Business Source License (this document, or the "License") is not an Open
|
|
77
|
-
Source license. However, the Licensed Work will eventually be made available
|
|
78
|
-
under an Open Source License, as stated in this License.
|
|
79
|
-
|
|
80
|
-
-----------------------------------------------------------------------------
|
|
81
|
-
|
|
82
|
-
Business Source License 1.1
|
|
83
|
-
|
|
84
|
-
Terms
|
|
85
|
-
|
|
86
|
-
The Licensor hereby grants you the right to copy, modify, create derivative
|
|
87
|
-
works, redistribute, and make non-production use of the Licensed Work. The
|
|
88
|
-
Licensor may make an Additional Use Grant, above, permitting limited
|
|
89
|
-
production use.
|
|
90
|
-
|
|
91
|
-
Effective on the Change Date, or the fourth anniversary of the first publicly
|
|
92
|
-
available distribution of a specific version of the Licensed Work under this
|
|
93
|
-
License, whichever comes first, the Licensor hereby grants you rights under
|
|
94
|
-
the terms of the Change License, and the rights granted in the paragraph
|
|
95
|
-
above terminate.
|
|
96
|
-
|
|
97
|
-
If your use of the Licensed Work does not comply with the requirements
|
|
98
|
-
currently in effect as described in this License, you must purchase a
|
|
99
|
-
commercial license from the Licensor, its affiliated entities, or authorized
|
|
100
|
-
resellers, or you must refrain from using the Licensed Work.
|
|
101
|
-
|
|
102
|
-
All copies of the original and modified Licensed Work, and derivative works
|
|
103
|
-
of the Licensed Work, are subject to this License. This License applies
|
|
104
|
-
separately for each version of the Licensed Work and the Change Date may vary
|
|
105
|
-
for each version of the Licensed Work released by Licensor.
|
|
106
|
-
|
|
107
|
-
You must conspicuously display this License on each original or modified copy
|
|
108
|
-
of the Licensed Work. If you receive the Licensed Work in original or
|
|
109
|
-
modified form from a third party, the terms and conditions set forth in this
|
|
110
|
-
License apply to your use of that work.
|
|
111
|
-
|
|
112
|
-
Any use of the Licensed Work in violation of this License will automatically
|
|
113
|
-
terminate your rights under this License for the current and all other
|
|
114
|
-
versions of the Licensed Work.
|
|
115
|
-
|
|
116
|
-
This License does not grant you any right in any trademark or logo of
|
|
117
|
-
Licensor or its affiliates (provided that you may use a trademark or logo of
|
|
118
|
-
Licensor as expressly required by this License).
|
|
119
|
-
|
|
120
|
-
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
|
|
121
|
-
AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
|
|
122
|
-
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
|
|
123
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
|
|
124
|
-
TITLE.
|
|
125
|
-
|
|
126
|
-
MariaDB hereby grants you permission to use this License’s text to license
|
|
127
|
-
your works, and to refer to it using the trademark “Business Source License”,
|
|
128
|
-
as long as you comply with the Covenants of Licensor below.
|
|
129
|
-
|
|
130
|
-
Covenants of Licensor
|
|
131
|
-
|
|
132
|
-
In consideration of the right to use this License’s text and the “Business
|
|
133
|
-
Source License” name and trademark, Licensor covenants to MariaDB, and to all
|
|
134
|
-
other recipients of the licensed work to be provided by Licensor:
|
|
135
|
-
|
|
136
|
-
1. To specify as the Change License the GPL Version 2.0 or any later version,
|
|
137
|
-
or a license that is compatible with GPL Version 2.0 or a later version,
|
|
138
|
-
where “compatible” means that software provided under the Change License can
|
|
139
|
-
be included in a program with software provided under GPL Version 2.0 or a
|
|
140
|
-
later version. Licensor may specify additional Change Licenses without
|
|
141
|
-
limitation.
|
|
142
|
-
|
|
143
|
-
2. To either: (a) specify an additional grant of rights to use that does not
|
|
144
|
-
impose any additional restriction on the right granted in this License, as
|
|
145
|
-
the Additional Use Grant; or (b) insert the text “None”.
|
|
146
|
-
|
|
147
|
-
3. To specify a Change Date.
|
|
148
|
-
|
|
149
|
-
4. Not to modify this License in any other way.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Agimon Pty Ltd
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineFill, defineHostStore, defineNativePlugin, defineToolRenderer, defineWebLifecycle } from "@agimon-ai/po-core/native";
|
|
2
2
|
import { View } from "react-native-unistyles/components/native/View";
|
|
3
3
|
import { Text } from "react-native-unistyles/components/native/Text";
|
|
4
|
-
import { Button, Dot, Input, ListRow, MessageItem, MessageItemBody, MessageItemHeader, MessageItemStatus, SheetBody, SheetDescription, SheetFooter, fontOf, resultTextLines, toolTone } from "@agimon-ai/po-native-components";
|
|
4
|
+
import { Button, Dot, EmptyState, Input, ListRow, MessageIcon, MessageItem, MessageItemBody, MessageItemHeader, MessageItemStatus, SearchIcon, SheetBody, SheetDescription, SheetFooter, fontOf, resultTextLines, toolTone } from "@agimon-ai/po-native-components";
|
|
5
5
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
6
6
|
import { StyleSheet } from "react-native-unistyles";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -170,17 +170,24 @@ function SendToSessionView({ sessions, to, busy, error, onPick, onSend }) {
|
|
|
170
170
|
style: styles$1.alert,
|
|
171
171
|
children: error
|
|
172
172
|
}),
|
|
173
|
-
sessions.length === 0 ? /* @__PURE__ */ jsx(
|
|
174
|
-
|
|
175
|
-
|
|
173
|
+
sessions.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {
|
|
174
|
+
size: "compact",
|
|
175
|
+
icon: /* @__PURE__ */ jsx(MessageIcon, { size: 16 }),
|
|
176
|
+
title: "No other session is running",
|
|
177
|
+
description: "Open one, then send."
|
|
176
178
|
}) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Input, {
|
|
177
179
|
accessibilityLabel: "Filter sessions",
|
|
178
180
|
placeholder: "Filter sessions",
|
|
179
181
|
value: filter,
|
|
180
182
|
onChangeText: setFilter
|
|
181
|
-
}), shown.length === 0 ? /* @__PURE__ */ jsx(
|
|
182
|
-
|
|
183
|
-
|
|
183
|
+
}), shown.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {
|
|
184
|
+
size: "compact",
|
|
185
|
+
icon: /* @__PURE__ */ jsx(SearchIcon, { size: 16 }),
|
|
186
|
+
title: "Nothing matches that filter",
|
|
187
|
+
secondaryAction: {
|
|
188
|
+
label: "Clear filter",
|
|
189
|
+
onAction: () => setFilter("")
|
|
190
|
+
}
|
|
184
191
|
}) : /* @__PURE__ */ jsx(View, {
|
|
185
192
|
style: styles$1.rows,
|
|
186
193
|
children: shown.map((session, index) => /* @__PURE__ */ jsxs(View, { children: [index > 0 ? /* @__PURE__ */ jsx(View, { style: styles$1.separator }) : null, /* @__PURE__ */ jsx(ListRow, {
|
|
@@ -236,13 +243,6 @@ const styles$1 = StyleSheet.create((theme) => {
|
|
|
236
243
|
color: theme.colors.dim,
|
|
237
244
|
uni__dependencies: [0]
|
|
238
245
|
},
|
|
239
|
-
empty: {
|
|
240
|
-
...small,
|
|
241
|
-
paddingVertical: theme.spacing(6),
|
|
242
|
-
textAlign: "center",
|
|
243
|
-
color: theme.colors.dim,
|
|
244
|
-
uni__dependencies: [0]
|
|
245
|
-
},
|
|
246
246
|
alert: {
|
|
247
247
|
...small,
|
|
248
248
|
color: theme.colors.red,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native.mjs","names":["WebPluginSessionOption","WebPluginSlotProps","Button","Dot","fontOf","Input","ListRow","SheetBody","SheetDescription","SheetFooter","useEffect","useMemo","useRef","useState","StyleSheet","sendToSession","TONE","running","waiting","idle","const","SendToSessionPanel","sessionId","listSessions","takeComposerDraft","appendComposerDraft","sessions","to","setTo","busy","setBusy","error","setError","held","text","inFlight","live","giveBack","current","state","undefined","send","Promise","trim","refusal","from","SendToSessionViewProps","onPick","id","onSend","SendToSessionView","filter","setFilter","shown","query","toLowerCase","session","name","detail","includes","target","find","styles","alert","length","empty","rows","map","index","separator","row","create","theme","small","fontFamily","sans","fontSize","sm","lineHeight","borderTopWidth","hairlineWidth","borderBottomWidth","borderColor","colors","uni__dependencies","paddingHorizontal","spacing","height","backgroundColor","color","dim","paddingVertical","textAlign","red","styles","ToolMessageRenderProps","fontOf","MessageItem","MessageItemBody","MessageItemHeader","MessageItemStatus","resultTextLines","toolTone","PoNativeTheme","StyleSheet","networkSummary","NetworkToolMessage","args","result","output","running","isError","toolName","lines","length","expanded","styles","summary","primary","body","map","line","index","String","error","dim","create","theme","flex","flexDirection","alignItems","minWidth","flexShrink","color","colors","text","fontFamily","sans","fontSize","base","uni__dependencies","gap","spacing","red","fillSendToSession","lifecycleStart","toolNetwork"],"sources":["../../src/extensions/workspaces/sessions/(frontend)/_lib/sendToSessionDelivery.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/sendToSessionRequest.native.ts","../../src/extensions/workspaces/sessions/(frontend)/fill/_components/SendToSessionPanel.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/fill/SendToSession.composer-menu.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/lifecycle/start.native.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/networkActivity.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/NetworkToolMessage.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/network.native.tsx","../../generated/native.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/native';\n\nimport { deliverToSession } from './sendToSessionDelivery';\n\n/**\n * The phone's started runtimes, one per computer, for the send-to-session panel.\n *\n * DESIGN PATTERNS:\n * - The native twin of sendToSessionRequest.ts: a native plugin may import\n * po-core/native only. The phone has no menu-to-overlay handoff, so only the\n * runtime list and the send live here.\n */\n\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\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 type { WebPluginSessionOption, WebPluginSlotProps } from '@agimon-ai/po-core/native';\nimport {\n Button,\n Dot,\n fontOf,\n Input,\n ListRow,\n SheetBody,\n SheetDescription,\n SheetFooter,\n} from '@agimon-ai/po-native-components';\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport { Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { sendToSession } from '../../_lib/sendToSessionRequest.native';\n\n/**\n * The phone's \"Send to session…\" page of the composer's Insert sheet: pick a\n * live session, then Send steers what the person typed into it.\n *\n * DESIGN PATTERNS:\n * - The draft is taken only at Send, so opening and leaving the page never\n * touches it. A refused send keeps the taken text for a retry and hands it\n * back to the composer when the page goes away.\n * - The sheet closes when the page appends to the draft; an empty append\n * closes it and leaves the draft alone.\n *\n * AVOID:\n * - Sending on a row tap. On a phone a mis-tap would send; Send is its own button.\n */\n\nconst TONE = { running: 'green', waiting: 'magenta', idle: 'neutral' } as const;\n\n/** The Insert sheet page: lists the computer's live sessions and steers the composer's text into one. */\nexport function SendToSessionPanel({\n sessionId,\n listSessions,\n takeComposerDraft,\n appendComposerDraft,\n}: WebPluginSlotProps) {\n const [sessions] = useState(() => listSessions?.() ?? []);\n const [to, setTo] = useState<string>();\n const [busy, setBusy] = useState(false);\n const [error, setError] = useState('');\n // Text taken from the composer and not yet delivered; `live` is false once the page is gone.\n const held = useRef<{ text?: string; inFlight: boolean; live: boolean }>({ inFlight: false, live: true });\n const giveBack = useRef(appendComposerDraft);\n useEffect(() => {\n giveBack.current = appendComposerDraft;\n }, [appendComposerDraft]);\n useEffect(() => {\n const state = held.current;\n state.live = true;\n return () => {\n state.live = false;\n if (state.text !== undefined && !state.inFlight) giveBack.current(state.text);\n };\n }, []);\n\n const send = async (): Promise<void> => {\n if (to === undefined || sessionId === null) return;\n const state = held.current;\n const text = state.text ?? takeComposerDraft?.() ?? '';\n if (text.trim() === '') {\n setError('Write something to send.');\n return;\n }\n state.text = text;\n state.inFlight = true;\n setBusy(true);\n setError('');\n const refusal = await sendToSession({ from: sessionId, to, text: text.trim() });\n state.inFlight = false;\n if (refusal === undefined) state.text = undefined;\n if (!state.live) {\n if (state.text !== undefined) giveBack.current(state.text);\n return;\n }\n if (refusal === undefined) {\n giveBack.current('');\n return;\n }\n setBusy(false);\n setError(refusal);\n };\n\n return (\n <SendToSessionView\n sessions={sessions}\n to={to}\n busy={busy}\n error={error}\n onPick={setTo}\n onSend={() => void send()}\n />\n );\n}\n\nexport interface SendToSessionViewProps {\n sessions: readonly WebPluginSessionOption[];\n to: string | undefined;\n busy: boolean;\n /** The server's refusal, shown above the list; empty when there is none. */\n error: string;\n onPick: (id: string) => void;\n onSend: () => void;\n}\n\nexport function SendToSessionView({ sessions, to, busy, error, onPick, onSend }: SendToSessionViewProps) {\n const [filter, setFilter] = useState('');\n const shown = useMemo(() => {\n const query = filter.trim().toLowerCase();\n return query === ''\n ? sessions\n : sessions.filter((session) => `${session.name} ${session.detail}`.toLowerCase().includes(query));\n }, [filter, sessions]);\n const target = sessions.find((session) => session.id === to);\n\n return (\n <>\n <SheetBody>\n <SheetDescription>Send what you typed to another session. It arrives there from you.</SheetDescription>\n {error === '' ? null : (\n <Text accessibilityRole=\"alert\" style={styles.alert}>\n {error}\n </Text>\n )}\n {sessions.length === 0 ? (\n <Text style={styles.empty}>No other session is running. Open one, then send.</Text>\n ) : (\n <>\n <Input\n accessibilityLabel=\"Filter sessions\"\n placeholder=\"Filter sessions\"\n value={filter}\n onChangeText={setFilter}\n />\n {shown.length === 0 ? (\n <Text style={styles.empty}>Nothing matches that filter</Text>\n ) : (\n <View style={styles.rows}>\n {shown.map((session, index) => (\n <View key={session.id}>\n {index > 0 ? <View style={styles.separator} /> : null}\n <ListRow\n accessibilityLabel={`${session.name}, ${session.detail}`}\n selected={session.id === to}\n disabled={busy}\n onPress={() => onPick(session.id)}\n disclosure={false}\n style={styles.row}\n leading={<Dot tone={TONE[session.state]} size=\"md\" />}\n title={session.name}\n description={\n <Text numberOfLines={1} style={styles.detail}>\n {session.detail}\n </Text>\n }\n />\n </View>\n ))}\n </View>\n )}\n </>\n )}\n </SheetBody>\n <SheetFooter>\n <Button variant=\"primary\" disabled={busy || target === undefined} onPress={onSend}>\n {busy ? 'Sending…' : target === undefined ? 'Pick a session' : `Send to ${target.name}`}\n </Button>\n </SheetFooter>\n </>\n );\n}\n\nconst styles = StyleSheet.create((theme) => {\n const small = {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeight.sm,\n };\n return {\n rows: {\n borderTopWidth: StyleSheet.hairlineWidth,\n borderBottomWidth: StyleSheet.hairlineWidth,\n borderColor: theme.colors['border-soft'],\n },\n row: { paddingHorizontal: theme.spacing(1) },\n separator: { height: StyleSheet.hairlineWidth, backgroundColor: theme.colors['border-soft'] },\n detail: { ...small, color: theme.colors.dim },\n empty: { ...small, paddingVertical: theme.spacing(6), textAlign: 'center', color: theme.colors.dim },\n alert: { ...small, color: theme.colors.red },\n };\n});\n","import { defineFill } from '@agimon-ai/po-core/native';\n\nimport { SendToSessionPanel } from './_components/SendToSessionPanel.native';\n\n/** The phone's Insert sheet draws `data` as the row and `component` as the page it opens. */\nexport default defineFill({\n data: { title: 'Send to session…', hint: 'Steer another session with what you typed' },\n component: SendToSessionPanel,\n});\n","import { defineWebLifecycle } from '@agimon-ai/po-core/native';\n\nimport { startSendToSessionRuntime } from '../_lib/sendToSessionRequest.native';\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 type { ToolMessageRenderProps } from '@agimon-ai/po-core/native';\nimport {\n fontOf,\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\n resultTextLines,\n toolTone,\n} from '@agimon-ai/po-native-components';\nimport type { PoNativeTheme } from '@agimon-ai/po-web-components/nativeTheme';\nimport { Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\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 lines = resultTextLines(result, output);\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable={lines.length > 0}>\n {({ expanded }) => (\n <>\n <MessageItemHeader title=\"network\">\n <View testID=\"tool-call-network\" style={styles.summary}>\n <Text numberOfLines={1} style={styles.primary}>\n {networkSummary(toolName, args)}\n </Text>\n </View>\n </MessageItemHeader>\n {expanded ? (\n <MessageItemBody testID=\"tool-result-network\" style={styles.body}>\n {running ? <MessageItemStatus tone=\"running\">working</MessageItemStatus> : null}\n {lines.map((line, index) => (\n <Text key={`${String(index)}-${line}`} selectable style={isError ? styles.error : styles.dim}>\n {line}\n </Text>\n ))}\n </MessageItemBody>\n ) : null}\n </>\n )}\n </MessageItem>\n );\n}\n\nconst styles = StyleSheet.create((theme: PoNativeTheme) => ({\n summary: { flex: 1, flexDirection: 'row', alignItems: 'center', minWidth: 0 },\n primary: {\n flexShrink: 1,\n minWidth: 0,\n color: theme.colors.text,\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n },\n body: { gap: theme.spacing(1) },\n dim: { color: theme.colors.dim, fontFamily: fontOf(theme.fontFamily.sans), fontSize: theme.fontSize.base },\n error: { color: theme.colors.red, fontFamily: fontOf(theme.fontFamily.sans), fontSize: theme.fontSize.base },\n}));\n","import { defineToolRenderer } from '@agimon-ai/po-core/native';\n\nimport { NetworkToolMessage } from './_components/NetworkToolMessage.native';\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 { defineNativePlugin, type WebPluginContributions } from '@agimon-ai/po-core/native';\n\nimport fillSendToSession from '../src/extensions/workspaces/sessions/(frontend)/fill/SendToSession.composer-menu.native';\nimport lifecycleStart from '../src/extensions/workspaces/sessions/(frontend)/lifecycle/start.native';\nimport toolNetwork from '../src/extensions/workspaces/sessions/(frontend)/tool/network.native';\n\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T =>\n (value === undefined ? undefined : { ...identity, ...(value as object) }) as T;\n\nexport const nativePlugin = defineNativePlugin({\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)]; },\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,O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a,eAAe,mBAAmB;CAC7C,IAAI;CACJ,aAAa;CACb,SAAS;EACP,IAAI,QAAyC;GAAE,OAAO,CAAC,IAAI;IAAE,MAAM;IAAiB,IAAI;GAAkB,GAAGI,0CAAiB,CAAC;EAAG;EAClI,IAAI,QAAyC;GAAE,OAAOC;EAAgB;EACtE,IAAI,gBAAyD;GAAE,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,SAAS,EAAE,GAAGC,sBAAW,CAAC;EAAG;CACpH;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"native.mjs","names":["WebPluginSessionOption","WebPluginSlotProps","Button","Dot","EmptyState","fontOf","Input","ListRow","MessageIcon","SearchIcon","SheetBody","SheetDescription","SheetFooter","useEffect","useMemo","useRef","useState","StyleSheet","sendToSession","TONE","running","waiting","idle","const","SendToSessionPanel","sessionId","listSessions","takeComposerDraft","appendComposerDraft","sessions","to","setTo","busy","setBusy","error","setError","held","text","inFlight","live","giveBack","current","state","undefined","send","Promise","trim","refusal","from","SendToSessionViewProps","onPick","id","onSend","SendToSessionView","filter","setFilter","shown","query","toLowerCase","session","name","detail","includes","target","find","styles","alert","length","label","onAction","rows","map","index","separator","row","create","theme","small","fontFamily","sans","fontSize","sm","lineHeight","borderTopWidth","hairlineWidth","borderBottomWidth","borderColor","colors","uni__dependencies","paddingHorizontal","spacing","height","backgroundColor","color","dim","red","styles","ToolMessageRenderProps","fontOf","MessageItem","MessageItemBody","MessageItemHeader","MessageItemStatus","resultTextLines","toolTone","PoNativeTheme","StyleSheet","networkSummary","NetworkToolMessage","args","result","output","running","isError","toolName","lines","length","expanded","styles","summary","primary","body","map","line","index","String","error","dim","create","theme","flex","flexDirection","alignItems","minWidth","flexShrink","color","colors","text","fontFamily","sans","fontSize","base","uni__dependencies","gap","spacing","red","fillSendToSession","lifecycleStart","toolNetwork"],"sources":["../../src/extensions/workspaces/sessions/(frontend)/_lib/sendToSessionDelivery.ts","../../src/extensions/workspaces/sessions/(frontend)/_lib/sendToSessionRequest.native.ts","../../src/extensions/workspaces/sessions/(frontend)/fill/_components/SendToSessionPanel.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/fill/SendToSession.composer-menu.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/lifecycle/start.native.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/networkActivity.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/NetworkToolMessage.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/network.native.tsx","../../generated/native.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/native';\n\nimport { deliverToSession } from './sendToSessionDelivery';\n\n/**\n * The phone's started runtimes, one per computer, for the send-to-session panel.\n *\n * DESIGN PATTERNS:\n * - The native twin of sendToSessionRequest.ts: a native plugin may import\n * po-core/native only. The phone has no menu-to-overlay handoff, so only the\n * runtime list and the send live here.\n */\n\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\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 type { WebPluginSessionOption, WebPluginSlotProps } from '@agimon-ai/po-core/native';\nimport {\n Button,\n Dot,\n EmptyState,\n fontOf,\n Input,\n ListRow,\n MessageIcon,\n SearchIcon,\n SheetBody,\n SheetDescription,\n SheetFooter,\n} from '@agimon-ai/po-native-components';\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport { Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { sendToSession } from '../../_lib/sendToSessionRequest.native';\n\n/**\n * The phone's \"Send to session…\" page of the composer's Insert sheet: pick a\n * live session, then Send steers what the person typed into it.\n *\n * DESIGN PATTERNS:\n * - The draft is taken only at Send, so opening and leaving the page never\n * touches it. A refused send keeps the taken text for a retry and hands it\n * back to the composer when the page goes away.\n * - The sheet closes when the page appends to the draft; an empty append\n * closes it and leaves the draft alone.\n *\n * AVOID:\n * - Sending on a row tap. On a phone a mis-tap would send; Send is its own button.\n */\n\nconst TONE = { running: 'green', waiting: 'magenta', idle: 'neutral' } as const;\n\n/** The Insert sheet page: lists the computer's live sessions and steers the composer's text into one. */\nexport function SendToSessionPanel({\n sessionId,\n listSessions,\n takeComposerDraft,\n appendComposerDraft,\n}: WebPluginSlotProps) {\n const [sessions] = useState(() => listSessions?.() ?? []);\n const [to, setTo] = useState<string>();\n const [busy, setBusy] = useState(false);\n const [error, setError] = useState('');\n // Text taken from the composer and not yet delivered; `live` is false once the page is gone.\n const held = useRef<{ text?: string; inFlight: boolean; live: boolean }>({ inFlight: false, live: true });\n const giveBack = useRef(appendComposerDraft);\n useEffect(() => {\n giveBack.current = appendComposerDraft;\n }, [appendComposerDraft]);\n useEffect(() => {\n const state = held.current;\n state.live = true;\n return () => {\n state.live = false;\n if (state.text !== undefined && !state.inFlight) giveBack.current(state.text);\n };\n }, []);\n\n const send = async (): Promise<void> => {\n if (to === undefined || sessionId === null) return;\n const state = held.current;\n const text = state.text ?? takeComposerDraft?.() ?? '';\n if (text.trim() === '') {\n setError('Write something to send.');\n return;\n }\n state.text = text;\n state.inFlight = true;\n setBusy(true);\n setError('');\n const refusal = await sendToSession({ from: sessionId, to, text: text.trim() });\n state.inFlight = false;\n if (refusal === undefined) state.text = undefined;\n if (!state.live) {\n if (state.text !== undefined) giveBack.current(state.text);\n return;\n }\n if (refusal === undefined) {\n giveBack.current('');\n return;\n }\n setBusy(false);\n setError(refusal);\n };\n\n return (\n <SendToSessionView\n sessions={sessions}\n to={to}\n busy={busy}\n error={error}\n onPick={setTo}\n onSend={() => void send()}\n />\n );\n}\n\nexport interface SendToSessionViewProps {\n sessions: readonly WebPluginSessionOption[];\n to: string | undefined;\n busy: boolean;\n /** The server's refusal, shown above the list; empty when there is none. */\n error: string;\n onPick: (id: string) => void;\n onSend: () => void;\n}\n\nexport function SendToSessionView({ sessions, to, busy, error, onPick, onSend }: SendToSessionViewProps) {\n const [filter, setFilter] = useState('');\n const shown = useMemo(() => {\n const query = filter.trim().toLowerCase();\n return query === ''\n ? sessions\n : sessions.filter((session) => `${session.name} ${session.detail}`.toLowerCase().includes(query));\n }, [filter, sessions]);\n const target = sessions.find((session) => session.id === to);\n\n return (\n <>\n <SheetBody>\n <SheetDescription>Send what you typed to another session. It arrives there from you.</SheetDescription>\n {error === '' ? null : (\n <Text accessibilityRole=\"alert\" style={styles.alert}>\n {error}\n </Text>\n )}\n {sessions.length === 0 ? (\n <EmptyState\n size=\"compact\"\n icon={<MessageIcon size={16} />}\n title=\"No other session is running\"\n description=\"Open one, then send.\"\n />\n ) : (\n <>\n <Input\n accessibilityLabel=\"Filter sessions\"\n placeholder=\"Filter sessions\"\n value={filter}\n onChangeText={setFilter}\n />\n {shown.length === 0 ? (\n <EmptyState\n size=\"compact\"\n icon={<SearchIcon size={16} />}\n title=\"Nothing matches that filter\"\n secondaryAction={{ label: 'Clear filter', onAction: () => setFilter('') }}\n />\n ) : (\n <View style={styles.rows}>\n {shown.map((session, index) => (\n <View key={session.id}>\n {index > 0 ? <View style={styles.separator} /> : null}\n <ListRow\n accessibilityLabel={`${session.name}, ${session.detail}`}\n selected={session.id === to}\n disabled={busy}\n onPress={() => onPick(session.id)}\n disclosure={false}\n style={styles.row}\n leading={<Dot tone={TONE[session.state]} size=\"md\" />}\n title={session.name}\n description={\n <Text numberOfLines={1} style={styles.detail}>\n {session.detail}\n </Text>\n }\n />\n </View>\n ))}\n </View>\n )}\n </>\n )}\n </SheetBody>\n <SheetFooter>\n <Button variant=\"primary\" disabled={busy || target === undefined} onPress={onSend}>\n {busy ? 'Sending…' : target === undefined ? 'Pick a session' : `Send to ${target.name}`}\n </Button>\n </SheetFooter>\n </>\n );\n}\n\nconst styles = StyleSheet.create((theme) => {\n const small = {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeight.sm,\n };\n return {\n rows: {\n borderTopWidth: StyleSheet.hairlineWidth,\n borderBottomWidth: StyleSheet.hairlineWidth,\n borderColor: theme.colors['border-soft'],\n },\n row: { paddingHorizontal: theme.spacing(1) },\n separator: { height: StyleSheet.hairlineWidth, backgroundColor: theme.colors['border-soft'] },\n detail: { ...small, color: theme.colors.dim },\n alert: { ...small, color: theme.colors.red },\n };\n});\n","import { defineFill } from '@agimon-ai/po-core/native';\n\nimport { SendToSessionPanel } from './_components/SendToSessionPanel.native';\n\n/** The phone's Insert sheet draws `data` as the row and `component` as the page it opens. */\nexport default defineFill({\n data: { title: 'Send to session…', hint: 'Steer another session with what you typed' },\n component: SendToSessionPanel,\n});\n","import { defineWebLifecycle } from '@agimon-ai/po-core/native';\n\nimport { startSendToSessionRuntime } from '../_lib/sendToSessionRequest.native';\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 type { ToolMessageRenderProps } from '@agimon-ai/po-core/native';\nimport {\n fontOf,\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\n resultTextLines,\n toolTone,\n} from '@agimon-ai/po-native-components';\nimport type { PoNativeTheme } from '@agimon-ai/po-web-components/nativeTheme';\nimport { Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\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 lines = resultTextLines(result, output);\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable={lines.length > 0}>\n {({ expanded }) => (\n <>\n <MessageItemHeader title=\"network\">\n <View testID=\"tool-call-network\" style={styles.summary}>\n <Text numberOfLines={1} style={styles.primary}>\n {networkSummary(toolName, args)}\n </Text>\n </View>\n </MessageItemHeader>\n {expanded ? (\n <MessageItemBody testID=\"tool-result-network\" style={styles.body}>\n {running ? <MessageItemStatus tone=\"running\">working</MessageItemStatus> : null}\n {lines.map((line, index) => (\n <Text key={`${String(index)}-${line}`} selectable style={isError ? styles.error : styles.dim}>\n {line}\n </Text>\n ))}\n </MessageItemBody>\n ) : null}\n </>\n )}\n </MessageItem>\n );\n}\n\nconst styles = StyleSheet.create((theme: PoNativeTheme) => ({\n summary: { flex: 1, flexDirection: 'row', alignItems: 'center', minWidth: 0 },\n primary: {\n flexShrink: 1,\n minWidth: 0,\n color: theme.colors.text,\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n },\n body: { gap: theme.spacing(1) },\n dim: { color: theme.colors.dim, fontFamily: fontOf(theme.fontFamily.sans), fontSize: theme.fontSize.base },\n error: { color: theme.colors.red, fontFamily: fontOf(theme.fontFamily.sans), fontSize: theme.fontSize.base },\n}));\n","import { defineToolRenderer } from '@agimon-ai/po-core/native';\n\nimport { NetworkToolMessage } from './_components/NetworkToolMessage.native';\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 { defineNativePlugin, type WebPluginContributions } from '@agimon-ai/po-core/native';\n\nimport fillSendToSession from '../src/extensions/workspaces/sessions/(frontend)/fill/SendToSession.composer-menu.native';\nimport lifecycleStart from '../src/extensions/workspaces/sessions/(frontend)/lifecycle/start.native';\nimport toolNetwork from '../src/extensions/workspaces/sessions/(frontend)/tool/network.native';\n\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T =>\n (value === undefined ? undefined : { ...identity, ...(value as object) }) as T;\n\nexport const nativePlugin = defineNativePlugin({\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)]; },\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,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