@tech-leads-club/harness-toolkit 0.3.4 → 0.3.6
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/bin/tlc-build.mjs +10 -1
- package/bin/tlc-cli.ts +16 -4
- package/dist/compact-before.mjs +103 -7940
- package/dist/doctor.mjs +102 -8471
- package/dist/help-topic.mjs +4 -64
- package/dist/init-project.mjs +10 -990
- package/dist/install-runtime.mjs +101 -7247
- package/dist/lessons-cli.mjs +101 -7353
- package/dist/obs-cli.mjs +102 -7131
- package/dist/price-lookup.mjs +2 -243
- package/dist/prompt-submit.mjs +103 -7961
- package/dist/refresh-model-prices.mjs +101 -7266
- package/dist/response-after.mjs +103 -7980
- package/dist/run.mjs +103 -7931
- package/dist/session-end.mjs +110 -8034
- package/dist/session-start.mjs +112 -8153
- package/dist/shim.mjs +100 -7041
- package/dist/stop.mjs +109 -8595
- package/dist/subagent-start.mjs +103 -7962
- package/dist/subagent-stop.mjs +104 -7952
- package/dist/support.mjs +107 -7147
- package/dist/tlc-cli.mjs +121 -8234
- package/dist/tool-after.mjs +103 -8236
- package/dist/tool-before.mjs +103 -8086
- package/dist/tool-failure.mjs +103 -7951
- package/dist/uninstall-runtime.mjs +4 -1306
- package/docs/log.md +1 -0
- package/package.json +1 -1
- package/src/contracts/index.ts +1 -0
- package/src/contracts/tool-names.ts +25 -0
- package/src/core/policy/policy.guard.ts +2 -3
- package/src/core/presence/presence.service.ts +10 -2
- package/src/entrypoints/run.ts +31 -1
package/dist/help-topic.mjs
CHANGED
|
@@ -1,39 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
3
|
-
import { join as join2 } from "node:path";
|
|
4
|
-
|
|
5
|
-
// src/platform/paths.ts
|
|
6
|
-
import { homedir } from "node:os";
|
|
7
|
-
import { join } from "node:path";
|
|
8
|
-
function conventionalRuntimeHome() {
|
|
9
|
-
return join(homedir(), ".tlc", "harness");
|
|
10
|
-
}
|
|
11
|
-
function runtimeHome(env = process.env) {
|
|
12
|
-
return env.TLC_HOME ?? conventionalRuntimeHome();
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// tools/help-topic.ts
|
|
16
|
-
var docsDir = join2(runtimeHome(), "docs");
|
|
17
|
-
var topic = (process.argv[2] ?? "").toLowerCase();
|
|
18
|
-
var TOPICS = {
|
|
19
|
-
architecture: "architecture.md",
|
|
20
|
-
concepts: "concepts.md",
|
|
21
|
-
measure: "measure.md",
|
|
22
|
-
metrics: "measure.md",
|
|
23
|
-
prices: "measure.md",
|
|
24
|
-
price: "measure.md",
|
|
25
|
-
cost: "measure.md",
|
|
26
|
-
costs: "measure.md",
|
|
27
|
-
diagnose: "diagnose.md",
|
|
28
|
-
doctor: "diagnose.md",
|
|
29
|
-
debug: "diagnose.md",
|
|
30
|
-
init: "init.md",
|
|
31
|
-
setup: "init.md",
|
|
32
|
-
lessons: "lessons.md",
|
|
33
|
-
lesson: "lessons.md"
|
|
34
|
-
};
|
|
35
|
-
function printIndex() {
|
|
36
|
-
console.log(`tlc harness help
|
|
1
|
+
import{existsSync as f,readFileSync as u}from"node:fs";import{join as h}from"node:path";import{homedir as n}from"node:os";import{join as r}from"node:path";function x(){return r(n(),".tlc","harness")}function m(p=process.env){return p.TLC_HOME??x()}var P=h(m(),"docs"),s=(process.argv[2]??"").toLowerCase(),g={architecture:"architecture.md",concepts:"concepts.md",measure:"measure.md",metrics:"measure.md",prices:"measure.md",price:"measure.md",cost:"measure.md",costs:"measure.md",diagnose:"diagnose.md",doctor:"diagnose.md",debug:"diagnose.md",init:"init.md",setup:"init.md",lessons:"lessons.md",lesson:"lessons.md"};function d(){console.log(`tlc harness help
|
|
37
2
|
|
|
38
3
|
TOPICS
|
|
39
4
|
tlc harness help architecture
|
|
@@ -50,33 +15,8 @@ PRICES
|
|
|
50
15
|
|
|
51
16
|
ALSO
|
|
52
17
|
tlc harness status | doctor | grind | mode | obs | lessons
|
|
53
|
-
`);
|
|
54
|
-
}
|
|
55
|
-
if (!topic || topic === "help" || topic === "-h" || topic === "--help") {
|
|
56
|
-
printIndex();
|
|
57
|
-
process.exit(0);
|
|
58
|
-
}
|
|
59
|
-
var file = TOPICS[topic];
|
|
60
|
-
if (!file) {
|
|
61
|
-
console.error(`unknown topic: ${topic}`);
|
|
62
|
-
printIndex();
|
|
63
|
-
process.exit(1);
|
|
64
|
-
}
|
|
65
|
-
var path = join2(docsDir, file);
|
|
66
|
-
if (!existsSync(path)) {
|
|
67
|
-
console.error(`missing doc: ${path}`);
|
|
68
|
-
process.exit(1);
|
|
69
|
-
}
|
|
70
|
-
var body = readFileSync(path, "utf8");
|
|
71
|
-
if (topic === "prices" || topic === "price" || topic === "cost" || topic === "costs") {
|
|
72
|
-
const marker = "## Prices";
|
|
73
|
-
const idx = body.indexOf(marker);
|
|
74
|
-
if (idx >= 0) {
|
|
75
|
-
body = `# Prices
|
|
18
|
+
`)}if(!s||s==="help"||s==="-h"||s==="--help")d(),process.exit(0);var a=g[s];if(!a)console.error(`unknown topic: ${s}`),d(),process.exit(1);var c=h(P,a);if(!f(c))console.error(`missing doc: ${c}`),process.exit(1);var e=u(c,"utf8");if(s==="prices"||s==="price"||s==="cost"||s==="costs"){let l=e.indexOf("## Prices");if(l>=0)e=`# Prices
|
|
76
19
|
|
|
77
|
-
${
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
process.stdout.write(body.endsWith(`
|
|
81
|
-
`) ? body : `${body}
|
|
20
|
+
${e.slice(l)}`}process.stdout.write(e.endsWith(`
|
|
21
|
+
`)?e:`${e}
|
|
82
22
|
`);
|