cclaw-cli 1.0.0 → 3.0.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/dist/artifact-linter/brainstorm.js +15 -1
- package/dist/artifact-linter/design.js +14 -0
- package/dist/artifact-linter/scope.js +14 -0
- package/dist/artifact-linter/shared.d.ts +1 -0
- package/dist/artifact-linter/shared.js +32 -0
- package/dist/artifact-linter.js +13 -5
- package/dist/cli.js +2 -9
- package/dist/config.d.ts +11 -67
- package/dist/config.js +59 -649
- package/dist/content/hook-events.js +1 -5
- package/dist/content/hook-manifest.d.ts +6 -4
- package/dist/content/hook-manifest.js +16 -65
- package/dist/content/hooks.js +54 -14
- package/dist/content/meta-skill.js +4 -3
- package/dist/content/node-hooks.d.ts +0 -26
- package/dist/content/node-hooks.js +459 -157
- package/dist/content/observe.js +5 -4
- package/dist/content/opencode-plugin.js +1 -78
- package/dist/content/skills-elicitation.d.ts +1 -0
- package/dist/content/skills-elicitation.js +123 -0
- package/dist/content/skills.js +6 -4
- package/dist/content/stages/brainstorm.js +7 -3
- package/dist/content/stages/design.js +6 -2
- package/dist/content/stages/plan.js +2 -2
- package/dist/content/stages/scope.js +9 -5
- package/dist/content/stages/tdd.js +11 -11
- package/dist/content/start-command.js +4 -4
- package/dist/content/templates.js +21 -0
- package/dist/flow-state.d.ts +7 -0
- package/dist/flow-state.js +1 -0
- package/dist/gate-evidence.js +1 -5
- package/dist/hook-schema.js +3 -0
- package/dist/hook-schemas/claude-hooks.v1.json +2 -5
- package/dist/hook-schemas/codex-hooks.v1.json +1 -4
- package/dist/hook-schemas/cursor-hooks.v1.json +1 -3
- package/dist/install.d.ts +2 -7
- package/dist/install.js +32 -123
- package/dist/internal/advance-stage/advance.js +22 -1
- package/dist/internal/advance-stage/parsers.d.ts +1 -0
- package/dist/internal/advance-stage/parsers.js +6 -0
- package/dist/internal/compound-readiness.js +1 -16
- package/dist/internal/early-loop-status.js +1 -3
- package/dist/internal/runtime-integrity.js +0 -20
- package/dist/policy.js +6 -9
- package/dist/run-persistence.d.ts +1 -1
- package/dist/run-persistence.js +29 -2
- package/dist/runtime/run-hook.mjs +459 -265
- package/dist/tdd-verification-evidence.js +6 -18
- package/dist/track-heuristics.d.ts +7 -1
- package/dist/track-heuristics.js +12 -0
- package/dist/types.d.ts +0 -56
- package/package.json +1 -1
package/dist/run-persistence.js
CHANGED
|
@@ -232,6 +232,31 @@ function sanitizeRewinds(value) {
|
|
|
232
232
|
}
|
|
233
233
|
return out;
|
|
234
234
|
}
|
|
235
|
+
function sanitizeInteractionHints(value) {
|
|
236
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
237
|
+
return {};
|
|
238
|
+
}
|
|
239
|
+
const out = {};
|
|
240
|
+
for (const [stage, raw] of Object.entries(value)) {
|
|
241
|
+
if (!isFlowStage(stage))
|
|
242
|
+
continue;
|
|
243
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw))
|
|
244
|
+
continue;
|
|
245
|
+
const typed = raw;
|
|
246
|
+
const skipQuestions = typed.skipQuestions === true ? true : undefined;
|
|
247
|
+
const sourceStage = isFlowStage(typed.sourceStage) ? typed.sourceStage : undefined;
|
|
248
|
+
const recordedAt = typeof typed.recordedAt === "string" ? typed.recordedAt : undefined;
|
|
249
|
+
if (skipQuestions !== true && !sourceStage && !recordedAt) {
|
|
250
|
+
continue;
|
|
251
|
+
}
|
|
252
|
+
out[stage] = {
|
|
253
|
+
...(skipQuestions ? { skipQuestions } : {}),
|
|
254
|
+
...(sourceStage ? { sourceStage } : {}),
|
|
255
|
+
...(recordedAt ? { recordedAt } : {})
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
return out;
|
|
259
|
+
}
|
|
235
260
|
function sanitizeRetroState(value) {
|
|
236
261
|
const fallback = {
|
|
237
262
|
required: false,
|
|
@@ -328,6 +353,7 @@ function coerceFlowState(parsed) {
|
|
|
328
353
|
skippedStages: sanitizeSkippedStages(parsed.skippedStages, track),
|
|
329
354
|
staleStages: sanitizeStaleStages(parsed.staleStages),
|
|
330
355
|
rewinds: sanitizeRewinds(parsed.rewinds),
|
|
356
|
+
interactionHints: sanitizeInteractionHints(parsed.interactionHints),
|
|
331
357
|
retro: sanitizeRetroState(parsed.retro),
|
|
332
358
|
closeout: sanitizeCloseoutState(parsed.closeout)
|
|
333
359
|
};
|
|
@@ -432,12 +458,13 @@ export async function writeFlowState(projectRoot, state, options = {}) {
|
|
|
432
458
|
export function flowStateLockPathFor(projectRoot) {
|
|
433
459
|
return flowStateLockPath(projectRoot);
|
|
434
460
|
}
|
|
435
|
-
export async function ensureRunSystem(projectRoot,
|
|
461
|
+
export async function ensureRunSystem(projectRoot, options = {}) {
|
|
436
462
|
await ensureDir(archiveRoot(projectRoot));
|
|
437
463
|
await ensureDir(activeArtifactsPath(projectRoot));
|
|
438
464
|
const statePath = flowStatePath(projectRoot);
|
|
439
465
|
const state = await readFlowState(projectRoot);
|
|
440
|
-
|
|
466
|
+
const createIfMissing = options.createIfMissing !== false;
|
|
467
|
+
if (createIfMissing && !(await exists(statePath))) {
|
|
441
468
|
await writeFlowState(projectRoot, state, { allowReset: true });
|
|
442
469
|
}
|
|
443
470
|
return state;
|