@agimon-ai/po-read 0.0.0-alpha.194 → 0.0.0-alpha.196

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 CHANGED
@@ -1,171 +1,6 @@
1
- License text copyright © 2017 MariaDB Corporation Ab, All Rights Reserved.
2
- "Business Source License" is a trademark of MariaDB Corporation Ab.
3
-
4
- Parameters
5
-
6
- Licensor: Agimon Pty Ltd
7
- Licensed Work: Po, the software in the Po source repository and the
8
- packages released from it, in each version released by
9
- the Licensor.
10
- The Licensed Work is (c) 2026 Agimon Pty Ltd.
11
- Material identified as third-party in the "Third-party
12
- components" section at the end of this file or in a
13
- NOTICE file, and any package or directory whose own
14
- license file grants a different license, is not part of
15
- the Licensed Work and remains under its own license.
16
- Additional Use Grant: You may make production use of the Licensed Work if
17
- your use is Eligible Use. "Eligible Use" is production use that falls
18
- within at least one of the following:
19
-
20
- (a) Personal Use. Use by an individual for their own personal purposes,
21
- and not on behalf of, or for the benefit of, an employer, client, or
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.
150
-
151
- -----------------------------------------------------------------------------
152
-
153
- Third-party components
154
-
155
- The following material in this package was written by third parties. It is
156
- not part of the Licensed Work, is not licensed under the Business Source
157
- License above, and remains under its own license, reproduced below. Where a
158
- file combines third-party material with changes by Agimon Pty Ltd, the
159
- third-party portions remain under their original license and the changes
160
- are part of the Licensed Work.
161
-
162
- 1. Phi writetool (https://github.com/pulseaiclub/phi/tree/main/internal/tools/writetool)
163
- Used in: hashline protocol and FNV anchor implementation
164
- License: MIT
165
-
166
1
  MIT License
167
2
 
168
- Copyright (c) 2026 pulseaiclub
3
+ Copyright (c) 2026 Agimon Pty Ltd
169
4
 
170
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
171
6
  of this software and associated documentation files (the "Software"), to deal
package/NOTICE ADDED
@@ -0,0 +1,35 @@
1
+ This package is licensed under the MIT License, see LICENSE.
2
+
3
+ Third-party components
4
+
5
+ The following material in this package was written by third parties. It is
6
+ not covered by this package's LICENSE and remains under its own license,
7
+ reproduced below. Where a file combines third-party material with changes by
8
+ Agimon Pty Ltd, the third-party portions remain under their original license
9
+ and the changes are licensed under this package's LICENSE.
10
+
11
+ 1. Phi writetool (https://github.com/pulseaiclub/phi/tree/main/internal/tools/writetool)
12
+ Used in: hashline protocol and FNV anchor implementation
13
+ License: MIT
14
+
15
+ MIT License
16
+
17
+ Copyright (c) 2026 pulseaiclub
18
+
19
+ Permission is hereby granted, free of charge, to any person obtaining a copy
20
+ of this software and associated documentation files (the "Software"), to deal
21
+ in the Software without restriction, including without limitation the rights
22
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
23
+ copies of the Software, and to permit persons to whom the Software is
24
+ furnished to do so, subject to the following conditions:
25
+
26
+ The above copyright notice and this permission notice shall be included in all
27
+ copies or substantial portions of the Software.
28
+
29
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35
+ SOFTWARE.
package/README.md CHANGED
@@ -60,6 +60,6 @@ Maintained by [Agimon](https://agimon.ai/about).
60
60
 
61
61
  ## License
62
62
 
63
- Business Source License 1.1: free for personal use, organisations under USD 1M revenue, non-profits and education. See [LICENSE](LICENSE) and https://agimon.ai/licensing.
63
+ MIT. See [LICENSE](LICENSE).
64
64
 
65
65
  The server entry declares the native tool. Tool declarations consume logic from named service folders; flat `src/exports` files expose reusable factories and schemas.
@@ -1,4 +1,4 @@
1
- import { defineNativePlugin, defineToolRenderer } from "@agimon-ai/po-core/native";
1
+ import { defineNativePlugin, defineToolRenderer, useT } 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
4
  import { HashlineLines, MessageItem, MessageItemBody, MessageItemHeader, MessageItemStatus, ToolPathLink, ToolResultImage, fontOf, hashlineBody, resultTextLines, toolTone } from "@agimon-ai/po-native-components";
@@ -9,12 +9,12 @@ function optionalNumber(value) {
9
9
  return typeof value === "number" && Number.isFinite(value) ? value : void 0;
10
10
  }
11
11
  /** What the read call heading shows: the path, then the offset and limit when given. */
12
- function readCallView(args) {
12
+ function readCallView(args, t) {
13
13
  const offset = optionalNumber(args.offset);
14
14
  const limit = optionalNumber(args.limit);
15
15
  return {
16
16
  path: typeof args.path === "string" ? args.path : "",
17
- details: [offset === void 0 ? void 0 : `from ${offset}`, limit === void 0 ? void 0 : `${limit} lines`].filter((value) => value !== void 0 && value.length > 0)
17
+ details: [offset === void 0 ? void 0 : t?.("read.ui.fromLine", "from {line}", { line: offset }) ?? `from ${offset}`, limit === void 0 ? void 0 : t?.("read.ui.lines", "{count} lines", { count: limit }) ?? `${limit} lines`].filter((value) => value !== void 0 && value.length > 0)
18
18
  };
19
19
  }
20
20
  const IMAGE_MIME_TYPES = /* @__PURE__ */ new Set([
@@ -46,7 +46,8 @@ const IMAGE_HEIGHT = 240;
46
46
  */
47
47
  function ReadToolMessage(props) {
48
48
  const { args, result, output, running, isError, fileTabFor, openTransientTab } = props;
49
- const view = readCallView(args);
49
+ const t = useT();
50
+ const view = readCallView(args, t);
50
51
  const images = resultImages(result?.content ?? []);
51
52
  const tab = fileTabFor(view.path);
52
53
  const body = result === null || isError ? null : hashlineBody(result, output, "read", true);
@@ -75,7 +76,7 @@ function ReadToolMessage(props) {
75
76
  testID: "tool-result-read",
76
77
  children: [/* @__PURE__ */ jsx(MessageItemStatus, {
77
78
  tone: "error",
78
- children: "failed"
79
+ children: t("read.ui.failed", "failed")
79
80
  }), resultTextLines(result, output).map((line, index) => /* @__PURE__ */ jsx(Text, {
80
81
  selectable: true,
81
82
  style: [styles.sans, styles.error],
@@ -85,7 +86,7 @@ function ReadToolMessage(props) {
85
86
  testID: "tool-result-read",
86
87
  children: /* @__PURE__ */ jsx(MessageItemStatus, {
87
88
  tone: "running",
88
- children: "running"
89
+ children: t("read.ui.running", "running")
89
90
  })
90
91
  }) : null : body.shown.length === 0 && body.notice === void 0 && images.length === 0 ? null : /* @__PURE__ */ jsxs(MessageItemBody, {
91
92
  testID: "tool-result-read",
@@ -99,7 +100,7 @@ function ReadToolMessage(props) {
99
100
  host: props,
100
101
  data: image.data,
101
102
  mimeType: image.mimeType,
102
- accessibilityLabel: `Read result ${String(index + 1)}`,
103
+ accessibilityLabel: t("read.ui.resultImage", "Read result {index}", { index: index + 1 }),
103
104
  testID: "tool-result-read-image",
104
105
  resizeMode: "contain",
105
106
  style: styles.image
@@ -1 +1 @@
1
- {"version":3,"file":"native.mjs","names":["ToolMessageRenderProps","fontOf","HashlineLines","hashlineBody","MessageItem","MessageItemBody","MessageItemHeader","MessageItemStatus","resultTextLines","ToolPathLink","toolTone","ToolResultImage","PoNativeTheme","StyleSheet","readCallView","resultImages","IMAGE_HEIGHT","ReadToolMessage","props","args","result","output","running","isError","fileTabFor","openTransientTab","view","images","content","tab","path","body","expanded","styles","summary","undefined","onOpen","details","length","sans","detail","join","map","line","index","String","error","shown","notice","gutter","image","mimeType","data","create","theme","flex","flexDirection","alignItems","gap","spacing","minWidth","uni__dependencies","fontFamily","fontSize","base","lineHeight","flexShrink","color","colors","faint","red","width","height","borderRadius","md","borderWidth","borderColor","toolRead"],"sources":["../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/readToolView.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ReadToolMessage.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/read.native.tsx","../../generated/native.ts"],"sourcesContent":["// Imports nothing at runtime: the web and native cards share it, and the native\n// bundle may not load the web component library.\n\nexport interface ReadCallView {\n readonly path: string;\n /** `from N` and `N lines`, as the TUI's call heading lists them. */\n readonly details: readonly string[];\n}\n\nfunction optionalNumber(value: unknown): number | undefined {\n return typeof value === 'number' && Number.isFinite(value) ? value : undefined;\n}\n\n/** What the read call heading shows: the path, then the offset and limit when given. */\nexport function readCallView(args: Readonly<Record<string, unknown>>): ReadCallView {\n const offset = optionalNumber(args.offset);\n const limit = optionalNumber(args.limit);\n return {\n path: typeof args.path === 'string' ? args.path : '',\n details: [\n offset === undefined ? undefined : `from ${offset}`,\n limit === undefined ? undefined : `${limit} lines`,\n ].filter((value): value is string => value !== undefined && value.length > 0),\n };\n}\n\nconst IMAGE_MIME_TYPES = new Set(['image/png', 'image/jpeg', 'image/gif', 'image/webp']);\n\n/** The image blocks a read returned, limited to the formats both cards can draw. */\nexport function resultImages(content: readonly unknown[]): Array<{ data: string; mimeType: string }> {\n return content.flatMap((block) => {\n if (typeof block !== 'object' || block === null || Array.isArray(block)) return [];\n const value = block as Record<string, unknown>;\n return value.type === 'image' &&\n typeof value.data === 'string' &&\n typeof value.mimeType === 'string' &&\n IMAGE_MIME_TYPES.has(value.mimeType)\n ? [{ data: value.data, mimeType: value.mimeType }]\n : [];\n });\n}\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/native';\nimport {\n fontOf,\n HashlineLines,\n hashlineBody,\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\n resultTextLines,\n ToolPathLink,\n toolTone,\n ToolResultImage,\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 { readCallView, resultImages } from '../_lib/readToolView';\n\n/** Height an image result gets in the card; the web caps it at 24rem. */\nconst IMAGE_HEIGHT = 240;\n\n/**\n * The read tool's timeline item on native, as the web's ReadToolMessage: the\n * path and range in the header and, once expanded, the anchored lines with a\n * line-number gutter and any image the read returned, or the tool's message\n * in red when the read failed.\n */\nexport function ReadToolMessage(props: ToolMessageRenderProps) {\n const { args, result, output, running, isError, fileTabFor, openTransientTab } = props;\n const view = readCallView(args);\n const images = resultImages(result?.content ?? []);\n const tab = fileTabFor(view.path);\n const body = result === null || isError ? null : hashlineBody(result, output, 'read', true);\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable defaultExpanded={false}>\n {({ expanded }) => (\n <>\n <MessageItemHeader title=\"read\">\n <View testID=\"tool-call-read\" style={styles.summary}>\n <ToolPathLink path={view.path} {...(tab === undefined ? {} : { onOpen: () => openTransientTab(tab) })} />\n {view.details.length > 0 ? (\n <Text numberOfLines={1} style={[styles.sans, styles.detail]}>\n · {view.details.join(' · ')}\n </Text>\n ) : null}\n </View>\n </MessageItemHeader>\n {expanded ? (\n isError ? (\n <MessageItemBody testID=\"tool-result-read\">\n <MessageItemStatus tone=\"error\">failed</MessageItemStatus>\n {resultTextLines(result, output).map((line, index) => (\n <Text key={`${String(index)}-${line}`} selectable style={[styles.sans, styles.error]}>\n {line}\n </Text>\n ))}\n </MessageItemBody>\n ) : body === null ? (\n running ? (\n <MessageItemBody testID=\"tool-result-read\">\n <MessageItemStatus tone=\"running\">running</MessageItemStatus>\n </MessageItemBody>\n ) : null\n ) : body.shown.length === 0 && body.notice === undefined && images.length === 0 ? null : (\n <MessageItemBody testID=\"tool-result-read\">\n <HashlineLines lines={body.shown} gutter={body.gutter} path={view.path} />\n {images.map((image, index) => (\n <ToolResultImage\n key={`${image.mimeType}:${String(index)}`}\n host={props}\n data={image.data}\n mimeType={image.mimeType}\n accessibilityLabel={`Read result ${String(index + 1)}`}\n testID=\"tool-result-read-image\"\n resizeMode=\"contain\"\n style={styles.image}\n />\n ))}\n {body.notice !== undefined ? <Text style={[styles.sans, styles.detail]}>{body.notice}</Text> : null}\n </MessageItemBody>\n )\n ) : null}\n </>\n )}\n </MessageItem>\n );\n}\n\nconst styles = StyleSheet.create((theme: PoNativeTheme) => ({\n summary: { flex: 1, flexDirection: 'row', alignItems: 'center', gap: theme.spacing(2), minWidth: 0 },\n sans: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeight.base,\n },\n detail: { flexShrink: 1, color: theme.colors.faint },\n error: { color: theme.colors.red },\n image: {\n width: '100%',\n height: IMAGE_HEIGHT,\n borderRadius: theme.borderRadius.md,\n borderWidth: 1,\n borderColor: theme.colors['border-soft'],\n },\n}));\n","import { defineToolRenderer } from '@agimon-ai/po-core/native';\n\nimport { ReadToolMessage } from './_components/ReadToolMessage.native';\n\nexport default defineToolRenderer({ message: ReadToolMessage });\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineNativePlugin, type WebPluginContributions } from '@agimon-ai/po-core/native';\n\nimport toolRead from '../src/extensions/workspaces/sessions/(frontend)/tool/read.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: 'read',\n packageName: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,CAAA,CAAA;CAC1C;AACF,EAAE;;;ACtGF,IAAA,sBAAe,mBAAmB,EAAE,SAAS,gBAAgB,CAAC;;;ACC9D,MAAM,OAAU,UAAmC,UAChD,UAAU,KAAA,IAAY,KAAA,IAAY;CAAE,GAAG;CAAU,GAAI;AAAiB;AAEzE,MAAa,eAAe,mBAAmB;CAC7C,IAAI;CACJ,aAAa;CACb,SAAS,EACP,IAAI,gBAAyD;EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,EAAE,GAAGgB,mBAAQ,CAAC;CAAG,EAC9G;AACF,CAAC"}
1
+ {"version":3,"file":"native.mjs","names":["useT","ToolMessageRenderProps","fontOf","HashlineLines","hashlineBody","MessageItem","MessageItemBody","MessageItemHeader","MessageItemStatus","resultTextLines","ToolPathLink","toolTone","ToolResultImage","PoNativeTheme","StyleSheet","readCallView","resultImages","IMAGE_HEIGHT","ReadToolMessage","props","args","result","output","running","isError","fileTabFor","openTransientTab","t","view","images","content","tab","path","body","expanded","styles","summary","undefined","onOpen","details","length","sans","detail","join","map","line","index","String","error","shown","notice","gutter","image","mimeType","data","create","theme","flex","flexDirection","alignItems","gap","spacing","minWidth","uni__dependencies","fontFamily","fontSize","base","lineHeight","flexShrink","color","colors","faint","red","width","height","borderRadius","md","borderWidth","borderColor","toolRead"],"sources":["../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/readToolView.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ReadToolMessage.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/read.native.tsx","../../generated/native.ts"],"sourcesContent":["// Imports nothing at runtime: the web and native cards share it, and the native\n// bundle may not load the web component library.\n\ntype Translate = (key: string, fallback: string, vars?: Readonly<Record<string, string | number>>) => string;\n\nexport interface ReadCallView {\n readonly path: string;\n /** `from N` and `N lines`, as the TUI's call heading lists them. */\n readonly details: readonly string[];\n}\n\nfunction optionalNumber(value: unknown): number | undefined {\n return typeof value === 'number' && Number.isFinite(value) ? value : undefined;\n}\n\n/** What the read call heading shows: the path, then the offset and limit when given. */\nexport function readCallView(args: Readonly<Record<string, unknown>>, t?: Translate): ReadCallView {\n const offset = optionalNumber(args.offset);\n const limit = optionalNumber(args.limit);\n return {\n path: typeof args.path === 'string' ? args.path : '',\n details: [\n offset === undefined ? undefined : (t?.('read.ui.fromLine', 'from {line}', { line: offset }) ?? `from ${offset}`),\n limit === undefined ? undefined : (t?.('read.ui.lines', '{count} lines', { count: limit }) ?? `${limit} lines`),\n ].filter((value): value is string => value !== undefined && value.length > 0),\n };\n}\n\nconst IMAGE_MIME_TYPES = new Set(['image/png', 'image/jpeg', 'image/gif', 'image/webp']);\n\n/** The image blocks a read returned, limited to the formats both cards can draw. */\nexport function resultImages(content: readonly unknown[]): Array<{ data: string; mimeType: string }> {\n return content.flatMap((block) => {\n if (typeof block !== 'object' || block === null || Array.isArray(block)) return [];\n const value = block as Record<string, unknown>;\n return value.type === 'image' &&\n typeof value.data === 'string' &&\n typeof value.mimeType === 'string' &&\n IMAGE_MIME_TYPES.has(value.mimeType)\n ? [{ data: value.data, mimeType: value.mimeType }]\n : [];\n });\n}\n","import { useT } from '@agimon-ai/po-core/native';\nimport type { ToolMessageRenderProps } from '@agimon-ai/po-core/native';\nimport {\n fontOf,\n HashlineLines,\n hashlineBody,\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\n resultTextLines,\n ToolPathLink,\n toolTone,\n ToolResultImage,\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 { readCallView, resultImages } from '../_lib/readToolView';\n\n/** Height an image result gets in the card; the web caps it at 24rem. */\nconst IMAGE_HEIGHT = 240;\n\n/**\n * The read tool's timeline item on native, as the web's ReadToolMessage: the\n * path and range in the header and, once expanded, the anchored lines with a\n * line-number gutter and any image the read returned, or the tool's message\n * in red when the read failed.\n */\nexport function ReadToolMessage(props: ToolMessageRenderProps) {\n const { args, result, output, running, isError, fileTabFor, openTransientTab } = props;\n const t = useT();\n const view = readCallView(args, t);\n const images = resultImages(result?.content ?? []);\n const tab = fileTabFor(view.path);\n const body = result === null || isError ? null : hashlineBody(result, output, 'read', true);\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable defaultExpanded={false}>\n {({ expanded }) => (\n <>\n {/* no-untranslated-jsx: ignore - Tool identifier matches the invocation. */}\n <MessageItemHeader title=\"read\">\n <View testID=\"tool-call-read\" style={styles.summary}>\n <ToolPathLink path={view.path} {...(tab === undefined ? {} : { onOpen: () => openTransientTab(tab) })} />\n {view.details.length > 0 ? (\n <Text numberOfLines={1} style={[styles.sans, styles.detail]}>\n · {view.details.join(' · ')}\n </Text>\n ) : null}\n </View>\n </MessageItemHeader>\n {expanded ? (\n isError ? (\n <MessageItemBody testID=\"tool-result-read\">\n <MessageItemStatus tone=\"error\">{t('read.ui.failed', 'failed')}</MessageItemStatus>\n {resultTextLines(result, output).map((line, index) => (\n <Text key={`${String(index)}-${line}`} selectable style={[styles.sans, styles.error]}>\n {line}\n </Text>\n ))}\n </MessageItemBody>\n ) : body === null ? (\n running ? (\n <MessageItemBody testID=\"tool-result-read\">\n <MessageItemStatus tone=\"running\">{t('read.ui.running', 'running')}</MessageItemStatus>\n </MessageItemBody>\n ) : null\n ) : body.shown.length === 0 && body.notice === undefined && images.length === 0 ? null : (\n <MessageItemBody testID=\"tool-result-read\">\n <HashlineLines lines={body.shown} gutter={body.gutter} path={view.path} />\n {images.map((image, index) => (\n <ToolResultImage\n key={`${image.mimeType}:${String(index)}`}\n host={props}\n data={image.data}\n mimeType={image.mimeType}\n accessibilityLabel={t('read.ui.resultImage', 'Read result {index}', { index: index + 1 })}\n testID=\"tool-result-read-image\"\n resizeMode=\"contain\"\n style={styles.image}\n />\n ))}\n {body.notice !== undefined ? <Text style={[styles.sans, styles.detail]}>{body.notice}</Text> : null}\n </MessageItemBody>\n )\n ) : null}\n </>\n )}\n </MessageItem>\n );\n}\n\nconst styles = StyleSheet.create((theme: PoNativeTheme) => ({\n summary: { flex: 1, flexDirection: 'row', alignItems: 'center', gap: theme.spacing(2), minWidth: 0 },\n sans: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeight.base,\n },\n detail: { flexShrink: 1, color: theme.colors.faint },\n error: { color: theme.colors.red },\n image: {\n width: '100%',\n height: IMAGE_HEIGHT,\n borderRadius: theme.borderRadius.md,\n borderWidth: 1,\n borderColor: theme.colors['border-soft'],\n },\n}));\n","import { defineToolRenderer } from '@agimon-ai/po-core/native';\n\nimport { ReadToolMessage } from './_components/ReadToolMessage.native';\n\nexport default defineToolRenderer({ message: ReadToolMessage });\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineNativePlugin, type WebPluginContributions } from '@agimon-ai/po-core/native';\n\nimport toolRead from '../src/extensions/workspaces/sessions/(frontend)/tool/read.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: 'read',\n packageName: '@agimon-ai/po-read',\n session: {\n get toolRenderers(): WebPluginContributions['toolRenderers'] { return [via({ tools: ['read'] }, toolRead)]; },\n },\n});\n"],"mappings":";;;;;;;AAWA,SAAS,eAAe,OAAoC;CAC1D,OAAO,OAAO,UAAU,YAAY,OAAO,SAAS,KAAK,IAAI,QAAQ,KAAA;AACvE;;AAGA,SAAgB,aAAa,MAAyC,GAA6B;CACjG,MAAM,SAAS,eAAe,KAAK,MAAM;CACzC,MAAM,QAAQ,eAAe,KAAK,KAAK;CACvC,OAAO;EACL,MAAM,OAAO,KAAK,SAAS,WAAW,KAAK,OAAO;EAClD,SAAS,CACP,WAAW,KAAA,IAAY,KAAA,IAAa,IAAI,oBAAoB,eAAe,EAAE,MAAM,OAAO,CAAC,KAAK,QAAQ,UACxG,UAAU,KAAA,IA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AC,IAAI,EAAE,OAAO,CAAC,MAAM,EAAE,GAAGgB,mBAAQ,CAAC;CAAG,EAC9G;AACF,CAAC"}
@@ -1,4 +1,4 @@
1
- import { defineToolRenderer, defineWebPlugin } from "@agimon-ai/po-core/web";
1
+ import { defineToolRenderer, defineWebPlugin, useT } from "@agimon-ai/po-core/web";
2
2
  import { HashlineLines, MessageItem, MessageItemBody, MessageItemHeader, MessageItemStatus, ToolPathLink, ViewableImage, hashlineBody, resultTextLines, toolTone } from "@agimon-ai/po-web-components";
3
3
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
4
  //#region src/extensions/workspaces/sessions/(frontend)/tool/_lib/readToolView.ts
@@ -6,12 +6,12 @@ function optionalNumber(value) {
6
6
  return typeof value === "number" && Number.isFinite(value) ? value : void 0;
7
7
  }
8
8
  /** What the read call heading shows: the path, then the offset and limit when given. */
9
- function readCallView(args) {
9
+ function readCallView(args, t) {
10
10
  const offset = optionalNumber(args.offset);
11
11
  const limit = optionalNumber(args.limit);
12
12
  return {
13
13
  path: typeof args.path === "string" ? args.path : "",
14
- details: [offset === void 0 ? void 0 : `from ${offset}`, limit === void 0 ? void 0 : `${limit} lines`].filter((value) => value !== void 0 && value.length > 0)
14
+ details: [offset === void 0 ? void 0 : t?.("read.ui.fromLine", "from {line}", { line: offset }) ?? `from ${offset}`, limit === void 0 ? void 0 : t?.("read.ui.lines", "{count} lines", { count: limit }) ?? `${limit} lines`].filter((value) => value !== void 0 && value.length > 0)
15
15
  };
16
16
  }
17
17
  const IMAGE_MIME_TYPES = /* @__PURE__ */ new Set([
@@ -40,7 +40,8 @@ function resultImages(content) {
40
40
  * tool's message in red inside the expanded body instead.
41
41
  */
42
42
  function ReadToolMessage({ args, result, output, running, isError, fileTabFor, openTransientTab }) {
43
- const view = readCallView(args);
43
+ const t = useT();
44
+ const view = readCallView(args, t);
44
45
  const images = resultImages(result?.content ?? []);
45
46
  const tab = fileTabFor(view.path);
46
47
  const body = result === null || isError ? null : hashlineBody(result, output, "read", true);
@@ -70,7 +71,7 @@ function ReadToolMessage({ args, result, output, running, isError, fileTabFor, o
70
71
  className: "flex flex-col",
71
72
  children: [/* @__PURE__ */ jsx(MessageItemStatus, {
72
73
  tone: "error",
73
- children: "failed"
74
+ children: t("read.ui.failed", "failed")
74
75
  }), resultTextLines(result, output).map((line, index) => /* @__PURE__ */ jsx("span", {
75
76
  className: "whitespace-pre-wrap break-words text-po-red",
76
77
  children: line
@@ -79,7 +80,7 @@ function ReadToolMessage({ args, result, output, running, isError, fileTabFor, o
79
80
  "data-testid": "tool-result-read",
80
81
  children: /* @__PURE__ */ jsx(MessageItemStatus, {
81
82
  tone: "running",
82
- children: "running"
83
+ children: t("read.ui.running", "running")
83
84
  })
84
85
  }) : null : body.shown.length === 0 && body.notice === void 0 && images.length === 0 ? null : /* @__PURE__ */ jsxs(MessageItemBody, {
85
86
  "data-testid": "tool-result-read",
@@ -92,7 +93,7 @@ function ReadToolMessage({ args, result, output, running, isError, fileTabFor, o
92
93
  }),
93
94
  images.map((image, index) => /* @__PURE__ */ jsx(ViewableImage, {
94
95
  src: `data:${image.mimeType};base64,${image.data}`,
95
- alt: `Read result ${String(index + 1)}`,
96
+ alt: t("read.ui.resultImage", "Read result {index}", { index: index + 1 }),
96
97
  "data-testid": "tool-result-read-image",
97
98
  className: "h-auto max-h-96 max-w-full rounded-md border border-po-border-soft object-contain"
98
99
  }, `${image.mimeType}:${String(index)}`)),
@@ -1 +1 @@
1
- {"version":3,"file":"web.mjs","names":["toolRead"],"sources":["../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/readToolView.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ReadToolMessage.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/read.web.tsx","../../generated/web.ts"],"sourcesContent":["// Imports nothing at runtime: the web and native cards share it, and the native\n// bundle may not load the web component library.\n\nexport interface ReadCallView {\n readonly path: string;\n /** `from N` and `N lines`, as the TUI's call heading lists them. */\n readonly details: readonly string[];\n}\n\nfunction optionalNumber(value: unknown): number | undefined {\n return typeof value === 'number' && Number.isFinite(value) ? value : undefined;\n}\n\n/** What the read call heading shows: the path, then the offset and limit when given. */\nexport function readCallView(args: Readonly<Record<string, unknown>>): ReadCallView {\n const offset = optionalNumber(args.offset);\n const limit = optionalNumber(args.limit);\n return {\n path: typeof args.path === 'string' ? args.path : '',\n details: [\n offset === undefined ? undefined : `from ${offset}`,\n limit === undefined ? undefined : `${limit} lines`,\n ].filter((value): value is string => value !== undefined && value.length > 0),\n };\n}\n\nconst IMAGE_MIME_TYPES = new Set(['image/png', 'image/jpeg', 'image/gif', 'image/webp']);\n\n/** The image blocks a read returned, limited to the formats both cards can draw. */\nexport function resultImages(content: readonly unknown[]): Array<{ data: string; mimeType: string }> {\n return content.flatMap((block) => {\n if (typeof block !== 'object' || block === null || Array.isArray(block)) return [];\n const value = block as Record<string, unknown>;\n return value.type === 'image' &&\n typeof value.data === 'string' &&\n typeof value.mimeType === 'string' &&\n IMAGE_MIME_TYPES.has(value.mimeType)\n ? [{ data: value.data, mimeType: value.mimeType }]\n : [];\n });\n}\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/web';\nimport {\n HashlineLines,\n hashlineBody,\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\n resultTextLines,\n ToolPathLink,\n toolTone,\n ViewableImage,\n} from '@agimon-ai/po-web-components';\n\nimport { readCallView, resultImages } from '../_lib/readToolView';\n\n/**\n * The read tool's timeline item, the web half of its renderCall and\n * renderResult: the call summary in the header and, when expanded, the\n * anchored lines with a line-number gutter in the body. A failure shows the\n * tool's message in red inside the expanded body instead.\n */\nexport function ReadToolMessage({\n args,\n result,\n output,\n running,\n isError,\n fileTabFor,\n openTransientTab,\n}: ToolMessageRenderProps) {\n const view = readCallView(args);\n const images = resultImages(result?.content ?? []);\n // A read is the one call whose file the session usually has not changed, so\n // this is the link that opens it read-only rather than in its history.\n const tab = fileTabFor(view.path);\n const body = result === null || isError ? null : hashlineBody(result, output, 'read', true);\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable defaultExpanded={false}>\n {({ expanded }) => {\n return (\n <>\n <MessageItemHeader title=\"read\">\n <span data-testid=\"tool-call-read\" className=\"flex min-w-0 flex-1 items-center gap-2\">\n <ToolPathLink\n path={view.path}\n {...(tab === undefined ? {} : { onOpen: () => openTransientTab(tab) })}\n />\n {view.details.length > 0 ? (\n <span className=\"shrink-0 text-po-faint\">· {view.details.join(' · ')}</span>\n ) : null}\n </span>\n </MessageItemHeader>\n {expanded ? (\n isError ? (\n <MessageItemBody data-testid=\"tool-result-read\" className=\"flex flex-col\">\n <MessageItemStatus tone=\"error\">failed</MessageItemStatus>\n {resultTextLines(result, output).map((line, index) => (\n <span key={`${String(index)}-${line}`} className=\"whitespace-pre-wrap break-words text-po-red\">\n {line}\n </span>\n ))}\n </MessageItemBody>\n ) : body === null ? (\n running ? (\n <MessageItemBody data-testid=\"tool-result-read\">\n <MessageItemStatus tone=\"running\">running</MessageItemStatus>\n </MessageItemBody>\n ) : null\n ) : body.shown.length === 0 && body.notice === undefined && images.length === 0 ? null : (\n <MessageItemBody data-testid=\"tool-result-read\" className=\"flex flex-col gap-1\">\n {/* A read body is one file with no heading of its own, so the\n call's path is what names the grammar for it. */}\n <HashlineLines lines={body.shown} gutter={body.gutter} path={view.path} />\n {images.map((image, index) => (\n <ViewableImage\n key={`${image.mimeType}:${String(index)}`}\n src={`data:${image.mimeType};base64,${image.data}`}\n alt={`Read result ${String(index + 1)}`}\n data-testid=\"tool-result-read-image\"\n className=\"h-auto max-h-96 max-w-full rounded-md border border-po-border-soft object-contain\"\n />\n ))}\n {body.notice !== undefined ? <span className=\"text-po-faint\">{body.notice}</span> : null}\n </MessageItemBody>\n )\n ) : null}\n </>\n );\n }}\n </MessageItem>\n );\n}\n","import { defineToolRenderer } from '@agimon-ai/po-core/web';\n\nimport { ReadToolMessage } from './_components/ReadToolMessage';\n\nexport default defineToolRenderer({ message: ReadToolMessage });\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineWebPlugin, type WebPluginContributions } from '@agimon-ai/po-core/web';\n\nimport toolRead from '../src/extensions/workspaces/sessions/(frontend)/tool/read.web';\n\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T =>\n (value === undefined ? undefined : { ...identity, ...(value as object) }) as T;\n\nexport const webPlugin = defineWebPlugin({\n id: 'read',\n packageName: '@agimon-ai/po-read',\n session: {\n get toolRenderers(): WebPluginContributions['toolRenderers'] { return [via({ tools: ['read'] }, toolRead)]; },\n },\n});\n"],"mappings":";;;;AASA,SAAS,eAAe,OAAoC;CAC1D,OAAO,OAAO,UAAU,YAAY,OAAO,SAAS,KAAK,IAAI,QAAQ,KAAA;AACvE;;AAGA,SAAgB,aAAa,MAAuD;CAClF,MAAM,SAAS,eAAe,KAAK,MAAM;CACzC,MAAM,QAAQ,eAAe,KAAK,KAAK;CACvC,OAAO;EACL,MAAM,OAAO,KAAK,SAAS,WAAW,KAAK,OAAO;EAClD,SAAS,CACP,WAAW,KAAA,IAAY,KAAA,IAAY,QAAQ,UAC3C,UAAU,KAAA,IAAY,KAAA,IAAY,GAAG,MAAM,OAC7C,CAAC,CAAC,QAAQ,UAA2B,UAAU,KAAA,KAAa,MAAM,SAAS,CAAC;CAC9E;AACF;AAEA,MAAM,mCAAmB,IAAI,IAAI;CAAC;CAAa;CAAc;CAAa;AAAY,CAAC;;AAGvF,SAAgB,aAAa,SAAwE;CACnG,OAAO,QAAQ,SAAS,UAAU;EAChC,IAAI,OAAO,UAAU,YAAY,UAAU,QAAQ,MAAM,QAAQ,KAAK,GAAG,OAAO,CAAC;EACjF,MAAM,QAAQ;EACd,OAAO,MAAM,SAAS,WACpB,OAAO,MAAM,SAAS,YACtB,OAAO,MAAM,aAAa,YAC1B,iBAAiB,IAAI,MAAM,QAAQ,IACjC,CAAC;GAAE,MAAM,MAAM;GAAM,UAAU,MAAM;EAAS,CAAC,IAC/C,CAAC;CACP,CAAC;AACH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K,MAAM,WAAW,KAAK,KAAK,WAAW,KAAA,KAAa,OAAO,WAAW,IAAI,OAChF,qBAAC,iBAAD;IAAiB,eAAY;IAAmB,WAAU;IAA1D,UAAA;KAGE,oBAAC,eAAD;MAAe,OAAO,KAAK;MAAO,QAAQ,KAAK;MAAQ,MAAM,KAAK;KAAO,CAAA;KACxE,OAAO,KAAK,OAAO,UAClB,oBAAC,eAAD;MAEE,KAAK,QAAQ,MAAM,SAAS,UAAU,MAAM;MAC5C,KAAK,eAAe,OAAO,QAAQ,CAAC;MACpC,eAAY;MACZ,WAAU;KACX,GALM,GAAG,MAAM,SAAS,GAAG,OAAO,KAAK,GAKvC,CACF;KACA,KAAK,WAAW,KAAA,IAAY,oBAAC,QAAD;MAAM,WAAU;MAAiB,UAAA,KAAK;KAAa,CAAA,IAAI;IACrE;GAEjB,CAAA,IAAA,IACJ,EAAA,CAAA;EAEN;CACW,CAAA;AAEjB;;;ACxFA,IAAA,mBAAe,mBAAmB,EAAE,SAAS,gBAAgB,CAAC;;;ACC9D,MAAM,OAAU,UAAmC,UAChD,UAAU,KAAA,IAAY,KAAA,IAAY;CAAE,GAAG;CAAU,GAAI;AAAiB;AAEzE,MAAa,YAAY,gBAAgB;CACvC,IAAI;CACJ,aAAa;CACb,SAAS,EACP,IAAI,gBAAyD;EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,EAAE,GAAGA,gBAAQ,CAAC;CAAG,EAC9G;AACF,CAAC"}
1
+ {"version":3,"file":"web.mjs","names":["toolRead"],"sources":["../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/readToolView.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/ReadToolMessage.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/read.web.tsx","../../generated/web.ts"],"sourcesContent":["// Imports nothing at runtime: the web and native cards share it, and the native\n// bundle may not load the web component library.\n\ntype Translate = (key: string, fallback: string, vars?: Readonly<Record<string, string | number>>) => string;\n\nexport interface ReadCallView {\n readonly path: string;\n /** `from N` and `N lines`, as the TUI's call heading lists them. */\n readonly details: readonly string[];\n}\n\nfunction optionalNumber(value: unknown): number | undefined {\n return typeof value === 'number' && Number.isFinite(value) ? value : undefined;\n}\n\n/** What the read call heading shows: the path, then the offset and limit when given. */\nexport function readCallView(args: Readonly<Record<string, unknown>>, t?: Translate): ReadCallView {\n const offset = optionalNumber(args.offset);\n const limit = optionalNumber(args.limit);\n return {\n path: typeof args.path === 'string' ? args.path : '',\n details: [\n offset === undefined ? undefined : (t?.('read.ui.fromLine', 'from {line}', { line: offset }) ?? `from ${offset}`),\n limit === undefined ? undefined : (t?.('read.ui.lines', '{count} lines', { count: limit }) ?? `${limit} lines`),\n ].filter((value): value is string => value !== undefined && value.length > 0),\n };\n}\n\nconst IMAGE_MIME_TYPES = new Set(['image/png', 'image/jpeg', 'image/gif', 'image/webp']);\n\n/** The image blocks a read returned, limited to the formats both cards can draw. */\nexport function resultImages(content: readonly unknown[]): Array<{ data: string; mimeType: string }> {\n return content.flatMap((block) => {\n if (typeof block !== 'object' || block === null || Array.isArray(block)) return [];\n const value = block as Record<string, unknown>;\n return value.type === 'image' &&\n typeof value.data === 'string' &&\n typeof value.mimeType === 'string' &&\n IMAGE_MIME_TYPES.has(value.mimeType)\n ? [{ data: value.data, mimeType: value.mimeType }]\n : [];\n });\n}\n","import { useT } from '@agimon-ai/po-core/web';\nimport type { ToolMessageRenderProps } from '@agimon-ai/po-core/web';\nimport {\n HashlineLines,\n hashlineBody,\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\n resultTextLines,\n ToolPathLink,\n toolTone,\n ViewableImage,\n} from '@agimon-ai/po-web-components';\n\nimport { readCallView, resultImages } from '../_lib/readToolView';\n\n/**\n * The read tool's timeline item, the web half of its renderCall and\n * renderResult: the call summary in the header and, when expanded, the\n * anchored lines with a line-number gutter in the body. A failure shows the\n * tool's message in red inside the expanded body instead.\n */\nexport function ReadToolMessage({\n args,\n result,\n output,\n running,\n isError,\n fileTabFor,\n openTransientTab,\n}: ToolMessageRenderProps) {\n const t = useT();\n const view = readCallView(args, t);\n const images = resultImages(result?.content ?? []);\n // A read is the one call whose file the session usually has not changed, so\n // this is the link that opens it read-only rather than in its history.\n const tab = fileTabFor(view.path);\n const body = result === null || isError ? null : hashlineBody(result, output, 'read', true);\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable defaultExpanded={false}>\n {({ expanded }) => {\n return (\n <>\n {/* no-untranslated-jsx: ignore - Tool identifier matches the invocation. */}\n <MessageItemHeader title=\"read\">\n <span data-testid=\"tool-call-read\" className=\"flex min-w-0 flex-1 items-center gap-2\">\n <ToolPathLink\n path={view.path}\n {...(tab === undefined ? {} : { onOpen: () => openTransientTab(tab) })}\n />\n {view.details.length > 0 ? (\n <span className=\"shrink-0 text-po-faint\">· {view.details.join(' · ')}</span>\n ) : null}\n </span>\n </MessageItemHeader>\n {expanded ? (\n isError ? (\n <MessageItemBody data-testid=\"tool-result-read\" className=\"flex flex-col\">\n <MessageItemStatus tone=\"error\">{t('read.ui.failed', 'failed')}</MessageItemStatus>\n {resultTextLines(result, output).map((line, index) => (\n <span key={`${String(index)}-${line}`} className=\"whitespace-pre-wrap break-words text-po-red\">\n {line}\n </span>\n ))}\n </MessageItemBody>\n ) : body === null ? (\n running ? (\n <MessageItemBody data-testid=\"tool-result-read\">\n <MessageItemStatus tone=\"running\">{t('read.ui.running', 'running')}</MessageItemStatus>\n </MessageItemBody>\n ) : null\n ) : body.shown.length === 0 && body.notice === undefined && images.length === 0 ? null : (\n <MessageItemBody data-testid=\"tool-result-read\" className=\"flex flex-col gap-1\">\n {/* A read body is one file with no heading of its own, so the\n call's path is what names the grammar for it. */}\n <HashlineLines lines={body.shown} gutter={body.gutter} path={view.path} />\n {images.map((image, index) => (\n <ViewableImage\n key={`${image.mimeType}:${String(index)}`}\n src={`data:${image.mimeType};base64,${image.data}`}\n alt={t('read.ui.resultImage', 'Read result {index}', { index: index + 1 })}\n data-testid=\"tool-result-read-image\"\n className=\"h-auto max-h-96 max-w-full rounded-md border border-po-border-soft object-contain\"\n />\n ))}\n {body.notice !== undefined ? <span className=\"text-po-faint\">{body.notice}</span> : null}\n </MessageItemBody>\n )\n ) : null}\n </>\n );\n }}\n </MessageItem>\n );\n}\n","import { defineToolRenderer } from '@agimon-ai/po-core/web';\n\nimport { ReadToolMessage } from './_components/ReadToolMessage';\n\nexport default defineToolRenderer({ message: ReadToolMessage });\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineWebPlugin, type WebPluginContributions } from '@agimon-ai/po-core/web';\n\nimport toolRead from '../src/extensions/workspaces/sessions/(frontend)/tool/read.web';\n\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T =>\n (value === undefined ? undefined : { ...identity, ...(value as object) }) as T;\n\nexport const webPlugin = defineWebPlugin({\n id: 'read',\n packageName: '@agimon-ai/po-read',\n session: {\n get toolRenderers(): WebPluginContributions['toolRenderers'] { return [via({ tools: ['read'] }, toolRead)]; },\n },\n});\n"],"mappings":";;;;AAWA,SAAS,eAAe,OAAoC;CAC1D,OAAO,OAAO,UAAU,YAAY,OAAO,SAAS,KAAK,IAAI,QAAQ,KAAA;AACvE;;AAGA,SAAgB,aAAa,MAAyC,GAA6B;CACjG,MAAM,SAAS,eAAe,KAAK,MAAM;CACzC,MAAM,QAAQ,eAAe,KAAK,KAAK;CACvC,OAAO;EACL,MAAM,OAAO,KAAK,SAAS,WAAW,KAAK,OAAO;EAClD,SAAS,CACP,WAAW,KAAA,IAAY,KAAA,IAAa,IAAI,oBAAoB,eAAe,EAAE,MAAM,OAAO,CAAC,KAAK,QAAQ,UACxG,UAAU,KAAA,IAAY,KAAA,IAAa,IAAI,iBAAiB,iBAAiB,EAAE,OAAO,MAAM,CAAC,KAAK,GAAG,MAAM,OACzG,CAAC,CAAC,QAAQ,UAA2B,UAAU,KAAA,KAAa,MAAM,SAAS,CAAC;CAC9E;AACF;AAEA,MAAM,mCAAmB,IAAI,IAAI;CA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AY,gBAAgB;CACvC,IAAI;CACJ,aAAa;CACb,SAAS,EACP,IAAI,gBAAyD;EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,EAAE,GAAGA,gBAAQ,CAAC;CAAG,EAC9G;AACF,CAAC"}
@@ -1 +1 @@
1
- {"version":1,"platformRequirements":{},"sourceFiles":["generated/mcp-ui.ts","generated/mcp.ts","generated/native.ts","generated/server.ts","generated/web.ts","package.json","src/constants/package.ts","src/exports/apiContracts.ts","src/exports/index.ts","src/extensions/workspaces/sessions/(backend)/tool/read.mcp.ts","src/extensions/workspaces/sessions/(backend)/tool/read.server.ts","src/extensions/workspaces/sessions/(frontend)/tool/_components/ReadToolMessage.native.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ReadToolMessage.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ReadToolMessage.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ReadToolMessage.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_lib/readToolView.ts","src/extensions/workspaces/sessions/(frontend)/tool/read.mcp.tsx","src/extensions/workspaces/sessions/(frontend)/tool/read.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/read.web.tsx","src/schemas/apiContracts.ts","src/schemas/readTool.ts","src/services/readHost/index.edge.ts","src/services/readHost/index.ts","src/services/readHost/type.ts","src/services/readImage/index.ts","src/services/readTool/index.ts","tsdown.config.ts"],"sourceRevision":"7944fbb870c0313ee2505d9bf79e6564","manifestRevision":"a1b443a16222a9c314eed7d02ff50525","outputFiles":["dist/apiContracts.cjs","dist/apiContracts.mjs","dist/extensions/mcp-ui.mjs","dist/extensions/mcp.cjs","dist/extensions/mcp.mjs","dist/extensions/native.mjs","dist/extensions/server.cjs","dist/extensions/server.mjs","dist/extensions/web.mjs","dist/index.cjs","dist/index.mjs","dist/readTool-CCyLjl3E.mjs","dist/readTool-DQSyk5NY.cjs"],"outputRevision":"e59ef5018f521d24df03a430525341a6"}
1
+ {"version":1,"platformRequirements":{},"sourceFiles":["NOTICE","generated/mcp-ui.ts","generated/mcp.ts","generated/native.ts","generated/server.ts","generated/web.ts","package.json","src/constants/package.ts","src/exports/apiContracts.ts","src/exports/index.ts","src/extensions/workspaces/sessions/(backend)/tool/read.mcp.ts","src/extensions/workspaces/sessions/(backend)/tool/read.server.ts","src/extensions/workspaces/sessions/(frontend)/tool/_components/ReadToolMessage.native.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ReadToolMessage.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ReadToolMessage.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/ReadToolMessage.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_lib/readToolView.ts","src/extensions/workspaces/sessions/(frontend)/tool/read.mcp.tsx","src/extensions/workspaces/sessions/(frontend)/tool/read.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/read.web.tsx","src/schemas/apiContracts.ts","src/schemas/readTool.ts","src/services/readHost/index.edge.ts","src/services/readHost/index.ts","src/services/readHost/type.ts","src/services/readImage/index.ts","src/services/readTool/index.ts","tsdown.config.ts"],"sourceRevision":"74a10e1a3f655d1a8193682ed891cdde","manifestRevision":"1a5058bb23eb6293ea37d3d9e39e432a","outputFiles":["NOTICE","dist/apiContracts.cjs","dist/apiContracts.mjs","dist/extensions/mcp-ui.mjs","dist/extensions/mcp.cjs","dist/extensions/mcp.mjs","dist/extensions/native.mjs","dist/extensions/server.cjs","dist/extensions/server.mjs","dist/extensions/web.mjs","dist/index.cjs","dist/index.mjs","dist/readTool-CCyLjl3E.mjs","dist/readTool-DQSyk5NY.cjs"],"outputRevision":"c32a5488d4a3df5b15df816677048eb5"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agimon-ai/po-read",
3
- "version": "0.0.0-alpha.194",
3
+ "version": "0.0.0-alpha.196",
4
4
  "description": "Snapshot-bound hashline read tool for Pi and Po.",
5
5
  "keywords": [
6
6
  "ai",
@@ -17,7 +17,7 @@
17
17
  "bugs": {
18
18
  "url": "https://github.com/AgiFlow/po/issues"
19
19
  },
20
- "license": "BUSL-1.1",
20
+ "license": "MIT",
21
21
  "author": "Vuong Ngo",
22
22
  "repository": {
23
23
  "type": "git",
@@ -25,6 +25,7 @@
25
25
  "directory": "packages/default/po-read"
26
26
  },
27
27
  "files": [
28
+ "NOTICE",
28
29
  "dist"
29
30
  ],
30
31
  "type": "module",
@@ -60,19 +61,19 @@
60
61
  "access": "public"
61
62
  },
62
63
  "dependencies": {
63
- "@agimon-ai/po-config": "0.0.0-alpha.194",
64
- "@agimon-ai/po-core": "0.0.0-alpha.194",
65
- "@agimon-ai/po-hashline": "0.0.0-alpha.194",
66
- "@agimon-ai/po-ui": "0.0.0-alpha.194",
67
- "@agimon-ai/po-web-components": "0.0.0-alpha.194",
64
+ "@agimon-ai/po-config": "0.0.0-alpha.196",
65
+ "@agimon-ai/po-core": "0.0.0-alpha.196",
66
+ "@agimon-ai/po-hashline": "0.0.0-alpha.196",
67
+ "@agimon-ai/po-ui": "0.0.0-alpha.196",
68
+ "@agimon-ai/po-web-components": "0.0.0-alpha.196",
68
69
  "@deepseek-ai/cordis": "4.0.5",
69
70
  "typebox": "1.4.2"
70
71
  },
71
72
  "devDependencies": {
72
- "@agimon-ai/po-build": "0.0.0-alpha.194",
73
- "@agimon-ai/po-native-components": "0.0.0-alpha.194",
74
- "@earendil-works/pi-coding-agent": "1.5.2",
75
- "@earendil-works/pi-durable": "1.5.2",
73
+ "@agimon-ai/po-build": "0.0.0-alpha.196",
74
+ "@agimon-ai/po-native-components": "0.0.0-alpha.196",
75
+ "@earendil-works/pi-coding-agent": "1.6.1",
76
+ "@earendil-works/pi-durable": "1.6.1",
76
77
  "@tanstack/react-store": "0.11.2",
77
78
  "@tanstack/store": "0.11.2",
78
79
  "@types/node": "26.6.5",
@@ -87,8 +88,8 @@
87
88
  "vitest": "5.0.4"
88
89
  },
89
90
  "peerDependencies": {
90
- "@agimon-ai/po-native-components": "0.0.0-alpha.194",
91
- "@earendil-works/pi-coding-agent": "1.5.2",
91
+ "@agimon-ai/po-native-components": "0.0.0-alpha.196",
92
+ "@earendil-works/pi-coding-agent": "1.6.1",
92
93
  "react-native": "0.88.1",
93
94
  "react-native-unistyles": "^3.5.3"
94
95
  },