@re-cinq/floor-pipeline 0.6.1 → 0.6.2
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 +51 -32
- package/dist/agent-config-schema.js +8 -8
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
A pipeline as one file: an assembly line with its stations, its agent definitions and their prompts, its files and its schedules. One file is one pipeline, and holds everything the pipeline needs that a file can hold.
|
|
4
4
|
|
|
5
|
-
The tool speaks the HTTP API of a [floor](https://github.com/re-cinq/floor) and nothing else. It is a client like any other, with the service token.
|
|
6
|
-
|
|
7
5
|
```
|
|
8
6
|
npm install @re-cinq/floor-pipeline # the command is floor-pipeline
|
|
9
7
|
|
|
@@ -21,25 +19,23 @@ floor-pipeline migrate pipelines/ --floor http://floor-api:8080 --wait-ready 180
|
|
|
21
19
|
|
|
22
20
|
| command | what it does |
|
|
23
21
|
|---|---|
|
|
24
|
-
| `export <line>` |
|
|
25
|
-
| `export --all --dir <dir>` |
|
|
26
|
-
| `import <file>...` |
|
|
27
|
-
| `migrate <dir>` | the folder's files in the order of their names, each once |
|
|
28
|
-
| `--wait-ready <seconds>` |
|
|
22
|
+
| `export <line>` | Writes the assembly line's latest version, and what it names, as one file |
|
|
23
|
+
| `export --all --dir <dir>` | One file per assembly line, named after it: a backup |
|
|
24
|
+
| `import <file>...` | Puts each file to the floor. The same file twice changes nothing, because a version is its content |
|
|
25
|
+
| `migrate <dir>` | Runs the folder's files in the order of their names, each once |
|
|
26
|
+
| `--wait-ready <seconds>` | First polls the floor's `/readyz` until it answers 200. If it does not in time, it fails, naming the floor and the seconds. For a job that starts with the floor, such as the chart's seed Job |
|
|
29
27
|
|
|
30
28
|
## Where this fits
|
|
31
29
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
[`@floor/lore-converter`](https://github.com/re-cinq/floor/blob/main/packages/lore-converter/README.md) brings an assembly line
|
|
35
|
-
moves a whole pipeline between a file and a floor — to review it, to keep it in git, or to put the
|
|
36
|
-
same one into another floor. It moves definitions only; assembly runs stay where they happened.
|
|
30
|
+
The tool is a client of a [floor](https://github.com/re-cinq/floor) and nothing more. It speaks the floor's HTTP API with a service token, as lore or a worker does, and links none of floor's own packages.
|
|
31
|
+
|
|
32
|
+
[`@floor/lore-converter`](https://github.com/re-cinq/floor/blob/main/packages/lore-converter/README.md) brings an assembly line in from lore. This tool moves a whole pipeline between a file and a floor, to review it, to keep it in git, or to put the same one into another floor. It moves definitions only. Assembly runs stay where they happened.
|
|
37
33
|
|
|
38
34
|
See [the map](https://github.com/re-cinq/floor/blob/main/README.md).
|
|
39
35
|
|
|
40
36
|
## The file
|
|
41
37
|
|
|
42
|
-
YAML
|
|
38
|
+
The file is YAML in `snake_case`, as the docs write definitions. Every prompt is in it as a block.
|
|
43
39
|
|
|
44
40
|
```yaml
|
|
45
41
|
line:
|
|
@@ -79,23 +75,23 @@ schedules:
|
|
|
79
75
|
nightly: { cron: "0 3 * * *", payload: { pr_url: https://pr/1 } }
|
|
80
76
|
```
|
|
81
77
|
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
78
|
+
- An assembly line may name a `fail` node beside its `exit`: `fail: failed`, with `- { id: failed }` among its nodes. An assembly run that an edge leads there settles as `failed`. Written back, `fail` comes right after `exit`.
|
|
79
|
+
- The floor's own fields change spelling, `timeout_minutes` to `timeoutMinutes`. Names a person chose do not: a model's name, a repository's, a key of `config` or of `env`.
|
|
80
|
+
- A file an assembly line ships is in the pipeline file by its content. Text is kept as it is, anything else as `{ base64: ... }`. The floor keeps it by its hash, and a hash is no backup.
|
|
81
|
+
- A station two assembly lines use is in both files. Put twice with the same content, it is one version.
|
|
82
|
+
- What is exported is what runs now, which is each definition's latest version. Older versions stay on the floor and are not in the file.
|
|
87
83
|
|
|
88
84
|
## What a file cannot hold
|
|
89
85
|
|
|
90
86
|
| | where it is |
|
|
91
87
|
|---|---|
|
|
92
|
-
| Secrets: a model's key, an MCP server's token |
|
|
93
|
-
| The program behind a service station |
|
|
94
|
-
| Runs, visits, their records and costs |
|
|
88
|
+
| Secrets: a model's key, an MCP server's token | In the cluster's `agent-secrets`. A definition names the key, and never the value |
|
|
89
|
+
| The program behind a service station | Wherever it runs. The file declares the station. The program that posts a review is lore's |
|
|
90
|
+
| Runs, visits, their records and costs | In the floor's database. This is a backup of what a floor is told to do, and not of what it did |
|
|
95
91
|
|
|
96
92
|
## A collection
|
|
97
93
|
|
|
98
|
-
A collection is a folder of lines. Each
|
|
94
|
+
A collection is a folder of assembly lines. Each one has its own folder, with its pipeline and its agents. An agent is a markdown file: the frontmatter holds its settings, and the body is its prompt. A file named `<agent>.extra.md` adds to the prompt of an agent the host already ships.
|
|
99
95
|
|
|
100
96
|
```
|
|
101
97
|
code-review/
|
|
@@ -105,15 +101,36 @@ code-review/
|
|
|
105
101
|
reviewer.extra.md
|
|
106
102
|
```
|
|
107
103
|
|
|
108
|
-
|
|
104
|
+
With Claude Code, the [floor skills](https://re-cinq.github.io/floor/reference/skills/) write these files and run `lint` after every change.
|
|
105
|
+
|
|
106
|
+
### lint
|
|
107
|
+
|
|
108
|
+
`lint` checks a collection without a floor and without a token.
|
|
109
109
|
|
|
110
110
|
```
|
|
111
111
|
floor-pipeline lint collection/ --host-key execution_mode
|
|
112
112
|
```
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
A key that belongs to the host is named in the collection's `floor-collection.yaml` (`host_keys: [execution_mode]`), or with `--host-key`, as often as needed. `lint` and `apply` use both.
|
|
115
|
+
|
|
116
|
+
`lint` asks the same questions the floor asks of an assembly line, through [`@re-cinq/floor-assembly-lines`](../assembly-lines/README.md). Two of its rules:
|
|
117
|
+
|
|
118
|
+
- `unseeded-need` is a need that is neither a line argument or file nor produced on every path into its node. Its message gives one path that arrives without it.
|
|
119
|
+
- `unsupplied-input` is a `{name}` in an agent's prompt that the station does not give.
|
|
115
120
|
|
|
116
|
-
|
|
121
|
+
What a station gives a prompt:
|
|
122
|
+
|
|
123
|
+
| source | placeholder |
|
|
124
|
+
|---|---|
|
|
125
|
+
| a value need | `{name}` |
|
|
126
|
+
| a file or git need, and a produce with a path | `{name_path}` |
|
|
127
|
+
| the floor | `{run_id}`, `{line_id}`, `{node_id}` |
|
|
128
|
+
| the floor, for a retry or a fan-out branch | `{previous_error}`, `{previous_failures}`, `{item}` |
|
|
129
|
+
| the floor, for a station with a git need | `{git_credential}`, `{git_credential_url}` |
|
|
130
|
+
|
|
131
|
+
A prompt's `{name}` is made of letters, digits, `_`, `.` and `-`, and starts with a letter or `_`, so a JSON object in a prompt is never read as one.
|
|
132
|
+
|
|
133
|
+
A collection may extend an agent the host ships with an `.extra.md` file, or name a shipped agent without defining it. Without the host's catalog `lint` refuses both. `--shipped <dir>` names a directory in the same layout, whose assembly lines and agents are the shipped ones.
|
|
117
134
|
|
|
118
135
|
```
|
|
119
136
|
floor-pipeline lint collection/ --shipped shipped/ --host-key execution_mode
|
|
@@ -131,7 +148,9 @@ A clean collection prints a summary and the exit code is 0.
|
|
|
131
148
|
collection ok: 1 agents, 1 pipelines, 0 extensions
|
|
132
149
|
```
|
|
133
150
|
|
|
134
|
-
|
|
151
|
+
### apply
|
|
152
|
+
|
|
153
|
+
`apply` puts a collection to a floor: its agents, then each assembly line with its stations. `${NAME}` in its files is filled from the environment. When a file is refused, nothing is put.
|
|
135
154
|
|
|
136
155
|
```
|
|
137
156
|
floor-pipeline apply collection/
|
|
@@ -149,10 +168,10 @@ pipelines/
|
|
|
149
168
|
0004-remove-gap-fill.yaml archive: { lines: [gap-fill] }
|
|
150
169
|
```
|
|
151
170
|
|
|
152
|
-
-
|
|
153
|
-
-
|
|
154
|
-
-
|
|
155
|
-
-
|
|
156
|
-
-
|
|
171
|
+
- The floor remembers which files ran, by name and by the sha256 of what they held: `GET /migrations`.
|
|
172
|
+
- A file that ran is not run again. So what a person changes over HTTP stays, until a later file changes that pipeline.
|
|
173
|
+
- A file that ran and was changed since is refused. What it did is done. A change is a new file.
|
|
174
|
+
- A file the floor refused is not remembered, and runs when it is mended.
|
|
175
|
+
- A pipeline leaves as it came, by a file. `archive` names the assembly lines, stations, agent definitions and schedules to archive. The floor refuses to archive an assembly line with open runs.
|
|
157
176
|
|
|
158
|
-
A file is several requests,
|
|
177
|
+
A file is several requests, so a file the floor refuses half way has put what came before. Putting is safe to repeat, so the mended file puts the rest.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// The schema of an agent definition's `config`, under the names docs/
|
|
1
|
+
// The schema of an agent definition's `config`, under the names the agent file specification gives them (website/src/content/docs/specs/agent-file.md, "2.2 Config"), which are lore's own. Pure zod, so the browser can import it.
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
// A header or env var the server needs, valued from the key `ref` of the cluster's agent-secrets.
|
|
4
4
|
const secretRef = z.object({
|
|
5
5
|
name: z.string().min(1).describe("The name of the header or environment variable."),
|
|
6
|
-
ref: z.string().min(1).describe("The key
|
|
6
|
+
ref: z.string().min(1).describe("The key in `agent-secrets`, the Kubernetes Secret in the agents' namespace, whose value it gets."),
|
|
7
7
|
});
|
|
8
8
|
// One of the two ways to reach a server, never neither: a process the pod starts, or an address it calls.
|
|
9
9
|
const mcpServer = z
|
|
@@ -13,9 +13,9 @@ const mcpServer = z
|
|
|
13
13
|
command: z.string().min(1).describe("`stdio` only, and required there. The command that starts the server.").optional(),
|
|
14
14
|
args: z.array(z.string()).describe("`stdio` only. The command's arguments.").optional(),
|
|
15
15
|
url: z.url().describe("`http` and `sse` only, and required there. The server's address.").optional(),
|
|
16
|
-
headers_secret: z.string().min(1).describe("The key
|
|
17
|
-
headers: z.array(secretRef).describe("`http` and `sse` only. Headers sent to the server, each
|
|
18
|
-
env: z.array(secretRef).describe("`stdio` only. Environment variables of the server's process, each
|
|
16
|
+
headers_secret: z.string().min(1).describe("The key in `agent-secrets`, the Kubernetes Secret in the agents' namespace, holding one whole header line, such as `Authorization: Bearer <token>`.").optional(),
|
|
17
|
+
headers: z.array(secretRef).describe("`http` and `sse` only. Headers sent to the server, each taking its value from a key in `agent-secrets`.").optional(),
|
|
18
|
+
env: z.array(secretRef).describe("`stdio` only. Environment variables of the server's process, each taking its value from a key in `agent-secrets`.").optional(),
|
|
19
19
|
})
|
|
20
20
|
.refine((server) => (server.transport === "stdio" ? Boolean(server.command) : Boolean(server.url)), {
|
|
21
21
|
message: "a stdio server needs a command, any other a url",
|
|
@@ -33,13 +33,13 @@ const podResources = z.strictObject({
|
|
|
33
33
|
});
|
|
34
34
|
export const agentConfigSchema = z.looseObject({
|
|
35
35
|
skills: z.array(z.string()).describe("Names of the skills the agent is given.").optional(),
|
|
36
|
-
skills_source: z.url().describe("
|
|
36
|
+
skills_source: z.url().describe("The address the pod downloads the agent's skills from, usually the host's skills service. Without it the pod asks the floor, which has no skills to give.").optional(),
|
|
37
37
|
mcp_servers: z.array(mcpServer).describe("The MCP servers the agent can call.").optional(),
|
|
38
38
|
disallowed_tools: z.array(z.string()).describe("Tools the agent may not use.").optional(),
|
|
39
39
|
env: z.record(z.string(), z.string()).describe("Environment variables of the agent, as plain values.").optional(),
|
|
40
|
-
permission_mode: z.enum(["auto", "bypass"]).describe("
|
|
40
|
+
permission_mode: z.enum(["auto", "bypass"]).describe("`bypass` (the default) lets the agent run any tool without asking. `auto` keeps the CLI's own permission checks, so in the pod, where nobody can answer, an action that needs approval is refused.").optional(),
|
|
41
41
|
max_turns: z.number().int().positive().describe("The most turns the agent takes in one visit.").optional(),
|
|
42
|
-
model_secret_key: z.string().min(1).describe("
|
|
42
|
+
model_secret_key: z.string().min(1).describe("Which key in `agent-secrets`, the Kubernetes Secret in the agents' namespace, holds the model's API key. Without it, the key the install sets for the model's family is used.").optional(),
|
|
43
43
|
pod_resources: podResources.describe("The resources of the agent's container. With none, the cluster's default applies.").optional(),
|
|
44
44
|
});
|
|
45
45
|
//# sourceMappingURL=agent-config-schema.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@re-cinq/floor-pipeline",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "A floor's pipeline as one YAML file: an assembly line with its stations, its agent definitions and their prompts, its files and its schedules. Exports one from a floor, imports one into a floor, and applies a folder of them in order, each once. It speaks the floor's HTTP API and nothing else.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"typecheck": "tsc --noEmit"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@re-cinq/floor-assembly-lines": "0.6.
|
|
57
|
-
"@re-cinq/floor-client": "0.6.
|
|
58
|
-
"@re-cinq/floor-contracts": "0.6.
|
|
56
|
+
"@re-cinq/floor-assembly-lines": "0.6.2",
|
|
57
|
+
"@re-cinq/floor-client": "0.6.2",
|
|
58
|
+
"@re-cinq/floor-contracts": "0.6.2",
|
|
59
59
|
"yaml": "^2.7.0",
|
|
60
60
|
"zod": "^4.5.4"
|
|
61
61
|
},
|