toolroll 0.9.34 → 0.9.37
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/CHANGELOG.md +102 -0
- package/README.md +7 -0
- package/dist/assignment-adapters.d.ts +12 -48
- package/dist/assignment-adapters.js +33 -43
- package/dist/assignment.d.ts +1 -0
- package/dist/assignment.js +2 -2
- package/dist/browser-workspace.d.ts +3 -3
- package/dist/build-review.d.ts +1 -1
- package/dist/build-review.js +2 -1
- package/dist/builder.js +4 -7
- package/dist/chat-acceptance.d.ts +2 -2
- package/dist/chat-actions.d.ts +18 -12
- package/dist/chat-actions.js +15 -65
- package/dist/chat-ask.js +5 -5
- package/dist/chat-decide.d.ts +14 -1
- package/dist/chat-decide.js +12 -6
- package/dist/chat-delivery-state.d.ts +12 -70
- package/dist/chat-delivery-state.js +17 -135
- package/dist/chat-delivery.js +58 -30
- package/dist/chat-flow.js +8 -6
- package/dist/chat-inbox.js +1 -1
- package/dist/coding-context.d.ts +2 -39
- package/dist/coding-context.js +2 -1
- package/dist/coding-handoff.d.ts +6 -25
- package/dist/coding-handoff.js +11 -5
- package/dist/coding-types.d.ts +2 -26
- package/dist/coding-workspace.d.ts +2 -0
- package/dist/coding-workspace.js +50 -14
- package/dist/contracts/acceptance-terms.d.ts +14 -0
- package/dist/contracts/acceptance-terms.js +16 -0
- package/dist/contracts/chat-actions.d.ts +328 -0
- package/dist/contracts/chat-actions.js +133 -0
- package/dist/contracts/chat-callback-rows.d.ts +59 -0
- package/dist/contracts/chat-callback-rows.js +46 -0
- package/dist/contracts/chat-content.d.ts +276 -0
- package/dist/contracts/chat-content.js +127 -0
- package/dist/contracts/chat-tables.d.ts +6 -0
- package/dist/contracts/chat-tables.js +136 -0
- package/dist/contracts/coding-context.d.ts +97 -0
- package/dist/contracts/coding-context.js +60 -0
- package/dist/contracts/coding-handoff.d.ts +44 -0
- package/dist/contracts/coding-handoff.js +47 -0
- package/dist/contracts/coding-workspace.d.ts +165 -0
- package/dist/contracts/coding-workspace.js +71 -0
- package/dist/contracts/contract.d.ts +40 -7
- package/dist/contracts/contract.js +155 -19
- package/dist/contracts/decision.d.ts +45 -0
- package/dist/contracts/decision.js +45 -0
- package/dist/contracts/discord-callback.d.ts +45 -0
- package/dist/contracts/discord-callback.js +34 -0
- package/dist/contracts/flow-card.d.ts +50 -0
- package/dist/contracts/flow-card.js +46 -0
- package/dist/contracts/flow-propose.d.ts +325 -0
- package/dist/contracts/flow-propose.js +41 -0
- package/dist/contracts/flow-send.d.ts +119 -0
- package/dist/contracts/flow-send.js +112 -0
- package/dist/contracts/flow.d.ts +19405 -0
- package/dist/contracts/flow.js +364 -0
- package/dist/contracts/gateway-tools.d.ts +374 -0
- package/dist/contracts/gateway-tools.js +94 -0
- package/dist/contracts/handoff.d.ts +91 -0
- package/dist/contracts/handoff.js +82 -0
- package/dist/contracts/lead-context.d.ts +165 -0
- package/dist/contracts/lead-context.js +73 -0
- package/dist/contracts/lead-tools.d.ts +1905 -0
- package/dist/contracts/lead-tools.js +265 -0
- package/dist/contracts/memory-pass.d.ts +158 -0
- package/dist/contracts/memory-pass.js +102 -0
- package/dist/contracts/project-knowledge.d.ts +126 -0
- package/dist/contracts/project-knowledge.js +93 -0
- package/dist/contracts/project-memory.d.ts +117 -0
- package/dist/contracts/project-memory.js +51 -0
- package/dist/contracts/project-skills.d.ts +121 -0
- package/dist/contracts/project-skills.js +76 -0
- package/dist/contracts/proof.d.ts +136 -0
- package/dist/contracts/proof.js +110 -0
- package/dist/contracts/review-findings.d.ts +46 -0
- package/dist/contracts/review-findings.js +48 -0
- package/dist/contracts/route.d.ts +484 -0
- package/dist/contracts/route.js +128 -0
- package/dist/contracts/scope.d.ts +105 -0
- package/dist/contracts/scope.js +114 -0
- package/dist/contracts/scout-report.d.ts +234 -0
- package/dist/contracts/scout-report.js +141 -0
- package/dist/contracts/slack-callback.d.ts +43 -0
- package/dist/contracts/slack-callback.js +35 -0
- package/dist/contracts/sort-answer.d.ts +83 -0
- package/dist/contracts/sort-answer.js +77 -0
- package/dist/contracts/stage-output.d.ts +127 -0
- package/dist/contracts/stage-output.js +166 -0
- package/dist/contracts/task-sizing.d.ts +24 -0
- package/dist/contracts/task-sizing.js +28 -0
- package/dist/contracts/teammate-turn.d.ts +43 -0
- package/dist/contracts/teammate-turn.js +51 -0
- package/dist/contracts/teams-callback.d.ts +14 -0
- package/dist/contracts/teams-callback.js +14 -0
- package/dist/contracts/telegram-callback.d.ts +120 -0
- package/dist/contracts/telegram-callback.js +97 -0
- package/dist/contracts/verification-receipt.d.ts +148 -0
- package/dist/contracts/verification-receipt.js +87 -0
- package/dist/decision.d.ts +11 -20
- package/dist/decision.js +86 -167
- package/dist/demo.js +28 -11
- package/dist/discord-chat.js +31 -20
- package/dist/evidence.d.ts +3 -40
- package/dist/evidence.js +5 -1
- package/dist/flow-engine.js +14 -17
- package/dist/flow-gallery.d.ts +3 -2
- package/dist/flow-items.d.ts +4 -13
- package/dist/flow-items.js +1 -15
- package/dist/flow-send.d.ts +6 -37
- package/dist/flow-send.js +18 -14
- package/dist/flow-share.d.ts +10 -32
- package/dist/flow-share.js +72 -84
- package/dist/flow-sort.d.ts +7 -26
- package/dist/flow-sort.js +25 -20
- package/dist/flow-starters.d.ts +2 -1
- package/dist/flow-steps.js +3 -2
- package/dist/flow-triggers.d.ts +15 -72
- package/dist/flow-triggers.js +94 -83
- package/dist/flows.d.ts +37 -220
- package/dist/flows.js +356 -387
- package/dist/invoke.js +4 -4
- package/dist/lead-context.d.ts +4 -2
- package/dist/lead-context.js +24 -17
- package/dist/mate-tools.d.ts +4 -0
- package/dist/mate-tools.js +111 -308
- package/dist/mcp-connect.d.ts +27 -4
- package/dist/mcp-connect.js +92 -17
- package/dist/mcp.js +84 -216
- package/dist/memory-pass.d.ts +17 -42
- package/dist/memory-pass.js +54 -26
- package/dist/operate.js +31 -2
- package/dist/phase-routing.d.ts +19 -72
- package/dist/phase-routing.js +34 -164
- package/dist/plan.d.ts +5 -5
- package/dist/plan.js +5 -25
- package/dist/process-recovery-eligibility.d.ts +2 -2
- package/dist/process-recovery-eligibility.js +13 -8
- package/dist/project-knowledge.d.ts +16 -35
- package/dist/project-knowledge.js +42 -21
- package/dist/project-memory.d.ts +2 -28
- package/dist/project-memory.js +28 -13
- package/dist/project-skills.d.ts +16 -38
- package/dist/project-skills.js +41 -32
- package/dist/project-tools.d.ts +1 -0
- package/dist/project-tools.js +4 -4
- package/dist/proof.d.ts +15 -91
- package/dist/proof.js +90 -249
- package/dist/provider.d.ts +2 -0
- package/dist/provider.js +4 -16
- package/dist/result-evidence-readers.d.ts +42 -0
- package/dist/result-evidence-readers.js +91 -0
- package/dist/result-shots.d.ts +1 -1
- package/dist/result-shots.js +2 -1
- package/dist/review-switch.d.ts +3 -8
- package/dist/reviewer.d.ts +8 -12
- package/dist/reviewer.js +11 -35
- package/dist/scope.d.ts +21 -43
- package/dist/scope.js +42 -128
- package/dist/scout-report.d.ts +9 -194
- package/dist/scout-report.js +113 -264
- package/dist/scout.js +15 -11
- package/dist/serve.js +17 -101
- package/dist/slack-chat.js +26 -20
- package/dist/slack-state.js +2 -1
- package/dist/store.d.ts +9 -32
- package/dist/store.js +18 -15
- package/dist/structured-output.js +2 -1
- package/dist/subscription-chat.d.ts +4 -0
- package/dist/subscription-chat.js +4 -1
- package/dist/surface.js +8 -1
- package/dist/task-review-brief.d.ts +69 -0
- package/dist/task-review-brief.js +179 -0
- package/dist/task-sizing.d.ts +3 -27
- package/dist/task-sizing.js +11 -26
- package/dist/task-text.d.ts +0 -5
- package/dist/task-text.js +1 -3
- package/dist/teammate-question.js +7 -5
- package/dist/teammate-work.js +9 -5
- package/dist/teammates.d.ts +13 -64
- package/dist/teammates.js +32 -33
- package/dist/teams-chat.js +20 -11
- package/dist/telegram-flow.js +4 -3
- package/dist/telegram-mate.d.ts +4 -14
- package/dist/telegram-mate.js +8 -7
- package/dist/telegram-team.d.ts +2 -19
- package/dist/telegram.d.ts +1 -1
- package/dist/telegram.js +52 -42
- package/dist/text-limits.d.ts +212 -1
- package/dist/text-limits.js +214 -1
- package/dist/tools-ui.d.ts +2 -1
- package/dist/tools-ui.js +7 -4
- package/dist/verification-evidence.js +24 -12
- package/package.json +1 -1
package/dist/flows.d.ts
CHANGED
|
@@ -1,172 +1,55 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export type FlowColor
|
|
5
|
-
export type FlowZone = {
|
|
6
|
-
x: number;
|
|
7
|
-
y: number;
|
|
8
|
-
w: number;
|
|
9
|
-
h: number;
|
|
10
|
-
color: FlowColor;
|
|
11
|
-
};
|
|
12
|
-
/** One answer a sort zone can pick: its name, what it means (what Jev reads), and the zone it sends the card to. */
|
|
13
|
-
export type FlowSortAnswer = {
|
|
14
|
-
answer: string;
|
|
15
|
-
means: string;
|
|
16
|
-
to: string;
|
|
17
|
-
};
|
|
18
|
-
/** Something else a sort zone notes on the card: a score on a scale of levels, or a yes/no. */
|
|
19
|
-
export type FlowSortNote = {
|
|
20
|
-
id: string;
|
|
21
|
-
kind: "score" | "yes-no";
|
|
22
|
-
question: string;
|
|
23
|
-
levels: string[] | null;
|
|
24
|
-
};
|
|
25
|
-
/** sort: the question, its answers, how sure Jev must be to act alone (0.5–0.99), and what else it notes. */
|
|
26
|
-
export type FlowSort = {
|
|
27
|
-
question: string;
|
|
28
|
-
answers: FlowSortAnswer[];
|
|
29
|
-
sureAt: number;
|
|
30
|
-
notes: FlowSortNote[];
|
|
31
|
-
};
|
|
32
|
-
/** request: what is called. The address's scheme and host are fixed; fill-ins go in its path and query (encoded), headers and body. */
|
|
33
|
-
export type FlowRequest = {
|
|
34
|
-
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
35
|
-
url: string;
|
|
36
|
-
headers: Record<string, string>;
|
|
37
|
-
body: string | null;
|
|
38
|
-
};
|
|
39
|
-
/** email: who it goes to, the subject and the text — all with fill-ins. */
|
|
40
|
-
export type FlowEmail = {
|
|
41
|
-
to: string;
|
|
42
|
-
subject: string;
|
|
43
|
-
body: string;
|
|
44
|
-
};
|
|
45
|
-
/** tool: which of the project's tools (MCP servers), which of its functions, and the arguments as JSON with fill-ins. */
|
|
46
|
-
export type FlowTool = {
|
|
47
|
-
server: string;
|
|
48
|
-
name: string;
|
|
49
|
-
args: string;
|
|
50
|
-
};
|
|
51
|
-
/** wait (v91): for a reply to the card's email (next: replied, onFail: no reply in time), or for a set time (then next).
|
|
52
|
-
* "hours": until the clock is between `from` and `to` (like 22:00–06:00), in the computer's time zone unless one is named. */
|
|
53
|
-
export type FlowWait = {
|
|
54
|
-
for: "reply" | "time" | "hours";
|
|
55
|
-
minutes: number;
|
|
56
|
-
from?: string;
|
|
57
|
-
to?: string;
|
|
58
|
-
timeZone?: string;
|
|
59
|
-
};
|
|
60
|
-
/** How a Pull request zone merges once checks pass. */
|
|
61
|
-
export declare const FLOW_MERGE_METHODS: readonly ["squash", "merge", "rebase"];
|
|
62
|
-
export type FlowMergeMethod = (typeof FLOW_MERGE_METHODS)[number];
|
|
63
|
-
/** A choose zone's option: its button's words, and the zone it leads to (FLOW_END closes the card as Ignored). */
|
|
64
|
-
export type FlowChoice = {
|
|
65
|
-
label: string;
|
|
66
|
-
to: string;
|
|
67
|
-
};
|
|
68
|
-
/** Where a choose option that ends the card leads. */
|
|
69
|
-
export declare const FLOW_END = "end";
|
|
70
|
-
/** How many options a choose zone offers. */
|
|
71
|
-
export declare const CHOICES_MIN = 2, CHOICES_MAX = 4;
|
|
72
|
-
/** A time limit on a zone (v91): after this long, the person it waits on is reminded, and a Holding or
|
|
73
|
-
* "Person decides" zone can move the card on (`to`). */
|
|
74
|
-
export type FlowLimit = {
|
|
75
|
-
minutes: number;
|
|
76
|
-
to: string | null;
|
|
77
|
-
};
|
|
78
|
-
export type FlowStage = {
|
|
79
|
-
id: string;
|
|
80
|
-
title: string;
|
|
81
|
-
kind: FlowStageKind;
|
|
82
|
-
zone: FlowZone;
|
|
83
|
-
/** task/report: what the agent is asked to do. `{{card.title}}`,
|
|
84
|
-
* `{{card.description}}`, `{{note}}` (the latest send-back note) and
|
|
85
|
-
* `{{stage.<id>}}` (an earlier zone's report) are filled in. */
|
|
86
|
-
instructions: string | null;
|
|
87
|
-
/** task: plan first (required), let Toolroll decide (auto), or build directly (skip). */
|
|
88
|
-
planning: "auto" | "required" | "skip" | null;
|
|
89
|
-
/** approval: the one person who decides, or null for any approver on the project. */
|
|
90
|
-
approver: string | null;
|
|
91
|
-
/** approval: the flow's owner decides (v86), whoever that is when the card arrives; `approver` is then unused. */
|
|
92
|
-
toOwner?: boolean;
|
|
93
|
-
/** notify: the message; update: the comment left on the issue. Same fill-ins. */
|
|
94
|
-
message: string | null;
|
|
95
|
-
/** update: also close the issue (Linear: move it to the team's done state). */
|
|
96
|
-
close: boolean | null;
|
|
97
|
-
/** check: the project script (by name) run with no AI. */
|
|
98
|
-
script: string | null;
|
|
99
|
-
/** check (v90): where it runs — a clean folder, or a copy of the card's work (the default for zones made before v90);
|
|
100
|
-
* the answers a script's "goto:" line may pick, each with the zone it leads to; and the flow secrets it gets as variables. */
|
|
101
|
-
runIn?: "folder" | "copy";
|
|
102
|
-
routes?: {
|
|
103
|
-
answer: string;
|
|
104
|
-
to: string;
|
|
105
|
-
}[];
|
|
106
|
-
secrets?: string[];
|
|
107
|
-
/** sort: what Jev is asked and where each answer leads. Its onFail is where a card goes when Jev isn't sure. */
|
|
108
|
-
sort: FlowSort | null;
|
|
109
|
-
/** request, email, tool (v87): what the step sends, and to where. */
|
|
110
|
-
request?: FlowRequest;
|
|
111
|
-
email?: FlowEmail;
|
|
112
|
-
tool?: FlowTool;
|
|
113
|
-
/** wait (v91): what it waits for, and how long. */
|
|
114
|
-
wait?: FlowWait;
|
|
115
|
-
/** Any zone but Wait and Done (v91): how long a card may sit here before someone is reminded. */
|
|
116
|
-
limit?: FlowLimit;
|
|
117
|
-
/** v92: the AI teammate (by handle) who decides a "Person decides" zone (handing hard ones to its person), or handles a "Teammate handles it" zone. */
|
|
118
|
-
teammate?: string;
|
|
119
|
-
/** v96: a "Teammate handles it" zone sends what the teammate writes back to whoever asked (the person who added the card, its chat thread, or the teammate's manager). */
|
|
120
|
-
reply?: boolean;
|
|
121
|
-
/** choose: the buttons the person picks from, in order. Its onFail is where a reply goes, with the reply as {{note}}. */
|
|
122
|
-
options?: FlowChoice[];
|
|
123
|
-
/** task: the project it builds in, when not the flow's own (one the flow's owner may file in). */
|
|
124
|
-
repo?: string;
|
|
125
|
-
/** pull-request: merge once checks pass, this way. Only allowed after a "Person decides" zone, and a card merges only when a person approved it after it was built. */
|
|
126
|
-
merge?: FlowMergeMethod;
|
|
127
|
-
/** Where a card goes when this zone's step succeeds, and when it fails or is sent back (sort: when it isn't sure). */
|
|
128
|
-
next: string | null;
|
|
129
|
-
onFail: string | null;
|
|
130
|
-
};
|
|
131
|
-
export type FlowDefinition = {
|
|
132
|
-
version: 1;
|
|
133
|
-
start: string;
|
|
134
|
-
stages: FlowStage[];
|
|
135
|
-
};
|
|
1
|
+
import { type ContractIssue, type ContractResult } from "./contracts/contract.js";
|
|
2
|
+
import { CHOICES_MAX, CHOICES_MIN, FLOW_COLORS, FLOW_END, FLOW_MERGE_METHODS, FLOW_STAGE_KINDS, LONGEST_WAIT_MINUTES, SCRIPT_LANGUAGES, SCRIPT_NAME, sortKeyOf, type FlowDefinition, type FlowStage, type FlowStageKind, type FlowStepFields, type FlowWait, type ScriptLanguage, type TriggerInput } from "./contracts/flow.js";
|
|
3
|
+
export { CHOICES_MAX, CHOICES_MIN, FLOW_COLORS, FLOW_END, FLOW_MERGE_METHODS, FLOW_STAGE_KINDS, LONGEST_WAIT_MINUTES, SCRIPT_LANGUAGES, SCRIPT_NAME, sortKeyOf };
|
|
4
|
+
export type { FlowChoice, FlowColor, FlowDefinition, FlowEmail, FlowLimit, FlowMergeMethod, FlowRequest, FlowSort, FlowSortAnswer, FlowSortNote, FlowStage, FlowStageKind, FlowStepInput, FlowTool, FlowWait, FlowZone, ScriptLanguage, } from "./contracts/flow.js";
|
|
136
5
|
/** What each kind is called and does, in the words the canvas uses. */
|
|
137
6
|
export declare const FLOW_KIND_WORDS: Record<FlowStageKind, {
|
|
138
7
|
label: string;
|
|
139
8
|
about: string;
|
|
140
9
|
}>;
|
|
141
|
-
/** A project script's name: short, lowercase, dashes — how zones and chat refer to it. */
|
|
142
|
-
export declare const SCRIPT_NAME: RegExp;
|
|
143
|
-
/** The languages a project script is written in (v90). */
|
|
144
|
-
export declare const SCRIPT_LANGUAGES: readonly ["shell", "python", "node"];
|
|
145
|
-
export type ScriptLanguage = (typeof SCRIPT_LANGUAGES)[number];
|
|
146
10
|
export declare const LANGUAGE_WORDS: Record<ScriptLanguage, string>;
|
|
147
|
-
/** How an answer is named to Jev: its words as a short key. */
|
|
148
|
-
export declare const sortKeyOf: (answer: string) => string;
|
|
149
11
|
/** The default for "sure enough to act alone". */
|
|
150
12
|
export declare const SORT_SURE_AT = 0.8;
|
|
151
|
-
/** The longest a zone waits or a limit runs: 30 days. */
|
|
152
|
-
export declare const LONGEST_WAIT_MINUTES: number;
|
|
153
13
|
/** "3 days", "4 hours", "90 minutes", "1 week" (or a number of minutes) as minutes; null when it isn't one. */
|
|
154
14
|
export declare function durationMinutes(value: unknown): number | null;
|
|
155
15
|
/** Minutes in the words people use: "3 days", "1 day 4 hours", "45 minutes". */
|
|
156
16
|
export declare function durationWords(minutes: number): string;
|
|
157
17
|
/** "22:00", "9:30" as "HH:MM"; null when it isn't a time of day. */
|
|
158
18
|
export declare function clockTime(value: unknown): string | null;
|
|
19
|
+
export declare function knownTimeZone(zone: string): boolean;
|
|
159
20
|
/** Whether a time falls inside an "hours" wait (22:00–06:00 runs past midnight), in its time zone or this computer's. */
|
|
160
21
|
export declare function withinHours(wait: Pick<FlowWait, "from" | "to" | "timeZone">, now: Date): boolean;
|
|
161
22
|
/** Who decides at an approval zone: its named person, the flow's owner, or null for anyone who approves on the project. */
|
|
162
23
|
export declare function deciderOf(stage: Pick<FlowStage, "approver" | "toOwner">, flow: {
|
|
163
24
|
owner: string;
|
|
164
25
|
}): string | null;
|
|
165
|
-
/** A flow
|
|
166
|
-
|
|
26
|
+
/** A flow refused by its contract: every problem, each naming its path (`stages[2].instructions: required`). */
|
|
27
|
+
export declare class FlowContractError extends Error {
|
|
28
|
+
readonly lines: readonly string[];
|
|
29
|
+
constructor(lines: readonly string[]);
|
|
30
|
+
}
|
|
31
|
+
/** What JSON Schema can't say about a drawing, each named by its path: paths lead to zones that exist and never back into
|
|
32
|
+
* their own zone, answers and options have names of their own, a web address's host is written out, tool arguments are a
|
|
33
|
+
* JSON object, an hours wait's times differ in a real time zone, and a merge comes after a person's decision. */
|
|
34
|
+
export declare function drawingProblems(definition: FlowDefinition): ContractIssue[];
|
|
35
|
+
/**
|
|
36
|
+
* Read a flow's drawing: the canvas's, a step list's once built, or one saved earlier (`stored`, which keeps working under
|
|
37
|
+
* rules added since: its instructions keep the length they were saved with). A version 1 drawing is read as every release
|
|
38
|
+
* has read it (canonicalStage), then the schema checks it, then drawingProblems; a newer version is refused plainly.
|
|
39
|
+
*/
|
|
40
|
+
export declare function readFlowDefinition(input: unknown, options?: {
|
|
41
|
+
stored?: boolean;
|
|
42
|
+
}): ContractResult<FlowDefinition>;
|
|
43
|
+
/** A refusal of the drawing a step list or flow file became, in its words: `stages[2].sort.answers[0].to` is
|
|
44
|
+
* `steps[2].answers[0].goesTo` (each zone is the step at its index), and a zone's failure path is the step's own name for it. */
|
|
45
|
+
export declare function inStepWords(line: string, list: "steps" | "zones", kinds: readonly (string | undefined)[]): string;
|
|
46
|
+
/** A flow as drawn on the canvas, checked whole (readFlowDefinition). Throws FlowContractError, naming every path. */
|
|
167
47
|
export declare function validateFlowDefinition(input: unknown, options?: {
|
|
168
48
|
stored?: boolean;
|
|
169
49
|
}): FlowDefinition;
|
|
50
|
+
/** A drawing's refusal as the canvas shows it: each line as it is, after the name of the zone it is about, so a person
|
|
51
|
+
* finds it on the canvas (`Build · stages[1].instructions: required`). */
|
|
52
|
+
export declare function withZoneNames(lines: readonly string[], input: unknown): string;
|
|
170
53
|
/** The instructions 0.9.26 and earlier read from a saved zone: they re-check this length on every read, and a flow with a
|
|
171
54
|
* longer one won't load. A saved zone keeps its first part under it, and the rest in `instructionsMore`, which they ignore. */
|
|
172
55
|
export declare const FLOW_INSTRUCTIONS_STORED = 4000;
|
|
@@ -217,86 +100,21 @@ export declare function cardEmailOf(card: {
|
|
|
217
100
|
title: string;
|
|
218
101
|
description: string | null;
|
|
219
102
|
}): string;
|
|
220
|
-
/** A step as the lead describes it, in list order. A step that keeps an
|
|
221
|
-
* existing zone (by `id`) carries over whatever it leaves out. */
|
|
222
|
-
export type FlowStepInput = {
|
|
223
|
-
id?: string;
|
|
224
|
-
title?: string;
|
|
225
|
-
kind?: FlowStageKind;
|
|
226
|
-
instructions?: string;
|
|
227
|
-
planning?: "auto" | "required" | "skip";
|
|
228
|
-
decider?: string | null;
|
|
229
|
-
message?: string;
|
|
230
|
-
script?: string;
|
|
231
|
-
close?: boolean;
|
|
232
|
-
/** check (v90): "folder" (a clean folder) or "copy" (a copy of the card's work); the answers a "goto:" line picks, each with the step it goes to; saved secrets it gets. */
|
|
233
|
-
runIn?: "folder" | "copy";
|
|
234
|
-
routes?: {
|
|
235
|
-
answer?: string;
|
|
236
|
-
goesTo?: string;
|
|
237
|
-
}[];
|
|
238
|
-
secrets?: string[];
|
|
239
|
-
/** sort: the question, each answer with what it means and the step it goes to, how sure Jev must be (a percentage), and up to 3 other things to note. */
|
|
240
|
-
question?: string;
|
|
241
|
-
answers?: {
|
|
242
|
-
answer?: string;
|
|
243
|
-
means?: string;
|
|
244
|
-
goesTo?: string;
|
|
245
|
-
}[];
|
|
246
|
-
sureAt?: number;
|
|
247
|
-
alsoNote?: {
|
|
248
|
-
question?: string;
|
|
249
|
-
kind?: "score" | "yes-no";
|
|
250
|
-
levels?: string[];
|
|
251
|
-
}[];
|
|
252
|
-
/** request: method, address, headers and body; email: to, subject, body; tool: the tool (server), its function (tool) and arguments. */
|
|
253
|
-
method?: FlowRequest["method"];
|
|
254
|
-
url?: string;
|
|
255
|
-
headers?: Record<string, string>;
|
|
256
|
-
body?: string;
|
|
257
|
-
to?: string;
|
|
258
|
-
subject?: string;
|
|
259
|
-
server?: string;
|
|
260
|
-
tool?: string;
|
|
261
|
-
args?: Record<string, unknown> | string;
|
|
262
|
-
/** wait (v91): for a reply (the default) or a set time, and how long ("3 days"); where a card goes when no reply comes.
|
|
263
|
-
* "hours": until the clock is between `from` and `until` ("22:00", "06:00"). */
|
|
264
|
-
waitFor?: "reply" | "time" | "hours";
|
|
265
|
-
wait?: string | number;
|
|
266
|
-
ifNoReply?: string;
|
|
267
|
-
from?: string;
|
|
268
|
-
until?: string;
|
|
269
|
-
/** pull-request: merge once checks pass (true is squash). Needs a decision before it. */
|
|
270
|
-
merge?: boolean | FlowMergeMethod;
|
|
271
|
-
/** Any step but wait and done (v91): remind after this long ("2 days"; "none" removes it), and on holding and approval steps, move the card to this step then. */
|
|
272
|
-
remindAfter?: string | number;
|
|
273
|
-
thenMoveTo?: string;
|
|
274
|
-
/** v92: the AI teammate (by name) who decides an approval step (handing hard ones to its decider) or handles a teammate step. */
|
|
275
|
-
teammate?: string;
|
|
276
|
-
/** v96: a teammate step sends what it writes back to whoever asked. */
|
|
277
|
-
reply?: boolean;
|
|
278
|
-
/** choose: 2 to 4 buttons, each with its words and the step it goes to ("end" ignores the card); where a reply goes instead
|
|
279
|
-
* (the reply is its {{note}}; the nearest earlier build or research step when left out). ifNoReply (with remindAfter) moves it on. */
|
|
280
|
-
options?: {
|
|
281
|
-
label?: string;
|
|
282
|
-
goesTo?: string;
|
|
283
|
-
}[];
|
|
284
|
-
ifReplied?: string;
|
|
285
|
-
/** task: the project it builds in (path), when not the flow's own. */
|
|
286
|
-
repo?: string;
|
|
287
|
-
next?: string;
|
|
288
|
-
ifFails?: string;
|
|
289
|
-
ifNotSure?: string;
|
|
290
|
-
};
|
|
291
103
|
/** What a draft zone asks for when the steps leave it out. */
|
|
292
104
|
export declare const DRAFT_DEFAULT = "Write a short, friendly reply to the person who sent this card, in plain words.";
|
|
293
105
|
/** Steps as the lead's flow tool and `toolroll flows` take them: "me" as a decider is the person asking, stored by name. */
|
|
294
106
|
export declare function stepsFor(steps: unknown, name: string): unknown;
|
|
107
|
+
/** An edit's steps with what a kept step leaves out of its kind and name filled from the zone it keeps (by id), so each
|
|
108
|
+
* reads as the one schema its kind has. Anything else it leaves out carries over when the flow is drawn (flowFromSteps). */
|
|
109
|
+
export declare function withKeptSteps(steps: unknown, previous: FlowDefinition | null): unknown;
|
|
110
|
+
/** A flow's steps, read by their one schema: `steps[0].routes[0]: unknown key 'to' (did you mean goesTo?)`. */
|
|
111
|
+
export declare function readFlowSteps(input: unknown, previous?: FlowDefinition | null): ContractResult<FlowStepFields[]>;
|
|
295
112
|
/**
|
|
296
113
|
* A flow from an ordered list of steps: ids from names, each step leading
|
|
297
114
|
* to the next, a Done zone at the end when none is listed, and a decision
|
|
298
115
|
* sending work back to the nearest earlier step that does work. New zones
|
|
299
|
-
* are laid out in rows; zones kept from `previous` keep their place.
|
|
116
|
+
* are laid out in rows; zones kept from `previous` keep their place. Throws
|
|
117
|
+
* FlowContractError, each line naming the step's path (`steps[2].next: ...`).
|
|
300
118
|
*/
|
|
301
119
|
export declare function flowFromSteps(input: unknown, previous?: FlowDefinition | null): FlowDefinition;
|
|
302
120
|
/** What confirming a new or changed flow means, in the canvas's words: each step's job and path, what changed, and that the usual approvals still apply. */
|
|
@@ -310,6 +128,5 @@ export declare const FLOW_TEMPLATES: readonly {
|
|
|
310
128
|
label: string;
|
|
311
129
|
about: string;
|
|
312
130
|
definition: FlowDefinition;
|
|
313
|
-
trigger?:
|
|
131
|
+
trigger?: TriggerInput;
|
|
314
132
|
}[];
|
|
315
|
-
export {};
|