@webpresso/agent-kit 3.3.2 → 3.3.4
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/THIRD-PARTY-NOTICES.md +12 -10
- package/catalog/AGENTS.md.tpl +3 -5
- package/catalog/agent/rules/changeset-release.md +15 -4
- package/catalog/agent/rules/managed-tool-binaries.md +67 -0
- package/catalog/agent/rules/parallel-orchestration-quota.md +99 -1
- package/catalog/agent/rules/pre-implementation.md +36 -20
- package/catalog/agent/rules/rtk-routing.md +22 -16
- package/catalog/agent/skills/autopilot/SKILL.md +4 -3
- package/catalog/agent/skills/ultragoal/SKILL.md +11 -9
- package/catalog/agent/skills/verify/SKILL.md +12 -12
- package/catalog/compose/admin-blocks-registry.json +659 -0
- package/dist/esm/audit/hook-surface.js +5 -1
- package/dist/esm/audit/repo-guardrails.d.ts +8 -0
- package/dist/esm/audit/repo-guardrails.js +71 -1
- package/dist/esm/blueprint/core/parser.js +40 -16
- package/dist/esm/blueprint/core/validation/criteria.js +2 -1
- package/dist/esm/blueprint/execution/artifacts.js +8 -4
- package/dist/esm/blueprint/execution/frontmatter-keys.d.ts +17 -0
- package/dist/esm/blueprint/execution/frontmatter-keys.js +24 -0
- package/dist/esm/blueprint/execution/metadata.js +8 -4
- package/dist/esm/blueprint/lifecycle/audit.d.ts +21 -0
- package/dist/esm/blueprint/lifecycle/audit.js +89 -3
- package/dist/esm/blueprint/lifecycle/review-provenance.js +148 -40
- package/dist/esm/blueprint/lifecycle/rollout-anchor.d.ts +22 -0
- package/dist/esm/blueprint/lifecycle/rollout-anchor.js +37 -1
- package/dist/esm/blueprint/markdown/blocked-line.d.ts +49 -0
- package/dist/esm/blueprint/markdown/blocked-line.js +63 -0
- package/dist/esm/blueprint/markdown/helpers.js +10 -4
- package/dist/esm/blueprint/tracked-document/parser.js +3 -3
- package/dist/esm/blueprint/trust/gate-row.d.ts +55 -0
- package/dist/esm/blueprint/trust/gate-row.js +113 -0
- package/dist/esm/blueprint/trust/promotion.d.ts +17 -0
- package/dist/esm/blueprint/trust/promotion.js +19 -19
- package/dist/esm/build/atomic-file-copy.d.ts +32 -0
- package/dist/esm/build/atomic-file-copy.js +44 -0
- package/dist/esm/build/cli-mcp-parity.js +3 -2
- package/dist/esm/build/package-manifest.js +7 -2
- package/dist/esm/build/vendor-oxlint-plugins.d.ts +8 -0
- package/dist/esm/build/vendor-oxlint-plugins.js +53 -0
- package/dist/esm/cli/commands/audit-core.js +9 -1
- package/dist/esm/cli/commands/audit.js +16 -5
- package/dist/esm/cli/commands/blueprint/mutations.d.ts +15 -0
- package/dist/esm/cli/commands/blueprint/mutations.js +8 -2
- package/dist/esm/cli/commands/compile.d.ts +13 -0
- package/dist/esm/cli/commands/compile.js +182 -62
- package/dist/esm/cli/commands/format.js +17 -1
- package/dist/esm/cli/commands/gain/index.js +10 -3
- package/dist/esm/cli/commands/init/gitignore-patcher.js +6 -0
- package/dist/esm/cli/commands/init/index.js +29 -48
- package/dist/esm/cli/commands/init/mcp-spec.d.ts +54 -4
- package/dist/esm/cli/commands/init/mcp-spec.js +126 -22
- package/dist/esm/cli/commands/init/merge.js +30 -10
- package/dist/esm/cli/commands/init/scaffold-agents-md.js +5 -7
- package/dist/esm/cli/commands/init/scaffolders/codex-mcp/index.d.ts +56 -31
- package/dist/esm/cli/commands/init/scaffolders/codex-mcp/index.js +180 -43
- package/dist/esm/cli/commands/init/scaffolders/rtk/index.d.ts +17 -5
- package/dist/esm/cli/commands/init/scaffolders/rtk/index.js +56 -75
- package/dist/esm/cli/commands/init/scaffolders/runtime-check/index.js +7 -6
- package/dist/esm/cli/commands/init/untracked-collision.d.ts +12 -1
- package/dist/esm/cli/commands/init/untracked-collision.js +23 -1
- package/dist/esm/cli/commands/package-manager.js +8 -2
- package/dist/esm/cli/commands/pr-help.js +1 -1
- package/dist/esm/cli/commands/pr.js +18 -4
- package/dist/esm/cli/commands/review.js +60 -6
- package/dist/esm/cli/commands/worktree/router-dispatch.d.ts +24 -2
- package/dist/esm/cli/commands/worktree/router-dispatch.js +80 -48
- package/dist/esm/cli/commands/worktree/router.js +5 -2
- package/dist/esm/cli/direct-provider-launch.js +12 -4
- package/dist/esm/compiler/flatten.d.ts +10 -1
- package/dist/esm/compiler/flatten.js +14 -4
- package/dist/esm/compose/admin-blocks-registry-integrity.d.ts +22 -0
- package/dist/esm/compose/admin-blocks-registry-integrity.js +90 -0
- package/dist/esm/compose/compose.d.ts +46 -0
- package/dist/esm/compose/compose.js +250 -0
- package/dist/esm/compose/escape-html.d.ts +5 -0
- package/dist/esm/compose/escape-html.js +12 -0
- package/dist/esm/compose/ops-report-render.d.ts +5 -0
- package/dist/esm/compose/ops-report-render.js +71 -0
- package/dist/esm/compose/ops-report-schema.d.ts +42 -0
- package/dist/esm/compose/ops-report-schema.js +60 -0
- package/dist/esm/compose/preview.d.ts +14 -0
- package/dist/esm/compose/preview.js +32 -0
- package/dist/esm/compose/registry-resolve.d.ts +64 -0
- package/dist/esm/compose/registry-resolve.js +200 -0
- package/dist/esm/config/oxlint/graphql-conventions.js +2 -5
- package/dist/esm/config/oxlint/import-hygiene.js +21 -8
- package/dist/esm/config/oxlint/oxlint-config.fixture.d.ts +1 -1
- package/dist/esm/config/oxlint/oxlint-config.fixture.js +2 -3
- package/dist/esm/config/oxlint/oxlintrc.d.ts +5 -7
- package/dist/esm/config/oxlint/oxlintrc.js +18 -21
- package/dist/esm/config/oxlint/path-roles.js +53 -0
- package/dist/esm/config/oxlint/query-patterns.js +2 -5
- package/dist/esm/daemon/domains/blueprint-exec-ledger.d.ts +86 -0
- package/dist/esm/daemon/domains/blueprint-exec-ledger.js +134 -0
- package/dist/esm/daemon/domains/blueprint-exec.d.ts +106 -0
- package/dist/esm/daemon/domains/blueprint-exec.js +161 -0
- package/dist/esm/daemon/domains/launch.d.ts +25 -0
- package/dist/esm/daemon/domains/launch.js +30 -1
- package/dist/esm/daemon/handlers/blueprints-handlers.d.ts +12 -1
- package/dist/esm/daemon/handlers/blueprints-handlers.js +148 -6
- package/dist/esm/daemon/handlers/product.d.ts +10 -0
- package/dist/esm/daemon/handlers/product.js +10 -1
- package/dist/esm/daemon/methods.d.ts +21 -1
- package/dist/esm/daemon/methods.js +20 -0
- package/dist/esm/daemon/protocol/contract.d.ts +58 -0
- package/dist/esm/daemon/protocol/contract.js +38 -0
- package/dist/esm/daemon/server.js +7 -0
- package/dist/esm/docs-linter/blueprint-plan.js +2 -2
- package/dist/esm/errors/wp-error.js +21 -2
- package/dist/esm/git/changed-files.d.ts +20 -0
- package/dist/esm/git/changed-files.js +63 -0
- package/dist/esm/hooks/doctor.d.ts +11 -0
- package/dist/esm/hooks/doctor.js +114 -45
- package/dist/esm/hooks/pretool-guard/dev-routing.js +1 -1
- package/dist/esm/hooks/pretool-guard/rtk-rewrite.d.ts +24 -0
- package/dist/esm/hooks/pretool-guard/rtk-rewrite.js +50 -0
- package/dist/esm/hooks/pretool-guard/runner.js +6 -0
- package/dist/esm/hooks/status/index.js +1 -1
- package/dist/esm/hooks/stop/qa-changed-files.js +6 -1
- package/dist/esm/mcp/blueprint/_shared/lifecycle.js +39 -11
- package/dist/esm/mcp/blueprint/handlers/review-log.d.ts +14 -7
- package/dist/esm/mcp/blueprint/handlers/review-log.js +46 -22
- package/dist/esm/mcp/blueprint/handlers/validate.js +6 -0
- package/dist/esm/mcp/blueprint/registration.js +1 -1
- package/dist/esm/mcp/tools/_names.d.ts +1 -1
- package/dist/esm/mcp/tools/_names.js +4 -0
- package/dist/esm/mcp/tools/_registry.js +8 -0
- package/dist/esm/mcp/tools/_shared/redact.d.ts +22 -0
- package/dist/esm/mcp/tools/_shared/redact.js +114 -8
- package/dist/esm/mcp/tools/gain.js +28 -2
- package/dist/esm/mcp/tools/release-progress.d.ts +9 -0
- package/dist/esm/mcp/tools/release-progress.js +110 -0
- package/dist/esm/mcp/tools/worktree.js +65 -3
- package/dist/esm/mcp/tools/wp-ui-blocks-list.d.ts +3 -0
- package/dist/esm/mcp/tools/wp-ui-blocks-list.js +43 -0
- package/dist/esm/mcp/tools/wp-ui-compose.d.ts +3 -0
- package/dist/esm/mcp/tools/wp-ui-compose.js +96 -0
- package/dist/esm/mcp/tools/wp-ui-preview.d.ts +3 -0
- package/dist/esm/mcp/tools/wp-ui-preview.js +59 -0
- package/dist/esm/package.json +2 -0
- package/dist/esm/review/lifecycle-writers.d.ts +76 -0
- package/dist/esm/review/lifecycle-writers.js +330 -0
- package/dist/esm/review/subject.js +66 -32
- package/dist/esm/status/snapshot.d.ts +5 -0
- package/dist/esm/status/snapshot.js +27 -2
- package/dist/esm/test/shard-durations.json +0 -1
- package/dist/esm/test-helpers/global-setup.js +38 -3
- package/dist/esm/tool-runtime/managed-rtk.d.ts +44 -0
- package/dist/esm/tool-runtime/managed-rtk.js +275 -0
- package/dist/esm/tool-runtime/resolve-runner.js +18 -194
- package/dist/esm/utils/package-root.d.ts +32 -0
- package/dist/esm/utils/package-root.js +82 -0
- package/dist/esm/worktrees/git-metadata.d.ts +41 -0
- package/dist/esm/worktrees/git-metadata.js +48 -0
- package/package.json +27 -21
- package/dist/esm/config/oxlint/code-safety.d.ts +0 -18
- package/dist/esm/config/oxlint/foundation-purity.d.ts +0 -21
- package/dist/esm/config/oxlint/graphql-conventions.d.ts +0 -23
- package/dist/esm/config/oxlint/import-hygiene.d.ts +0 -34
- package/dist/esm/config/oxlint/index.d.ts +0 -22
- package/dist/esm/config/oxlint/index.js +0 -28
- package/dist/esm/config/oxlint/monorepo-paths.d.ts +0 -22
- package/dist/esm/config/oxlint/query-patterns.d.ts +0 -24
- package/dist/esm/config/oxlint/testing-quality.d.ts +0 -35
- package/dist/esm/config/oxlint/tier-boundaries.d.ts +0 -35
- package/dist/esm/output-transforms/rulesync.d.ts +0 -2
- package/dist/esm/output-transforms/rulesync.js +0 -79
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Locate an installed package's root directory from its bare name.
|
|
3
|
+
*
|
|
4
|
+
* The obvious spelling — `require.resolve("<name>/package.json")` — is a trap.
|
|
5
|
+
* Node honours the target package's `exports` map, and a package that declares
|
|
6
|
+
* only `"."` (rulesync) makes that throw `ERR_PACKAGE_PATH_NOT_EXPORTED`. Every
|
|
7
|
+
* caller in this repo wrapped it in `try {} catch { return null }`, so the throw
|
|
8
|
+
* turned into a silently missing capability rather than a visible failure.
|
|
9
|
+
*
|
|
10
|
+
* Resolving the package's exported entry works instead, because any package
|
|
11
|
+
* meant to be imported has one. From there, walk up to the directory whose
|
|
12
|
+
* `package.json` actually declares that name — the entry may sit several levels
|
|
13
|
+
* deep (`<root>/dist/index.cjs`).
|
|
14
|
+
*
|
|
15
|
+
* Caveat worth knowing before reusing this: `resolve` runs under the CJS
|
|
16
|
+
* `require` condition. A package whose every export condition is `import`
|
|
17
|
+
* (ESM-only, as `@webpresso/agent-kit` itself is) has no entry resolvable this
|
|
18
|
+
* way at all. Such a package must export a condition-free `"./package.json"`
|
|
19
|
+
* target instead; this helper cannot rescue it.
|
|
20
|
+
*/
|
|
21
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
22
|
+
import { dirname, join } from "node:path";
|
|
23
|
+
const DEFAULT_MAX_WALK_DEPTH = 8;
|
|
24
|
+
export function readPackageManifest(packageRoot) {
|
|
25
|
+
const manifestPath = join(packageRoot, "package.json");
|
|
26
|
+
if (!existsSync(manifestPath))
|
|
27
|
+
return null;
|
|
28
|
+
try {
|
|
29
|
+
return JSON.parse(readFileSync(manifestPath, "utf-8"));
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function declaresPackageName(packageRoot, name) {
|
|
36
|
+
return readPackageManifest(packageRoot)?.name === name;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @param name Bare package name, scoped or unscoped (`rulesync`, `@scope/pkg`).
|
|
40
|
+
* @returns The package root directory, or `null` when it cannot be resolved.
|
|
41
|
+
*/
|
|
42
|
+
export function resolvePackageRoot(name, resolver, maxDepth = DEFAULT_MAX_WALK_DEPTH) {
|
|
43
|
+
let dir;
|
|
44
|
+
try {
|
|
45
|
+
// Prefer the explicit manifest subpath when the package exports it, since
|
|
46
|
+
// that lands on the root directly; fall back to the package entry.
|
|
47
|
+
dir = dirname(resolveFirst(resolver, [`${name}/package.json`, name]));
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
for (let depth = 0; depth < maxDepth; depth += 1) {
|
|
53
|
+
// Skip nested manifests (a bundled dependency) until the name matches.
|
|
54
|
+
if (declaresPackageName(dir, name))
|
|
55
|
+
return dir;
|
|
56
|
+
const parent = dirname(dir);
|
|
57
|
+
if (parent === dir)
|
|
58
|
+
return null;
|
|
59
|
+
dir = parent;
|
|
60
|
+
}
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
function resolveFirst(resolver, specifiers) {
|
|
64
|
+
let lastError;
|
|
65
|
+
for (const specifier of specifiers) {
|
|
66
|
+
try {
|
|
67
|
+
return resolver.resolve(specifier);
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
lastError = error;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
throw lastError instanceof Error ? lastError : new Error(`Cannot resolve ${specifiers[0]}`);
|
|
74
|
+
}
|
|
75
|
+
/** Convenience wrapper: the installed `version` of `name`, or `null`. */
|
|
76
|
+
export function resolvePackageVersion(name, resolver) {
|
|
77
|
+
const root = resolvePackageRoot(name, resolver);
|
|
78
|
+
if (!root)
|
|
79
|
+
return null;
|
|
80
|
+
const version = readPackageManifest(root)?.version;
|
|
81
|
+
return typeof version === "string" ? version : null;
|
|
82
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git-level worktree admin metadata reconciliation.
|
|
3
|
+
*
|
|
4
|
+
* agent-kit keeps its own managed worktree registry, but git keeps a SEPARATE
|
|
5
|
+
* admin record per linked worktree under `.git/worktrees/<id>`. Deleting a
|
|
6
|
+
* worktree directory by hand (`rm -rf`) leaves that git record behind, still
|
|
7
|
+
* claiming the branch it was checked out on — so a later `git checkout <branch>`
|
|
8
|
+
* fails with `'<branch>' is already used by worktree at <deleted path>` and the
|
|
9
|
+
* registry-only prune cannot clear it.
|
|
10
|
+
*
|
|
11
|
+
* Only `git worktree prune` drops those records, so every agent-kit prune path
|
|
12
|
+
* runs it BEFORE reading git liveness: a stale record otherwise reports the
|
|
13
|
+
* deleted path as live and pins the matching registry entry in place too.
|
|
14
|
+
*/
|
|
15
|
+
/** Minimal shape needed from a `git worktree list --porcelain` entry. */
|
|
16
|
+
export interface PrunableWorktreeCandidate {
|
|
17
|
+
readonly path: string;
|
|
18
|
+
readonly prunable?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface GitWorktreeMetadataPruneResult {
|
|
21
|
+
/** Paths git reported as prunable immediately before the prune ran. */
|
|
22
|
+
readonly prunedPaths: readonly string[];
|
|
23
|
+
/** Non-null when `git worktree prune` itself failed; nothing was reconciled. */
|
|
24
|
+
readonly error: string | null;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Clear git's stale linked-worktree admin records for `repoRoot`.
|
|
28
|
+
*
|
|
29
|
+
* `entries` is the caller's already-fetched porcelain listing and is used only
|
|
30
|
+
* to report WHICH paths were cleared; the prune itself is unconditional so a
|
|
31
|
+
* missing or stale listing can never leave a wedged branch behind.
|
|
32
|
+
*/
|
|
33
|
+
export declare function pruneStaleGitWorktreeMetadata(repoRoot: string, entries?: readonly PrunableWorktreeCandidate[]): GitWorktreeMetadataPruneResult;
|
|
34
|
+
/**
|
|
35
|
+
* True when `path` no longer has a usable working tree on disk — either git
|
|
36
|
+
* already flagged the entry prunable, or the directory itself is gone.
|
|
37
|
+
*
|
|
38
|
+
* A missing directory makes `git status` fail, which dirty checks would
|
|
39
|
+
* otherwise report as "uncommitted changes" and refuse to act on.
|
|
40
|
+
*/
|
|
41
|
+
export declare function isStaleWorktreeRegistration(candidate: PrunableWorktreeCandidate | undefined, path: string, directoryExists: (target: string) => boolean): boolean;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git-level worktree admin metadata reconciliation.
|
|
3
|
+
*
|
|
4
|
+
* agent-kit keeps its own managed worktree registry, but git keeps a SEPARATE
|
|
5
|
+
* admin record per linked worktree under `.git/worktrees/<id>`. Deleting a
|
|
6
|
+
* worktree directory by hand (`rm -rf`) leaves that git record behind, still
|
|
7
|
+
* claiming the branch it was checked out on — so a later `git checkout <branch>`
|
|
8
|
+
* fails with `'<branch>' is already used by worktree at <deleted path>` and the
|
|
9
|
+
* registry-only prune cannot clear it.
|
|
10
|
+
*
|
|
11
|
+
* Only `git worktree prune` drops those records, so every agent-kit prune path
|
|
12
|
+
* runs it BEFORE reading git liveness: a stale record otherwise reports the
|
|
13
|
+
* deleted path as live and pins the matching registry entry in place too.
|
|
14
|
+
*/
|
|
15
|
+
import { spawnSync } from "node:child_process";
|
|
16
|
+
const GIT_PRUNE_TIMEOUT_MS = 10_000;
|
|
17
|
+
/**
|
|
18
|
+
* Clear git's stale linked-worktree admin records for `repoRoot`.
|
|
19
|
+
*
|
|
20
|
+
* `entries` is the caller's already-fetched porcelain listing and is used only
|
|
21
|
+
* to report WHICH paths were cleared; the prune itself is unconditional so a
|
|
22
|
+
* missing or stale listing can never leave a wedged branch behind.
|
|
23
|
+
*/
|
|
24
|
+
export function pruneStaleGitWorktreeMetadata(repoRoot, entries = []) {
|
|
25
|
+
const prunedPaths = entries.filter((entry) => entry.prunable === true).map((entry) => entry.path);
|
|
26
|
+
const pruned = spawnSync("git", ["worktree", "prune"], {
|
|
27
|
+
cwd: repoRoot,
|
|
28
|
+
encoding: "utf8",
|
|
29
|
+
// Bounded like every other external probe here: this is a fast local
|
|
30
|
+
// metadata rewrite, so exceeding the bound means git is wedged, not slow.
|
|
31
|
+
timeout: GIT_PRUNE_TIMEOUT_MS,
|
|
32
|
+
});
|
|
33
|
+
if (pruned.status !== 0) {
|
|
34
|
+
const detail = String(pruned.stderr || pruned.stdout || "").trim();
|
|
35
|
+
return { prunedPaths: [], error: detail || "git worktree prune failed" };
|
|
36
|
+
}
|
|
37
|
+
return { prunedPaths, error: null };
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* True when `path` no longer has a usable working tree on disk — either git
|
|
41
|
+
* already flagged the entry prunable, or the directory itself is gone.
|
|
42
|
+
*
|
|
43
|
+
* A missing directory makes `git status` fail, which dirty checks would
|
|
44
|
+
* otherwise report as "uncommitted changes" and refuse to act on.
|
|
45
|
+
*/
|
|
46
|
+
export function isStaleWorktreeRegistration(candidate, path, directoryExists) {
|
|
47
|
+
return candidate?.prunable === true || !directoryExists(path);
|
|
48
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webpresso/agent-kit",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "TypeScript-first agent harness for guarded develop/deploy workflows: wp CLI gates, MCP tools, hooks, memory, worktrees, secrets, audits, and evidence checks.",
|
|
6
6
|
"keywords": [
|
|
@@ -78,6 +78,8 @@
|
|
|
78
78
|
"#worktrees/*": "./src/worktrees/*.ts",
|
|
79
79
|
"#fleet/*.js": "./src/fleet/*.ts",
|
|
80
80
|
"#fleet/*": "./src/fleet/*.ts",
|
|
81
|
+
"#compose/*.js": "./src/compose/*.ts",
|
|
82
|
+
"#compose/*": "./src/compose/*.ts",
|
|
81
83
|
"#cli/auto-update/*.js": "./src/cli/auto-update/*.ts",
|
|
82
84
|
"#cli/auto-update/*": "./src/cli/auto-update/*.ts",
|
|
83
85
|
"#cli/*.js": "./src/cli/*.ts",
|
|
@@ -298,12 +300,7 @@
|
|
|
298
300
|
"default": "./dist/esm/local.js"
|
|
299
301
|
}
|
|
300
302
|
},
|
|
301
|
-
"./
|
|
302
|
-
"import": {
|
|
303
|
-
"types": "./dist/esm/config/oxlint/index.d.ts",
|
|
304
|
-
"default": "./dist/esm/config/oxlint/index.js"
|
|
305
|
-
}
|
|
306
|
-
},
|
|
303
|
+
"./package.json": "./package.json",
|
|
307
304
|
"./symlinker": {
|
|
308
305
|
"import": {
|
|
309
306
|
"types": "./dist/esm/symlinker/index.d.ts",
|
|
@@ -353,7 +350,7 @@
|
|
|
353
350
|
},
|
|
354
351
|
"scripts": {
|
|
355
352
|
"setup:agent": "./bin/wp setup",
|
|
356
|
-
"build": "tshy && ./bin/wp format --file package.json && bun src/build/blueprint-migration-assets.ts && bun src/build/sast-rule-assets.ts && bun src/build/generate-oxlintrc.ts && bun src/build/normalize-tsconfig-json-exports.ts && vp run chmod-bins",
|
|
353
|
+
"build": "pnpm --filter @webpresso/agent-core run build && pnpm --filter @webpresso/agent-config run build && tshy && ./bin/wp format --file package.json && bun src/build/blueprint-migration-assets.ts && bun src/build/sast-rule-assets.ts && bun src/build/generate-oxlintrc.ts && bun src/build/vendor-oxlint-plugins.ts && bun src/build/normalize-tsconfig-json-exports.ts && vp run chmod-bins",
|
|
357
354
|
"build:runtime-binaries": "bun scripts/build-runtime-binaries.ts",
|
|
358
355
|
"bench:hooks": "bun scripts/bench-hooks.ts",
|
|
359
356
|
"stage:plugin-runtime": "bun scripts/stage-plugin-runtime-artifacts.ts",
|
|
@@ -444,7 +441,7 @@
|
|
|
444
441
|
"ora": "^9.4.1",
|
|
445
442
|
"proper-lockfile": "^4.1.2",
|
|
446
443
|
"react": "^19.2.7",
|
|
447
|
-
"rulesync": "
|
|
444
|
+
"rulesync": "15.0.0",
|
|
448
445
|
"secretlint": "^13.0.2",
|
|
449
446
|
"typescript": "^7.0.2",
|
|
450
447
|
"yaml": "^2.9.0",
|
|
@@ -488,7 +485,7 @@
|
|
|
488
485
|
"./e2e-preset/playwright": "./src/config/e2e-preset/playwright.ts",
|
|
489
486
|
"./format": "./src/format/index.ts",
|
|
490
487
|
"./local": "./src/local.ts",
|
|
491
|
-
"./
|
|
488
|
+
"./package.json": "./package.json",
|
|
492
489
|
"./symlinker": "./src/symlinker/index.ts",
|
|
493
490
|
"./test": "./src/test/index.ts",
|
|
494
491
|
"./test-preset": "./src/config/test-preset/index.ts",
|
|
@@ -505,19 +502,28 @@
|
|
|
505
502
|
"packageManager": "pnpm@11.10.0",
|
|
506
503
|
"webpresso": {
|
|
507
504
|
"agentConfigVersion": "0.1.5",
|
|
505
|
+
"dependencyFreshnessExceptions": [
|
|
506
|
+
{
|
|
507
|
+
"package": "@xterm/xterm",
|
|
508
|
+
"reason": "Pinned to the 5.5 major the desktop-pty-loadtest spike actually measured. The spike's GUI performance gate for the terminal pane is still recorded as pending, so adopting the 6.0 renderer major would make that structural evidence non-transferable and leave apps/desktop with no supporting measurement at all. Upgrading is a separate change that must carry its own measurement.",
|
|
509
|
+
"owner": "ozby",
|
|
510
|
+
"expiry": "2026-10-31",
|
|
511
|
+
"linkedIssue": "https://github.com/webpresso/agent-kit/pull/889"
|
|
512
|
+
}
|
|
513
|
+
],
|
|
508
514
|
"setupWpActionRef": "c2c71a7a4be446fc6858e6b57bf55a11ccfa2d88"
|
|
509
515
|
},
|
|
510
516
|
"optionalDependencies": {
|
|
511
|
-
"@webpresso/agent-kit-runtime-darwin-arm64": "3.3.
|
|
512
|
-
"@webpresso/agent-kit-runtime-darwin-x64": "3.3.
|
|
513
|
-
"@webpresso/agent-kit-runtime-linux-x64": "3.3.
|
|
514
|
-
"@webpresso/agent-kit-runtime-linux-arm64": "3.3.
|
|
515
|
-
"@webpresso/agent-kit-runtime-windows-x64": "3.3.
|
|
516
|
-
"@webpresso/agent-kit-session-memory-darwin-x64": "3.3.
|
|
517
|
-
"@webpresso/agent-kit-session-memory-darwin-arm64": "3.3.
|
|
518
|
-
"@webpresso/agent-kit-session-memory-linux-x64": "3.3.
|
|
519
|
-
"@webpresso/agent-kit-session-memory-linux-arm64": "3.3.
|
|
520
|
-
"@webpresso/agent-kit-session-memory-win32-x64": "3.3.
|
|
521
|
-
"@webpresso/agent-kit-session-memory-win32-arm64": "3.3.
|
|
517
|
+
"@webpresso/agent-kit-runtime-darwin-arm64": "3.3.4",
|
|
518
|
+
"@webpresso/agent-kit-runtime-darwin-x64": "3.3.4",
|
|
519
|
+
"@webpresso/agent-kit-runtime-linux-x64": "3.3.4",
|
|
520
|
+
"@webpresso/agent-kit-runtime-linux-arm64": "3.3.4",
|
|
521
|
+
"@webpresso/agent-kit-runtime-windows-x64": "3.3.4",
|
|
522
|
+
"@webpresso/agent-kit-session-memory-darwin-x64": "3.3.4",
|
|
523
|
+
"@webpresso/agent-kit-session-memory-darwin-arm64": "3.3.4",
|
|
524
|
+
"@webpresso/agent-kit-session-memory-linux-x64": "3.3.4",
|
|
525
|
+
"@webpresso/agent-kit-session-memory-linux-arm64": "3.3.4",
|
|
526
|
+
"@webpresso/agent-kit-session-memory-win32-x64": "3.3.4",
|
|
527
|
+
"@webpresso/agent-kit-session-memory-win32-arm64": "3.3.4"
|
|
522
528
|
}
|
|
523
529
|
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
declare const plugin: {
|
|
2
|
-
meta: {
|
|
3
|
-
name: string;
|
|
4
|
-
};
|
|
5
|
-
rules: {
|
|
6
|
-
"as-any-audit": {
|
|
7
|
-
create(context: any): {
|
|
8
|
-
TSAsExpression(node: any): void;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
"no-swallowed-errors": {
|
|
12
|
-
create(context: any): {
|
|
13
|
-
CatchClause(node: any): void;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export default plugin;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
declare const plugin: {
|
|
2
|
-
meta: {
|
|
3
|
-
name: string;
|
|
4
|
-
};
|
|
5
|
-
rules: {
|
|
6
|
-
"no-framework-imports": {
|
|
7
|
-
create(context: any): {
|
|
8
|
-
ImportDeclaration?: undefined;
|
|
9
|
-
ExportNamedDeclaration?: undefined;
|
|
10
|
-
ExportAllDeclaration?: undefined;
|
|
11
|
-
ImportExpression?: undefined;
|
|
12
|
-
} | {
|
|
13
|
-
ImportDeclaration(node: any): void;
|
|
14
|
-
ExportNamedDeclaration(node: any): void;
|
|
15
|
-
ExportAllDeclaration(node: any): void;
|
|
16
|
-
ImportExpression(node: any): void;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export default plugin;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
declare const plugin: {
|
|
2
|
-
meta: {
|
|
3
|
-
name: string;
|
|
4
|
-
};
|
|
5
|
-
rules: {
|
|
6
|
-
"no-singular-graphql-fields": {
|
|
7
|
-
create(context: any): {
|
|
8
|
-
TemplateLiteral(node: any): void;
|
|
9
|
-
Literal(node: any): void;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
"no-inline-graphql-in-app": {
|
|
13
|
-
create(context: any): {
|
|
14
|
-
TaggedTemplateExpression?: undefined;
|
|
15
|
-
TemplateLiteral?: undefined;
|
|
16
|
-
} | {
|
|
17
|
-
TaggedTemplateExpression(node: any): void;
|
|
18
|
-
TemplateLiteral(node: any): void;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
export default plugin;
|
|
@@ -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,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
|
-
}
|