@cydm/pie 1.0.23 → 1.0.25
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 +51 -5
- package/dist/builtin/extensions/ask-user/index.js +3 -3
- package/dist/builtin/extensions/ask-user/package.json +16 -0
- package/dist/builtin/extensions/changelog/package.json +11 -0
- package/dist/builtin/extensions/deploy/package.json +11 -0
- package/dist/builtin/extensions/document-attachments/package.json +11 -0
- package/dist/builtin/extensions/files/package.json +14 -0
- package/dist/builtin/extensions/init/package.json +11 -0
- package/dist/builtin/extensions/kimi-attachments/package.json +11 -0
- package/dist/builtin/extensions/plan-mode/index.js +3 -3
- package/dist/builtin/extensions/plan-mode/package.json +11 -0
- package/dist/builtin/extensions/subagent/index.js +4 -4
- package/dist/builtin/extensions/subagent/package.json +14 -0
- package/dist/builtin/extensions/todo/index.js +3 -3
- package/dist/builtin/extensions/todo/package.json +11 -0
- package/dist/builtin/skills/browser-tools/README.md +1 -1
- package/dist/builtin/skills/browser-tools/SKILL.md +3 -3
- package/dist/builtin/skills/browser-tools/playwright-cli.js +22 -1
- package/dist/chunks/{chunk-PUZP2Q3F.js → chunk-4B42ZU4B.js} +1 -1
- package/dist/chunks/{chunk-7ABSJC2D.js → chunk-64XJIKVK.js} +371 -120
- package/dist/chunks/{chunk-4WU5VAX4.js → chunk-BEWVRLCP.js} +387 -230
- package/dist/chunks/{chunk-AFTBFF6J.js → chunk-O4DPFYYP.js} +3425 -416
- package/dist/chunks/{src-UCXJ4C6P.js → src-27UD2ZBZ.js} +2 -2
- package/dist/chunks/{test-stream-UKULOPZB.js → test-stream-ZNGAUUVH.js} +6 -2
- package/dist/cli.js +3574 -2050
- package/dist/{chunks/typescript-GSKWJIO4.js → code-intel-worker.cjs} +2507 -2031
- package/models.schema.json +38 -13
- package/package.json +11 -7
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ Pie is developed by [cydream](https://cydream.tech).
|
|
|
20
20
|
npm install -g @cydm/pie
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Pie
|
|
23
|
+
Pie requires Node.js 20.19 or newer. Release builds are validated with npm's lockfile workflow (`npm ci`) so dependency resolution is reproducible.
|
|
24
24
|
|
|
25
25
|
## Quick Start
|
|
26
26
|
|
|
@@ -104,6 +104,24 @@ pie models init --stdout
|
|
|
104
104
|
|
|
105
105
|
For editor auto-complete and validation, you can also point the optional `"$schema"` field in your local `models.json` at your installed `@cydm/pie/models.schema.json` file.
|
|
106
106
|
|
|
107
|
+
### Remote model catalogs
|
|
108
|
+
|
|
109
|
+
Pie can add centrally managed models without replacing local profiles or defaults. Add a catalog to `~/.pie/models.json` and keep the virtual key in an environment variable:
|
|
110
|
+
|
|
111
|
+
```json
|
|
112
|
+
{
|
|
113
|
+
"remoteCatalogs": [
|
|
114
|
+
{
|
|
115
|
+
"id": "token-manager",
|
|
116
|
+
"url": "https://token.magicshell.ai/v1/client-catalogs/pie.json",
|
|
117
|
+
"apiKeyEnv": "TOKEN_MANAGER_API_KEY"
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Remote catalogs use a three-second timeout, reject redirects, and fall back to the last valid cached response. A local profile with the same id always wins. Remote catalogs never modify `defaults`.
|
|
124
|
+
|
|
107
125
|
Start Pie in interactive mode:
|
|
108
126
|
|
|
109
127
|
```bash
|
|
@@ -199,10 +217,11 @@ Pie uses a hierarchical slash-command menu. The current built-in commands includ
|
|
|
199
217
|
| `/skills/list` | List available skills |
|
|
200
218
|
| `/skills/use` | Use a skill |
|
|
201
219
|
| `/skills/reload` | Reload skills from disk |
|
|
220
|
+
| `/settings/extensions` | List extensions and toggle enable/disable |
|
|
202
221
|
| `/tools/subagent` | Spawn a subagent for a task |
|
|
203
|
-
| `/debugs/cache-test` | Run provider cache diagnostics with a dedicated 2-request probe |
|
|
204
|
-
| `/debugs/context` | Append a context summary to `~/.pie/logs/pie-cli.log` |
|
|
205
|
-
| `/debugs/package` | Append a package summary to `~/.pie/logs/pie-cli.log` |
|
|
222
|
+
| `/settings/debugs/cache-test` | Run provider cache diagnostics with a dedicated 2-request probe |
|
|
223
|
+
| `/settings/debugs/context` | Append a context summary to `~/.pie/logs/pie-cli.log` |
|
|
224
|
+
| `/settings/debugs/package` | Append a package summary to `~/.pie/logs/pie-cli.log` |
|
|
206
225
|
|
|
207
226
|
Pie can also load extension-provided commands at runtime.
|
|
208
227
|
|
|
@@ -228,6 +247,33 @@ Pie supports Markdown-based skills and built-in extensions.
|
|
|
228
247
|
|
|
229
248
|
That is part of what makes Pie embeddable: the CLI is only one interface on top of a broader agent toolkit.
|
|
230
249
|
|
|
250
|
+
## Extension Sources, Priority, And Toggles
|
|
251
|
+
|
|
252
|
+
Extensions are discovered from four sources in ascending priority (later sources shadow earlier ones by stable extension identity):
|
|
253
|
+
|
|
254
|
+
1. `builtin` — shipped with the CLI (`ask-user`, `todo`, `plan-mode`, `subagent`, `init`, `changelog`, `deploy`, `files`, attachment handlers)
|
|
255
|
+
2. `global` — `~/.pie/extensions/`
|
|
256
|
+
3. `project` — `./.pie/extensions/`
|
|
257
|
+
4. `configured` — repeated `--extension-path <dir>` flags
|
|
258
|
+
|
|
259
|
+
Every extension is enabled by default. Toggles are sparse overrides stored in settings and applied by extension identity across all sources:
|
|
260
|
+
|
|
261
|
+
- Interactive: choose **Extensions** in `/settings`, or use `/settings/extensions`, to open the user-default toggle menu. `/settings/extensions --project` edits project overrides; `/settings/extensions/list|enable|disable ...` remains available for command-driven use.
|
|
262
|
+
- Scripts and third-party UIs: `pie extensions list [--json]`, `pie extensions enable|disable <name> [--project|--user]`
|
|
263
|
+
- Process flags: `--no-builtin-extensions` (skip built-ins) and `--no-extensions` (skip all discovered sources; `--extension-path` still loads)
|
|
264
|
+
|
|
265
|
+
Example override in `~/.pie/settings.json` (or `./.pie/settings.json` for project scope, which wins per identity):
|
|
266
|
+
|
|
267
|
+
```jsonc
|
|
268
|
+
{
|
|
269
|
+
"extensions": {
|
|
270
|
+
"plan-mode": { "enabled": false }
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
The full contract (identity rules, schema, host integration) lives in [`docs/extensions-enablement.md`](../../docs/extensions-enablement.md).
|
|
276
|
+
|
|
231
277
|
## Browser Tools
|
|
232
278
|
|
|
233
279
|
The built-in `browser-tools` skill uses Microsoft's Playwright CLI for visible browser automation. Its runtime dependencies ship with the CLI; do not run `npm install` inside the skill directory.
|
|
@@ -239,7 +285,7 @@ node <resolvedPath for browser-tools/playwright-cli.js> open https://example.com
|
|
|
239
285
|
node <resolvedPath for browser-tools/playwright-cli.js> snapshot
|
|
240
286
|
node <resolvedPath for browser-tools/playwright-cli.js> screenshot
|
|
241
287
|
node <resolvedPath for browser-tools/playwright-cli.js> console
|
|
242
|
-
node <resolvedPath for browser-tools/playwright-cli.js>
|
|
288
|
+
node <resolvedPath for browser-tools/playwright-cli.js> requests
|
|
243
289
|
```
|
|
244
290
|
|
|
245
291
|
If Playwright's Chromium browser is not installed, run:
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
createAskUserCapability
|
|
4
|
-
} from "../../../chunks/chunk-
|
|
5
|
-
import "../../../chunks/chunk-
|
|
6
|
-
import "../../../chunks/chunk-
|
|
4
|
+
} from "../../../chunks/chunk-O4DPFYYP.js";
|
|
5
|
+
import "../../../chunks/chunk-4B42ZU4B.js";
|
|
6
|
+
import "../../../chunks/chunk-64XJIKVK.js";
|
|
7
7
|
import "../../../chunks/chunk-TG2EQLX2.js";
|
|
8
8
|
|
|
9
9
|
// builtin/extensions/ask-user/index.ts
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pie/ask-user-extension",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"pie": {
|
|
7
|
+
"name": "ask-user",
|
|
8
|
+
"main": "index.ts"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@sinclair/typebox": "^0.34.0"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pie/extension-files",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "File browser with git status support",
|
|
5
|
+
"main": "index.ts",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"pie": {
|
|
8
|
+
"name": "files",
|
|
9
|
+
"main": "index.ts"
|
|
10
|
+
},
|
|
11
|
+
"keywords": ["pie", "extension", "files", "git"],
|
|
12
|
+
"author": "Pie Team",
|
|
13
|
+
"license": "MIT"
|
|
14
|
+
}
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
isPlanModeSafeCommand,
|
|
8
8
|
markCompletedPlanSteps,
|
|
9
9
|
restoreExecutionState
|
|
10
|
-
} from "../../../chunks/chunk-
|
|
11
|
-
import "../../../chunks/chunk-
|
|
12
|
-
import "../../../chunks/chunk-
|
|
10
|
+
} from "../../../chunks/chunk-O4DPFYYP.js";
|
|
11
|
+
import "../../../chunks/chunk-4B42ZU4B.js";
|
|
12
|
+
import "../../../chunks/chunk-64XJIKVK.js";
|
|
13
13
|
import "../../../chunks/chunk-TG2EQLX2.js";
|
|
14
14
|
|
|
15
15
|
// builtin/extensions/plan-mode/index.ts
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "plan-mode-extension",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Plan Mode Extension for Pie - Read-only exploration mode with plan tracking",
|
|
5
|
+
"main": "index.ts",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"pie": {
|
|
8
|
+
"name": "plan-mode",
|
|
9
|
+
"main": "index.ts"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
createCliHostCapabilities
|
|
4
|
-
} from "../../../chunks/chunk-
|
|
4
|
+
} from "../../../chunks/chunk-BEWVRLCP.js";
|
|
5
5
|
import {
|
|
6
6
|
createSharedFileSystemTools,
|
|
7
7
|
createSubagentCapability
|
|
8
|
-
} from "../../../chunks/chunk-
|
|
9
|
-
import "../../../chunks/chunk-
|
|
10
|
-
import "../../../chunks/chunk-
|
|
8
|
+
} from "../../../chunks/chunk-O4DPFYYP.js";
|
|
9
|
+
import "../../../chunks/chunk-4B42ZU4B.js";
|
|
10
|
+
import "../../../chunks/chunk-64XJIKVK.js";
|
|
11
11
|
import "../../../chunks/chunk-TG2EQLX2.js";
|
|
12
12
|
|
|
13
13
|
// builtin/extensions/subagent/index.ts
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pie/extension-subagent",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Spawn child agents for isolated task handling",
|
|
5
|
+
"main": "index.ts",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"pie": {
|
|
8
|
+
"name": "subagent",
|
|
9
|
+
"main": "index.ts"
|
|
10
|
+
},
|
|
11
|
+
"keywords": ["pie", "extension", "subagent"],
|
|
12
|
+
"author": "Pie Team",
|
|
13
|
+
"license": "MIT"
|
|
14
|
+
}
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
executeManageTodoList,
|
|
8
8
|
executionStateToTodos,
|
|
9
9
|
restoreExecutionState
|
|
10
|
-
} from "../../../chunks/chunk-
|
|
11
|
-
import "../../../chunks/chunk-
|
|
12
|
-
import "../../../chunks/chunk-
|
|
10
|
+
} from "../../../chunks/chunk-O4DPFYYP.js";
|
|
11
|
+
import "../../../chunks/chunk-4B42ZU4B.js";
|
|
12
|
+
import "../../../chunks/chunk-64XJIKVK.js";
|
|
13
13
|
import "../../../chunks/chunk-TG2EQLX2.js";
|
|
14
14
|
|
|
15
15
|
// builtin/extensions/todo/index.ts
|
|
@@ -10,7 +10,7 @@ node playwright-cli.js open https://example.com
|
|
|
10
10
|
node playwright-cli.js snapshot
|
|
11
11
|
node playwright-cli.js screenshot
|
|
12
12
|
node playwright-cli.js console
|
|
13
|
-
node playwright-cli.js
|
|
13
|
+
node playwright-cli.js requests
|
|
14
14
|
node playwright-cli.js close
|
|
15
15
|
```
|
|
16
16
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: browser-tools
|
|
3
|
-
description: Interactive browser automation via Microsoft Playwright CLI. Use when you need to open pages, inspect DOM snapshots, click/type, capture screenshots, inspect console/
|
|
3
|
+
description: Interactive browser automation via Microsoft Playwright CLI. Use when you need to open pages, inspect DOM snapshots, click/type, capture screenshots, inspect console/request output, or test frontend flows in a real browser.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Browser Tools
|
|
@@ -19,7 +19,7 @@ node <baseDir>/playwright-cli.js click "Submit"
|
|
|
19
19
|
node <baseDir>/playwright-cli.js type "hello"
|
|
20
20
|
node <baseDir>/playwright-cli.js screenshot
|
|
21
21
|
node <baseDir>/playwright-cli.js console
|
|
22
|
-
node <baseDir>/playwright-cli.js
|
|
22
|
+
node <baseDir>/playwright-cli.js requests
|
|
23
23
|
node <baseDir>/playwright-cli.js close
|
|
24
24
|
```
|
|
25
25
|
|
|
@@ -27,7 +27,7 @@ Use `node <baseDir>/playwright-cli.js --help` for the full command list.
|
|
|
27
27
|
|
|
28
28
|
## Workflow
|
|
29
29
|
|
|
30
|
-
Start with `open` or `goto`, then use `snapshot` before interacting. Prefer snapshot, console, and
|
|
30
|
+
Start with `open` or `goto`, then use `snapshot` before interacting. Prefer snapshot, console, and request output for diagnosis; use screenshots when visual layout matters. Use named sessions with `-s=<session>` when you need to keep multiple browser flows separate.
|
|
31
31
|
|
|
32
32
|
If the browser is not installed, run:
|
|
33
33
|
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { spawnSync } from "node:child_process";
|
|
4
|
+
import fs from "node:fs";
|
|
4
5
|
import { createRequire } from "node:module";
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
import { fileURLToPath } from "node:url";
|
|
5
8
|
|
|
6
9
|
const require = createRequire(import.meta.url);
|
|
7
10
|
|
|
@@ -18,7 +21,25 @@ export function runPlaywrightCli(args = process.argv.slice(2), options = {}) {
|
|
|
18
21
|
});
|
|
19
22
|
}
|
|
20
23
|
|
|
21
|
-
|
|
24
|
+
function normalizeDirectEntryPath(candidate) {
|
|
25
|
+
const resolved = path.resolve(candidate);
|
|
26
|
+
const real = fs.realpathSync.native(resolved);
|
|
27
|
+
const normalized = path.normalize(real);
|
|
28
|
+
return process.platform === "win32" ? normalized.toLowerCase() : normalized;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function isDirectEntry(moduleUrl = import.meta.url, argvPath = process.argv[1]) {
|
|
32
|
+
if (!argvPath) return false;
|
|
33
|
+
try {
|
|
34
|
+
const modulePath = normalizeDirectEntryPath(fileURLToPath(moduleUrl));
|
|
35
|
+
const entryPath = normalizeDirectEntryPath(argvPath);
|
|
36
|
+
return modulePath === entryPath;
|
|
37
|
+
} catch {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (isDirectEntry()) {
|
|
22
43
|
const result = runPlaywrightCli();
|
|
23
44
|
process.exitCode = result.status ?? 1;
|
|
24
45
|
}
|