@sabaiway/agent-workflow-kit 10.3.0 → 10.5.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/CHANGELOG.md +85 -0
- package/README.md +5 -5
- package/SKILL.md +1 -1
- package/bridges/antigravity-cli-bridge/SKILL.md +7 -1
- package/bridges/antigravity-cli-bridge/bin/agy-review.sh +69 -17
- package/bridges/antigravity-cli-bridge/bin/agy-review.test.mjs +73 -2
- package/bridges/antigravity-cli-bridge/capability.json +2 -2
- package/bridges/antigravity-cli-bridge/references/review-prompt.md +3 -0
- package/bridges/codex-cli-bridge/SKILL.md +8 -1
- package/bridges/codex-cli-bridge/bin/codex-exec.sh +1 -1
- package/bridges/codex-cli-bridge/bin/codex-review-honesty.test.mjs +1 -1
- package/bridges/codex-cli-bridge/bin/codex-review.sh +89 -18
- package/bridges/codex-cli-bridge/bin/codex-review.test.mjs +55 -2
- package/bridges/codex-cli-bridge/capability.json +2 -2
- package/capability.json +1 -1
- package/package.json +1 -1
- package/references/agents/executor.md +40 -0
- package/references/agents/review-lens.md +5 -3
- package/references/modes/agents.md +9 -4
- package/references/modes/procedures.md +21 -8
- package/references/modes/recipes.md +7 -4
- package/references/modes/recommendations.md +3 -1
- package/references/modes/set-recipe.md +23 -6
- package/references/modes/status.md +2 -2
- package/references/modes/upgrade.md +1 -1
- package/references/modes/velocity.md +1 -0
- package/references/shared/composition-handoff.md +1 -1
- package/references/shared/deploy-tail.md +1 -1
- package/references/templates/orchestration.json +1 -1
- package/tools/autonomy-config.mjs +1 -1
- package/tools/bridge-posture.mjs +48 -0
- package/tools/carriers.mjs +152 -0
- package/tools/cheap-agents-read.mjs +234 -0
- package/tools/cheap-agents.mjs +101 -109
- package/tools/commands.mjs +3 -3
- package/tools/detect-backends.mjs +2 -2
- package/tools/direct-run.mjs +9 -0
- package/tools/family-registry.mjs +38 -18
- package/tools/flow-check.mjs +2 -7
- package/tools/fold-scope.mjs +5 -60
- package/tools/grounding.mjs +2 -2
- package/tools/inject-methodology.mjs +4 -0
- package/tools/orchestration-config.mjs +23 -61
- package/tools/orchestration-readme.mjs +70 -0
- package/tools/plan-shape-cli.mjs +112 -0
- package/tools/plan-shape-facts.mjs +204 -0
- package/tools/plan-shape.mjs +348 -0
- package/tools/procedures.mjs +197 -83
- package/tools/recipes.mjs +183 -230
- package/tools/recommendations.mjs +77 -11
- package/tools/renderers.mjs +27 -7
- package/tools/repo-lex.mjs +40 -0
- package/tools/review-roster-resolve.mjs +104 -0
- package/tools/review-roster.mjs +128 -0
- package/tools/review-rounds-cli.mjs +92 -0
- package/tools/review-rounds.mjs +115 -0
- package/tools/review-state.mjs +10 -11
- package/tools/set-recipe-roster.mjs +167 -0
- package/tools/set-recipe.mjs +138 -42
- package/tools/velocity-profile.mjs +8 -22
- package/tools/view-model.mjs +17 -3
|
@@ -10,6 +10,8 @@ import { AUTONOMY_REL, loadAutonomy, resolveAutonomy, COMMAND_REDLINES } from '.
|
|
|
10
10
|
// The bridge-wrappers tier's placement probe (AD-044 Plan 4, Decision 2): a tier entry derives ONLY
|
|
11
11
|
// for a PLACED bridge wrapper — findOnPath is the same read-only PATH scan the backend detector uses.
|
|
12
12
|
import { findOnPath } from './detect-backends.mjs';
|
|
13
|
+
// The seedable-path predicate lives in the pure leaf so the renders spell a path exactly as it is seeded.
|
|
14
|
+
import { SHELL_METACHARACTERS, hasShellMetacharacter, isSeedablePathToken } from './repo-lex.mjs';
|
|
13
15
|
import { isDirectRun } from './direct-run.mjs';
|
|
14
16
|
import { compareSemver } from './semver-lite.mjs';
|
|
15
17
|
// The declared-path resolution + segment containment the allowWrite degrade shares with the
|
|
@@ -131,7 +133,7 @@ export const SHELL_READONLY = Object.freeze([
|
|
|
131
133
|
// seed time from the RUNNING tool's own location — resolved-absolute, so a moved or reinstalled
|
|
132
134
|
// skill leaves a stale rule that FAIL-SAFE prompts again (never a silent widening).
|
|
133
135
|
//
|
|
134
|
-
// Membership (
|
|
136
|
+
// Membership (13, frozen): the read-only kit tools plus run-gates.mjs — which is NOT read-only but
|
|
135
137
|
// project-exec (it runs the project's OWN declared gates.json commands), so it seeds as ONE exact
|
|
136
138
|
// byte-string pinned to this project root (`--cwd <resolved root>`): a wildcard would be BROADER
|
|
137
139
|
// than the AD-037 hook boundary (`--cwd <dir>` executes an arbitrary OTHER project's gates.json)
|
|
@@ -158,6 +160,9 @@ export const KIT_READONLY_TOOLS = Object.freeze([
|
|
|
158
160
|
// useless approvals is mostly small path questions batched into a composed shell because no single
|
|
159
161
|
// call answered them, and a lane the agent must still ask about is not a lane.
|
|
160
162
|
'tools/path-inventory.mjs',
|
|
163
|
+
// The round table the procedures advisor names every review round; its path argument is resolved
|
|
164
|
+
// and compared, never opened as a pattern, so it rides the settings-level posture like the rest.
|
|
165
|
+
'tools/review-rounds-cli.mjs',
|
|
161
166
|
]);
|
|
162
167
|
// Writer previews: ONLY writers whose ARG-FREE invocation is a documented dry-run ("Default is
|
|
163
168
|
// --dry-run" in their usage) seed an EXACT preview byte-string — every --apply/--write/--yes keeps
|
|
@@ -269,10 +274,7 @@ export const deriveBridgeTierAllowlist = ({ findWrapper, groundingAbsPath } = {}
|
|
|
269
274
|
// a sandbox. velocity never ADDS commit/push/publish as allow rules and keeps acceptEdits opt-in;
|
|
270
275
|
// runtime closure is not something settings-level allow rules can enforce — the residual guard
|
|
271
276
|
// ships as the opt-in PreToolUse hook (Mode: hook, tools/gate-hook.mjs; probe record in AD-037).
|
|
272
|
-
export
|
|
273
|
-
'&', '|', ';', '<', '>', '$', '`', '(', ')',
|
|
274
|
-
'\n', '\r', '\t', '\\', '{', '}', '*', '?', '#', '~', '!',
|
|
275
|
-
]);
|
|
277
|
+
export { SHELL_METACHARACTERS };
|
|
276
278
|
|
|
277
279
|
// The RUNTIME residual documented above, as data: the exact write-redirection / command-
|
|
278
280
|
// substitution / bounded write-flag forms a settings-level allow rule cannot see. Consumed by
|
|
@@ -484,8 +486,6 @@ const getDefaultMode = (data) => {
|
|
|
484
486
|
: { present: false, value: undefined };
|
|
485
487
|
};
|
|
486
488
|
|
|
487
|
-
const hasShellMetacharacter = (cmd) => SHELL_METACHARACTERS.some((ch) => cmd.includes(ch));
|
|
488
|
-
|
|
489
489
|
const tokenizeCommand = (cmd) => cmd.trim().split(WHITESPACE_PATTERN).filter(Boolean);
|
|
490
490
|
|
|
491
491
|
const getSubcommand = (tokens) => tokens.slice(1).join(' ');
|
|
@@ -504,20 +504,6 @@ const getBashExactCommand = (pattern) => {
|
|
|
504
504
|
return match ? match[1] : undefined;
|
|
505
505
|
};
|
|
506
506
|
|
|
507
|
-
// Characters that survive whitespace tokenization but break an UNQUOTED byte-exact path rule:
|
|
508
|
-
// shell quoting syntax and glob brackets (SHELL_METACHARACTERS owns the command-level separators/
|
|
509
|
-
// redirections/expansions — `*`/`?` globs included — but not these four).
|
|
510
|
-
const PATH_BREAKING_CHARACTERS = Object.freeze(["'", '"', '[', ']']);
|
|
511
|
-
|
|
512
|
-
// A path token that can be seeded UNQUOTED into a byte-exact allow rule: POSIX-absolute, no
|
|
513
|
-
// whitespace, no shell metacharacter, no quoting/glob syntax.
|
|
514
|
-
const isSeedablePathToken = (token) =>
|
|
515
|
-
typeof token === 'string' &&
|
|
516
|
-
token.startsWith('/') &&
|
|
517
|
-
!/\s/u.test(token) &&
|
|
518
|
-
!hasShellMetacharacter(token) &&
|
|
519
|
-
!PATH_BREAKING_CHARACTERS.some((ch) => token.includes(ch));
|
|
520
|
-
|
|
521
507
|
// A tier path token must be SEEDABLE (a relative or shell-syntax-carrying spelling is a dead rule
|
|
522
508
|
// the screen refuses to bless) and end on a known tier-tool tail. Any seedable absolute prefix is
|
|
523
509
|
// accepted — the user's own kit copy elsewhere is legitimate shape-wise; entries OUTSIDE the
|
|
@@ -794,7 +780,7 @@ export const screenAllowlistEntry = (pattern) => {
|
|
|
794
780
|
};
|
|
795
781
|
|
|
796
782
|
/**
|
|
797
|
-
* Derive the opt-in kit-tools tier for a project:
|
|
783
|
+
* Derive the opt-in kit-tools tier for a project: 12 wildcard entries (resolved-absolute script
|
|
798
784
|
* path + args wildcard), ONE exact run-gates entry pinned to the resolved project root, and the
|
|
799
785
|
* writer-preview exact dry-run byte-strings. Pure derivation — a stale path simply prompts again.
|
|
800
786
|
*/
|
package/tools/view-model.mjs
CHANGED
|
@@ -54,7 +54,11 @@ const recipesVm = (r) => {
|
|
|
54
54
|
if (r.error) return { error: r.error };
|
|
55
55
|
const pairs = [];
|
|
56
56
|
for (const [activity, slots] of Object.entries(r.activities ?? {})) {
|
|
57
|
-
|
|
57
|
+
// source + degradedFrom ride along: an effective recipe alone cannot tell a chosen value from a
|
|
58
|
+
// computed default, nor a degrade from a configuration that really names the resolved recipe.
|
|
59
|
+
for (const [slot, v] of Object.entries(slots)) {
|
|
60
|
+
pairs.push({ key: `${activity}.${slot}`, recipe: v.recipe, source: v.source ?? null, degradedFrom: v.degradedFrom ?? null });
|
|
61
|
+
}
|
|
58
62
|
}
|
|
59
63
|
return { pairs, detectError: r.detectError ?? null };
|
|
60
64
|
};
|
|
@@ -76,8 +80,18 @@ const velocityVm = (v) => {
|
|
|
76
80
|
|
|
77
81
|
const agentsVm = (a) => {
|
|
78
82
|
if (!a) return null;
|
|
79
|
-
if (a.error) return { error: a.error };
|
|
80
|
-
|
|
83
|
+
if (a.error) return { error: a.error, executor: a.executor ?? null, executorReason: a.executorReason ?? null };
|
|
84
|
+
const bundled = a.bundled ?? 0;
|
|
85
|
+
return {
|
|
86
|
+
bundled,
|
|
87
|
+
placed: a.placed ?? 0,
|
|
88
|
+
// The envelope counts the read-only vehicles; an envelope predating the executor field bundled
|
|
89
|
+
// only read-only ones.
|
|
90
|
+
readOnly: a.readOnly ?? (a.executor == null ? bundled : Math.max(bundled - 1, 0)),
|
|
91
|
+
// null = an envelope predating the field (unknown), never a state.
|
|
92
|
+
executor: a.executor ?? null,
|
|
93
|
+
executorReason: a.executorReason ?? null,
|
|
94
|
+
};
|
|
81
95
|
};
|
|
82
96
|
|
|
83
97
|
const hookVm = (h) => {
|