@agimon-ai/po-skill 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,149 +1,21 @@
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.
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.
package/README.md CHANGED
@@ -36,4 +36,4 @@ it. It is not selectable from `.po/presets.yaml`.
36
36
 
37
37
  ## License
38
38
 
39
- 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.
39
+ MIT. See [LICENSE](LICENSE).
@@ -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 { Markdown, MessageItem, MessageItemBody, MessageItemHeader, MessageItemStatus, fontOf, toolTone } from "@agimon-ai/po-native-components";
@@ -57,6 +57,7 @@ function skillMatches(result, output) {
57
57
  * in the header and, once expanded, the instructions the agent read.
58
58
  */
59
59
  function LoadSkillToolMessage({ args, result, output, running, isError }) {
60
+ const t = useT();
60
61
  const name = loadSkillName(args);
61
62
  const body = result === null || isError ? "" : skillBody(resultText(result, output));
62
63
  return /* @__PURE__ */ jsx(MessageItem, {
@@ -87,7 +88,7 @@ function LoadSkillToolMessage({ args, result, output, running, isError }) {
87
88
  testID: "tool-result-load_skill",
88
89
  children: /* @__PURE__ */ jsx(MessageItemStatus, {
89
90
  tone: "running",
90
- children: "running"
91
+ children: t("skill.ui.running", "running")
91
92
  })
92
93
  }) : null : body.length === 0 ? null : /* @__PURE__ */ jsx(MessageItemBody, {
93
94
  testID: "tool-result-load_skill",
@@ -131,6 +132,7 @@ var load_skill_native_default = defineToolRenderer({ message: LoadSkillToolMessa
131
132
  * its description.
132
133
  */
133
134
  function SearchSkillsToolMessage({ args, result, output, running, isError }) {
135
+ const t = useT();
134
136
  const query = searchQuery(args);
135
137
  const matches = result === null || isError ? [] : skillMatches(result, output);
136
138
  const count = result === null || isError ? void 0 : `${matches.length} ${matches.length === 1 ? "skill" : "skills"}`;
@@ -148,7 +150,7 @@ function SearchSkillsToolMessage({ args, result, output, running, isError }) {
148
150
  children: [/* @__PURE__ */ jsx(Text, {
149
151
  numberOfLines: 1,
150
152
  style: [styles.sans, query === void 0 ? styles.dim : styles.primary],
151
- children: query ?? "all skills"
153
+ children: query ?? t("skill.ui.allSkills", "all skills")
152
154
  }), count !== void 0 ? /* @__PURE__ */ jsxs(Text, {
153
155
  numberOfLines: 1,
154
156
  style: [styles.sans, styles.detail],
@@ -166,13 +168,13 @@ function SearchSkillsToolMessage({ args, result, output, running, isError }) {
166
168
  testID: "tool-result-search_skills",
167
169
  children: /* @__PURE__ */ jsx(MessageItemStatus, {
168
170
  tone: "running",
169
- children: "running"
171
+ children: t("skill.ui.running", "running")
170
172
  })
171
173
  }) : null : matches.length === 0 ? /* @__PURE__ */ jsx(MessageItemBody, {
172
174
  testID: "tool-result-search_skills",
173
175
  children: /* @__PURE__ */ jsx(Text, {
174
176
  style: [styles.sans, styles.dim],
175
- children: "No skills match."
177
+ children: t("skill.ui.noSkillsMatch", "No skills match.")
176
178
  })
177
179
  }) : /* @__PURE__ */ jsx(MessageItemBody, {
178
180
  testID: "tool-result-search_skills",
@@ -1 +1 @@
1
- {"version":3,"file":"native.mjs","names":["ToolMessageRenderProps","fontOf","Markdown","MessageItem","MessageItemBody","MessageItemHeader","MessageItemStatus","toolTone","PoNativeTheme","StyleSheet","loadSkillName","resultText","skillBody","LoadSkillToolMessage","args","result","output","running","isError","name","body","expanded","styles","summary","sans","primary","error","length","create","theme","flex","flexDirection","alignItems","gap","spacing","minWidth","uni__dependencies","fontFamily","fontSize","base","lineHeight","flexShrink","color","colors","text","red","styles","ToolMessageRenderProps","fontOf","MessageItem","MessageItemBody","MessageItemHeader","MessageItemStatus","toolTone","PoNativeTheme","StyleSheet","resultText","searchQuery","skillMatches","SearchSkillsToolMessage","args","result","output","running","isError","query","matches","count","undefined","length","expanded","styles","summary","sans","dim","primary","detail","error","list","map","match","name","description","create","theme","flex","flexDirection","alignItems","gap","spacing","minWidth","uni__dependencies","fontFamily","fontSize","base","lineHeight","flexShrink","color","colors","text","faint","red","fontWeight","hi","sm","toolLoadSkill","toolSearchSkills"],"sources":["../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/skillToolView.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/LoadSkillToolMessage.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/load_skill.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/SearchSkillsToolMessage.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/search_skills.native.tsx","../../generated/native.ts"],"sourcesContent":["import type { ToolResultView } from '@agimon-ai/po-core/web';\n\nexport interface SkillMatch {\n readonly name: string;\n readonly description: string;\n}\n\n/** The result's text blocks joined, falling back to the streamed output before a result exists. */\nexport function resultText(result: ToolResultView | null, output: string): string {\n if (result === null) return output;\n return result.content\n .flatMap((block) => {\n const record = typeof block === 'object' && block !== null ? (block as { type?: unknown; text?: unknown }) : {};\n return record.type === 'text' && typeof record.text === 'string' ? [record.text] : [];\n })\n .join('\\n');\n}\n\n/** The skill name a load_skill call asked for. */\nexport function loadSkillName(args: Readonly<Record<string, unknown>>): string {\n return typeof args.name === 'string' ? args.name : '';\n}\n\n/**\n * The loaded SKILL.md without its YAML frontmatter, which the header already\n * names; the rest is what the agent read.\n */\nexport function skillBody(text: string): string {\n return text.replace(/^---\\r?\\n[\\s\\S]*?\\r?\\n---\\r?\\n?/, '').trim();\n}\n\n/** How much of a loaded skill the card shows before Show more. */\nexport const SKILL_PREVIEW_LINES = 12;\n\n/**\n * The opening of a long skill, for the card to show before Show more. The cut\n * never lands inside a code fence: a preview that opened one without closing\n * it would render the rest of the card as code, so it backs up to the line\n * before the fence instead.\n */\nexport function skillPreview(body: string, maxLines = SKILL_PREVIEW_LINES): { text: string; hidden: number } {\n const lines = body.split('\\n');\n if (lines.length <= maxLines) return { text: body, hidden: 0 };\n const isFence = lines.slice(0, maxLines).map((line) => line.trimStart().startsWith('```'));\n const fences = isFence.filter(Boolean).length;\n const cut = fences % 2 === 1 ? isFence.lastIndexOf(true) : maxLines;\n // A skill that opens with a fence has no safe cut short of the whole block; show it all.\n if (cut <= 0) return { text: body, hidden: 0 };\n const text = lines.slice(0, cut).join('\\n').trimEnd();\n return { text, hidden: lines.length - cut };\n}\n\n/** The search_skills query, or undefined when the call listed every skill. */\nexport function searchQuery(args: Readonly<Record<string, unknown>>): string | undefined {\n const query = typeof args.query === 'string' ? args.query.trim() : '';\n return query.length > 0 ? query : undefined;\n}\n\n/**\n * The matches a search_skills result carries. The tool returns them as JSON\n * text; anything else (a truncated or foreign result) reads as no matches\n * rather than breaking the card.\n */\nexport function skillMatches(result: ToolResultView | null, output: string): readonly SkillMatch[] {\n let parsed: unknown;\n try {\n parsed = JSON.parse(resultText(result, output));\n } catch {\n return [];\n }\n if (!Array.isArray(parsed)) return [];\n return parsed.flatMap((entry: unknown) => {\n const record = typeof entry === 'object' && entry !== null ? (entry as Record<string, unknown>) : {};\n return typeof record.name === 'string'\n ? [{ name: record.name, description: typeof record.description === 'string' ? record.description : '' }]\n : [];\n });\n}\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/native';\nimport {\n fontOf,\n Markdown,\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\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 { loadSkillName, resultText, skillBody } from '../_lib/skillToolView';\n\n/**\n * The load_skill tool's timeline item on native, as the web's: the skill name\n * in the header and, once expanded, the instructions the agent read.\n */\nexport function LoadSkillToolMessage({ args, result, output, running, isError }: ToolMessageRenderProps) {\n const name = loadSkillName(args);\n const body = result === null || isError ? '' : skillBody(resultText(result, output));\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable>\n {({ expanded }) => (\n <>\n <MessageItemHeader title=\"load_skill\">\n <View testID=\"tool-call-load_skill\" style={styles.summary}>\n <Text numberOfLines={1} style={[styles.sans, styles.primary]}>\n {name}\n </Text>\n </View>\n </MessageItemHeader>\n {!expanded ? null : isError ? (\n <MessageItemBody testID=\"tool-result-load_skill\">\n <Text selectable style={[styles.sans, styles.error]}>\n {resultText(result, output)}\n </Text>\n </MessageItemBody>\n ) : result === null ? (\n running ? (\n <MessageItemBody testID=\"tool-result-load_skill\">\n <MessageItemStatus tone=\"running\">running</MessageItemStatus>\n </MessageItemBody>\n ) : null\n ) : body.length === 0 ? null : (\n <MessageItemBody testID=\"tool-result-load_skill\">\n <Markdown text={body} />\n </MessageItemBody>\n )}\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 primary: { flexShrink: 1, color: theme.colors.text },\n error: { color: theme.colors.red },\n}));\n","import { defineToolRenderer } from '@agimon-ai/po-core/native';\n\nimport { LoadSkillToolMessage } from './_components/LoadSkillToolMessage.native';\n\nexport default defineToolRenderer({ message: LoadSkillToolMessage });\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/native';\nimport {\n fontOf,\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\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 { resultText, searchQuery, skillMatches } from '../_lib/skillToolView';\n\n/**\n * The search_skills tool's timeline item on native, as the web's: the query\n * and match count in the header and, once expanded, each match by name with\n * its description.\n */\nexport function SearchSkillsToolMessage({ args, result, output, running, isError }: ToolMessageRenderProps) {\n const query = searchQuery(args);\n const matches = result === null || isError ? [] : skillMatches(result, output);\n const count =\n result === null || isError ? undefined : `${matches.length} ${matches.length === 1 ? 'skill' : 'skills'}`;\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable>\n {({ expanded }) => (\n <>\n <MessageItemHeader title=\"search_skills\">\n <View testID=\"tool-call-search_skills\" style={styles.summary}>\n <Text numberOfLines={1} style={[styles.sans, query === undefined ? styles.dim : styles.primary]}>\n {query ?? 'all skills'}\n </Text>\n {count !== undefined ? (\n <Text numberOfLines={1} style={[styles.sans, styles.detail]}>\n · {count}\n </Text>\n ) : null}\n </View>\n </MessageItemHeader>\n {!expanded ? null : isError ? (\n <MessageItemBody testID=\"tool-result-search_skills\">\n <Text selectable style={[styles.sans, styles.error]}>\n {resultText(result, output)}\n </Text>\n </MessageItemBody>\n ) : result === null ? (\n running ? (\n <MessageItemBody testID=\"tool-result-search_skills\">\n <MessageItemStatus tone=\"running\">running</MessageItemStatus>\n </MessageItemBody>\n ) : null\n ) : matches.length === 0 ? (\n <MessageItemBody testID=\"tool-result-search_skills\">\n <Text style={[styles.sans, styles.dim]}>No skills match.</Text>\n </MessageItemBody>\n ) : (\n <MessageItemBody testID=\"tool-result-search_skills\">\n <View style={styles.list}>\n {matches.map((match) => (\n <View key={match.name}>\n <Text selectable style={[styles.sans, styles.name]}>\n {match.name}\n </Text>\n {match.description.length > 0 ? (\n <Text selectable style={styles.description}>\n {match.description}\n </Text>\n ) : null}\n </View>\n ))}\n </View>\n </MessageItemBody>\n )}\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 primary: { flexShrink: 1, color: theme.colors.text },\n dim: { flexShrink: 1, color: theme.colors.dim },\n detail: { flexShrink: 0, color: theme.colors.faint },\n error: { color: theme.colors.red },\n list: { gap: theme.spacing(2) },\n name: { fontWeight: '600', color: theme.colors.hi },\n description: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeight.sm,\n color: theme.colors.dim,\n },\n}));\n","import { defineToolRenderer } from '@agimon-ai/po-core/native';\n\nimport { SearchSkillsToolMessage } from './_components/SearchSkillsToolMessage.native';\n\nexport default defineToolRenderer({ message: SearchSkillsToolMessage });\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineNativePlugin, type WebPluginContributions } from '@agimon-ai/po-core/native';\n\nimport toolLoadSkill from '../src/extensions/workspaces/sessions/(frontend)/tool/load_skill.native';\nimport toolSearchSkills from '../src/extensions/workspaces/sessions/(frontend)/tool/search_skills.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: 'skill',\n packageName: '@agimon-ai/po-skill',\n session: {\n get toolRenderers(): WebPluginContributions['toolRenderers'] { return [via({ tools: ['load_skill'] }, toolLoadSkill), via({ tools: ['search_skills'] }, toolSearchSkills)]; },\n },\n});\n"],"mappings":";;;;;;;;AAQA,SAAgB,WAAW,QAA+B,QAAwB;CAChF,IAAI,WAAW,MAAM,OAAO;CAC5B,OAAO,OAAO,QACX,SAAS,UAAU;EAClB,MAAM,SAAS,OAAO,UAAU,YAAY,UAAU,OAAQ,QAA+C,CAAC;EAC9G,OAAO,OAAO,SAAS,UAAU,OAAO,OAAO,SAAS,WAAW,CAAC,OAAO,IAAI,IAAI,CAAC;CACtF,CAAC,CAAC,CACD,KAAK,IAAI;AACd;;AAGA,SAAgB,cAAc,MAAiD;CAC7E,OAAO,OAAO,KAAK,SAAS,WAAW,KAAK,OAAO;AACrD;;;;;AAMA,SAAgB,UAAU,MAAsB;CAC9C,OAAO,KAAK,QAAQ,mCAAmC,EAAE,CAAC,CAAC,KAAK;AAClE;;AAwBA,SAAgB,YAAY,MAA6D;CACvF,MAAM,QAAQ,OAAO,KAAK,UAAU,WAAW,KAAK,MAAM,KAAK,IAAI;CACnE,OAAO,MAAM,SAAS,IAAI,QAAQ,KAAA;AACpC;;;;;;AAOA,SAAgB,aAAa,QAA+B,QAAuC;CACjG,IAAI;CACJ,IAAI;EACF,SAAS,KAAK,MAAM,WAAW,QAAQ,MAAM,CAAC;CAChD,QAAQ;EACN,OAAO,CAAC;CACV;CACA,IAAI,CAAC,MAAM,QAAQ,MAAM,GAAG,OAAO,CAAC;CACpC,OAAO,OAAO,SAAS,UAAmB;EACxC,MAAM,SAAS,OAAO,UAAU,YAAY,UAAU,OAAQ,QAAoC,CAAC;EACnG,OAAO,OAAO,OAAO,SAAS,WAC1B,CAAC;GAAE,MAAM,OAAO;GAAM,aAAa,OAAO,OAAO,gBAAgB,WAAW,OAAO,cAAc;EAAG,CAAC,IACrG,CAAC;CACP,C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Status","toolTone","PoNativeTheme","StyleSheet","loadSkillName","resultText","skillBody","LoadSkillToolMessage","args","result","output","running","isError","t","name","body","expanded","styles","summary","sans","primary","error","length","create","theme","flex","flexDirection","alignItems","gap","spacing","minWidth","uni__dependencies","fontFamily","fontSize","base","lineHeight","flexShrink","color","colors","text","red","styles","useT","ToolMessageRenderProps","fontOf","MessageItem","MessageItemBody","MessageItemHeader","MessageItemStatus","toolTone","PoNativeTheme","StyleSheet","resultText","searchQuery","skillMatches","SearchSkillsToolMessage","args","result","output","running","isError","t","query","matches","count","undefined","length","expanded","styles","summary","sans","dim","primary","detail","error","list","map","match","name","description","create","theme","flex","flexDirection","alignItems","gap","spacing","minWidth","uni__dependencies","fontFamily","fontSize","base","lineHeight","flexShrink","color","colors","text","faint","red","fontWeight","hi","sm","toolLoadSkill","toolSearchSkills"],"sources":["../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/skillToolView.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/LoadSkillToolMessage.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/load_skill.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/SearchSkillsToolMessage.native.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/search_skills.native.tsx","../../generated/native.ts"],"sourcesContent":["import type { ToolResultView } from '@agimon-ai/po-core/web';\n\nexport interface SkillMatch {\n readonly name: string;\n readonly description: string;\n}\n\n/** The result's text blocks joined, falling back to the streamed output before a result exists. */\nexport function resultText(result: ToolResultView | null, output: string): string {\n if (result === null) return output;\n return result.content\n .flatMap((block) => {\n const record = typeof block === 'object' && block !== null ? (block as { type?: unknown; text?: unknown }) : {};\n return record.type === 'text' && typeof record.text === 'string' ? [record.text] : [];\n })\n .join('\\n');\n}\n\n/** The skill name a load_skill call asked for. */\nexport function loadSkillName(args: Readonly<Record<string, unknown>>): string {\n return typeof args.name === 'string' ? args.name : '';\n}\n\n/**\n * The loaded SKILL.md without its YAML frontmatter, which the header already\n * names; the rest is what the agent read.\n */\nexport function skillBody(text: string): string {\n return text.replace(/^---\\r?\\n[\\s\\S]*?\\r?\\n---\\r?\\n?/, '').trim();\n}\n\n/** How much of a loaded skill the card shows before Show more. */\nexport const SKILL_PREVIEW_LINES = 12;\n\n/**\n * The opening of a long skill, for the card to show before Show more. The cut\n * never lands inside a code fence: a preview that opened one without closing\n * it would render the rest of the card as code, so it backs up to the line\n * before the fence instead.\n */\nexport function skillPreview(body: string, maxLines = SKILL_PREVIEW_LINES): { text: string; hidden: number } {\n const lines = body.split('\\n');\n if (lines.length <= maxLines) return { text: body, hidden: 0 };\n const isFence = lines.slice(0, maxLines).map((line) => line.trimStart().startsWith('```'));\n const fences = isFence.filter(Boolean).length;\n const cut = fences % 2 === 1 ? isFence.lastIndexOf(true) : maxLines;\n // A skill that opens with a fence has no safe cut short of the whole block; show it all.\n if (cut <= 0) return { text: body, hidden: 0 };\n const text = lines.slice(0, cut).join('\\n').trimEnd();\n return { text, hidden: lines.length - cut };\n}\n\n/** The search_skills query, or undefined when the call listed every skill. */\nexport function searchQuery(args: Readonly<Record<string, unknown>>): string | undefined {\n const query = typeof args.query === 'string' ? args.query.trim() : '';\n return query.length > 0 ? query : undefined;\n}\n\n/**\n * The matches a search_skills result carries. The tool returns them as JSON\n * text; anything else (a truncated or foreign result) reads as no matches\n * rather than breaking the card.\n */\nexport function skillMatches(result: ToolResultView | null, output: string): readonly SkillMatch[] {\n let parsed: unknown;\n try {\n parsed = JSON.parse(resultText(result, output));\n } catch {\n return [];\n }\n if (!Array.isArray(parsed)) return [];\n return parsed.flatMap((entry: unknown) => {\n const record = typeof entry === 'object' && entry !== null ? (entry as Record<string, unknown>) : {};\n return typeof record.name === 'string'\n ? [{ name: record.name, description: typeof record.description === 'string' ? record.description : '' }]\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 Markdown,\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\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 { loadSkillName, resultText, skillBody } from '../_lib/skillToolView';\n\n/**\n * The load_skill tool's timeline item on native, as the web's: the skill name\n * in the header and, once expanded, the instructions the agent read.\n */\nexport function LoadSkillToolMessage({ args, result, output, running, isError }: ToolMessageRenderProps) {\n const t = useT();\n const name = loadSkillName(args);\n const body = result === null || isError ? '' : skillBody(resultText(result, output));\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable>\n {({ expanded }) => (\n <>\n {/* no-untranslated-jsx: ignore - Preserve the technical tool identifier. */}\n <MessageItemHeader title=\"load_skill\">\n <View testID=\"tool-call-load_skill\" style={styles.summary}>\n <Text numberOfLines={1} style={[styles.sans, styles.primary]}>\n {name}\n </Text>\n </View>\n </MessageItemHeader>\n {!expanded ? null : isError ? (\n <MessageItemBody testID=\"tool-result-load_skill\">\n <Text selectable style={[styles.sans, styles.error]}>\n {resultText(result, output)}\n </Text>\n </MessageItemBody>\n ) : result === null ? (\n running ? (\n <MessageItemBody testID=\"tool-result-load_skill\">\n <MessageItemStatus tone=\"running\">{t('skill.ui.running', 'running')}</MessageItemStatus>\n </MessageItemBody>\n ) : null\n ) : body.length === 0 ? null : (\n <MessageItemBody testID=\"tool-result-load_skill\">\n <Markdown text={body} />\n </MessageItemBody>\n )}\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 primary: { flexShrink: 1, color: theme.colors.text },\n error: { color: theme.colors.red },\n}));\n","import { defineToolRenderer } from '@agimon-ai/po-core/native';\n\nimport { LoadSkillToolMessage } from './_components/LoadSkillToolMessage.native';\n\nexport default defineToolRenderer({ message: LoadSkillToolMessage });\n","import { useT } from '@agimon-ai/po-core/native';\nimport type { ToolMessageRenderProps } from '@agimon-ai/po-core/native';\nimport {\n fontOf,\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\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 { resultText, searchQuery, skillMatches } from '../_lib/skillToolView';\n\n/**\n * The search_skills tool's timeline item on native, as the web's: the query\n * and match count in the header and, once expanded, each match by name with\n * its description.\n */\nexport function SearchSkillsToolMessage({ args, result, output, running, isError }: ToolMessageRenderProps) {\n const t = useT();\n const query = searchQuery(args);\n const matches = result === null || isError ? [] : skillMatches(result, output);\n const count =\n result === null || isError ? undefined : `${matches.length} ${matches.length === 1 ? 'skill' : 'skills'}`;\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable>\n {({ expanded }) => (\n <>\n {/* no-untranslated-jsx: ignore - Preserve the technical tool identifier. */}\n <MessageItemHeader title=\"search_skills\">\n <View testID=\"tool-call-search_skills\" style={styles.summary}>\n <Text numberOfLines={1} style={[styles.sans, query === undefined ? styles.dim : styles.primary]}>\n {query ?? t('skill.ui.allSkills', 'all skills')}\n </Text>\n {count !== undefined ? (\n <Text numberOfLines={1} style={[styles.sans, styles.detail]}>\n · {count}\n </Text>\n ) : null}\n </View>\n </MessageItemHeader>\n {!expanded ? null : isError ? (\n <MessageItemBody testID=\"tool-result-search_skills\">\n <Text selectable style={[styles.sans, styles.error]}>\n {resultText(result, output)}\n </Text>\n </MessageItemBody>\n ) : result === null ? (\n running ? (\n <MessageItemBody testID=\"tool-result-search_skills\">\n <MessageItemStatus tone=\"running\">{t('skill.ui.running', 'running')}</MessageItemStatus>\n </MessageItemBody>\n ) : null\n ) : matches.length === 0 ? (\n <MessageItemBody testID=\"tool-result-search_skills\">\n <Text style={[styles.sans, styles.dim]}>{t('skill.ui.noSkillsMatch', 'No skills match.')}</Text>\n </MessageItemBody>\n ) : (\n <MessageItemBody testID=\"tool-result-search_skills\">\n <View style={styles.list}>\n {matches.map((match) => (\n <View key={match.name}>\n <Text selectable style={[styles.sans, styles.name]}>\n {match.name}\n </Text>\n {match.description.length > 0 ? (\n <Text selectable style={styles.description}>\n {match.description}\n </Text>\n ) : null}\n </View>\n ))}\n </View>\n </MessageItemBody>\n )}\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 primary: { flexShrink: 1, color: theme.colors.text },\n dim: { flexShrink: 1, color: theme.colors.dim },\n detail: { flexShrink: 0, color: theme.colors.faint },\n error: { color: theme.colors.red },\n list: { gap: theme.spacing(2) },\n name: { fontWeight: '600', color: theme.colors.hi },\n description: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeight.sm,\n color: theme.colors.dim,\n },\n}));\n","import { defineToolRenderer } from '@agimon-ai/po-core/native';\n\nimport { SearchSkillsToolMessage } from './_components/SearchSkillsToolMessage.native';\n\nexport default defineToolRenderer({ message: SearchSkillsToolMessage });\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineNativePlugin, type WebPluginContributions } from '@agimon-ai/po-core/native';\n\nimport toolLoadSkill from '../src/extensions/workspaces/sessions/(frontend)/tool/load_skill.native';\nimport toolSearchSkills from '../src/extensions/workspaces/sessions/(frontend)/tool/search_skills.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: 'skill',\n packageName: '@agimon-ai/po-skill',\n session: {\n get toolRenderers(): WebPluginContributions['toolRenderers'] { return [via({ tools: ['load_skill'] }, toolLoadSkill), via({ tools: ['search_skills'] }, toolSearchSkills)]; },\n },\n});\n"],"mappings":";;;;;;;;AAQA,SAAgB,WAAW,QAA+B,QAAwB;CAChF,IAAI,WAAW,MAAM,OAAO;CAC5B,OAAO,OAAO,QACX,SAAS,UAAU;EAClB,MAAM,SAAS,OAAO,UAAU,YAAY,UAAU,OAAQ,QAA+C,CAAC;EAC9G,OAAO,OAAO,SAAS,UAAU,OAAO,OAAO,SAAS,WAAW,CAAC,OAAO,IAAI,IAAI,CAAC;CACtF,CAAC,CAAC,CACD,KAAK,IAAI;AACd;;AAGA,SAAgB,cAAc,MAAiD;CAC7E,OAAO,OAAO,KAAK,SAAS,WAAW,KAAK,OAAO;AACrD;;;;;AAMA,SAAgB,UAAU,MAAsB;CAC9C,OAAO,KAAK,QAAQ,mCAAmC,EAAE,CAAC,CAAC,KAAK;AAClE;;AAwBA,SAAgB,YAAY,MAA6D;CACvF,MAAM,QAAQ,OAAO,KAAK,UAAU,WAAW,KAAK,MAAM,KAAK,IAAI;CACnE,OAAO,MAAM,SAAS,IAAI,QAAQ,KAAA;AACpC;;;;;;AAOA,SAAgB,aAAa,QAA+B,QAAuC;CACjG,IAAI;CACJ,IAAI;EACF,SAAS,KAAK,MAAM,WAAW,QAAQ,MAAM,CAAC;CAChD,QAAQ;EACN,OAAO,CAAC;CACV;CACA,IAAI,CAAC,MAAM,QAAQ,MAAM,GAAG,OAAO,CAAC;CACpC,OAAO,OAAO,SAAS,UAAmB;EACxC,MAAM,SAAS,OAAO,UAAU,YAAY,UAAU,OAAQ,QAAoC,CAAC;EACnG,OAAO,OAAO,OAAO,SAAS,WAC1B,CAAC;GAAE,MAAM,OAAO;GAAM,aAAa,OAAO,OAAO,gBAAgB,WAAW,OAAO,cAAc;EAAG,CAAC,IACrG,CAAC;CAC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C,eAAe,EAAE,GAAGC,4BAAgB,CAAC;CAAG,EAC9K;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 { Button, Markdown, MessageItem, MessageItemBody, MessageItemHeader, MessageItemStatus, toolTone } from "@agimon-ai/po-web-components";
3
3
  import { useState } from "react";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -79,6 +79,7 @@ function skillMatches(result, output) {
79
79
  * lines; dropping all of them into the transcript at once buries the turn.
80
80
  */
81
81
  function SkillBody({ body }) {
82
+ const t = useT();
82
83
  const [full, setFull] = useState(false);
83
84
  const preview = skillPreview(body);
84
85
  const showAll = full || preview.hidden === 0;
@@ -87,14 +88,14 @@ function SkillBody({ body }) {
87
88
  className: "flex flex-col gap-2",
88
89
  children: [/* @__PURE__ */ jsx(Markdown, { text: showAll ? body : preview.text }), showAll ? null : /* @__PURE__ */ jsxs("span", {
89
90
  className: "flex items-center gap-2",
90
- children: [/* @__PURE__ */ jsxs("span", {
91
+ children: [/* @__PURE__ */ jsx("span", {
91
92
  className: "text-sm text-po-dim",
92
- children: [preview.hidden, " more lines"]
93
+ children: t("skill.ui.moreLines", "{count} more lines", { count: preview.hidden })
93
94
  }), /* @__PURE__ */ jsx(Button, {
94
95
  variant: "ghost",
95
96
  size: "sm",
96
97
  onClick: () => setFull(true),
97
- children: "Show more"
98
+ children: t("skill.ui.showMore", "Show more")
98
99
  })]
99
100
  })]
100
101
  });
@@ -105,6 +106,7 @@ function SkillBody({ body }) {
105
106
  * skill shows the tool's message in red instead.
106
107
  */
107
108
  function LoadSkillToolMessage({ args, result, output, running, isError }) {
109
+ const t = useT();
108
110
  const name = loadSkillName(args);
109
111
  const body = result === null || isError ? "" : skillBody(resultText(result, output));
110
112
  return /* @__PURE__ */ jsx(MessageItem, {
@@ -134,7 +136,7 @@ function LoadSkillToolMessage({ args, result, output, running, isError }) {
134
136
  "data-testid": "tool-result-load_skill",
135
137
  children: /* @__PURE__ */ jsx(MessageItemStatus, {
136
138
  tone: "running",
137
- children: "running"
139
+ children: t("skill.ui.running", "running")
138
140
  })
139
141
  }) : null : body.length === 0 ? null : /* @__PURE__ */ jsx(SkillBody, { body })] })
140
142
  });
@@ -150,6 +152,7 @@ var load_skill_web_default = defineToolRenderer({ message: LoadSkillToolMessage
150
152
  * description.
151
153
  */
152
154
  function SearchSkillsToolMessage({ args, result, output, running, isError }) {
155
+ const t = useT();
153
156
  const query = searchQuery(args);
154
157
  const matches = result === null || isError ? [] : skillMatches(result, output);
155
158
  const count = result === null || isError ? void 0 : `${matches.length} ${matches.length === 1 ? "skill" : "skills"}`;
@@ -166,7 +169,7 @@ function SearchSkillsToolMessage({ args, result, output, running, isError }) {
166
169
  className: "flex min-w-0 flex-1 items-center gap-2",
167
170
  children: [query === void 0 ? /* @__PURE__ */ jsx("span", {
168
171
  className: "truncate text-po-dim",
169
- children: "all skills"
172
+ children: t("skill.ui.allSkills", "all skills")
170
173
  }) : /* @__PURE__ */ jsx("span", {
171
174
  className: "truncate text-po-text",
172
175
  children: query
@@ -186,13 +189,13 @@ function SearchSkillsToolMessage({ args, result, output, running, isError }) {
186
189
  "data-testid": "tool-result-search_skills",
187
190
  children: /* @__PURE__ */ jsx(MessageItemStatus, {
188
191
  tone: "running",
189
- children: "running"
192
+ children: t("skill.ui.running", "running")
190
193
  })
191
194
  }) : null : matches.length === 0 ? /* @__PURE__ */ jsx(MessageItemBody, {
192
195
  "data-testid": "tool-result-search_skills",
193
196
  children: /* @__PURE__ */ jsx("span", {
194
197
  className: "text-po-dim",
195
- children: "No skills match."
198
+ children: t("skill.ui.noSkillsMatch", "No skills match.")
196
199
  })
197
200
  }) : /* @__PURE__ */ jsx(MessageItemBody, {
198
201
  "data-testid": "tool-result-search_skills",
@@ -1 +1 @@
1
- {"version":3,"file":"web.mjs","names":["toolLoadSkill","toolSearchSkills"],"sources":["../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/skillToolView.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/LoadSkillToolMessage.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/load_skill.web.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/SearchSkillsToolMessage.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/search_skills.web.tsx","../../generated/web.ts"],"sourcesContent":["import type { ToolResultView } from '@agimon-ai/po-core/web';\n\nexport interface SkillMatch {\n readonly name: string;\n readonly description: string;\n}\n\n/** The result's text blocks joined, falling back to the streamed output before a result exists. */\nexport function resultText(result: ToolResultView | null, output: string): string {\n if (result === null) return output;\n return result.content\n .flatMap((block) => {\n const record = typeof block === 'object' && block !== null ? (block as { type?: unknown; text?: unknown }) : {};\n return record.type === 'text' && typeof record.text === 'string' ? [record.text] : [];\n })\n .join('\\n');\n}\n\n/** The skill name a load_skill call asked for. */\nexport function loadSkillName(args: Readonly<Record<string, unknown>>): string {\n return typeof args.name === 'string' ? args.name : '';\n}\n\n/**\n * The loaded SKILL.md without its YAML frontmatter, which the header already\n * names; the rest is what the agent read.\n */\nexport function skillBody(text: string): string {\n return text.replace(/^---\\r?\\n[\\s\\S]*?\\r?\\n---\\r?\\n?/, '').trim();\n}\n\n/** How much of a loaded skill the card shows before Show more. */\nexport const SKILL_PREVIEW_LINES = 12;\n\n/**\n * The opening of a long skill, for the card to show before Show more. The cut\n * never lands inside a code fence: a preview that opened one without closing\n * it would render the rest of the card as code, so it backs up to the line\n * before the fence instead.\n */\nexport function skillPreview(body: string, maxLines = SKILL_PREVIEW_LINES): { text: string; hidden: number } {\n const lines = body.split('\\n');\n if (lines.length <= maxLines) return { text: body, hidden: 0 };\n const isFence = lines.slice(0, maxLines).map((line) => line.trimStart().startsWith('```'));\n const fences = isFence.filter(Boolean).length;\n const cut = fences % 2 === 1 ? isFence.lastIndexOf(true) : maxLines;\n // A skill that opens with a fence has no safe cut short of the whole block; show it all.\n if (cut <= 0) return { text: body, hidden: 0 };\n const text = lines.slice(0, cut).join('\\n').trimEnd();\n return { text, hidden: lines.length - cut };\n}\n\n/** The search_skills query, or undefined when the call listed every skill. */\nexport function searchQuery(args: Readonly<Record<string, unknown>>): string | undefined {\n const query = typeof args.query === 'string' ? args.query.trim() : '';\n return query.length > 0 ? query : undefined;\n}\n\n/**\n * The matches a search_skills result carries. The tool returns them as JSON\n * text; anything else (a truncated or foreign result) reads as no matches\n * rather than breaking the card.\n */\nexport function skillMatches(result: ToolResultView | null, output: string): readonly SkillMatch[] {\n let parsed: unknown;\n try {\n parsed = JSON.parse(resultText(result, output));\n } catch {\n return [];\n }\n if (!Array.isArray(parsed)) return [];\n return parsed.flatMap((entry: unknown) => {\n const record = typeof entry === 'object' && entry !== null ? (entry as Record<string, unknown>) : {};\n return typeof record.name === 'string'\n ? [{ name: record.name, description: typeof record.description === 'string' ? record.description : '' }]\n : [];\n });\n}\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/web';\nimport {\n Button,\n Markdown,\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\n toolTone,\n} from '@agimon-ai/po-web-components';\nimport { useState } from 'react';\n\nimport { loadSkillName, resultText, skillBody, skillPreview } from '../_lib/skillToolView';\n\n/**\n * The instructions, opened on their first lines with an explicit Show more,\n * as the phone's Markdown pages a long body. A skill runs to hundreds of\n * lines; dropping all of them into the transcript at once buries the turn.\n */\nfunction SkillBody({ body }: { body: string }) {\n const [full, setFull] = useState(false);\n const preview = skillPreview(body);\n const showAll = full || preview.hidden === 0;\n return (\n <MessageItemBody data-testid=\"tool-result-load_skill\" className=\"flex flex-col gap-2\">\n <Markdown text={showAll ? body : preview.text} />\n {showAll ? null : (\n <span className=\"flex items-center gap-2\">\n <span className=\"text-sm text-po-dim\">{preview.hidden} more lines</span>\n <Button variant=\"ghost\" size=\"sm\" onClick={() => setFull(true)}>\n Show more\n </Button>\n </span>\n )}\n </MessageItemBody>\n );\n}\n\n/**\n * The load_skill tool's timeline item: the skill name in the header and, once\n * expanded, the instructions the agent read, frontmatter dropped. A missing\n * skill shows the tool's message in red instead.\n */\nexport function LoadSkillToolMessage({ args, result, output, running, isError }: ToolMessageRenderProps) {\n const name = loadSkillName(args);\n const body = result === null || isError ? '' : skillBody(resultText(result, output));\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable>\n {({ expanded }) => (\n <>\n <MessageItemHeader title=\"load_skill\">\n <span data-testid=\"tool-call-load_skill\" className=\"flex min-w-0 flex-1 items-center gap-2\">\n <span className=\"truncate text-po-text\">{name}</span>\n </span>\n </MessageItemHeader>\n {!expanded ? null : isError ? (\n <MessageItemBody data-testid=\"tool-result-load_skill\" className=\"flex flex-col\">\n <span className=\"whitespace-pre-wrap break-words text-po-red\">{resultText(result, output)}</span>\n </MessageItemBody>\n ) : result === null ? (\n running ? (\n <MessageItemBody data-testid=\"tool-result-load_skill\">\n <MessageItemStatus tone=\"running\">running</MessageItemStatus>\n </MessageItemBody>\n ) : null\n ) : body.length === 0 ? null : (\n <SkillBody body={body} />\n )}\n </>\n )}\n </MessageItem>\n );\n}\n","import { defineToolRenderer } from '@agimon-ai/po-core/web';\n\nimport { LoadSkillToolMessage } from './_components/LoadSkillToolMessage';\n\nexport default defineToolRenderer({ message: LoadSkillToolMessage });\n","import type { ToolMessageRenderProps } from '@agimon-ai/po-core/web';\nimport {\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\n toolTone,\n} from '@agimon-ai/po-web-components';\n\nimport { resultText, searchQuery, skillMatches } from '../_lib/skillToolView';\n\n/**\n * The search_skills tool's timeline item: the query (or \"all skills\") and the\n * match count in the header and, once expanded, each match by name with its\n * description.\n */\nexport function SearchSkillsToolMessage({ args, result, output, running, isError }: ToolMessageRenderProps) {\n const query = searchQuery(args);\n const matches = result === null || isError ? [] : skillMatches(result, output);\n const count =\n result === null || isError ? undefined : `${matches.length} ${matches.length === 1 ? 'skill' : 'skills'}`;\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable>\n {({ expanded }) => (\n <>\n <MessageItemHeader title=\"search_skills\">\n <span data-testid=\"tool-call-search_skills\" className=\"flex min-w-0 flex-1 items-center gap-2\">\n {query === undefined ? (\n <span className=\"truncate text-po-dim\">all skills</span>\n ) : (\n <span className=\"truncate text-po-text\">{query}</span>\n )}\n {count !== undefined ? <span className=\"shrink-0 text-po-faint\">· {count}</span> : null}\n </span>\n </MessageItemHeader>\n {!expanded ? null : isError ? (\n <MessageItemBody data-testid=\"tool-result-search_skills\" className=\"flex flex-col\">\n <span className=\"whitespace-pre-wrap break-words text-po-red\">{resultText(result, output)}</span>\n </MessageItemBody>\n ) : result === null ? (\n running ? (\n <MessageItemBody data-testid=\"tool-result-search_skills\">\n <MessageItemStatus tone=\"running\">running</MessageItemStatus>\n </MessageItemBody>\n ) : null\n ) : matches.length === 0 ? (\n <MessageItemBody data-testid=\"tool-result-search_skills\">\n <span className=\"text-po-dim\">No skills match.</span>\n </MessageItemBody>\n ) : (\n <MessageItemBody data-testid=\"tool-result-search_skills\" className=\"flex flex-col gap-2\">\n {matches.map((match) => (\n <span key={match.name} className=\"flex flex-col\">\n <span className=\"font-semibold text-po-hi\">{match.name}</span>\n {match.description.length > 0 ? (\n <span className=\"text-sm text-po-dim\">{match.description}</span>\n ) : null}\n </span>\n ))}\n </MessageItemBody>\n )}\n </>\n )}\n </MessageItem>\n );\n}\n","import { defineToolRenderer } from '@agimon-ai/po-core/web';\n\nimport { SearchSkillsToolMessage } from './_components/SearchSkillsToolMessage';\n\nexport default defineToolRenderer({ message: SearchSkillsToolMessage });\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineWebPlugin, type WebPluginContributions } from '@agimon-ai/po-core/web';\n\nimport toolLoadSkill from '../src/extensions/workspaces/sessions/(frontend)/tool/load_skill.web';\nimport toolSearchSkills from '../src/extensions/workspaces/sessions/(frontend)/tool/search_skills.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: 'skill',\n packageName: '@agimon-ai/po-skill',\n session: {\n get toolRenderers(): WebPluginContributions['toolRenderers'] { return [via({ tools: ['load_skill'] }, toolLoadSkill), via({ tools: ['search_skills'] }, toolSearchSkills)]; },\n },\n});\n"],"mappings":";;;;;;AAQA,SAAgB,WAAW,QAA+B,QAAwB;CAChF,IAAI,WAAW,MAAM,OAAO;CAC5B,OAAO,OAAO,QACX,SAAS,UAAU;EAClB,MAAM,SAAS,OAAO,UAAU,YAAY,UAAU,OAAQ,QAA+C,CAAC;EAC9G,OAAO,OAAO,SAAS,UAAU,OAAO,OAAO,SAAS,WAAW,CAAC,OAAO,IAAI,IAAI,CAAC;CACtF,CAAC,CAAC,CACD,KAAK,IAAI;AACd;;AAGA,SAAgB,cAAc,MAAiD;CAC7E,OAAO,OAAO,KAAK,SAAS,WAAW,KAAK,OAAO;AACrD;;;;;AAMA,SAAgB,UAAU,MAAsB;CAC9C,OAAO,KAAK,QAAQ,mCAAmC,EAAE,CAAC,CAAC,KAAK;AAClE;;;;;;;AAWA,SAAgB,aAAa,MAAc,WAAA,IAAkE;CAC3G,MAAM,QAAQ,KAAK,MAAM,IAAI;CAC7B,IAAI,MAAM,UAAU,UAAU,OAAO;EAAE,MAAM;EAAM,QAAQ;CAAE;CAC7D,MAAM,UAAU,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,KAAK,SAAS,KAAK,UAAU,CAAC,CAAC,WAAW,KAAK,CAAC;CAEzF,MAAM,MADS,QAAQ,OAAO,OAAO,CAAC,CAAC,SAClB,MAAM,IAAI,QAAQ,YAAY,IAAI,IAAI;CAE3D,IAAI,OAAO,GAAG,OAAO;EAAE,MAAM;EAAM,QAAQ;CAAE;CAE7C,OAAO;EAAE,MADI,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,QAChC;EAAG,Q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EtE,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,YAAY,EAAE,GAAGA,sBAAa,GAAG,IAAI,EAAE,OAAO,CAAC,eAAe,EAAE,GAAGC,yBAAgB,CAAC;CAAG,EAC9K;AACF,CAAC"}
1
+ {"version":3,"file":"web.mjs","names":["toolLoadSkill","toolSearchSkills"],"sources":["../../src/extensions/workspaces/sessions/(frontend)/tool/_lib/skillToolView.ts","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/LoadSkillToolMessage.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/load_skill.web.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/_components/SearchSkillsToolMessage.tsx","../../src/extensions/workspaces/sessions/(frontend)/tool/search_skills.web.tsx","../../generated/web.ts"],"sourcesContent":["import type { ToolResultView } from '@agimon-ai/po-core/web';\n\nexport interface SkillMatch {\n readonly name: string;\n readonly description: string;\n}\n\n/** The result's text blocks joined, falling back to the streamed output before a result exists. */\nexport function resultText(result: ToolResultView | null, output: string): string {\n if (result === null) return output;\n return result.content\n .flatMap((block) => {\n const record = typeof block === 'object' && block !== null ? (block as { type?: unknown; text?: unknown }) : {};\n return record.type === 'text' && typeof record.text === 'string' ? [record.text] : [];\n })\n .join('\\n');\n}\n\n/** The skill name a load_skill call asked for. */\nexport function loadSkillName(args: Readonly<Record<string, unknown>>): string {\n return typeof args.name === 'string' ? args.name : '';\n}\n\n/**\n * The loaded SKILL.md without its YAML frontmatter, which the header already\n * names; the rest is what the agent read.\n */\nexport function skillBody(text: string): string {\n return text.replace(/^---\\r?\\n[\\s\\S]*?\\r?\\n---\\r?\\n?/, '').trim();\n}\n\n/** How much of a loaded skill the card shows before Show more. */\nexport const SKILL_PREVIEW_LINES = 12;\n\n/**\n * The opening of a long skill, for the card to show before Show more. The cut\n * never lands inside a code fence: a preview that opened one without closing\n * it would render the rest of the card as code, so it backs up to the line\n * before the fence instead.\n */\nexport function skillPreview(body: string, maxLines = SKILL_PREVIEW_LINES): { text: string; hidden: number } {\n const lines = body.split('\\n');\n if (lines.length <= maxLines) return { text: body, hidden: 0 };\n const isFence = lines.slice(0, maxLines).map((line) => line.trimStart().startsWith('```'));\n const fences = isFence.filter(Boolean).length;\n const cut = fences % 2 === 1 ? isFence.lastIndexOf(true) : maxLines;\n // A skill that opens with a fence has no safe cut short of the whole block; show it all.\n if (cut <= 0) return { text: body, hidden: 0 };\n const text = lines.slice(0, cut).join('\\n').trimEnd();\n return { text, hidden: lines.length - cut };\n}\n\n/** The search_skills query, or undefined when the call listed every skill. */\nexport function searchQuery(args: Readonly<Record<string, unknown>>): string | undefined {\n const query = typeof args.query === 'string' ? args.query.trim() : '';\n return query.length > 0 ? query : undefined;\n}\n\n/**\n * The matches a search_skills result carries. The tool returns them as JSON\n * text; anything else (a truncated or foreign result) reads as no matches\n * rather than breaking the card.\n */\nexport function skillMatches(result: ToolResultView | null, output: string): readonly SkillMatch[] {\n let parsed: unknown;\n try {\n parsed = JSON.parse(resultText(result, output));\n } catch {\n return [];\n }\n if (!Array.isArray(parsed)) return [];\n return parsed.flatMap((entry: unknown) => {\n const record = typeof entry === 'object' && entry !== null ? (entry as Record<string, unknown>) : {};\n return typeof record.name === 'string'\n ? [{ name: record.name, description: typeof record.description === 'string' ? record.description : '' }]\n : [];\n });\n}\n","import { useT } from '@agimon-ai/po-core/web';\nimport type { ToolMessageRenderProps } from '@agimon-ai/po-core/web';\nimport {\n Button,\n Markdown,\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\n toolTone,\n} from '@agimon-ai/po-web-components';\nimport { useState } from 'react';\n\nimport { loadSkillName, resultText, skillBody, skillPreview } from '../_lib/skillToolView';\n\n/**\n * The instructions, opened on their first lines with an explicit Show more,\n * as the phone's Markdown pages a long body. A skill runs to hundreds of\n * lines; dropping all of them into the transcript at once buries the turn.\n */\nfunction SkillBody({ body }: { body: string }) {\n const t = useT();\n const [full, setFull] = useState(false);\n const preview = skillPreview(body);\n const showAll = full || preview.hidden === 0;\n return (\n <MessageItemBody data-testid=\"tool-result-load_skill\" className=\"flex flex-col gap-2\">\n <Markdown text={showAll ? body : preview.text} />\n {showAll ? null : (\n <span className=\"flex items-center gap-2\">\n <span className=\"text-sm text-po-dim\">\n {t('skill.ui.moreLines', '{count} more lines', { count: preview.hidden })}\n </span>\n <Button variant=\"ghost\" size=\"sm\" onClick={() => setFull(true)}>\n {t('skill.ui.showMore', 'Show more')}\n </Button>\n </span>\n )}\n </MessageItemBody>\n );\n}\n\n/**\n * The load_skill tool's timeline item: the skill name in the header and, once\n * expanded, the instructions the agent read, frontmatter dropped. A missing\n * skill shows the tool's message in red instead.\n */\nexport function LoadSkillToolMessage({ args, result, output, running, isError }: ToolMessageRenderProps) {\n const t = useT();\n const name = loadSkillName(args);\n const body = result === null || isError ? '' : skillBody(resultText(result, output));\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable>\n {({ expanded }) => (\n <>\n {/* no-untranslated-jsx: ignore - Preserve the technical tool identifier. */}\n <MessageItemHeader title=\"load_skill\">\n <span data-testid=\"tool-call-load_skill\" className=\"flex min-w-0 flex-1 items-center gap-2\">\n <span className=\"truncate text-po-text\">{name}</span>\n </span>\n </MessageItemHeader>\n {!expanded ? null : isError ? (\n <MessageItemBody data-testid=\"tool-result-load_skill\" className=\"flex flex-col\">\n <span className=\"whitespace-pre-wrap break-words text-po-red\">{resultText(result, output)}</span>\n </MessageItemBody>\n ) : result === null ? (\n running ? (\n <MessageItemBody data-testid=\"tool-result-load_skill\">\n <MessageItemStatus tone=\"running\">{t('skill.ui.running', 'running')}</MessageItemStatus>\n </MessageItemBody>\n ) : null\n ) : body.length === 0 ? null : (\n <SkillBody body={body} />\n )}\n </>\n )}\n </MessageItem>\n );\n}\n","import { defineToolRenderer } from '@agimon-ai/po-core/web';\n\nimport { LoadSkillToolMessage } from './_components/LoadSkillToolMessage';\n\nexport default defineToolRenderer({ message: LoadSkillToolMessage });\n","import { useT } from '@agimon-ai/po-core/web';\nimport type { ToolMessageRenderProps } from '@agimon-ai/po-core/web';\nimport {\n MessageItem,\n MessageItemBody,\n MessageItemHeader,\n MessageItemStatus,\n toolTone,\n} from '@agimon-ai/po-web-components';\n\nimport { resultText, searchQuery, skillMatches } from '../_lib/skillToolView';\n\n/**\n * The search_skills tool's timeline item: the query (or \"all skills\") and the\n * match count in the header and, once expanded, each match by name with its\n * description.\n */\nexport function SearchSkillsToolMessage({ args, result, output, running, isError }: ToolMessageRenderProps) {\n const t = useT();\n const query = searchQuery(args);\n const matches = result === null || isError ? [] : skillMatches(result, output);\n const count =\n result === null || isError ? undefined : `${matches.length} ${matches.length === 1 ? 'skill' : 'skills'}`;\n return (\n <MessageItem tone={toolTone({ running, isError })} expandable>\n {({ expanded }) => (\n <>\n {/* no-untranslated-jsx: ignore - Preserve the technical tool identifier. */}\n <MessageItemHeader title=\"search_skills\">\n <span data-testid=\"tool-call-search_skills\" className=\"flex min-w-0 flex-1 items-center gap-2\">\n {query === undefined ? (\n <span className=\"truncate text-po-dim\">{t('skill.ui.allSkills', 'all skills')}</span>\n ) : (\n <span className=\"truncate text-po-text\">{query}</span>\n )}\n {count !== undefined ? <span className=\"shrink-0 text-po-faint\">· {count}</span> : null}\n </span>\n </MessageItemHeader>\n {!expanded ? null : isError ? (\n <MessageItemBody data-testid=\"tool-result-search_skills\" className=\"flex flex-col\">\n <span className=\"whitespace-pre-wrap break-words text-po-red\">{resultText(result, output)}</span>\n </MessageItemBody>\n ) : result === null ? (\n running ? (\n <MessageItemBody data-testid=\"tool-result-search_skills\">\n <MessageItemStatus tone=\"running\">{t('skill.ui.running', 'running')}</MessageItemStatus>\n </MessageItemBody>\n ) : null\n ) : matches.length === 0 ? (\n <MessageItemBody data-testid=\"tool-result-search_skills\">\n <span className=\"text-po-dim\">{t('skill.ui.noSkillsMatch', 'No skills match.')}</span>\n </MessageItemBody>\n ) : (\n <MessageItemBody data-testid=\"tool-result-search_skills\" className=\"flex flex-col gap-2\">\n {matches.map((match) => (\n <span key={match.name} className=\"flex flex-col\">\n <span className=\"font-semibold text-po-hi\">{match.name}</span>\n {match.description.length > 0 ? (\n <span className=\"text-sm text-po-dim\">{match.description}</span>\n ) : null}\n </span>\n ))}\n </MessageItemBody>\n )}\n </>\n )}\n </MessageItem>\n );\n}\n","import { defineToolRenderer } from '@agimon-ai/po-core/web';\n\nimport { SearchSkillsToolMessage } from './_components/SearchSkillsToolMessage';\n\nexport default defineToolRenderer({ message: SearchSkillsToolMessage });\n","// Generated by @agimon-ai/po-build. Do not edit by hand.\nimport { defineWebPlugin, type WebPluginContributions } from '@agimon-ai/po-core/web';\n\nimport toolLoadSkill from '../src/extensions/workspaces/sessions/(frontend)/tool/load_skill.web';\nimport toolSearchSkills from '../src/extensions/workspaces/sessions/(frontend)/tool/search_skills.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: 'skill',\n packageName: '@agimon-ai/po-skill',\n session: {\n get toolRenderers(): WebPluginContributions['toolRenderers'] { return [via({ tools: ['load_skill'] }, toolLoadSkill), via({ tools: ['search_skills'] }, toolSearchSkills)]; },\n },\n});\n"],"mappings":";;;;;;AAQA,SAAgB,WAAW,QAA+B,QAAwB;CAChF,IAAI,WAAW,MAAM,OAAO;CAC5B,OAAO,OAAO,QACX,SAAS,UAAU;EAClB,MAAM,SAAS,OAAO,UAAU,YAAY,UAAU,OAAQ,QAA+C,CAAC;EAC9G,OAAO,OAAO,SAAS,UAAU,OAAO,OAAO,SAAS,WAAW,CAAC,OAAO,IAAI,IAAI,CAAC;CACtF,CAAC,CAAC,CACD,KAAK,IAAI;AACd;;AAGA,SAAgB,c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,"platformRequirements":{},"sourceFiles":["LICENSE","README.md","generated/mcp-ui.ts","generated/mcp.ts","generated/native.ts","generated/server.ts","generated/web.ts","llms.txt","package.json","src/constants/skillInventory.ts","src/exports/apiContracts.ts","src/exports/catalog.ts","src/exports/index.ts","src/extensions/workspaces/sessions/(backend)/_lib/skillCommands.ts","src/extensions/workspaces/sessions/(backend)/_lib/skillServer.ts","src/extensions/workspaces/sessions/(backend)/command/skills.server.ts","src/extensions/workspaces/sessions/(backend)/resource/skills.server.ts","src/extensions/workspaces/sessions/(backend)/root.server.ts","src/extensions/workspaces/sessions/(backend)/skill/discovered.mcp.ts","src/extensions/workspaces/sessions/(backend)/skill/help-how-to-author-skill.mcp.ts","src/extensions/workspaces/sessions/(backend)/skill/help-how-to-skill.mcp.ts","src/extensions/workspaces/sessions/(backend)/tool/load_skill.mcp.ts","src/extensions/workspaces/sessions/(backend)/tool/load_skill.server.ts","src/extensions/workspaces/sessions/(backend)/tool/search_skills.mcp.ts","src/extensions/workspaces/sessions/(frontend)/tool/_components/LoadSkillToolMessage.native.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/LoadSkillToolMessage.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/LoadSkillToolMessage.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/LoadSkillToolMessage.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/SearchSkillsToolMessage.native.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/SearchSkillsToolMessage.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/SearchSkillsToolMessage.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/SearchSkillsToolMessage.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_lib/skillToolView.ts","src/extensions/workspaces/sessions/(frontend)/tool/load_skill.mcp.tsx","src/extensions/workspaces/sessions/(frontend)/tool/load_skill.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/load_skill.web.tsx","src/extensions/workspaces/sessions/(frontend)/tool/search_skills.mcp.tsx","src/extensions/workspaces/sessions/(frontend)/tool/search_skills.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/search_skills.web.tsx","src/prompts/help-how-to-author-skill/SKILL.md","src/prompts/help-how-to-skill/SKILL.md","src/schemas/apiContracts.ts","src/schemas/mcpSkillTools.ts","src/services/deferredSkills/index.edge.ts","src/services/deferredSkills/index.ts","src/services/mcpSkillTools/index.ts","src/services/mcpSkills/index.ts","src/services/serverInventory/catalog.ts","src/services/serverInventory/grouping.ts","src/services/serverInventory/index.edge.ts","src/services/serverInventory/index.ts","src/services/skillCatalog/index.ts","src/types/skills.ts","tsdown.config.ts"],"sourceRevision":"8d5777f17a87a2b670ef0987961c4aa0","manifestRevision":"96cd362a2e0a2502eed7d363649f8412","outputFiles":["LICENSE","README.md","dist/apiContracts.cjs","dist/apiContracts.mjs","dist/catalog.cjs","dist/catalog.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/rolldown-runtime-VH7oDXx4.cjs","dist/skills-Ccvg1Hcz.mjs","dist/skills-ComtgYb1.cjs","llms.txt","src/prompts/help-how-to-author-skill/SKILL.md","src/prompts/help-how-to-skill/SKILL.md"],"outputRevision":"e2ecb07231075ef11ad729f2ca40a11d"}
1
+ {"version":1,"platformRequirements":{},"sourceFiles":["LICENSE","README.md","generated/mcp-ui.ts","generated/mcp.ts","generated/native.ts","generated/server.ts","generated/web.ts","llms.txt","package.json","src/constants/skillInventory.ts","src/exports/apiContracts.ts","src/exports/catalog.ts","src/exports/index.ts","src/extensions/workspaces/sessions/(backend)/_lib/skillCommands.ts","src/extensions/workspaces/sessions/(backend)/_lib/skillServer.ts","src/extensions/workspaces/sessions/(backend)/command/skills.server.ts","src/extensions/workspaces/sessions/(backend)/resource/skills.server.ts","src/extensions/workspaces/sessions/(backend)/root.server.ts","src/extensions/workspaces/sessions/(backend)/skill/discovered.mcp.ts","src/extensions/workspaces/sessions/(backend)/skill/help-how-to-author-skill.mcp.ts","src/extensions/workspaces/sessions/(backend)/skill/help-how-to-skill.mcp.ts","src/extensions/workspaces/sessions/(backend)/tool/load_skill.mcp.ts","src/extensions/workspaces/sessions/(backend)/tool/load_skill.server.ts","src/extensions/workspaces/sessions/(backend)/tool/search_skills.mcp.ts","src/extensions/workspaces/sessions/(frontend)/tool/_components/LoadSkillToolMessage.native.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/LoadSkillToolMessage.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/LoadSkillToolMessage.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/LoadSkillToolMessage.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/SearchSkillsToolMessage.native.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/SearchSkillsToolMessage.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/SearchSkillsToolMessage.stories.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_components/SearchSkillsToolMessage.tsx","src/extensions/workspaces/sessions/(frontend)/tool/_lib/skillToolView.ts","src/extensions/workspaces/sessions/(frontend)/tool/load_skill.mcp.tsx","src/extensions/workspaces/sessions/(frontend)/tool/load_skill.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/load_skill.web.tsx","src/extensions/workspaces/sessions/(frontend)/tool/search_skills.mcp.tsx","src/extensions/workspaces/sessions/(frontend)/tool/search_skills.native.tsx","src/extensions/workspaces/sessions/(frontend)/tool/search_skills.web.tsx","src/prompts/help-how-to-author-skill/SKILL.md","src/prompts/help-how-to-skill/SKILL.md","src/schemas/apiContracts.ts","src/schemas/mcpSkillTools.ts","src/services/deferredSkills/index.edge.ts","src/services/deferredSkills/index.ts","src/services/mcpSkillTools/index.ts","src/services/mcpSkills/index.ts","src/services/serverInventory/catalog.ts","src/services/serverInventory/grouping.ts","src/services/serverInventory/index.edge.ts","src/services/serverInventory/index.ts","src/services/skillCatalog/index.ts","src/types/skills.ts","tsdown.config.ts"],"sourceRevision":"60dd8fed0a01f690cf38d9ce36152539","manifestRevision":"ab9a0edcedea44078f156fc1a80568c7","outputFiles":["LICENSE","README.md","dist/apiContracts.cjs","dist/apiContracts.mjs","dist/catalog.cjs","dist/catalog.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/rolldown-runtime-VH7oDXx4.cjs","dist/skills-Ccvg1Hcz.mjs","dist/skills-ComtgYb1.cjs","llms.txt","src/prompts/help-how-to-author-skill/SKILL.md","src/prompts/help-how-to-skill/SKILL.md"],"outputRevision":"d7daf0a4b792e32421e033792dc21a1a"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agimon-ai/po-skill",
3
- "version": "0.0.0-alpha.194",
3
+ "version": "0.0.0-alpha.196",
4
4
  "description": "Session skill catalogue, deferred skill discovery, and the skill browser for Po.",
5
5
  "keywords": [
6
6
  "agent-skills",
@@ -18,7 +18,7 @@
18
18
  "bugs": {
19
19
  "url": "https://github.com/AgiFlow/po/issues"
20
20
  },
21
- "license": "BUSL-1.1",
21
+ "license": "MIT",
22
22
  "author": "Vuong Ngo",
23
23
  "repository": {
24
24
  "type": "git",
@@ -71,20 +71,20 @@
71
71
  "access": "public"
72
72
  },
73
73
  "dependencies": {
74
- "@agimon-ai/po-config": "0.0.0-alpha.194",
75
- "@agimon-ai/po-core": "0.0.0-alpha.194",
76
- "@agimon-ai/po-domain": "0.0.0-alpha.194",
77
- "@agimon-ai/po-web-components": "0.0.0-alpha.194",
74
+ "@agimon-ai/po-config": "0.0.0-alpha.196",
75
+ "@agimon-ai/po-core": "0.0.0-alpha.196",
76
+ "@agimon-ai/po-domain": "0.0.0-alpha.196",
77
+ "@agimon-ai/po-web-components": "0.0.0-alpha.196",
78
78
  "@deepseek-ai/cordis": "4.0.5",
79
79
  "gpt-tokenizer": "4.1.0",
80
80
  "typebox": "1.4.2"
81
81
  },
82
82
  "devDependencies": {
83
- "@agimon-ai/po-build": "0.0.0-alpha.194",
84
- "@agimon-ai/po-native-components": "0.0.0-alpha.194",
85
- "@agimon-ai/vibe-lint-plugin-po-extension": "0.0.0-alpha.194",
83
+ "@agimon-ai/po-build": "0.0.0-alpha.196",
84
+ "@agimon-ai/po-native-components": "0.0.0-alpha.196",
85
+ "@agimon-ai/vibe-lint-plugin-po-extension": "0.0.0-alpha.196",
86
86
  "@deepseek-ai/cordis": "4.0.5",
87
- "@earendil-works/pi-coding-agent": "1.5.2",
87
+ "@earendil-works/pi-coding-agent": "1.6.1",
88
88
  "@types/node": "26.6.5",
89
89
  "@types/react": "19.3.0",
90
90
  "@vitest/coverage-v8": "5.0.4",
@@ -98,8 +98,8 @@
98
98
  "vitest": "5.0.4"
99
99
  },
100
100
  "peerDependencies": {
101
- "@agimon-ai/po-native-components": "0.0.0-alpha.194",
102
- "@earendil-works/pi-coding-agent": "1.5.2",
101
+ "@agimon-ai/po-native-components": "0.0.0-alpha.196",
102
+ "@earendil-works/pi-coding-agent": "1.6.1",
103
103
  "react-native": "0.88.1",
104
104
  "react-native-unistyles": "^3.5.3"
105
105
  },