@agimon-ai/po-codemode 0.0.1-alpha.5 → 0.0.1-alpha.50
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/README.md +1 -1
- package/dist/codemodeTools-CkXEL8R5.cjs +835 -0
- package/dist/codemodeTools-CkXEL8R5.cjs.map +1 -0
- package/dist/codemodeTools-D6sT2inu.mjs +824 -0
- package/dist/codemodeTools-D6sT2inu.mjs.map +1 -0
- package/dist/extensions/native.mjs +430 -0
- package/dist/extensions/native.mjs.map +1 -0
- package/dist/extensions/server.cjs +25 -13
- package/dist/extensions/server.cjs.map +1 -1
- package/dist/extensions/server.mjs +25 -13
- package/dist/extensions/server.mjs.map +1 -1
- package/dist/extensions/web.mjs +214 -117
- package/dist/extensions/web.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.mts +9 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +47 -13
- package/src/prompts/codemode-how-to-llm/SKILL.md +1 -1
- package/src/prompts/codemode-how-to-shell/SKILL.md +1 -1
- package/src/prompts/how-to-codemode/SKILL.md +3 -2
- package/dist/codemodeTools-B3n6iodq.cjs +0 -605
- package/dist/codemodeTools-B3n6iodq.cjs.map +0 -1
- package/dist/codemodeTools-Dl-IEjBr.mjs +0 -594
- package/dist/codemodeTools-Dl-IEjBr.mjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agimon-ai/po-codemode",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.50",
|
|
4
4
|
"description": "Code mode for Po sessions: discover and exec over namespaces other packages contribute",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -12,8 +12,16 @@
|
|
|
12
12
|
"typescript"
|
|
13
13
|
],
|
|
14
14
|
"homepage": "https://agimon.ai",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/AgiFlow/po/issues"
|
|
17
|
+
},
|
|
15
18
|
"license": "BUSL-1.1",
|
|
16
19
|
"author": "Vuong Ngo",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/AgiFlow/po.git",
|
|
23
|
+
"directory": "packages/default/po-codemode"
|
|
24
|
+
},
|
|
17
25
|
"files": [
|
|
18
26
|
"dist",
|
|
19
27
|
"src/prompts",
|
|
@@ -38,6 +46,9 @@
|
|
|
38
46
|
"import": "./dist/apiContracts.mjs",
|
|
39
47
|
"require": "./dist/apiContracts.cjs"
|
|
40
48
|
},
|
|
49
|
+
"./extensions/native": {
|
|
50
|
+
"import": "./dist/extensions/native.mjs"
|
|
51
|
+
},
|
|
41
52
|
"./extensions/server": {
|
|
42
53
|
"types": "./dist/extensions/server.d.mts",
|
|
43
54
|
"import": "./dist/extensions/server.mjs",
|
|
@@ -52,38 +63,61 @@
|
|
|
52
63
|
"access": "public"
|
|
53
64
|
},
|
|
54
65
|
"dependencies": {
|
|
55
|
-
"@agimon-ai/po-config": "0.0.0-alpha.
|
|
56
|
-
"@agimon-ai/po-core": "0.0.0-alpha.
|
|
57
|
-
"@agimon-ai/po-web-components": "0.0.0-alpha.
|
|
66
|
+
"@agimon-ai/po-config": "0.0.0-alpha.77",
|
|
67
|
+
"@agimon-ai/po-core": "0.0.0-alpha.77",
|
|
68
|
+
"@agimon-ai/po-web-components": "0.0.0-alpha.77",
|
|
58
69
|
"@deepseek-ai/cordis": "4.0.5",
|
|
59
|
-
"react": "19.3.
|
|
60
|
-
"typebox": "1.
|
|
70
|
+
"react": "19.3.1",
|
|
71
|
+
"typebox": "1.4.2"
|
|
61
72
|
},
|
|
62
73
|
"devDependencies": {
|
|
63
|
-
"@agimon-ai/po-build": "0.0.0-alpha.
|
|
64
|
-
"@agimon-ai/
|
|
65
|
-
"@agimon-ai/vibe-lint-plugin-po-
|
|
66
|
-
"@
|
|
74
|
+
"@agimon-ai/po-build": "0.0.0-alpha.77",
|
|
75
|
+
"@agimon-ai/po-native-components": "0.0.0-alpha.77",
|
|
76
|
+
"@agimon-ai/vibe-lint-plugin-po-extension": "0.0.0-alpha.77",
|
|
77
|
+
"@agimon-ai/vibe-lint-plugin-po-web": "0.0.0-alpha.77",
|
|
78
|
+
"@earendil-works/pi-coding-agent": "1.4.0",
|
|
67
79
|
"@types/node": "26.6.5",
|
|
68
80
|
"@types/react": "19.3.0",
|
|
69
81
|
"@types/react-dom": "19.3.0",
|
|
70
82
|
"@vitest/coverage-v8": "5.0.4",
|
|
71
|
-
"react-dom": "19.3.
|
|
83
|
+
"react-dom": "19.3.1",
|
|
84
|
+
"react-native": "0.88.0",
|
|
85
|
+
"react-native-unistyles": "3.5.3",
|
|
72
86
|
"tsdown": "0.23.1",
|
|
73
87
|
"typescript": "7.0.2",
|
|
74
88
|
"vitest": "5.0.4"
|
|
75
89
|
},
|
|
76
90
|
"peerDependencies": {
|
|
77
|
-
"@
|
|
91
|
+
"@agimon-ai/po-native-components": "0.0.0-alpha.77",
|
|
92
|
+
"@earendil-works/pi-coding-agent": "1.4.0",
|
|
93
|
+
"react-native": "0.88.0",
|
|
94
|
+
"react-native-unistyles": "^3.5.3"
|
|
78
95
|
},
|
|
79
96
|
"peerDependenciesMeta": {
|
|
97
|
+
"@agimon-ai/po-native-components": {
|
|
98
|
+
"optional": true
|
|
99
|
+
},
|
|
80
100
|
"@earendil-works/pi-coding-agent": {
|
|
81
101
|
"optional": true
|
|
102
|
+
},
|
|
103
|
+
"react-native": {
|
|
104
|
+
"optional": true
|
|
105
|
+
},
|
|
106
|
+
"react-native-unistyles": {
|
|
107
|
+
"optional": true
|
|
82
108
|
}
|
|
83
109
|
},
|
|
84
110
|
"engines": {
|
|
85
111
|
"node": ">=24"
|
|
86
112
|
},
|
|
113
|
+
"poNative": {
|
|
114
|
+
"pluginId": "codemode",
|
|
115
|
+
"channels": [],
|
|
116
|
+
"client": "./dist/extensions/native.mjs",
|
|
117
|
+
"scopes": [
|
|
118
|
+
"session"
|
|
119
|
+
]
|
|
120
|
+
},
|
|
87
121
|
"poServer": {
|
|
88
122
|
"entry": "./generated/server.ts",
|
|
89
123
|
"dist": "./dist/extensions/server.mjs",
|
|
@@ -111,7 +145,7 @@
|
|
|
111
145
|
"scripts": {
|
|
112
146
|
"build": "tsdown",
|
|
113
147
|
"test": "vitest --run",
|
|
114
|
-
"typecheck": "
|
|
148
|
+
"typecheck": "tsrs --noEmit && tsrs --noEmit -p tsconfig.web.json && tsrs --noEmit -p tsconfig.native.json",
|
|
115
149
|
"lint": "oxlint . && oxfmt . --check",
|
|
116
150
|
"fixcode": "oxlint . --fix && oxfmt ."
|
|
117
151
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: codemode-how-to-llm
|
|
3
|
-
description: '
|
|
3
|
+
description: 'Have a model classify, extract or summarize data inside a script, with JSON output checked against a schema. Use when a script step needs judgement over many items or messy text; answer directly when no script needs the result.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Use LLM transformations
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: codemode-how-to-shell
|
|
3
|
-
description: '
|
|
3
|
+
description: 'Run a quick command inside a script and work with its output as data. Use when command output needs parsing or filtering in code; use the bash tool for long-running, interactive or visible commands.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Short Bash commands in code mode
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: how-to-codemode
|
|
3
|
-
description: '
|
|
3
|
+
description: 'Do multi-step work in one call: script loops, filtering and chained calls across live namespaces in exec instead of many separate tool calls. Use when a task repeats a tool, combines namespaces, or needs a long-running workflow.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Use code mode
|
|
@@ -59,7 +59,7 @@ Use `exec_background({ code, timeoutMs? })` for orchestration that outlives fore
|
|
|
59
59
|
|
|
60
60
|
## Promote a script
|
|
61
61
|
|
|
62
|
-
To keep a useful script, copy the saved file with normal file tools to `plugins/<domain>/codemode/<name>.ts`. Start it with a `/** ... */` comment whose first paragraph says what it does and what `args` it takes; `discover` shows that paragraph. Sessions with that domain active
|
|
62
|
+
To keep a useful script, copy the saved file with normal file tools to `plugins/<domain>/codemode/<name>.ts`. Start it with a `/** ... */` comment whose first paragraph says what it does and what `args` it takes; `discover` shows that paragraph. Sessions with that domain active see its name in the `exec` description and call it as `<domain>/<name>`.
|
|
63
63
|
|
|
64
64
|
## Rules
|
|
65
65
|
|
|
@@ -67,5 +67,6 @@ To keep a useful script, copy the saved file with normal file tools to `plugins/
|
|
|
67
67
|
- Foreground script code stops at its deadline (30 s by default, `timeoutMs` up to 120 s), including its loops and recursion. Background scripts have a longer asynchronous deadline, not a longer synchronous budget. Native npm code is not preemptible.
|
|
68
68
|
- Objects you get from a namespace are live. Listeners you add and the objects themselves stop working when the run ends; keep state in the namespace, not in script variables.
|
|
69
69
|
- `exec` runs inside the Po server with full trust, like `bash`. Do not use it to bypass a blocked tool.
|
|
70
|
+
- A member `discover` marks `(asks first)` or `(needs the person)` never waits. When the person must decide, the call is recorded and throws `ApprovalPendingError` (check `error.name`; it carries `approvalId`), and the exec result lists what waits. Catch it, keep working, and do not retry: the call runs once with the same first argument after Approve, and its outcome arrives as a message. Pass only JSON in that argument. Take back a request you no longer need with `approval_withdraw`.
|
|
70
71
|
- There is no `eval`, `Function`, `setTimeout`, `fetch`, `require` or `process` inside a script.
|
|
71
72
|
- Ordinary subagents may have `exec`, subject to their restrictions. Awaited `team.run` children do not. Up to 8 foreground/background runs can overlap. Namespaces are shared, so a run sees the pages and tasks another agent made.
|