Finish the start-plan rename in identifiers and docs
This commit is contained in:
1 parent
9ba089a545
commit
b442cf0ebf
6 files changed
+10
-10
No files matched your search
@@ -96,7 +96,7 @@ A file is YAML frontmatter — `name`, `description`, optional `args`, and a `st
|
||||
/workflow audit-routes glob="src/**/*.ts"
|
||||
```
|
||||
|
||||
Both surfaces validate the file, its arguments, its step-output references, the agents, and the working directories before any child spawns, then return immediately with the run’s job ID and the expanded plan. The tool accepts an optional `cwd` for discovery and step resolution; the slash command takes `key=value` arguments, quoted when a value contains spaces.
|
||||
Both surfaces validate the file, its arguments, its step-output references, the agents, and the working directories before any child spawns, then return immediately with the run’s job ID and the start plan. The tool accepts an optional `cwd` for discovery and step resolution; the slash command takes `key=value` arguments, quoted when a value contains spaces.
|
||||
|
||||
A project workflow and its project agents are repo-controlled: an interactive session asks once, naming every untrusted project directory involved in that start, and approving covers each directory for later starts. User workflows and user agents are trusted and never prompt.
|
||||
|
||||
@@ -118,7 +118,7 @@ The `ultra` tool takes `{ plan, args?, cwd? }`. `plan` is the same markdown docu
|
||||
|
||||
Author inline for a one-off plan, and save it under `.pi/workflows/` when it is worth rerunning. There is no `save` action: the run’s journal records the plan with source `"inline"`, and that entry is the plan’s only persisted copy.
|
||||
|
||||
The start call returns the run id, the expanded plan, the size guideline, and the retrieval hint; the run is an ordinary async job, managed with `subagent_jobs` and `/subagents` like any other.
|
||||
The start call returns the run id, the start plan, the size guideline, and the retrieval hint; the run is an ordinary async job, managed with `subagent_jobs` and `/subagents` like any other.
|
||||
|
||||
**Review card.** With a UI and ultra mode off, every `ultra` start shows one review card after validation and before the run: the plan, each step with its `needs` and fan-out source, the child-count estimate against the caps, and every named agent with its user or project source. Declining spawns nothing. With ultra mode on, the mode is the consent and no card appears, though the start result still shows the plan. Print/JSON sessions have no UI and never prompt; they start directly. The review policy lives in the extension — there is no tool parameter for it.
|
||||
|
||||
|
||||
+1
-1
@@ -134,7 +134,7 @@ export class SubagentManager {
|
||||
startWorkflow(request: PreparedWorkflowInvocation): WorkflowStartResult {
|
||||
this.workflows.assertCapacity();
|
||||
const execution = this.startAsyncExecution(request);
|
||||
return { id: execution.id, job: this.snapshot(execution), plan: request.workflow.expandedPlan };
|
||||
return { id: execution.id, job: this.snapshot(execution), plan: request.workflow.startPlan };
|
||||
}
|
||||
|
||||
private startAsyncExecution(request: PreparedInvocation): Execution {
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ import { DEFAULT_MAX_WORKFLOW_ITEMS } from "./config.ts";
|
||||
import type { SubagentParamsType } from "./schemas.ts";
|
||||
import type { DispatchDefaults, PreparedInvocation, PreparedTask } from "./types.ts";
|
||||
import {
|
||||
expandWorkflowPlan,
|
||||
toStartPlan,
|
||||
validateWorkflowArgs,
|
||||
validateWorkflowRunShape,
|
||||
type PreparedWorkflowInvocation,
|
||||
@@ -501,7 +501,7 @@ export async function prepareWorkflowInvocation(
|
||||
plan,
|
||||
args: resolvedArgs,
|
||||
steps,
|
||||
expandedPlan: expandWorkflowPlan(plan),
|
||||
startPlan: toStartPlan(plan),
|
||||
limits,
|
||||
},
|
||||
};
|
||||
|
||||
+2
-2
@@ -38,7 +38,7 @@ export interface WorkflowRunSpec {
|
||||
plan: WorkflowPlan;
|
||||
args: Record<string, string>;
|
||||
steps: PreparedWorkflowStep[];
|
||||
expandedPlan: StartPlan;
|
||||
startPlan: StartPlan;
|
||||
/** Captured once at prepare time; enforcement and the review card share it. */
|
||||
limits: WorkflowLimits;
|
||||
}
|
||||
@@ -80,7 +80,7 @@ export function workflowRunConcurrency(maxWorkers: number): number {
|
||||
}
|
||||
|
||||
/** The start plan is one admission unit per step; each-steps fan out at release. */
|
||||
export function expandWorkflowPlan(plan: WorkflowPlan): StartPlan {
|
||||
export function toStartPlan(plan: WorkflowPlan): StartPlan {
|
||||
return {
|
||||
name: plan.name,
|
||||
description: plan.description,
|
||||
|
||||
@@ -304,7 +304,7 @@ test("session_tree replaces history from the active branch", async () => {
|
||||
}
|
||||
});
|
||||
|
||||
test("workflow tool starts a run and returns its id and expanded plan", async () => {
|
||||
test("workflow tool starts a run and returns its id and start plan", async () => {
|
||||
const h = await harness([], { trusted: true });
|
||||
try {
|
||||
writeProjectWorkflow(h.cwd, "audit", {
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
} from "../src/job-state.ts";
|
||||
import type { JobStatus, PreparedTask, RunResult, TaskSnapshot, TaskStatus } from "../src/types.ts";
|
||||
import { MAX_EXPANDED_CHILDREN, type WorkflowLimits, type WorkflowPlan } from "../src/workflow-plan.ts";
|
||||
import { expandWorkflowPlan, type WorkflowRunSpec } from "../src/workflow-run.ts";
|
||||
import { toStartPlan, type WorkflowRunSpec } from "../src/workflow-run.ts";
|
||||
import {
|
||||
WorkflowSupervisor,
|
||||
type WorkflowSupervisorHost,
|
||||
@@ -67,7 +67,7 @@ function runSpec(steps: FakeStep[], limits: WorkflowLimits = {
|
||||
each: step.each,
|
||||
prepared: { agent, task: step.task, cwd: "/tmp", stepId: step.id },
|
||||
})),
|
||||
expandedPlan: expandWorkflowPlan(plan),
|
||||
startPlan: toStartPlan(plan),
|
||||
limits,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user