bb-plugin-goal 0.0.0-stage → 0.1.3
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/LICENSE +21 -0
- package/README.md +95 -2
- package/app.tsx +805 -0
- package/components/ui/button.tsx +60 -0
- package/components/ui/coarse-pointer-sizing.ts +76 -0
- package/components/ui/input.tsx +31 -0
- package/components/ui/motion.ts +21 -0
- package/dist/app.css +2 -0
- package/dist/app.js +1 -0
- package/dist/app.meta.json +19 -0
- package/dist/package.json +1 -0
- package/dist/server.js +442 -0
- package/dist/server.js.map +6 -0
- package/dist/server.meta.json +11 -0
- package/lib/utils.ts +24 -0
- package/package.json +72 -4
- package/server.ts +1758 -0
- package/src/coordinator.ts +892 -0
- package/src/domain.ts +407 -0
- package/src/failure.ts +202 -0
- package/src/history-cursor.ts +46 -0
- package/src/progress.ts +167 -0
- package/src/repository.ts +1735 -0
- package/src/runtime.ts +189 -0
- package/src/usage-wait.ts +21 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 KaviiSuri
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,96 @@
|
|
|
1
|
-
#
|
|
1
|
+
# BB Goal plugin
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Vendored from [KaviiSuri/bb-plugin-goal](https://github.com/KaviiSuri/bb-plugin-goal) v0.1.1 (`229f79e`, MIT) through the
|
|
4
|
+
[alexandrekm/bb-plugin-goal](https://github.com/alexandrekm/bb-plugin-goal) fork at v0.1.2 (`ee5c775`). Local changes: plugin SDK
|
|
5
|
+
0.4.8 -> 0.6.132 (`experimental_statusLabels` -> `presentation.label`, `threadPanelAction` -> `experimental_tab`, zod 4.6.7),
|
|
6
|
+
so it loads on bb 0.49. 0.1.3 fixes a zero-delay worker loop on a due usage reset for an ineligible thread, a failed
|
|
7
|
+
continuation send that skipped its failure handling, and a single historical Goal deletion blanking other clients' cards.
|
|
8
|
+
Built, tested and published to npm as `bb-plugin-goal` by impulso-pi CI; the upstream release and contributor-setup
|
|
9
|
+
sections below describe the original repository.
|
|
10
|
+
|
|
11
|
+
Goal keeps one durable, provider-independent objective on an existing BB thread. BB owns the state in the plugin database, so the objective survives plugin reloads, server restarts, and provider changes.
|
|
12
|
+
|
|
13
|
+
## Contributor setup
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npm install
|
|
17
|
+
npm run check
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Effect is pinned to `4.0.0-beta.107`. Before changing or reviewing Effect code, read `node_modules/effect/AGENTS.md` completely and follow the linked guidance that applies to the change. Do not update Effect through the floating `beta` tag.
|
|
21
|
+
|
|
22
|
+
The coordinator adapts BB's host-owned `better-sqlite3` handle. It must never open a second connection or close BB's handle.
|
|
23
|
+
|
|
24
|
+
Agent Goal context uses `bb.agents.configure`, which is synchronous. Its callback performs one bounded direct SQLite read and never runs an asynchronous Effect program. For an active Goal, BB selects the provider-independent, plugin-owned `bb_goal_complete` and `bb_goal_blocked` tools and contributes the exact Goal ID, revision, objective, authority rules, and terminal-outcome requirements. Completion requires a summary and verification evidence. Blockage requires the external action, concrete evidence, and the same blocker across at least three consecutive Goal turns. Each report applies one atomic revision-guarded transition. The current BB agent-tool contract does not expose a trustworthy provider turn ID, so qualification uses the structured monotonic report count and normalized external-action identity in durable SQLite; it does not parse transcript text.
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
Install a tagged Git release:
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
bb plugin install git:https://github.com/KaviiSuri/bb-plugin-goal.git@v0.1.0
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
For local development, install the checkout as a path plugin:
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
bb plugin install .
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Use
|
|
41
|
+
|
|
42
|
+
Start and inspect a Goal in a BB thread:
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
bb goal start "Ship the parser and verify its error cases"
|
|
46
|
+
bb goal status
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Target another thread or read a long objective from a file:
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
bb goal start thr_example --objective-file ./objective.md
|
|
53
|
+
bb goal status thr_example --json
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Edit or control the unfinished Goal from the current thread context:
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
bb goal edit "Ship the parser and its recovery cases"
|
|
60
|
+
bb goal pause
|
|
61
|
+
bb goal resume --json
|
|
62
|
+
bb goal cancel
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Browse sequential history, inspect one opaque Goal ID, or deliberately delete one record:
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
bb goal history thr_example --limit 20
|
|
69
|
+
bb goal history thr_example --cursor <opaque-cursor> --json
|
|
70
|
+
bb goal show goal_example
|
|
71
|
+
bb goal delete goal_example --yes
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Thread-scoped commands accept `thr_example` after the subcommand. `show` and `delete` target an opaque Goal ID directly; deletion always requires `--yes`. Mutations use the current Goal revision as a compare-and-swap guard, so a concurrent edit or transition fails instead of overwriting newer state. Completed Goals retain the agent's summary and verification evidence in `history`/`show` JSON, human-readable `show` output, and the Goal history panel.
|
|
75
|
+
|
|
76
|
+
## Releasing
|
|
77
|
+
|
|
78
|
+
Releases are immutable annotated Git tags (`vX.Y.Z`). Each release commit contains the bumped manifest and freshly built `dist/` artifacts, so BB can install the reviewed build directly. Pull requests and main pushes run `.github/workflows/ci.yml` on Node 22.
|
|
79
|
+
|
|
80
|
+
Cut a local release without publishing it:
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
scripts/release.sh patch
|
|
84
|
+
scripts/release.sh minor
|
|
85
|
+
scripts/release.sh 1.4.2
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Add `--push` to atomically publish the release commit and tag. Nothing is pushed without that flag.
|
|
89
|
+
|
|
90
|
+
For an on-demand GitHub release, run the **Release** workflow from Actions or use:
|
|
91
|
+
|
|
92
|
+
```sh
|
|
93
|
+
gh workflow run release.yml -f bump=patch
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The workflow runs the complete check, bumps the selected version, rebuilds versioned artifacts, atomically pushes `main` and the tag, and creates GitHub release notes. A custom version uses `-f bump=custom -f custom_version=1.4.2`.
|