@re-cinq/floor-pipeline 0.6.2 → 0.8.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 +12 -1
- package/dist/cli.js +6 -3
- package/dist/collection/agents.d.ts +2 -0
- package/dist/collection/change-report.d.ts +3 -0
- package/dist/collection/change-report.js +57 -0
- package/dist/collection/changed-lines.d.ts +7 -0
- package/dist/collection/changed-lines.js +17 -0
- package/dist/collection/collection-settings.d.ts +12 -0
- package/dist/collection/collection-settings.js +27 -0
- package/dist/collection/collection.d.ts +1 -1
- package/dist/collection/collection.js +3 -1
- package/dist/collection/group-precedence.d.ts +3 -0
- package/dist/collection/group-precedence.js +20 -0
- package/dist/collection/line-layout.d.ts +11 -0
- package/dist/collection/line-layout.js +46 -0
- package/dist/collection/line-mermaid.d.ts +3 -0
- package/dist/collection/line-mermaid.js +79 -0
- package/dist/collection/lint-directory.d.ts +8 -7
- package/dist/collection/lint-directory.js +26 -15
- package/dist/collection/lint-rules.js +3 -3
- package/dist/collection/lint-shape.d.ts +7 -1
- package/dist/collection/lint-shape.js +3 -0
- package/dist/collection/note-within.d.ts +1 -0
- package/dist/collection/note-within.js +36 -0
- package/dist/collection/paths.d.ts +12 -1
- package/dist/collection/paths.js +28 -7
- package/dist/collection/pipelines.d.ts +1 -2
- package/dist/collection/pipelines.js +10 -34
- package/dist/collection/unknown-keys.d.ts +3 -0
- package/dist/collection/unknown-keys.js +35 -0
- package/dist/definition-schemas.d.ts +220 -0
- package/dist/definition-schemas.js +141 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.js +5 -2
- package/dist/lint-command-given.d.ts +4 -0
- package/dist/lint-command-given.js +9 -0
- package/dist/shape.js +1 -1
- package/package.json +8 -4
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// The note naming the lines left undrawn, cut to fit the room left in a comment.
|
|
2
|
+
const NOTE_LEAD = "These lines changed too, but their graphs would not fit in one comment: ";
|
|
3
|
+
const SEPARATOR = ", ";
|
|
4
|
+
export function noteWithin(ids, room) {
|
|
5
|
+
if (ids.length === 0)
|
|
6
|
+
return [];
|
|
7
|
+
const tags = ids.map((id) => `\`${id}\``);
|
|
8
|
+
return [`${NOTE_LEAD}${listOf(tags, room - NOTE_LEAD.length)}`, ""];
|
|
9
|
+
}
|
|
10
|
+
function listOf(tags, listRoom) {
|
|
11
|
+
const whole = `${tags.join(SEPARATOR)}.`;
|
|
12
|
+
if (whole.length <= listRoom)
|
|
13
|
+
return whole;
|
|
14
|
+
const listedCount = fittingCountOf(tags, listRoom);
|
|
15
|
+
const leftOut = tags.length - listedCount;
|
|
16
|
+
if (listedCount === 0)
|
|
17
|
+
return `${leftOut} more.`;
|
|
18
|
+
return `${tags.slice(0, listedCount).join(SEPARATOR)}${moreOf(leftOut)}`;
|
|
19
|
+
}
|
|
20
|
+
function fittingCountOf(tags, listRoom) {
|
|
21
|
+
let listedCount = 0;
|
|
22
|
+
let used = 0;
|
|
23
|
+
for (const [index, tag] of tags.entries()) {
|
|
24
|
+
used += tag.length + (index > 0 ? SEPARATOR.length : 0);
|
|
25
|
+
if (used > listRoom)
|
|
26
|
+
break;
|
|
27
|
+
const leftOut = tags.length - index - 1;
|
|
28
|
+
if (used + moreOf(leftOut).length <= listRoom)
|
|
29
|
+
listedCount = index + 1;
|
|
30
|
+
}
|
|
31
|
+
return listedCount;
|
|
32
|
+
}
|
|
33
|
+
function moreOf(leftOut) {
|
|
34
|
+
return ` and ${leftOut} more.`;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=note-within.js.map
|
|
@@ -7,12 +7,23 @@ export interface CollectionFile {
|
|
|
7
7
|
path: string;
|
|
8
8
|
text: string;
|
|
9
9
|
}
|
|
10
|
-
/**
|
|
10
|
+
/** Where a line's file sits: its line folder's name, that folder's path, and the group folder above it, undefined for a top-level line folder. */
|
|
11
|
+
export interface LineFilePlace {
|
|
12
|
+
folder: string;
|
|
13
|
+
folderPath: string;
|
|
14
|
+
group: string | undefined;
|
|
15
|
+
}
|
|
16
|
+
export declare function lineFilePlaceOf(path: string): LineFilePlace | undefined;
|
|
17
|
+
/** The name of the line folder a line's file sits in. */
|
|
11
18
|
export declare function pipelineFolderOf(path: string): string | undefined;
|
|
19
|
+
/** The line folder a line's file sits in, with its group folder if it has one. */
|
|
20
|
+
export declare function lineFolderPathOf(path: string): string | undefined;
|
|
12
21
|
export declare function agentFileOf(path: string): {
|
|
13
22
|
agent: string;
|
|
14
23
|
isExtension: boolean;
|
|
15
24
|
} | undefined;
|
|
25
|
+
/** The group folder an agent file sits in, undefined for a top-level line folder or a path that is no agent file. */
|
|
26
|
+
export declare function agentFileGroupOf(path: string): string | undefined;
|
|
16
27
|
export declare function isCollectionFile(path: string): boolean;
|
|
17
28
|
/** A path a collection reads: a pipeline or an agent file. */
|
|
18
29
|
export declare function isReadPath(path: string): boolean;
|
package/dist/collection/paths.js
CHANGED
|
@@ -1,20 +1,41 @@
|
|
|
1
|
-
// The layout of a collection: `<line>/assembly-line.yaml`, `<line>/agents/<agent>.md` and `<line>/agents/<agent>.extra.md
|
|
1
|
+
// The layout of a collection: `<line>/assembly-line.yaml`, `<line>/agents/<agent>.md` and `<line>/agents/<agent>.extra.md`, where a line folder may sit inside a group folder. A line folder written before the file was renamed holds `pipeline.yaml`, which is read as the same thing.
|
|
2
2
|
/** The host's own top folders: the skills it serves its agents, not lines. */
|
|
3
3
|
const HOST_FOLDERS = ["skills", "agent-skills"];
|
|
4
|
-
|
|
5
|
-
const
|
|
4
|
+
/** A line or group folder: any name but a host folder or one starting with a dot. */
|
|
5
|
+
const FOLDER = String.raw `(?!\.)(?!(?:${HOST_FOLDERS.join("|")})\/)[^/]+`;
|
|
6
|
+
/** A folder that holds lines. One directly above `agents/` is a line folder, never a group, and a top-level `docs/` is never one. */
|
|
7
|
+
function optionalGroup(group) {
|
|
8
|
+
return String.raw `(?:(?!docs\/)${group}\/(?!agents\/))?`;
|
|
9
|
+
}
|
|
10
|
+
const PIPELINE_FILE = new RegExp(String.raw `^(${optionalGroup(`(${FOLDER})`)}(${FOLDER}))\/(assembly-line|pipeline)\.yaml$`);
|
|
6
11
|
/** The name a line's file has. */
|
|
7
12
|
export const LINE_FILE = "assembly-line.yaml";
|
|
8
13
|
/** The name it had, still read. */
|
|
9
14
|
export const FORMER_LINE_FILE = "pipeline.yaml";
|
|
10
|
-
const AGENT_FILE = new RegExp(String.raw `^${FOLDER}\/agents\/([^/]+?)(\.extra)?\.md$`);
|
|
11
|
-
|
|
15
|
+
const AGENT_FILE = new RegExp(String.raw `^${optionalGroup(`(${FOLDER})`)}${FOLDER}\/agents\/([^/]+?)(\.extra)?\.md$`);
|
|
16
|
+
export function lineFilePlaceOf(path) {
|
|
17
|
+
const match = PIPELINE_FILE.exec(path);
|
|
18
|
+
return match ? { folderPath: match[1], group: match[2], folder: match[3] } : undefined;
|
|
19
|
+
}
|
|
20
|
+
/** The name of the line folder a line's file sits in. */
|
|
12
21
|
export function pipelineFolderOf(path) {
|
|
13
|
-
return
|
|
22
|
+
return lineFilePlaceOf(path)?.folder;
|
|
23
|
+
}
|
|
24
|
+
/** The line folder a line's file sits in, with its group folder if it has one. */
|
|
25
|
+
export function lineFolderPathOf(path) {
|
|
26
|
+
return lineFilePlaceOf(path)?.folderPath;
|
|
14
27
|
}
|
|
15
28
|
export function agentFileOf(path) {
|
|
29
|
+
const place = agentFilePlaceOf(path);
|
|
30
|
+
return place && { agent: place.agent, isExtension: place.isExtension };
|
|
31
|
+
}
|
|
32
|
+
/** The group folder an agent file sits in, undefined for a top-level line folder or a path that is no agent file. */
|
|
33
|
+
export function agentFileGroupOf(path) {
|
|
34
|
+
return agentFilePlaceOf(path)?.group;
|
|
35
|
+
}
|
|
36
|
+
function agentFilePlaceOf(path) {
|
|
16
37
|
const match = AGENT_FILE.exec(path);
|
|
17
|
-
return match ? { agent: match[
|
|
38
|
+
return match ? { agent: match[2], isExtension: Boolean(match[3]), group: match[1] } : undefined;
|
|
18
39
|
}
|
|
19
40
|
/** A markdown or YAML file inside a line folder: read, or refused as a path a collection does not read. A file at the top, under `docs/`, under a host folder or under a dot folder is not the collection's. */
|
|
20
41
|
const LINE_FOLDER_FILE = new RegExp(String.raw `^(?!(?:docs|${HOST_FOLDERS.join("|")})\/)[^./][^/]*\/.+\.(md|ya?ml)$`);
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { CollectionOverlayInput, OverlayAgent } from "./agents.js";
|
|
2
|
-
import { type Refusal } from "./refusal.js";
|
|
3
2
|
import { type Pipeline } from "../shape.js";
|
|
4
3
|
/** The pipelines the collection sets, its own and its versions of the lines the host ships. Each names its agents only: the agents are put on their own, so a pipeline is imported with no agent definitions of its own. */
|
|
5
4
|
export declare function pipelinesOverlay(input: CollectionOverlayInput, collectionAgents: ReadonlyMap<string, OverlayAgent>): {
|
|
6
5
|
pipelines: Pipeline[];
|
|
7
|
-
refused: Refusal[];
|
|
6
|
+
refused: import("./refusal.js").Refusal[];
|
|
8
7
|
};
|
|
@@ -1,52 +1,28 @@
|
|
|
1
1
|
import { withEnvironment } from "./environment.js";
|
|
2
2
|
import { enforce } from "./enforce.js";
|
|
3
3
|
import { pipelineProblems } from "./lint-rules.js";
|
|
4
|
-
import {
|
|
4
|
+
import { lineLayoutOf } from "./line-layout.js";
|
|
5
5
|
import { attempt } from "./refusal.js";
|
|
6
|
+
import { unknownKeys } from "./unknown-keys.js";
|
|
6
7
|
import { readPipelineFile } from "../file.js";
|
|
7
8
|
import { pipelineOf } from "../shape.js";
|
|
8
9
|
/** The pipelines the collection sets, its own and its versions of the lines the host ships. Each names its agents only: the agents are put on their own, so a pipeline is imported with no agent definitions of its own. */
|
|
9
10
|
export function pipelinesOverlay(input, collectionAgents) {
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
const result = attempt(file.path, () => {
|
|
16
|
-
enforce(!superseded.has(file.path), `the folder ${file.folder} holds its line twice: ${LINE_FILE} is read, so remove ${FORMER_LINE_FILE}`);
|
|
17
|
-
return pipelineOfFile(file, input, collectionAgents);
|
|
18
|
-
});
|
|
19
|
-
if ("refusal" in result) {
|
|
20
|
-
refused.push(result.refusal);
|
|
21
|
-
continue;
|
|
22
|
-
}
|
|
23
|
-
pipelines.push(result.made);
|
|
24
|
-
}
|
|
25
|
-
return { pipelines, refused };
|
|
26
|
-
}
|
|
27
|
-
// The former name's file, in a folder that holds the line under its name too: two files would be two versions of one line.
|
|
28
|
-
function supersededBy(lineFiles) {
|
|
29
|
-
const named = new Set(lineFiles.filter((file) => file.path.endsWith(`/${LINE_FILE}`)).map((file) => file.folder));
|
|
30
|
-
const former = lineFiles.filter((file) => file.path.endsWith(`/${FORMER_LINE_FILE}`) && named.has(file.folder));
|
|
31
|
-
return new Set(former.map((file) => file.path));
|
|
32
|
-
}
|
|
33
|
-
function pipelineFilesOf(files) {
|
|
34
|
-
return files
|
|
35
|
-
.flatMap((file) => {
|
|
36
|
-
const folder = pipelineFolderOf(file.path);
|
|
37
|
-
return folder ? [{ ...file, folder }] : [];
|
|
38
|
-
})
|
|
39
|
-
.sort((left, right) => left.path.localeCompare(right.path));
|
|
11
|
+
const layout = lineLayoutOf(input.files);
|
|
12
|
+
const results = layout.read.map((file) => attempt(file.path, () => pipelineOfFile(file, input, collectionAgents)));
|
|
13
|
+
const pipelines = results.flatMap((result) => ("made" in result ? [result.made] : []));
|
|
14
|
+
const unread = results.flatMap((result) => ("refusal" in result ? [result.refusal] : []));
|
|
15
|
+
return { pipelines, refused: [...layout.refused, ...unread] };
|
|
40
16
|
}
|
|
41
17
|
function pipelineOfFile(file, { shipped, env }, collectionAgents) {
|
|
42
18
|
const filled = withEnvironment(file.text, env);
|
|
43
|
-
enforceNoProblems(filled, promptsOf(shipped.agents, collectionAgents));
|
|
19
|
+
enforceNoProblems(pipelineProblems(filled, promptsOf(shipped.agents, collectionAgents)));
|
|
44
20
|
const pipeline = pipelineOf(readPipelineFile(filled));
|
|
21
|
+
enforceNoProblems(unknownKeys(pipeline));
|
|
45
22
|
enforce(pipeline.line?.id === file.folder, `the folder ${file.folder} must hold the pipeline of that name, and its line is ${pipeline.line?.id}`);
|
|
46
23
|
return pipeline;
|
|
47
24
|
}
|
|
48
|
-
function enforceNoProblems(
|
|
49
|
-
const problems = pipelineProblems(yamlText, prompts);
|
|
25
|
+
function enforceNoProblems(problems) {
|
|
50
26
|
enforce(problems.length === 0, problems.map((problem) => problem.detail).join("; "));
|
|
51
27
|
}
|
|
52
28
|
/** The prompts a pipeline can name: the shipped agents' and the collection's own. */
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// The unknown-key lint rule: a key in a body that the floor does not know, read with closed schemas.
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { definitionSchemas } from "../definition-schemas.js";
|
|
4
|
+
import { FILE_SPELLING } from "../shape.js";
|
|
5
|
+
const { lineBodySchema, stationBodySchema, agentDefinitionBodySchema, scheduleBodySchema } = definitionSchemas(z.strictObject);
|
|
6
|
+
export function unknownKeys(pipeline) {
|
|
7
|
+
return checkedBodies(pipeline)
|
|
8
|
+
.flatMap(unknownKeysIn)
|
|
9
|
+
.map(({ path, key }) => ({ line: pipeline.line?.id ?? "", rule: "unknown-key", detail: `${path}: unknown key "${key}"` }));
|
|
10
|
+
}
|
|
11
|
+
function checkedBodies(pipeline) {
|
|
12
|
+
return [
|
|
13
|
+
...(pipeline.line ? [{ place: "line", schema: lineBodySchema, body: pipeline.line.body }] : []),
|
|
14
|
+
...bodiesUnder("stations", stationBodySchema, pipeline.stations),
|
|
15
|
+
...bodiesUnder("agent_definitions", agentDefinitionBodySchema, pipeline.agentDefinitions),
|
|
16
|
+
...bodiesUnder("schedules", scheduleBodySchema, pipeline.schedules),
|
|
17
|
+
];
|
|
18
|
+
}
|
|
19
|
+
function bodiesUnder(fileKey, schema, definitions) {
|
|
20
|
+
return definitions.map(({ id, body }) => ({ place: `${fileKey}.${id}`, schema, body }));
|
|
21
|
+
}
|
|
22
|
+
function unknownKeysIn({ place, schema, body }) {
|
|
23
|
+
const { error } = schema.safeParse(body);
|
|
24
|
+
const issues = error?.issues ?? [];
|
|
25
|
+
return issues
|
|
26
|
+
.filter((issue) => issue.code === "unrecognized_keys")
|
|
27
|
+
.flatMap((issue) => issue.keys.map((key) => ({ path: `${place}${fieldPath(issue.path)}`, key: inFile(key) })));
|
|
28
|
+
}
|
|
29
|
+
function fieldPath(steps) {
|
|
30
|
+
return steps.map((step) => (typeof step === "number" ? `[${step}]` : `.${inFile(String(step))}`)).join("");
|
|
31
|
+
}
|
|
32
|
+
function inFile(field) {
|
|
33
|
+
return FILE_SPELLING[field] ?? field;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=unknown-keys.js.map
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
type ObjectOf = <Shape extends z.core.$ZodLooseShape>(shape: Shape) => z.ZodObject<Shape, z.core.$strip | z.core.$strict>;
|
|
3
|
+
export interface ScheduleChecks {
|
|
4
|
+
isValidCron: (expression: string) => boolean;
|
|
5
|
+
isValidTimezone: (timezone: string) => boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const itemKind: z.ZodEnum<{
|
|
8
|
+
file: "file";
|
|
9
|
+
git: "git";
|
|
10
|
+
value: "value";
|
|
11
|
+
}>;
|
|
12
|
+
export declare function definitionSchemas(object: ObjectOf, scheduleChecks?: ScheduleChecks): {
|
|
13
|
+
lineBodySchema: z.ZodObject<{
|
|
14
|
+
entry: z.ZodString;
|
|
15
|
+
exit: z.ZodString;
|
|
16
|
+
fail: z.ZodOptional<z.ZodString>;
|
|
17
|
+
start: z.ZodOptional<z.ZodObject<{
|
|
18
|
+
on: z.ZodArray<z.ZodString>;
|
|
19
|
+
when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
20
|
+
args: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
21
|
+
}, z.core.$strict | z.core.$strip>>;
|
|
22
|
+
args: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
23
|
+
kind: z.ZodEnum<{
|
|
24
|
+
file: "file";
|
|
25
|
+
git: "git";
|
|
26
|
+
value: "value";
|
|
27
|
+
}>;
|
|
28
|
+
subject: z.ZodOptional<z.ZodBoolean>;
|
|
29
|
+
}, z.core.$strict | z.core.$strip>>;
|
|
30
|
+
files: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
31
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
32
|
+
id: z.ZodString;
|
|
33
|
+
station: z.ZodOptional<z.ZodString>;
|
|
34
|
+
start: z.ZodOptional<z.ZodString>;
|
|
35
|
+
bind: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
36
|
+
reports: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
37
|
+
on: z.ZodString;
|
|
38
|
+
when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
39
|
+
outcome: z.ZodString;
|
|
40
|
+
}, z.core.$strict | z.core.$strip>>>;
|
|
41
|
+
fanout: z.ZodOptional<z.ZodObject<{
|
|
42
|
+
over: z.ZodString;
|
|
43
|
+
to: z.ZodString;
|
|
44
|
+
}, z.core.$strict | z.core.$strip>>;
|
|
45
|
+
}, z.core.$strict | z.core.$strip>>;
|
|
46
|
+
edges: z.ZodArray<z.ZodObject<{
|
|
47
|
+
from: z.ZodString;
|
|
48
|
+
to: z.ZodString;
|
|
49
|
+
on: z.ZodString;
|
|
50
|
+
iterationMax: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
unattendedMax: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
}, z.core.$strict | z.core.$strip>>;
|
|
53
|
+
}, z.core.$strict | z.core.$strip>;
|
|
54
|
+
stationBodySchema: z.ZodObject<{
|
|
55
|
+
kind: z.ZodEnum<{
|
|
56
|
+
agent: "agent";
|
|
57
|
+
human: "human";
|
|
58
|
+
service: "service";
|
|
59
|
+
}>;
|
|
60
|
+
description: z.ZodOptional<z.ZodString>;
|
|
61
|
+
agentDefinition: z.ZodOptional<z.ZodString>;
|
|
62
|
+
conversation: z.ZodOptional<z.ZodEnum<{
|
|
63
|
+
continue: "continue";
|
|
64
|
+
new: "new";
|
|
65
|
+
}>>;
|
|
66
|
+
conversationKey: z.ZodOptional<z.ZodString>;
|
|
67
|
+
outcomes: z.ZodArray<z.ZodString>;
|
|
68
|
+
mustChange: z.ZodOptional<z.ZodBoolean>;
|
|
69
|
+
resultRequired: z.ZodOptional<z.ZodBoolean>;
|
|
70
|
+
needs: z.ZodArray<z.ZodObject<{
|
|
71
|
+
name: z.ZodString;
|
|
72
|
+
kind: z.ZodEnum<{
|
|
73
|
+
file: "file";
|
|
74
|
+
git: "git";
|
|
75
|
+
value: "value";
|
|
76
|
+
}>;
|
|
77
|
+
path: z.ZodOptional<z.ZodString>;
|
|
78
|
+
access: z.ZodOptional<z.ZodEnum<{
|
|
79
|
+
read: "read";
|
|
80
|
+
write: "write";
|
|
81
|
+
}>>;
|
|
82
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
83
|
+
fresh: z.ZodOptional<z.ZodBoolean>;
|
|
84
|
+
collect: z.ZodOptional<z.ZodString>;
|
|
85
|
+
}, z.core.$strict | z.core.$strip>>;
|
|
86
|
+
produces: z.ZodArray<z.ZodObject<{
|
|
87
|
+
name: z.ZodString;
|
|
88
|
+
kind: z.ZodEnum<{
|
|
89
|
+
file: "file";
|
|
90
|
+
value: "value";
|
|
91
|
+
}>;
|
|
92
|
+
path: z.ZodOptional<z.ZodString>;
|
|
93
|
+
from: z.ZodOptional<z.ZodLiteral<"output">>;
|
|
94
|
+
}, z.core.$strict | z.core.$strip>>;
|
|
95
|
+
url: z.ZodOptional<z.ZodString>;
|
|
96
|
+
route: z.ZodOptional<z.ZodString>;
|
|
97
|
+
}, z.core.$strict | z.core.$strip>;
|
|
98
|
+
agentDefinitionBodySchema: z.ZodObject<{
|
|
99
|
+
settings: z.ZodObject<{
|
|
100
|
+
model: z.ZodOptional<z.ZodString>;
|
|
101
|
+
prompt: z.ZodString;
|
|
102
|
+
image: z.ZodString;
|
|
103
|
+
timeoutMinutes: z.ZodNumber;
|
|
104
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
105
|
+
config: z.ZodOptional<z.ZodObject<{
|
|
106
|
+
skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
107
|
+
skills_source: z.ZodOptional<z.ZodURL>;
|
|
108
|
+
mcp_servers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
109
|
+
name: z.ZodString;
|
|
110
|
+
transport: z.ZodEnum<{
|
|
111
|
+
http: "http";
|
|
112
|
+
sse: "sse";
|
|
113
|
+
stdio: "stdio";
|
|
114
|
+
}>;
|
|
115
|
+
command: z.ZodOptional<z.ZodString>;
|
|
116
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
117
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
118
|
+
headers_secret: z.ZodOptional<z.ZodString>;
|
|
119
|
+
headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
120
|
+
name: z.ZodString;
|
|
121
|
+
ref: z.ZodString;
|
|
122
|
+
}, z.core.$strip>>>;
|
|
123
|
+
env: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
124
|
+
name: z.ZodString;
|
|
125
|
+
ref: z.ZodString;
|
|
126
|
+
}, z.core.$strip>>>;
|
|
127
|
+
}, z.core.$strip>>>;
|
|
128
|
+
disallowed_tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
129
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
130
|
+
permission_mode: z.ZodOptional<z.ZodEnum<{
|
|
131
|
+
auto: "auto";
|
|
132
|
+
bypass: "bypass";
|
|
133
|
+
}>>;
|
|
134
|
+
max_turns: z.ZodOptional<z.ZodNumber>;
|
|
135
|
+
model_secret_key: z.ZodOptional<z.ZodString>;
|
|
136
|
+
pod_resources: z.ZodOptional<z.ZodObject<{
|
|
137
|
+
requests: z.ZodOptional<z.ZodObject<{
|
|
138
|
+
cpu: z.ZodOptional<z.ZodString>;
|
|
139
|
+
memory: z.ZodOptional<z.ZodString>;
|
|
140
|
+
"ephemeral-storage": z.ZodOptional<z.ZodString>;
|
|
141
|
+
}, z.core.$strict>>;
|
|
142
|
+
limits: z.ZodOptional<z.ZodObject<{
|
|
143
|
+
cpu: z.ZodOptional<z.ZodString>;
|
|
144
|
+
memory: z.ZodOptional<z.ZodString>;
|
|
145
|
+
"ephemeral-storage": z.ZodOptional<z.ZodString>;
|
|
146
|
+
}, z.core.$strict>>;
|
|
147
|
+
}, z.core.$strict>>;
|
|
148
|
+
}, z.core.$loose>>;
|
|
149
|
+
prices: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
150
|
+
inputPerMillion: z.ZodNumber;
|
|
151
|
+
outputPerMillion: z.ZodNumber;
|
|
152
|
+
cacheReadPerMillion: z.ZodOptional<z.ZodNumber>;
|
|
153
|
+
cacheWritePerMillion: z.ZodOptional<z.ZodNumber>;
|
|
154
|
+
}, z.core.$strict | z.core.$strip>>>;
|
|
155
|
+
}, z.core.$strict | z.core.$strip>;
|
|
156
|
+
variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
157
|
+
model: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
158
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
159
|
+
image: z.ZodOptional<z.ZodString>;
|
|
160
|
+
timeoutMinutes: z.ZodOptional<z.ZodNumber>;
|
|
161
|
+
tags: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
162
|
+
config: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
163
|
+
skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
164
|
+
skills_source: z.ZodOptional<z.ZodURL>;
|
|
165
|
+
mcp_servers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
166
|
+
name: z.ZodString;
|
|
167
|
+
transport: z.ZodEnum<{
|
|
168
|
+
http: "http";
|
|
169
|
+
sse: "sse";
|
|
170
|
+
stdio: "stdio";
|
|
171
|
+
}>;
|
|
172
|
+
command: z.ZodOptional<z.ZodString>;
|
|
173
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
174
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
175
|
+
headers_secret: z.ZodOptional<z.ZodString>;
|
|
176
|
+
headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
177
|
+
name: z.ZodString;
|
|
178
|
+
ref: z.ZodString;
|
|
179
|
+
}, z.core.$strip>>>;
|
|
180
|
+
env: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
181
|
+
name: z.ZodString;
|
|
182
|
+
ref: z.ZodString;
|
|
183
|
+
}, z.core.$strip>>>;
|
|
184
|
+
}, z.core.$strip>>>;
|
|
185
|
+
disallowed_tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
186
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
187
|
+
permission_mode: z.ZodOptional<z.ZodEnum<{
|
|
188
|
+
auto: "auto";
|
|
189
|
+
bypass: "bypass";
|
|
190
|
+
}>>;
|
|
191
|
+
max_turns: z.ZodOptional<z.ZodNumber>;
|
|
192
|
+
model_secret_key: z.ZodOptional<z.ZodString>;
|
|
193
|
+
pod_resources: z.ZodOptional<z.ZodObject<{
|
|
194
|
+
requests: z.ZodOptional<z.ZodObject<{
|
|
195
|
+
cpu: z.ZodOptional<z.ZodString>;
|
|
196
|
+
memory: z.ZodOptional<z.ZodString>;
|
|
197
|
+
"ephemeral-storage": z.ZodOptional<z.ZodString>;
|
|
198
|
+
}, z.core.$strict>>;
|
|
199
|
+
limits: z.ZodOptional<z.ZodObject<{
|
|
200
|
+
cpu: z.ZodOptional<z.ZodString>;
|
|
201
|
+
memory: z.ZodOptional<z.ZodString>;
|
|
202
|
+
"ephemeral-storage": z.ZodOptional<z.ZodString>;
|
|
203
|
+
}, z.core.$strict>>;
|
|
204
|
+
}, z.core.$strict>>;
|
|
205
|
+
}, z.core.$loose>>>;
|
|
206
|
+
prices: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
207
|
+
inputPerMillion: z.ZodNumber;
|
|
208
|
+
outputPerMillion: z.ZodNumber;
|
|
209
|
+
cacheReadPerMillion: z.ZodOptional<z.ZodNumber>;
|
|
210
|
+
cacheWritePerMillion: z.ZodOptional<z.ZodNumber>;
|
|
211
|
+
}, z.core.$strict | z.core.$strip>>>>;
|
|
212
|
+
}, z.core.$strict | z.core.$strip>>>;
|
|
213
|
+
}, z.core.$strict | z.core.$strip>;
|
|
214
|
+
scheduleBodySchema: z.ZodObject<{
|
|
215
|
+
cron: z.ZodString;
|
|
216
|
+
timezone: z.ZodOptional<z.ZodString>;
|
|
217
|
+
payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
218
|
+
}, z.core.$strict | z.core.$strip>;
|
|
219
|
+
};
|
|
220
|
+
export {};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
// The bodies of a line, a station, an agent definition and a schedule, as the floor spells them (the pipeline file specification, website/src/content/docs/specs/pipeline-file.md). One list of keys, built twice: as the floor reads a body, dropping a key it does not know, and closed, for a lint that names that key. Pure zod, so the browser can import it.
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { agentConfigSchema } from "./agent-config-schema.js";
|
|
4
|
+
const ANY_SCHEDULE = { isValidCron: () => true, isValidTimezone: () => true };
|
|
5
|
+
const whenValue = z.union([z.string(), z.number(), z.boolean()]);
|
|
6
|
+
const when = z.record(z.string(), whenValue).describe("Payload fields that must equal these values. Each is a top-level field of the event's payload, compared as text. A field the payload lacks does not match.");
|
|
7
|
+
const perMillion = z.number().nonnegative();
|
|
8
|
+
export const itemKind = z.enum(["value", "file", "git"]);
|
|
9
|
+
export function definitionSchemas(object, scheduleChecks = ANY_SCHEDULE) {
|
|
10
|
+
return {
|
|
11
|
+
lineBodySchema: lineBodyOf(object),
|
|
12
|
+
stationBodySchema: stationBodyOf(object),
|
|
13
|
+
agentDefinitionBodySchema: agentDefinitionBodyOf(object),
|
|
14
|
+
scheduleBodySchema: scheduleBodyOf(object, scheduleChecks),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function lineBodyOf(object) {
|
|
18
|
+
return object({
|
|
19
|
+
entry: z.string().describe("The node a run starts at."),
|
|
20
|
+
exit: z.string().describe("The node that ends a run as `success`."),
|
|
21
|
+
fail: z.string().describe("The node that ends a run as `failed`. With none, no node can.").optional(),
|
|
22
|
+
start: lineStartOf(object).describe("The events that start a run of this line, and how their payload fills its arguments. With none, a run starts only by `POST /assembly-lines/{id}/start`.").optional(),
|
|
23
|
+
args: z.record(z.string(), lineArgOf(object)).describe("The arguments a start gives, by name. Each becomes an item of the run's bag under that name."),
|
|
24
|
+
files: z.record(z.string(), z.string()).describe("Files put in the bag of every run at its start, by item name.").optional(),
|
|
25
|
+
nodes: z.array(lineNodeOf(object)).describe("The nodes of the line."),
|
|
26
|
+
edges: z.array(lineEdgeOf(object)).describe("Which node follows which, by outcome."),
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function lineStartOf(object) {
|
|
30
|
+
return object({
|
|
31
|
+
on: z.array(z.string()).describe("Names of the events that start a run of this line. A name matches exactly."),
|
|
32
|
+
when: when.optional(),
|
|
33
|
+
args: z.record(z.string(), z.string()).describe("Argument name to a template, filled from the top-level fields of the event's payload, such as `{pr_url}`."),
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function lineNodeOf(object) {
|
|
37
|
+
return object({
|
|
38
|
+
id: z.string().describe("The node's name, unique in the line."),
|
|
39
|
+
station: z.string().describe("The station this node runs. A node with no station is a marker and reports `success` at once. `name@hash` pins one version of the station.").optional(),
|
|
40
|
+
start: z.string().describe("Name of the event that opens this node in a run. Defaults to `node.<id>.start`.").optional(),
|
|
41
|
+
bind: z.record(z.string(), z.string()).describe("Need name to bag item name, for a need the bag holds under another name.").optional(),
|
|
42
|
+
reports: z.array(nodeReportOf(object)).describe("Events that answer a visit waiting at this node, in place of a report from the station's worker.").optional(),
|
|
43
|
+
fanout: object({
|
|
44
|
+
over: z.string().describe("The value this node's station produces that holds the list, a JSON array of strings."),
|
|
45
|
+
to: z.string().describe("The node that runs once for each entry of the list, with the entry as its `item` need."),
|
|
46
|
+
})
|
|
47
|
+
.describe("Runs another node once for each entry of a list this node produces. The walk goes on past that node when every branch has reported.")
|
|
48
|
+
.optional(),
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function nodeReportOf(object) {
|
|
52
|
+
return object({
|
|
53
|
+
on: z.string().describe("Name of the event that answers a visit waiting at this node."),
|
|
54
|
+
when: when.optional(),
|
|
55
|
+
outcome: z.string().describe("The outcome the visit reports when the event arrives."),
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function lineEdgeOf(object) {
|
|
59
|
+
return object({
|
|
60
|
+
from: z.string().describe("The node the edge leaves."),
|
|
61
|
+
to: z.string().describe("The node the edge enters."),
|
|
62
|
+
on: z.string().describe("The outcome that takes this edge, or `always` for any outcome. An edge on the exact outcome wins over `always`."),
|
|
63
|
+
iterationMax: z.number().int().positive().describe("How many times one run may take this edge. A run that needs it once more halts.").optional(),
|
|
64
|
+
unattendedMax: z.number().int().positive().describe("How many times a run may take this edge without a person acting. The count starts again when a human station reports, or when a node is started by hand. A run that needs it once more halts.").optional(),
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function lineArgOf(object) {
|
|
68
|
+
return object({
|
|
69
|
+
kind: itemKind.describe("The kind of item a start gives for this argument."),
|
|
70
|
+
subject: z.boolean().describe("Marks the argument whose value names what the run is about. One open run exists for a repo and a subject. A second start with the same value joins that run.").optional(),
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function stationBodyOf(object) {
|
|
74
|
+
return object({
|
|
75
|
+
kind: z.enum(["agent", "service", "human"]).describe("Who does the work. `agent` is a model in a pod, `service` is a worker that claims visits, `human` is a person."),
|
|
76
|
+
description: z.string().describe("What the station does, for a person reading the line. The floor does not act on it, and changing it makes no new version.").optional(),
|
|
77
|
+
agentDefinition: z.string().describe("Agent stations only. The id of the agent definition the station runs.").optional(),
|
|
78
|
+
conversation: z.enum(["new", "continue"]).describe("Agent stations only. `continue` resumes the conversation of this node's last visit in the run that did not fail.").optional(),
|
|
79
|
+
conversationKey: z.string().describe("With `conversation: continue`. The name of a bag item. The conversation resumed is one from a run on the same repo that holds the same value under that name.").optional(),
|
|
80
|
+
outcomes: z.array(z.string()).describe("The outcomes the station reports. `failed` can be reported whether it is listed or not."),
|
|
81
|
+
mustChange: z.boolean().describe("Accepted and not acted on.").optional(),
|
|
82
|
+
resultRequired: z.boolean().describe("Agent stations only. An agent that ends without stating a result has `failed`. Without it, silence is read as `success`.").optional(),
|
|
83
|
+
needs: z.array(needOf(object)).describe("The bag items a visit is given."),
|
|
84
|
+
produces: z.array(produceOf(object)).describe("The bag items a visit writes."),
|
|
85
|
+
url: z.string().describe("Accepted and not acted on.").optional(),
|
|
86
|
+
route: z.string().describe("Human stations only. Kept for the page a person acts through. The floor does not read it.").optional(),
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
function needOf(object) {
|
|
90
|
+
return object({
|
|
91
|
+
name: z.string().describe("The need's name. The bag item of the same name fills it, unless the node's `bind` names another."),
|
|
92
|
+
kind: itemKind.describe("The kind of item the need takes."),
|
|
93
|
+
path: z.string().describe("Agent stations only. Where the item is put in the pod, relative to `/workspace`.").optional(),
|
|
94
|
+
access: z.enum(["read", "write"]).describe("`git` needs only. `write` lets the visit push to the repository. Defaults to `read`.").optional(),
|
|
95
|
+
optional: z.boolean().describe("The visit opens without the item when the bag does not hold it.").optional(),
|
|
96
|
+
fresh: z.boolean().describe("The need is filled only by an item produced since a person last acted: since a human station reported, or a node was started by hand. An older item counts as not there, so an optional need is left out and a required one refuses the visit.").optional(),
|
|
97
|
+
collect: z.string().describe("`value` needs only. The name of an item the body of a fan-out produces. The need is filled with a JSON array of what each branch produced, in branch order.").optional(),
|
|
98
|
+
}).refine((need) => !(need.fresh && need.collect), { message: "fresh is for a bag item, and takes no collect" });
|
|
99
|
+
}
|
|
100
|
+
function produceOf(object) {
|
|
101
|
+
return object({
|
|
102
|
+
name: z.string().describe("The name of the bag item the station writes."),
|
|
103
|
+
kind: z.enum(["value", "file"]).describe("The kind of item written."),
|
|
104
|
+
path: z.string().describe("Agent stations only. The file the agent writes, relative to `/workspace`.").optional(),
|
|
105
|
+
from: z.literal("output").describe("Agent stations only. The file is everything the agent said last. For kind `file`, and with no `path`.").optional(),
|
|
106
|
+
}).refine((produce) => !produce.from || (produce.kind === "file" && !produce.path), { message: "from: output is for a file, and takes no path" });
|
|
107
|
+
}
|
|
108
|
+
function agentDefinitionBodyOf(object) {
|
|
109
|
+
const agentSettings = agentSettingsOf(object);
|
|
110
|
+
return object({
|
|
111
|
+
settings: agentSettings.describe("The settings of the agent on every repository."),
|
|
112
|
+
variants: z.record(z.string(), agentSettings.partial()).describe("`host/owner/name` to settings laid over `settings` for runs on that repository, by field, by key of `config` and by model of `prices`.").optional(),
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
function agentSettingsOf(object) {
|
|
116
|
+
return object({
|
|
117
|
+
model: z.string().describe("The model the agent runs on.").optional(),
|
|
118
|
+
prompt: z.string().describe("What the agent is told. `{name}` placeholders are filled when a visit opens."),
|
|
119
|
+
image: z.string().describe("The container image the agent runs in."),
|
|
120
|
+
timeoutMinutes: z.number().int().positive().describe("How long a visit may run, in minutes. A visit past its deadline has `failed`."),
|
|
121
|
+
tags: z.array(z.string()).describe("Which cluster agents may run it. A cluster agent claims a visit only when it offers every tag.").optional(),
|
|
122
|
+
config: agentConfigSchema.describe("Settings for the agent's pod. A key the floor does not know is kept and not acted on.").optional(),
|
|
123
|
+
prices: z.record(z.string(), modelPriceOf(object)).describe("Model name to what it costs, for a model that reports tokens and no cost. The floor holds no price of its own.").optional(),
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
function modelPriceOf(object) {
|
|
127
|
+
return object({
|
|
128
|
+
inputPerMillion: perMillion.describe("US dollars for a million input tokens."),
|
|
129
|
+
outputPerMillion: perMillion.describe("US dollars for a million output tokens."),
|
|
130
|
+
cacheReadPerMillion: perMillion.describe("US dollars for a million tokens read from the cache. The input price when not stated.").optional(),
|
|
131
|
+
cacheWritePerMillion: perMillion.describe("US dollars for a million tokens written to the cache. The input price when not stated.").optional(),
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
function scheduleBodyOf(object, { isValidCron, isValidTimezone }) {
|
|
135
|
+
return object({
|
|
136
|
+
cron: z.string().refine(isValidCron, { message: "invalid cron expression" }).describe("When the schedule ticks, as a cron expression."),
|
|
137
|
+
timezone: z.string().refine(isValidTimezone, { message: "invalid timezone" }).describe("The timezone the expression is read in. Defaults to UTC.").optional(),
|
|
138
|
+
payload: z.record(z.string(), z.unknown()).describe("The payload of each `schedule.<name>.tick` event. The floor adds `scheduledFor`."),
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=definition-schemas.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -7,10 +7,13 @@ export { migrate, type Migrated, type MigrationFile } from "./migrate.js";
|
|
|
7
7
|
export type { Floor } from "./floor.js";
|
|
8
8
|
export { collectionOverlay, type CollectionFile, type CollectionOverlay, type CollectionOverlayInput, type OverlayAgent, type AgentSource, type ShippedCatalog, type Refusal } from "./collection/collection.js";
|
|
9
9
|
export { attempt, type Attempt } from "./collection/refusal.js";
|
|
10
|
+
export { lineLayoutOf, type LineFile, type LineLayout } from "./collection/line-layout.js";
|
|
11
|
+
export { withoutReplacedFiles } from "./collection/group-precedence.js";
|
|
10
12
|
export { applyCollection } from "./collection/apply.js";
|
|
11
|
-
export {
|
|
13
|
+
export { COLLECTION_SETTINGS_FILE, collectionSettingsIn, collectionSettingsOf, hostKeysIn, type CollectionSettings } from "./collection/collection-settings.js";
|
|
14
|
+
export { collectionFilesIn, lintCollectionDirectory, lintCommand, printCollectionLint, readCollectionDirectory, shippedCatalogIn, type LintCommand } from "./collection/lint-directory.js";
|
|
12
15
|
export { agentFrontmatterSchema, readAgentFile, floorSettingsOf, type ParsedAgentFile, type AgentFileSettings, type ShippedAgents, type AgentPrompts } from "./collection/agent-file.js";
|
|
13
16
|
export { placeholdersIn, withEnvironment, settingsWithEnvironment, type Environment } from "./collection/environment.js";
|
|
14
17
|
export { PIPELINE_RULES, pipelineProblems, type PipelineProblem, type PipelineRule } from "./collection/lint-rules.js";
|
|
15
|
-
export { agentFileOf, isCollectionFile, isReadPath, pipelineFolderOf } from "./collection/paths.js";
|
|
18
|
+
export { agentFileOf, isCollectionFile, isReadPath, lineFolderPathOf, pipelineFolderOf } from "./collection/paths.js";
|
|
16
19
|
export { extendedPrompt } from "./collection/agents.js";
|
package/dist/index.js
CHANGED
|
@@ -6,11 +6,14 @@ export { importPipeline } from "./import.js";
|
|
|
6
6
|
export { migrate } from "./migrate.js";
|
|
7
7
|
export { collectionOverlay } from "./collection/collection.js";
|
|
8
8
|
export { attempt } from "./collection/refusal.js";
|
|
9
|
+
export { lineLayoutOf } from "./collection/line-layout.js";
|
|
10
|
+
export { withoutReplacedFiles } from "./collection/group-precedence.js";
|
|
9
11
|
export { applyCollection } from "./collection/apply.js";
|
|
10
|
-
export {
|
|
12
|
+
export { COLLECTION_SETTINGS_FILE, collectionSettingsIn, collectionSettingsOf, hostKeysIn } from "./collection/collection-settings.js";
|
|
13
|
+
export { collectionFilesIn, lintCollectionDirectory, lintCommand, printCollectionLint, readCollectionDirectory, shippedCatalogIn } from "./collection/lint-directory.js";
|
|
11
14
|
export { agentFrontmatterSchema, readAgentFile, floorSettingsOf } from "./collection/agent-file.js";
|
|
12
15
|
export { placeholdersIn, withEnvironment, settingsWithEnvironment } from "./collection/environment.js";
|
|
13
16
|
export { PIPELINE_RULES, pipelineProblems } from "./collection/lint-rules.js";
|
|
14
|
-
export { agentFileOf, isCollectionFile, isReadPath, pipelineFolderOf } from "./collection/paths.js";
|
|
17
|
+
export { agentFileOf, isCollectionFile, isReadPath, lineFolderPathOf, pipelineFolderOf } from "./collection/paths.js";
|
|
15
18
|
export { extendedPrompt } from "./collection/agents.js";
|
|
16
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { LintCommand } from "./collection/lint-directory.js";
|
|
2
|
+
type LintFlags = Partial<Record<"host-key", string[]> & Record<"shipped" | "graph-against", string>>;
|
|
3
|
+
export declare function lintCommandGiven(positionals: readonly string[], values: LintFlags): LintCommand;
|
|
4
|
+
export {};
|