@event4u/agent-config 9.10.0 → 9.12.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 (142) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +111 -0
  3. package/README.md +20 -16
  4. package/agents/templates/.ai-council.yml.example +481 -0
  5. package/agents/templates/.ai-video.xml.example +247 -0
  6. package/dist/agent-src/commands/fix/ci.md +29 -0
  7. package/dist/agent-src/commands/pr/create.md +60 -0
  8. package/dist/agent-src/contexts/authority/kernel-rule-edits.md +18 -2
  9. package/dist/agent-src/rules/design-fidelity.md +2 -2
  10. package/dist/agent-src/skills/ai-code-blindspots/SKILL.md +1 -0
  11. package/dist/agent-src/skills/design-intelligence/SKILL.md +27 -1
  12. package/dist/agent-src/skills/design-intelligence/data/font-pairings-reference.csv +74 -74
  13. package/dist/agent-src/skills/design-intelligence/data/manifest.json +2 -0
  14. package/dist/agent-src/skills/design-tokens/scripts/tokens.ts +0 -7
  15. package/dist/agent-src/skills/existing-ui-audit/SKILL.md +15 -2
  16. package/dist/agent-src/skills/fe-design/SKILL.md +10 -0
  17. package/dist/agent-src/skills/typography-system/SKILL.md +55 -11
  18. package/dist/agent-src/skills/ui-apply-generic/SKILL.md +180 -0
  19. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  20. package/dist/agent-src/templates/scripts/work_engine/directives/ui/apply.ts +34 -30
  21. package/dist/agent-src/templates/scripts/work_engine/directives/ui/design.ts +88 -33
  22. package/dist/agent-src/templates/scripts/work_engine/directives/ui/polish.ts +23 -0
  23. package/dist/agent-src/templates/scripts/work_engine/directives/ui/review.ts +24 -1
  24. package/dist/agent-src/templates/scripts/work_engine/directives/ui/stack_bundles.ts +332 -0
  25. package/dist/agent-src/templates/scripts/work_engine/stack/detect.ts +449 -11
  26. package/dist/agent-src/templates/scripts/work_engine/state.ts +21 -4
  27. package/dist/cli/initRouting.js +74 -11
  28. package/dist/cli/initRouting.js.map +1 -1
  29. package/dist/cli/main.js +14 -3
  30. package/dist/cli/main.js.map +1 -1
  31. package/dist/cli-delegate/chunk-523HCFYO.js +90 -0
  32. package/dist/cli-delegate/chunk-736JCWLM.js +1104 -0
  33. package/dist/cli-delegate/chunk-7HQ52DHU.js +74 -0
  34. package/dist/cli-delegate/chunk-A3HJ6NTI.js +1084 -0
  35. package/dist/cli-delegate/chunk-EJYIGZ3T.js +125 -0
  36. package/dist/cli-delegate/chunk-FTAISGDQ.js +117 -0
  37. package/dist/cli-delegate/chunk-GME3Q44L.js +82 -0
  38. package/dist/cli-delegate/chunk-GRRPEPRN.js +336 -0
  39. package/dist/cli-delegate/chunk-HJ6DAJHR.js +502 -0
  40. package/dist/cli-delegate/chunk-HYWSRNUX.js +179 -0
  41. package/dist/cli-delegate/chunk-J55WI3RR.js +47 -0
  42. package/dist/cli-delegate/chunk-MCJYCQPF.js +35 -0
  43. package/dist/cli-delegate/chunk-NDJLNC6Q.js +169 -0
  44. package/dist/cli-delegate/chunk-OMIVVCG2.js +26 -0
  45. package/dist/cli-delegate/chunk-OY53J6II.js +7336 -0
  46. package/dist/cli-delegate/chunk-QFKQLQ7X.js +10835 -0
  47. package/dist/cli-delegate/chunk-TEGJU2JX.js +6908 -0
  48. package/dist/cli-delegate/chunk-TJIAM5FW.js +133 -0
  49. package/dist/cli-delegate/chunk-XX6TOPD7.js +715 -0
  50. package/dist/cli-delegate/cmd_analyze_session.js +294 -0
  51. package/dist/cli-delegate/cmd_conformance.js +643 -0
  52. package/dist/cli-delegate/cmd_converge.js +326 -0
  53. package/dist/cli-delegate/cmd_doctor.js +142 -0
  54. package/dist/cli-delegate/cmd_explain.js +2576 -0
  55. package/dist/cli-delegate/cmd_export.js +298 -0
  56. package/dist/cli-delegate/cmd_fleet.js +333 -0
  57. package/dist/cli-delegate/cmd_memory_get.js +3878 -0
  58. package/dist/cli-delegate/cmd_migrate.js +11 -0
  59. package/dist/cli-delegate/cmd_preflight.js +153 -0
  60. package/dist/cli-delegate/cmd_prune.js +446 -0
  61. package/dist/cli-delegate/cmd_refresh.js +28 -0
  62. package/dist/cli-delegate/cmd_settings_check.js +574 -0
  63. package/dist/cli-delegate/cmd_settings_migrate.js +225 -0
  64. package/dist/cli-delegate/cmd_sync.js +266 -0
  65. package/dist/cli-delegate/cmd_uninstall.js +657 -0
  66. package/dist/cli-delegate/cmd_update.js +425 -0
  67. package/dist/cli-delegate/cmd_upgrade.js +444 -0
  68. package/dist/cli-delegate/cmd_validate.js +307 -0
  69. package/dist/cli-delegate/cmd_versions.js +370 -0
  70. package/dist/discovery/deprecation-report.md +1 -1
  71. package/dist/discovery/discovery-manifest.json +45 -16
  72. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  73. package/dist/discovery/discovery-manifest.summary.md +3 -3
  74. package/dist/discovery/orphan-report.md +1 -1
  75. package/dist/discovery/packs.json +13 -7
  76. package/dist/discovery/trust-report.md +2 -2
  77. package/dist/discovery/workspaces.json +6 -4
  78. package/dist/install/emit_host_rules_cli.js +2 -1
  79. package/dist/install/emit_host_rules_cli.js.map +1 -1
  80. package/dist/install/install.mjs +634 -409
  81. package/dist/install/ruleInScope.js +123 -0
  82. package/dist/install/ruleInScope.js.map +1 -0
  83. package/dist/install/rule_scope.js +7 -3
  84. package/dist/install/rule_scope.js.map +1 -1
  85. package/dist/install/toolDetection.js +40 -12
  86. package/dist/install/toolDetection.js.map +1 -1
  87. package/dist/install/wizard-plan.js +12 -3
  88. package/dist/install/wizard-plan.js.map +1 -1
  89. package/dist/mcp/registry-manifest.json +3 -3
  90. package/dist/mcp/server.json +2 -2
  91. package/dist/mcp/server.mjs +1553 -2728
  92. package/dist/router.json +1 -1
  93. package/dist/scripts/condense.js +6 -22
  94. package/dist/scripts/condense.js.map +1 -1
  95. package/docs/guidelines/design-fidelity-mechanics.md +14 -0
  96. package/package.json +4 -2
  97. package/src/agent-src/templates/scripts/work_engine/directives/ui/apply.ts +34 -30
  98. package/src/agent-src/templates/scripts/work_engine/directives/ui/design.ts +88 -33
  99. package/src/agent-src/templates/scripts/work_engine/directives/ui/polish.ts +23 -0
  100. package/src/agent-src/templates/scripts/work_engine/directives/ui/review.ts +24 -1
  101. package/src/agent-src/templates/scripts/work_engine/directives/ui/stack_bundles.ts +332 -0
  102. package/src/agent-src/templates/scripts/work_engine/stack/detect.ts +449 -11
  103. package/src/agent-src/templates/scripts/work_engine/state.ts +21 -4
  104. package/src/config/discovery/packs.yml +7 -0
  105. package/src/config/evaluator-budgets.json +1 -1
  106. package/src/config/pack-size-budget.json +27 -0
  107. package/src/install/emit_host_rules_cli.ts +2 -1
  108. package/src/install/ruleInScope.ts +133 -0
  109. package/src/install/rule_scope.ts +7 -3
  110. package/src/install/toolDetection.ts +39 -8
  111. package/src/install/wizard-plan.ts +13 -3
  112. package/src/scripts/_cli/cmd_conformance.ts +2 -1
  113. package/src/scripts/_cli/cmd_converge.ts +2 -1
  114. package/src/scripts/_cli/cmd_doctor.ts +214 -13
  115. package/src/scripts/_cli/cmd_export.ts +2 -1
  116. package/src/scripts/_cli/cmd_fleet.ts +2 -1
  117. package/src/scripts/_cli/cmd_migrate.ts +2 -1
  118. package/src/scripts/_cli/cmd_preflight.ts +2 -1
  119. package/src/scripts/_cli/cmd_refresh.ts +2 -1
  120. package/src/scripts/_cli/cmd_update.ts +2 -1
  121. package/src/scripts/_cli/cmd_upgrade.ts +2 -1
  122. package/src/scripts/_cli/cmd_versions.ts +2 -1
  123. package/src/scripts/_cli/detection_report.ts +480 -0
  124. package/src/scripts/_dispatch.bash +52 -14
  125. package/src/scripts/_lib/changelog_eras.ts +103 -9
  126. package/src/scripts/_lib/environment_detector.ts +441 -0
  127. package/src/scripts/_lib/global_deploy_inventory.ts +38 -2
  128. package/src/scripts/_lib/package_root.ts +72 -0
  129. package/src/scripts/ai_council/config.ts +15 -7
  130. package/src/scripts/ai_council/modes.ts +68 -2
  131. package/src/scripts/ai_council/transport_resolver.ts +331 -0
  132. package/src/scripts/check_bundle_path_leakage.ts +10 -4
  133. package/src/scripts/check_dependency_floors.ts +153 -0
  134. package/src/scripts/check_installer_import_purity.ts +295 -0
  135. package/src/scripts/check_pack_size.ts +188 -0
  136. package/src/scripts/condense.ts +7 -28
  137. package/src/scripts/council_cli.ts +6 -2
  138. package/src/scripts/evaluator_umbrella.sh +34 -1
  139. package/src/scripts/install-hooks.sh +36 -4
  140. package/src/scripts/install.ts +210 -5
  141. package/src/scripts/lint_eval_fixture_citations.ts +113 -0
  142. package/src/scripts/lint_ui_stack_bundles.ts +201 -0
@@ -0,0 +1,47 @@
1
+ import { createRequire as __acCreateRequire } from 'node:module'; const require = globalThis.require ?? __acCreateRequire(import.meta.url);
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
9
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
10
+ }) : x)(function(x) {
11
+ if (typeof require !== "undefined") return require.apply(this, arguments);
12
+ throw Error('Dynamic require of "' + x + '" is not supported');
13
+ });
14
+ var __commonJS = (cb, mod) => function __require2() {
15
+ try {
16
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
17
+ } catch (e) {
18
+ throw mod = 0, e;
19
+ }
20
+ };
21
+ var __export = (target, all) => {
22
+ for (var name in all)
23
+ __defProp(target, name, { get: all[name], enumerable: true });
24
+ };
25
+ var __copyProps = (to, from, except, desc) => {
26
+ if (from && typeof from === "object" || typeof from === "function") {
27
+ for (let key of __getOwnPropNames(from))
28
+ if (!__hasOwnProp.call(to, key) && key !== except)
29
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
30
+ }
31
+ return to;
32
+ };
33
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
34
+ // If the importer is in node compatibility mode or this is not an ESM
35
+ // file that has been converted to a CommonJS file using a Babel-
36
+ // compatible transform (i.e. "__esModule" has not been set), then set
37
+ // "default" to the CommonJS "module.exports" for node compatibility.
38
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
39
+ mod
40
+ ));
41
+
42
+ export {
43
+ __require,
44
+ __commonJS,
45
+ __export,
46
+ __toESM
47
+ };
@@ -0,0 +1,35 @@
1
+ import { createRequire as __acCreateRequire } from 'node:module'; const require = globalThis.require ?? __acCreateRequire(import.meta.url);
2
+
3
+ // src/scripts/_lib/package_root.ts
4
+ import * as fs from "node:fs";
5
+ import * as path from "node:path";
6
+ import { fileURLToPath } from "node:url";
7
+ var PACKAGE_NAME = "@event4u/agent-config";
8
+ var MAX_ASCENT = 16;
9
+ function resolvePackageRoot(fromUrlOrPath, legacyHops = 3) {
10
+ const start = fromUrlOrPath.startsWith("file:") ? fileURLToPath(fromUrlOrPath) : fromUrlOrPath;
11
+ const startDir = path.dirname(start);
12
+ let dir = startDir;
13
+ for (let i = 0; i < MAX_ASCENT; i++) {
14
+ const manifest = path.join(dir, "package.json");
15
+ if (fs.existsSync(manifest)) {
16
+ try {
17
+ const parsed = JSON.parse(fs.readFileSync(manifest, "utf8"));
18
+ if (parsed.name === PACKAGE_NAME) {
19
+ return dir;
20
+ }
21
+ } catch {
22
+ }
23
+ }
24
+ const parent = path.dirname(dir);
25
+ if (parent === dir) {
26
+ break;
27
+ }
28
+ dir = parent;
29
+ }
30
+ return path.resolve(startDir, ...Array.from({ length: legacyHops }, () => ".."));
31
+ }
32
+
33
+ export {
34
+ resolvePackageRoot
35
+ };
@@ -0,0 +1,169 @@
1
+ import { createRequire as __acCreateRequire } from 'node:module'; const require = globalThis.require ?? __acCreateRequire(import.meta.url);
2
+
3
+ // src/scripts/_lib/user_global_paths.ts
4
+ import * as fs from "node:fs";
5
+ import * as os from "node:os";
6
+ import * as path from "node:path";
7
+ var _PARTIAL_SUFFIX = ".event4u-partial-";
8
+ var EVENT4U_HOME_ENV = "EVENT4U_CONFIG_HOME";
9
+ var DEFAULT_EVENT4U_ROOT_RELATIVE = path.join(".event4u", "agent-config");
10
+ var LEGACY_XDG_ROOT_RELATIVE = path.join(".config", "agent-config");
11
+ function expanduser(p) {
12
+ if (p === "~") {
13
+ return os.homedir();
14
+ }
15
+ if (p.startsWith("~/") || process.platform === "win32" && p.startsWith("~\\")) {
16
+ return path.join(os.homedir(), p.slice(2));
17
+ }
18
+ return p;
19
+ }
20
+ function is_absolute_like_python(p) {
21
+ if (process.platform === "win32") {
22
+ return /^[a-zA-Z]:[\\/]/.test(p) || /^([\\/]{2})[^\\/]+[\\/][^\\/]+/.test(p);
23
+ }
24
+ return p.startsWith("/");
25
+ }
26
+ function event4u_root(env) {
27
+ const env_map = env ?? process.env;
28
+ const override = env_map[EVENT4U_HOME_ENV];
29
+ if (override) {
30
+ return expanduser(override);
31
+ }
32
+ return path.join(os.homedir(), DEFAULT_EVENT4U_ROOT_RELATIVE);
33
+ }
34
+ function legacy_xdg_root() {
35
+ return path.join(os.homedir(), LEGACY_XDG_ROOT_RELATIVE);
36
+ }
37
+ function resolve_with_fallback(relative_name, options = {}) {
38
+ if (is_absolute_like_python(relative_name)) {
39
+ throw new Error(
40
+ `resolve_with_fallback expects a relative path, got '${relative_name}'`
41
+ );
42
+ }
43
+ const new_path = path.join(event4u_root(options.env ?? null), relative_name);
44
+ if (fs.existsSync(new_path)) {
45
+ return new_path;
46
+ }
47
+ const legacy_path = path.join(legacy_xdg_root(), relative_name);
48
+ if (fs.existsSync(legacy_path)) {
49
+ return legacy_path;
50
+ }
51
+ return null;
52
+ }
53
+ function write_target(relative_name, options = {}) {
54
+ if (is_absolute_like_python(relative_name)) {
55
+ throw new Error(`write_target expects a relative path, got '${relative_name}'`);
56
+ }
57
+ return path.join(event4u_root(options.env ?? null), relative_name);
58
+ }
59
+ var MIGRATION_BREADCRUMB_NAME = "MIGRATED.md";
60
+ var _BREADCRUMB_TEMPLATE = `# Migrated to \`~/.event4u/agent-config/\`
61
+
62
+ This directory (\`~/.config/agent-config/\`) is the **legacy** location
63
+ for \`event4u/agent-config\` user-global state. As of v2.4 the canonical
64
+ location is \`~/.event4u/agent-config/\`.
65
+
66
+ The migration shim has already copied your settings, keys, lockfiles,
67
+ and overrides into the new namespace. File modes (0600 on keys) were
68
+ preserved. Loaders prefer the new path but still read from this tree
69
+ as a fallback, so removing it is safe **once you've confirmed** the
70
+ new location is working.
71
+
72
+ ## To clean up
73
+
74
+ \`\`\`bash
75
+ rm -rf ~/.config/agent-config
76
+ \`\`\`
77
+
78
+ ## Why the move
79
+
80
+ \`~/.config/\` is a generic XDG-shaped directory shared by many tools.
81
+ \`~/.event4u/agent-config/\` is vendor-namespaced and avoids collisions
82
+ with unrelated CLIs. See
83
+ \`agents/roadmaps/road-to-event4u-namespace-and-claude-desktop.md\` for
84
+ the full rationale.
85
+ `;
86
+ function migrate_legacy_namespace(options = {}) {
87
+ const legacy_root = options.legacy_root_override ?? legacy_xdg_root();
88
+ const new_root = event4u_root(options.env ?? null);
89
+ let legacy_stat;
90
+ try {
91
+ legacy_stat = fs.statSync(legacy_root);
92
+ } catch {
93
+ return false;
94
+ }
95
+ if (!legacy_stat.isDirectory()) {
96
+ return false;
97
+ }
98
+ const legacy_entries = fs.readdirSync(legacy_root).filter((name) => name !== MIGRATION_BREADCRUMB_NAME);
99
+ if (legacy_entries.length === 0) {
100
+ return false;
101
+ }
102
+ const new_has_content = fs.existsSync(new_root) && fs.readdirSync(new_root).some((name) => !_is_partial_name(name));
103
+ if (new_has_content) {
104
+ _ensure_breadcrumb(legacy_root);
105
+ return false;
106
+ }
107
+ fs.mkdirSync(new_root, { recursive: true });
108
+ _purge_partial_entries(new_root);
109
+ for (const name of legacy_entries) {
110
+ const entry = path.join(legacy_root, name);
111
+ const target = path.join(new_root, name);
112
+ if (fs.existsSync(target)) {
113
+ continue;
114
+ }
115
+ const staging = path.join(new_root, `${name}${_PARTIAL_SUFFIX}${process.pid}`);
116
+ if (fs.existsSync(staging)) {
117
+ _remove_path(staging);
118
+ }
119
+ if (fs.statSync(entry).isDirectory()) {
120
+ fs.cpSync(entry, staging, { recursive: true, preserveTimestamps: true });
121
+ } else {
122
+ fs.copyFileSync(entry, staging);
123
+ const src_stat = fs.statSync(entry);
124
+ fs.chmodSync(staging, src_stat.mode & 4095);
125
+ fs.utimesSync(staging, src_stat.atime, src_stat.mtime);
126
+ }
127
+ fs.renameSync(staging, target);
128
+ }
129
+ _ensure_breadcrumb(legacy_root);
130
+ return true;
131
+ }
132
+ function _is_partial_name(name) {
133
+ return name.includes(_PARTIAL_SUFFIX);
134
+ }
135
+ function _purge_partial_entries(new_root) {
136
+ for (const name of fs.readdirSync(new_root)) {
137
+ if (_is_partial_name(name)) {
138
+ _remove_path(path.join(new_root, name));
139
+ }
140
+ }
141
+ }
142
+ function _remove_path(p) {
143
+ let st = null;
144
+ try {
145
+ st = fs.lstatSync(p);
146
+ } catch {
147
+ return;
148
+ }
149
+ if (st.isDirectory() && !st.isSymbolicLink()) {
150
+ fs.rmSync(p, { recursive: true });
151
+ } else {
152
+ fs.rmSync(p, { force: true });
153
+ }
154
+ }
155
+ function _ensure_breadcrumb(legacy_root) {
156
+ const breadcrumb = path.join(legacy_root, MIGRATION_BREADCRUMB_NAME);
157
+ if (fs.existsSync(breadcrumb)) {
158
+ return;
159
+ }
160
+ fs.writeFileSync(breadcrumb, _BREADCRUMB_TEMPLATE, "utf-8");
161
+ }
162
+
163
+ export {
164
+ event4u_root,
165
+ legacy_xdg_root,
166
+ resolve_with_fallback,
167
+ write_target,
168
+ migrate_legacy_namespace
169
+ };
@@ -0,0 +1,26 @@
1
+ import { createRequire as __acCreateRequire } from 'node:module'; const require = globalThis.require ?? __acCreateRequire(import.meta.url);
2
+
3
+ // src/install/detect.ts
4
+ import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
5
+ import { join, resolve } from "node:path";
6
+ function detectToolPresence(root) {
7
+ return {
8
+ augment: isDir(join(root, ".augment")),
9
+ claude: isDir(join(root, ".claude")),
10
+ cursor: isDir(join(root, ".cursor")),
11
+ cline: isDir(join(root, ".clinerules")),
12
+ windsurf: isDir(join(root, ".windsurf")) || existsSync(join(root, ".windsurfrules")),
13
+ agentsMd: existsSync(join(root, "AGENTS.md"))
14
+ };
15
+ }
16
+ function isDir(path) {
17
+ try {
18
+ return statSync(path).isDirectory();
19
+ } catch {
20
+ return false;
21
+ }
22
+ }
23
+
24
+ export {
25
+ detectToolPresence
26
+ };