@aicopycoders/exodus 2026.7.200-beta.4 → 2026.7.200-beta.6
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/assets/skills/exodus/SKILL.md +1 -0
- package/assets/skills/exodus-workflow/SKILL.md +173 -0
- package/dist/bin/exodus.js +1 -0
- package/dist/commands/brand.js +2 -1
- package/dist/commands/doctor.js +22 -16
- package/dist/commands/init.js +3 -2
- package/dist/commands/meme.js +5 -4
- package/dist/commands/migrate.js +7 -6
- package/dist/commands/workflow.d.ts +271 -0
- package/dist/commands/workflow.js +744 -0
- package/dist/lib/channel.d.ts +5 -0
- package/dist/lib/channel.js +15 -0
- package/dist/lib/scaffold.d.ts +5 -4
- package/dist/lib/scaffold.js +27 -6
- package/package.json +1 -1
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { type ApiResponse } from "../lib/client.js";
|
|
2
|
+
import { type PollOptions, type PollResult } from "../lib/poll.js";
|
|
3
|
+
export declare const helpText: string;
|
|
4
|
+
export type WorkflowNodeKind = "brief" | "bot" | "primer" | "image" | "output";
|
|
5
|
+
export interface WorkflowNode {
|
|
6
|
+
id: string;
|
|
7
|
+
kind: WorkflowNodeKind;
|
|
8
|
+
position: {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
};
|
|
12
|
+
config: Record<string, unknown>;
|
|
13
|
+
}
|
|
14
|
+
export interface WorkflowEdge {
|
|
15
|
+
id: string;
|
|
16
|
+
source: string;
|
|
17
|
+
sourceHandle: string;
|
|
18
|
+
target: string;
|
|
19
|
+
targetHandle: string;
|
|
20
|
+
}
|
|
21
|
+
export interface WorkflowContractJson {
|
|
22
|
+
contract: "exodus-workflow";
|
|
23
|
+
version: number;
|
|
24
|
+
workflowId?: string;
|
|
25
|
+
updatedAt?: string;
|
|
26
|
+
name: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
nodes: WorkflowNode[];
|
|
29
|
+
edges: WorkflowEdge[];
|
|
30
|
+
}
|
|
31
|
+
export interface UnresolvedWorkflowRef {
|
|
32
|
+
nodeId: string;
|
|
33
|
+
ref: "persona" | "primer";
|
|
34
|
+
value: string;
|
|
35
|
+
message: string;
|
|
36
|
+
}
|
|
37
|
+
export interface WorkflowImportResult {
|
|
38
|
+
name: string;
|
|
39
|
+
created: boolean;
|
|
40
|
+
workflowId?: string;
|
|
41
|
+
nodeCount: number;
|
|
42
|
+
edgeCount: number;
|
|
43
|
+
unresolved: UnresolvedWorkflowRef[];
|
|
44
|
+
warnings: string[];
|
|
45
|
+
}
|
|
46
|
+
export type GraphIssueCode = "bad-shape" | "unknown-kind" | "duplicate-node-id" | "dangling-edge" | "unknown-port" | "type-mismatch" | "duplicate-input" | "cycle" | "missing-required-input" | "bad-config";
|
|
47
|
+
export interface GraphIssue {
|
|
48
|
+
code: GraphIssueCode;
|
|
49
|
+
message: string;
|
|
50
|
+
nodeId?: string;
|
|
51
|
+
edgeId?: string;
|
|
52
|
+
portId?: string;
|
|
53
|
+
remedy?: string;
|
|
54
|
+
}
|
|
55
|
+
export type WorkflowImportErrorCode = "invalid-graph" | "conflict" | "forbidden" | "not-found";
|
|
56
|
+
export interface WorkflowImportError {
|
|
57
|
+
code: WorkflowImportErrorCode;
|
|
58
|
+
message: string;
|
|
59
|
+
issues?: GraphIssue[];
|
|
60
|
+
currentUpdatedAt?: string;
|
|
61
|
+
}
|
|
62
|
+
export type WorkflowPortType = "text" | "primer" | "image";
|
|
63
|
+
export type WorkflowPrimerKind = "body" | "hook" | "headline" | "summary";
|
|
64
|
+
export type WorkflowParamKind = "select" | "text" | "textarea" | "toggle" | "number" | "multiselect";
|
|
65
|
+
export interface CatalogInput {
|
|
66
|
+
id: string;
|
|
67
|
+
label: string;
|
|
68
|
+
accepts: WorkflowPortType[];
|
|
69
|
+
required: boolean;
|
|
70
|
+
multi?: boolean;
|
|
71
|
+
primerKinds?: WorkflowPrimerKind[];
|
|
72
|
+
}
|
|
73
|
+
export interface CatalogParam {
|
|
74
|
+
key: string;
|
|
75
|
+
label: string;
|
|
76
|
+
kind: WorkflowParamKind;
|
|
77
|
+
options?: string[];
|
|
78
|
+
min?: number;
|
|
79
|
+
max?: number;
|
|
80
|
+
required?: boolean;
|
|
81
|
+
help?: string;
|
|
82
|
+
default?: string;
|
|
83
|
+
}
|
|
84
|
+
export interface CatalogBot {
|
|
85
|
+
slug: string;
|
|
86
|
+
name: string;
|
|
87
|
+
blurb: string;
|
|
88
|
+
category: string;
|
|
89
|
+
categoryLabel: string;
|
|
90
|
+
inputs: CatalogInput[];
|
|
91
|
+
params: CatalogParam[];
|
|
92
|
+
outputType: string;
|
|
93
|
+
splitsOutput: boolean;
|
|
94
|
+
}
|
|
95
|
+
export interface WorkflowCatalog {
|
|
96
|
+
catalog: "exodus-workflow-catalog";
|
|
97
|
+
version: 1;
|
|
98
|
+
bots: CatalogBot[];
|
|
99
|
+
vocabulary: {
|
|
100
|
+
nodeKinds: string[];
|
|
101
|
+
briefSources: string[];
|
|
102
|
+
primerKinds: string[];
|
|
103
|
+
imageModels: string[];
|
|
104
|
+
aspectRatios: string[];
|
|
105
|
+
imageQuantityModes: string[];
|
|
106
|
+
categories: Array<{
|
|
107
|
+
id: string;
|
|
108
|
+
label: string;
|
|
109
|
+
}>;
|
|
110
|
+
};
|
|
111
|
+
customBot: {
|
|
112
|
+
slug: "custom";
|
|
113
|
+
configKey: "customSlug";
|
|
114
|
+
inputs: CatalogInput[];
|
|
115
|
+
summaryOnlySlugs: string[];
|
|
116
|
+
notes: string;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
export type WorkflowBriefSource = "text" | "swipe-ad" | "swipe-bundle" | "organic-url" | "ad-url";
|
|
120
|
+
export interface WorkflowInputDescriptor {
|
|
121
|
+
fieldName: string;
|
|
122
|
+
nodeId: string;
|
|
123
|
+
source: WorkflowBriefSource;
|
|
124
|
+
required: boolean;
|
|
125
|
+
description?: string;
|
|
126
|
+
bundleSize?: number;
|
|
127
|
+
}
|
|
128
|
+
export interface WorkflowPrerequisiteDescriptor {
|
|
129
|
+
primerKind: WorkflowPrimerKind;
|
|
130
|
+
nodeIds: string[];
|
|
131
|
+
}
|
|
132
|
+
export interface WorkflowOutputDescriptor {
|
|
133
|
+
type: "text" | "image";
|
|
134
|
+
label: string;
|
|
135
|
+
nodeId: string;
|
|
136
|
+
botSlug?: string;
|
|
137
|
+
}
|
|
138
|
+
export interface WorkflowDescribeResponse {
|
|
139
|
+
workflowId: string;
|
|
140
|
+
name: string;
|
|
141
|
+
description?: string;
|
|
142
|
+
updatedAt: string;
|
|
143
|
+
inputs: WorkflowInputDescriptor[];
|
|
144
|
+
prerequisites: Array<WorkflowPrerequisiteDescriptor & {
|
|
145
|
+
stored: boolean;
|
|
146
|
+
}>;
|
|
147
|
+
outputs: WorkflowOutputDescriptor[];
|
|
148
|
+
}
|
|
149
|
+
export interface WorkflowListItem {
|
|
150
|
+
_id: string;
|
|
151
|
+
name: string;
|
|
152
|
+
description?: string;
|
|
153
|
+
nodeCount: number;
|
|
154
|
+
edgeCount: number;
|
|
155
|
+
createdAt: string;
|
|
156
|
+
updatedAt: string;
|
|
157
|
+
}
|
|
158
|
+
export interface WorkflowListResponse {
|
|
159
|
+
workflows: WorkflowListItem[];
|
|
160
|
+
}
|
|
161
|
+
export type WorkflowRunStatus = "queued" | "running" | "completed" | "partial" | "failed";
|
|
162
|
+
export type WorkflowNodeRunStatus = "idle" | "running" | "done" | "failed" | "skipped";
|
|
163
|
+
export type WorkflowArtifact = {
|
|
164
|
+
type: "text";
|
|
165
|
+
text: string;
|
|
166
|
+
label?: string;
|
|
167
|
+
} | {
|
|
168
|
+
type: "primer";
|
|
169
|
+
text: string;
|
|
170
|
+
primerKind: string;
|
|
171
|
+
} | {
|
|
172
|
+
type: "image";
|
|
173
|
+
storageId: string;
|
|
174
|
+
imageUrl?: string;
|
|
175
|
+
};
|
|
176
|
+
export interface WorkflowRunOutput {
|
|
177
|
+
nodeId: string;
|
|
178
|
+
botSlug?: string;
|
|
179
|
+
type: "text" | "image";
|
|
180
|
+
label: string;
|
|
181
|
+
text?: string;
|
|
182
|
+
imageUrl?: string;
|
|
183
|
+
imageId?: string;
|
|
184
|
+
}
|
|
185
|
+
export interface WorkflowRunNode {
|
|
186
|
+
nodeId: string;
|
|
187
|
+
kind: string;
|
|
188
|
+
status: WorkflowNodeRunStatus;
|
|
189
|
+
error?: string;
|
|
190
|
+
startedAt?: number;
|
|
191
|
+
completedAt?: number;
|
|
192
|
+
outputs: WorkflowArtifact[];
|
|
193
|
+
}
|
|
194
|
+
export interface WorkflowCounts {
|
|
195
|
+
done: number;
|
|
196
|
+
failed: number;
|
|
197
|
+
skipped: number;
|
|
198
|
+
total: number;
|
|
199
|
+
}
|
|
200
|
+
export interface WorkflowRun {
|
|
201
|
+
_id: string;
|
|
202
|
+
workflowId: string;
|
|
203
|
+
workflowName: string;
|
|
204
|
+
status: WorkflowRunStatus;
|
|
205
|
+
error?: string;
|
|
206
|
+
counts?: WorkflowCounts;
|
|
207
|
+
inputs: Record<string, string>;
|
|
208
|
+
triggerRunId?: string;
|
|
209
|
+
createdAt: number;
|
|
210
|
+
startedAt?: number;
|
|
211
|
+
completedAt?: number;
|
|
212
|
+
isTerminal: boolean;
|
|
213
|
+
nodes: WorkflowRunNode[];
|
|
214
|
+
outputs?: WorkflowRunOutput[];
|
|
215
|
+
}
|
|
216
|
+
export type WorkflowRunProjection = Omit<WorkflowRun, "nodes"> & {
|
|
217
|
+
nodes?: never;
|
|
218
|
+
};
|
|
219
|
+
export interface WorkflowRunDeps {
|
|
220
|
+
get: (path: string) => Promise<ApiResponse<unknown>>;
|
|
221
|
+
post: (path: string, body: unknown) => Promise<ApiResponse<unknown>>;
|
|
222
|
+
readFile: (path: string) => string;
|
|
223
|
+
writeFile: (path: string, text: string) => void;
|
|
224
|
+
poll: (opts: PollOptions) => Promise<PollResult>;
|
|
225
|
+
}
|
|
226
|
+
export interface FlowResult {
|
|
227
|
+
code: number;
|
|
228
|
+
lines: string[];
|
|
229
|
+
}
|
|
230
|
+
interface RunFlowOptions {
|
|
231
|
+
inputs: Record<string, string>;
|
|
232
|
+
wait: boolean;
|
|
233
|
+
json: boolean;
|
|
234
|
+
onProgressLine?: (line: string) => void;
|
|
235
|
+
}
|
|
236
|
+
export declare function parseInputFlags(args: string[], readFile?: (path: string) => string): Record<string, string>;
|
|
237
|
+
export declare function formatWorkflowList(workflows: WorkflowListItem[]): string;
|
|
238
|
+
export declare function formatRecentRuns(runs: WorkflowRunProjection[]): string;
|
|
239
|
+
export declare function formatImportSummary(result: WorkflowImportResult, mode?: {
|
|
240
|
+
dryRun?: boolean;
|
|
241
|
+
update?: boolean;
|
|
242
|
+
}): string;
|
|
243
|
+
export declare function formatWorkflowRun(run: WorkflowRun): string;
|
|
244
|
+
export declare function formatDescribe(res: WorkflowDescribeResponse): string;
|
|
245
|
+
export declare function formatBotsList(catalog: WorkflowCatalog, category?: string): string;
|
|
246
|
+
export declare function formatBotDetail(bot: CatalogBot): string;
|
|
247
|
+
export declare function resolveWorkflowId(ref: string, deps: WorkflowRunDeps): Promise<string>;
|
|
248
|
+
export declare function listFlow(json: boolean, deps: WorkflowRunDeps): Promise<FlowResult>;
|
|
249
|
+
export declare function describeFlow(workflowRef: string, opts: {
|
|
250
|
+
json: boolean;
|
|
251
|
+
}, deps: WorkflowRunDeps): Promise<FlowResult>;
|
|
252
|
+
export declare function botsFlow(opts: {
|
|
253
|
+
category?: string;
|
|
254
|
+
slug?: string;
|
|
255
|
+
json: boolean;
|
|
256
|
+
}, deps: WorkflowRunDeps): Promise<FlowResult>;
|
|
257
|
+
export declare function runFlow(workflowRef: string, opts: RunFlowOptions, deps: WorkflowRunDeps): Promise<FlowResult>;
|
|
258
|
+
export declare function statusFlow(opts: {
|
|
259
|
+
id?: string;
|
|
260
|
+
json: boolean;
|
|
261
|
+
}, deps: WorkflowRunDeps): Promise<FlowResult>;
|
|
262
|
+
export declare function exportFlow(workflowRef: string, opts: {
|
|
263
|
+
out?: string;
|
|
264
|
+
}, deps: WorkflowRunDeps): Promise<FlowResult>;
|
|
265
|
+
export declare function importFlow(file: string, opts: {
|
|
266
|
+
dryRun: boolean;
|
|
267
|
+
json: boolean;
|
|
268
|
+
update?: string;
|
|
269
|
+
}, deps: WorkflowRunDeps): Promise<FlowResult>;
|
|
270
|
+
export declare function run(flags: Record<string, string | boolean>): Promise<void>;
|
|
271
|
+
export {};
|