@webpresso/agent-kit 3.3.3 → 3.3.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.
Files changed (156) hide show
  1. package/THIRD-PARTY-NOTICES.md +12 -10
  2. package/catalog/agent/rules/changeset-release.md +15 -4
  3. package/catalog/agent/rules/managed-tool-binaries.md +67 -0
  4. package/catalog/agent/rules/parallel-orchestration-quota.md +99 -1
  5. package/catalog/agent/rules/pre-implementation.md +36 -20
  6. package/catalog/agent/rules/rtk-routing.md +22 -16
  7. package/catalog/agent/skills/autopilot/SKILL.md +4 -3
  8. package/catalog/agent/skills/ultragoal/SKILL.md +11 -9
  9. package/dist/esm/audit/agents.js +126 -26
  10. package/dist/esm/audit/hook-surface.js +5 -1
  11. package/dist/esm/audit/repo-guardrails.d.ts +8 -0
  12. package/dist/esm/audit/repo-guardrails.js +71 -1
  13. package/dist/esm/blueprint/core/parser.js +38 -12
  14. package/dist/esm/blueprint/execution/artifacts.js +8 -4
  15. package/dist/esm/blueprint/execution/frontmatter-keys.d.ts +17 -0
  16. package/dist/esm/blueprint/execution/frontmatter-keys.js +24 -0
  17. package/dist/esm/blueprint/execution/metadata.js +8 -4
  18. package/dist/esm/blueprint/lifecycle/audit.d.ts +21 -0
  19. package/dist/esm/blueprint/lifecycle/audit.js +89 -3
  20. package/dist/esm/blueprint/lifecycle/review-provenance.js +63 -10
  21. package/dist/esm/blueprint/lifecycle/rollout-anchor.d.ts +22 -0
  22. package/dist/esm/blueprint/lifecycle/rollout-anchor.js +37 -1
  23. package/dist/esm/blueprint/markdown/blocked-line.d.ts +49 -0
  24. package/dist/esm/blueprint/markdown/blocked-line.js +63 -0
  25. package/dist/esm/blueprint/markdown/helpers.js +10 -4
  26. package/dist/esm/blueprint/tracked-document/parser.js +3 -3
  27. package/dist/esm/blueprint/trust/dossier.js +41 -1
  28. package/dist/esm/blueprint/trust/gate-row.d.ts +55 -0
  29. package/dist/esm/blueprint/trust/gate-row.js +113 -0
  30. package/dist/esm/blueprint/trust/promotion.d.ts +17 -0
  31. package/dist/esm/blueprint/trust/promotion.js +19 -19
  32. package/dist/esm/build/atomic-file-copy.d.ts +32 -0
  33. package/dist/esm/build/atomic-file-copy.js +44 -0
  34. package/dist/esm/build/vendor-oxlint-plugins.d.ts +11 -0
  35. package/dist/esm/build/vendor-oxlint-plugins.js +48 -0
  36. package/dist/esm/cli/commands/blueprint/mutations.d.ts +15 -0
  37. package/dist/esm/cli/commands/blueprint/mutations.js +8 -2
  38. package/dist/esm/cli/commands/compile.d.ts +13 -0
  39. package/dist/esm/cli/commands/compile.js +182 -62
  40. package/dist/esm/cli/commands/format.js +17 -1
  41. package/dist/esm/cli/commands/gain/index.js +10 -3
  42. package/dist/esm/cli/commands/init/gitignore-patcher.js +6 -0
  43. package/dist/esm/cli/commands/init/index.js +32 -52
  44. package/dist/esm/cli/commands/init/mcp-spec.d.ts +48 -13
  45. package/dist/esm/cli/commands/init/mcp-spec.js +86 -30
  46. package/dist/esm/cli/commands/init/merge.js +30 -10
  47. package/dist/esm/cli/commands/init/scaffolders/codex-mcp/index.d.ts +56 -31
  48. package/dist/esm/cli/commands/init/scaffolders/codex-mcp/index.js +180 -43
  49. package/dist/esm/cli/commands/init/scaffolders/rtk/index.d.ts +17 -5
  50. package/dist/esm/cli/commands/init/scaffolders/rtk/index.js +56 -75
  51. package/dist/esm/cli/commands/init/scaffolders/runtime-check/index.js +7 -6
  52. package/dist/esm/cli/commands/init/untracked-collision.d.ts +12 -1
  53. package/dist/esm/cli/commands/init/untracked-collision.js +23 -1
  54. package/dist/esm/cli/commands/pr-help.js +1 -1
  55. package/dist/esm/cli/commands/pr.js +18 -4
  56. package/dist/esm/cli/commands/review.d.ts +1 -0
  57. package/dist/esm/cli/commands/review.js +137 -7
  58. package/dist/esm/cli/commands/sync.d.ts +8 -6
  59. package/dist/esm/cli/commands/sync.js +11 -9
  60. package/dist/esm/cli/commands/worktree/router-dispatch.d.ts +24 -2
  61. package/dist/esm/cli/commands/worktree/router-dispatch.js +80 -48
  62. package/dist/esm/cli/commands/worktree/router.js +5 -2
  63. package/dist/esm/cli/direct-provider-launch.js +12 -4
  64. package/dist/esm/compiler/flatten.d.ts +10 -1
  65. package/dist/esm/compiler/flatten.js +14 -4
  66. package/dist/esm/compose/admin-blocks-registry-integrity.d.ts +22 -0
  67. package/dist/esm/compose/admin-blocks-registry-integrity.js +90 -0
  68. package/dist/esm/compose/compose.d.ts +8 -0
  69. package/dist/esm/compose/compose.js +115 -8
  70. package/dist/esm/compose/ops-report-schema.js +17 -3
  71. package/dist/esm/compose/registry-resolve.d.ts +17 -0
  72. package/dist/esm/compose/registry-resolve.js +78 -11
  73. package/dist/esm/config/oxlint/graphql-conventions.js +2 -5
  74. package/dist/esm/config/oxlint/import-hygiene.js +21 -8
  75. package/dist/esm/config/oxlint/oxlint-config.fixture.d.ts +1 -1
  76. package/dist/esm/config/oxlint/oxlint-config.fixture.js +2 -3
  77. package/dist/esm/config/oxlint/oxlintrc.d.ts +5 -7
  78. package/dist/esm/config/oxlint/oxlintrc.js +19 -31
  79. package/dist/esm/config/oxlint/path-roles.js +53 -0
  80. package/dist/esm/config/oxlint/query-patterns.js +2 -5
  81. package/dist/esm/content/dispatch.js +4 -0
  82. package/dist/esm/content/loader.d.ts +1 -1
  83. package/dist/esm/content/loader.js +10 -6
  84. package/dist/esm/content/skill-policy.d.ts +11 -0
  85. package/dist/esm/content/skill-policy.js +33 -0
  86. package/dist/esm/daemon/domains/blueprint-exec-ledger.d.ts +86 -0
  87. package/dist/esm/daemon/domains/blueprint-exec-ledger.js +134 -0
  88. package/dist/esm/daemon/domains/blueprint-exec.d.ts +106 -0
  89. package/dist/esm/daemon/domains/blueprint-exec.js +161 -0
  90. package/dist/esm/daemon/domains/launch.d.ts +25 -0
  91. package/dist/esm/daemon/domains/launch.js +30 -1
  92. package/dist/esm/daemon/handlers/blueprints-handlers.d.ts +12 -1
  93. package/dist/esm/daemon/handlers/blueprints-handlers.js +148 -6
  94. package/dist/esm/daemon/handlers/product.d.ts +10 -0
  95. package/dist/esm/daemon/handlers/product.js +10 -1
  96. package/dist/esm/daemon/methods.d.ts +21 -1
  97. package/dist/esm/daemon/methods.js +20 -0
  98. package/dist/esm/daemon/protocol/contract.d.ts +58 -0
  99. package/dist/esm/daemon/protocol/contract.js +38 -0
  100. package/dist/esm/daemon/server.js +7 -0
  101. package/dist/esm/docs-linter/blueprint-plan.js +2 -2
  102. package/dist/esm/errors/wp-error.js +21 -2
  103. package/dist/esm/hooks/doctor.d.ts +11 -0
  104. package/dist/esm/hooks/doctor.js +114 -45
  105. package/dist/esm/hooks/pretool-guard/dev-routing.js +68 -5
  106. package/dist/esm/hooks/pretool-guard/rtk-rewrite.d.ts +24 -0
  107. package/dist/esm/hooks/pretool-guard/rtk-rewrite.js +50 -0
  108. package/dist/esm/hooks/pretool-guard/runner.js +6 -0
  109. package/dist/esm/hooks/pretool-guard/validators/worktree-discipline.js +62 -3
  110. package/dist/esm/hooks/status/index.js +1 -1
  111. package/dist/esm/mcp/blueprint/_shared/lifecycle.js +39 -11
  112. package/dist/esm/mcp/blueprint/handlers/review-log.d.ts +14 -7
  113. package/dist/esm/mcp/blueprint/handlers/review-log.js +46 -22
  114. package/dist/esm/mcp/blueprint/registration.js +1 -1
  115. package/dist/esm/mcp/tools/_shared/redact.d.ts +22 -0
  116. package/dist/esm/mcp/tools/_shared/redact.js +114 -8
  117. package/dist/esm/mcp/tools/gain.js +28 -2
  118. package/dist/esm/mcp/tools/worktree.js +65 -3
  119. package/dist/esm/mcp/tools/wp-ui-compose.js +38 -4
  120. package/dist/esm/mcp/tools/wp-ui-preview.js +14 -7
  121. package/dist/esm/review/authority.js +56 -1
  122. package/dist/esm/review/delivery-verifier.d.ts +4 -0
  123. package/dist/esm/review/delivery-verifier.js +9 -1
  124. package/dist/esm/review/lifecycle-writers.d.ts +76 -0
  125. package/dist/esm/review/lifecycle-writers.js +330 -0
  126. package/dist/esm/review/subject.js +66 -32
  127. package/dist/esm/status/snapshot.d.ts +5 -0
  128. package/dist/esm/status/snapshot.js +27 -2
  129. package/dist/esm/symlinker/consumers.d.ts +3 -1
  130. package/dist/esm/symlinker/consumers.js +7 -1
  131. package/dist/esm/symlinker/unified-sync.d.ts +3 -3
  132. package/dist/esm/symlinker/unified-sync.js +88 -11
  133. package/dist/esm/test/shard-durations.json +0 -2
  134. package/dist/esm/test-helpers/global-setup.js +38 -3
  135. package/dist/esm/tool-runtime/managed-rtk.d.ts +44 -0
  136. package/dist/esm/tool-runtime/managed-rtk.js +275 -0
  137. package/dist/esm/tool-runtime/resolve-runner.js +18 -194
  138. package/dist/esm/utils/package-root.d.ts +32 -0
  139. package/dist/esm/utils/package-root.js +82 -0
  140. package/dist/esm/worktrees/git-metadata.d.ts +41 -0
  141. package/dist/esm/worktrees/git-metadata.js +48 -0
  142. package/package.json +16 -21
  143. package/dist/esm/cli/commands/init/scaffolders/subagents/index.d.ts +0 -6
  144. package/dist/esm/cli/commands/init/scaffolders/subagents/index.js +0 -77
  145. package/dist/esm/config/oxlint/code-safety.d.ts +0 -18
  146. package/dist/esm/config/oxlint/foundation-purity.d.ts +0 -21
  147. package/dist/esm/config/oxlint/graphql-conventions.d.ts +0 -23
  148. package/dist/esm/config/oxlint/import-hygiene.d.ts +0 -34
  149. package/dist/esm/config/oxlint/index.d.ts +0 -22
  150. package/dist/esm/config/oxlint/index.js +0 -28
  151. package/dist/esm/config/oxlint/monorepo-paths.d.ts +0 -22
  152. package/dist/esm/config/oxlint/query-patterns.d.ts +0 -24
  153. package/dist/esm/config/oxlint/testing-quality.d.ts +0 -35
  154. package/dist/esm/config/oxlint/tier-boundaries.d.ts +0 -35
  155. package/dist/esm/output-transforms/rulesync.d.ts +0 -2
  156. package/dist/esm/output-transforms/rulesync.js +0 -79
@@ -1,34 +0,0 @@
1
- declare const plugin: {
2
- meta: {
3
- name: string;
4
- };
5
- rules: {
6
- "no-relative-parent-imports": {
7
- create(context: any): {
8
- ImportDeclaration(node: any): void;
9
- ExportNamedDeclaration(node: any): void;
10
- ExportAllDeclaration(node: any): void;
11
- ImportExpression(node: any): void;
12
- };
13
- };
14
- "no-src-path-imports": {
15
- create(context: any): {
16
- ImportDeclaration(node: any): void;
17
- };
18
- };
19
- "no-relative-mock-paths": {
20
- create(context: any): {
21
- CallExpression(node: any): void;
22
- };
23
- };
24
- "no-forbidden-package-imports": {
25
- create(context: any): {
26
- ImportDeclaration(node: any): void;
27
- ExportNamedDeclaration(node: any): void;
28
- ExportAllDeclaration(node: any): void;
29
- ImportExpression(node: any): void;
30
- };
31
- };
32
- };
33
- };
34
- export default plugin;
@@ -1,22 +0,0 @@
1
- import codeSafety from "./code-safety.js";
2
- import foundationPurity from "./foundation-purity.js";
3
- import graphqlConventions from "./graphql-conventions.js";
4
- import importHygiene from "./import-hygiene.js";
5
- import monorepoNpaths from "./monorepo-paths.js";
6
- import queryPatterns from "./query-patterns.js";
7
- import testingQuality from "./testing-quality.js";
8
- import tierBoundaries from "./tier-boundaries.js";
9
- type OxlintRuleSeverity = "error";
10
- interface OxlintPlugin {
11
- meta: {
12
- name: string;
13
- };
14
- rules: Record<string, unknown>;
15
- }
16
- export { codeSafety, foundationPurity, graphqlConventions, importHygiene, monorepoNpaths, queryPatterns, testingQuality, tierBoundaries, };
17
- export declare const plugins: Record<string, OxlintPlugin>;
18
- export declare const rules: Record<string, OxlintRuleSeverity>;
19
- export declare const config: {
20
- plugins: Record<string, OxlintPlugin>;
21
- rules: Record<string, "error">;
22
- };
@@ -1,28 +0,0 @@
1
- import codeSafety from "./code-safety.js";
2
- import foundationPurity from "./foundation-purity.js";
3
- import graphqlConventions from "./graphql-conventions.js";
4
- import importHygiene from "./import-hygiene.js";
5
- import monorepoNpaths from "./monorepo-paths.js";
6
- import queryPatterns from "./query-patterns.js";
7
- import testingQuality from "./testing-quality.js";
8
- import tierBoundaries from "./tier-boundaries.js";
9
- export { codeSafety, foundationPurity, graphqlConventions, importHygiene, monorepoNpaths, queryPatterns, testingQuality, tierBoundaries, };
10
- const pluginEntries = [
11
- codeSafety,
12
- foundationPurity,
13
- graphqlConventions,
14
- importHygiene,
15
- monorepoNpaths,
16
- queryPatterns,
17
- testingQuality,
18
- tierBoundaries,
19
- ].map((plugin) => [plugin.meta.name, plugin]);
20
- export const plugins = Object.fromEntries(pluginEntries);
21
- export const rules = Object.fromEntries(pluginEntries.flatMap(([pluginName, plugin]) => Object.keys(plugin.rules).map((ruleName) => [
22
- `${pluginName}/${ruleName}`,
23
- "error",
24
- ])));
25
- export const config = {
26
- plugins,
27
- rules,
28
- };
@@ -1,22 +0,0 @@
1
- export declare function hardcodedRepoRootDepth(args: any): {
2
- depth: number;
3
- index: number;
4
- } | null;
5
- declare const plugin: {
6
- meta: {
7
- name: string;
8
- };
9
- rules: {
10
- "no-hardcoded-repo-root": {
11
- create(context: any): {
12
- CallExpression(node: any): void;
13
- };
14
- };
15
- "no-cross-package-paths": {
16
- create(context: any): {
17
- CallExpression(node: any): void;
18
- };
19
- };
20
- };
21
- };
22
- export default plugin;
@@ -1,24 +0,0 @@
1
- declare const plugin: {
2
- meta: {
3
- name: string;
4
- };
5
- rules: {
6
- "no-adhoc-useQuery": {
7
- create(context: any): {
8
- CallExpression?: undefined;
9
- } | {
10
- CallExpression(node: any): void;
11
- };
12
- };
13
- "no-isLoading-on-queries": {
14
- create(context: any): {
15
- VariableDeclarator?: undefined;
16
- MemberExpression?: undefined;
17
- } | {
18
- VariableDeclarator(node: any): void;
19
- MemberExpression(node: any): void;
20
- };
21
- };
22
- };
23
- };
24
- export default plugin;
@@ -1,35 +0,0 @@
1
- declare const plugin: {
2
- meta: {
3
- name: string;
4
- };
5
- rules: {
6
- "no-weak-assertions": {
7
- create(context: any): {
8
- CallExpression(node: any): void;
9
- };
10
- };
11
- "no-bare-spy-assertions": {
12
- create(context: any): {
13
- CallExpression(node: any): void;
14
- };
15
- };
16
- "no-internal-mocks": {
17
- create(context: any): {
18
- CallExpression(node: any): void;
19
- };
20
- };
21
- "no-real-timers-in-tests": {
22
- create(context: any): {
23
- NewExpression(node: any): void;
24
- };
25
- };
26
- "no-cold-dynamic-import": {
27
- create(context: any): {
28
- CallExpression(node: any): void;
29
- "CallExpression:exit"(node: any): void;
30
- ImportExpression(node: any): void;
31
- };
32
- };
33
- };
34
- };
35
- export default plugin;
@@ -1,35 +0,0 @@
1
- export declare function resolveFileTierContext(filename: any): {
2
- kind: string;
3
- packageName: any;
4
- tier: number;
5
- } | {
6
- kind: string;
7
- } | null;
8
- export declare function resolveImportTierContext(source: any): {
9
- kind: string;
10
- packageName: any;
11
- tier: number;
12
- } | {
13
- kind: string;
14
- } | null;
15
- declare const plugin: {
16
- meta: {
17
- name: string;
18
- };
19
- rules: {
20
- "no-higher-tier-imports": {
21
- create(context: any): {
22
- ImportDeclaration?: undefined;
23
- ExportNamedDeclaration?: undefined;
24
- ExportAllDeclaration?: undefined;
25
- ImportExpression?: undefined;
26
- } | {
27
- ImportDeclaration(node: any): void;
28
- ExportNamedDeclaration(node: any): void;
29
- ExportAllDeclaration(node: any): void;
30
- ImportExpression(node: any): void;
31
- };
32
- };
33
- };
34
- };
35
- export default plugin;
@@ -1,2 +0,0 @@
1
- import type { TransformContext, TransformResult } from "./index.js";
2
- export declare function rulesyncTransform(rawOutput: string | undefined, context: TransformContext): TransformResult;
@@ -1,79 +0,0 @@
1
- import { createTransformResult } from "./metadata.js";
2
- import { passthroughTransform } from "./passthrough.js";
3
- const MAX_OUTPUT_BYTES = 4_000;
4
- // Matches: ✓ Claude Code: 3 skills, 2 commands, 1 agent
5
- const SUCCESS_LINE_RE = /^[✓✔]\s+([\w\s]+?):\s+(\d+)\s+skills?,\s+(\d+)\s+commands?,\s+(\d+)\s+agents?/u;
6
- // Matches: ✗ OpenCode: failed to write .opencode/rules/foo.md: EACCES
7
- const FAILURE_LINE_RE = /^[✗✘]\s+([\w\s]+?):\s+(.+)$/u;
8
- // Summary line: Generated in 120ms
9
- const SUMMARY_LINE_RE = /^Generated in \d+ms$/u;
10
- function parseRulesyncOutput(raw) {
11
- const targets = [];
12
- let hasSummaryLine = false;
13
- for (const line of raw.split(/\r?\n/u)) {
14
- const trimmed = line.trim();
15
- if (!trimmed)
16
- continue;
17
- if (SUMMARY_LINE_RE.test(trimmed)) {
18
- hasSummaryLine = true;
19
- continue;
20
- }
21
- const successMatch = SUCCESS_LINE_RE.exec(trimmed);
22
- if (successMatch) {
23
- targets.push({
24
- target: successMatch[1]?.trim() ?? "",
25
- skills: parseInt(successMatch[2] ?? "0", 10),
26
- commands: parseInt(successMatch[3] ?? "0", 10),
27
- agents: parseInt(successMatch[4] ?? "0", 10),
28
- failed: false,
29
- });
30
- continue;
31
- }
32
- const failureMatch = FAILURE_LINE_RE.exec(trimmed);
33
- if (failureMatch) {
34
- targets.push({
35
- target: failureMatch[1]?.trim() ?? "",
36
- skills: 0,
37
- commands: 0,
38
- agents: 0,
39
- failed: true,
40
- failureDetail: failureMatch[2]?.trim(),
41
- });
42
- }
43
- }
44
- return { targets, hasSummaryLine };
45
- }
46
- function buildSummaryLine(targets) {
47
- const total = targets.length;
48
- const failed = targets.filter((t) => t.failed).length;
49
- const passed = total - failed;
50
- if (failed === 0)
51
- return `rulesync: ${passed} target${passed === 1 ? "" : "s"} synced`;
52
- return `rulesync: ${passed}/${total} targets synced, ${failed} failed`;
53
- }
54
- export function rulesyncTransform(rawOutput, context) {
55
- if (!rawOutput)
56
- return {};
57
- const { targets, hasSummaryLine } = parseRulesyncOutput(rawOutput);
58
- if (targets.length === 0 && !hasSummaryLine) {
59
- return passthroughTransform(rawOutput, context);
60
- }
61
- const failures = targets
62
- .filter((t) => t.failed)
63
- .map((t) => ({
64
- message: t.failureDetail ? `${t.target}: ${t.failureDetail}` : `${t.target}: failed`,
65
- }));
66
- const summaryLine = buildSummaryLine(targets);
67
- const successLines = targets
68
- .filter((t) => !t.failed)
69
- .map((t) => ` ${t.target}: ${t.skills} skills, ${t.commands} commands, ${t.agents} agents`);
70
- const failureLines = targets
71
- .filter((t) => t.failed)
72
- .map((t) => ` ${t.target}: FAILED — ${t.failureDetail ?? "unknown error"}`);
73
- const compactOutput = [summaryLine, ...successLines, ...failureLines].join("\n");
74
- // Clip to 4000 bytes via createTransformResult
75
- return createTransformResult(rawOutput, compactOutput.slice(0, MAX_OUTPUT_BYTES), context, {
76
- tier: 1,
77
- failures,
78
- });
79
- }