harnessed 4.9.0 → 4.9.1
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/cli.mjs +37 -6
- package/dist/cli.mjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/workflows/auto/SKILL.md +12 -12
- package/workflows/auto/SKILL.zh-Hans.md +8 -10
- package/workflows/discuss/auto/SKILL.md +12 -11
- package/workflows/discuss/auto/SKILL.zh-Hans.md +8 -9
- package/workflows/discuss/phase/SKILL.md +12 -11
- package/workflows/discuss/phase/SKILL.zh-Hans.md +8 -9
- package/workflows/discuss/strategic/SKILL.md +12 -11
- package/workflows/discuss/strategic/SKILL.zh-Hans.md +8 -9
- package/workflows/discuss/subtask/SKILL.md +12 -11
- package/workflows/discuss/subtask/SKILL.zh-Hans.md +8 -9
- package/workflows/plan/architecture/SKILL.md +12 -11
- package/workflows/plan/architecture/SKILL.zh-Hans.md +8 -9
- package/workflows/plan/auto/SKILL.md +12 -11
- package/workflows/plan/auto/SKILL.zh-Hans.md +8 -9
- package/workflows/plan/phase/SKILL.md +12 -11
- package/workflows/plan/phase/SKILL.zh-Hans.md +8 -9
- package/workflows/research/SKILL.md +12 -40
- package/workflows/research/SKILL.zh-Hans.md +8 -38
- package/workflows/retro/SKILL.md +12 -11
- package/workflows/retro/SKILL.zh-Hans.md +8 -9
- package/workflows/task/auto/SKILL.md +12 -11
- package/workflows/task/auto/SKILL.zh-Hans.md +9 -10
- package/workflows/task/clarify/SKILL.md +12 -11
- package/workflows/task/clarify/SKILL.zh-Hans.md +9 -10
- package/workflows/task/code/SKILL.md +12 -11
- package/workflows/task/code/SKILL.zh-Hans.md +9 -10
- package/workflows/task/deliver/SKILL.md +12 -11
- package/workflows/task/deliver/SKILL.zh-Hans.md +9 -10
- package/workflows/task/test/SKILL.md +12 -11
- package/workflows/task/test/SKILL.zh-Hans.md +9 -10
- package/workflows/verify/auto/SKILL.md +12 -11
- package/workflows/verify/auto/SKILL.zh-Hans.md +8 -9
- package/workflows/verify/code-review/SKILL.md +12 -11
- package/workflows/verify/code-review/SKILL.zh-Hans.md +8 -9
- package/workflows/verify/design/SKILL.md +12 -11
- package/workflows/verify/design/SKILL.zh-Hans.md +9 -10
- package/workflows/verify/multispec/SKILL.md +12 -11
- package/workflows/verify/multispec/SKILL.zh-Hans.md +9 -10
- package/workflows/verify/paranoid/SKILL.md +12 -11
- package/workflows/verify/paranoid/SKILL.zh-Hans.md +9 -10
- package/workflows/verify/progress/SKILL.md +12 -11
- package/workflows/verify/progress/SKILL.zh-Hans.md +9 -10
- package/workflows/verify/qa/SKILL.md +12 -11
- package/workflows/verify/qa/SKILL.zh-Hans.md +9 -10
- package/workflows/verify/security/SKILL.md +12 -11
- package/workflows/verify/security/SKILL.zh-Hans.md +9 -10
- package/workflows/verify/simplify/SKILL.md +12 -11
- package/workflows/verify/simplify/SKILL.zh-Hans.md +9 -10
package/dist/cli.mjs
CHANGED
|
@@ -38,7 +38,7 @@ var init_package = __esm({
|
|
|
38
38
|
"package.json"() {
|
|
39
39
|
package_default = {
|
|
40
40
|
name: "harnessed",
|
|
41
|
-
version: "4.9.
|
|
41
|
+
version: "4.9.1",
|
|
42
42
|
description: "AI coding harness package manager + composition orchestrator",
|
|
43
43
|
type: "module",
|
|
44
44
|
license: "Apache-2.0",
|
|
@@ -2995,15 +2995,20 @@ var init_masterOrchestrator_helpers = __esm({
|
|
|
2995
2995
|
init_run();
|
|
2996
2996
|
defaultSpawnDriver = async (masterName, subName, _context, packageRoot) => {
|
|
2997
2997
|
const subYamlPath = resolveSubYamlPath(masterName, subName, packageRoot);
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
2998
|
+
const result = await runWorkflow(subYamlPath, {}, { packageRoot, gateContext: _context });
|
|
2999
|
+
if (result.status === "failed") {
|
|
3000
|
+
throw new Error(
|
|
3001
|
+
`sub-workflow ${masterName}/${subName} failed` + (result.lastPhaseId ? ` at phase ${result.lastPhaseId}` : "")
|
|
3002
|
+
);
|
|
3003
|
+
}
|
|
3004
|
+
if (result.status === "paused-veto") {
|
|
3005
|
+
throw new Error(
|
|
3006
|
+
`sub-workflow ${masterName}/${subName} paused (governance veto)` + (result.lastPhaseId ? ` at phase ${result.lastPhaseId}` : "")
|
|
3003
3007
|
);
|
|
3004
3008
|
}
|
|
3005
3009
|
};
|
|
3006
3010
|
defaultPauseFn = async (stageName) => {
|
|
3011
|
+
if (!process.stdin.isTTY) return;
|
|
3007
3012
|
const readline2 = await import('readline/promises');
|
|
3008
3013
|
const rl = readline2.createInterface({ input: process.stdin, output: process.stdout });
|
|
3009
3014
|
try {
|
|
@@ -3026,6 +3031,7 @@ var init_masterOrchestrator_helpers = __esm({
|
|
|
3026
3031
|
return !(a === "n" || a === "no");
|
|
3027
3032
|
};
|
|
3028
3033
|
defaultPrompter = async (question) => {
|
|
3034
|
+
if (!process.stdin.isTTY) return "";
|
|
3029
3035
|
const readline2 = await import('readline/promises');
|
|
3030
3036
|
const rl = readline2.createInterface({ input: process.stdin, output: process.stdout });
|
|
3031
3037
|
try {
|
|
@@ -3120,6 +3126,15 @@ async function runMasterOrchestrator(masterName, context, packageRoot, spawnDriv
|
|
|
3120
3126
|
for (const r of parallelResults) {
|
|
3121
3127
|
if (r.status === "fulfilled") fired.push(r.value);
|
|
3122
3128
|
}
|
|
3129
|
+
const parallelFailures = parallelResults.map(
|
|
3130
|
+
(r, i) => r.status === "rejected" ? { sub: parallelClauses[i]?.sub, reason: r.reason } : null
|
|
3131
|
+
).filter((x) => x !== null);
|
|
3132
|
+
if (parallelFailures.length > 0) {
|
|
3133
|
+
const detail = parallelFailures.map((f) => `${f.sub}: ${f.reason instanceof Error ? f.reason.message : String(f.reason)}`).join("; ");
|
|
3134
|
+
throw new Error(
|
|
3135
|
+
`[${masterName} master] ${parallelFailures.length} parallel sub(s) failed \u2014 ${detail}`
|
|
3136
|
+
);
|
|
3137
|
+
}
|
|
3123
3138
|
for (const clause of serialTrailing) {
|
|
3124
3139
|
console.log(` \u2192 ${clause.sub} (serial order=${clause.order ?? 0})`);
|
|
3125
3140
|
await spawnDriver(masterName, clause.sub, context, packageRoot);
|
|
@@ -3635,6 +3650,13 @@ function registerRun(program2) {
|
|
|
3635
3650
|
console.log(JSON.stringify({ workflow: name, yamlPath, gateContext }, null, 2));
|
|
3636
3651
|
process.exit(0);
|
|
3637
3652
|
}
|
|
3653
|
+
if (isNestedHarnessContext()) {
|
|
3654
|
+
console.error(
|
|
3655
|
+
`error: \`harnessed run\` is the CI/headless path (in-process SDK spawn) and hangs when invoked from inside a Claude Code session. Use the CC-native \`/${name}\` slash command instead \u2014 it drives subagent spawns via harnessed gates / prompt / checkpoint (keeps the session responsive, enables Agent Teams, allows clarification round-trips). Set HARNESSED_ALLOW_NESTED=1 to override (CI / testing only).`
|
|
3656
|
+
);
|
|
3657
|
+
process.exit(1);
|
|
3658
|
+
return;
|
|
3659
|
+
}
|
|
3638
3660
|
let result;
|
|
3639
3661
|
try {
|
|
3640
3662
|
result = await runWorkflow(yamlPath, {}, { packageRoot: PACKAGE_ROOT, gateContext });
|
|
@@ -3654,6 +3676,14 @@ function registerRun(program2) {
|
|
|
3654
3676
|
process.exit(result.status === "failed" ? 1 : 0);
|
|
3655
3677
|
});
|
|
3656
3678
|
}
|
|
3679
|
+
function isNestedHarnessContext() {
|
|
3680
|
+
if (process.env.HARNESSED_ALLOW_NESTED === "1") return false;
|
|
3681
|
+
const sessEnv = detectPlatform().sessionIdEnv;
|
|
3682
|
+
if (!sessEnv) return false;
|
|
3683
|
+
const sid = process.env[sessEnv]?.trim();
|
|
3684
|
+
if (!sid) return false;
|
|
3685
|
+
return !process.stdin.isTTY;
|
|
3686
|
+
}
|
|
3657
3687
|
async function resolveWorkflowYaml(name, workflowsDir) {
|
|
3658
3688
|
const tier1 = join(workflowsDir, name, "workflow.yaml");
|
|
3659
3689
|
if (existsSync(tier1)) return tier1;
|
|
@@ -3744,6 +3774,7 @@ async function getNextHint(workflowName) {
|
|
|
3744
3774
|
var PACKAGE_ROOT, WORKFLOWS_DIR, _autoChainCache, _autoChainLoadFailed;
|
|
3745
3775
|
var init_run2 = __esm({
|
|
3746
3776
|
"src/cli/run.ts"() {
|
|
3777
|
+
init_platform();
|
|
3747
3778
|
init_path_guard();
|
|
3748
3779
|
init_loadPhases();
|
|
3749
3780
|
init_run();
|