pi-odd-worktree 0.1.0 → 1.1.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.
- package/README.md +282 -205
- package/extensions/odd-worktree-tools.ts +84 -0
- package/lib/codegraph-commands.js +165 -0
- package/lib/codegraph-session.js +438 -0
- package/lib/issues-view.js +2 -2
- package/lib/odd-worktrees-prompt.js +109 -0
- package/lib/worktree-hooks.js +23 -4
- package/package.json +1 -1
- package/tools/codegraph-commands.test.js +371 -0
- package/tools/codegraph-session.test.js +457 -0
- package/tools/issues-command.test.js +1 -1
- package/tools/issues-view.test.js +2 -2
- package/tools/odd-worktrees-prompt.test.js +170 -0
- package/tools/package-surface.test.js +13 -4
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
// S2/S4 surface: the standalone package registers
|
|
3
|
-
//
|
|
4
|
-
//
|
|
2
|
+
// S2/S4 surface: the standalone package always registers /warp, /odd-list and
|
|
3
|
+
// /issues plus the four agent worktree tools, loads without any Herdr binary,
|
|
4
|
+
// and ships none of the removed functionality. S9 adds three /codegraph-*
|
|
5
|
+
// commands that exist ONLY when the session gate finds the CLI, so the exact
|
|
6
|
+
// command list depends on the machine and is asserted conditionally.
|
|
5
7
|
// (customize panel, plugin-tools toggles, worktree mode file, perf tracing).
|
|
6
8
|
// The issues reader, preview formatter and view are the migrated T2 units and
|
|
7
9
|
// are shipped; `/issues` is the T3 command that mounts them, without any
|
|
@@ -76,7 +78,14 @@ describe('registration', () => {
|
|
|
76
78
|
process.env.HERDR_BIN_PATH = NO_HERDR;
|
|
77
79
|
delete process.env.GENTLE_WORKTREE_THREAD;
|
|
78
80
|
const { commands, tools, messageRenderers } = await loadExtension({});
|
|
79
|
-
|
|
81
|
+
const registered = [...commands.keys()].sort();
|
|
82
|
+
const base = ['issues', 'odd-list', 'warp'];
|
|
83
|
+
const codegraph = ['codegraph-hook', 'codegraph-init', 'codegraph-sync'];
|
|
84
|
+
for (const name of base) assert.ok(registered.includes(name), `/${name} is registered`);
|
|
85
|
+
// S9: the codegraph triple is gated on the CLI, never on anything else.
|
|
86
|
+
const { hasCodegraph } = require('../lib/codegraph-session.js');
|
|
87
|
+
const expected = hasCodegraph(process.env) ? [...base, ...codegraph].sort() : base;
|
|
88
|
+
assert.deepEqual(registered, expected, 'the command list is the base three plus the codegraph triple exactly when the CLI is present');
|
|
80
89
|
assert.deepEqual([...tools.keys()].sort(), ['worktree_close', 'worktree_create', 'worktree_list', 'worktree_warp']);
|
|
81
90
|
assert.deepEqual([...messageRenderers.keys()], ['worktree-warp']);
|
|
82
91
|
});
|