hankweave 0.5.7 → 0.6.2
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 +12 -11
- package/dist/base-process-manager.d.ts +30 -0
- package/dist/budget.d.ts +315 -0
- package/dist/checkpoint-git.d.ts +98 -0
- package/dist/claude-agent-sdk-manager.d.ts +144 -0
- package/dist/claude-log-parser.d.ts +63 -0
- package/dist/claude-runtime-extractor.d.ts +73 -0
- package/dist/codex-runtime-extractor.d.ts +107 -0
- package/dist/codon-runner.d.ts +278 -0
- package/dist/config-validation/model-validator.d.ts +16 -0
- package/dist/config-validation/sentinel.schema.d.ts +6967 -0
- package/dist/config.d.ts +40815 -0
- package/dist/cost-tracker.d.ts +72 -0
- package/dist/execution-planner.d.ts +62 -0
- package/dist/execution-thread.d.ts +71 -0
- package/dist/exports/schemas.d.ts +9 -0
- package/dist/exports/schemas.js +1019 -0
- package/dist/exports/types.d.ts +15 -0
- package/dist/exports/types.js +60 -0
- package/dist/file-resolver.d.ts +33 -0
- package/dist/index.js +380 -293
- package/dist/index.js.map +33 -29
- package/dist/llm/llm-provider-registry.d.ts +207 -0
- package/dist/llm/models-dev-schema.d.ts +679 -0
- package/dist/llm/provider-config.d.ts +30 -0
- package/dist/prompt-builder.d.ts +75 -0
- package/dist/prompt-frontmatter.d.ts +61 -0
- package/dist/replay-process-manager.d.ts +82 -0
- package/dist/runtime-extractor-base.d.ts +120 -0
- package/dist/schemas/event-schemas.d.ts +8389 -0
- package/dist/schemas/websocket-log-schemas.d.ts +4502 -0
- package/dist/shim-process-manager.d.ts +98 -0
- package/dist/shim-runtime-extractor.d.ts +51 -0
- package/dist/shims/codex/README.md +129 -0
- package/dist/shims/codex/THIRDPARTY.md +18 -0
- package/dist/shims/codex/VERSION +1 -0
- package/dist/shims/codex/common/package.json +24 -0
- package/dist/shims/codex/index.js +1154 -970
- package/dist/shims/codex/package.json +46 -0
- package/dist/shims/codex/tsup.config.ts +16 -0
- package/dist/shims/gemini/README.md +59 -0
- package/dist/shims/gemini/THIRDPARTY.md +32 -0
- package/dist/shims/gemini/VERSION +1 -0
- package/dist/shims/gemini/common/package.json +24 -0
- package/dist/shims/gemini/index.js +1359 -30
- package/dist/shims/gemini/package.json +37 -0
- package/dist/shims/opencode/README.md +82 -0
- package/dist/shims/opencode/THIRDPARTY.md +32 -0
- package/dist/shims/opencode/VERSION +1 -0
- package/dist/shims/opencode/common/package.json +24 -0
- package/dist/shims/opencode/index.js +1476 -0
- package/dist/shims/opencode/package.json +38 -0
- package/dist/shims/pi/README.md +87 -0
- package/dist/shims/pi/THIRDPARTY.md +24 -0
- package/dist/shims/pi/VERSION +1 -0
- package/dist/shims/pi/common/package.json +24 -0
- package/dist/shims/pi/index.js +249832 -0
- package/dist/shims/pi/package.json +53 -0
- package/dist/state-manager.d.ts +161 -0
- package/dist/state-transition-guards.d.ts +37 -0
- package/dist/telemetry/telemetry-types.d.ts +206 -0
- package/dist/typed-event-emitter.d.ts +57 -0
- package/dist/types/branded-types.d.ts +15 -0
- package/dist/types/budget-types.d.ts +82 -0
- package/dist/types/claude-session-schema.d.ts +2430 -0
- package/dist/types/error-types.d.ts +44 -0
- package/dist/types/input-ai-types.d.ts +1070 -0
- package/dist/types/llm-call-types.d.ts +3829 -0
- package/dist/types/sentinel-types.d.ts +66 -0
- package/dist/types/state-types.d.ts +1099 -0
- package/dist/types/tool-types.d.ts +86 -0
- package/dist/types/types.d.ts +367 -0
- package/dist/types/websocket-log-types.d.ts +7 -0
- package/dist/utils.d.ts +452 -0
- package/package.json +15 -2
- package/schemas/hank.schema.json +158 -3
- package/schemas/hankweave.schema.json +17 -1
- package/shims/codex/index.js +0 -1583
- package/shims/gemini/index.js +0 -31
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "opencode-shim",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Self-contained Hankweave shim package for the OpenCode CLI",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"opencode-shim": "./index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"index.js",
|
|
11
|
+
"dist",
|
|
12
|
+
"src",
|
|
13
|
+
"common",
|
|
14
|
+
"docs",
|
|
15
|
+
"README.md",
|
|
16
|
+
"rebuild.sh",
|
|
17
|
+
"VERSION",
|
|
18
|
+
"THIRDPARTY.md",
|
|
19
|
+
"tsconfig.json"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "node -e \"const fs=require('fs'); fs.rmSync('./dist',{recursive:true,force:true}); fs.mkdirSync('./dist',{recursive:true});\" && bun build ./src/index.ts --target node --format esm --outfile ./dist/index.js",
|
|
23
|
+
"rebuild": "./rebuild.sh",
|
|
24
|
+
"test": "bun test",
|
|
25
|
+
"typecheck": "tsc --noEmit",
|
|
26
|
+
"clean": "node -e \"const fs=require('fs'); fs.rmSync('./dist',{recursive:true,force:true}); fs.rmSync('./index.js',{force:true});\""
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@shims/common": "file:./common"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@types/bun": "latest",
|
|
33
|
+
"typescript": "^5.3.0"
|
|
34
|
+
},
|
|
35
|
+
"engines": {
|
|
36
|
+
"bun": ">=1.1.0"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# pi-shim
|
|
2
|
+
|
|
3
|
+
A self-contained shim package for the embedded Pi SDK (`@mariozechner/pi-coding-agent`).
|
|
4
|
+
|
|
5
|
+
- Architecture: **SDK-as-dependency**
|
|
6
|
+
- Execution model: **in-process**
|
|
7
|
+
- Output: **standard shim JSONL protocol**
|
|
8
|
+
- Drop-in entrypoint: `./index.js`
|
|
9
|
+
- Rebuild command: `./rebuild.sh`
|
|
10
|
+
|
|
11
|
+
## Quick start
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
echo "Say hello briefly" | node index.js --model anthropic/claude-haiku-4-5
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## What this shim does
|
|
18
|
+
|
|
19
|
+
`pi-shim` translates Pi SDK session events into the shim protocol expected by Hankweave and the eval suite:
|
|
20
|
+
|
|
21
|
+
- emits `system` init first
|
|
22
|
+
- translates Pi assistant/tool events into shim `assistant` / `user` messages
|
|
23
|
+
- emits `result` last
|
|
24
|
+
- supports fresh and resumed sessions
|
|
25
|
+
- supports debug capture with `--debug-dir`
|
|
26
|
+
- uses adaptive timeouts so quiet in-progress turns do not false-timeout
|
|
27
|
+
|
|
28
|
+
## Authentication
|
|
29
|
+
|
|
30
|
+
This packaged shim is intentionally **environment-variable-first**.
|
|
31
|
+
It configures the embedded Pi SDK with runtime API keys from the current process environment.
|
|
32
|
+
|
|
33
|
+
Supported preflighted providers:
|
|
34
|
+
|
|
35
|
+
- `ANTHROPIC_API_KEY`
|
|
36
|
+
- `GOOGLE_API_KEY` or `GEMINI_API_KEY`
|
|
37
|
+
- `OPENAI_API_KEY`
|
|
38
|
+
- `OPENROUTER_API_KEY`
|
|
39
|
+
|
|
40
|
+
If a known provider is requested without a matching key, the shim fails before session init.
|
|
41
|
+
|
|
42
|
+
## Common commands
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Self-test
|
|
46
|
+
node index.js --self-test
|
|
47
|
+
|
|
48
|
+
# Save raw debug files
|
|
49
|
+
mkdir -p /tmp/pi-shim-debug
|
|
50
|
+
echo "Summarize this repo" | node index.js \
|
|
51
|
+
--model anthropic/claude-haiku-4-5 \
|
|
52
|
+
--debug-dir /tmp/pi-shim-debug
|
|
53
|
+
|
|
54
|
+
# Resume a previous session
|
|
55
|
+
node index.js --model anthropic/claude-haiku-4-5 --resume <session-uuid> < prompt.txt
|
|
56
|
+
|
|
57
|
+
# Rebuild after dependency changes
|
|
58
|
+
./rebuild.sh
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Documentation
|
|
62
|
+
|
|
63
|
+
- `docs/usage.md` — CLI usage, options, models, sessions, debug files
|
|
64
|
+
- `docs/architecture.md` — source layout and translation design
|
|
65
|
+
- `docs/rebuild.md` — packaging, rebuild, versioning, bundle layout
|
|
66
|
+
- `docs/validation.md` — local tests, eval guidance, known limitation notes
|
|
67
|
+
|
|
68
|
+
## Package layout
|
|
69
|
+
|
|
70
|
+
```text
|
|
71
|
+
shim/
|
|
72
|
+
├── index.js
|
|
73
|
+
├── dist/index.js
|
|
74
|
+
├── src/
|
|
75
|
+
├── common/
|
|
76
|
+
├── docs/
|
|
77
|
+
├── tests/
|
|
78
|
+
├── package.json
|
|
79
|
+
├── rebuild.sh
|
|
80
|
+
├── VERSION
|
|
81
|
+
└── THIRDPARTY.md
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Notable limitation
|
|
85
|
+
|
|
86
|
+
The embedded Pi SDK currently does not expose CLI-equivalent sandbox controls.
|
|
87
|
+
The shim accepts `--sandbox` for protocol compatibility, logs the request, and continues without additional SDK-level sandboxing.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Third-Party Notices
|
|
2
|
+
|
|
3
|
+
This shim bundles third-party code into `dist/index.js` / `index.js`.
|
|
4
|
+
|
|
5
|
+
## Primary SDK dependency
|
|
6
|
+
|
|
7
|
+
### @mariozechner/pi-coding-agent
|
|
8
|
+
|
|
9
|
+
- Version: 0.57.1
|
|
10
|
+
- License: MIT
|
|
11
|
+
- Copyright: Mario Zechner
|
|
12
|
+
- Source: https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent
|
|
13
|
+
|
|
14
|
+
The full license text is available in the npm package metadata and in the upstream source repository.
|
|
15
|
+
|
|
16
|
+
## Vendored shared shim utilities
|
|
17
|
+
|
|
18
|
+
### @shims/common
|
|
19
|
+
|
|
20
|
+
- Version: 1.0.0
|
|
21
|
+
- License: MIT
|
|
22
|
+
- Source: vendored in `./common/`
|
|
23
|
+
|
|
24
|
+
The full license text can be found in the original monorepo source or the vendored package metadata.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.57.1
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@shims/common",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Shared utilities for agent shims",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./src/index.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./src/index.ts",
|
|
9
|
+
"./args": "./src/args.ts",
|
|
10
|
+
"./messages": "./src/messages.ts",
|
|
11
|
+
"./tools": "./src/tools.ts",
|
|
12
|
+
"./sessions": "./src/sessions.ts",
|
|
13
|
+
"./timeout": "./src/timeout.ts"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "bun test",
|
|
17
|
+
"typecheck": "tsc --noEmit",
|
|
18
|
+
"clean": "echo 'No build artifacts to clean'"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@types/bun": "latest",
|
|
22
|
+
"typescript": "^5.3.0"
|
|
23
|
+
}
|
|
24
|
+
}
|