@principles/workbuddy-adapter 0.6.3 → 0.6.5

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.
@@ -16,6 +16,17 @@
16
16
  * sessions sample more names — a wrong guess is worse than a gap (unknown
17
17
  * names resolve to 'other' and are never fabricated into Write/Bash
18
18
  * equivalences).
19
+ *
20
+ * `pd_submit_pain` is the OG-4 MCP write tool (Owner-authorized for all three
21
+ * hosts on 2026-11-13), and it is deliberately NOT declared here:
22
+ * `CanonicalKind` is a FILE-mutation axis, and `workbuddy-rule-context-provider`
23
+ * only marks facts incomplete for `'execute' | 'other'`. Declaring a ledger
24
+ * write as `'write'` would make it count inside
25
+ * `computeBehaviorFacts.writeCount` while its payload carries no target path,
26
+ * and would switch off the conservative guard for every session that submits a
27
+ * pain. It therefore stays `'other'` — the same "a wrong guess is worse than a
28
+ * gap" rule as the rest of this declaration. The host's `*` PreToolUse matcher
29
+ * still delivers the event, so the call remains observable.
19
30
  */
20
31
  import { type ToolSemanticMappingV1, type ToolSemanticRegistry } from '@principles/core/runtime';
21
32
  export declare const WORKBUDDY_TOOL_SEMANTIC_MAPPINGS: readonly ToolSemanticMappingV1[];
@@ -16,6 +16,17 @@
16
16
  * sessions sample more names — a wrong guess is worse than a gap (unknown
17
17
  * names resolve to 'other' and are never fabricated into Write/Bash
18
18
  * equivalences).
19
+ *
20
+ * `pd_submit_pain` is the OG-4 MCP write tool (Owner-authorized for all three
21
+ * hosts on 2026-11-13), and it is deliberately NOT declared here:
22
+ * `CanonicalKind` is a FILE-mutation axis, and `workbuddy-rule-context-provider`
23
+ * only marks facts incomplete for `'execute' | 'other'`. Declaring a ledger
24
+ * write as `'write'` would make it count inside
25
+ * `computeBehaviorFacts.writeCount` while its payload carries no target path,
26
+ * and would switch off the conservative guard for every session that submits a
27
+ * pain. It therefore stays `'other'` — the same "a wrong guess is worse than a
28
+ * gap" rule as the rest of this declaration. The host's `*` PreToolUse matcher
29
+ * still delivers the event, so the call remains observable.
19
30
  */
20
31
  import { buildToolSemanticRegistry } from '@principles/core/runtime';
21
32
  export const WORKBUDDY_TOOL_SEMANTIC_MAPPINGS = Object.freeze([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@principles/workbuddy-adapter",
3
- "version": "0.6.3",
3
+ "version": "0.6.5",
4
4
  "description": "WorkBuddy host adapter for Principles Disciple — implements the HostAdapter interface for WorkBuddy's Git Bash command-hook model (ADR-0020 third host, SPEC workbuddy-host-adapter v0.3.0).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -42,8 +42,8 @@
42
42
  "lint": "eslint \"src/**/*.ts\""
43
43
  },
44
44
  "dependencies": {
45
- "@principles/core": "^7.6.1",
46
- "@principles/host-runtime": "^4.1.1",
45
+ "@principles/core": "^7.7.0",
46
+ "@principles/host-runtime": "^4.2.0",
47
47
  "@principles/install-layout": "^0.8.1"
48
48
  },
49
49
  "devDependencies": {
@@ -61,5 +61,5 @@
61
61
  "publishConfig": {
62
62
  "access": "public"
63
63
  },
64
- "gitHead": "8582e5dde27a582c63f3ad6804675a84c0d0c11e"
64
+ "gitHead": "7feb0044cae3768b8bf278dad1cb58e77410b6f9"
65
65
  }
@@ -56,7 +56,7 @@ Owner 说过 —— 本次对话、Owner 文档或已批准的决定。`anchorRe
56
56
 
57
57
  ### `established_principle`(既有原则)
58
58
 
59
- `anchorRef` 必须是 `<principleId>@<version>`(例如 `P-42@1`)。两者都从 `pd principle list` 取,禁止猜测或推断版本号。
59
+ `anchorRef` 必须是 `<principleId>@<version>`(例如 `P-42@1`)。两者都从工作区账本 `.state/principle_training_state.json` 的 `_tree.principles` 读取,禁止猜测或推断版本号。
60
60
 
61
61
  服务端会校验存在性、版本与状态:
62
62