@event4u/agent-config 9.26.0 → 9.28.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/AGENTS.md +12 -11
- package/CHANGELOG.md +134 -207
- package/README.md +1 -1
- package/dist/agent-src/commands/analyze/conformance.md +43 -0
- package/dist/agent-src/commands/roadmap/next.md +65 -3
- package/dist/agent-src/contexts/execution/orchestration-telemetry.md +10 -3
- package/dist/agent-src/rules/active-remediation.md +2 -0
- package/dist/agent-src/rules/analysis-skill-routing.md +2 -0
- package/dist/agent-src/rules/architecture.md +2 -0
- package/dist/agent-src/rules/artifact-drafting-protocol.md +2 -0
- package/dist/agent-src/rules/artifact-engagement-recording.md +6 -1
- package/dist/agent-src/rules/augment-edit-discipline.md +2 -0
- package/dist/agent-src/rules/autonomous-execution.md +3 -1
- package/dist/agent-src/rules/brand-consistency.md +2 -0
- package/dist/agent-src/rules/brand-source-of-truth.md +35 -6
- package/dist/agent-src/rules/broken-access-control.md +2 -0
- package/dist/agent-src/rules/cli-output-handling.md +2 -0
- package/dist/agent-src/rules/code-comment-discipline.md +2 -0
- package/dist/agent-src/rules/code-provenance.md +2 -0
- package/dist/agent-src/rules/command-suggestion-policy.md +2 -0
- package/dist/agent-src/rules/commit-conventions.md +2 -0
- package/dist/agent-src/rules/communication-through-line.md +2 -0
- package/dist/agent-src/rules/content-quoting-floor.md +2 -0
- package/dist/agent-src/rules/context-hygiene.md +13 -1
- package/dist/agent-src/rules/copilot-routing.md +2 -0
- package/dist/agent-src/rules/council-availability.md +93 -0
- package/dist/agent-src/rules/cross-source-consistency.md +5 -0
- package/dist/agent-src/rules/decision-revisit-gate.md +2 -0
- package/dist/agent-src/rules/delegation-policy.md +31 -5
- package/dist/agent-src/rules/design-fidelity.md +5 -0
- package/dist/agent-src/rules/design-review-after-ui-write.md +4 -0
- package/dist/agent-src/rules/devcontainer-routing.md +2 -0
- package/dist/agent-src/rules/doc-screenshot-hygiene.md +2 -0
- package/dist/agent-src/rules/docker-commands.md +2 -0
- package/dist/agent-src/rules/domain-adoption-policy.md +2 -0
- package/dist/agent-src/rules/domain-safety-disclaimer.md +2 -0
- package/dist/agent-src/rules/domain-safety-pii.md +2 -0
- package/dist/agent-src/rules/domain-safety-retention.md +2 -0
- package/dist/agent-src/rules/downstream-changes.md +2 -0
- package/dist/agent-src/rules/engineering-safety-floor.md +2 -0
- package/dist/agent-src/rules/evaluator-independence.md +14 -3
- package/dist/agent-src/rules/external-code-graph-interop.md +4 -1
- package/dist/agent-src/rules/external-reference-deep-dive.md +2 -0
- package/dist/agent-src/rules/fast-path-marker-visibility.md +2 -0
- package/dist/agent-src/rules/finance-safety-floor.md +3 -1
- package/dist/agent-src/rules/framework-neutrality-in-generic-skills.md +2 -0
- package/dist/agent-src/rules/git-history-discipline.md +3 -1
- package/dist/agent-src/rules/guidelines.md +2 -0
- package/dist/agent-src/rules/history-discipline.md +5 -1
- package/dist/agent-src/rules/icon-consistency.md +2 -0
- package/dist/agent-src/rules/image-likeness-and-rights.md +2 -0
- package/dist/agent-src/rules/improve-before-implement.md +2 -0
- package/dist/agent-src/rules/invite-challenge.md +2 -0
- package/dist/agent-src/rules/laravel-routing.md +2 -0
- package/dist/agent-src/rules/laravel-translations.md +2 -0
- package/dist/agent-src/rules/legal-safety-floor.md +3 -1
- package/dist/agent-src/rules/lethal-trifecta-guard.md +2 -0
- package/dist/agent-src/rules/linked-projects-onboarding-gate.md +2 -0
- package/dist/agent-src/rules/low-impact-corpus-privacy-floor.md +2 -0
- package/dist/agent-src/rules/markdown-safe-codeblocks.md +2 -0
- package/dist/agent-src/rules/media-governance-routing.md +2 -0
- package/dist/agent-src/rules/media-sync-ground-truth.md +2 -0
- package/dist/agent-src/rules/minimal-safe-diff.md +2 -0
- package/dist/agent-src/rules/missing-tool-handling.md +2 -0
- package/dist/agent-src/rules/model-recommendation.md +2 -0
- package/dist/agent-src/rules/no-attribution-footers.md +2 -0
- package/dist/agent-src/rules/no-decorative-emojis-in-git-surfaces.md +2 -0
- package/dist/agent-src/rules/no-pr-progress-comments.md +5 -1
- package/dist/agent-src/rules/no-roadmap-references.md +2 -0
- package/dist/agent-src/rules/notes-first-reasoning.md +2 -0
- package/dist/agent-src/rules/onboarding-gate.md +5 -1
- package/dist/agent-src/rules/output-discipline.md +2 -0
- package/dist/agent-src/rules/package-ci-checks.md +2 -0
- package/dist/agent-src/rules/persona-governance.md +2 -0
- package/dist/agent-src/rules/php-coding.md +2 -0
- package/dist/agent-src/rules/prefer-enums-over-literals.md +2 -0
- package/dist/agent-src/rules/preservation-guard.md +2 -0
- package/dist/agent-src/rules/provider-lifecycle-discipline.md +2 -0
- package/dist/agent-src/rules/question-not-instruction.md +2 -0
- package/dist/agent-src/rules/reviewer-awareness.md +2 -0
- package/dist/agent-src/rules/roadmap-ci-steps-policy.md +6 -1
- package/dist/agent-src/rules/roadmap-progress-sync.md +2 -0
- package/dist/agent-src/rules/role-mode-adherence.md +3 -1
- package/dist/agent-src/rules/rule-type-governance.md +2 -0
- package/dist/agent-src/rules/runtime-safety.md +2 -0
- package/dist/agent-src/rules/scale-discipline.md +5 -1
- package/dist/agent-src/rules/secret-vcs-guard.md +2 -0
- package/dist/agent-src/rules/security-sensitive-stop.md +2 -0
- package/dist/agent-src/rules/self-repair-loop.md +103 -0
- package/dist/agent-src/rules/senior-engineering-discipline.md +2 -0
- package/dist/agent-src/rules/session-canary.md +62 -19
- package/dist/agent-src/rules/settings-ask-protocol.md +4 -0
- package/dist/agent-src/rules/size-enforcement.md +2 -0
- package/dist/agent-src/rules/skill-improvement-trigger.md +2 -0
- package/dist/agent-src/rules/skill-quality.md +2 -0
- package/dist/agent-src/rules/slash-command-routing-policy.md +2 -0
- package/dist/agent-src/rules/source-confidentiality.md +2 -0
- package/dist/agent-src/rules/source-discovery-gate.md +2 -0
- package/dist/agent-src/rules/source-of-truth.md +2 -0
- package/dist/agent-src/rules/spreadsheet-source-quality.md +2 -0
- package/dist/agent-src/rules/strategy-safety-floor.md +3 -1
- package/dist/agent-src/rules/symfony-routing.md +2 -0
- package/dist/agent-src/rules/think-before-action.md +2 -0
- package/dist/agent-src/rules/token-budget-discipline.md +5 -1
- package/dist/agent-src/rules/token-efficiency.md +2 -0
- package/dist/agent-src/rules/token-optimizer-maintenance.md +2 -0
- package/dist/agent-src/rules/tool-safety.md +7 -1
- package/dist/agent-src/rules/ui-audit-gate.md +4 -0
- package/dist/agent-src/rules/untrusted-input-defense.md +2 -0
- package/dist/agent-src/rules/upstream-proposal.md +2 -0
- package/dist/agent-src/rules/user-interaction.md +2 -0
- package/dist/agent-src/rules/user-interrupt-priority.md +2 -0
- package/dist/agent-src/skills/adversarial-review/SKILL.md +1 -1
- package/dist/agent-src/skills/analysis-autonomous-mode/SKILL.md +1 -1
- package/dist/agent-src/skills/performance-analysis/SKILL.md +1 -1
- package/dist/agent-src/skills/persona-improvement/SKILL.md +1 -1
- package/dist/agent-src/skills/project-analyzer/SKILL.md +1 -1
- package/dist/agent-src/skills/security-audit/SKILL.md +1 -1
- package/dist/agent-src/skills/sequential-thinking/SKILL.md +1 -1
- package/dist/agent-src/skills/skill-improvement-pipeline/SKILL.md +1 -1
- package/dist/agent-src/skills/universal-project-analysis/SKILL.md +1 -1
- package/dist/agent-src/templates/AGENTS.md +6 -10
- package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/dist/cli/registry.js +9 -0
- package/dist/cli/registry.js.map +1 -1
- package/dist/cli-delegate/chunk-22GCIJ2O.js +270 -0
- package/dist/cli-delegate/{chunk-BSLUHV2F.js → chunk-2BE5I2MN.js} +156 -141
- package/dist/cli-delegate/{chunk-AIIUU73N.js → chunk-7OMQCH4V.js} +1 -1
- package/dist/cli-delegate/{chunk-HJ6DAJHR.js → chunk-GB2FSUEE.js} +57 -7
- package/dist/cli-delegate/{chunk-WR6GTRHJ.js → chunk-JXARCGVN.js} +3 -3
- package/dist/cli-delegate/{chunk-SJQMJI7M.js → chunk-PQSAQKHW.js} +467 -305
- package/dist/cli-delegate/chunk-REKCMYOU.js +2991 -0
- package/dist/cli-delegate/cmd_analyze_session.js +1 -1
- package/dist/cli-delegate/cmd_brand_status.js +134 -0
- package/dist/cli-delegate/cmd_conformance.js +7 -7
- package/dist/cli-delegate/cmd_converge.js +3 -3
- package/dist/cli-delegate/cmd_doctor.js +4 -4
- package/dist/cli-delegate/cmd_explain.js +80 -330
- package/dist/cli-delegate/cmd_export.js +5 -5
- package/dist/cli-delegate/cmd_fleet.js +3 -3
- package/dist/cli-delegate/cmd_handoff.js +2 -2
- package/dist/cli-delegate/cmd_mcp_available.js +433 -0
- package/dist/cli-delegate/cmd_migrate.js +3 -3
- package/dist/cli-delegate/cmd_packs_active.js +153 -0
- package/dist/cli-delegate/cmd_preflight.js +1 -1
- package/dist/cli-delegate/cmd_prune.js +5 -5
- package/dist/cli-delegate/cmd_route_audit.js +8 -8
- package/dist/cli-delegate/cmd_route_explain.js +4 -4
- package/dist/cli-delegate/cmd_settings_get.js +272 -0
- package/dist/cli-delegate/cmd_settings_migrate.js +5 -5
- package/dist/cli-delegate/cmd_settings_set.js +7 -2967
- package/dist/cli-delegate/cmd_sync.js +5 -5
- package/dist/cli-delegate/cmd_uninstall.js +5 -5
- package/dist/cli-delegate/cmd_update.js +4 -4
- package/dist/cli-delegate/cmd_upgrade.js +4 -4
- package/dist/cli-delegate/cmd_validate.js +5 -5
- package/dist/cli-delegate/cmd_versions.js +4 -4
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +184 -124
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +3 -3
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +7 -5
- package/dist/discovery/trust-report.md +11 -11
- package/dist/discovery/workspaces.json +6 -4
- package/dist/hooks/dispatch.js +9080 -5701
- package/dist/install/install.mjs +698 -508
- package/dist/mcp/registry-manifest.json +3 -3
- package/dist/mcp/server.json +2 -2
- package/dist/mcp/server.mjs +698 -437
- package/dist/router.json +1 -1
- package/dist/scripts/_lib/agent_settings.js +80 -15
- package/dist/scripts/_lib/agent_settings.js.map +1 -1
- package/dist/scripts/condense.js +33 -2
- package/dist/scripts/condense.js.map +1 -1
- package/dist/server/io/yamlIO.js +85 -0
- package/dist/server/io/yamlIO.js.map +1 -1
- package/dist/server/routes/settings.js +1 -12
- package/dist/server/routes/settings.js.map +1 -1
- package/dist/server/routes/wizard.js +52 -2
- package/dist/server/routes/wizard.js.map +1 -1
- package/dist/shared/settingsCarveOut.js +118 -0
- package/dist/shared/settingsCarveOut.js.map +1 -0
- package/dist/shared/settingsSurface.js +7 -1
- package/dist/shared/settingsSurface.js.map +1 -1
- package/dist/ui/assets/index-DmR0mbk4.js.map +1 -1
- package/docs/contracts/settings-classes.md +29 -8
- package/docs/guidelines/agent-infra/memory-access.md +14 -3
- package/package.json +1 -1
- package/src/agent-src/templates/AGENTS.md +6 -10
- package/src/config/budgets.yml +29 -0
- package/src/config/evaluator-budgets.json +4 -4
- package/src/config/gate-coverage.yml +26 -0
- package/src/scripts/_cli/cmd_brand_status.ts +174 -0
- package/src/scripts/_cli/cmd_doctor.ts +6 -21
- package/src/scripts/_cli/cmd_mcp_available.ts +266 -0
- package/src/scripts/_cli/cmd_packs_active.ts +225 -0
- package/src/scripts/_cli/cmd_settings_get.ts +324 -0
- package/src/scripts/_dispatch.bash +75 -0
- package/src/scripts/_lib/agent_settings.ts +82 -16
- package/src/scripts/_lib/carrier_divergence.ts +135 -0
- package/src/scripts/_lib/git_common_dir.ts +128 -0
- package/src/scripts/_lib/host_capability.ts +84 -1
- package/src/scripts/_lib/obligation_frequency.ts +391 -0
- package/src/scripts/_lib/prompt_shape.ts +88 -0
- package/src/scripts/_lib/review_skipped_record.ts +102 -0
- package/src/scripts/_lib/rule_layer_overlap.ts +254 -0
- package/src/scripts/_lib/self_repair.ts +342 -0
- package/src/scripts/_lib/self_repair_store.ts +100 -0
- package/src/scripts/_lib/session_register.ts +361 -0
- package/src/scripts/_lib/transcript_entry.ts +80 -0
- package/src/scripts/check_branch_freshness.ts +255 -0
- package/src/scripts/check_council_config_location.ts +125 -1
- package/src/scripts/check_enforcement_coverage.ts +192 -7
- package/src/scripts/check_rule_projection_integrity.ts +364 -0
- package/src/scripts/check_standing_rule_delivery.ts +314 -0
- package/src/scripts/condense.ts +36 -2
- package/src/scripts/config/profiles.ts +13 -3
- package/src/scripts/conformance_scan.ts +307 -24
- package/src/scripts/council_availability_hook.ts +188 -0
- package/src/scripts/council_cli.ts +126 -7
- package/src/scripts/generate_settings_reference.ts +232 -0
- package/src/scripts/hook_manifest.yaml +155 -33
- package/src/scripts/hooks/block_no_verify.ts +95 -3
- package/src/scripts/hooks/block_unauthorized_git.ts +217 -2
- package/src/scripts/hooks/concern_registry.ts +12 -0
- package/src/scripts/hooks/delegation_nudge_hook.ts +450 -0
- package/src/scripts/hooks/end_review_nudge_hook.ts +726 -0
- package/src/scripts/hooks/orchestration_record_hook.ts +342 -0
- package/src/scripts/install.ts +151 -0
- package/src/scripts/language_mirror_hook.ts +49 -6
- package/src/scripts/measure_scope_dedup.ts +19 -13
- package/src/scripts/onboarding_gate_hook.ts +40 -1
- package/src/scripts/orchestration_backfill.ts +354 -0
- package/src/scripts/orchestration_record.ts +4 -1
- package/src/scripts/preamble_byte_census.ts +9 -20
- package/src/scripts/release.ts +142 -36
- package/src/scripts/report_carrier_divergence.ts +364 -0
- package/src/scripts/report_skill_activation.ts +257 -0
- package/src/scripts/report_skill_obligation_violations.ts +579 -0
- package/src/scripts/routing_doctor.ts +77 -6
- package/src/scripts/schemas/rule.schema.json +5 -0
- package/src/scripts/self_repair_cli.ts +240 -0
- package/src/scripts/self_repair_hook.ts +241 -0
- package/src/scripts/session_canary_hook.ts +35 -3
- package/src/scripts/session_register_hook.ts +288 -0
- package/src/scripts/sessions_cli.ts +140 -0
- package/src/scripts/validate_frontmatter.ts +68 -0
- package/src/server/io/yamlIO.ts +87 -0
- package/src/shared/settingsCarveOut.ts +143 -0
- package/src/shared/settingsSurface.ts +7 -1
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The always-written carve-out set for the sparse settings file.
|
|
3
|
+
*
|
|
4
|
+
* `road-to-zero-ceremony-settings` Phase 3. The user's global settings file
|
|
5
|
+
* becomes a sparse record of decisions actually made, which is safe only while
|
|
6
|
+
* *key absent* resolves exactly like *key set to the template default*.
|
|
7
|
+
*
|
|
8
|
+
* An audit of every reader found that is NOT universally true. For the keys
|
|
9
|
+
* below a reader deliberately resolves an absent key to something other than
|
|
10
|
+
* the template's default, so omitting them from a fresh install's file would
|
|
11
|
+
* silently change behaviour. They are written explicitly instead, with their
|
|
12
|
+
* template value, and stamped `package-default` in the provenance sidecar so
|
|
13
|
+
* the file never claims the user decided them.
|
|
14
|
+
*
|
|
15
|
+
* This is the blocker's "carved out" branch. The alternative branch — "fixed at
|
|
16
|
+
* its reader" — was rejected for the `projection.*` family because the
|
|
17
|
+
* divergence there is the documented upgrade-safety contract
|
|
18
|
+
* (`agent-settings.template.yml`: *"a missing key also still means legacy-all,
|
|
19
|
+
* so only fresh installs get the scoped default"*). Changing those readers
|
|
20
|
+
* would flip existing 5.x installs from `legacy-all` to `scoped`, which is the
|
|
21
|
+
* silent narrowing the contract exists to prevent.
|
|
22
|
+
*
|
|
23
|
+
* Pure module — no I/O. The VALUES are not duplicated here; only the key paths
|
|
24
|
+
* and the reason. The emitter reads each value out of the template, so this
|
|
25
|
+
* list cannot drift from the defaults it is protecting.
|
|
26
|
+
*
|
|
27
|
+
* @see docs/contracts/settings-classes.md
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/** One key whose absence is not equivalent to its template default. */
|
|
31
|
+
export interface CarveOutKey {
|
|
32
|
+
/** Dotted path into the settings tree. */
|
|
33
|
+
key: string;
|
|
34
|
+
/** The reader that diverges, as `file:line`, so the claim is checkable. */
|
|
35
|
+
reader: string;
|
|
36
|
+
/** What an ABSENT key resolves to at that reader. */
|
|
37
|
+
absentResolvesTo: string;
|
|
38
|
+
/** Why it is carved out rather than fixed at the reader. */
|
|
39
|
+
reason: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export const SETTINGS_CARVE_OUT: readonly CarveOutKey[] = [
|
|
43
|
+
{
|
|
44
|
+
key: 'projection.mode',
|
|
45
|
+
reader: 'src/scripts/install.ts:3409 _resolve_scoped_projection',
|
|
46
|
+
absentResolvesTo: 'legacy-all',
|
|
47
|
+
reason:
|
|
48
|
+
'The template fallback applies only when NO global settings file exists. '
|
|
49
|
+
+ 'Once a file exists, an absent key means legacy-all by documented contract, '
|
|
50
|
+
+ 'so an existing install is never silently narrowed on upgrade.',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
key: 'projection.rule_workspaces',
|
|
54
|
+
reader: 'src/install/rule_scope.ts:96 ruleScopeFromSettings',
|
|
55
|
+
absentResolvesTo: 'null — LEGACY_ALL, i.e. every rule ships including maintainer-only ones',
|
|
56
|
+
reason:
|
|
57
|
+
'Same upgrade contract as projection.mode, and the failure is louder: '
|
|
58
|
+
+ 'an absent list widens the projection instead of narrowing it.',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
key: 'subagents.auto',
|
|
62
|
+
reader: 'src/scripts/routing_doctor.ts:206',
|
|
63
|
+
absentResolvesTo: 'ask',
|
|
64
|
+
reason:
|
|
65
|
+
'The reader falls back to `ask` while the template ships `on`. Carved out '
|
|
66
|
+
+ 'rather than fixed at the reader because the doctor reports what the '
|
|
67
|
+
+ 'RESOLVED configuration is; changing its fallback would make the report '
|
|
68
|
+
+ 'disagree with what the other readers actually do.',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
key: 'discipline_profile',
|
|
72
|
+
reader: 'work_engine/_lib/agent_settings.ts:1263',
|
|
73
|
+
absentResolvesTo: 'essential, unconditionally',
|
|
74
|
+
reason:
|
|
75
|
+
'The template ships `auto`, which resolves to `off` on any measured-null model, '
|
|
76
|
+
+ 'any non-Claude host, and any host exposing no model id. Absent skips that '
|
|
77
|
+
+ 'resolution entirely and loads the essential tier everywhere.',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
key: 'chat_history.frequency',
|
|
81
|
+
reader: 'src/scripts/chat_history.ts:1140',
|
|
82
|
+
absentResolvesTo: 'per_phase',
|
|
83
|
+
reason:
|
|
84
|
+
'Canonical substitution is `per_turn`. Absent gives coarser capture than the '
|
|
85
|
+
+ 'shipped default — an audit-thinning change, which the class contract\'s own '
|
|
86
|
+
+ 'test 8 (what can the attacker HIDE) names as the severe direction.',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
key: 'profile.id',
|
|
90
|
+
reader: 'src/scripts/config/profiles.ts:221 resolve_profile',
|
|
91
|
+
absentResolvesTo:
|
|
92
|
+
'the id `developer`, but a DEGRADED profile — packs: [], personas: [], hints: []',
|
|
93
|
+
reason:
|
|
94
|
+
'Exactly the projection.mode shape: the template default is honoured only when '
|
|
95
|
+
+ 'no settings file exists. With a file present the id resolves but its profile '
|
|
96
|
+
+ 'body does not load, so the install silently loses every pack and persona.',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
key: 'quality.local_auto_run',
|
|
100
|
+
reader: 'src/scripts/lint_roadmap_ci_steps.ts:106',
|
|
101
|
+
absentResolvesTo: 'true — which DISABLES the CI-step gate',
|
|
102
|
+
reason:
|
|
103
|
+
'Inverted polarity, and the most dangerous row in the set: the template ships '
|
|
104
|
+
+ '`false`, which ARMS the gate. Omitting the key would disarm a quality gate '
|
|
105
|
+
+ 'for every fresh install while the reference page says it is on.',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
key: 'onboarding.onboarded',
|
|
109
|
+
reader: 'src/scripts/onboarding_gate_hook.ts:99',
|
|
110
|
+
absentResolvesTo: 'gate skipped, as if onboarding had already completed',
|
|
111
|
+
reason:
|
|
112
|
+
'Absent behaves like `onboarded: true`, not like the template default `false`. '
|
|
113
|
+
+ 'Omitting it would skip the onboarding gate on precisely the fresh installs '
|
|
114
|
+
+ 'the gate exists for.',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
key: 'chat_history.enabled',
|
|
118
|
+
reader: 'src/scripts/chat_history.ts:1025 _read_chat_history_enabled',
|
|
119
|
+
absentResolvesTo: 'false',
|
|
120
|
+
reason:
|
|
121
|
+
'The reader falls back to false while the template ships true. This one is '
|
|
122
|
+
+ 'privacy-shaped: fixing the reader would start recording history for every '
|
|
123
|
+
+ 'install whose file lacks the key. Writing it explicitly keeps the decision '
|
|
124
|
+
+ 'visible in the file the user can read.',
|
|
125
|
+
},
|
|
126
|
+
];
|
|
127
|
+
|
|
128
|
+
/** Just the paths — the emitter iterates these against the template. */
|
|
129
|
+
export function carveOutKeys(): readonly string[] {
|
|
130
|
+
return SETTINGS_CARVE_OUT.map((c) => c.key);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* `projection.*` is additionally stripped from the user-global layer by
|
|
135
|
+
* `load_agent_settings`'s `MERGEABLE_KEYS` whitelist, so `_globalRuleScope`
|
|
136
|
+
* (`src/server/routes/install.ts:234`) resolves LEGACY_ALL whether or not the
|
|
137
|
+
* key is written. That is a pre-existing defect, independent of sparseness —
|
|
138
|
+
* widening the whitelist requires an ADR, per its own comment — and the
|
|
139
|
+
* carve-out neither causes nor fixes it. Recorded so the next reader of this
|
|
140
|
+
* module does not mistake the carve-out for a fix.
|
|
141
|
+
*/
|
|
142
|
+
export const KNOWN_UNFIXED_BY_CARVE_OUT =
|
|
143
|
+
'src/server/routes/install.ts:234 _globalRuleScope — MERGEABLE_KEYS strips projection.*; needs an ADR.';
|
|
@@ -84,7 +84,13 @@ function unwrapRef(root: JsonSchemaNode): JsonSchemaNode {
|
|
|
84
84
|
export function flattenSurface(schema: JsonSchemaNode, version: string): SettingsSurface {
|
|
85
85
|
const entries: Record<string, SurfaceEntry> = {};
|
|
86
86
|
const walk = (node: JsonSchemaNode, prefix: string): void => {
|
|
87
|
-
|
|
87
|
+
// `properties: {}` — a free-form map such as `z.object({}).passthrough()` —
|
|
88
|
+
// is a LEAF, per this function's own contract above. Recursing on the
|
|
89
|
+
// mere presence of the key walked zero children and emitted nothing, so
|
|
90
|
+
// the key vanished from the surface: `subagents.host_capabilities` was
|
|
91
|
+
// classified in the settings contract, present in the template, and
|
|
92
|
+
// absent from every snapshot and upgrade delta.
|
|
93
|
+
if (node.type === 'object' && node.properties !== undefined && Object.keys(node.properties).length > 0) {
|
|
88
94
|
for (const key of Object.keys(node.properties).sort()) {
|
|
89
95
|
const child = node.properties[key] as JsonSchemaNode;
|
|
90
96
|
walk(child, prefix === '' ? key : `${prefix}.${key}`);
|