ultimate-pi 0.19.1 → 0.22.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.
Files changed (147) hide show
  1. package/.agents/skills/harness-decisions/SKILL.md +68 -2
  2. package/.agents/skills/harness-git-commit/SKILL.md +72 -0
  3. package/.agents/skills/harness-governor/SKILL.md +2 -2
  4. package/.agents/skills/harness-ls-lint-setup/SKILL.md +59 -0
  5. package/.agents/skills/harness-plan/SKILL.md +13 -11
  6. package/.agents/skills/harness-review/SKILL.md +1 -1
  7. package/.agents/skills/harness-sentrux-repair/SKILL.md +48 -0
  8. package/.agents/skills/sentrux/SKILL.md +4 -2
  9. package/.agents/skills/wiki-save/SKILL.md +1 -1
  10. package/.pi/PACKAGING.md +6 -0
  11. package/.pi/SYSTEM.md +21 -3
  12. package/.pi/agents/harness/ls-lint-steward.md +49 -0
  13. package/.pi/agents/harness/planning/decompose.md +4 -4
  14. package/.pi/agents/harness/reviewing/evaluator.md +1 -1
  15. package/.pi/agents/harness/running/executor.md +43 -2
  16. package/.pi/agents/harness/sentrux-repair-advisor.md +50 -0
  17. package/.pi/agents/pi-pi/prompt-expert.md +17 -2
  18. package/.pi/auto-commit.json +9 -2
  19. package/.pi/extensions/debate-orchestrator.ts +3 -0
  20. package/.pi/extensions/harness-anchored-edit.ts +139 -0
  21. package/.pi/extensions/harness-ask-user.ts +13 -34
  22. package/.pi/extensions/harness-debate-tools.ts +43 -4
  23. package/.pi/extensions/harness-live-widget.ts +28 -19
  24. package/.pi/extensions/harness-run-context.ts +278 -115
  25. package/.pi/extensions/harness-web-tools.ts +598 -471
  26. package/.pi/extensions/ls-lint-rules-sync.ts +103 -0
  27. package/.pi/extensions/observation-bus.ts +4 -0
  28. package/.pi/extensions/policy-gate.ts +270 -229
  29. package/.pi/extensions/sentrux-rules-sync.ts +2 -0
  30. package/.pi/extensions/soundboard.ts +48 -48
  31. package/.pi/harness/README.md +4 -0
  32. package/.pi/harness/agents.manifest.json +15 -7
  33. package/.pi/harness/agents.policy.yaml +47 -81
  34. package/.pi/harness/docs/adrs/0051-hash-anchored-executor-edits.md +41 -0
  35. package/.pi/harness/docs/adrs/0052-ls-lint-naming-lifecycle.md +45 -0
  36. package/.pi/harness/docs/adrs/0052-sentrux-structured-repair.md +38 -0
  37. package/.pi/harness/docs/adrs/0053-plan-task-clarification-gate.md +39 -0
  38. package/.pi/harness/docs/adrs/0054-harness-native-ask-user.md +40 -0
  39. package/.pi/harness/docs/adrs/0055-auto-commit-coauthor-lifecycle.md +40 -0
  40. package/.pi/harness/docs/adrs/README.md +7 -0
  41. package/.pi/harness/docs/practice-map.md +21 -5
  42. package/.pi/harness/evals/smoke/ls-lint-stub.json +10 -0
  43. package/.pi/harness/evolution/self-healing-rules.json +16 -0
  44. package/.pi/harness/ls-lint/naming.manifest.json +128 -0
  45. package/.pi/harness/sentrux/architecture.manifest.json +1 -1
  46. package/.pi/harness/specs/auto-commit.schema.json +63 -0
  47. package/.pi/harness/specs/ls-lint-manifest-proposal.schema.json +80 -0
  48. package/.pi/harness/specs/ls-lint-signal.schema.json +47 -0
  49. package/.pi/harness/specs/naming-manifest.schema.json +54 -0
  50. package/.pi/harness/specs/plan-task-clarification.schema.json +88 -0
  51. package/.pi/harness/specs/sentrux-diagnostics.schema.json +173 -0
  52. package/.pi/harness/specs/sentrux-repair-plan.schema.json +133 -0
  53. package/.pi/harness/specs/sentrux-report.schema.json +119 -0
  54. package/.pi/harness/specs/sentrux-signal.schema.json +34 -1
  55. package/.pi/lib/agents-policy.d.mts +26 -47
  56. package/.pi/lib/agents-policy.mjs +84 -29
  57. package/.pi/lib/agents-policy.ts +1 -0
  58. package/.pi/lib/agt/build-evaluation-context.ts +136 -64
  59. package/.pi/lib/ask-user/constants.mjs +3 -0
  60. package/.pi/lib/ask-user/constants.ts +4 -0
  61. package/.pi/lib/ask-user/contracts/glimpse-parse.ts +56 -0
  62. package/.pi/lib/ask-user/contracts/glimpse-payload-build.ts +58 -0
  63. package/.pi/lib/ask-user/contracts/glimpse-payload.ts +38 -0
  64. package/.pi/lib/ask-user/core/questionnaire.ts +74 -0
  65. package/.pi/lib/ask-user/dialog.ts +2 -314
  66. package/.pi/lib/ask-user/fallback.ts +2 -78
  67. package/.pi/lib/ask-user/format.ts +85 -0
  68. package/.pi/lib/ask-user/glimpseui.d.ts +10 -0
  69. package/.pi/lib/ask-user/index.ts +114 -0
  70. package/.pi/lib/ask-user/merge-task-clarification.ts +98 -0
  71. package/.pi/lib/ask-user/policy.mjs +43 -0
  72. package/.pi/lib/ask-user/policy.ts +104 -0
  73. package/.pi/lib/ask-user/presenters/glimpse.ts +130 -0
  74. package/.pi/lib/ask-user/presenters/headless.ts +131 -0
  75. package/.pi/lib/ask-user/presenters/select.ts +60 -0
  76. package/.pi/lib/ask-user/presenters/tui.ts +373 -0
  77. package/.pi/lib/ask-user/presenters/types.ts +13 -0
  78. package/.pi/lib/ask-user/render.ts +40 -9
  79. package/.pi/lib/ask-user/schema.ts +66 -13
  80. package/.pi/lib/ask-user/types.ts +60 -3
  81. package/.pi/lib/ask-user/validate-core.mjs +193 -7
  82. package/.pi/lib/ask-user/validate.ts +53 -34
  83. package/.pi/lib/harness-anchored-edit/.hash_anchors +1721 -0
  84. package/.pi/lib/harness-anchored-edit/anchor-state.ts +320 -0
  85. package/.pi/lib/harness-anchored-edit/apply-anchored-edits.ts +161 -0
  86. package/.pi/lib/harness-anchored-edit/edit-executor.ts +146 -0
  87. package/.pi/lib/harness-anchored-edit/index.ts +9 -0
  88. package/.pi/lib/harness-anchored-edit/line-protocol.ts +38 -0
  89. package/.pi/lib/harness-anchored-edit/package.json +3 -0
  90. package/.pi/lib/harness-anchored-edit/settings.ts +1 -0
  91. package/.pi/lib/harness-anchored-edit/task-id.ts +8 -0
  92. package/.pi/lib/harness-anchored-edit/types.ts +19 -0
  93. package/.pi/lib/harness-artifact-gate.ts +75 -21
  94. package/.pi/lib/harness-auto-commit-config.mjs +321 -0
  95. package/.pi/lib/harness-lens/clients/anchored-edit-autopatch.ts +158 -0
  96. package/.pi/lib/harness-lens/clients/lsp/client.ts +62 -39
  97. package/.pi/lib/harness-lens/clients/tool-policy.ts +73 -181
  98. package/.pi/lib/harness-lens/index.ts +246 -96
  99. package/.pi/lib/harness-lens/tools/lsp-navigation.ts +10 -8
  100. package/.pi/lib/harness-repair-brief.ts +84 -25
  101. package/.pi/lib/harness-run-context.ts +42 -52
  102. package/.pi/lib/harness-sentrux-parse.mjs +272 -0
  103. package/.pi/lib/harness-sentrux-root.mjs +78 -0
  104. package/.pi/lib/harness-slash-completions.ts +116 -0
  105. package/.pi/lib/harness-spawn-topology.ts +121 -87
  106. package/.pi/lib/harness-subagent-submit-registry.ts +10 -0
  107. package/.pi/lib/harness-subagents-bridge.ts +11 -6
  108. package/.pi/lib/harness-ui-state.ts +95 -48
  109. package/.pi/lib/plan-approval/dialog.ts +5 -0
  110. package/.pi/lib/plan-approval/validate.ts +1 -1
  111. package/.pi/lib/plan-approval-readiness.ts +32 -0
  112. package/.pi/lib/plan-debate-gate.ts +154 -114
  113. package/.pi/lib/plan-task-clarification.ts +158 -0
  114. package/.pi/prompts/harness-auto.md +2 -2
  115. package/.pi/prompts/harness-ls-lint-steward.md +43 -0
  116. package/.pi/prompts/harness-plan.md +58 -8
  117. package/.pi/prompts/harness-review.md +40 -6
  118. package/.pi/prompts/harness-run.md +33 -11
  119. package/.pi/prompts/harness-setup.md +72 -3
  120. package/.pi/prompts/harness-steer.md +3 -2
  121. package/.pi/prompts/wiki-save.md +5 -4
  122. package/.pi/scripts/README.md +8 -0
  123. package/.pi/scripts/generate-agents-policy-yaml.mjs +14 -2
  124. package/.pi/scripts/harness-anchored-edit-smoke.mjs +45 -0
  125. package/.pi/scripts/harness-auto-commit-bootstrap.mjs +96 -0
  126. package/.pi/scripts/harness-cli-verify.sh +47 -0
  127. package/.pi/scripts/harness-git-churn.mjs +77 -0
  128. package/.pi/scripts/harness-git-commit.mjs +173 -0
  129. package/.pi/scripts/harness-ls-lint-bootstrap.mjs +142 -0
  130. package/.pi/scripts/harness-ls-lint-cli.mjs +184 -0
  131. package/.pi/scripts/harness-seed-project-contracts.mjs +47 -0
  132. package/.pi/scripts/harness-sentrux-diagnostics.mjs +230 -0
  133. package/.pi/scripts/harness-sentrux-report.mjs +256 -0
  134. package/.pi/scripts/harness-verify.mjs +347 -117
  135. package/.pi/scripts/ls-lint-rules-sync.mjs +265 -0
  136. package/.pi/scripts/run-tests.mjs +65 -0
  137. package/.pi/settings.example.json +1 -0
  138. package/.sentrux/rules.toml +1 -1
  139. package/AGENTS.md +1 -0
  140. package/CHANGELOG.md +31 -0
  141. package/README.md +13 -4
  142. package/THIRD_PARTY_NOTICES.md +7 -0
  143. package/package.json +8 -3
  144. package/vendor/pi-subagents/src/agents.ts +5 -0
  145. package/vendor/pi-subagents/src/subagents.ts +22 -3
  146. package/vendor/pi-vcc/src/hooks/before-compact.ts +86 -60
  147. package/.pi/scripts/release.sh +0 -338
@@ -0,0 +1,173 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ultimate-pi.local/.pi/harness/specs/sentrux-diagnostics.schema.json",
4
+ "title": "SentruxDiagnostics",
5
+ "description": "Pro-shaped repair-oriented diagnostics synthesized from OSS Sentrux report (no MCP/Pro).",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schema_version",
10
+ "synthesized_at",
11
+ "project_root",
12
+ "quality_signal",
13
+ "bottleneck",
14
+ "bottleneck_inferred",
15
+ "root_causes",
16
+ "diagnostics"
17
+ ],
18
+ "properties": {
19
+ "schema_version": {
20
+ "type": "string",
21
+ "const": "1.0.0"
22
+ },
23
+ "synthesized_at": {
24
+ "type": "string",
25
+ "format": "date-time"
26
+ },
27
+ "project_root": {
28
+ "type": "string",
29
+ "minLength": 1
30
+ },
31
+ "report_sha256": {
32
+ "type": "string"
33
+ },
34
+ "quality_signal": {
35
+ "type": ["integer", "null"]
36
+ },
37
+ "gate_status": {
38
+ "type": "string",
39
+ "enum": ["pass", "degraded", "unknown"]
40
+ },
41
+ "bottleneck": {
42
+ "type": "string",
43
+ "enum": [
44
+ "modularity",
45
+ "equality",
46
+ "acyclicity",
47
+ "stability",
48
+ "abstraction"
49
+ ]
50
+ },
51
+ "bottleneck_inferred": {
52
+ "type": "boolean"
53
+ },
54
+ "root_causes": {
55
+ "type": "array",
56
+ "items": { "type": "string", "minLength": 1 },
57
+ "minItems": 1
58
+ },
59
+ "diagnostics": {
60
+ "type": "object",
61
+ "additionalProperties": false,
62
+ "required": [
63
+ "god_files",
64
+ "hotspots",
65
+ "complex_functions",
66
+ "cycles",
67
+ "violations_summary"
68
+ ],
69
+ "properties": {
70
+ "god_files": {
71
+ "type": "array",
72
+ "items": { "$ref": "#/$defs/god_file" }
73
+ },
74
+ "hotspots": {
75
+ "type": "array",
76
+ "items": { "$ref": "#/$defs/hotspot" }
77
+ },
78
+ "complex_functions": {
79
+ "type": "array",
80
+ "items": { "$ref": "#/$defs/complex_function" }
81
+ },
82
+ "cycles": {
83
+ "type": "array",
84
+ "items": { "$ref": "#/$defs/cycle" }
85
+ },
86
+ "violations_summary": {
87
+ "type": "array",
88
+ "items": { "$ref": "#/$defs/violation_summary" }
89
+ },
90
+ "gate_degraded_reasons": {
91
+ "type": "array",
92
+ "items": { "type": "string" }
93
+ }
94
+ }
95
+ },
96
+ "graphify_refs": {
97
+ "type": "array",
98
+ "items": {
99
+ "type": "object",
100
+ "additionalProperties": false,
101
+ "required": ["path", "summary"],
102
+ "properties": {
103
+ "path": { "type": "string" },
104
+ "summary": { "type": "string" }
105
+ }
106
+ }
107
+ }
108
+ },
109
+ "$defs": {
110
+ "god_file": {
111
+ "type": "object",
112
+ "additionalProperties": false,
113
+ "required": ["path"],
114
+ "properties": {
115
+ "path": { "type": "string" },
116
+ "fan_out": { "type": ["integer", "null"] },
117
+ "reason": { "type": "string" }
118
+ }
119
+ },
120
+ "hotspot": {
121
+ "type": "object",
122
+ "additionalProperties": false,
123
+ "required": ["path", "score"],
124
+ "properties": {
125
+ "path": { "type": "string" },
126
+ "score": { "type": "number" },
127
+ "churn_14d": { "type": ["integer", "null"] },
128
+ "reason": { "type": "string" }
129
+ }
130
+ },
131
+ "complex_function": {
132
+ "type": "object",
133
+ "additionalProperties": false,
134
+ "required": ["file", "func", "cc"],
135
+ "properties": {
136
+ "file": { "type": "string" },
137
+ "func": { "type": "string" },
138
+ "cc": { "type": "integer" },
139
+ "priority": {
140
+ "type": "string",
141
+ "enum": ["critical", "high", "medium", "low"]
142
+ }
143
+ }
144
+ },
145
+ "cycle": {
146
+ "type": "object",
147
+ "additionalProperties": false,
148
+ "required": ["members"],
149
+ "properties": {
150
+ "members": {
151
+ "type": "array",
152
+ "items": { "type": "string" }
153
+ },
154
+ "reason": { "type": "string" }
155
+ }
156
+ },
157
+ "violation_summary": {
158
+ "type": "object",
159
+ "additionalProperties": false,
160
+ "required": ["rule", "count", "severity"],
161
+ "properties": {
162
+ "rule": { "type": "string" },
163
+ "count": { "type": "integer", "minimum": 0 },
164
+ "severity": { "type": "string" },
165
+ "sample_files": {
166
+ "type": "array",
167
+ "items": { "type": "string" },
168
+ "maxItems": 5
169
+ }
170
+ }
171
+ }
172
+ }
173
+ }
@@ -0,0 +1,133 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ultimate-pi.local/.pi/harness/specs/sentrux-repair-plan.schema.json",
4
+ "title": "SentruxRepairPlan",
5
+ "description": "Actionable repair plan from sentrux-repair-advisor (steer/executor input).",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schema_version",
10
+ "status",
11
+ "summary",
12
+ "bottleneck",
13
+ "root_causes",
14
+ "actions",
15
+ "human_required"
16
+ ],
17
+ "properties": {
18
+ "schema_version": {
19
+ "type": "string",
20
+ "const": "1.0.0"
21
+ },
22
+ "status": {
23
+ "type": "string",
24
+ "enum": ["ok", "partial", "blocked"]
25
+ },
26
+ "summary": {
27
+ "type": "string",
28
+ "minLength": 1
29
+ },
30
+ "bottleneck": {
31
+ "type": "string",
32
+ "enum": [
33
+ "modularity",
34
+ "equality",
35
+ "acyclicity",
36
+ "stability",
37
+ "abstraction"
38
+ ]
39
+ },
40
+ "root_causes": {
41
+ "type": "array",
42
+ "items": { "type": "string", "minLength": 1 },
43
+ "minItems": 1
44
+ },
45
+ "actions": {
46
+ "type": "array",
47
+ "minItems": 1,
48
+ "items": { "$ref": "#/$defs/action" }
49
+ },
50
+ "do_not_touch": {
51
+ "type": "array",
52
+ "items": { "type": "string" }
53
+ },
54
+ "verification": {
55
+ "type": "array",
56
+ "items": { "type": "string" }
57
+ },
58
+ "human_required": {
59
+ "type": "boolean"
60
+ },
61
+ "open_questions": {
62
+ "type": "array",
63
+ "items": { "type": "string" }
64
+ },
65
+ "evidence": {
66
+ "type": "array",
67
+ "items": {
68
+ "type": "object",
69
+ "additionalProperties": false,
70
+ "required": ["source", "ref", "summary"],
71
+ "properties": {
72
+ "source": {
73
+ "type": "string",
74
+ "enum": [
75
+ "sentrux-report",
76
+ "sentrux-diagnostics",
77
+ "graphify",
78
+ "plan",
79
+ "diff"
80
+ ]
81
+ },
82
+ "ref": { "type": "string", "minLength": 1 },
83
+ "summary": { "type": "string", "minLength": 1 }
84
+ }
85
+ }
86
+ }
87
+ },
88
+ "$defs": {
89
+ "action": {
90
+ "type": "object",
91
+ "additionalProperties": false,
92
+ "required": ["id", "priority", "kind", "target", "instruction"],
93
+ "properties": {
94
+ "id": {
95
+ "type": "string",
96
+ "pattern": "^[a-z][a-z0-9-]*$"
97
+ },
98
+ "priority": {
99
+ "type": "integer",
100
+ "minimum": 1,
101
+ "maximum": 10
102
+ },
103
+ "kind": {
104
+ "type": "string",
105
+ "enum": [
106
+ "refactor",
107
+ "extract",
108
+ "move",
109
+ "split",
110
+ "tune",
111
+ "document",
112
+ "defer"
113
+ ]
114
+ },
115
+ "target": {
116
+ "type": "string",
117
+ "minLength": 1
118
+ },
119
+ "instruction": {
120
+ "type": "string",
121
+ "minLength": 1
122
+ },
123
+ "acceptance": {
124
+ "type": "string"
125
+ },
126
+ "rule_ids": {
127
+ "type": "array",
128
+ "items": { "type": "string" }
129
+ }
130
+ }
131
+ }
132
+ }
133
+ }
@@ -0,0 +1,119 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://ultimate-pi.local/.pi/harness/specs/sentrux-report.schema.json",
4
+ "title": "SentruxReport",
5
+ "description": "Single-scan Sentrux check + gate capture for a harness run (OSS CLI parse).",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schema_version",
10
+ "captured_at",
11
+ "project_root",
12
+ "parser_version",
13
+ "check",
14
+ "gate"
15
+ ],
16
+ "properties": {
17
+ "schema_version": {
18
+ "type": "string",
19
+ "const": "1.0.0"
20
+ },
21
+ "captured_at": {
22
+ "type": "string",
23
+ "format": "date-time"
24
+ },
25
+ "project_root": {
26
+ "type": "string",
27
+ "minLength": 1
28
+ },
29
+ "parser_version": {
30
+ "type": "string",
31
+ "minLength": 1
32
+ },
33
+ "sentrux_cli_version": {
34
+ "type": ["string", "null"]
35
+ },
36
+ "upstream_json_available": {
37
+ "type": "boolean"
38
+ },
39
+ "check": {
40
+ "type": "object",
41
+ "additionalProperties": false,
42
+ "required": ["parse_ok", "check_pass", "violations"],
43
+ "properties": {
44
+ "parse_ok": { "type": "boolean" },
45
+ "parse_errors": {
46
+ "type": "array",
47
+ "items": { "type": "string" }
48
+ },
49
+ "rules_checked": { "type": ["integer", "null"] },
50
+ "quality_signal": { "type": ["integer", "null"] },
51
+ "check_pass": { "type": "boolean" },
52
+ "violations": {
53
+ "type": "array",
54
+ "items": { "$ref": "#/$defs/violation" }
55
+ },
56
+ "stdout_sha256": { "type": "string" }
57
+ }
58
+ },
59
+ "gate": {
60
+ "type": "object",
61
+ "additionalProperties": false,
62
+ "required": ["parse_ok", "status", "degraded_reasons"],
63
+ "properties": {
64
+ "parse_ok": { "type": "boolean" },
65
+ "parse_errors": {
66
+ "type": "array",
67
+ "items": { "type": "string" }
68
+ },
69
+ "status": {
70
+ "type": "string",
71
+ "enum": ["pass", "degraded", "unknown"]
72
+ },
73
+ "quality_before": { "type": ["integer", "null"] },
74
+ "quality_after": { "type": ["integer", "null"] },
75
+ "metrics": {
76
+ "type": "array",
77
+ "items": {
78
+ "type": "object",
79
+ "additionalProperties": false,
80
+ "required": ["name", "before", "after"],
81
+ "properties": {
82
+ "name": { "type": "string" },
83
+ "before": { "type": "string" },
84
+ "after": { "type": "string" }
85
+ }
86
+ }
87
+ },
88
+ "degraded_reasons": {
89
+ "type": "array",
90
+ "items": { "type": "string" }
91
+ },
92
+ "stdout_sha256": { "type": "string" }
93
+ }
94
+ }
95
+ },
96
+ "$defs": {
97
+ "violation": {
98
+ "type": "object",
99
+ "additionalProperties": false,
100
+ "required": ["severity", "rule", "message", "files"],
101
+ "properties": {
102
+ "severity": {
103
+ "type": "string",
104
+ "enum": ["error", "warning", "info"]
105
+ },
106
+ "rule": { "type": "string", "minLength": 1 },
107
+ "message": { "type": "string" },
108
+ "files": {
109
+ "type": "array",
110
+ "items": { "type": "string" }
111
+ },
112
+ "related_rules": {
113
+ "type": "array",
114
+ "items": { "type": "string" }
115
+ }
116
+ }
117
+ }
118
+ }
119
+ }
@@ -15,7 +15,7 @@
15
15
  "properties": {
16
16
  "schema_version": {
17
17
  "type": "string",
18
- "const": "1.0.0"
18
+ "oneOf": [{ "const": "1.0.0" }, { "const": "1.1.0" }]
19
19
  },
20
20
  "run_id": {
21
21
  "type": "string",
@@ -38,6 +38,39 @@
38
38
  "phase": {
39
39
  "type": "string",
40
40
  "enum": ["execute", "evaluate", "review"]
41
+ },
42
+ "quality_signal": {
43
+ "type": "integer"
44
+ },
45
+ "bottleneck": {
46
+ "type": "string",
47
+ "enum": [
48
+ "modularity",
49
+ "equality",
50
+ "acyclicity",
51
+ "stability",
52
+ "abstraction"
53
+ ]
54
+ },
55
+ "violation_count": {
56
+ "type": "integer",
57
+ "minimum": 0
58
+ },
59
+ "report_path": {
60
+ "type": "string",
61
+ "description": "Run-relative path to sentrux-report.json"
62
+ },
63
+ "diagnostics_path": {
64
+ "type": "string",
65
+ "description": "Run-relative path to sentrux-diagnostics.json"
66
+ },
67
+ "repair_plan_path": {
68
+ "type": "string",
69
+ "description": "Run-relative path to sentrux-repair-plan.yaml"
70
+ },
71
+ "degraded_reasons": {
72
+ "type": "array",
73
+ "items": { "type": "string" }
41
74
  }
42
75
  }
43
76
  }
@@ -1,18 +1,4 @@
1
- export function packageAgentsPolicyPath(packageRoot: string): string;
2
- export function projectAgentsPolicyPath(projectRoot: string): string;
3
- export function projectPoliciesDir(projectRoot: string): string;
4
-
5
- export interface AgentPolicySpec {
6
- kind: string;
7
- effectiveTools: string[];
8
- extensionsOff: boolean;
9
- readOnly: boolean;
10
- maxTurns?: number;
11
- thinking?: string;
12
- submitTool?: string;
13
- }
14
-
15
- export interface AllowsAgentToolInput {
1
+ export type AllowsAgentToolInput = {
16
2
  packageRoot: string;
17
3
  projectRoot: string;
18
4
  agentId: string;
@@ -20,51 +6,44 @@ export interface AllowsAgentToolInput {
20
6
  toolInput?: Record<string, unknown>;
21
7
  isSubprocess?: boolean;
22
8
  isParentOrchestrator?: boolean;
23
- }
9
+ };
24
10
 
25
- export function loadAgentsPolicyMerged(
11
+ export function allowsAgentTool(input: AllowsAgentToolInput): boolean;
12
+ export function applyAgentPolicyToConfig(
13
+ agent: Record<string, unknown>,
14
+ packageRoot: string,
15
+ projectRoot: string,
16
+ ): Record<string, unknown>;
17
+ export function findProjectRootFromAgentsDir(projectAgentsDir: string): string;
18
+ export function getAgentKind(
26
19
  packageRoot: string,
27
20
  projectRoot: string,
28
- ): {
29
- schemaVersion: string;
30
- kinds: Map<string, unknown>;
31
- agents: Map<string, unknown>;
32
- defaults: unknown;
33
- };
34
-
35
- export function resolveEffectiveTools(
36
21
  agentId: string,
37
- merged: ReturnType<typeof loadAgentsPolicyMerged>,
38
- ): AgentPolicySpec;
39
-
22
+ ): string;
40
23
  export function getAgentPolicySpec(
41
24
  packageRoot: string,
42
25
  projectRoot: string,
43
26
  agentId: string,
44
- ): AgentPolicySpec | null;
45
-
46
- export function getAgentKind(
27
+ ): unknown;
28
+ export function harnessSubagentPhaseHint(
47
29
  packageRoot: string,
48
30
  projectRoot: string,
49
31
  agentId: string,
50
- ): string;
51
-
32
+ ): string | undefined;
33
+ export function isAgtGovernanceActive(projectRoot: string): boolean;
52
34
  export function isHarnessPlanningAgent(agentId: string): boolean;
53
-
54
- export function harnessSubagentPhaseHint(
35
+ export function loadAgentsPolicyMerged(
55
36
  packageRoot: string,
56
37
  projectRoot: string,
38
+ ): unknown;
39
+ export function packageAgentsPolicyPath(packageRoot: string): string;
40
+ export function projectAgentsPolicyPath(projectRoot: string): string;
41
+ export function projectPoliciesDir(projectRoot: string): string;
42
+ export function resolveEffectiveTools(
57
43
  agentId: string,
58
- ): string | null;
59
-
60
- export function allowsAgentTool(input: AllowsAgentToolInput): boolean;
61
-
62
- export function applyAgentPolicyToConfig<T extends { name: string }>(
63
- agent: T,
44
+ merged: unknown,
45
+ ): string[];
46
+ export function resolveExtensionBundlePaths(
64
47
  packageRoot: string,
65
- projectRoot: string,
66
- ): T;
67
-
68
- export function findProjectRootFromAgentsDir(projectAgentsDir: string): string;
69
-
70
- export function isAgtGovernanceActive(projectRoot: string): boolean;
48
+ bundleName: string,
49
+ ): string[];