@bunshin-cc/bunshin 0.10.4 → 0.11.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/dist/bin.js +1562 -874
- package/dist/claude-code-ui/hooks/bunshin-ui.mjs +10 -6
- package/package.json +11 -10
|
@@ -61,11 +61,15 @@ export function register(on) {
|
|
|
61
61
|
return result;
|
|
62
62
|
});
|
|
63
63
|
|
|
64
|
-
// After each Bunshin hook has run
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
// After each Bunshin settings hook has run, read the feed. Not on classic.*: the bundled
|
|
65
|
+
// cc-plugin-sec-default (seated outermost for Team and Enterprise organizations and on machines
|
|
66
|
+
// with managed settings) sends every classic.* event past the plugins a person installs, so
|
|
67
|
+
// those hooks never run there. These events carry the same settings hooks inside their next():
|
|
68
|
+
// prompt.submit runs UserPromptSubmit's, tool.call PreToolUse's; turn.complete ends the turn
|
|
69
|
+
// Stop closes; SessionStart is session.start's first refresh above. The poll catches the rest.
|
|
70
|
+
on("prompt.submit", after);
|
|
71
|
+
on("tool.call", after);
|
|
72
|
+
on("turn.complete", ($, e, next) => (e.agentId === undefined ? after($, e, next) : next(e)));
|
|
69
73
|
|
|
70
74
|
// /clear and /resume change the session.
|
|
71
75
|
on("command.run", { command: ["clear", "resume"] }, async ($, e, next) => {
|
|
@@ -113,7 +117,7 @@ export function register(on) {
|
|
|
113
117
|
});
|
|
114
118
|
}
|
|
115
119
|
|
|
116
|
-
/**
|
|
120
|
+
/** Once the event beneath (and the Bunshin settings hooks it runs) has settled: read the feed. */
|
|
117
121
|
async function after($, e, next) {
|
|
118
122
|
const result = await next(e);
|
|
119
123
|
void refresh($).catch(() => undefined);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bunshin-cc/bunshin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"description": "Shared memory for company AI agents. Connect Codex, Claude Code, or Pi to Bunshin.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -15,6 +15,13 @@
|
|
|
15
15
|
"engines": {
|
|
16
16
|
"node": ">=20"
|
|
17
17
|
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "tsc -p tsconfig.json --noEmit && esbuild src/bin.ts --bundle --platform=node --target=node20 --format=esm --external:@anthropic-ai/sdk --external:yaml --outfile=dist/bin.js && esbuild src/git-remote-bunshin.ts --bundle --platform=node --target=node20 --format=esm --outfile=dist/git-remote-bunshin.js && esbuild ../../adapters/pi/index.ts --bundle --platform=node --target=node22 --format=esm --outfile=dist/pi-extension.js && node scripts/copy-mod.mjs",
|
|
20
|
+
"dev": "tsx src/bin.ts",
|
|
21
|
+
"test": "vitest run",
|
|
22
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
23
|
+
"prepack": "pnpm build"
|
|
24
|
+
},
|
|
18
25
|
"dependencies": {
|
|
19
26
|
"@anthropic-ai/sdk": "^0.129.0",
|
|
20
27
|
"yaml": "^2.8.0"
|
|
@@ -25,7 +32,7 @@
|
|
|
25
32
|
"tsx": "^4.23.15",
|
|
26
33
|
"typescript": "^7.0.2",
|
|
27
34
|
"vitest": "^5.0.2",
|
|
28
|
-
"@bunshin/core": "
|
|
35
|
+
"@bunshin/core": "workspace:*"
|
|
29
36
|
},
|
|
30
37
|
"license": "MIT",
|
|
31
38
|
"homepage": "https://bunshin.cc",
|
|
@@ -48,11 +55,5 @@
|
|
|
48
55
|
"claude-code",
|
|
49
56
|
"memory",
|
|
50
57
|
"knowledge"
|
|
51
|
-
]
|
|
52
|
-
|
|
53
|
-
"build": "tsc -p tsconfig.json --noEmit && esbuild src/bin.ts --bundle --platform=node --target=node20 --format=esm --external:@anthropic-ai/sdk --external:yaml --outfile=dist/bin.js && esbuild src/git-remote-bunshin.ts --bundle --platform=node --target=node20 --format=esm --outfile=dist/git-remote-bunshin.js && esbuild ../../adapters/pi/index.ts --bundle --platform=node --target=node22 --format=esm --outfile=dist/pi-extension.js && node scripts/copy-mod.mjs",
|
|
54
|
-
"dev": "tsx src/bin.ts",
|
|
55
|
-
"test": "vitest run",
|
|
56
|
-
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
57
|
-
}
|
|
58
|
-
}
|
|
58
|
+
]
|
|
59
|
+
}
|