@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
|
@@ -4424,6 +4424,138 @@ var init_fetch_documentation = __esm(() => {
|
|
|
4424
4424
|
REQUEST_HEADER_ALLOWANCE = 64 * 1024;
|
|
4425
4425
|
});
|
|
4426
4426
|
|
|
4427
|
+
// ../../harness/kernel/log/roles.ts
|
|
4428
|
+
function registerRole(name, role) {
|
|
4429
|
+
roles.set(name, role);
|
|
4430
|
+
}
|
|
4431
|
+
function registerTitle(name, title) {
|
|
4432
|
+
titles.set(name, title);
|
|
4433
|
+
}
|
|
4434
|
+
function isRole(value) {
|
|
4435
|
+
return value !== undefined && roles.has(value);
|
|
4436
|
+
}
|
|
4437
|
+
function lookupRole(name) {
|
|
4438
|
+
return roles.get(name);
|
|
4439
|
+
}
|
|
4440
|
+
function lookupTitle(name) {
|
|
4441
|
+
return roles.get(name)?.title ?? titles.get(name);
|
|
4442
|
+
}
|
|
4443
|
+
var roles, titles;
|
|
4444
|
+
var init_roles = __esm(() => {
|
|
4445
|
+
roles = new Map;
|
|
4446
|
+
titles = new Map;
|
|
4447
|
+
});
|
|
4448
|
+
|
|
4449
|
+
// ../../harness/kernel/log/envelope.ts
|
|
4450
|
+
import { createHash as createHash4 } from "node:crypto";
|
|
4451
|
+
function actorIdFromEnv(role) {
|
|
4452
|
+
return role === undefined || role === "" ? null : role;
|
|
4453
|
+
}
|
|
4454
|
+
function lineageFieldFromEnv(value) {
|
|
4455
|
+
return value === undefined || value === "" ? null : value;
|
|
4456
|
+
}
|
|
4457
|
+
function attemptFromEnv(value) {
|
|
4458
|
+
if (value === undefined || value === "")
|
|
4459
|
+
return null;
|
|
4460
|
+
const n = Number(value);
|
|
4461
|
+
return Number.isInteger(n) ? n : null;
|
|
4462
|
+
}
|
|
4463
|
+
function provenanceFor(input) {
|
|
4464
|
+
if (input.provenance)
|
|
4465
|
+
return input.provenance;
|
|
4466
|
+
if (issueFromTask(input.env.task) === null && (input.branchIssue ?? null) !== null)
|
|
4467
|
+
return "unavailable";
|
|
4468
|
+
if (input.env.role || input.env.task)
|
|
4469
|
+
return "env_correlated";
|
|
4470
|
+
return "unavailable";
|
|
4471
|
+
}
|
|
4472
|
+
function issueFromTask(task) {
|
|
4473
|
+
if (task === undefined || task === "")
|
|
4474
|
+
return null;
|
|
4475
|
+
const n = Number(task);
|
|
4476
|
+
return Number.isInteger(n) ? n : null;
|
|
4477
|
+
}
|
|
4478
|
+
function roundFromEnv(round) {
|
|
4479
|
+
if (round === undefined || round === "")
|
|
4480
|
+
return;
|
|
4481
|
+
const n = Number(round);
|
|
4482
|
+
return Number.isInteger(n) ? n : undefined;
|
|
4483
|
+
}
|
|
4484
|
+
function prFromEnv(pr) {
|
|
4485
|
+
if (pr === undefined || pr === "")
|
|
4486
|
+
return;
|
|
4487
|
+
const n = Number(pr);
|
|
4488
|
+
return Number.isInteger(n) && n > 0 ? n : undefined;
|
|
4489
|
+
}
|
|
4490
|
+
function buildHeader(input) {
|
|
4491
|
+
const role = isRole(input.env.role) ? input.env.role : "unattributed";
|
|
4492
|
+
const round = roundFromEnv(input.env.round);
|
|
4493
|
+
const pr = prFromEnv(input.env.pr);
|
|
4494
|
+
const subject = {
|
|
4495
|
+
issue: issueFromTask(input.env.task) ?? input.branchIssue ?? null,
|
|
4496
|
+
role,
|
|
4497
|
+
...round !== undefined ? { round } : {},
|
|
4498
|
+
...pr !== undefined ? { pr } : {},
|
|
4499
|
+
...input.subject ?? {}
|
|
4500
|
+
};
|
|
4501
|
+
const issue = subject.issue;
|
|
4502
|
+
return {
|
|
4503
|
+
meta: {
|
|
4504
|
+
schema: 4,
|
|
4505
|
+
ts: input.now.toISOString(),
|
|
4506
|
+
run_id: input.runId,
|
|
4507
|
+
seq: input.seq,
|
|
4508
|
+
repo: input.repo,
|
|
4509
|
+
vinaya: input.vinaya,
|
|
4510
|
+
doctrine: input.doctrine,
|
|
4511
|
+
host: input.host,
|
|
4512
|
+
machine: createHash4("sha256").update(input.hostname).digest("hex"),
|
|
4513
|
+
event_id: input.eventId,
|
|
4514
|
+
process_id: input.processId,
|
|
4515
|
+
actor_id: actorIdFromEnv(input.env.role),
|
|
4516
|
+
lineage: {
|
|
4517
|
+
run: lineageFieldFromEnv(input.env.run),
|
|
4518
|
+
attempt: attemptFromEnv(input.env.attempt),
|
|
4519
|
+
parent: lineageFieldFromEnv(input.env.parent)
|
|
4520
|
+
},
|
|
4521
|
+
input_versions: {
|
|
4522
|
+
manifest_version: input.inputVersions?.manifestVersion ?? null,
|
|
4523
|
+
objectives_version: input.inputVersions?.objectivesVersion ?? null,
|
|
4524
|
+
brief_hash: input.inputVersions?.briefHash ?? null,
|
|
4525
|
+
ruling_ordinal: input.inputVersions?.rulingOrdinal ?? null,
|
|
4526
|
+
pause_bound_ruling: input.inputVersions?.pauseBoundRuling ?? null,
|
|
4527
|
+
policy_digest: input.inputVersions?.policyDigest ?? null
|
|
4528
|
+
},
|
|
4529
|
+
provenance: provenanceFor(input),
|
|
4530
|
+
work: {
|
|
4531
|
+
ref: lineageFieldFromEnv(input.env.workRef) ?? (issue === null ? null : String(issue)),
|
|
4532
|
+
repo: input.repo,
|
|
4533
|
+
change: pr === undefined ? null : String(pr),
|
|
4534
|
+
revision: input.revision ?? null
|
|
4535
|
+
},
|
|
4536
|
+
flow: {
|
|
4537
|
+
id: lineageFieldFromEnv(input.env.flow) ?? "vinaya",
|
|
4538
|
+
version: lineageFieldFromEnv(input.env.flowVersion)
|
|
4539
|
+
},
|
|
4540
|
+
runtime: lineageFieldFromEnv(input.env.runtime),
|
|
4541
|
+
process: {
|
|
4542
|
+
id: lineageFieldFromEnv(input.env.processId) ?? "vinaya",
|
|
4543
|
+
version: lineageFieldFromEnv(input.env.processVersion),
|
|
4544
|
+
digest: lineageFieldFromEnv(input.env.processDigest)
|
|
4545
|
+
},
|
|
4546
|
+
runner: {
|
|
4547
|
+
id: lineageFieldFromEnv(input.env.runnerId) ?? "standalone",
|
|
4548
|
+
version: lineageFieldFromEnv(input.env.runnerVersion)
|
|
4549
|
+
},
|
|
4550
|
+
source: lineageFieldFromEnv(input.env.source)
|
|
4551
|
+
},
|
|
4552
|
+
subject
|
|
4553
|
+
};
|
|
4554
|
+
}
|
|
4555
|
+
var init_envelope = __esm(() => {
|
|
4556
|
+
init_roles();
|
|
4557
|
+
});
|
|
4558
|
+
|
|
4427
4559
|
// ../../harness/kernel/log/custom.ts
|
|
4428
4560
|
import { z as z3 } from "zod";
|
|
4429
4561
|
var CUSTOM_EVENT_NAME_PATTERN, CUSTOM_EVENT_NAME_MAX_LENGTH = 64, CUSTOM_EVENT_RESERVED_NAMESPACE = "vinaya", CUSTOM_EVENT_MAX_FIELDS = 20, CUSTOM_FIELD_NAME_PATTERN, CUSTOM_FIELD_NAME_MAX_LENGTH = 64, CUSTOM_TEXT_MAX_LENGTH = 500, CUSTOM_WORD_PATTERN, CUSTOM_WORD_MAX_LENGTH = 64, CUSTOM_FIELD_MAX_WORDS = 50, CustomFieldTypeSchema, CustomEventDeclarationsSchema;
|
|
@@ -4481,19 +4613,11 @@ var init_custom = __esm(() => {
|
|
|
4481
4613
|
|
|
4482
4614
|
// ../../harness/kernel/log/schema.ts
|
|
4483
4615
|
import { z as z4 } from "zod";
|
|
4484
|
-
var CONFIDENCE_REASON_MAX_LENGTH = 280, REVIEW_FINDING_DESCRIPTION_MAX_LENGTH = 1000,
|
|
4616
|
+
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;
|
|
4485
4617
|
var init_schema = __esm(() => {
|
|
4486
4618
|
init_custom();
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
"developer",
|
|
4490
|
-
"code-reviewer",
|
|
4491
|
-
"security",
|
|
4492
|
-
"principal",
|
|
4493
|
-
"archivist",
|
|
4494
|
-
"architect"
|
|
4495
|
-
];
|
|
4496
|
-
RoleSchema = z4.enum(ROLE_VALUES);
|
|
4619
|
+
ROLE_NAME_PATTERN = /^[a-z0-9-]+$/;
|
|
4620
|
+
RoleSchema = z4.string().regex(ROLE_NAME_PATTERN);
|
|
4497
4621
|
HOST_VALUES = ["hook", "ci", "cli", "loop"];
|
|
4498
4622
|
HostSchema = z4.enum(HOST_VALUES);
|
|
4499
4623
|
RUN_ID_PATTERN = /^[A-Za-z0-9_.-]{1,128}$/;
|
|
@@ -5075,119 +5199,6 @@ var init_schema = __esm(() => {
|
|
|
5075
5199
|
]);
|
|
5076
5200
|
});
|
|
5077
5201
|
|
|
5078
|
-
// ../../harness/kernel/log/envelope.ts
|
|
5079
|
-
import { createHash as createHash4 } from "node:crypto";
|
|
5080
|
-
function isRole(value) {
|
|
5081
|
-
return value !== undefined && ROLE_VALUES.includes(value);
|
|
5082
|
-
}
|
|
5083
|
-
function actorIdFromEnv(role) {
|
|
5084
|
-
return role === undefined || role === "" ? null : role;
|
|
5085
|
-
}
|
|
5086
|
-
function lineageFieldFromEnv(value) {
|
|
5087
|
-
return value === undefined || value === "" ? null : value;
|
|
5088
|
-
}
|
|
5089
|
-
function attemptFromEnv(value) {
|
|
5090
|
-
if (value === undefined || value === "")
|
|
5091
|
-
return null;
|
|
5092
|
-
const n = Number(value);
|
|
5093
|
-
return Number.isInteger(n) ? n : null;
|
|
5094
|
-
}
|
|
5095
|
-
function provenanceFor(input) {
|
|
5096
|
-
if (input.provenance)
|
|
5097
|
-
return input.provenance;
|
|
5098
|
-
if (issueFromTask(input.env.task) === null && (input.branchIssue ?? null) !== null)
|
|
5099
|
-
return "unavailable";
|
|
5100
|
-
if (input.env.role || input.env.task)
|
|
5101
|
-
return "env_correlated";
|
|
5102
|
-
return "unavailable";
|
|
5103
|
-
}
|
|
5104
|
-
function issueFromTask(task) {
|
|
5105
|
-
if (task === undefined || task === "")
|
|
5106
|
-
return null;
|
|
5107
|
-
const n = Number(task);
|
|
5108
|
-
return Number.isInteger(n) ? n : null;
|
|
5109
|
-
}
|
|
5110
|
-
function roundFromEnv(round) {
|
|
5111
|
-
if (round === undefined || round === "")
|
|
5112
|
-
return;
|
|
5113
|
-
const n = Number(round);
|
|
5114
|
-
return Number.isInteger(n) ? n : undefined;
|
|
5115
|
-
}
|
|
5116
|
-
function prFromEnv(pr) {
|
|
5117
|
-
if (pr === undefined || pr === "")
|
|
5118
|
-
return;
|
|
5119
|
-
const n = Number(pr);
|
|
5120
|
-
return Number.isInteger(n) && n > 0 ? n : undefined;
|
|
5121
|
-
}
|
|
5122
|
-
function buildHeader(input) {
|
|
5123
|
-
const role = isRole(input.env.role) ? input.env.role : "unattributed";
|
|
5124
|
-
const round = roundFromEnv(input.env.round);
|
|
5125
|
-
const pr = prFromEnv(input.env.pr);
|
|
5126
|
-
const subject = {
|
|
5127
|
-
issue: issueFromTask(input.env.task) ?? input.branchIssue ?? null,
|
|
5128
|
-
role,
|
|
5129
|
-
...round !== undefined ? { round } : {},
|
|
5130
|
-
...pr !== undefined ? { pr } : {},
|
|
5131
|
-
...input.subject ?? {}
|
|
5132
|
-
};
|
|
5133
|
-
const issue = subject.issue;
|
|
5134
|
-
return {
|
|
5135
|
-
meta: {
|
|
5136
|
-
schema: 4,
|
|
5137
|
-
ts: input.now.toISOString(),
|
|
5138
|
-
run_id: input.runId,
|
|
5139
|
-
seq: input.seq,
|
|
5140
|
-
repo: input.repo,
|
|
5141
|
-
vinaya: input.vinaya,
|
|
5142
|
-
doctrine: input.doctrine,
|
|
5143
|
-
host: input.host,
|
|
5144
|
-
machine: createHash4("sha256").update(input.hostname).digest("hex"),
|
|
5145
|
-
event_id: input.eventId,
|
|
5146
|
-
process_id: input.processId,
|
|
5147
|
-
actor_id: actorIdFromEnv(input.env.role),
|
|
5148
|
-
lineage: {
|
|
5149
|
-
run: lineageFieldFromEnv(input.env.run),
|
|
5150
|
-
attempt: attemptFromEnv(input.env.attempt),
|
|
5151
|
-
parent: lineageFieldFromEnv(input.env.parent)
|
|
5152
|
-
},
|
|
5153
|
-
input_versions: {
|
|
5154
|
-
manifest_version: input.inputVersions?.manifestVersion ?? null,
|
|
5155
|
-
objectives_version: input.inputVersions?.objectivesVersion ?? null,
|
|
5156
|
-
brief_hash: input.inputVersions?.briefHash ?? null,
|
|
5157
|
-
ruling_ordinal: input.inputVersions?.rulingOrdinal ?? null,
|
|
5158
|
-
pause_bound_ruling: input.inputVersions?.pauseBoundRuling ?? null,
|
|
5159
|
-
policy_digest: input.inputVersions?.policyDigest ?? null
|
|
5160
|
-
},
|
|
5161
|
-
provenance: provenanceFor(input),
|
|
5162
|
-
work: {
|
|
5163
|
-
ref: lineageFieldFromEnv(input.env.workRef) ?? (issue === null ? null : String(issue)),
|
|
5164
|
-
repo: input.repo,
|
|
5165
|
-
change: pr === undefined ? null : String(pr),
|
|
5166
|
-
revision: input.revision ?? null
|
|
5167
|
-
},
|
|
5168
|
-
flow: {
|
|
5169
|
-
id: lineageFieldFromEnv(input.env.flow) ?? "vinaya",
|
|
5170
|
-
version: lineageFieldFromEnv(input.env.flowVersion)
|
|
5171
|
-
},
|
|
5172
|
-
runtime: lineageFieldFromEnv(input.env.runtime),
|
|
5173
|
-
process: {
|
|
5174
|
-
id: lineageFieldFromEnv(input.env.processId) ?? "vinaya",
|
|
5175
|
-
version: lineageFieldFromEnv(input.env.processVersion),
|
|
5176
|
-
digest: lineageFieldFromEnv(input.env.processDigest)
|
|
5177
|
-
},
|
|
5178
|
-
runner: {
|
|
5179
|
-
id: lineageFieldFromEnv(input.env.runnerId) ?? "standalone",
|
|
5180
|
-
version: lineageFieldFromEnv(input.env.runnerVersion)
|
|
5181
|
-
},
|
|
5182
|
-
source: lineageFieldFromEnv(input.env.source)
|
|
5183
|
-
},
|
|
5184
|
-
subject
|
|
5185
|
-
};
|
|
5186
|
-
}
|
|
5187
|
-
var init_envelope = __esm(() => {
|
|
5188
|
-
init_schema();
|
|
5189
|
-
});
|
|
5190
|
-
|
|
5191
5202
|
// ../../harness/kernel/log/store.ts
|
|
5192
5203
|
function metaOf(obj) {
|
|
5193
5204
|
if (obj === null || typeof obj !== "object")
|
|
@@ -5293,7 +5304,8 @@ function code(value) {
|
|
|
5293
5304
|
return typeof value === "string" && CODE_TOKEN_PATTERN.test(value) ? value : null;
|
|
5294
5305
|
}
|
|
5295
5306
|
function roleSubject(value, sentenceStart = true) {
|
|
5296
|
-
const
|
|
5307
|
+
const known = typeof value === "string" ? lookupRole(value) : undefined;
|
|
5308
|
+
const name = known ? `the ${known.reading}` : "a role";
|
|
5297
5309
|
return sentenceStart ? `${name[0]?.toUpperCase()}${name.slice(1)}` : name;
|
|
5298
5310
|
}
|
|
5299
5311
|
function roundLabel(record) {
|
|
@@ -5412,7 +5424,7 @@ function conflictReentry(record) {
|
|
|
5412
5424
|
function dispatched(record) {
|
|
5413
5425
|
const role = text(record.target_role);
|
|
5414
5426
|
const who = roleSubject(role);
|
|
5415
|
-
const reviewing = role
|
|
5427
|
+
const reviewing = role !== null && (lookupRole(role)?.reviews ?? false);
|
|
5416
5428
|
const round = whole(record.round);
|
|
5417
5429
|
return {
|
|
5418
5430
|
kind: "working",
|
|
@@ -5471,6 +5483,7 @@ function narrate(record, earlier = []) {
|
|
|
5471
5483
|
}
|
|
5472
5484
|
var REASONS, PAUSE_WITHOUT_CODE;
|
|
5473
5485
|
var init_narration = __esm(() => {
|
|
5486
|
+
init_roles();
|
|
5474
5487
|
init_schema();
|
|
5475
5488
|
REASONS = {
|
|
5476
5489
|
escalation: { words: "a role escalated a question", person: true },
|
|
@@ -5503,13 +5516,7 @@ var init_narration = __esm(() => {
|
|
|
5503
5516
|
|
|
5504
5517
|
// ../../harness/kernel/adapters/agents/agent-line.ts
|
|
5505
5518
|
function roleLabel(role) {
|
|
5506
|
-
|
|
5507
|
-
return roleLabels[role];
|
|
5508
|
-
if (role === "dev-review-loop")
|
|
5509
|
-
return "Loop";
|
|
5510
|
-
if (role === "operator")
|
|
5511
|
-
return "Operator";
|
|
5512
|
-
return role.replace(/-/g, " ").replace(/\b\w/g, (letter) => letter.toUpperCase());
|
|
5519
|
+
return lookupTitle(role) ?? role.replace(/-/g, " ").replace(/\b\w/g, (letter) => letter.toUpperCase());
|
|
5513
5520
|
}
|
|
5514
5521
|
function formatLineMeta(meta) {
|
|
5515
5522
|
if (meta === undefined)
|
|
@@ -5523,17 +5530,9 @@ function formatAgentLine(role, words, options = {}) {
|
|
|
5523
5530
|
const mark = options.unicode ?? true ? unicodeMarks[options.mark ?? "working"] : asciiMarks[options.mark ?? "working"];
|
|
5524
5531
|
return `${time} ${mark} ${roleLabel(role)} ${words}`;
|
|
5525
5532
|
}
|
|
5526
|
-
var
|
|
5533
|
+
var unicodeMarks, asciiMarks, META_KEY, META_VALUE;
|
|
5527
5534
|
var init_agent_line = __esm(() => {
|
|
5528
|
-
|
|
5529
|
-
planner: "Planner",
|
|
5530
|
-
developer: "Developer",
|
|
5531
|
-
"code-reviewer": "Code review",
|
|
5532
|
-
security: "Security",
|
|
5533
|
-
principal: "Principal",
|
|
5534
|
-
archivist: "Archivist",
|
|
5535
|
-
architect: "Architect"
|
|
5536
|
-
};
|
|
5535
|
+
init_roles();
|
|
5537
5536
|
unicodeMarks = { working: "▸", done: "✓", failed: "✕", waiting: "◌", round: "◆" };
|
|
5538
5537
|
asciiMarks = { working: ">", done: "+", failed: "x", waiting: "~", round: "#" };
|
|
5539
5538
|
META_KEY = /^[a-z]+$/;
|
|
@@ -6782,6 +6781,28 @@ function cliPackageRoot() {
|
|
|
6782
6781
|
}
|
|
6783
6782
|
var init_package_root = () => {};
|
|
6784
6783
|
|
|
6784
|
+
// ../../harness/processes/vinaya-strict/integration/log/log-roles.ts
|
|
6785
|
+
function registerVinayaLogRoles() {
|
|
6786
|
+
for (const { name, reading, title, reviews } of VINAYA_LOG_ROLES)
|
|
6787
|
+
registerRole(name, { reading, title, reviews });
|
|
6788
|
+
registerTitle("dev-review-loop", "Loop");
|
|
6789
|
+
}
|
|
6790
|
+
var VINAYA_LOG_ROLES, VINAYA_LOG_ROLE_NAMES;
|
|
6791
|
+
var init_log_roles = __esm(() => {
|
|
6792
|
+
init_roles();
|
|
6793
|
+
VINAYA_LOG_ROLES = [
|
|
6794
|
+
{ name: "planner", reading: "planner", title: "Planner", reviews: false },
|
|
6795
|
+
{ name: "developer", reading: "developer", title: "Developer", reviews: false },
|
|
6796
|
+
{ name: "code-reviewer", reading: "code reviewer", title: "Code review", reviews: true },
|
|
6797
|
+
{ name: "security", reading: "security reviewer", title: "Security", reviews: true },
|
|
6798
|
+
{ name: "principal", reading: "principal", title: "Principal", reviews: false },
|
|
6799
|
+
{ name: "archivist", reading: "archivist", title: "Archivist", reviews: false },
|
|
6800
|
+
{ name: "architect", reading: "architect", title: "Architect", reviews: false }
|
|
6801
|
+
];
|
|
6802
|
+
VINAYA_LOG_ROLE_NAMES = VINAYA_LOG_ROLES.map((role) => role.name);
|
|
6803
|
+
registerVinayaLogRoles();
|
|
6804
|
+
});
|
|
6805
|
+
|
|
6785
6806
|
// ../../harness/processes/vinaya-strict/integration/log/branch-issue.ts
|
|
6786
6807
|
import { execFile as execFile4 } from "node:child_process";
|
|
6787
6808
|
import { promisify as promisify4 } from "node:util";
|
|
@@ -6984,6 +7005,7 @@ function installVinayaLogSinkFactory() {
|
|
|
6984
7005
|
var init_log_sink_factory = __esm(() => {
|
|
6985
7006
|
init_log_sink();
|
|
6986
7007
|
init_package_root();
|
|
7008
|
+
init_log_roles();
|
|
6987
7009
|
init_branch_issue();
|
|
6988
7010
|
init_doctrine_version();
|
|
6989
7011
|
});
|
|
@@ -9566,8 +9588,8 @@ var init_protected_paths2 = __esm(() => {
|
|
|
9566
9588
|
|
|
9567
9589
|
// ../../harness/processes/vinaya-strict/integration/policies/roles.ts
|
|
9568
9590
|
var GRANTED_ROLES, ROLE_TOOL_GRANTS, VINAYA_TOOL_GRANTS, VINAYA_BROKER_ROLES, VINAYA_BOUNDARY_ROLES, OPERATOR_TOOL_GRANT, VINAYA_ROUTER_ROLES;
|
|
9569
|
-
var
|
|
9570
|
-
|
|
9591
|
+
var init_roles2 = __esm(() => {
|
|
9592
|
+
init_log_roles();
|
|
9571
9593
|
GRANTED_ROLES = ["developer", "code-reviewer", "security", "controller"];
|
|
9572
9594
|
ROLE_TOOL_GRANTS = {
|
|
9573
9595
|
developer: [
|
|
@@ -9586,7 +9608,7 @@ var init_roles = __esm(() => {
|
|
|
9586
9608
|
};
|
|
9587
9609
|
VINAYA_TOOL_GRANTS = { roles: GRANTED_ROLES, grants: ROLE_TOOL_GRANTS };
|
|
9588
9610
|
VINAYA_BROKER_ROLES = {
|
|
9589
|
-
recognizedRoles:
|
|
9611
|
+
recognizedRoles: VINAYA_LOG_ROLE_NAMES,
|
|
9590
9612
|
workerRoles: ["developer"],
|
|
9591
9613
|
surfaceOwner: "the Planner"
|
|
9592
9614
|
};
|
|
@@ -9670,7 +9692,7 @@ function vinayaRouterPolicies() {
|
|
|
9670
9692
|
var init_vinaya_policies = __esm(() => {
|
|
9671
9693
|
init_launch_records();
|
|
9672
9694
|
init_protected_paths2();
|
|
9673
|
-
|
|
9695
|
+
init_roles2();
|
|
9674
9696
|
init_scratch_names();
|
|
9675
9697
|
});
|
|
9676
9698
|
|
|
@@ -9757,7 +9779,9 @@ var init_programs = __esm(() => {
|
|
|
9757
9779
|
program("log-selftest", `${P}/integration/bin/log-selftest.ts`, "dist/programs/log-selftest.js", [
|
|
9758
9780
|
words("log", "selftest")
|
|
9759
9781
|
]),
|
|
9760
|
-
program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")])
|
|
9782
|
+
program("sync", `${P}/integration/bin/sync.ts`, "dist/programs/sync.js", [words("sync")]),
|
|
9783
|
+
program("run-engine", `${P}/bin/run-engine.ts`, "dist/programs/run-engine.js"),
|
|
9784
|
+
program("supervised-command", `${P}/loops/dev-review/v2/supervised-command.ts`, "dist/programs/supervised-command.js")
|
|
9761
9785
|
]);
|
|
9762
9786
|
SOURCE_ROOT = join19(dirname11(fileURLToPath4(import.meta.url)), "..", "..", "..", "..");
|
|
9763
9787
|
FROM_SOURCE = fileURLToPath4(import.meta.url).endsWith(".ts");
|
|
@@ -12818,7 +12842,7 @@ var COMMANDS = [
|
|
|
12818
12842
|
}
|
|
12819
12843
|
],
|
|
12820
12844
|
details: [
|
|
12821
|
-
"The atta-engine runner starts the
|
|
12845
|
+
"The atta-engine runner starts the Engine runner with Bun, so it needs Bun on the machine, streams its output and returns its exit code. The published package carries the Engine runner as a built program and a checkout starts its source file; a command line without the runner file prints one notice and falls back to standalone. Engine Log events use the local folder only; logs: false disables all Log destinations for both runners.",
|
|
12822
12846
|
"A run's runner is recorded when it starts and never changes: switching `runner` in config changes only the runner of new runs, and a run recorded on `atta-engine` keeps routing to the Engine for `task status`, `task_resume` and `task_cancel`. A start on a pause another runner holds is refused with a typed reason naming the recorded runner and the requested one, and so is a start on another runner's Engine run that is still in flight with no pause held — halted or stopped short of completed or cancelled.",
|
|
12823
12847
|
"`--rollback` ends the Engine run first: a held pause through the shared cancel `task_cancel` uses, which needs a Principal ruling newer than the pause as any cancel does; a run halted with no pause held has its started effects fenced; a run that already completed or was cancelled is refused, as is a driver still running with no pause held, which is never signalled; and the standalone run never starts while the Engine driver lives, a cancelled run's driver given a bounded wait to release its lock. Every started and uncertain effect is then reconciled by its identity: one the forge carries is recorded verified, one it does not carry is left for the restarted run to complete, and one the forge read cannot settle refuses the restart. Each rehearsal appends a record — task, recorded runner, action, reconciled effect identities, the restarted run's runner and terminal state — to `backend-rollback-rehearsals.jsonl` in the task's runtime directory, whether it completed, was refused or failed at a later step, and nothing removes it.",
|
|
12824
12848
|
"`--widen-surface` is the Planner's one command for a widen-surface escalation, and refuses before any write when the held pause is not one (no pause, a pause with a pull request — whose continuation is the ruling on that pull request — or a round whose Developer asked for no `widen_surface`), when a driver is still alive for the task, when the escalation's resolution is already consumed (a replay — the Surface is never widened twice), or when the widened body fails the write gate, whose findings name the field to edit first. The escalation packet's permitted next actions name this command with the globs the Developer asked for, and `task_resume` refuses such an escalation naming it.",
|
|
@@ -13849,7 +13873,7 @@ var CONFIG_REFERENCE = [
|
|
|
13849
13873
|
type: '"standalone" | "atta-engine" (optional)',
|
|
13850
13874
|
semantics: [
|
|
13851
13875
|
"Selects the task runner. The default is `standalone`: an absent key runs the standalone loop, so a published install never changes runner on its own. Any value other than `standalone` or `atta-engine` is refused at config load. `task run --runner <name>` overrides this setting for one invocation, so `standalone` stays selectable by this key and by that flag.",
|
|
13852
|
-
"atta-engine starts the
|
|
13876
|
+
"atta-engine starts the Engine runner as a Bun subprocess with the resolved task, agent and model, so it needs Bun on the machine. The published package carries the Engine runner as a built program, `dist/programs/run-engine.js`, beside a copy of the process files it loads under `dist/vinaya-strict`; a checkout of this repository starts the runner’s source file. When the Engine runner file is absent, `task run` prints one fallback notice, `vinaya task run: Engine runner script is unavailable; falling back to standalone.`, and runs standalone. The Engine Log reaches the same configured destination the standalone loop uses, a server included.",
|
|
13853
13877
|
"Each run records the runner it actually used, and status, resume and cancel follow that record rather than this key. A run with no recorded runner, started before runs recorded one, is a standalone run, whatever this key now names."
|
|
13854
13878
|
],
|
|
13855
13879
|
example: `{ "runner": "atta-engine" }`
|