@punch-bot/cli 1.2.0 → 1.3.0

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.
Files changed (98) hide show
  1. package/CHANGELOG.md +44 -7
  2. package/README.md +2 -2
  3. package/dist/bundle/chunks/{anthropic-messages-DA6M7CRN.js → anthropic-messages-BUUFZMRE.js} +3 -3
  4. package/dist/bundle/chunks/{azure-openai-responses-IJO5RNR3.js → azure-openai-responses-WZ4GZHD2.js} +1 -1
  5. package/dist/bundle/chunks/bedrock-converse-stream.js +1 -1
  6. package/dist/bundle/chunks/{chunk-JHYQSLCR.js → chunk-6WNF4BLC.js} +1 -1
  7. package/dist/bundle/chunks/{chunk-FLX3SJDL.js → chunk-6YKFJ7FQ.js} +92 -60
  8. package/dist/bundle/chunks/{chunk-5OD3Y36V.js → chunk-BYHXHV4K.js} +1 -1
  9. package/dist/bundle/chunks/{chunk-5HTGPCR7.js → chunk-OWCYH5W2.js} +1 -1
  10. package/dist/bundle/chunks/{chunk-FJPXW4TE.js → chunk-YGGF2ZM6.js} +1 -1
  11. package/dist/bundle/chunks/{google-generative-ai-JSIIVUNP.js → google-generative-ai-S2KXX5PQ.js} +1 -1
  12. package/dist/bundle/chunks/{google-vertex-BZ3ID54S.js → google-vertex-LQOUTFJN.js} +1 -1
  13. package/dist/bundle/chunks/{mistral-conversations-RMNTDYQK.js → mistral-conversations-VNJYBSRF.js} +1 -1
  14. package/dist/bundle/chunks/{openai-codex-responses-O3P3UWDP.js → openai-codex-responses-E6BLZPYJ.js} +1 -1
  15. package/dist/bundle/chunks/{openai-completions-G4BKSHGH.js → openai-completions-LUDIAWSG.js} +1 -1
  16. package/dist/bundle/chunks/{openai-responses-377V6EDU.js → openai-responses-IOCBEIVC.js} +1 -1
  17. package/dist/bundle/chunks/{virtual-modules-FOSN3OT2.js → virtual-modules-GZVZPCK3.js} +1 -1
  18. package/dist/bundle/cli-runtime.js +1 -1
  19. package/dist/bundle/index.js +1 -1
  20. package/dist/bundle/rpc-entry.js +1 -1
  21. package/dist/cli/args.js +4 -4
  22. package/dist/cli/args.js.map +1 -1
  23. package/dist/cli/credential-print.d.ts.map +1 -1
  24. package/dist/cli/credential-print.js +4 -4
  25. package/dist/cli/credential-print.js.map +1 -1
  26. package/dist/core/agent-session-services.d.ts +0 -1
  27. package/dist/core/agent-session-services.d.ts.map +1 -1
  28. package/dist/core/agent-session-services.js +0 -1
  29. package/dist/core/agent-session-services.js.map +1 -1
  30. package/dist/core/model-resolver.d.ts +67 -25
  31. package/dist/core/model-resolver.d.ts.map +1 -1
  32. package/dist/core/model-resolver.js +378 -193
  33. package/dist/core/model-resolver.js.map +1 -1
  34. package/dist/core/model-runtime.d.ts +4 -0
  35. package/dist/core/model-runtime.d.ts.map +1 -1
  36. package/dist/core/model-runtime.js +7 -2
  37. package/dist/core/model-runtime.js.map +1 -1
  38. package/dist/core/model-suffix-variants.d.ts +14 -0
  39. package/dist/core/model-suffix-variants.d.ts.map +1 -0
  40. package/dist/core/model-suffix-variants.js +27 -0
  41. package/dist/core/model-suffix-variants.js.map +1 -0
  42. package/dist/core/sdk.d.ts +0 -2
  43. package/dist/core/sdk.d.ts.map +1 -1
  44. package/dist/core/sdk.js +6 -22
  45. package/dist/core/sdk.js.map +1 -1
  46. package/dist/extensions/punch/auth.d.ts +2 -1
  47. package/dist/extensions/punch/auth.d.ts.map +1 -1
  48. package/dist/extensions/punch/auth.js +5 -1
  49. package/dist/extensions/punch/auth.js.map +1 -1
  50. package/dist/extensions/punch/index.d.ts.map +1 -1
  51. package/dist/extensions/punch/index.js +2 -1
  52. package/dist/extensions/punch/index.js.map +1 -1
  53. package/dist/extensions/punch/server.d.ts +3 -0
  54. package/dist/extensions/punch/server.d.ts.map +1 -1
  55. package/dist/extensions/punch/server.js +41 -3
  56. package/dist/extensions/punch/server.js.map +1 -1
  57. package/dist/extensions/punch/todo-store.d.ts +15 -0
  58. package/dist/extensions/punch/todo-store.d.ts.map +1 -0
  59. package/dist/extensions/punch/todo-store.js +208 -0
  60. package/dist/extensions/punch/todo-store.js.map +1 -0
  61. package/dist/extensions/punch/todos.d.ts +7 -3
  62. package/dist/extensions/punch/todos.d.ts.map +1 -1
  63. package/dist/extensions/punch/todos.js +40 -17
  64. package/dist/extensions/punch/todos.js.map +1 -1
  65. package/dist/main.d.ts.map +1 -1
  66. package/dist/main.js +9 -8
  67. package/dist/main.js.map +1 -1
  68. package/dist/modes/rpc/rpc-client.d.ts +4 -0
  69. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  70. package/dist/modes/rpc/rpc-client.js +7 -0
  71. package/dist/modes/rpc/rpc-client.js.map +1 -1
  72. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  73. package/dist/modes/rpc/rpc-mode.js +14 -2
  74. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  75. package/dist/modes/rpc/rpc-types.d.ts +11 -0
  76. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  77. package/dist/modes/rpc/rpc-types.js.map +1 -1
  78. package/docs/cli.md +5 -5
  79. package/docs/docs.json +4 -0
  80. package/docs/punch-todos.md +24 -0
  81. package/docs/rpc-commands.md +30 -2
  82. package/docs/rpc.md +1 -1
  83. package/docs/settings.md +2 -2
  84. package/docs/usage.md +2 -2
  85. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  86. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  87. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  88. package/examples/extensions/gondolin/package-lock.json +2 -2
  89. package/examples/extensions/gondolin/package.json +1 -1
  90. package/examples/extensions/sandbox/package-lock.json +2 -2
  91. package/examples/extensions/sandbox/package.json +1 -1
  92. package/examples/extensions/with-deps/package-lock.json +2 -2
  93. package/examples/extensions/with-deps/package.json +1 -1
  94. package/npm-shrinkwrap.json +21 -21
  95. package/package.json +17 -7
  96. package/src/extensions/punch/sqlite-bun.mjs +1 -0
  97. package/src/extensions/punch/sqlite-driver.d.mts +15 -0
  98. package/src/extensions/punch/sqlite-node.mjs +1 -0
package/docs/settings.md CHANGED
@@ -15,7 +15,7 @@ Add `"$schema": "https://raw.githubusercontent.com/punch-bot/core/main/packages/
15
15
  | `defaultThinkingLevel` | `"off" \| "minimal" \| "low" \| "medium" \| "high" \| "xhigh" \| "max"` | `"medium"` | Startup thinking level. |
16
16
  | `modelThinkingLevels` | object | None | Per-model startup thinking levels keyed by exact `provider/modelId`. |
17
17
  | `thinkingBudgets` | object | Built-in budgets | Token budgets for `minimal`, `low`, `medium`, and `high` thinking levels. |
18
- | `enabledModels` | `string[]` | All available models | Exact model IDs or globs used for startup selection and model cycling. Uses the same format as `--models`; stale entries are skipped with a warning. |
18
+ | `enabledModels` | `string[]` | All available models | Model patterns or globs used for startup selection and model cycling. Uses the same format as `--models`; stale entries are skipped with a warning. |
19
19
  | `hideThinkingBlock` | boolean | `false` | Hide thinking blocks in the transcript. |
20
20
  | `showCacheMissNotices` | boolean | `false` | Show notices for significant cache misses, successful cache warming, compaction usage, and provider recovery. |
21
21
  | `cacheWarming` | `"off" \| "streaming" \| "idle"` | `"streaming"` | Keep eligible provider prompt caches warm during active runs or, with `"idle"`, between runs. Global setting only. |
@@ -146,7 +146,7 @@ When multiple sources specify a session directory, precedence is `--session-dir`
146
146
 
147
147
  | Setting | Type | Default | Description |
148
148
  |---------|------|---------|-------------|
149
- | `enabledModels` | string[] | - | Exact model IDs or globs available to the session (same format as `--models`); stale entries are skipped with a warning |
149
+ | `enabledModels` | string[] | - | Model patterns or globs available to the session (same format as `--models`); stale entries are skipped with a warning |
150
150
 
151
151
  See [Shell aliases](shell-aliases.md) for shell setup and [Pi Packages](packages.md) for package-manager behavior.
152
152
 
package/docs/usage.md CHANGED
@@ -120,10 +120,10 @@ Prompt templates, skills, and extensions can add more commands to the same menu.
120
120
  | Option | Description |
121
121
  |--------|-------------|
122
122
  | `--provider <name>` | Provider, such as `anthropic`, `openai`, or `google` |
123
- | `--model <id>` | Exact model ID as `provider/id` (or with `--provider`), optional `:<thinking>` |
123
+ | `--model <pattern>` | Model ID or partial match (warns), supports `provider/id` and optional `:<thinking>` |
124
124
  | `--api-key <key>` | API key, overriding environment variables |
125
125
  | `--thinking <level>` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max` |
126
- | `--models <ids>` | Comma-separated exact model IDs or globs (e.g. `openrouter/*`) available to the session |
126
+ | `--models <patterns>` | Comma-separated model patterns or globs (e.g. `openrouter/*`) available to the session |
127
127
  | `--list-models [search]` | List available models |
128
128
 
129
129
  ### Session Options
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-extension-custom-provider",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-custom-provider",
9
- "version": "1.2.0",
9
+ "version": "1.3.0",
10
10
  "dependencies": {
11
11
  "@anthropic-ai/sdk": "^0.52.0"
12
12
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-custom-provider-anthropic",
3
3
  "private": true,
4
- "version": "1.2.0",
4
+ "version": "1.3.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-custom-provider-gitlab-duo",
3
3
  "private": true,
4
- "version": "1.2.0",
4
+ "version": "1.3.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-extension-gondolin",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-gondolin",
9
- "version": "1.2.0",
9
+ "version": "1.3.0",
10
10
  "dependencies": {
11
11
  "@earendil-works/gondolin": "0.12.0"
12
12
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-gondolin",
3
3
  "private": true,
4
- "version": "1.2.0",
4
+ "version": "1.3.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-extension-sandbox",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-sandbox",
9
- "version": "1.2.0",
9
+ "version": "1.3.0",
10
10
  "dependencies": {
11
11
  "@anthropic-ai/sandbox-runtime": "0.0.26"
12
12
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-sandbox",
3
3
  "private": true,
4
- "version": "1.2.0",
4
+ "version": "1.3.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-extension-with-deps",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-with-deps",
9
- "version": "1.2.0",
9
+ "version": "1.3.0",
10
10
  "dependencies": {
11
11
  "ms": "^2.1.3"
12
12
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-with-deps",
3
3
  "private": true,
4
- "version": "1.2.0",
4
+ "version": "1.3.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@punch-bot/cli",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@punch-bot/cli",
9
- "version": "1.2.0",
9
+ "version": "1.3.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "@punch-bot/a2a": "1.2.0",
13
- "@punch-bot/agent": "1.2.0",
14
- "@punch-bot/ai": "1.2.0",
12
+ "@punch-bot/a2a": "1.3.0",
13
+ "@punch-bot/agent": "1.3.0",
14
+ "@punch-bot/ai": "1.3.0",
15
15
  "@silvia-odwyer/photon-node": "0.3.4",
16
16
  "brace-expansion": "5.0.12",
17
17
  "chalk": "6.0.0",
@@ -31,8 +31,8 @@
31
31
  "typebox": "1.3.27",
32
32
  "undici": "8.11.0",
33
33
  "yaml": "2.9.0",
34
- "@punch-bot/codemode": "1.2.0",
35
- "@punch-bot/mcp": "1.2.0",
34
+ "@punch-bot/codemode": "1.3.0",
35
+ "@punch-bot/mcp": "1.3.0",
36
36
  "quickjs-wasi": "3.6.2"
37
37
  },
38
38
  "bin": {
@@ -159,8 +159,8 @@
159
159
  "license": "BSD-3-Clause"
160
160
  },
161
161
  "node_modules/@punch-bot/a2a": {
162
- "version": "1.2.0",
163
- "resolved": "https://registry.npmjs.org/@punch-bot/a2a/-/a2a-1.2.0.tgz",
162
+ "version": "1.3.0",
163
+ "resolved": "https://registry.npmjs.org/@punch-bot/a2a/-/a2a-1.3.0.tgz",
164
164
  "license": "MIT",
165
165
  "dependencies": {
166
166
  "@a2a-js/sdk": "1.0.1",
@@ -171,11 +171,11 @@
171
171
  }
172
172
  },
173
173
  "node_modules/@punch-bot/agent": {
174
- "version": "1.2.0",
175
- "resolved": "https://registry.npmjs.org/@punch-bot/agent/-/agent-1.2.0.tgz",
174
+ "version": "1.3.0",
175
+ "resolved": "https://registry.npmjs.org/@punch-bot/agent/-/agent-1.3.0.tgz",
176
176
  "license": "MIT",
177
177
  "dependencies": {
178
- "@punch-bot/ai": "1.2.0",
178
+ "@punch-bot/ai": "1.3.0",
179
179
  "typebox": "1.3.27"
180
180
  },
181
181
  "engines": {
@@ -183,13 +183,13 @@
183
183
  }
184
184
  },
185
185
  "node_modules/@punch-bot/ai": {
186
- "version": "1.2.0",
187
- "resolved": "https://registry.npmjs.org/@punch-bot/ai/-/ai-1.2.0.tgz",
186
+ "version": "1.3.0",
187
+ "resolved": "https://registry.npmjs.org/@punch-bot/ai/-/ai-1.3.0.tgz",
188
188
  "license": "MIT",
189
189
  "dependencies": {
190
190
  "@anthropic-ai/sdk": "0.129.0",
191
191
  "@aws-sdk/client-bedrock-runtime": "3.1127.0",
192
- "@punch-bot/telemetry": "1.2.0",
192
+ "@punch-bot/telemetry": "1.3.0",
193
193
  "@google/genai": "2.21.0",
194
194
  "@smithy/node-http-handler": "4.12.1",
195
195
  "http-proxy-agent": "9.1.0",
@@ -689,8 +689,8 @@
689
689
  }
690
690
  },
691
691
  "node_modules/@punch-bot/codemode": {
692
- "version": "1.2.0",
693
- "resolved": "https://registry.npmjs.org/@punch-bot/codemode/-/codemode-1.2.0.tgz",
692
+ "version": "1.3.0",
693
+ "resolved": "https://registry.npmjs.org/@punch-bot/codemode/-/codemode-1.3.0.tgz",
694
694
  "license": "MIT",
695
695
  "dependencies": {
696
696
  "quickjs-wasi": "3.6.2"
@@ -700,8 +700,8 @@
700
700
  }
701
701
  },
702
702
  "node_modules/@punch-bot/mcp": {
703
- "version": "1.2.0",
704
- "resolved": "https://registry.npmjs.org/@punch-bot/mcp/-/mcp-1.2.0.tgz",
703
+ "version": "1.3.0",
704
+ "resolved": "https://registry.npmjs.org/@punch-bot/mcp/-/mcp-1.3.0.tgz",
705
705
  "license": "MIT",
706
706
  "dependencies": {
707
707
  "cross-spawn": "7.0.6"
@@ -711,8 +711,8 @@
711
711
  }
712
712
  },
713
713
  "node_modules/@punch-bot/telemetry": {
714
- "version": "1.2.0",
715
- "resolved": "https://registry.npmjs.org/@punch-bot/telemetry/-/telemetry-1.2.0.tgz",
714
+ "version": "1.3.0",
715
+ "resolved": "https://registry.npmjs.org/@punch-bot/telemetry/-/telemetry-1.3.0.tgz",
716
716
  "license": "MIT",
717
717
  "engines": {
718
718
  "node": ">=22.19.0"
package/package.json CHANGED
@@ -1,8 +1,15 @@
1
1
  {
2
2
  "name": "@punch-bot/cli",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Headless coding agent SDK, RPC, and print modes with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
+ "imports": {
7
+ "#punch-sqlite": {
8
+ "types": "./src/extensions/punch/sqlite-driver.d.mts",
9
+ "bun": "./src/extensions/punch/sqlite-bun.mjs",
10
+ "default": "./src/extensions/punch/sqlite-node.mjs"
11
+ }
12
+ },
6
13
  "piConfig": {
7
14
  "configDir": ".pi"
8
15
  },
@@ -22,6 +29,9 @@
22
29
  },
23
30
  "files": [
24
31
  "dist",
32
+ "src/extensions/punch/sqlite-bun.mjs",
33
+ "src/extensions/punch/sqlite-driver.d.mts",
34
+ "src/extensions/punch/sqlite-node.mjs",
25
35
  "docs",
26
36
  "examples",
27
37
  "schemas",
@@ -42,9 +52,9 @@
42
52
  "prepublishOnly": "npm run clean && npm run build && npm run shrinkwrap"
43
53
  },
44
54
  "dependencies": {
45
- "@punch-bot/a2a": "1.2.0",
46
- "@punch-bot/agent": "1.2.0",
47
- "@punch-bot/ai": "1.2.0",
55
+ "@punch-bot/a2a": "1.3.0",
56
+ "@punch-bot/agent": "1.3.0",
57
+ "@punch-bot/ai": "1.3.0",
48
58
  "@silvia-odwyer/photon-node": "0.3.4",
49
59
  "brace-expansion": "5.0.12",
50
60
  "chalk": "6.0.0",
@@ -64,8 +74,8 @@
64
74
  "typebox": "1.3.27",
65
75
  "undici": "8.11.0",
66
76
  "yaml": "2.9.0",
67
- "@punch-bot/codemode": "1.2.0",
68
- "@punch-bot/mcp": "1.2.0",
77
+ "@punch-bot/codemode": "1.3.0",
78
+ "@punch-bot/mcp": "1.3.0",
69
79
  "quickjs-wasi": "3.6.2"
70
80
  },
71
81
  "overrides": {
@@ -80,7 +90,7 @@
80
90
  "marked": "18.0.11",
81
91
  "shx": "0.3.4",
82
92
  "vitest": "5.0.0",
83
- "@punch-bot/durable": "1.2.0"
93
+ "@punch-bot/durable": "1.3.0"
84
94
  },
85
95
  "keywords": [
86
96
  "coding-agent",
@@ -0,0 +1 @@
1
+ export { Database as DatabaseSync } from "bun:sqlite";
@@ -0,0 +1,15 @@
1
+ // Keep this interface limited to the API shared by node:sqlite and bun:sqlite.
2
+ // Driver changes must be checked with both Node and a compiled Bun smoke test.
3
+ interface Statement {
4
+ run(...params: Array<string | number>): unknown;
5
+ // node:sqlite returns undefined for no row; bun:sqlite returns null.
6
+ get(...params: Array<string | number>): Record<string, unknown> | null | undefined;
7
+ all(...params: Array<string | number>): Array<Record<string, unknown>>;
8
+ }
9
+
10
+ export declare class DatabaseSync {
11
+ constructor(path: string);
12
+ exec(sql: string): void;
13
+ prepare(sql: string): Statement;
14
+ close(): void;
15
+ }
@@ -0,0 +1 @@
1
+ export { DatabaseSync } from "node:sqlite";