Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.
JavaScript agentic-codingai-agentsai-governanceautonomous-agentsclaude-codeclicode-reviewcodexcoding-agentsdeveloper-toolsgit-hooksllmlocal-firstmulti-agentsoftware-factoryspec-driven-developmentverificationvibe-coding
refactor(bar): keep command authorship outside the shared CLI [V1]
Corey Olson1fd7dd9068a9
diff --git a/src/bar-actor.js b/src/bar-actor.jsindex 8f8402c0..e612b0aa 100644--- a/src/bar-actor.js+++ b/src/bar-actor.js@@ -1,3 +1,7 @@+import { agentAt } from './board.js';+import { COORDINATOR } from './config.js';+import { requirePersonChannel } from './person.js';+import { barReadySetting } from './bar-readiness.js';import { agentParent } from './seats.js';/** Current bar authorship survives native takeover without rewriting historical seats [V1,H16]. */import { runtimeSessionIdentity, parentSessionDigest } from './parent-session.js';@@ -31,3 +35,17 @@ export function normalizeBarActor(value) {}return { session: value.session, parent: value.parent };}++/** Capture bar provenance only at author/sign commands, never during unrelated lifecycle dispatch. */+export function barActorForCommand(ctx, board, { asPerson = false } = {}) {+ if (!barReadySetting(board).enabled) return null;+ const actor = ctx.info.isMain ? COORDINATOR : agentAt(board, ctx.info.root)?.agent_id;+ const phone = ctx.io.personRequest?.phase === 'execute';+ if (asPerson || phone || ctx.io.personChannel === 'view' && actor === COORDINATOR) {+ if (!phone) requirePersonChannel(ctx.io.personChannel);+ if (!ctx.info.isMain || actor !== COORDINATOR) throw new Refused('B26_PERSON_ANSWER', 'the person authors or signs a bar from the main checkout or its authenticated view');+ return { authority: 'person', session: null, parent: null };+ }+ if (ctx.io.personChannel === 'view' || ctx.io.personRequest) return null;+ return nativeBarActorForSeat(board, actor);+}diff --git a/src/cli.js b/src/cli.jsindex 9aed1e04..b5166d3d 100644--- a/src/cli.js+++ b/src/cli.js@@ -1,5 +1,5 @@-import { nativeBarActorForSeat } from './bar-actor.js';-import { barReadinessRequired, barReadiness, barReadySetting } from './bar-readiness.js';+export { barActorForCommand } from './bar-actor.js';+import { barReadinessRequired, barReadiness } from './bar-readiness.js';import { barCoverageCommand, barCoverageForPolicy } from './bar-coverage.js';/*** The pullboard command line: every command, bound to who is asking (B3, R3). The main checkout is the@@ -897,20 +897,6 @@ function relayOutboxSetting(root) {try { return configFromSource(coordinatorFile(root, CONFIG_FILE).stdout).relay?.outbox === true; } catch { return false; }}-/** Capture bar provenance only at author/sign commands, never during unrelated lifecycle dispatch. */-export function barActorForCommand(ctx, board, { asPerson = false } = {}) {- if (!barReadySetting(board).enabled) return null;- const actor = ctx.info.isMain ? COORDINATOR : store.agentAt(board, ctx.info.root)?.agent_id;- const phone = ctx.io.personRequest?.phase === 'execute';- if (asPerson || phone || ctx.io.personChannel === 'view' && actor === COORDINATOR) {- if (!phone) requirePersonChannel(ctx.io.personChannel);- if (!ctx.info.isMain || actor !== COORDINATOR) throw new Refused('B26_PERSON_ANSWER', 'the person authors or signs a bar from the main checkout or its authenticated view');- return { authority: 'person', session: null, parent: null };- }- if (ctx.io.personChannel === 'view' || ctx.io.personRequest) return null;- return nativeBarActorForSeat(board, actor);-}-export async function ordered(ctx, board, operation, args) {const initialBaseline = initialSpecApprovalBaseline(ctx, board, operation);// Only a reject or a reopen can open a builder's first-refusal window (#954), so an accept never reads the coordinator's policy.