@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
package/dist/programs/archive.js
CHANGED
|
@@ -4057,21 +4057,145 @@ var init_resolve_repo = __esm(() => {
|
|
|
4057
4057
|
};
|
|
4058
4058
|
});
|
|
4059
4059
|
|
|
4060
|
+
// ../../harness/kernel/log/roles.ts
|
|
4061
|
+
function registerRole(name, role) {
|
|
4062
|
+
roles.set(name, role);
|
|
4063
|
+
}
|
|
4064
|
+
function registerTitle(name, title) {
|
|
4065
|
+
titles.set(name, title);
|
|
4066
|
+
}
|
|
4067
|
+
function isRole(value) {
|
|
4068
|
+
return value !== undefined && roles.has(value);
|
|
4069
|
+
}
|
|
4070
|
+
function lookupRole(name) {
|
|
4071
|
+
return roles.get(name);
|
|
4072
|
+
}
|
|
4073
|
+
function lookupTitle(name) {
|
|
4074
|
+
return roles.get(name)?.title ?? titles.get(name);
|
|
4075
|
+
}
|
|
4076
|
+
var roles, titles;
|
|
4077
|
+
var init_roles = __esm(() => {
|
|
4078
|
+
roles = new Map;
|
|
4079
|
+
titles = new Map;
|
|
4080
|
+
});
|
|
4081
|
+
|
|
4082
|
+
// ../../harness/kernel/log/envelope.ts
|
|
4083
|
+
import { createHash as createHash3 } from "node:crypto";
|
|
4084
|
+
function actorIdFromEnv(role) {
|
|
4085
|
+
return role === undefined || role === "" ? null : role;
|
|
4086
|
+
}
|
|
4087
|
+
function lineageFieldFromEnv(value) {
|
|
4088
|
+
return value === undefined || value === "" ? null : value;
|
|
4089
|
+
}
|
|
4090
|
+
function attemptFromEnv(value) {
|
|
4091
|
+
if (value === undefined || value === "")
|
|
4092
|
+
return null;
|
|
4093
|
+
const n = Number(value);
|
|
4094
|
+
return Number.isInteger(n) ? n : null;
|
|
4095
|
+
}
|
|
4096
|
+
function provenanceFor(input) {
|
|
4097
|
+
if (input.provenance)
|
|
4098
|
+
return input.provenance;
|
|
4099
|
+
if (issueFromTask(input.env.task) === null && (input.branchIssue ?? null) !== null)
|
|
4100
|
+
return "unavailable";
|
|
4101
|
+
if (input.env.role || input.env.task)
|
|
4102
|
+
return "env_correlated";
|
|
4103
|
+
return "unavailable";
|
|
4104
|
+
}
|
|
4105
|
+
function issueFromTask(task) {
|
|
4106
|
+
if (task === undefined || task === "")
|
|
4107
|
+
return null;
|
|
4108
|
+
const n = Number(task);
|
|
4109
|
+
return Number.isInteger(n) ? n : null;
|
|
4110
|
+
}
|
|
4111
|
+
function roundFromEnv(round) {
|
|
4112
|
+
if (round === undefined || round === "")
|
|
4113
|
+
return;
|
|
4114
|
+
const n = Number(round);
|
|
4115
|
+
return Number.isInteger(n) ? n : undefined;
|
|
4116
|
+
}
|
|
4117
|
+
function prFromEnv(pr) {
|
|
4118
|
+
if (pr === undefined || pr === "")
|
|
4119
|
+
return;
|
|
4120
|
+
const n = Number(pr);
|
|
4121
|
+
return Number.isInteger(n) && n > 0 ? n : undefined;
|
|
4122
|
+
}
|
|
4123
|
+
function buildHeader(input) {
|
|
4124
|
+
const role = isRole(input.env.role) ? input.env.role : "unattributed";
|
|
4125
|
+
const round = roundFromEnv(input.env.round);
|
|
4126
|
+
const pr = prFromEnv(input.env.pr);
|
|
4127
|
+
const subject = {
|
|
4128
|
+
issue: issueFromTask(input.env.task) ?? input.branchIssue ?? null,
|
|
4129
|
+
role,
|
|
4130
|
+
...round !== undefined ? { round } : {},
|
|
4131
|
+
...pr !== undefined ? { pr } : {},
|
|
4132
|
+
...input.subject ?? {}
|
|
4133
|
+
};
|
|
4134
|
+
const issue = subject.issue;
|
|
4135
|
+
return {
|
|
4136
|
+
meta: {
|
|
4137
|
+
schema: 4,
|
|
4138
|
+
ts: input.now.toISOString(),
|
|
4139
|
+
run_id: input.runId,
|
|
4140
|
+
seq: input.seq,
|
|
4141
|
+
repo: input.repo,
|
|
4142
|
+
vinaya: input.vinaya,
|
|
4143
|
+
doctrine: input.doctrine,
|
|
4144
|
+
host: input.host,
|
|
4145
|
+
machine: createHash3("sha256").update(input.hostname).digest("hex"),
|
|
4146
|
+
event_id: input.eventId,
|
|
4147
|
+
process_id: input.processId,
|
|
4148
|
+
actor_id: actorIdFromEnv(input.env.role),
|
|
4149
|
+
lineage: {
|
|
4150
|
+
run: lineageFieldFromEnv(input.env.run),
|
|
4151
|
+
attempt: attemptFromEnv(input.env.attempt),
|
|
4152
|
+
parent: lineageFieldFromEnv(input.env.parent)
|
|
4153
|
+
},
|
|
4154
|
+
input_versions: {
|
|
4155
|
+
manifest_version: input.inputVersions?.manifestVersion ?? null,
|
|
4156
|
+
objectives_version: input.inputVersions?.objectivesVersion ?? null,
|
|
4157
|
+
brief_hash: input.inputVersions?.briefHash ?? null,
|
|
4158
|
+
ruling_ordinal: input.inputVersions?.rulingOrdinal ?? null,
|
|
4159
|
+
pause_bound_ruling: input.inputVersions?.pauseBoundRuling ?? null,
|
|
4160
|
+
policy_digest: input.inputVersions?.policyDigest ?? null
|
|
4161
|
+
},
|
|
4162
|
+
provenance: provenanceFor(input),
|
|
4163
|
+
work: {
|
|
4164
|
+
ref: lineageFieldFromEnv(input.env.workRef) ?? (issue === null ? null : String(issue)),
|
|
4165
|
+
repo: input.repo,
|
|
4166
|
+
change: pr === undefined ? null : String(pr),
|
|
4167
|
+
revision: input.revision ?? null
|
|
4168
|
+
},
|
|
4169
|
+
flow: {
|
|
4170
|
+
id: lineageFieldFromEnv(input.env.flow) ?? "vinaya",
|
|
4171
|
+
version: lineageFieldFromEnv(input.env.flowVersion)
|
|
4172
|
+
},
|
|
4173
|
+
runtime: lineageFieldFromEnv(input.env.runtime),
|
|
4174
|
+
process: {
|
|
4175
|
+
id: lineageFieldFromEnv(input.env.processId) ?? "vinaya",
|
|
4176
|
+
version: lineageFieldFromEnv(input.env.processVersion),
|
|
4177
|
+
digest: lineageFieldFromEnv(input.env.processDigest)
|
|
4178
|
+
},
|
|
4179
|
+
runner: {
|
|
4180
|
+
id: lineageFieldFromEnv(input.env.runnerId) ?? "standalone",
|
|
4181
|
+
version: lineageFieldFromEnv(input.env.runnerVersion)
|
|
4182
|
+
},
|
|
4183
|
+
source: lineageFieldFromEnv(input.env.source)
|
|
4184
|
+
},
|
|
4185
|
+
subject
|
|
4186
|
+
};
|
|
4187
|
+
}
|
|
4188
|
+
var init_envelope = __esm(() => {
|
|
4189
|
+
init_roles();
|
|
4190
|
+
});
|
|
4191
|
+
|
|
4060
4192
|
// ../../harness/kernel/log/schema.ts
|
|
4061
4193
|
import { z as z6 } from "zod";
|
|
4062
|
-
var CONFIDENCE_REASON_MAX_LENGTH = 280, REVIEW_FINDING_DESCRIPTION_MAX_LENGTH = 1000,
|
|
4194
|
+
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;
|
|
4063
4195
|
var init_schema = __esm(() => {
|
|
4064
4196
|
init_custom();
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
"developer",
|
|
4068
|
-
"code-reviewer",
|
|
4069
|
-
"security",
|
|
4070
|
-
"principal",
|
|
4071
|
-
"archivist",
|
|
4072
|
-
"architect"
|
|
4073
|
-
];
|
|
4074
|
-
RoleSchema = z6.enum(ROLE_VALUES);
|
|
4197
|
+
ROLE_NAME_PATTERN = /^[a-z0-9-]+$/;
|
|
4198
|
+
RoleSchema = z6.string().regex(ROLE_NAME_PATTERN);
|
|
4075
4199
|
HOST_VALUES = ["hook", "ci", "cli", "loop"];
|
|
4076
4200
|
HostSchema = z6.enum(HOST_VALUES);
|
|
4077
4201
|
RUN_ID_PATTERN = /^[A-Za-z0-9_.-]{1,128}$/;
|
|
@@ -4653,119 +4777,6 @@ var init_schema = __esm(() => {
|
|
|
4653
4777
|
]);
|
|
4654
4778
|
});
|
|
4655
4779
|
|
|
4656
|
-
// ../../harness/kernel/log/envelope.ts
|
|
4657
|
-
import { createHash as createHash3 } from "node:crypto";
|
|
4658
|
-
function isRole(value) {
|
|
4659
|
-
return value !== undefined && ROLE_VALUES.includes(value);
|
|
4660
|
-
}
|
|
4661
|
-
function actorIdFromEnv(role) {
|
|
4662
|
-
return role === undefined || role === "" ? null : role;
|
|
4663
|
-
}
|
|
4664
|
-
function lineageFieldFromEnv(value) {
|
|
4665
|
-
return value === undefined || value === "" ? null : value;
|
|
4666
|
-
}
|
|
4667
|
-
function attemptFromEnv(value) {
|
|
4668
|
-
if (value === undefined || value === "")
|
|
4669
|
-
return null;
|
|
4670
|
-
const n = Number(value);
|
|
4671
|
-
return Number.isInteger(n) ? n : null;
|
|
4672
|
-
}
|
|
4673
|
-
function provenanceFor(input) {
|
|
4674
|
-
if (input.provenance)
|
|
4675
|
-
return input.provenance;
|
|
4676
|
-
if (issueFromTask(input.env.task) === null && (input.branchIssue ?? null) !== null)
|
|
4677
|
-
return "unavailable";
|
|
4678
|
-
if (input.env.role || input.env.task)
|
|
4679
|
-
return "env_correlated";
|
|
4680
|
-
return "unavailable";
|
|
4681
|
-
}
|
|
4682
|
-
function issueFromTask(task) {
|
|
4683
|
-
if (task === undefined || task === "")
|
|
4684
|
-
return null;
|
|
4685
|
-
const n = Number(task);
|
|
4686
|
-
return Number.isInteger(n) ? n : null;
|
|
4687
|
-
}
|
|
4688
|
-
function roundFromEnv(round) {
|
|
4689
|
-
if (round === undefined || round === "")
|
|
4690
|
-
return;
|
|
4691
|
-
const n = Number(round);
|
|
4692
|
-
return Number.isInteger(n) ? n : undefined;
|
|
4693
|
-
}
|
|
4694
|
-
function prFromEnv(pr) {
|
|
4695
|
-
if (pr === undefined || pr === "")
|
|
4696
|
-
return;
|
|
4697
|
-
const n = Number(pr);
|
|
4698
|
-
return Number.isInteger(n) && n > 0 ? n : undefined;
|
|
4699
|
-
}
|
|
4700
|
-
function buildHeader(input) {
|
|
4701
|
-
const role = isRole(input.env.role) ? input.env.role : "unattributed";
|
|
4702
|
-
const round = roundFromEnv(input.env.round);
|
|
4703
|
-
const pr = prFromEnv(input.env.pr);
|
|
4704
|
-
const subject = {
|
|
4705
|
-
issue: issueFromTask(input.env.task) ?? input.branchIssue ?? null,
|
|
4706
|
-
role,
|
|
4707
|
-
...round !== undefined ? { round } : {},
|
|
4708
|
-
...pr !== undefined ? { pr } : {},
|
|
4709
|
-
...input.subject ?? {}
|
|
4710
|
-
};
|
|
4711
|
-
const issue = subject.issue;
|
|
4712
|
-
return {
|
|
4713
|
-
meta: {
|
|
4714
|
-
schema: 4,
|
|
4715
|
-
ts: input.now.toISOString(),
|
|
4716
|
-
run_id: input.runId,
|
|
4717
|
-
seq: input.seq,
|
|
4718
|
-
repo: input.repo,
|
|
4719
|
-
vinaya: input.vinaya,
|
|
4720
|
-
doctrine: input.doctrine,
|
|
4721
|
-
host: input.host,
|
|
4722
|
-
machine: createHash3("sha256").update(input.hostname).digest("hex"),
|
|
4723
|
-
event_id: input.eventId,
|
|
4724
|
-
process_id: input.processId,
|
|
4725
|
-
actor_id: actorIdFromEnv(input.env.role),
|
|
4726
|
-
lineage: {
|
|
4727
|
-
run: lineageFieldFromEnv(input.env.run),
|
|
4728
|
-
attempt: attemptFromEnv(input.env.attempt),
|
|
4729
|
-
parent: lineageFieldFromEnv(input.env.parent)
|
|
4730
|
-
},
|
|
4731
|
-
input_versions: {
|
|
4732
|
-
manifest_version: input.inputVersions?.manifestVersion ?? null,
|
|
4733
|
-
objectives_version: input.inputVersions?.objectivesVersion ?? null,
|
|
4734
|
-
brief_hash: input.inputVersions?.briefHash ?? null,
|
|
4735
|
-
ruling_ordinal: input.inputVersions?.rulingOrdinal ?? null,
|
|
4736
|
-
pause_bound_ruling: input.inputVersions?.pauseBoundRuling ?? null,
|
|
4737
|
-
policy_digest: input.inputVersions?.policyDigest ?? null
|
|
4738
|
-
},
|
|
4739
|
-
provenance: provenanceFor(input),
|
|
4740
|
-
work: {
|
|
4741
|
-
ref: lineageFieldFromEnv(input.env.workRef) ?? (issue === null ? null : String(issue)),
|
|
4742
|
-
repo: input.repo,
|
|
4743
|
-
change: pr === undefined ? null : String(pr),
|
|
4744
|
-
revision: input.revision ?? null
|
|
4745
|
-
},
|
|
4746
|
-
flow: {
|
|
4747
|
-
id: lineageFieldFromEnv(input.env.flow) ?? "vinaya",
|
|
4748
|
-
version: lineageFieldFromEnv(input.env.flowVersion)
|
|
4749
|
-
},
|
|
4750
|
-
runtime: lineageFieldFromEnv(input.env.runtime),
|
|
4751
|
-
process: {
|
|
4752
|
-
id: lineageFieldFromEnv(input.env.processId) ?? "vinaya",
|
|
4753
|
-
version: lineageFieldFromEnv(input.env.processVersion),
|
|
4754
|
-
digest: lineageFieldFromEnv(input.env.processDigest)
|
|
4755
|
-
},
|
|
4756
|
-
runner: {
|
|
4757
|
-
id: lineageFieldFromEnv(input.env.runnerId) ?? "standalone",
|
|
4758
|
-
version: lineageFieldFromEnv(input.env.runnerVersion)
|
|
4759
|
-
},
|
|
4760
|
-
source: lineageFieldFromEnv(input.env.source)
|
|
4761
|
-
},
|
|
4762
|
-
subject
|
|
4763
|
-
};
|
|
4764
|
-
}
|
|
4765
|
-
var init_envelope = __esm(() => {
|
|
4766
|
-
init_schema();
|
|
4767
|
-
});
|
|
4768
|
-
|
|
4769
4780
|
// ../../harness/kernel/log/redact.ts
|
|
4770
4781
|
function redactString(value, home) {
|
|
4771
4782
|
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>");
|
|
@@ -5263,7 +5274,8 @@ function code(value) {
|
|
|
5263
5274
|
return typeof value === "string" && CODE_TOKEN_PATTERN.test(value) ? value : null;
|
|
5264
5275
|
}
|
|
5265
5276
|
function roleSubject(value, sentenceStart = true) {
|
|
5266
|
-
const
|
|
5277
|
+
const known = typeof value === "string" ? lookupRole(value) : undefined;
|
|
5278
|
+
const name = known ? `the ${known.reading}` : "a role";
|
|
5267
5279
|
return sentenceStart ? `${name[0]?.toUpperCase()}${name.slice(1)}` : name;
|
|
5268
5280
|
}
|
|
5269
5281
|
function roundLabel(record) {
|
|
@@ -5382,7 +5394,7 @@ function conflictReentry(record) {
|
|
|
5382
5394
|
function dispatched(record) {
|
|
5383
5395
|
const role = text(record.target_role);
|
|
5384
5396
|
const who = roleSubject(role);
|
|
5385
|
-
const reviewing = role
|
|
5397
|
+
const reviewing = role !== null && (lookupRole(role)?.reviews ?? false);
|
|
5386
5398
|
const round = whole(record.round);
|
|
5387
5399
|
return {
|
|
5388
5400
|
kind: "working",
|
|
@@ -5441,6 +5453,7 @@ function narrate(record, earlier = []) {
|
|
|
5441
5453
|
}
|
|
5442
5454
|
var REASONS, PAUSE_WITHOUT_CODE;
|
|
5443
5455
|
var init_narration = __esm(() => {
|
|
5456
|
+
init_roles();
|
|
5444
5457
|
init_schema();
|
|
5445
5458
|
REASONS = {
|
|
5446
5459
|
escalation: { words: "a role escalated a question", person: true },
|
|
@@ -5473,13 +5486,7 @@ var init_narration = __esm(() => {
|
|
|
5473
5486
|
|
|
5474
5487
|
// ../../harness/kernel/adapters/agents/agent-line.ts
|
|
5475
5488
|
function roleLabel(role) {
|
|
5476
|
-
|
|
5477
|
-
return roleLabels[role];
|
|
5478
|
-
if (role === "dev-review-loop")
|
|
5479
|
-
return "Loop";
|
|
5480
|
-
if (role === "operator")
|
|
5481
|
-
return "Operator";
|
|
5482
|
-
return role.replace(/-/g, " ").replace(/\b\w/g, (letter) => letter.toUpperCase());
|
|
5489
|
+
return lookupTitle(role) ?? role.replace(/-/g, " ").replace(/\b\w/g, (letter) => letter.toUpperCase());
|
|
5483
5490
|
}
|
|
5484
5491
|
function formatLineMeta(meta) {
|
|
5485
5492
|
if (meta === undefined)
|
|
@@ -5493,17 +5500,9 @@ function formatAgentLine(role, words, options = {}) {
|
|
|
5493
5500
|
const mark = options.unicode ?? true ? unicodeMarks[options.mark ?? "working"] : asciiMarks[options.mark ?? "working"];
|
|
5494
5501
|
return `${time} ${mark} ${roleLabel(role)} ${words}`;
|
|
5495
5502
|
}
|
|
5496
|
-
var
|
|
5503
|
+
var unicodeMarks, asciiMarks, META_KEY, META_VALUE;
|
|
5497
5504
|
var init_agent_line = __esm(() => {
|
|
5498
|
-
|
|
5499
|
-
planner: "Planner",
|
|
5500
|
-
developer: "Developer",
|
|
5501
|
-
"code-reviewer": "Code review",
|
|
5502
|
-
security: "Security",
|
|
5503
|
-
principal: "Principal",
|
|
5504
|
-
archivist: "Archivist",
|
|
5505
|
-
architect: "Architect"
|
|
5506
|
-
};
|
|
5505
|
+
init_roles();
|
|
5507
5506
|
unicodeMarks = { working: "▸", done: "✓", failed: "✕", waiting: "◌", round: "◆" };
|
|
5508
5507
|
asciiMarks = { working: ">", done: "+", failed: "x", waiting: "~", round: "#" };
|
|
5509
5508
|
META_KEY = /^[a-z]+$/;
|
|
@@ -6725,6 +6724,28 @@ var init_log_sink = __esm(() => {
|
|
|
6725
6724
|
defaultSinkSlot = createDefaultLogSinkSlot(process.env.VINAYA_RUN_ID || randomUUID2());
|
|
6726
6725
|
});
|
|
6727
6726
|
|
|
6727
|
+
// ../../harness/processes/vinaya-strict/integration/log/log-roles.ts
|
|
6728
|
+
function registerVinayaLogRoles() {
|
|
6729
|
+
for (const { name, reading, title, reviews } of VINAYA_LOG_ROLES)
|
|
6730
|
+
registerRole(name, { reading, title, reviews });
|
|
6731
|
+
registerTitle("dev-review-loop", "Loop");
|
|
6732
|
+
}
|
|
6733
|
+
var VINAYA_LOG_ROLES, VINAYA_LOG_ROLE_NAMES;
|
|
6734
|
+
var init_log_roles = __esm(() => {
|
|
6735
|
+
init_roles();
|
|
6736
|
+
VINAYA_LOG_ROLES = [
|
|
6737
|
+
{ name: "planner", reading: "planner", title: "Planner", reviews: false },
|
|
6738
|
+
{ name: "developer", reading: "developer", title: "Developer", reviews: false },
|
|
6739
|
+
{ name: "code-reviewer", reading: "code reviewer", title: "Code review", reviews: true },
|
|
6740
|
+
{ name: "security", reading: "security reviewer", title: "Security", reviews: true },
|
|
6741
|
+
{ name: "principal", reading: "principal", title: "Principal", reviews: false },
|
|
6742
|
+
{ name: "archivist", reading: "archivist", title: "Archivist", reviews: false },
|
|
6743
|
+
{ name: "architect", reading: "architect", title: "Architect", reviews: false }
|
|
6744
|
+
];
|
|
6745
|
+
VINAYA_LOG_ROLE_NAMES = VINAYA_LOG_ROLES.map((role) => role.name);
|
|
6746
|
+
registerVinayaLogRoles();
|
|
6747
|
+
});
|
|
6748
|
+
|
|
6728
6749
|
// ../../harness/processes/vinaya-strict/integration/log/branch-issue.ts
|
|
6729
6750
|
import { execFile as execFile6 } from "node:child_process";
|
|
6730
6751
|
import { promisify as promisify6 } from "node:util";
|
|
@@ -6927,6 +6948,7 @@ function installVinayaLogSinkFactory() {
|
|
|
6927
6948
|
var init_log_sink_factory = __esm(() => {
|
|
6928
6949
|
init_log_sink();
|
|
6929
6950
|
init_package_root();
|
|
6951
|
+
init_log_roles();
|
|
6930
6952
|
init_branch_issue();
|
|
6931
6953
|
init_doctrine_version();
|
|
6932
6954
|
});
|
|
@@ -7329,8 +7351,8 @@ var init_protected_paths2 = __esm(() => {
|
|
|
7329
7351
|
|
|
7330
7352
|
// ../../harness/processes/vinaya-strict/integration/policies/roles.ts
|
|
7331
7353
|
var GRANTED_ROLES, ROLE_TOOL_GRANTS, VINAYA_TOOL_GRANTS, VINAYA_BROKER_ROLES, VINAYA_BOUNDARY_ROLES, OPERATOR_TOOL_GRANT, VINAYA_ROUTER_ROLES;
|
|
7332
|
-
var
|
|
7333
|
-
|
|
7354
|
+
var init_roles2 = __esm(() => {
|
|
7355
|
+
init_log_roles();
|
|
7334
7356
|
GRANTED_ROLES = ["developer", "code-reviewer", "security", "controller"];
|
|
7335
7357
|
ROLE_TOOL_GRANTS = {
|
|
7336
7358
|
developer: [
|
|
@@ -7349,7 +7371,7 @@ var init_roles = __esm(() => {
|
|
|
7349
7371
|
};
|
|
7350
7372
|
VINAYA_TOOL_GRANTS = { roles: GRANTED_ROLES, grants: ROLE_TOOL_GRANTS };
|
|
7351
7373
|
VINAYA_BROKER_ROLES = {
|
|
7352
|
-
recognizedRoles:
|
|
7374
|
+
recognizedRoles: VINAYA_LOG_ROLE_NAMES,
|
|
7353
7375
|
workerRoles: ["developer"],
|
|
7354
7376
|
surfaceOwner: "the Planner"
|
|
7355
7377
|
};
|
|
@@ -7433,7 +7455,7 @@ function vinayaRouterPolicies() {
|
|
|
7433
7455
|
var init_vinaya_policies = __esm(() => {
|
|
7434
7456
|
init_launch_records();
|
|
7435
7457
|
init_protected_paths2();
|
|
7436
|
-
|
|
7458
|
+
init_roles2();
|
|
7437
7459
|
init_scratch_names();
|
|
7438
7460
|
});
|
|
7439
7461
|
|
|
@@ -7520,7 +7542,9 @@ var init_programs = __esm(() => {
|
|
|
7520
7542
|
program("log-selftest", `${P}/integration/bin/log-selftest.ts`, "dist/programs/log-selftest.js", [
|
|
7521
7543
|
words("log", "selftest")
|
|
7522
7544
|
]),
|
|
7523
|
-
program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")])
|
|
7545
|
+
program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")]),
|
|
7546
|
+
program("run-engine", `${P}/bin/run-engine.ts`, "dist/programs/run-engine.js"),
|
|
7547
|
+
program("supervised-command", `${P}/loops/dev-review/v2/supervised-command.ts`, "dist/programs/supervised-command.js")
|
|
7524
7548
|
]);
|
|
7525
7549
|
SOURCE_ROOT = join12(dirname9(fileURLToPath4(import.meta.url)), "..", "..", "..", "..");
|
|
7526
7550
|
FROM_SOURCE = fileURLToPath4(import.meta.url).endsWith(".ts");
|