@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
|
@@ -3312,21 +3312,145 @@ var init_resolve_repo = __esm(() => {
|
|
|
3312
3312
|
};
|
|
3313
3313
|
});
|
|
3314
3314
|
|
|
3315
|
+
// ../../harness/kernel/log/roles.ts
|
|
3316
|
+
function registerRole(name, role) {
|
|
3317
|
+
roles.set(name, role);
|
|
3318
|
+
}
|
|
3319
|
+
function registerTitle(name, title) {
|
|
3320
|
+
titles.set(name, title);
|
|
3321
|
+
}
|
|
3322
|
+
function isRole(value) {
|
|
3323
|
+
return value !== undefined && roles.has(value);
|
|
3324
|
+
}
|
|
3325
|
+
function lookupRole(name) {
|
|
3326
|
+
return roles.get(name);
|
|
3327
|
+
}
|
|
3328
|
+
function lookupTitle(name) {
|
|
3329
|
+
return roles.get(name)?.title ?? titles.get(name);
|
|
3330
|
+
}
|
|
3331
|
+
var roles, titles;
|
|
3332
|
+
var init_roles = __esm(() => {
|
|
3333
|
+
roles = new Map;
|
|
3334
|
+
titles = new Map;
|
|
3335
|
+
});
|
|
3336
|
+
|
|
3337
|
+
// ../../harness/kernel/log/envelope.ts
|
|
3338
|
+
import { createHash as createHash2 } from "node:crypto";
|
|
3339
|
+
function actorIdFromEnv(role) {
|
|
3340
|
+
return role === undefined || role === "" ? null : role;
|
|
3341
|
+
}
|
|
3342
|
+
function lineageFieldFromEnv(value) {
|
|
3343
|
+
return value === undefined || value === "" ? null : value;
|
|
3344
|
+
}
|
|
3345
|
+
function attemptFromEnv(value) {
|
|
3346
|
+
if (value === undefined || value === "")
|
|
3347
|
+
return null;
|
|
3348
|
+
const n = Number(value);
|
|
3349
|
+
return Number.isInteger(n) ? n : null;
|
|
3350
|
+
}
|
|
3351
|
+
function provenanceFor(input) {
|
|
3352
|
+
if (input.provenance)
|
|
3353
|
+
return input.provenance;
|
|
3354
|
+
if (issueFromTask(input.env.task) === null && (input.branchIssue ?? null) !== null)
|
|
3355
|
+
return "unavailable";
|
|
3356
|
+
if (input.env.role || input.env.task)
|
|
3357
|
+
return "env_correlated";
|
|
3358
|
+
return "unavailable";
|
|
3359
|
+
}
|
|
3360
|
+
function issueFromTask(task) {
|
|
3361
|
+
if (task === undefined || task === "")
|
|
3362
|
+
return null;
|
|
3363
|
+
const n = Number(task);
|
|
3364
|
+
return Number.isInteger(n) ? n : null;
|
|
3365
|
+
}
|
|
3366
|
+
function roundFromEnv(round) {
|
|
3367
|
+
if (round === undefined || round === "")
|
|
3368
|
+
return;
|
|
3369
|
+
const n = Number(round);
|
|
3370
|
+
return Number.isInteger(n) ? n : undefined;
|
|
3371
|
+
}
|
|
3372
|
+
function prFromEnv(pr) {
|
|
3373
|
+
if (pr === undefined || pr === "")
|
|
3374
|
+
return;
|
|
3375
|
+
const n = Number(pr);
|
|
3376
|
+
return Number.isInteger(n) && n > 0 ? n : undefined;
|
|
3377
|
+
}
|
|
3378
|
+
function buildHeader(input) {
|
|
3379
|
+
const role = isRole(input.env.role) ? input.env.role : "unattributed";
|
|
3380
|
+
const round = roundFromEnv(input.env.round);
|
|
3381
|
+
const pr = prFromEnv(input.env.pr);
|
|
3382
|
+
const subject = {
|
|
3383
|
+
issue: issueFromTask(input.env.task) ?? input.branchIssue ?? null,
|
|
3384
|
+
role,
|
|
3385
|
+
...round !== undefined ? { round } : {},
|
|
3386
|
+
...pr !== undefined ? { pr } : {},
|
|
3387
|
+
...input.subject ?? {}
|
|
3388
|
+
};
|
|
3389
|
+
const issue = subject.issue;
|
|
3390
|
+
return {
|
|
3391
|
+
meta: {
|
|
3392
|
+
schema: 4,
|
|
3393
|
+
ts: input.now.toISOString(),
|
|
3394
|
+
run_id: input.runId,
|
|
3395
|
+
seq: input.seq,
|
|
3396
|
+
repo: input.repo,
|
|
3397
|
+
vinaya: input.vinaya,
|
|
3398
|
+
doctrine: input.doctrine,
|
|
3399
|
+
host: input.host,
|
|
3400
|
+
machine: createHash2("sha256").update(input.hostname).digest("hex"),
|
|
3401
|
+
event_id: input.eventId,
|
|
3402
|
+
process_id: input.processId,
|
|
3403
|
+
actor_id: actorIdFromEnv(input.env.role),
|
|
3404
|
+
lineage: {
|
|
3405
|
+
run: lineageFieldFromEnv(input.env.run),
|
|
3406
|
+
attempt: attemptFromEnv(input.env.attempt),
|
|
3407
|
+
parent: lineageFieldFromEnv(input.env.parent)
|
|
3408
|
+
},
|
|
3409
|
+
input_versions: {
|
|
3410
|
+
manifest_version: input.inputVersions?.manifestVersion ?? null,
|
|
3411
|
+
objectives_version: input.inputVersions?.objectivesVersion ?? null,
|
|
3412
|
+
brief_hash: input.inputVersions?.briefHash ?? null,
|
|
3413
|
+
ruling_ordinal: input.inputVersions?.rulingOrdinal ?? null,
|
|
3414
|
+
pause_bound_ruling: input.inputVersions?.pauseBoundRuling ?? null,
|
|
3415
|
+
policy_digest: input.inputVersions?.policyDigest ?? null
|
|
3416
|
+
},
|
|
3417
|
+
provenance: provenanceFor(input),
|
|
3418
|
+
work: {
|
|
3419
|
+
ref: lineageFieldFromEnv(input.env.workRef) ?? (issue === null ? null : String(issue)),
|
|
3420
|
+
repo: input.repo,
|
|
3421
|
+
change: pr === undefined ? null : String(pr),
|
|
3422
|
+
revision: input.revision ?? null
|
|
3423
|
+
},
|
|
3424
|
+
flow: {
|
|
3425
|
+
id: lineageFieldFromEnv(input.env.flow) ?? "vinaya",
|
|
3426
|
+
version: lineageFieldFromEnv(input.env.flowVersion)
|
|
3427
|
+
},
|
|
3428
|
+
runtime: lineageFieldFromEnv(input.env.runtime),
|
|
3429
|
+
process: {
|
|
3430
|
+
id: lineageFieldFromEnv(input.env.processId) ?? "vinaya",
|
|
3431
|
+
version: lineageFieldFromEnv(input.env.processVersion),
|
|
3432
|
+
digest: lineageFieldFromEnv(input.env.processDigest)
|
|
3433
|
+
},
|
|
3434
|
+
runner: {
|
|
3435
|
+
id: lineageFieldFromEnv(input.env.runnerId) ?? "standalone",
|
|
3436
|
+
version: lineageFieldFromEnv(input.env.runnerVersion)
|
|
3437
|
+
},
|
|
3438
|
+
source: lineageFieldFromEnv(input.env.source)
|
|
3439
|
+
},
|
|
3440
|
+
subject
|
|
3441
|
+
};
|
|
3442
|
+
}
|
|
3443
|
+
var init_envelope = __esm(() => {
|
|
3444
|
+
init_roles();
|
|
3445
|
+
});
|
|
3446
|
+
|
|
3315
3447
|
// ../../harness/kernel/log/schema.ts
|
|
3316
3448
|
import { z as z6 } from "zod";
|
|
3317
|
-
var CONFIDENCE_REASON_MAX_LENGTH = 280, REVIEW_FINDING_DESCRIPTION_MAX_LENGTH = 1000,
|
|
3449
|
+
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;
|
|
3318
3450
|
var init_schema = __esm(() => {
|
|
3319
3451
|
init_custom();
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
"developer",
|
|
3323
|
-
"code-reviewer",
|
|
3324
|
-
"security",
|
|
3325
|
-
"principal",
|
|
3326
|
-
"archivist",
|
|
3327
|
-
"architect"
|
|
3328
|
-
];
|
|
3329
|
-
RoleSchema = z6.enum(ROLE_VALUES);
|
|
3452
|
+
ROLE_NAME_PATTERN = /^[a-z0-9-]+$/;
|
|
3453
|
+
RoleSchema = z6.string().regex(ROLE_NAME_PATTERN);
|
|
3330
3454
|
HOST_VALUES = ["hook", "ci", "cli", "loop"];
|
|
3331
3455
|
HostSchema = z6.enum(HOST_VALUES);
|
|
3332
3456
|
RUN_ID_PATTERN = /^[A-Za-z0-9_.-]{1,128}$/;
|
|
@@ -3908,119 +4032,6 @@ var init_schema = __esm(() => {
|
|
|
3908
4032
|
]);
|
|
3909
4033
|
});
|
|
3910
4034
|
|
|
3911
|
-
// ../../harness/kernel/log/envelope.ts
|
|
3912
|
-
import { createHash as createHash2 } from "node:crypto";
|
|
3913
|
-
function isRole(value) {
|
|
3914
|
-
return value !== undefined && ROLE_VALUES.includes(value);
|
|
3915
|
-
}
|
|
3916
|
-
function actorIdFromEnv(role) {
|
|
3917
|
-
return role === undefined || role === "" ? null : role;
|
|
3918
|
-
}
|
|
3919
|
-
function lineageFieldFromEnv(value) {
|
|
3920
|
-
return value === undefined || value === "" ? null : value;
|
|
3921
|
-
}
|
|
3922
|
-
function attemptFromEnv(value) {
|
|
3923
|
-
if (value === undefined || value === "")
|
|
3924
|
-
return null;
|
|
3925
|
-
const n = Number(value);
|
|
3926
|
-
return Number.isInteger(n) ? n : null;
|
|
3927
|
-
}
|
|
3928
|
-
function provenanceFor(input) {
|
|
3929
|
-
if (input.provenance)
|
|
3930
|
-
return input.provenance;
|
|
3931
|
-
if (issueFromTask(input.env.task) === null && (input.branchIssue ?? null) !== null)
|
|
3932
|
-
return "unavailable";
|
|
3933
|
-
if (input.env.role || input.env.task)
|
|
3934
|
-
return "env_correlated";
|
|
3935
|
-
return "unavailable";
|
|
3936
|
-
}
|
|
3937
|
-
function issueFromTask(task) {
|
|
3938
|
-
if (task === undefined || task === "")
|
|
3939
|
-
return null;
|
|
3940
|
-
const n = Number(task);
|
|
3941
|
-
return Number.isInteger(n) ? n : null;
|
|
3942
|
-
}
|
|
3943
|
-
function roundFromEnv(round) {
|
|
3944
|
-
if (round === undefined || round === "")
|
|
3945
|
-
return;
|
|
3946
|
-
const n = Number(round);
|
|
3947
|
-
return Number.isInteger(n) ? n : undefined;
|
|
3948
|
-
}
|
|
3949
|
-
function prFromEnv(pr) {
|
|
3950
|
-
if (pr === undefined || pr === "")
|
|
3951
|
-
return;
|
|
3952
|
-
const n = Number(pr);
|
|
3953
|
-
return Number.isInteger(n) && n > 0 ? n : undefined;
|
|
3954
|
-
}
|
|
3955
|
-
function buildHeader(input) {
|
|
3956
|
-
const role = isRole(input.env.role) ? input.env.role : "unattributed";
|
|
3957
|
-
const round = roundFromEnv(input.env.round);
|
|
3958
|
-
const pr = prFromEnv(input.env.pr);
|
|
3959
|
-
const subject = {
|
|
3960
|
-
issue: issueFromTask(input.env.task) ?? input.branchIssue ?? null,
|
|
3961
|
-
role,
|
|
3962
|
-
...round !== undefined ? { round } : {},
|
|
3963
|
-
...pr !== undefined ? { pr } : {},
|
|
3964
|
-
...input.subject ?? {}
|
|
3965
|
-
};
|
|
3966
|
-
const issue = subject.issue;
|
|
3967
|
-
return {
|
|
3968
|
-
meta: {
|
|
3969
|
-
schema: 4,
|
|
3970
|
-
ts: input.now.toISOString(),
|
|
3971
|
-
run_id: input.runId,
|
|
3972
|
-
seq: input.seq,
|
|
3973
|
-
repo: input.repo,
|
|
3974
|
-
vinaya: input.vinaya,
|
|
3975
|
-
doctrine: input.doctrine,
|
|
3976
|
-
host: input.host,
|
|
3977
|
-
machine: createHash2("sha256").update(input.hostname).digest("hex"),
|
|
3978
|
-
event_id: input.eventId,
|
|
3979
|
-
process_id: input.processId,
|
|
3980
|
-
actor_id: actorIdFromEnv(input.env.role),
|
|
3981
|
-
lineage: {
|
|
3982
|
-
run: lineageFieldFromEnv(input.env.run),
|
|
3983
|
-
attempt: attemptFromEnv(input.env.attempt),
|
|
3984
|
-
parent: lineageFieldFromEnv(input.env.parent)
|
|
3985
|
-
},
|
|
3986
|
-
input_versions: {
|
|
3987
|
-
manifest_version: input.inputVersions?.manifestVersion ?? null,
|
|
3988
|
-
objectives_version: input.inputVersions?.objectivesVersion ?? null,
|
|
3989
|
-
brief_hash: input.inputVersions?.briefHash ?? null,
|
|
3990
|
-
ruling_ordinal: input.inputVersions?.rulingOrdinal ?? null,
|
|
3991
|
-
pause_bound_ruling: input.inputVersions?.pauseBoundRuling ?? null,
|
|
3992
|
-
policy_digest: input.inputVersions?.policyDigest ?? null
|
|
3993
|
-
},
|
|
3994
|
-
provenance: provenanceFor(input),
|
|
3995
|
-
work: {
|
|
3996
|
-
ref: lineageFieldFromEnv(input.env.workRef) ?? (issue === null ? null : String(issue)),
|
|
3997
|
-
repo: input.repo,
|
|
3998
|
-
change: pr === undefined ? null : String(pr),
|
|
3999
|
-
revision: input.revision ?? null
|
|
4000
|
-
},
|
|
4001
|
-
flow: {
|
|
4002
|
-
id: lineageFieldFromEnv(input.env.flow) ?? "vinaya",
|
|
4003
|
-
version: lineageFieldFromEnv(input.env.flowVersion)
|
|
4004
|
-
},
|
|
4005
|
-
runtime: lineageFieldFromEnv(input.env.runtime),
|
|
4006
|
-
process: {
|
|
4007
|
-
id: lineageFieldFromEnv(input.env.processId) ?? "vinaya",
|
|
4008
|
-
version: lineageFieldFromEnv(input.env.processVersion),
|
|
4009
|
-
digest: lineageFieldFromEnv(input.env.processDigest)
|
|
4010
|
-
},
|
|
4011
|
-
runner: {
|
|
4012
|
-
id: lineageFieldFromEnv(input.env.runnerId) ?? "standalone",
|
|
4013
|
-
version: lineageFieldFromEnv(input.env.runnerVersion)
|
|
4014
|
-
},
|
|
4015
|
-
source: lineageFieldFromEnv(input.env.source)
|
|
4016
|
-
},
|
|
4017
|
-
subject
|
|
4018
|
-
};
|
|
4019
|
-
}
|
|
4020
|
-
var init_envelope = __esm(() => {
|
|
4021
|
-
init_schema();
|
|
4022
|
-
});
|
|
4023
|
-
|
|
4024
4035
|
// ../../harness/kernel/log/redact.ts
|
|
4025
4036
|
function redactString(value, home) {
|
|
4026
4037
|
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>");
|
|
@@ -4634,7 +4645,8 @@ function code(value) {
|
|
|
4634
4645
|
return typeof value === "string" && CODE_TOKEN_PATTERN.test(value) ? value : null;
|
|
4635
4646
|
}
|
|
4636
4647
|
function roleSubject(value, sentenceStart = true) {
|
|
4637
|
-
const
|
|
4648
|
+
const known = typeof value === "string" ? lookupRole(value) : undefined;
|
|
4649
|
+
const name = known ? `the ${known.reading}` : "a role";
|
|
4638
4650
|
return sentenceStart ? `${name[0]?.toUpperCase()}${name.slice(1)}` : name;
|
|
4639
4651
|
}
|
|
4640
4652
|
function roundLabel(record) {
|
|
@@ -4753,7 +4765,7 @@ function conflictReentry(record) {
|
|
|
4753
4765
|
function dispatched(record) {
|
|
4754
4766
|
const role = text(record.target_role);
|
|
4755
4767
|
const who = roleSubject(role);
|
|
4756
|
-
const reviewing = role
|
|
4768
|
+
const reviewing = role !== null && (lookupRole(role)?.reviews ?? false);
|
|
4757
4769
|
const round = whole(record.round);
|
|
4758
4770
|
return {
|
|
4759
4771
|
kind: "working",
|
|
@@ -4812,6 +4824,7 @@ function narrate(record, earlier = []) {
|
|
|
4812
4824
|
}
|
|
4813
4825
|
var REASONS, PAUSE_WITHOUT_CODE;
|
|
4814
4826
|
var init_narration = __esm(() => {
|
|
4827
|
+
init_roles();
|
|
4815
4828
|
init_schema();
|
|
4816
4829
|
REASONS = {
|
|
4817
4830
|
escalation: { words: "a role escalated a question", person: true },
|
|
@@ -4844,13 +4857,7 @@ var init_narration = __esm(() => {
|
|
|
4844
4857
|
|
|
4845
4858
|
// ../../harness/kernel/adapters/agents/agent-line.ts
|
|
4846
4859
|
function roleLabel(role) {
|
|
4847
|
-
|
|
4848
|
-
return roleLabels[role];
|
|
4849
|
-
if (role === "dev-review-loop")
|
|
4850
|
-
return "Loop";
|
|
4851
|
-
if (role === "operator")
|
|
4852
|
-
return "Operator";
|
|
4853
|
-
return role.replace(/-/g, " ").replace(/\b\w/g, (letter) => letter.toUpperCase());
|
|
4860
|
+
return lookupTitle(role) ?? role.replace(/-/g, " ").replace(/\b\w/g, (letter) => letter.toUpperCase());
|
|
4854
4861
|
}
|
|
4855
4862
|
function formatLineMeta(meta) {
|
|
4856
4863
|
if (meta === undefined)
|
|
@@ -4864,17 +4871,9 @@ function formatAgentLine(role, words, options = {}) {
|
|
|
4864
4871
|
const mark = options.unicode ?? true ? unicodeMarks[options.mark ?? "working"] : asciiMarks[options.mark ?? "working"];
|
|
4865
4872
|
return `${time} ${mark} ${roleLabel(role)} ${words}`;
|
|
4866
4873
|
}
|
|
4867
|
-
var
|
|
4874
|
+
var unicodeMarks, asciiMarks, META_KEY, META_VALUE;
|
|
4868
4875
|
var init_agent_line = __esm(() => {
|
|
4869
|
-
|
|
4870
|
-
planner: "Planner",
|
|
4871
|
-
developer: "Developer",
|
|
4872
|
-
"code-reviewer": "Code review",
|
|
4873
|
-
security: "Security",
|
|
4874
|
-
principal: "Principal",
|
|
4875
|
-
archivist: "Archivist",
|
|
4876
|
-
architect: "Architect"
|
|
4877
|
-
};
|
|
4876
|
+
init_roles();
|
|
4878
4877
|
unicodeMarks = { working: "▸", done: "✓", failed: "✕", waiting: "◌", round: "◆" };
|
|
4879
4878
|
asciiMarks = { working: ">", done: "+", failed: "x", waiting: "~", round: "#" };
|
|
4880
4879
|
META_KEY = /^[a-z]+$/;
|
|
@@ -6096,6 +6095,28 @@ var init_log_sink = __esm(() => {
|
|
|
6096
6095
|
defaultSinkSlot = createDefaultLogSinkSlot(process.env.VINAYA_RUN_ID || randomUUID2());
|
|
6097
6096
|
});
|
|
6098
6097
|
|
|
6098
|
+
// ../../harness/processes/vinaya-strict/integration/log/log-roles.ts
|
|
6099
|
+
function registerVinayaLogRoles() {
|
|
6100
|
+
for (const { name, reading, title, reviews } of VINAYA_LOG_ROLES)
|
|
6101
|
+
registerRole(name, { reading, title, reviews });
|
|
6102
|
+
registerTitle("dev-review-loop", "Loop");
|
|
6103
|
+
}
|
|
6104
|
+
var VINAYA_LOG_ROLES, VINAYA_LOG_ROLE_NAMES;
|
|
6105
|
+
var init_log_roles = __esm(() => {
|
|
6106
|
+
init_roles();
|
|
6107
|
+
VINAYA_LOG_ROLES = [
|
|
6108
|
+
{ name: "planner", reading: "planner", title: "Planner", reviews: false },
|
|
6109
|
+
{ name: "developer", reading: "developer", title: "Developer", reviews: false },
|
|
6110
|
+
{ name: "code-reviewer", reading: "code reviewer", title: "Code review", reviews: true },
|
|
6111
|
+
{ name: "security", reading: "security reviewer", title: "Security", reviews: true },
|
|
6112
|
+
{ name: "principal", reading: "principal", title: "Principal", reviews: false },
|
|
6113
|
+
{ name: "archivist", reading: "archivist", title: "Archivist", reviews: false },
|
|
6114
|
+
{ name: "architect", reading: "architect", title: "Architect", reviews: false }
|
|
6115
|
+
];
|
|
6116
|
+
VINAYA_LOG_ROLE_NAMES = VINAYA_LOG_ROLES.map((role) => role.name);
|
|
6117
|
+
registerVinayaLogRoles();
|
|
6118
|
+
});
|
|
6119
|
+
|
|
6099
6120
|
// ../../harness/processes/vinaya-strict/integration/log/branch-issue.ts
|
|
6100
6121
|
import { execFile as execFile5 } from "node:child_process";
|
|
6101
6122
|
import { promisify as promisify5 } from "node:util";
|
|
@@ -6298,6 +6319,7 @@ function installVinayaLogSinkFactory() {
|
|
|
6298
6319
|
var init_log_sink_factory = __esm(() => {
|
|
6299
6320
|
init_log_sink();
|
|
6300
6321
|
init_package_root();
|
|
6322
|
+
init_log_roles();
|
|
6301
6323
|
init_branch_issue();
|
|
6302
6324
|
init_doctrine_version();
|
|
6303
6325
|
});
|
|
@@ -6741,8 +6763,8 @@ var init_protected_paths2 = __esm(() => {
|
|
|
6741
6763
|
|
|
6742
6764
|
// ../../harness/processes/vinaya-strict/integration/policies/roles.ts
|
|
6743
6765
|
var GRANTED_ROLES, ROLE_TOOL_GRANTS, VINAYA_TOOL_GRANTS, VINAYA_BROKER_ROLES, VINAYA_BOUNDARY_ROLES, OPERATOR_TOOL_GRANT, VINAYA_ROUTER_ROLES;
|
|
6744
|
-
var
|
|
6745
|
-
|
|
6766
|
+
var init_roles2 = __esm(() => {
|
|
6767
|
+
init_log_roles();
|
|
6746
6768
|
GRANTED_ROLES = ["developer", "code-reviewer", "security", "controller"];
|
|
6747
6769
|
ROLE_TOOL_GRANTS = {
|
|
6748
6770
|
developer: [
|
|
@@ -6761,7 +6783,7 @@ var init_roles = __esm(() => {
|
|
|
6761
6783
|
};
|
|
6762
6784
|
VINAYA_TOOL_GRANTS = { roles: GRANTED_ROLES, grants: ROLE_TOOL_GRANTS };
|
|
6763
6785
|
VINAYA_BROKER_ROLES = {
|
|
6764
|
-
recognizedRoles:
|
|
6786
|
+
recognizedRoles: VINAYA_LOG_ROLE_NAMES,
|
|
6765
6787
|
workerRoles: ["developer"],
|
|
6766
6788
|
surfaceOwner: "the Planner"
|
|
6767
6789
|
};
|
|
@@ -6845,7 +6867,7 @@ function vinayaRouterPolicies() {
|
|
|
6845
6867
|
var init_vinaya_policies = __esm(() => {
|
|
6846
6868
|
init_launch_records();
|
|
6847
6869
|
init_protected_paths2();
|
|
6848
|
-
|
|
6870
|
+
init_roles2();
|
|
6849
6871
|
init_scratch_names();
|
|
6850
6872
|
});
|
|
6851
6873
|
|