@event4u/agent-config 14.1.0 → 14.4.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/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +291 -181
- package/agents/templates/.ai-council.yml.example +35 -0
- package/dist/agent-src/contexts/execution/roadmap-process-loop.md +83 -12
- package/dist/agent-src/rules/roadmap-progress-sync.md +48 -4
- package/dist/agent-src/scripts/resume_probe.ts +154 -9
- package/dist/agent-src/scripts/roadmap_gates.ts +210 -6
- package/dist/agent-src/skills/roadmap-management/SKILL.md +9 -4
- package/dist/agent-src/templates/agent-settings.md +70 -0
- package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/dist/agent-src/templates/scripts/telemetry/remote.ts +571 -0
- package/dist/agent-src/templates/scripts/telemetry/settings.ts +222 -44
- package/dist/cli/python/workspace_drive.js +8 -3
- package/dist/cli/python/workspace_drive.js.map +1 -1
- package/dist/cli/python/workspace_hosts.js +16 -12
- package/dist/cli/python/workspace_hosts.js.map +1 -1
- package/dist/cli/registry.js +2 -0
- package/dist/cli/registry.js.map +1 -1
- package/dist/cli-delegate/{chunk-F3YUF7SA.js → chunk-3UCJWMMP.js} +1 -1
- package/dist/cli-delegate/chunk-F7DQWYR5.js +69 -0
- package/dist/cli-delegate/{chunk-7PZ4FSZB.js → chunk-FBKL6JWT.js} +61 -2
- package/dist/cli-delegate/{chunk-MNWRDMR5.js → chunk-PKOBQADP.js} +1 -1
- package/dist/cli-delegate/cmd_conformance.js +26 -11
- package/dist/cli-delegate/cmd_doctor.js +2 -2
- package/dist/cli-delegate/cmd_handoff.js +3 -3
- package/dist/cli-delegate/cmd_route_audit.js +2 -2
- package/dist/cli-delegate/cmd_settings_set.js +17 -3
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +4 -4
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +1 -1
- package/dist/discovery/dormancy-report.md +1 -1
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +2 -2
- package/dist/discovery/trust-report.md +1 -1
- package/dist/discovery/workspaces.json +2 -2
- package/dist/hooks/dispatch.js +3773 -1731
- package/dist/mcp/registry-manifest.json +2 -2
- package/dist/mcp/server.json +2 -2
- package/dist/mcp/server.mjs +1070 -408
- package/dist/scripts/_lib/host_launch.js +66 -0
- package/dist/scripts/_lib/host_launch.js.map +1 -0
- package/dist/server/io/yamlIO.js +175 -3
- package/dist/server/io/yamlIO.js.map +1 -1
- package/dist/server/routes/wizard.js +20 -1
- package/dist/server/routes/wizard.js.map +1 -1
- package/dist/shared/settingsConsent.js +25 -0
- package/dist/shared/settingsConsent.js.map +1 -1
- package/docs/contracts/settings-classes.md +11 -0
- package/docs/guidelines/agent-infra/roadmap-progress-mechanics.md +2 -1
- package/package.json +1 -1
- package/src/agent-src/scripts/resume_probe.ts +154 -9
- package/src/agent-src/scripts/roadmap_gates.ts +210 -6
- package/src/agent-src/templates/scripts/telemetry/remote.ts +571 -0
- package/src/agent-src/templates/scripts/telemetry/settings.ts +222 -44
- package/src/config/estate-count-budget.json +120 -0
- package/src/config/evaluator-budgets.json +4 -4
- package/src/config/gate-coverage.yml +32 -4
- package/src/config/gate-violation-baselines.json +63 -63
- package/src/config/gitignore-block.txt +5 -0
- package/src/config/hook-latency-budget.json +40 -1
- package/src/config/hook-token-budget.json +22 -0
- package/src/config/rule-stub-ceilings.json +11 -3
- package/src/scripts/_dispatch.bash +42 -1
- package/src/scripts/_lib/council_fallback_posture.ts +81 -0
- package/src/scripts/_lib/council_fallback_wiring.ts +126 -0
- package/src/scripts/_lib/council_settings_block.ts +152 -0
- package/src/scripts/_lib/headless_invocation.ts +285 -0
- package/src/scripts/_lib/host_launch.ts +72 -0
- package/src/scripts/_lib/map_to_object.ts +16 -0
- package/src/scripts/_lib/roadmap_checkboxes.ts +88 -0
- package/src/scripts/_lib/run_checkpoint.ts +409 -0
- package/src/scripts/_lib/session_register.ts +32 -1
- package/src/scripts/_lib/skill_catalogue_series.ts +91 -0
- package/src/scripts/_lib/stdin.ts +35 -1
- package/src/scripts/_lib/turn_end_refusals.ts +12 -4
- package/src/scripts/_lib/unattended_guard.ts +371 -0
- package/src/scripts/ai_council/config.ts +27 -1
- package/src/scripts/ai_council/events_log.ts +12 -1
- package/src/scripts/ai_council/fallback_config.ts +114 -0
- package/src/scripts/ai_council/mid_flight_fallback.ts +295 -0
- package/src/scripts/ai_council/orchestrator.ts +251 -292
- package/src/scripts/ai_council/py_parity.ts +139 -0
- package/src/scripts/ai_council/response_render.ts +99 -0
- package/src/scripts/ai_council/spend_gate.ts +123 -0
- package/src/scripts/ai_council/transport_resolver.ts +81 -13
- package/src/scripts/bench_hook_injection.ts +100 -6
- package/src/scripts/bench_hook_latency.ts +442 -16
- package/src/scripts/check_estate_count.ts +924 -0
- package/src/scripts/compile_hook_manifest.ts +67 -0
- package/src/scripts/council_cli.ts +100 -125
- package/src/scripts/decision_memo.ts +325 -0
- package/src/scripts/dispatch_r2_reviewer.ts +169 -15
- package/src/scripts/hook_manifest.json +1 -0
- package/src/scripts/hook_manifest.yaml +172 -25
- package/src/scripts/hooks/concern_registry.ts +6 -0
- package/src/scripts/hooks/dispatch_hook.ts +183 -10
- package/src/scripts/hooks/dispatch_issues.ts +26 -0
- package/src/scripts/hooks/end_review_nudge_hook.ts +97 -24
- package/src/scripts/hooks/hook_stdin.ts +111 -5
- package/src/scripts/hooks/injection_budget.ts +595 -0
- package/src/scripts/hooks/payload_stub.ts +446 -0
- package/src/scripts/hooks/run_continuation_hook.ts +627 -0
- package/src/scripts/hooks/session_eol_hook.ts +52 -0
- package/src/scripts/hooks/skill_route_hook.ts +172 -11
- package/src/scripts/hooks/telemetry_usage_hook.ts +339 -0
- package/src/scripts/hooks/tool_result_bytes_hook.ts +27 -0
- package/src/scripts/hooks/turn_end_gate_hook.ts +45 -7
- package/src/scripts/hooks_doctor.ts +16 -2
- package/src/scripts/install-hooks.sh +26 -0
- package/src/scripts/interruption_report.ts +330 -13
- package/src/scripts/lint_hook_manifest.ts +167 -0
- package/src/scripts/roadmap_progress_hook.ts +254 -46
- package/src/scripts/run_supervise.ts +623 -0
- package/src/scripts/session_register_hook.ts +108 -8
- package/src/scripts/sessions_cli.ts +18 -6
- package/src/scripts/telemetry_disclosure_hook.ts +244 -0
- package/src/server/io/yamlIO.ts +167 -3
- package/src/shared/settingsConsent.ts +49 -2
- package/dist/cli-delegate/chunk-MMJL4TIX.js +0 -18
|
@@ -35,8 +35,21 @@
|
|
|
35
35
|
|
|
36
36
|
import { isConservativeDefault, type SettingsClass } from './settingsClasses.js';
|
|
37
37
|
|
|
38
|
-
/**
|
|
39
|
-
|
|
38
|
+
/**
|
|
39
|
+
* The provenance vocabulary this READER understands.
|
|
40
|
+
*
|
|
41
|
+
* Deliberately one value wider than what `settings:set` can write: `org-pack`
|
|
42
|
+
* is readable here and absent from `ProvenanceSource` in
|
|
43
|
+
* `src/scripts/_cli/cmd_settings_set.ts`. That asymmetry is ADR-233 § D3 and
|
|
44
|
+
* it is the whole safety property — a value no agent-reachable path can write
|
|
45
|
+
* is a value the agent cannot stamp on its own permission. It is a type
|
|
46
|
+
* difference rather than a runtime check on purpose: there is no branch to
|
|
47
|
+
* forget and none to bypass.
|
|
48
|
+
*/
|
|
49
|
+
export type ConsentSource = 'auto-detected' | 'jit-answer' | 'manual' | 'gui' | 'org-pack';
|
|
50
|
+
|
|
51
|
+
/** Keys `org-pack` provenance may grant. ADR-233 § D2. */
|
|
52
|
+
const ORG_PACK_KEY_PREFIX = 'telemetry.remote.';
|
|
40
53
|
|
|
41
54
|
/**
|
|
42
55
|
* The sources that can carry a human decision.
|
|
@@ -44,6 +57,11 @@ export type ConsentSource = 'auto-detected' | 'jit-answer' | 'manual' | 'gui';
|
|
|
44
57
|
* `jit-answer` is a question the user answered. `gui` is a human at the settings
|
|
45
58
|
* editor. `manual` is a hand-edit or an explicit CLI write on the user's
|
|
46
59
|
* instruction. `auto-detected` is excluded on purpose — see the module header.
|
|
60
|
+
*
|
|
61
|
+
* `org-pack` is NOT in this list, and its absence is not an oversight: it
|
|
62
|
+
* grants, but only for one namespace, so it is handled by its own branch in
|
|
63
|
+
* `consentVerdict` rather than by membership here. Putting it in this list
|
|
64
|
+
* would make it grant everywhere, which is the erosion ADR-233 § D2 refuses.
|
|
47
65
|
*/
|
|
48
66
|
const HUMAN_SOURCES: readonly ConsentSource[] = ['jit-answer', 'gui', 'manual'];
|
|
49
67
|
|
|
@@ -56,12 +74,23 @@ export type ConsentVerdict =
|
|
|
56
74
|
| 'withheld-unrecorded'
|
|
57
75
|
/** Permissive and recorded, but recorded as a machine inference. */
|
|
58
76
|
| 'withheld-machine-inferred'
|
|
77
|
+
/**
|
|
78
|
+
* An org administrator consented, but for a key outside the namespace
|
|
79
|
+
* that grant covers (ADR-233 § D2).
|
|
80
|
+
*/
|
|
81
|
+
| 'withheld-org-pack-out-of-scope'
|
|
59
82
|
/** Not a consent question at all: A needs none, C is human-only. */
|
|
60
83
|
| 'not-a-consent-key';
|
|
61
84
|
|
|
62
85
|
export interface ConsentQuery {
|
|
63
86
|
/** The key's class, from the contract — `undefined` means unclassified. */
|
|
64
87
|
cls: SettingsClass | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* The dotted key. Required only to evaluate an `org-pack` grant, which is
|
|
90
|
+
* namespace-scoped; every other source decides without it, so it stays
|
|
91
|
+
* optional rather than breaking existing callers.
|
|
92
|
+
*/
|
|
93
|
+
key?: string | undefined;
|
|
65
94
|
/** The effective value after normal resolution. */
|
|
66
95
|
value: unknown;
|
|
67
96
|
/**
|
|
@@ -97,6 +126,21 @@ export function consentVerdict(query: ConsentQuery): ConsentVerdict {
|
|
|
97
126
|
if (isConservativeDefault(query.value)) {
|
|
98
127
|
return 'withheld-default';
|
|
99
128
|
}
|
|
129
|
+
// The org-pack branch runs BEFORE the hand-edit branch, and the order is
|
|
130
|
+
// the fix rather than a style choice. `handEdited` is true for a
|
|
131
|
+
// project-local `.agent-settings.yml` — which is precisely the file an org
|
|
132
|
+
// pack ships — so with hand-edit first, a recorded `org-pack` provenance
|
|
133
|
+
// on an out-of-scope key would be granted by the wrong branch and ADR-233
|
|
134
|
+
// § D2's namespace scope would hold for no real deployment. A recorded
|
|
135
|
+
// source is the more specific fact and decides first.
|
|
136
|
+
if (query.source === 'org-pack') {
|
|
137
|
+
// A human decided, but not the human this value binds — so the grant
|
|
138
|
+
// is real and narrow. An absent key cannot be shown to be in scope,
|
|
139
|
+
// and unproven is withheld here as everywhere else in this function.
|
|
140
|
+
return query.key !== undefined && query.key.startsWith(ORG_PACK_KEY_PREFIX)
|
|
141
|
+
? 'granted'
|
|
142
|
+
: 'withheld-org-pack-out-of-scope';
|
|
143
|
+
}
|
|
100
144
|
if (query.handEdited === true) {
|
|
101
145
|
return 'granted';
|
|
102
146
|
}
|
|
@@ -130,6 +174,9 @@ export function withheldReason(verdict: ConsentVerdict, key: string): string | n
|
|
|
130
174
|
return `${key} permits this, but nothing records who decided it. Ask, or set it via the GUI.`;
|
|
131
175
|
case 'withheld-machine-inferred':
|
|
132
176
|
return `${key} was auto-detected, not decided. A machine inference is not a consent.`;
|
|
177
|
+
case 'withheld-org-pack-out-of-scope':
|
|
178
|
+
return `${key} carries an org-pack consent, which grants only under `
|
|
179
|
+
+ `${ORG_PACK_KEY_PREFIX}* (ADR-233). Ask this user directly.`;
|
|
133
180
|
case 'not-a-consent-key':
|
|
134
181
|
return `${key} is not a class-B consent key — this gate does not apply to it.`;
|
|
135
182
|
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { createRequire as __acCreateRequire } from 'node:module'; const require = globalThis.require ?? __acCreateRequire(import.meta.url);
|
|
2
|
-
|
|
3
|
-
// src/scripts/hooks/hook_stdin.ts
|
|
4
|
-
import * as fs from "node:fs";
|
|
5
|
-
var _override = null;
|
|
6
|
-
function readHookStdin() {
|
|
7
|
-
if (_override !== null) return _override;
|
|
8
|
-
try {
|
|
9
|
-
if (process.stdin.isTTY) return "";
|
|
10
|
-
return fs.readFileSync(0, "utf-8");
|
|
11
|
-
} catch {
|
|
12
|
-
return "";
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
readHookStdin
|
|
18
|
-
};
|