@attalabs/vinaya 0.42.1 → 0.43.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/dist/checks/bin/check-evidence-fresh.js +177 -152
- package/dist/checks/bin/check-registry-gates.js +10 -3
- package/dist/index.js +300 -173
- package/dist/lib/pre-push-cache-test-run.js +145 -144
- package/dist/lib/pre-push-changed-files.js +10 -3
- package/dist/lib/pre-push-progress-dir.js +169 -147
- package/dist/lib/pre-push-select-tests.js +16 -4
- package/dist/lib/push-progress-observer.js +169 -147
- package/dist/programs/archive.js +172 -148
- package/dist/programs/audit.js +169 -147
- package/dist/programs/check.js +172 -148
- package/dist/programs/commit-msg.js +172 -148
- package/dist/programs/dev-review-loop.js +300 -176
- package/dist/programs/dispatch.js +1905 -1877
- package/dist/programs/log-emit.js +172 -148
- package/dist/programs/log-selftest.js +172 -148
- package/dist/programs/log-send.js +172 -148
- package/dist/programs/pr-report.js +177 -152
- package/dist/programs/pr-snapshot.js +172 -148
- package/dist/programs/pr-verify-evidence.js +177 -152
- package/dist/programs/pr.js +172 -148
- package/dist/programs/review-post.js +172 -148
- package/dist/programs/review-status.js +180 -148
- package/dist/programs/run-engine.js +110594 -0
- package/dist/programs/supervised-command.js +67 -0
- package/dist/programs/sync.js +63 -39
- package/dist/programs/task-brief.js +174 -150
- package/dist/programs/task-sweep.js +244 -151
- package/dist/programs/task-tools-serve.js +260 -163
- package/dist/programs/tokens.js +172 -148
- package/dist/programs/waiver.js +172 -148
- package/dist/vinaya-strict/checks/registry.ts +1085 -0
- package/dist/vinaya-strict/executing/code-reviewer/README.md +3 -0
- package/dist/vinaya-strict/executing/code-reviewer/doctrine.md +185 -0
- package/dist/vinaya-strict/executing/code-reviewer/evals/README.md +1 -0
- package/dist/vinaya-strict/executing/code-reviewer/evals/code-reviewer-cases.json +280 -0
- package/dist/vinaya-strict/executing/code-reviewer/grants.yaml +22 -0
- package/dist/vinaya-strict/executing/code-reviewer/output.schema.json +93 -0
- package/dist/vinaya-strict/executing/code-reviewer/review-result.ts +347 -0
- package/dist/vinaya-strict/executing/dev-review.flow.yaml +103 -0
- package/dist/vinaya-strict/executing/developer/README.md +3 -0
- package/dist/vinaya-strict/executing/developer/developer-doctrine-shape.test.ts +69 -0
- package/dist/vinaya-strict/executing/developer/developer-turn-result.ts +286 -0
- package/dist/vinaya-strict/executing/developer/doctrine.md +111 -0
- package/dist/vinaya-strict/executing/developer/evals/README.md +1 -0
- package/dist/vinaya-strict/executing/developer/evals/developer-capability-cases.json +6275 -0
- package/dist/vinaya-strict/executing/developer/evals/developer-capability-held-out.json +11526 -0
- package/dist/vinaya-strict/executing/developer/evals/developer-capability-suite.test.ts +498 -0
- package/dist/vinaya-strict/executing/developer/evals/developer-capability-suite.ts +1407 -0
- package/dist/vinaya-strict/executing/developer/grants.yaml +25 -0
- package/dist/vinaya-strict/executing/developer/output.schema.json +148 -0
- package/dist/vinaya-strict/executing/developer/reference.md +376 -0
- package/dist/vinaya-strict/executing/operator/doctrine.md +209 -0
- package/dist/vinaya-strict/executing/security-reviewer/README.md +3 -0
- package/dist/vinaya-strict/executing/security-reviewer/doctrine.md +171 -0
- package/dist/vinaya-strict/executing/security-reviewer/evals/README.md +1 -0
- package/dist/vinaya-strict/executing/security-reviewer/evals/security-reviewer-cases.json +141 -0
- package/dist/vinaya-strict/executing/security-reviewer/grants.yaml +22 -0
- package/dist/vinaya-strict/executing/security-reviewer/output.schema.json +93 -0
- package/dist/vinaya-strict/integration/config/vinaya-config-section.ts +1278 -0
- package/dist/vinaya-strict/integration/policies/vinaya-policies.ts +52 -0
- package/dist/vinaya-strict/integration/process/process-integration.ts +57 -0
- package/dist/vinaya-strict/loops/dev-review/v2/dev-review-v2.flow.yaml +136 -0
- package/dist/vinaya-strict/process.yaml +43 -0
- package/dist/vinaya-strict/retrospecting/archivist/doctrine.md +174 -0
- package/dist/vinaya-strict/retrospecting/tranche-archivist/doctrine.md +270 -0
- package/dist/vinaya-strict/thinking/architect/doctrine.md +110 -0
- package/dist/vinaya-strict/thinking/planner/doctrine.md +105 -0
- package/dist/vinaya-strict/thinking/planner/tools/amend-rationale-deps.test.ts +128 -0
- package/dist/vinaya-strict/thinking/planner/tools/amend-rationale-deps.ts +169 -0
- package/dist/vinaya-strict/thinking/planner/tools/open-issue.test.ts +701 -0
- package/dist/vinaya-strict/thinking/planner/tools/open-issue.ts +1035 -0
- package/dist/vinaya-strict/thinking/planner/tools/planner-operations.test.ts +359 -0
- package/dist/vinaya-strict/thinking/planner/tools/planner-operations.ts +815 -0
- package/dist/vinaya-strict/thinking/planner/tools/planner-tools.test.ts +200 -0
- package/dist/vinaya-strict/thinking/planner/tools/planner-tools.ts +458 -0
- package/package.json +4 -2
- package/studio-standalone/apps/vinaya-studio/.next/BUILD_ID +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/build-manifest.json +2 -2
- package/studio-standalone/apps/vinaya-studio/.next/server/app/_global-error.html +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/server/app/_global-error.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/server/middleware-build-manifest.js +1 -1
- package/studio-standalone/apps/vinaya-studio/.next/server/pages/500.html +1 -1
- /package/studio-standalone/apps/vinaya-studio/.next/static/{yFfoujElgbwPk-7KNS-kw → x2q88XfwsihlevulRhIvs}/_buildManifest.js +0 -0
- /package/studio-standalone/apps/vinaya-studio/.next/static/{yFfoujElgbwPk-7KNS-kw → x2q88XfwsihlevulRhIvs}/_ssgManifest.js +0 -0
|
@@ -2676,21 +2676,145 @@ var init_compose = __esm(() => {
|
|
|
2676
2676
|
installVinayaConfigProvider();
|
|
2677
2677
|
});
|
|
2678
2678
|
|
|
2679
|
+
// ../../harness/kernel/log/roles.ts
|
|
2680
|
+
function registerRole(name, role) {
|
|
2681
|
+
roles.set(name, role);
|
|
2682
|
+
}
|
|
2683
|
+
function registerTitle(name, title) {
|
|
2684
|
+
titles.set(name, title);
|
|
2685
|
+
}
|
|
2686
|
+
function isRole(value) {
|
|
2687
|
+
return value !== undefined && roles.has(value);
|
|
2688
|
+
}
|
|
2689
|
+
function lookupRole(name) {
|
|
2690
|
+
return roles.get(name);
|
|
2691
|
+
}
|
|
2692
|
+
function lookupTitle(name) {
|
|
2693
|
+
return roles.get(name)?.title ?? titles.get(name);
|
|
2694
|
+
}
|
|
2695
|
+
var roles, titles;
|
|
2696
|
+
var init_roles = __esm(() => {
|
|
2697
|
+
roles = new Map;
|
|
2698
|
+
titles = new Map;
|
|
2699
|
+
});
|
|
2700
|
+
|
|
2701
|
+
// ../../harness/kernel/log/envelope.ts
|
|
2702
|
+
import { createHash as createHash2 } from "node:crypto";
|
|
2703
|
+
function actorIdFromEnv(role) {
|
|
2704
|
+
return role === undefined || role === "" ? null : role;
|
|
2705
|
+
}
|
|
2706
|
+
function lineageFieldFromEnv(value) {
|
|
2707
|
+
return value === undefined || value === "" ? null : value;
|
|
2708
|
+
}
|
|
2709
|
+
function attemptFromEnv(value) {
|
|
2710
|
+
if (value === undefined || value === "")
|
|
2711
|
+
return null;
|
|
2712
|
+
const n = Number(value);
|
|
2713
|
+
return Number.isInteger(n) ? n : null;
|
|
2714
|
+
}
|
|
2715
|
+
function provenanceFor(input) {
|
|
2716
|
+
if (input.provenance)
|
|
2717
|
+
return input.provenance;
|
|
2718
|
+
if (issueFromTask(input.env.task) === null && (input.branchIssue ?? null) !== null)
|
|
2719
|
+
return "unavailable";
|
|
2720
|
+
if (input.env.role || input.env.task)
|
|
2721
|
+
return "env_correlated";
|
|
2722
|
+
return "unavailable";
|
|
2723
|
+
}
|
|
2724
|
+
function issueFromTask(task) {
|
|
2725
|
+
if (task === undefined || task === "")
|
|
2726
|
+
return null;
|
|
2727
|
+
const n = Number(task);
|
|
2728
|
+
return Number.isInteger(n) ? n : null;
|
|
2729
|
+
}
|
|
2730
|
+
function roundFromEnv(round) {
|
|
2731
|
+
if (round === undefined || round === "")
|
|
2732
|
+
return;
|
|
2733
|
+
const n = Number(round);
|
|
2734
|
+
return Number.isInteger(n) ? n : undefined;
|
|
2735
|
+
}
|
|
2736
|
+
function prFromEnv(pr) {
|
|
2737
|
+
if (pr === undefined || pr === "")
|
|
2738
|
+
return;
|
|
2739
|
+
const n = Number(pr);
|
|
2740
|
+
return Number.isInteger(n) && n > 0 ? n : undefined;
|
|
2741
|
+
}
|
|
2742
|
+
function buildHeader(input) {
|
|
2743
|
+
const role = isRole(input.env.role) ? input.env.role : "unattributed";
|
|
2744
|
+
const round = roundFromEnv(input.env.round);
|
|
2745
|
+
const pr = prFromEnv(input.env.pr);
|
|
2746
|
+
const subject = {
|
|
2747
|
+
issue: issueFromTask(input.env.task) ?? input.branchIssue ?? null,
|
|
2748
|
+
role,
|
|
2749
|
+
...round !== undefined ? { round } : {},
|
|
2750
|
+
...pr !== undefined ? { pr } : {},
|
|
2751
|
+
...input.subject ?? {}
|
|
2752
|
+
};
|
|
2753
|
+
const issue = subject.issue;
|
|
2754
|
+
return {
|
|
2755
|
+
meta: {
|
|
2756
|
+
schema: 4,
|
|
2757
|
+
ts: input.now.toISOString(),
|
|
2758
|
+
run_id: input.runId,
|
|
2759
|
+
seq: input.seq,
|
|
2760
|
+
repo: input.repo,
|
|
2761
|
+
vinaya: input.vinaya,
|
|
2762
|
+
doctrine: input.doctrine,
|
|
2763
|
+
host: input.host,
|
|
2764
|
+
machine: createHash2("sha256").update(input.hostname).digest("hex"),
|
|
2765
|
+
event_id: input.eventId,
|
|
2766
|
+
process_id: input.processId,
|
|
2767
|
+
actor_id: actorIdFromEnv(input.env.role),
|
|
2768
|
+
lineage: {
|
|
2769
|
+
run: lineageFieldFromEnv(input.env.run),
|
|
2770
|
+
attempt: attemptFromEnv(input.env.attempt),
|
|
2771
|
+
parent: lineageFieldFromEnv(input.env.parent)
|
|
2772
|
+
},
|
|
2773
|
+
input_versions: {
|
|
2774
|
+
manifest_version: input.inputVersions?.manifestVersion ?? null,
|
|
2775
|
+
objectives_version: input.inputVersions?.objectivesVersion ?? null,
|
|
2776
|
+
brief_hash: input.inputVersions?.briefHash ?? null,
|
|
2777
|
+
ruling_ordinal: input.inputVersions?.rulingOrdinal ?? null,
|
|
2778
|
+
pause_bound_ruling: input.inputVersions?.pauseBoundRuling ?? null,
|
|
2779
|
+
policy_digest: input.inputVersions?.policyDigest ?? null
|
|
2780
|
+
},
|
|
2781
|
+
provenance: provenanceFor(input),
|
|
2782
|
+
work: {
|
|
2783
|
+
ref: lineageFieldFromEnv(input.env.workRef) ?? (issue === null ? null : String(issue)),
|
|
2784
|
+
repo: input.repo,
|
|
2785
|
+
change: pr === undefined ? null : String(pr),
|
|
2786
|
+
revision: input.revision ?? null
|
|
2787
|
+
},
|
|
2788
|
+
flow: {
|
|
2789
|
+
id: lineageFieldFromEnv(input.env.flow) ?? "vinaya",
|
|
2790
|
+
version: lineageFieldFromEnv(input.env.flowVersion)
|
|
2791
|
+
},
|
|
2792
|
+
runtime: lineageFieldFromEnv(input.env.runtime),
|
|
2793
|
+
process: {
|
|
2794
|
+
id: lineageFieldFromEnv(input.env.processId) ?? "vinaya",
|
|
2795
|
+
version: lineageFieldFromEnv(input.env.processVersion),
|
|
2796
|
+
digest: lineageFieldFromEnv(input.env.processDigest)
|
|
2797
|
+
},
|
|
2798
|
+
runner: {
|
|
2799
|
+
id: lineageFieldFromEnv(input.env.runnerId) ?? "standalone",
|
|
2800
|
+
version: lineageFieldFromEnv(input.env.runnerVersion)
|
|
2801
|
+
},
|
|
2802
|
+
source: lineageFieldFromEnv(input.env.source)
|
|
2803
|
+
},
|
|
2804
|
+
subject
|
|
2805
|
+
};
|
|
2806
|
+
}
|
|
2807
|
+
var init_envelope = __esm(() => {
|
|
2808
|
+
init_roles();
|
|
2809
|
+
});
|
|
2810
|
+
|
|
2679
2811
|
// ../../harness/kernel/log/schema.ts
|
|
2680
2812
|
import { z as z6 } from "zod";
|
|
2681
|
-
var CONFIDENCE_REASON_MAX_LENGTH = 280, REVIEW_FINDING_DESCRIPTION_MAX_LENGTH = 1000,
|
|
2813
|
+
var CONFIDENCE_REASON_MAX_LENGTH = 280, REVIEW_FINDING_DESCRIPTION_MAX_LENGTH = 1000, ROLE_NAME_PATTERN, RoleSchema, HOST_VALUES, HostSchema, RUN_ID_PATTERN, headerMetaCore, HeaderMetaV1Schema, LineageSchema, InputVersionsSchema, ProvenanceSchema, HeaderMetaV2Schema, WorkSchema, FlowSchema, HeaderMetaV3Schema, HeaderMetaV4Schema, HeaderMetaSchema, SubjectSchema, HeaderSchema, envelopeTail, ReviewFindingSchema, DispatchOutcomeSchema, dispatchShared, dispatchUsageField, DispatchEventSchema, CODE_TOKEN_PATTERN, CodeTokenSchema, ReviewerVerdictSchema, loopShared, DevReviewLoopEventSchema, ForgeOpSchema, ForgeWriteTargetSchema, forgeWriteShared, ForgeWriteEventSchema, GateOutcomeSchema, gateShared, GateEventSchema, OperationResultSchema, operationShared, OperationEventSchema, UsageUnitsSchema, usageShared, UsageEventSchema, RoleAttemptOutcomeSchema, roleAttemptShared, RoleAttemptEventSchema, handoffShared, HandoffEventSchema, EffectTargetSchema, effectShared, EffectEventSchema, CustomFieldValueSchema, customShared, CustomEventSchema, LogEventSchema;
|
|
2682
2814
|
var init_schema = __esm(() => {
|
|
2683
2815
|
init_custom();
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
"developer",
|
|
2687
|
-
"code-reviewer",
|
|
2688
|
-
"security",
|
|
2689
|
-
"principal",
|
|
2690
|
-
"archivist",
|
|
2691
|
-
"architect"
|
|
2692
|
-
];
|
|
2693
|
-
RoleSchema = z6.enum(ROLE_VALUES);
|
|
2816
|
+
ROLE_NAME_PATTERN = /^[a-z0-9-]+$/;
|
|
2817
|
+
RoleSchema = z6.string().regex(ROLE_NAME_PATTERN);
|
|
2694
2818
|
HOST_VALUES = ["hook", "ci", "cli", "loop"];
|
|
2695
2819
|
HostSchema = z6.enum(HOST_VALUES);
|
|
2696
2820
|
RUN_ID_PATTERN = /^[A-Za-z0-9_.-]{1,128}$/;
|
|
@@ -3272,119 +3396,6 @@ var init_schema = __esm(() => {
|
|
|
3272
3396
|
]);
|
|
3273
3397
|
});
|
|
3274
3398
|
|
|
3275
|
-
// ../../harness/kernel/log/envelope.ts
|
|
3276
|
-
import { createHash as createHash2 } from "node:crypto";
|
|
3277
|
-
function isRole(value) {
|
|
3278
|
-
return value !== undefined && ROLE_VALUES.includes(value);
|
|
3279
|
-
}
|
|
3280
|
-
function actorIdFromEnv(role) {
|
|
3281
|
-
return role === undefined || role === "" ? null : role;
|
|
3282
|
-
}
|
|
3283
|
-
function lineageFieldFromEnv(value) {
|
|
3284
|
-
return value === undefined || value === "" ? null : value;
|
|
3285
|
-
}
|
|
3286
|
-
function attemptFromEnv(value) {
|
|
3287
|
-
if (value === undefined || value === "")
|
|
3288
|
-
return null;
|
|
3289
|
-
const n = Number(value);
|
|
3290
|
-
return Number.isInteger(n) ? n : null;
|
|
3291
|
-
}
|
|
3292
|
-
function provenanceFor(input) {
|
|
3293
|
-
if (input.provenance)
|
|
3294
|
-
return input.provenance;
|
|
3295
|
-
if (issueFromTask(input.env.task) === null && (input.branchIssue ?? null) !== null)
|
|
3296
|
-
return "unavailable";
|
|
3297
|
-
if (input.env.role || input.env.task)
|
|
3298
|
-
return "env_correlated";
|
|
3299
|
-
return "unavailable";
|
|
3300
|
-
}
|
|
3301
|
-
function issueFromTask(task) {
|
|
3302
|
-
if (task === undefined || task === "")
|
|
3303
|
-
return null;
|
|
3304
|
-
const n = Number(task);
|
|
3305
|
-
return Number.isInteger(n) ? n : null;
|
|
3306
|
-
}
|
|
3307
|
-
function roundFromEnv(round) {
|
|
3308
|
-
if (round === undefined || round === "")
|
|
3309
|
-
return;
|
|
3310
|
-
const n = Number(round);
|
|
3311
|
-
return Number.isInteger(n) ? n : undefined;
|
|
3312
|
-
}
|
|
3313
|
-
function prFromEnv(pr) {
|
|
3314
|
-
if (pr === undefined || pr === "")
|
|
3315
|
-
return;
|
|
3316
|
-
const n = Number(pr);
|
|
3317
|
-
return Number.isInteger(n) && n > 0 ? n : undefined;
|
|
3318
|
-
}
|
|
3319
|
-
function buildHeader(input) {
|
|
3320
|
-
const role = isRole(input.env.role) ? input.env.role : "unattributed";
|
|
3321
|
-
const round = roundFromEnv(input.env.round);
|
|
3322
|
-
const pr = prFromEnv(input.env.pr);
|
|
3323
|
-
const subject = {
|
|
3324
|
-
issue: issueFromTask(input.env.task) ?? input.branchIssue ?? null,
|
|
3325
|
-
role,
|
|
3326
|
-
...round !== undefined ? { round } : {},
|
|
3327
|
-
...pr !== undefined ? { pr } : {},
|
|
3328
|
-
...input.subject ?? {}
|
|
3329
|
-
};
|
|
3330
|
-
const issue = subject.issue;
|
|
3331
|
-
return {
|
|
3332
|
-
meta: {
|
|
3333
|
-
schema: 4,
|
|
3334
|
-
ts: input.now.toISOString(),
|
|
3335
|
-
run_id: input.runId,
|
|
3336
|
-
seq: input.seq,
|
|
3337
|
-
repo: input.repo,
|
|
3338
|
-
vinaya: input.vinaya,
|
|
3339
|
-
doctrine: input.doctrine,
|
|
3340
|
-
host: input.host,
|
|
3341
|
-
machine: createHash2("sha256").update(input.hostname).digest("hex"),
|
|
3342
|
-
event_id: input.eventId,
|
|
3343
|
-
process_id: input.processId,
|
|
3344
|
-
actor_id: actorIdFromEnv(input.env.role),
|
|
3345
|
-
lineage: {
|
|
3346
|
-
run: lineageFieldFromEnv(input.env.run),
|
|
3347
|
-
attempt: attemptFromEnv(input.env.attempt),
|
|
3348
|
-
parent: lineageFieldFromEnv(input.env.parent)
|
|
3349
|
-
},
|
|
3350
|
-
input_versions: {
|
|
3351
|
-
manifest_version: input.inputVersions?.manifestVersion ?? null,
|
|
3352
|
-
objectives_version: input.inputVersions?.objectivesVersion ?? null,
|
|
3353
|
-
brief_hash: input.inputVersions?.briefHash ?? null,
|
|
3354
|
-
ruling_ordinal: input.inputVersions?.rulingOrdinal ?? null,
|
|
3355
|
-
pause_bound_ruling: input.inputVersions?.pauseBoundRuling ?? null,
|
|
3356
|
-
policy_digest: input.inputVersions?.policyDigest ?? null
|
|
3357
|
-
},
|
|
3358
|
-
provenance: provenanceFor(input),
|
|
3359
|
-
work: {
|
|
3360
|
-
ref: lineageFieldFromEnv(input.env.workRef) ?? (issue === null ? null : String(issue)),
|
|
3361
|
-
repo: input.repo,
|
|
3362
|
-
change: pr === undefined ? null : String(pr),
|
|
3363
|
-
revision: input.revision ?? null
|
|
3364
|
-
},
|
|
3365
|
-
flow: {
|
|
3366
|
-
id: lineageFieldFromEnv(input.env.flow) ?? "vinaya",
|
|
3367
|
-
version: lineageFieldFromEnv(input.env.flowVersion)
|
|
3368
|
-
},
|
|
3369
|
-
runtime: lineageFieldFromEnv(input.env.runtime),
|
|
3370
|
-
process: {
|
|
3371
|
-
id: lineageFieldFromEnv(input.env.processId) ?? "vinaya",
|
|
3372
|
-
version: lineageFieldFromEnv(input.env.processVersion),
|
|
3373
|
-
digest: lineageFieldFromEnv(input.env.processDigest)
|
|
3374
|
-
},
|
|
3375
|
-
runner: {
|
|
3376
|
-
id: lineageFieldFromEnv(input.env.runnerId) ?? "standalone",
|
|
3377
|
-
version: lineageFieldFromEnv(input.env.runnerVersion)
|
|
3378
|
-
},
|
|
3379
|
-
source: lineageFieldFromEnv(input.env.source)
|
|
3380
|
-
},
|
|
3381
|
-
subject
|
|
3382
|
-
};
|
|
3383
|
-
}
|
|
3384
|
-
var init_envelope = __esm(() => {
|
|
3385
|
-
init_schema();
|
|
3386
|
-
});
|
|
3387
|
-
|
|
3388
3399
|
// ../../harness/kernel/log/redact.ts
|
|
3389
3400
|
function redactString(value, home) {
|
|
3390
3401
|
let out = value.replace(GITHUB_TOKEN_PATTERN, "<redacted>").replace(CLASSIC_GITHUB_PAT_PATTERN, "$1<redacted>").replace(BEARER_TOKEN_PATTERN, "<redacted>").replace(AWS_ACCESS_KEY_PATTERN, "<redacted>").replace(SLACK_TOKEN_PATTERN, "<redacted>").replace(STRIPE_KEY_PATTERN, "<redacted>").replace(ANTHROPIC_KEY_PATTERN, "<redacted>").replace(OPENAI_KEY_PATTERN, "<redacted>").replace(NPM_TOKEN_PATTERN, "<redacted>").replace(JWT_PATTERN, "<redacted>").replace(PEM_BLOCK_PATTERN, "<redacted>").replace(BASIC_AUTH_URL_PATTERN, "$1<redacted>@").replace(GENERIC_SECRET_ASSIGNMENT_PATTERN, "$1<redacted>");
|
|
@@ -3891,7 +3902,8 @@ function code(value) {
|
|
|
3891
3902
|
return typeof value === "string" && CODE_TOKEN_PATTERN.test(value) ? value : null;
|
|
3892
3903
|
}
|
|
3893
3904
|
function roleSubject(value, sentenceStart = true) {
|
|
3894
|
-
const
|
|
3905
|
+
const known = typeof value === "string" ? lookupRole(value) : undefined;
|
|
3906
|
+
const name = known ? `the ${known.reading}` : "a role";
|
|
3895
3907
|
return sentenceStart ? `${name[0]?.toUpperCase()}${name.slice(1)}` : name;
|
|
3896
3908
|
}
|
|
3897
3909
|
function roundLabel(record) {
|
|
@@ -4010,7 +4022,7 @@ function conflictReentry(record) {
|
|
|
4010
4022
|
function dispatched(record) {
|
|
4011
4023
|
const role = text(record.target_role);
|
|
4012
4024
|
const who = roleSubject(role);
|
|
4013
|
-
const reviewing = role
|
|
4025
|
+
const reviewing = role !== null && (lookupRole(role)?.reviews ?? false);
|
|
4014
4026
|
const round = whole(record.round);
|
|
4015
4027
|
return {
|
|
4016
4028
|
kind: "working",
|
|
@@ -4069,6 +4081,7 @@ function narrate(record, earlier = []) {
|
|
|
4069
4081
|
}
|
|
4070
4082
|
var REASONS, PAUSE_WITHOUT_CODE;
|
|
4071
4083
|
var init_narration = __esm(() => {
|
|
4084
|
+
init_roles();
|
|
4072
4085
|
init_schema();
|
|
4073
4086
|
REASONS = {
|
|
4074
4087
|
escalation: { words: "a role escalated a question", person: true },
|
|
@@ -4101,13 +4114,7 @@ var init_narration = __esm(() => {
|
|
|
4101
4114
|
|
|
4102
4115
|
// ../../harness/kernel/adapters/agents/agent-line.ts
|
|
4103
4116
|
function roleLabel(role) {
|
|
4104
|
-
|
|
4105
|
-
return roleLabels[role];
|
|
4106
|
-
if (role === "dev-review-loop")
|
|
4107
|
-
return "Loop";
|
|
4108
|
-
if (role === "operator")
|
|
4109
|
-
return "Operator";
|
|
4110
|
-
return role.replace(/-/g, " ").replace(/\b\w/g, (letter) => letter.toUpperCase());
|
|
4117
|
+
return lookupTitle(role) ?? role.replace(/-/g, " ").replace(/\b\w/g, (letter) => letter.toUpperCase());
|
|
4111
4118
|
}
|
|
4112
4119
|
function formatLineMeta(meta) {
|
|
4113
4120
|
if (meta === undefined)
|
|
@@ -4121,17 +4128,9 @@ function formatAgentLine(role, words, options = {}) {
|
|
|
4121
4128
|
const mark = options.unicode ?? true ? unicodeMarks[options.mark ?? "working"] : asciiMarks[options.mark ?? "working"];
|
|
4122
4129
|
return `${time} ${mark} ${roleLabel(role)} ${words}`;
|
|
4123
4130
|
}
|
|
4124
|
-
var
|
|
4131
|
+
var unicodeMarks, asciiMarks, META_KEY, META_VALUE;
|
|
4125
4132
|
var init_agent_line = __esm(() => {
|
|
4126
|
-
|
|
4127
|
-
planner: "Planner",
|
|
4128
|
-
developer: "Developer",
|
|
4129
|
-
"code-reviewer": "Code review",
|
|
4130
|
-
security: "Security",
|
|
4131
|
-
principal: "Principal",
|
|
4132
|
-
archivist: "Archivist",
|
|
4133
|
-
architect: "Architect"
|
|
4134
|
-
};
|
|
4133
|
+
init_roles();
|
|
4135
4134
|
unicodeMarks = { working: "▸", done: "✓", failed: "✕", waiting: "◌", round: "◆" };
|
|
4136
4135
|
asciiMarks = { working: ">", done: "+", failed: "x", waiting: "~", round: "#" };
|
|
4137
4136
|
META_KEY = /^[a-z]+$/;
|
|
@@ -6073,6 +6072,28 @@ var init_registry = __esm(() => {
|
|
|
6073
6072
|
CORE_CHECK_RING = Object.fromEntries(REGISTRY.map(([spec, ring]) => [spec.name, ring]));
|
|
6074
6073
|
});
|
|
6075
6074
|
|
|
6075
|
+
// ../../harness/processes/vinaya-strict/integration/log/log-roles.ts
|
|
6076
|
+
function registerVinayaLogRoles() {
|
|
6077
|
+
for (const { name, reading, title, reviews } of VINAYA_LOG_ROLES)
|
|
6078
|
+
registerRole(name, { reading, title, reviews });
|
|
6079
|
+
registerTitle("dev-review-loop", "Loop");
|
|
6080
|
+
}
|
|
6081
|
+
var VINAYA_LOG_ROLES, VINAYA_LOG_ROLE_NAMES;
|
|
6082
|
+
var init_log_roles = __esm(() => {
|
|
6083
|
+
init_roles();
|
|
6084
|
+
VINAYA_LOG_ROLES = [
|
|
6085
|
+
{ name: "planner", reading: "planner", title: "Planner", reviews: false },
|
|
6086
|
+
{ name: "developer", reading: "developer", title: "Developer", reviews: false },
|
|
6087
|
+
{ name: "code-reviewer", reading: "code reviewer", title: "Code review", reviews: true },
|
|
6088
|
+
{ name: "security", reading: "security reviewer", title: "Security", reviews: true },
|
|
6089
|
+
{ name: "principal", reading: "principal", title: "Principal", reviews: false },
|
|
6090
|
+
{ name: "archivist", reading: "archivist", title: "Archivist", reviews: false },
|
|
6091
|
+
{ name: "architect", reading: "architect", title: "Architect", reviews: false }
|
|
6092
|
+
];
|
|
6093
|
+
VINAYA_LOG_ROLE_NAMES = VINAYA_LOG_ROLES.map((role) => role.name);
|
|
6094
|
+
registerVinayaLogRoles();
|
|
6095
|
+
});
|
|
6096
|
+
|
|
6076
6097
|
// ../../harness/processes/vinaya-strict/integration/log/branch-issue.ts
|
|
6077
6098
|
import { execFile as execFile5 } from "node:child_process";
|
|
6078
6099
|
import { promisify as promisify5 } from "node:util";
|
|
@@ -6275,6 +6296,7 @@ function installVinayaLogSinkFactory() {
|
|
|
6275
6296
|
var init_log_sink_factory = __esm(() => {
|
|
6276
6297
|
init_log_sink();
|
|
6277
6298
|
init_package_root();
|
|
6299
|
+
init_log_roles();
|
|
6278
6300
|
init_branch_issue();
|
|
6279
6301
|
init_doctrine_version();
|
|
6280
6302
|
});
|
|
@@ -6680,8 +6702,8 @@ var init_protected_paths2 = __esm(() => {
|
|
|
6680
6702
|
|
|
6681
6703
|
// ../../harness/processes/vinaya-strict/integration/policies/roles.ts
|
|
6682
6704
|
var GRANTED_ROLES, ROLE_TOOL_GRANTS, VINAYA_TOOL_GRANTS, VINAYA_BROKER_ROLES, VINAYA_BOUNDARY_ROLES, OPERATOR_TOOL_GRANT, VINAYA_ROUTER_ROLES;
|
|
6683
|
-
var
|
|
6684
|
-
|
|
6705
|
+
var init_roles2 = __esm(() => {
|
|
6706
|
+
init_log_roles();
|
|
6685
6707
|
GRANTED_ROLES = ["developer", "code-reviewer", "security", "controller"];
|
|
6686
6708
|
ROLE_TOOL_GRANTS = {
|
|
6687
6709
|
developer: [
|
|
@@ -6700,7 +6722,7 @@ var init_roles = __esm(() => {
|
|
|
6700
6722
|
};
|
|
6701
6723
|
VINAYA_TOOL_GRANTS = { roles: GRANTED_ROLES, grants: ROLE_TOOL_GRANTS };
|
|
6702
6724
|
VINAYA_BROKER_ROLES = {
|
|
6703
|
-
recognizedRoles:
|
|
6725
|
+
recognizedRoles: VINAYA_LOG_ROLE_NAMES,
|
|
6704
6726
|
workerRoles: ["developer"],
|
|
6705
6727
|
surfaceOwner: "the Planner"
|
|
6706
6728
|
};
|
|
@@ -6784,7 +6806,7 @@ function vinayaRouterPolicies() {
|
|
|
6784
6806
|
var init_vinaya_policies = __esm(() => {
|
|
6785
6807
|
init_launch_records();
|
|
6786
6808
|
init_protected_paths2();
|
|
6787
|
-
|
|
6809
|
+
init_roles2();
|
|
6788
6810
|
init_scratch_names();
|
|
6789
6811
|
});
|
|
6790
6812
|
|
|
@@ -6871,7 +6893,9 @@ var init_programs = __esm(() => {
|
|
|
6871
6893
|
program("log-selftest", `${P}/integration/bin/log-selftest.ts`, "dist/programs/log-selftest.js", [
|
|
6872
6894
|
words("log", "selftest")
|
|
6873
6895
|
]),
|
|
6874
|
-
program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")])
|
|
6896
|
+
program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")]),
|
|
6897
|
+
program("run-engine", `${P}/bin/run-engine.ts`, "dist/programs/run-engine.js"),
|
|
6898
|
+
program("supervised-command", `${P}/loops/dev-review/v2/supervised-command.ts`, "dist/programs/supervised-command.js")
|
|
6875
6899
|
]);
|
|
6876
6900
|
SOURCE_ROOT = join12(dirname9(fileURLToPath4(import.meta.url)), "..", "..", "..", "..");
|
|
6877
6901
|
FROM_SOURCE = fileURLToPath4(import.meta.url).endsWith(".ts");
|