@boardwalk-labs/cli 0.1.10 → 0.1.11

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/dist/client.d.ts CHANGED
@@ -31,7 +31,7 @@ export interface RunSummary {
31
31
  export interface RunListItem {
32
32
  id: string;
33
33
  workflowId: string;
34
- workflowName: string | null;
34
+ workflowSlug: string | null;
35
35
  status: string;
36
36
  triggerKind: string | null;
37
37
  createdAt: number;
package/dist/client.js CHANGED
@@ -227,7 +227,7 @@ export class BoardwalkClient {
227
227
  cachedReadTokens: numOr(cache.totalCachedRead, 0),
228
228
  },
229
229
  byModel: usageLines(u.byModel, "model"),
230
- byWorkflow: usageLines(u.byWorkflowUsage, "workflowName"),
230
+ byWorkflow: usageLines(u.byWorkflowUsage, "workflowSlug"),
231
231
  };
232
232
  }
233
233
  }
@@ -243,7 +243,7 @@ function parseRunRow(row) {
243
243
  return {
244
244
  id: row.id,
245
245
  workflowId: typeof row.workflowId === "string" ? row.workflowId : "",
246
- workflowName: typeof row.workflowName === "string" ? row.workflowName : null,
246
+ workflowSlug: typeof row.workflowSlug === "string" ? row.workflowSlug : null,
247
247
  status: row.status,
248
248
  triggerKind: typeof row.triggerKind === "string" ? row.triggerKind : null,
249
249
  createdAt: numOr(row.createdAt, 0),
@@ -279,7 +279,7 @@ function isWorkflowSummary(value) {
279
279
  if (!isRecord(value))
280
280
  return false;
281
281
  return (typeof value.id === "string" &&
282
- typeof value.name === "string" &&
282
+ typeof value.slug === "string" &&
283
283
  (value.currentVersionId === null || typeof value.currentVersionId === "string"));
284
284
  }
285
285
  function isVersion(value) {
@@ -9,4 +9,4 @@ export interface InitDeps {
9
9
  }
10
10
  export declare function runInit(opts: InitOptions, deps?: InitDeps): Promise<void>;
11
11
  /** Derive a manifest-legal workflow slug from the target directory's basename. */
12
- export declare function workflowNameFor(absDir: string): string;
12
+ export declare function workflowSlugFor(absDir: string): string;
@@ -66,7 +66,7 @@ export async function runInit(opts, deps = {}) {
66
66
  const builtin = BUILTIN_TEMPLATES[opts.template];
67
67
  if (builtin !== undefined) {
68
68
  const dir = resolve(opts.dir);
69
- const slug = workflowNameFor(dir);
69
+ const slug = workflowSlugFor(dir);
70
70
  const title = titleCaseSlug(slug);
71
71
  const files = Object.fromEntries(Object.entries(builtin).map(([rel, body]) => [
72
72
  rel,
@@ -167,7 +167,7 @@ function isRegistryTemplate(value) {
167
167
  value.files.length > 0);
168
168
  }
169
169
  /** Derive a manifest-legal workflow slug from the target directory's basename. */
170
- export function workflowNameFor(absDir) {
170
+ export function workflowSlugFor(absDir) {
171
171
  const base = basename(absDir)
172
172
  .toLowerCase()
173
173
  .replace(/[^a-z0-9-]+/g, "-")
@@ -83,7 +83,7 @@ export function formatRuns(org, runs, now) {
83
83
  ` ${col("RUN ID", ID_W)}${col("WORKFLOW", WF_W)}${col("STATUS", STATUS_W)}${col("TRIGGER", TRIGGER_W)}${col("AGE", AGE_W)}DURATION`,
84
84
  ];
85
85
  for (const r of runs) {
86
- const wf = r.workflowName ?? r.workflowId;
86
+ const wf = r.workflowSlug ?? r.workflowId;
87
87
  lines.push(` ${col(r.id, ID_W)}${col(wf, WF_W)}${col(r.status, STATUS_W)}${col(r.triggerKind ?? "—", TRIGGER_W)}${col(age(r.createdAt, now), AGE_W)}${duration(r.runtimeSeconds)}`);
88
88
  }
89
89
  return lines;
@@ -94,7 +94,7 @@ export function formatRunDetail(run, now) {
94
94
  const lines = [
95
95
  `Run ${run.id}`,
96
96
  "",
97
- field("Workflow", run.workflowName ?? run.workflowId),
97
+ field("Workflow", run.workflowSlug ?? run.workflowId),
98
98
  field("Status", status),
99
99
  field("Trigger", run.triggerKind ?? "—"),
100
100
  field("Created", `${isoUtc(run.createdAt)} (${age(run.createdAt, now)} ago)`),
@@ -10,12 +10,12 @@ export interface DevRunResult {
10
10
  export interface DevEngine {
11
11
  /** Subscribe to the run's stamped events (the envelope is already applied). */
12
12
  onEvent(listener: (event: RunEvent) => void): () => void;
13
- /** Deploy the bundled program; returns the derived workflow name. */
13
+ /** Deploy the bundled program; returns the derived workflow slug. */
14
14
  deploy(program: string): {
15
15
  slug: string;
16
16
  };
17
17
  /** Queue + dispatch a run; returns its id immediately. */
18
- start(workflowName: string, input: JsonValue | undefined): {
18
+ start(slug: string, input: JsonValue | undefined): {
19
19
  id: string;
20
20
  };
21
21
  /** Resolve when the run reaches a terminal status. */
@@ -25,8 +25,8 @@ export const createDevEngine = (opts) => {
25
25
  const workflow = engine.deployWorkflow({ program });
26
26
  return { slug: workflow.slug };
27
27
  },
28
- start: (workflowName, input) => {
29
- const run = engine.startRun(workflowName, input !== undefined ? { input } : {});
28
+ start: (slug, input) => {
29
+ const run = engine.startRun(slug, input !== undefined ? { input } : {});
30
30
  return { id: run.id };
31
31
  },
32
32
  wait: async (runId) => {
@@ -1 +1 @@
1
- {"version":3,"file":"engine.js","sourceRoot":"","sources":["../../src/dev/engine.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAE/B,uCAAuC;AACvC,EAAE;AACF,8FAA8F;AAC9F,8FAA8F;AAC9F,gGAAgG;AAChG,6FAA6F;AAC7F,oEAAoE;AACpE,EAAE;AACF,4FAA4F;AAC5F,6FAA6F;AAE7F,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAsChD,wEAAwE;AACxE,MAAM,CAAC,MAAM,eAAe,GAAqB,CAAC,IAAI,EAAE,EAAE;IACxD,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC;QACxB,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,QAAQ,EAAE,IAAI,CAAC,QAAQ;KACxB,CAAC,CAAC;IACH,OAAO;QACL,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,CACpB,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACrB,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC,CAAC;QACJ,M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G,EAAE;YACV,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boardwalk-labs/cli",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "The boardwalk CLI: author, validate, run, and deploy Boardwalk workflows.",
5
5
  "license": "MIT",
6
6
  "repository": {