harnessed 4.43.1 → 4.45.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-en.md +618 -0
- package/README.md +273 -275
- package/bin/harnessed-inject-state.mjs +45 -3
- package/dist/cli.mjs +8817 -7284
- package/dist/cli.mjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/manifests/SCHEMA.md +1 -1
- package/manifests/optional/perturn-inject-invalidate.yaml +1 -1
- package/messages/en.json +2 -0
- package/messages/zh-Hans.json +2 -0
- package/package.json +3 -1
- package/workflows/SCHEMA.md +31 -0
- package/workflows/auto/SKILL.md +7 -9
- package/workflows/auto/SKILL.zh-Hans.md +7 -9
- package/workflows/capabilities.yaml +16 -0
- package/workflows/disciplines/language.yaml +9 -1
- package/workflows/discuss/auto/SKILL.md +1 -1
- package/workflows/discuss/auto/SKILL.zh-Hans.md +1 -1
- package/workflows/discuss/phase/SKILL.md +1 -1
- package/workflows/discuss/phase/SKILL.zh-Hans.md +1 -1
- package/workflows/discuss/strategic/SKILL.md +1 -1
- package/workflows/discuss/strategic/SKILL.zh-Hans.md +1 -1
- package/workflows/discuss/subtask/SKILL.md +1 -1
- package/workflows/discuss/subtask/SKILL.zh-Hans.md +1 -1
- package/workflows/host-primitives.yaml +348 -0
- package/workflows/host-primitives.zh-Hans.yaml +319 -0
- package/workflows/plan/architecture/SKILL.md +4 -5
- package/workflows/plan/architecture/SKILL.zh-Hans.md +4 -5
- package/workflows/plan/auto/SKILL.md +6 -7
- package/workflows/plan/auto/SKILL.zh-Hans.md +6 -7
- package/workflows/plan/phase/SKILL.md +4 -5
- package/workflows/plan/phase/SKILL.zh-Hans.md +4 -5
- package/workflows/research/SKILL.md +5 -6
- package/workflows/research/SKILL.zh-Hans.md +5 -6
- package/workflows/retro/SKILL.md +4 -5
- package/workflows/retro/SKILL.zh-Hans.md +4 -5
- package/workflows/role-prompts.yaml +15 -16
- package/workflows/role-prompts.zh-Hans.yaml +14 -15
- package/workflows/ship/auto/SKILL.md +6 -7
- package/workflows/ship/auto/SKILL.zh-Hans.md +6 -7
- package/workflows/ship/preflight/SKILL.md +4 -5
- package/workflows/ship/preflight/SKILL.zh-Hans.md +4 -5
- package/workflows/task/auto/SKILL.md +7 -8
- package/workflows/task/auto/SKILL.zh-Hans.md +7 -8
- package/workflows/task/clarify/SKILL.md +1 -1
- package/workflows/task/clarify/SKILL.zh-Hans.md +1 -1
- package/workflows/task/code/SKILL.md +4 -5
- package/workflows/task/code/SKILL.zh-Hans.md +4 -5
- package/workflows/task/deliver/SKILL.md +11 -16
- package/workflows/task/deliver/SKILL.zh-Hans.md +11 -15
- package/workflows/task/test/SKILL.md +4 -5
- package/workflows/task/test/SKILL.zh-Hans.md +4 -5
- package/workflows/verify/auto/SKILL.md +9 -10
- package/workflows/verify/auto/SKILL.zh-Hans.md +9 -10
- package/workflows/verify/code-review/SKILL.md +6 -8
- package/workflows/verify/code-review/SKILL.zh-Hans.md +6 -8
- package/workflows/verify/design/SKILL.md +4 -5
- package/workflows/verify/design/SKILL.zh-Hans.md +4 -5
- package/workflows/verify/eval-review/SKILL.md +4 -5
- package/workflows/verify/eval-review/SKILL.zh-Hans.md +4 -5
- package/workflows/verify/multispec/SKILL.md +19 -23
- package/workflows/verify/multispec/SKILL.zh-Hans.md +18 -22
- package/workflows/verify/paranoid/SKILL.md +4 -5
- package/workflows/verify/paranoid/SKILL.zh-Hans.md +4 -5
- package/workflows/verify/progress/SKILL.md +4 -5
- package/workflows/verify/progress/SKILL.zh-Hans.md +4 -5
- package/workflows/verify/qa/SKILL.md +4 -5
- package/workflows/verify/qa/SKILL.zh-Hans.md +4 -5
- package/workflows/verify/second-opinion/SKILL.md +4 -5
- package/workflows/verify/second-opinion/SKILL.zh-Hans.md +4 -5
- package/workflows/verify/security/SKILL.md +4 -5
- package/workflows/verify/security/SKILL.zh-Hans.md +4 -5
- package/workflows/verify/simplify/SKILL.md +4 -5
- package/workflows/verify/simplify/SKILL.zh-Hans.md +4 -5
- package/workflows/verify/validate-phase/SKILL.md +4 -5
- package/workflows/verify/validate-phase/SKILL.zh-Hans.md +4 -5
|
@@ -89,6 +89,45 @@ function resolveHost(home) {
|
|
|
89
89
|
return base
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
// src/checkpoint/hookHost.ts
|
|
93
|
+
function platformArg(argv) {
|
|
94
|
+
const i = argv.indexOf('--platform')
|
|
95
|
+
const v = i >= 0 ? argv[i + 1] : void 0
|
|
96
|
+
return v && !v.startsWith('-') ? v : null
|
|
97
|
+
}
|
|
98
|
+
function applyPlatformArg(argv, env = process.env) {
|
|
99
|
+
const id = platformArg(argv)
|
|
100
|
+
if (id) env.HARNESSED_PLATFORM = id
|
|
101
|
+
return id
|
|
102
|
+
}
|
|
103
|
+
function sessionIdFromPayload(raw) {
|
|
104
|
+
try {
|
|
105
|
+
const v = JSON.parse(raw)?.session_id
|
|
106
|
+
return typeof v === 'string' && v.trim() ? v.trim() : void 0
|
|
107
|
+
} catch {
|
|
108
|
+
return void 0
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function readHookStdin(timeoutMs = 1e3) {
|
|
112
|
+
if (process.stdin.isTTY) return Promise.resolve('')
|
|
113
|
+
return new Promise((resolve2) => {
|
|
114
|
+
let data = ''
|
|
115
|
+
const done = () => {
|
|
116
|
+
clearTimeout(timer)
|
|
117
|
+
process.stdin.removeAllListeners()
|
|
118
|
+
process.stdin.pause()
|
|
119
|
+
resolve2(data)
|
|
120
|
+
}
|
|
121
|
+
const timer = setTimeout(done, timeoutMs)
|
|
122
|
+
process.stdin.setEncoding('utf8')
|
|
123
|
+
process.stdin.on('data', (c) => {
|
|
124
|
+
data += c
|
|
125
|
+
})
|
|
126
|
+
process.stdin.on('end', done)
|
|
127
|
+
process.stdin.on('error', done)
|
|
128
|
+
})
|
|
129
|
+
}
|
|
130
|
+
|
|
92
131
|
// src/checkpoint/injectCache.ts
|
|
93
132
|
import { createHash } from 'node:crypto'
|
|
94
133
|
import { mkdirSync, readFileSync as readFileSync2, rmSync, writeFileSync } from 'node:fs'
|
|
@@ -542,9 +581,10 @@ function shouldEmitPc(root, repoRoot, sid, pc) {
|
|
|
542
581
|
return true
|
|
543
582
|
}
|
|
544
583
|
}
|
|
545
|
-
function main() {
|
|
584
|
+
async function main() {
|
|
546
585
|
if (isAblated()) return
|
|
547
586
|
try {
|
|
587
|
+
const hostArg = applyPlatformArg(process.argv)
|
|
548
588
|
const platform = detectPlatform()
|
|
549
589
|
const root = platform.stateRoot
|
|
550
590
|
if (process.argv.includes('--invalidate')) {
|
|
@@ -553,7 +593,9 @@ function main() {
|
|
|
553
593
|
}
|
|
554
594
|
const key = repoKey(process.cwd())
|
|
555
595
|
const envName = platform.sessionIdEnv
|
|
556
|
-
const sid =
|
|
596
|
+
const sid =
|
|
597
|
+
(envName ? process.env[envName]?.trim() : void 0) ||
|
|
598
|
+
(hostArg ? sessionIdFromPayload(await readHookStdin()) : void 0)
|
|
557
599
|
const { wf, intent, ledgerAgeMs } = readWorkflow(root, sid ? [`${key}::${sid}`, key] : [key])
|
|
558
600
|
let learningsMd = ''
|
|
559
601
|
try {
|
|
@@ -571,4 +613,4 @@ function main() {
|
|
|
571
613
|
`)
|
|
572
614
|
} catch {}
|
|
573
615
|
}
|
|
574
|
-
main()
|
|
616
|
+
void main()
|