@clemrig/factory 0.2.0 → 0.3.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/README.md +23 -23
- package/dist/app/init.d.ts +1 -5
- package/dist/app/init.js +1 -13
- package/dist/app/init.js.map +1 -1
- package/dist/app/runs.d.ts +5 -1
- package/dist/app/runs.js +8 -0
- package/dist/app/runs.js.map +1 -1
- package/dist/cli/reporter.js +42 -15
- package/dist/cli/reporter.js.map +1 -1
- package/dist/cli/status.js +3 -3
- package/dist/cli/status.js.map +1 -1
- package/dist/system/npm.d.ts +5 -0
- package/dist/system/npm.js +14 -0
- package/dist/system/npm.js.map +1 -0
- package/package.json +3 -3
- package/templates/init/workflows/ask/index.ts +2 -1
package/README.md
CHANGED
|
@@ -2,15 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
Write agent workflows in TypeScript inside any repository, run them in the terminal and watch them in a local dashboard.
|
|
4
4
|
|
|
5
|
-
A workflow is an explicit graph of **CODE** stages (your code), **AGENT** stages (an agent run by [Claude Code](https://code.claude.com) or [Pi](https://www.npmjs.com/package/@earendil-works/pi-coding-agent)) and **GATE** stages that accept a result or send it back for correction, a bounded number of times. Workflows live in the repository's `.factory/` folder, are committed with it and run without a build step.
|
|
5
|
+
A workflow is an explicit graph of **CODE** stages (your code), **AGENT** stages (an agent run by [Claude Code](https://code.claude.com), [Codex](https://developers.openai.com/codex) or [Pi](https://www.npmjs.com/package/@earendil-works/pi-coding-agent)) and **GATE** stages that accept a result or send it back for correction, a bounded number of times. Workflows live in the repository's `.factory/` folder, are committed with it and run without a build step.
|
|
6
6
|
|
|
7
7
|
## Requirements
|
|
8
8
|
|
|
9
9
|
- macOS or Linux, Node.js 24 or later, npm.
|
|
10
10
|
- For agents run by Claude Code: the `claude` CLI 2.1.296 or later in the `PATH`, logged in with a claude.ai subscription (`claude`, then `/login`) or given an API key (`ANTHROPIC_API_KEY`).
|
|
11
|
+
- For agents run by Codex: the `codex` CLI 0.160.1 or later in the `PATH`, logged in with a ChatGPT account or an API key (`codex login`) or given an API key (`CODEX_API_KEY`); Codex works only in a Git repository.
|
|
11
12
|
- For agents run by Pi: the `pi` CLI (`@earendil-works/pi-coding-agent` 1.1.0 or later) in the `PATH`, connected to the provider each Pi profile names (`pi`, then `/login`, or the provider's API key).
|
|
12
13
|
|
|
13
|
-
The factory never reads or stores credentials: each runtime uses its own connection, from its login or from an API key in the environment or `.factory/.env`. Claude Code
|
|
14
|
+
The factory never reads or stores credentials: each runtime uses its own connection, from its login or from an API key in the environment or `.factory/.env`. Claude Code and Codex prefer an API key to their login; Pi prefers a login stored for the provider to an API key. `factory doctor` and `factory run` show which connection each runtime uses.
|
|
14
15
|
|
|
15
16
|
## Get started
|
|
16
17
|
|
|
@@ -39,7 +40,7 @@ factory run ask --question "What changed recently?"
|
|
|
39
40
|
|
|
40
41
|
The global `factory` command uses the nearest `.factory/` holding a `package.json`, in the current directory or a parent, and runs the factory version installed there: every machine runs the version pinned in the repository. Only `factory init` and `factory help` run with the global version. Without `.factory/` the command asks for `factory init`; without installed dependencies it gives the `npm ci --prefix .factory` command to run.
|
|
41
42
|
|
|
42
|
-
The example workflow `ask` reads the last 10 commits with `git log` (a CODE stage), asks a
|
|
43
|
+
The example workflow `ask` reads the last 10 commits with `git log` (a CODE stage), asks a Claude Code agent whose built-in tools are limited to `Read`, `Grep` and `Glob` (`claude-sonnet-5-5`, effort `low`; this machine's MCP servers, plugins and hooks still load) to answer the question, and checks the answer with a gate that sends it back at most 3 times. Copy its folder to start a new workflow.
|
|
43
44
|
|
|
44
45
|
## Write a workflow
|
|
45
46
|
|
|
@@ -87,8 +88,8 @@ export default defineWorkflow({
|
|
|
87
88
|
runtime: "claude-code",
|
|
88
89
|
model: "claude-sonnet-5-5",
|
|
89
90
|
thinking: "low",
|
|
91
|
+
// Optional: without it, the agent keeps its own tools and permissions.
|
|
90
92
|
tools: ["Read", "Grep", "Glob"],
|
|
91
|
-
// access: "read" by default; "write" allows tools that change the repository
|
|
92
93
|
},
|
|
93
94
|
schema: notes,
|
|
94
95
|
context: pick("input", "commits"),
|
|
@@ -132,27 +133,26 @@ Workflows are TypeScript run directly by Node: use erasable syntax only (no `enu
|
|
|
132
133
|
| `pick(...keys)` | agent context from `input` and data keys |
|
|
133
134
|
| `runProcess(argv, cwd, timeoutMs)` | runs a command without a shell; Ctrl-C stops it |
|
|
134
135
|
|
|
135
|
-
`defineWorkflow` refuses, when the workflow is loaded: a `.` in a stage or outcome name (a correction counter is named `<stage>.<outcome>`), an unrouted outcome, an unknown target, a retry maximum outside 1–100, a loop whose edges include no `retry` (with the loop's path), an invalid profile, a
|
|
136
|
+
`defineWorkflow` refuses, when the workflow is loaded: a `.` in a stage or outcome name (a correction counter is named `<stage>.<outcome>`), an unrouted outcome, an unknown target, a retry maximum outside 1–100, a loop whose edges include no `retry` (with the loop's path), an invalid profile, a prompt or session name that cannot name a file, a `maxCostUsd` that is not a positive number or that a Codex stage could not check, and an input that is not a `z.object`. Loading `factory.ts` also refuses an input whose name cannot be an option (`json`, `help`, `max-cost-usd`, or other than letters, digits, `-` and `_` after a letter). Every run is therefore bounded.
|
|
136
137
|
|
|
137
138
|
**Inputs.** Each field of `input` becomes a `--<name>` option of `factory run`; an option given without a value is `true` and only a boolean field accepts it: `z.boolean()`, possibly with `.optional()`, `.nullable()` or `.default(…)` (a transformed boolean or one with `.catch` takes no option alone). A missing, invalid or unknown option is refused with the list of problems, before any run is created. A workflow without `input` accepts no input option.
|
|
138
139
|
|
|
139
|
-
**Budget.** `maxCostUsd` (optional) fails a run once the cost its agents' runtimes announced exceeds it; `factory run … --max-cost-usd 2` sets it for one run, instead of the workflow's. It is checked before and after each agent call, failed or not, on the runtime's figures: a running call is not stopped and can go past it; once it is exceeded, no further call starts and the run fails at its next stage boundary, even if workflow code catches the error. A call that announced no cost fails a run that has a budget, since the budget can no longer be checked. With a subscription, the cost is an estimate.
|
|
140
|
+
**Budget.** `maxCostUsd` (optional) fails a run once the cost its agents' runtimes announced exceeds it; `factory run … --max-cost-usd 2` sets it for one run, instead of the workflow's. It is checked before and after each agent call, failed or not, on the runtime's figures: a running call is not stopped and can go past it; once it is exceeded, no further call starts and the run fails at its next stage boundary, even if workflow code catches the error. A call that announced no cost fails a run that has a budget, since the budget can no longer be checked; Codex announces tokens only, so a budget is refused, before any run, for a workflow with a Codex stage. With a subscription, the cost is an estimate.
|
|
140
141
|
|
|
141
|
-
**Profiles.** Each agent stage declares its
|
|
142
|
+
**Profiles.** Each agent stage declares its profile; no machine setting of the factory changes it. A profile is a plain object: share one between stages with a constant, typed with `satisfies AgentProfile` (`AgentProfile` is exported by `@clemrig/factory`).
|
|
142
143
|
|
|
143
|
-
| Field | Claude Code (`runtime: "claude-code"`) | Pi (`runtime: "pi"`) |
|
|
144
|
-
|
|
145
|
-
| `
|
|
146
|
-
| `
|
|
147
|
-
| `
|
|
148
|
-
| `
|
|
149
|
-
|
|
|
150
|
-
|
|
|
151
|
-
| `timeoutMs` | default 15 minutes | default 15 minutes |
|
|
144
|
+
| Field | Claude Code (`runtime: "claude-code"`) | Codex (`runtime: "codex"`) | Pi (`runtime: "pi"`) |
|
|
145
|
+
|---|---|---|---|
|
|
146
|
+
| `provider` | — | — | the Pi provider, required (`openai`, `openai-codex`…) |
|
|
147
|
+
| `model` | model name or alias | model name | model name |
|
|
148
|
+
| `thinking` | effort: `low` … `max` | reasoning effort of the model (`low`, `medium`, `high`…) | `off` … `max` |
|
|
149
|
+
| `tools` | optional: exact names (`Read`, `Grep`, `Bash`…) and `mcp__<server>__<tool>`; limits the built-in tools and lets the listed ones run | — | optional: exact names (`read`, `bash`…); `[]` for none |
|
|
150
|
+
| other | `permissionMode` (a `--permission-mode` choice), `mcpServers: { name: { command, args? } }` | `sandbox`: `read-only`, `workspace-write` or `danger-full-access` | `skills`, `extensions` (paths) |
|
|
151
|
+
| `timeoutMs` | default 15 minutes | default 15 minutes | default 15 minutes |
|
|
152
152
|
|
|
153
|
-
|
|
153
|
+
Each agent runs with this machine's and this repository's configuration, as you would run it yourself: Claude Code with its settings, `CLAUDE.md`, plugins, hooks, skills, MCP servers and memory; Codex with its `config.toml`, `AGENTS.md` files, skills and MCP servers; Pi with its extensions, skills, context files and MCP servers. The profile only adds its settings; without `tools`, `permissionMode` or `sandbox`, the agent's own configuration decides. The same workflow can therefore behave differently on another machine, and a repository's own hooks and MCP servers run with its agents. Relative skill, extension and MCP command paths are relative to `.factory/`; a bare command is looked up in the `PATH`. Runtimes are not sandboxes unless one is enabled: their tools act with your rights.
|
|
154
154
|
|
|
155
|
-
**Prompts.** An agent's prompt is `.factory/workflows/<workflow>/prompts/<name>.md`, where the name is the stage's unless `agent({ prompt })` names another. It is appended to the runtime's system prompt; the request (context and output JSON Schema) follows on standard input. Prompts are read when a run starts: an edit applies to the next run, without building anything.
|
|
155
|
+
**Prompts.** An agent's prompt is `.factory/workflows/<workflow>/prompts/<name>.md`, where the name is the stage's unless `agent({ prompt })` names another. It is appended to the runtime's system prompt (Codex receives it as the session's `developer_instructions`); the request (context and output JSON Schema) follows on standard input. Prompts are read when a run starts: an edit applies to the next run, without building anything.
|
|
156
156
|
|
|
157
157
|
**Sessions.** An agent stage keeps one conversation per run: a correction sent back to it resumes the conversation, with the gate's feedback. `session: "name"` shares a conversation between stages of the same runtime (sharing one across runtimes is refused); `session: (state) => name` opens one per value. A run's stage and session names form one namespace per runtime: a name returned by a function joins the conversation of that name on the same runtime. Session names start and end with a letter or digit.
|
|
158
158
|
|
|
@@ -167,17 +167,17 @@ factory doctor [--json]
|
|
|
167
167
|
|
|
168
168
|
Before creating a run, `factory run` validates the input, reads the prompts and checks from the repository, where the agents will work, for each runtime the workflow uses, that its executable is in the `PATH`, at least the supported version, and connected; a missing piece fails the command with the stage, runtime and reason. The terminal then shows each runtime's version and connection. A model the account cannot use fails the run at its first call, with the runtime's message.
|
|
169
169
|
|
|
170
|
-
The run executes in the foreground. The terminal shows each stage's start and end, decisions and corrections with their counter (`[check.invalid 1/3]`), journal messages and, for an agent, the start
|
|
170
|
+
The run executes in the foreground. The terminal shows each stage's start and end, decisions and corrections with their counter (`[check.invalid 1/3]`), journal messages and, for an agent, the start of its call with its model, thinking, runtime choices and tools, its end, each finished tool with its duration and the runtime's warnings; then the result, the duration, the agents' tokens and estimated cost, and the runtimes used. `--json` writes every event, then the result, as JSON lines on standard output. Exit codes: 0 completed, 1 error or failed run.
|
|
171
171
|
|
|
172
|
-
**Ctrl-C** stops the run's child processes and ends the run as `failed` with its cause before its next stage, or instead of completing; a second Ctrl-C kills the remaining child processes and quits at once (exit code 130, the run may then stay `running`). A failed or interrupted run is not resumed: start a new one.
|
|
172
|
+
**Ctrl-C** stops the run's child processes and ends the run as `failed` with its cause before its next stage, or instead of completing; a second Ctrl-C kills the remaining child processes and quits at once (exit code 130, the run may then stay `running`); commands that Codex runs in their own process groups are stopped by Codex on the first Ctrl-C, not by the second. A failed or interrupted run is not resumed: start a new one.
|
|
173
173
|
|
|
174
|
-
`factory status` lists the repository's runs or shows one; while `factory.ts` cannot load, `status` and `ui` say so and still show the runs with the default rendering. `factory ui` serves a read-only dashboard of the repository's runs on `127.0.0.1` (port chosen by the system unless `--port` sets it, URL printed; Ctrl-C stops it): the runs with workflow, status, current stage, duration, estimated cost and last update, and for a run its runtimes, a timeline with one block per stage (status, duration, the agent's tools and tokens as they come, journal, decision), the correction counters and the result. It follows a running run as it goes. To watch a run on another machine, forward the same port through SSH: `ssh -L 4321:127.0.0.1:4321 machine`, run `factory ui --port 4321` there, and open `http://localhost:4321/`. `factory doctor` checks Node, loads the workflows, reads their prompts, lists each workflow's options and checks each runtime's executable, version and connection, without any provider request.
|
|
174
|
+
`factory status` lists the repository's runs or shows one; while `factory.ts` cannot load, `status` and `ui` say so and still show the runs with the default rendering. `factory ui` serves a read-only dashboard of the repository's runs on `127.0.0.1` (port chosen by the system unless `--port` sets it, URL printed; Ctrl-C stops it): the runs with workflow, status, current stage, duration, estimated cost and last update, and for a run its runtimes, a timeline with one block per stage (status, duration, the agent call's model and settings, its tools and tokens as they come, journal, decision), the correction counters and the result. It follows a running run as it goes. To watch a run on another machine, forward the same port through SSH: `ssh -L 4321:127.0.0.1:4321 machine`, run `factory ui --port 4321` there, and open `http://localhost:4321/`. `factory doctor` checks Node, loads the workflows, reads their prompts, lists each workflow's options and checks each runtime's executable, version and connection, without any provider request.
|
|
175
175
|
|
|
176
176
|
## Data
|
|
177
177
|
|
|
178
|
-
Each run keeps `state.json` and `events.jsonl` in `.factory/runs/<RUN_ID>/`, plus its Pi sessions and Claude Code session markers; Claude Code
|
|
178
|
+
Each run keeps `state.json` and `events.jsonl` in `.factory/runs/<RUN_ID>/`, plus its Pi sessions and Claude Code and Codex session markers; Claude Code and Codex keep their transcripts in their own storage (`~/.claude/projects/…`, `~/.codex/sessions/…`). Runs hold inputs, agent outputs and the journal: they stay private and are ignored by Git. `.factory/.env` is loaded automatically, without overriding variables already set in the shell; runtimes, MCP servers and commands inherit the environment. `factory run` executes the code of `.factory/`: trust it as you trust `npm run`. The dashboard shows the same data to any local process that can reach `127.0.0.1`.
|
|
179
179
|
|
|
180
|
-
Tokens and costs are the figures each runtime announces
|
|
180
|
+
Tokens and costs are the figures each runtime announces: Claude Code announces at the end of a call its session's total, earlier calls included, and its tokens during a call are provisional; Codex announces at the end of each turn its thread's total tokens, earlier turns included, without a cost (its input includes the cached tokens, which flow takes out so that input counts the same tokens for every runtime); Pi announces each response with its cost. A run's total is the sum of its sessions, with the cost they announced: a call without a cost makes the cost partial, unknown while no call announced one. The estimated cost is the runtime's public-price estimate, not a bill.
|
|
181
181
|
|
|
182
182
|
## Limits
|
|
183
183
|
|
package/dist/app/init.d.ts
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
|
+
export { npmInstall as installFactory } from "../system/npm.js";
|
|
1
2
|
export { createFromTemplates as createFactory } from "../system/templates.js";
|
|
2
|
-
/** Installs `.factory/`'s dependencies; `output` explains a failure. */
|
|
3
|
-
export declare function installFactory(factoryDir: string): Promise<{
|
|
4
|
-
ok: boolean;
|
|
5
|
-
output: string;
|
|
6
|
-
}>;
|
package/dist/app/init.js
CHANGED
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
export { npmInstall as installFactory } from "../system/npm.js";
|
|
2
2
|
export { createFromTemplates as createFactory } from "../system/templates.js";
|
|
3
|
-
/** Installs `.factory/`'s dependencies; `output` explains a failure. */
|
|
4
|
-
export async function installFactory(factoryDir) {
|
|
5
|
-
const install = await runProcess(["npm", "install", "--no-audit", "--no-fund"], factoryDir, 600_000).catch((error) => ({
|
|
6
|
-
exitCode: 1,
|
|
7
|
-
stdout: "",
|
|
8
|
-
stderr: error instanceof Error ? error.message : String(error),
|
|
9
|
-
}));
|
|
10
|
-
return {
|
|
11
|
-
ok: install.exitCode === 0,
|
|
12
|
-
output: install.stderr || install.stdout,
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
3
|
//# sourceMappingURL=init.js.map
|
package/dist/app/init.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/app/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/app/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,mBAAmB,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/app/runs.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import type { RunState } from "@clemrig/flow";
|
|
1
|
+
import type { RunEntry, RunState } from "@clemrig/flow";
|
|
2
2
|
import type { Factory } from "../system/factory.js";
|
|
3
|
+
/** The repository's runs, in creation order; an unreadable run comes with its error. */
|
|
4
|
+
export declare function listRuns(factory: Factory): Promise<RunEntry[]>;
|
|
5
|
+
/** One run of the repository; an unknown ID is refused. */
|
|
6
|
+
export declare function loadRun(factory: Factory, id: string): Promise<RunState>;
|
|
3
7
|
/** A run's result lines: its workflow's rendering, or its validated data when the workflow left `factory.ts`. */
|
|
4
8
|
export declare function presentResult(factory: Factory, state: Readonly<RunState>): string[];
|
package/dist/app/runs.js
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import * as flow from "@clemrig/flow";
|
|
2
|
+
/** The repository's runs, in creation order; an unreadable run comes with its error. */
|
|
3
|
+
export function listRuns(factory) {
|
|
4
|
+
return flow.listRuns(factory.runsDir);
|
|
5
|
+
}
|
|
6
|
+
/** One run of the repository; an unknown ID is refused. */
|
|
7
|
+
export function loadRun(factory, id) {
|
|
8
|
+
return flow.loadRun(factory.runsDir, id);
|
|
9
|
+
}
|
|
2
10
|
/** A run's result lines: its workflow's rendering, or its validated data when the workflow left `factory.ts`. */
|
|
3
11
|
export function presentResult(factory, state) {
|
|
4
12
|
return flow.presentResult(factory.workflows.get(state.workflow), state);
|
package/dist/app/runs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runs.js","sourceRoot":"","sources":["../../src/app/runs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AAItC,iHAAiH;AACjH,MAAM,UAAU,aAAa,CAC3B,OAAgB,EAChB,KAAyB;IAEzB,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,CAAC;AAC1E,CAAC"}
|
|
1
|
+
{"version":3,"file":"runs.js","sourceRoot":"","sources":["../../src/app/runs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AAItC,wFAAwF;AACxF,MAAM,UAAU,QAAQ,CAAC,OAAgB;IACvC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AACxC,CAAC;AAED,2DAA2D;AAC3D,MAAM,UAAU,OAAO,CAAC,OAAgB,EAAE,EAAU;IAClD,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;AAC3C,CAAC;AAED,iHAAiH;AACjH,MAAM,UAAU,aAAa,CAC3B,OAAgB,EAChB,KAAyB;IAEzB,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,CAAC;AAC1E,CAAC"}
|
package/dist/cli/reporter.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { elapsedMs, runtimeLabels, } from "@clemrig/flow";
|
|
1
|
+
import { elapsedMs, runtimeLabels, summarizeRun, } from "@clemrig/flow";
|
|
2
2
|
function duration(ms) {
|
|
3
3
|
const seconds = Math.max(0, Math.floor(ms / 1000));
|
|
4
4
|
const hours = Math.floor(seconds / 3600);
|
|
@@ -10,34 +10,62 @@ export function metricsSummary(state, now = Date.now()) {
|
|
|
10
10
|
const elapsed = elapsedMs(state, now);
|
|
11
11
|
const usage = state.metrics?.usage;
|
|
12
12
|
const count = (n) => n.toLocaleString("en-US");
|
|
13
|
+
const { costUsd } = summarizeRun(state);
|
|
13
14
|
return [
|
|
14
15
|
`Duration: ${elapsed === null ? "unavailable" : duration(elapsed)}`,
|
|
15
16
|
!usage
|
|
16
17
|
? "Agents: unavailable"
|
|
17
18
|
: usage.responses
|
|
18
|
-
? `Agents: ${count(usage.input)} input · ${count(usage.output)} output · ${count(usage.cacheRead)} cache read · ${count(usage.cacheWrite)} cache write tokens · estimated cost ${
|
|
19
|
+
? `Agents: ${count(usage.input)} input · ${count(usage.output)} output · ${count(usage.cacheRead)} cache read · ${count(usage.cacheWrite)} cache write tokens · estimated cost ${costUsd === null ? "unavailable" : `${costUsd.toFixed(6)} USD`}${usage.missing ? " (partial)" : ""}`
|
|
19
20
|
: `Agents: ${usage.missing ? "unavailable (partial)" : "no measured call"}`,
|
|
20
21
|
];
|
|
21
22
|
}
|
|
23
|
+
/** A setting's name as the operator reads it: `permissionMode` → `permission mode`. */
|
|
24
|
+
const settingLabel = (key) => key.replace(/[A-Z]/g, (letter) => ` ${letter.toLowerCase()}`);
|
|
25
|
+
/**
|
|
26
|
+
* An agent call's start with its settings as its runtime recorded them, whatever
|
|
27
|
+
* the runtime: its thinking and its other single values, then its tools when it
|
|
28
|
+
* names them; other lists stay in the dashboard.
|
|
29
|
+
*/
|
|
30
|
+
function settingsLines(started, settings) {
|
|
31
|
+
const values = Object.entries(settings).flatMap(([key, value]) => key === "thinking" ||
|
|
32
|
+
key === "timeoutMs" ||
|
|
33
|
+
value === undefined ||
|
|
34
|
+
Array.isArray(value)
|
|
35
|
+
? []
|
|
36
|
+
: [`${settingLabel(key)} ${String(value)}`]);
|
|
37
|
+
const tools = "tools" in settings ? settings.tools : undefined;
|
|
38
|
+
return [
|
|
39
|
+
[started, `thinking ${settings.thinking}`, ...values].join(" · "),
|
|
40
|
+
...(tools ? [`Tools: ${tools.join(", ") || "none"}`] : []),
|
|
41
|
+
];
|
|
42
|
+
}
|
|
22
43
|
const icons = { started: "→", passed: "✓", failed: "✗", completed: "✓" };
|
|
23
44
|
const inSeconds = (ms) => `${(ms / 1000).toFixed(1)} s`;
|
|
24
|
-
/**
|
|
25
|
-
|
|
45
|
+
/**
|
|
46
|
+
* An agent call's start with its model, thinking, runtime choices and tools, its end, its
|
|
47
|
+
* finished tools and its warnings; not each response.
|
|
48
|
+
*/
|
|
49
|
+
function activityLines(activity) {
|
|
26
50
|
switch (activity.kind) {
|
|
27
|
-
case "call":
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
51
|
+
case "call": {
|
|
52
|
+
const runtime = runtimeLabels[activity.runtime];
|
|
53
|
+
if (activity.status !== "started")
|
|
54
|
+
return [`${runtime} ${activity.status}`];
|
|
55
|
+
const started = `${runtime} started with ${activity.model}`;
|
|
56
|
+
const { settings } = activity;
|
|
57
|
+
return settings ? settingsLines(started, settings) : [started];
|
|
58
|
+
}
|
|
31
59
|
case "tool":
|
|
32
60
|
return activity.status === "started"
|
|
33
|
-
?
|
|
61
|
+
? []
|
|
34
62
|
: activity.status === "failed"
|
|
35
|
-
? `${activity.name} failed after ${inSeconds(activity.durationMs)}`
|
|
36
|
-
: `${activity.name} ${inSeconds(activity.durationMs)}
|
|
63
|
+
? [`${activity.name} failed after ${inSeconds(activity.durationMs)}`]
|
|
64
|
+
: [`${activity.name} ${inSeconds(activity.durationMs)}`];
|
|
37
65
|
case "warning":
|
|
38
|
-
return activity.message;
|
|
66
|
+
return [activity.message];
|
|
39
67
|
default:
|
|
40
|
-
return
|
|
68
|
+
return [];
|
|
41
69
|
}
|
|
42
70
|
}
|
|
43
71
|
/** Stage events and journal on stderr; results on stdout; JSON lines on stdout with --json. */
|
|
@@ -60,8 +88,7 @@ export class TerminalReporter {
|
|
|
60
88
|
return;
|
|
61
89
|
}
|
|
62
90
|
if (event.type === "agent") {
|
|
63
|
-
const line
|
|
64
|
-
if (line)
|
|
91
|
+
for (const line of activityLines(event.activity))
|
|
65
92
|
this.detail(line);
|
|
66
93
|
return;
|
|
67
94
|
}
|
package/dist/cli/reporter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reporter.js","sourceRoot":"","sources":["../../src/cli/reporter.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"reporter.js","sourceRoot":"","sources":["../../src/cli/reporter.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,SAAS,EAGT,aAAa,EACb,YAAY,GACb,MAAM,eAAe,CAAC;AAEvB,SAAS,QAAQ,CAAC,EAAU;IAC1B,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;IACnD,MAAM,KAAK,GAAG,IA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CAAC,CAAC,CAAC,EAAE,CAAC;YACrC,GAAG,cAAc,CAAC,KAAK,CAAC;YACxB,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,GAAG,CACxC,CAAC,OAAO,EAAE,EAAE,CAAC,YAAY,OAAO,EAAE,CACnC;YACD,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;SACxB,CAAC;QACF,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;CACF"}
|
package/dist/cli/status.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { listRuns, loadRun } from "
|
|
1
|
+
import { listRuns, loadRun } from "../app/runs.js";
|
|
2
2
|
/** Every run of the repository, or one run. */
|
|
3
3
|
export async function status(factory, reporter, runId) {
|
|
4
4
|
if (runId) {
|
|
5
|
-
reporter.result(await loadRun(factory
|
|
5
|
+
reporter.result(await loadRun(factory, runId));
|
|
6
6
|
return 0;
|
|
7
7
|
}
|
|
8
|
-
for (const entry of await listRuns(factory
|
|
8
|
+
for (const entry of await listRuns(factory))
|
|
9
9
|
if ("state" in entry)
|
|
10
10
|
reporter.result(entry.state);
|
|
11
11
|
else
|
package/dist/cli/status.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/cli/status.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/cli/status.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAGnD,+CAA+C;AAC/C,MAAM,CAAC,KAAK,UAAU,MAAM,CAC1B,OAAgB,EAChB,QAA0B,EAC1B,KAAyB;IAEzB,IAAI,KAAK,EAAE,CAAC;QACV,QAAQ,CAAC,MAAM,CAAC,MAAM,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;QAC/C,OAAO,CAAC,CAAC;IACX,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,MAAM,QAAQ,CAAC,OAAO,CAAC;QACzC,IAAI,OAAO,IAAI,KAAK;YAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;;YAC9C,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IAClD,OAAO,CAAC,CAAC;AACX,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { runProcess } from "@clemrig/flow";
|
|
2
|
+
/** Installs the dependencies of the package in `dir`; `output` explains a failure. */
|
|
3
|
+
export async function npmInstall(dir) {
|
|
4
|
+
const install = await runProcess(["npm", "install", "--no-audit", "--no-fund"], dir, 600_000).catch((error) => ({
|
|
5
|
+
exitCode: 1,
|
|
6
|
+
stdout: "",
|
|
7
|
+
stderr: error instanceof Error ? error.message : String(error),
|
|
8
|
+
}));
|
|
9
|
+
return {
|
|
10
|
+
ok: install.exitCode === 0,
|
|
11
|
+
output: install.stderr || install.stdout,
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=npm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npm.js","sourceRoot":"","sources":["../../src/system/npm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,sFAAsF;AACtF,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,GAAW;IAEX,MAAM,OAAO,GAAG,MAAM,UAAU,CAC9B,CAAC,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,CAAC,EAC7C,GAAG,EACH,OAAO,CACR,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE,CAAC,CAAC;QAC3B,QAAQ,EAAE,CAAC;QACX,MAAM,EAAE,EAAE;QACV,MAAM,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;KAC/D,CAAC,CAAC,CAAC;IACJ,OAAO;QACL,EAAE,EAAE,OAAO,CAAC,QAAQ,KAAK,CAAC;QAC1B,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM;KACzC,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clemrig/factory",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Write agent workflows in TypeScript inside any repository, run them in the terminal and watch them in a local dashboard",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"prepack": "npm run build"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@clemrig/flow": "0.
|
|
42
|
-
"@clemrig/flow-ui": "0.1.
|
|
41
|
+
"@clemrig/flow": "0.3.0",
|
|
42
|
+
"@clemrig/flow-ui": "0.1.2"
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -34,7 +34,8 @@ export default defineWorkflow({
|
|
|
34
34
|
{ ok: "answer" },
|
|
35
35
|
),
|
|
36
36
|
// AGENT: prompts/answer.md, with the question and the commits as context.
|
|
37
|
-
//
|
|
37
|
+
// Claude Code runs with this machine's configuration; `tools` limits it to
|
|
38
|
+
// reading the repository.
|
|
38
39
|
answer: node(
|
|
39
40
|
agent({
|
|
40
41
|
profile: {
|