@agimon-ai/po-codemode 0.0.1-alpha.2 → 0.0.1-alpha.20
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 +23 -11
- package/dist/codemodeTools-De6GNjzR.mjs +761 -0
- package/dist/codemodeTools-De6GNjzR.mjs.map +1 -0
- package/dist/codemodeTools-DiqyGxSU.cjs +772 -0
- package/dist/codemodeTools-DiqyGxSU.cjs.map +1 -0
- package/dist/extensions/native.mjs +419 -0
- package/dist/extensions/native.mjs.map +1 -0
- package/dist/extensions/server.cjs +484 -23
- package/dist/extensions/server.cjs.map +1 -1
- package/dist/extensions/server.d.mts.map +1 -1
- package/dist/extensions/server.mjs +485 -24
- 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 +24 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/llms.txt +3 -1
- package/package.json +39 -12
- package/src/prompts/codemode-how-to-llm/SKILL.md +29 -0
- package/src/prompts/codemode-how-to-shell/SKILL.md +21 -0
- package/src/prompts/how-to-codemode/SKILL.md +71 -0
- package/dist/codemodeTools-BdwOARH8.mjs +0 -383
- package/dist/codemodeTools-BdwOARH8.mjs.map +0 -1
- package/dist/codemodeTools-CLgSDqfU.cjs +0 -394
- package/dist/codemodeTools-CLgSDqfU.cjs.map +0 -1
- package/src/prompts/po-use-codemode/SKILL.md +0 -46
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ This package is a composable [Po](https://www.npmjs.com/package/@agimon-ai/po) s
|
|
|
7
7
|
## Requirements
|
|
8
8
|
|
|
9
9
|
- Node.js 24 or newer
|
|
10
|
-
- `@earendil-works/pi-coding-agent` 1.
|
|
10
|
+
- `@earendil-works/pi-coding-agent` 1.4.0
|
|
11
11
|
|
|
12
12
|
## Install
|
|
13
13
|
|
|
@@ -19,26 +19,38 @@ The package declares poServer metadata for native server discovery. Include it t
|
|
|
19
19
|
|
|
20
20
|
## Use
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Call `discover({})` to list the session's contributed namespaces and reusable scripts. Use `exec` to run a TypeScript async function body against them.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
/po-codemode
|
|
26
|
-
```
|
|
24
|
+
## Package behavior
|
|
27
25
|
|
|
28
|
-
|
|
26
|
+
Call `discover({ namespace: 'browser' })` for current types, then `exec({ code: 'return await browser.snapshot({});' })`. Namespace plugins supply their own `codemode-how-to-<plugin>` guides. Their summaries and the base `how-to-codemode` guide stay in the system prompt, outside skill search; `load_skill` still reads their full instructions by exact name.
|
|
29
27
|
|
|
30
|
-
|
|
28
|
+
### npm imports
|
|
29
|
+
|
|
30
|
+
On Node hosts, `await import('npm:is-number@7')` auto-installs through upm and returns the real module namespace. Registry names, scopes, versions, ranges, tags and subpaths are supported. The shared store uses the existing two-day release-age policy (exact and locked versions bypass it); lifecycle scripts are skipped. First installs may need a larger exec `timeoutMs`.
|
|
31
|
+
|
|
32
|
+
Packages run with full Node authority. Native code is not preemptible, package resources are not automatically closed, and cancellation cannot stop an install already in progress. `new` works on imported constructors; subclassing and `instanceof` are unsupported. Edge hosts cannot import. Script globals still omit `fetch`, `require` and `process`.
|
|
33
|
+
|
|
34
|
+
### Short Bash commands
|
|
35
|
+
|
|
36
|
+
`shell.bash({ command, timeoutMs? })` returns `{ stdout, stderr, exitCode }` for code-side post-processing. It runs in the session cwd with its admitted environment. Nonzero exits are returned; startup failures, timeout and cancellation reject. The deadline defaults to 10 seconds (maximum 120 seconds) and the command is cancelled when exec ends. Each output stream is capped at 32768 characters with a `[truncated]` marker.
|
|
37
|
+
|
|
38
|
+
This is foreground-only execution, not Runner supervision: no background option, interactive terminal, Runner IDs or persistent logs. The standalone Runner `bash` tool remains visible for those workflows. See [shell guidance](./src/prompts/codemode-how-to-shell/SKILL.md).
|
|
39
|
+
|
|
40
|
+
### LLM transformations
|
|
41
|
+
|
|
42
|
+
`llm.complete({ prompt, input? })` returns `{ text, model }`; `llm.json({ prompt, input?, schema })` returns `{ value, model }`. Calls are stateless, use no session history, and count toward session usage. JSON results require one private `return_result` call and local schema validation; tool choice is prompt-directed.
|
|
31
43
|
|
|
32
|
-
|
|
44
|
+
Set the optional `llmModel: provider/id` in the `@agimon-ai/po-codemode` package configuration to choose a default. A per-call `model` wins, otherwise the current session model is used. Limits per exec are 8 calls and 2 concurrent calls, with 64 KiB input per call and 1024 default / 4096 maximum output tokens. There are no retries. See [LLM guidance](./src/prompts/codemode-how-to-llm/SKILL.md) for pipelines and schema constraints.
|
|
33
45
|
|
|
34
|
-
##
|
|
46
|
+
## How-to guide
|
|
35
47
|
|
|
36
|
-
The published package includes `llms.txt` and `src/prompts/
|
|
48
|
+
The published package includes `llms.txt` and `src/prompts/how-to-codemode/SKILL.md`. Link additional prompts from `llms.txt` and declare them through named `resource/*.server.ts` routes using `defineResource`. Server lifecycle registration owns their disposal. Publish prompts under `src/prompts`, never export Markdown or copy it into `dist`.
|
|
37
49
|
|
|
38
50
|
## Public API
|
|
39
51
|
|
|
40
52
|
```ts
|
|
41
|
-
import {
|
|
53
|
+
import { createCodemodeRegistry, createCodemodeTools } from '@agimon-ai/po-codemode';
|
|
42
54
|
```
|
|
43
55
|
|
|
44
56
|
The native server entry is also available at:
|