@tech-leads-club/harness-toolkit 0.16.2 → 0.16.3

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.
@@ -20,13 +20,18 @@ Global does the work. Project only configures *this* repo. Do not copy `~/.tlc/h
20
20
  ```mermaid
21
21
  graph LR
22
22
  subgraph one["One machine"]
23
- R["~/.tlc/harness<br/><i>runtime, CLI, hooks</i>"]
24
- CU["cursor config<br/><i>hooks.json</i>"]
25
- CL["claude config<br/><i>settings.json</i>"]
23
+ R["`~/.tlc/harness
24
+ *runtime, CLI, hooks*`"]
25
+ CU["`cursor config
26
+ *hooks.json*`"]
27
+ CL["`claude config
28
+ *settings.json*`"]
26
29
  end
27
30
  subgraph repo["One repository, shared by both"]
28
- PC["config.json<br/><i>policy, tracked</i>"]
29
- ST["state/<br/><i>handoff, lessons, obs</i>"]
31
+ PC["`config.json
32
+ *policy, tracked*`"]
33
+ ST["`state/
34
+ *handoff, lessons, obs*`"]
30
35
  end
31
36
  CU --> R
32
37
  CL --> R
@@ -55,11 +60,16 @@ Arrows are imports, and every one of them is checked mechanically:
55
60
 
56
61
  ```mermaid
57
62
  graph TD
58
- E["entrypoints/<br/><i>one file per hook handler</i>"]
59
- C["core/<br/><i>steering logic, provider-agnostic</i>"]
60
- P["providers/<br/><i>one ACL adapter per provider</i>"]
61
- K["contracts/<br/><i>shared vocabulary</i>"]
62
- L["platform/<br/><i>OS primitives</i>"]
63
+ E["`entrypoints/
64
+ *one file per hook handler*`"]
65
+ C["`core/
66
+ *steering logic, provider-agnostic*`"]
67
+ P["`providers/
68
+ *one ACL adapter per provider*`"]
69
+ K["`contracts/
70
+ *shared vocabulary*`"]
71
+ L["`platform/
72
+ *OS primitives*`"]
63
73
 
64
74
  E --> C
65
75
  E --> P
@@ -13,7 +13,8 @@ Source: `src/providers/cursor/`.
13
13
  ## Detection
14
14
 
15
15
  `cursor.detect.ts`: a raw hook payload is Cursor's when `hook_event_name` is camelCase (e.g.
16
- `beforeShellExecution`) and `workspace_roots` is an array.
16
+ `beforeShellExecution`). `workspace_roots` is read when present but not required: a payload without it used to
17
+ match no provider and be answered with nothing, which Cursor's fail-closed hooks treat as a deny.
17
18
 
18
19
  ## Capability descriptor
19
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tech-leads-club/harness-toolkit",
3
- "version": "0.16.2",
3
+ "version": "0.16.3",
4
4
  "type": "module",
5
5
  "description": "Multi-provider agent steering: gates, follow-up, handoff, policy",
6
6
  "keywords": [
@@ -154,7 +154,7 @@ function asRecord(value: unknown): Record<string, unknown> {
154
154
  export async function runHandler(handler: Handler, io: RunIo = {}): Promise<RunOutcome> {
155
155
  const readStdin = io.readStdin ?? readStdinText;
156
156
  const now = io.now ? io.now() : new Date();
157
- const abstainRendered: Rendered = { stdout: null, exitCode: 0 };
157
+ const abstainRendered: Rendered = { stdout: "{}", exitCode: 0 };
158
158
 
159
159
  const text = await readStdin();
160
160
  const trimmed = text.trim();
@@ -7,8 +7,5 @@ export function detectCursor(raw: unknown): boolean {
7
7
  }
8
8
  const value = raw as Record<string, unknown>;
9
9
  const eventName = value.hook_event_name;
10
- if (typeof eventName !== "string" || !CAMEL_CASE_EVENT_NAME.test(eventName)) {
11
- return false;
12
- }
13
- return Array.isArray(value.workspace_roots);
10
+ return typeof eventName === "string" && CAMEL_CASE_EVENT_NAME.test(eventName);
14
11
  }