@indigoai-us/hq-cli 5.148.0 → 5.150.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/CHANGELOG.md +30 -0
- package/assets/scaffold/core/scripts/checkpoint-stop-gate.sh +8 -11
- package/dist/command-catalog.generated.d.ts +148 -0
- package/dist/command-catalog.generated.js +193 -0
- package/dist/commands/lanes.js +1000 -268
- package/dist/commands/mesh.js +82 -11
- package/dist/lib/lanes/admission.d.ts +24 -0
- package/dist/lib/lanes/admission.js +193 -0
- package/dist/lib/lanes/delivery.js +5 -3
- package/dist/lib/lanes/index.d.ts +5 -2
- package/dist/lib/lanes/index.js +3 -1
- package/dist/lib/lanes/mesh-events.d.ts +8 -0
- package/dist/lib/lanes/mesh-events.js +83 -6
- package/dist/lib/lanes/outpost-dispatch.d.ts +12 -0
- package/dist/lib/lanes/outpost-dispatch.js +17 -0
- package/dist/lib/lanes/reconcile.js +194 -55
- package/dist/lib/lanes/session-relink.d.ts +25 -0
- package/dist/lib/lanes/session-relink.js +216 -0
- package/dist/lib/lanes/spawn.d.ts +1 -0
- package/dist/lib/lanes/spawn.js +52 -5
- package/dist/lib/lanes/store.js +156 -1
- package/dist/lib/lanes/stories.d.ts +17 -0
- package/dist/lib/lanes/stories.js +73 -0
- package/dist/lib/lanes/types.d.ts +28 -1
- package/dist/lib/lanes/types.js +24 -6
- package/dist/lib/lanes/watcher.js +69 -9
- package/dist/lib/mesh/live/daemon/doctor.d.ts +27 -0
- package/dist/lib/mesh/live/daemon/doctor.js +84 -0
- package/dist/lib/mesh/live/daemon/index.d.ts +3 -3
- package/dist/lib/mesh/live/daemon/index.js +2 -2
- package/dist/lib/mesh/live/daemon/install.d.ts +40 -0
- package/dist/lib/mesh/live/daemon/install.js +88 -0
- package/dist/lib/mesh/live/daemon/run.d.ts +2 -0
- package/dist/lib/mesh/live/daemon/run.js +12 -1
- package/dist/lib/mesh/live/daemon/state.d.ts +4 -0
- package/dist/lib/mesh/project-board.d.ts +15 -0
- package/dist/lib/mesh/project-board.js +84 -0
- package/dist/lib/work-context/prd-sync.d.ts +5 -1
- package/dist/lib/work-context/prd-sync.js +22 -1
- package/package.json +5 -3
- package/scripts/mesh-daemon-if-stale.mjs +16 -0
|
@@ -114,7 +114,28 @@ export function planPrdSync(input) {
|
|
|
114
114
|
events,
|
|
115
115
|
...(taskId ? { taskId } : {}),
|
|
116
116
|
seqStart: previous?.seq ?? 0,
|
|
117
|
-
commit: () =>
|
|
117
|
+
commit: (acceptedTaskIds) => {
|
|
118
|
+
if (!acceptedTaskIds) {
|
|
119
|
+
writeSnapshot(input.sessionId, input.root, snapshot);
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
const accepted = new Set(acceptedTaskIds);
|
|
123
|
+
const stories = { ...(previous?.stories ?? {}) };
|
|
124
|
+
let advanced = 0;
|
|
125
|
+
for (const event of events) {
|
|
126
|
+
if (!accepted.has(event.taskId))
|
|
127
|
+
continue;
|
|
128
|
+
const next = nextStories[event.taskId];
|
|
129
|
+
if (!next)
|
|
130
|
+
continue;
|
|
131
|
+
stories[event.taskId] = next;
|
|
132
|
+
advanced += 1;
|
|
133
|
+
}
|
|
134
|
+
writeSnapshot(input.sessionId, input.root, {
|
|
135
|
+
stories,
|
|
136
|
+
seq: (previous?.seq ?? 0) + advanced,
|
|
137
|
+
});
|
|
138
|
+
},
|
|
118
139
|
};
|
|
119
140
|
}
|
|
120
141
|
//# sourceMappingURL=prd-sync.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indigoai-us/hq-cli",
|
|
3
|
-
"version": "5.
|
|
4
|
-
"description": "HQ by Indigo management CLI
|
|
3
|
+
"version": "5.150.0",
|
|
4
|
+
"description": "HQ by Indigo management CLI — modules and cloud sync",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"hq": "dist/index.js",
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"templates",
|
|
19
19
|
"CHANGELOG.md",
|
|
20
20
|
"README.md",
|
|
21
|
-
"contracts"
|
|
21
|
+
"contracts",
|
|
22
|
+
"scripts/mesh-daemon-if-stale.mjs"
|
|
22
23
|
],
|
|
23
24
|
"scripts": {
|
|
24
25
|
"build": "node scripts/generate-dsn.mjs && tsc && node scripts/generate-command-catalog.mjs --check && node scripts/copy-schemas.mjs && node scripts/chmod-bins.mjs",
|
|
@@ -33,6 +34,7 @@
|
|
|
33
34
|
"coverage": "vitest run --coverage --coverage.reporter=text-summary --coverage.reporter=json-summary",
|
|
34
35
|
"vitest": "vitest",
|
|
35
36
|
"clean": "rm -rf dist",
|
|
37
|
+
"postinstall": "node scripts/mesh-daemon-if-stale.mjs || true",
|
|
36
38
|
"prepare": "husky || true",
|
|
37
39
|
"check:no-hermes": "bash scripts/check-no-hermes.sh"
|
|
38
40
|
},
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* postinstall: point the mesh daemon at this install when it is newer.
|
|
3
|
+
* Best-effort. Never fails the package install. Tests do not run this.
|
|
4
|
+
*/
|
|
5
|
+
import { spawnSync } from "node:child_process";
|
|
6
|
+
import fs from "node:fs";
|
|
7
|
+
import path from "node:path";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
|
|
10
|
+
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
11
|
+
const cli = path.join(root, "dist", "index.js");
|
|
12
|
+
if (!fs.existsSync(cli)) process.exit(0);
|
|
13
|
+
spawnSync(process.execPath, [cli, "mesh", "daemon", "install", "--if-stale"], {
|
|
14
|
+
stdio: "inherit",
|
|
15
|
+
});
|
|
16
|
+
process.exit(0);
|