@keystrokehq/cli 0.1.26 → 0.1.28
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/{dist-Re6HHSqz.mjs → dist-9VWONIo1.mjs} +2 -2
- package/dist/{dist-Re6HHSqz.mjs.map → dist-9VWONIo1.mjs.map} +1 -1
- package/dist/dist-BcxMnb_L.mjs +172656 -0
- package/dist/dist-BcxMnb_L.mjs.map +1 -0
- package/dist/{dist-CUEVu120.mjs → dist-C0He9OW1.mjs} +253 -24
- package/dist/dist-C0He9OW1.mjs.map +1 -0
- package/dist/{dist-BOhrc_Nv.mjs → dist-COhdZicI.mjs} +553 -196
- package/dist/dist-COhdZicI.mjs.map +1 -0
- package/dist/dist-D0hzlFrz.mjs +3 -0
- package/dist/index.mjs +128 -13
- package/dist/index.mjs.map +1 -1
- package/dist/{maybe-auto-update-BDvSKDZp.mjs → maybe-auto-update--WoIaE-P.mjs} +2 -2
- package/dist/{maybe-auto-update-BDvSKDZp.mjs.map → maybe-auto-update--WoIaE-P.mjs.map} +1 -1
- package/dist/skills-bundle/_AGENTS.mcp.md +1 -1
- package/dist/skills-bundle/_AGENTS.md +215 -114
- package/dist/templates/hello-world/src/actions/greet.ts +1 -0
- package/dist/templates/hello-world/src/agents/hello.ts +2 -0
- package/dist/templates/hello-world/src/workflows/greeting.ts +1 -0
- package/dist/{version-pY9N8XlL.mjs → version-DtFg32hj.mjs} +2 -2
- package/dist/{version-pY9N8XlL.mjs.map → version-DtFg32hj.mjs.map} +1 -1
- package/package.json +3 -3
- package/dist/dist-BOhrc_Nv.mjs.map +0 -1
- package/dist/dist-C1QOfWMM.mjs +0 -20711
- package/dist/dist-C1QOfWMM.mjs.map +0 -1
- package/dist/dist-CUEVu120.mjs.map +0 -1
- package/dist/dist-DsdMtFME.mjs +0 -3
|
@@ -2446,6 +2446,21 @@ const $ZodFunction = /* @__PURE__ */ $constructor("$ZodFunction", (inst, def) =>
|
|
|
2446
2446
|
};
|
|
2447
2447
|
return inst;
|
|
2448
2448
|
});
|
|
2449
|
+
const $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
|
|
2450
|
+
$ZodType.init(inst, def);
|
|
2451
|
+
defineLazy(inst._zod, "innerType", () => {
|
|
2452
|
+
const d = def;
|
|
2453
|
+
if (!d._cachedInner) d._cachedInner = def.getter();
|
|
2454
|
+
return d._cachedInner;
|
|
2455
|
+
});
|
|
2456
|
+
defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
|
|
2457
|
+
defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
|
|
2458
|
+
defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
|
|
2459
|
+
defineLazy(inst._zod, "optout", () => inst._zod.innerType?._zod?.optout ?? void 0);
|
|
2460
|
+
inst._zod.parse = (payload, ctx) => {
|
|
2461
|
+
return inst._zod.innerType._zod.run(payload, ctx);
|
|
2462
|
+
};
|
|
2463
|
+
});
|
|
2449
2464
|
const $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
|
|
2450
2465
|
$ZodCheck.init(inst, def);
|
|
2451
2466
|
$ZodType.init(inst, def);
|
|
@@ -4709,6 +4724,18 @@ function readonly(innerType) {
|
|
|
4709
4724
|
innerType
|
|
4710
4725
|
});
|
|
4711
4726
|
}
|
|
4727
|
+
const ZodLazy = /* @__PURE__ */ $constructor("ZodLazy", (inst, def) => {
|
|
4728
|
+
$ZodLazy.init(inst, def);
|
|
4729
|
+
ZodType.init(inst, def);
|
|
4730
|
+
inst._zod.processJSONSchema = (ctx, json, params) => lazyProcessor(inst, ctx, json, params);
|
|
4731
|
+
inst.unwrap = () => inst._zod.def.getter();
|
|
4732
|
+
});
|
|
4733
|
+
function lazy(getter) {
|
|
4734
|
+
return new ZodLazy({
|
|
4735
|
+
type: "lazy",
|
|
4736
|
+
getter
|
|
4737
|
+
});
|
|
4738
|
+
}
|
|
4712
4739
|
const ZodFunction = /* @__PURE__ */ $constructor("ZodFunction", (inst, def) => {
|
|
4713
4740
|
$ZodFunction.init(inst, def);
|
|
4714
4741
|
ZodType.init(inst, def);
|
|
@@ -5485,10 +5512,244 @@ function resolvePublicPlatformOrigin(env = process.env) {
|
|
|
5485
5512
|
}
|
|
5486
5513
|
/** On-disk path under the project root (packed in deploy artifacts when present). */
|
|
5487
5514
|
const ROUTE_MANIFEST_REL_PATH = "dist/.keystroke/route-manifest.json";
|
|
5515
|
+
/** How a credential instance is stored (`credential_instances.auth_kind`). */
|
|
5516
|
+
const CredentialAuthKindSchema = _enum([
|
|
5517
|
+
"api_key",
|
|
5518
|
+
"oauth_managed",
|
|
5519
|
+
"keystroke"
|
|
5520
|
+
]);
|
|
5521
|
+
/**
|
|
5522
|
+
* Where a credential instance is stored (`credential_instances.scope_type`), and the only thing an
|
|
5523
|
+
* action/tool can pin via `.scope(...)`. There is no resolution chain: when no scope is pinned, the
|
|
5524
|
+
* resolver tries the project default, then the org default, then throws.
|
|
5525
|
+
*/
|
|
5526
|
+
const CredentialScopeTypeSchema = _enum([
|
|
5527
|
+
"organization",
|
|
5528
|
+
"project",
|
|
5529
|
+
"user"
|
|
5530
|
+
]);
|
|
5531
|
+
CredentialAuthKindSchema.options;
|
|
5532
|
+
CredentialScopeTypeSchema.options;
|
|
5533
|
+
/** Non-empty human-readable label or description (trimmed). */
|
|
5534
|
+
const requiredDisplayTextSchema = string().trim().min(1);
|
|
5535
|
+
/**
|
|
5536
|
+
* Structural workflow-canvas graph contract.
|
|
5537
|
+
*
|
|
5538
|
+
* This is the deterministic skeleton the deploy-time AST producer emits for a
|
|
5539
|
+
* workflow (nodes + edges), plus the manifest-derived trigger-source nodes. It
|
|
5540
|
+
* is the single source of truth shared by:
|
|
5541
|
+
* - the AST producer (emits it at deploy, stored with the manifest),
|
|
5542
|
+
* - the platform route that serves the canvas, and
|
|
5543
|
+
* - the SDK / web client that renders it (React Flow).
|
|
5544
|
+
*
|
|
5545
|
+
* Only the structural skeleton lives here. The LLM enrichment + run-overlay
|
|
5546
|
+
* envelope types live in `workflow-canvas-envelope.ts`; the SDK re-exports them.
|
|
5547
|
+
* See WORKFLOW.md (§4 grammar, §8 node ids, §9 caching).
|
|
5548
|
+
*/
|
|
5549
|
+
/**
|
|
5550
|
+
* Canvas node taxonomy — the single discriminator for every canvas node. The
|
|
5551
|
+
* client derives the React Flow component, icon, and per-node treatment from it
|
|
5552
|
+
* (no parallel `type` / `data.kind` fields), and the producer + fixtures emit it
|
|
5553
|
+
* directly, so the structural contract can never silently diverge across the
|
|
5554
|
+
* deploy → render boundary.
|
|
5555
|
+
* - Boundaries: `entry` (Start, owns input) · `exit` (Output, owns output) ·
|
|
5556
|
+
* `error` (a terminal `throw` — an error output that ends the run on a branch)
|
|
5557
|
+
* - Callable: `step` (action / agent / llm / hook / child-workflow invocation) —
|
|
5558
|
+
* the invocation flavor lives in {@link WorkflowCanvasCallKind}
|
|
5559
|
+
* - Structural control flow: `code-block` · `decision` · `merge` · `loop` ·
|
|
5560
|
+
* `parallel` (group containers) · `loop-start` (the group body's entry marker,
|
|
5561
|
+
* shared by loop + parallel)
|
|
5562
|
+
* - Upstream of entry: `trigger-source` (one per manifest trigger attachment)
|
|
5563
|
+
*
|
|
5564
|
+
* `Promise.all([...])` is modeled as a `parallel` group container: the branches
|
|
5565
|
+
* are stacked inside and the container itself is the single prong leaving the
|
|
5566
|
+
* wrapper (there is no separate fork/join pair).
|
|
5567
|
+
*
|
|
5568
|
+
* `exit` and `error` are both terminals: a `return` flows to the shared `exit`
|
|
5569
|
+
* (the workflow output), while a `throw` gets its own `error` terminal off the
|
|
5570
|
+
* branch so guard clauses (`if (bad) throw …`) read as a visible dead-end.
|
|
5571
|
+
*/
|
|
5572
|
+
const WorkflowCanvasNodeTypeSchema = _enum([
|
|
5573
|
+
"entry",
|
|
5574
|
+
"exit",
|
|
5575
|
+
"error",
|
|
5576
|
+
"step",
|
|
5577
|
+
"code-block",
|
|
5578
|
+
"decision",
|
|
5579
|
+
"merge",
|
|
5580
|
+
"loop",
|
|
5581
|
+
"parallel",
|
|
5582
|
+
"loop-start",
|
|
5583
|
+
"trigger-source"
|
|
5584
|
+
]);
|
|
5585
|
+
_enum([
|
|
5586
|
+
"workflow-step",
|
|
5587
|
+
"agent",
|
|
5588
|
+
"llm",
|
|
5589
|
+
"wait",
|
|
5590
|
+
"hook",
|
|
5591
|
+
"tool",
|
|
5592
|
+
"child-workflow"
|
|
5593
|
+
]);
|
|
5594
|
+
/** A labeled branch output on a decision-style node. */
|
|
5595
|
+
const WorkflowCanvasNodeOutputSchema = object({
|
|
5596
|
+
id: string(),
|
|
5597
|
+
label: string()
|
|
5598
|
+
});
|
|
5599
|
+
/**
|
|
5600
|
+
* A step input's configured value at its call site, captured deterministically
|
|
5601
|
+
* by the producer from the call's argument object. The platform join turns this
|
|
5602
|
+
* into the inspector's {@link WorkflowNodeInputBinding} (filling display labels).
|
|
5603
|
+
*/
|
|
5604
|
+
const WorkflowCanvasRawBindingSchema = object({
|
|
5605
|
+
tokens: array(discriminatedUnion("kind", [
|
|
5606
|
+
object({
|
|
5607
|
+
kind: literal("text"),
|
|
5608
|
+
text: string()
|
|
5609
|
+
}),
|
|
5610
|
+
object({
|
|
5611
|
+
kind: literal("reference"),
|
|
5612
|
+
/** Upstream node id this value flows from; absent only for unresolved refs. */
|
|
5613
|
+
sourceNodeId: string().optional(),
|
|
5614
|
+
/** Output field of the source (dotted path); omitted = the whole output. */
|
|
5615
|
+
field: string().optional()
|
|
5616
|
+
}),
|
|
5617
|
+
object({
|
|
5618
|
+
kind: literal("variable"),
|
|
5619
|
+
text: string()
|
|
5620
|
+
}),
|
|
5621
|
+
object({
|
|
5622
|
+
kind: literal("call"),
|
|
5623
|
+
name: string()
|
|
5624
|
+
})
|
|
5625
|
+
])),
|
|
5626
|
+
/** Render as a tall multi-line box (object/array/multiline template values). */
|
|
5627
|
+
multiline: boolean().optional()
|
|
5628
|
+
});
|
|
5629
|
+
/**
|
|
5630
|
+
* Statically-captured `promptLlm` options for an `llm` step node. Literal-only:
|
|
5631
|
+
* dynamic/expression values (a computed model, a `system` built by a function) are
|
|
5632
|
+
* not captured; `system`/`outputSchema` record presence so the inspector can note
|
|
5633
|
+
* "a system prompt is configured" / "structured output" without their values.
|
|
5634
|
+
*/
|
|
5635
|
+
const WorkflowCanvasLlmOptionsSchema = object({
|
|
5636
|
+
model: string().optional(),
|
|
5637
|
+
maxTokens: number$1().optional(),
|
|
5638
|
+
temperature: number$1().optional(),
|
|
5639
|
+
thinkingLevel: string().optional(),
|
|
5640
|
+
hasSystemPrompt: boolean().optional(),
|
|
5641
|
+
hasOutputSchema: boolean().optional()
|
|
5642
|
+
});
|
|
5643
|
+
const WorkflowCanvasNodeDataSchema = object({
|
|
5644
|
+
label: string(),
|
|
5645
|
+
/** Set on group nodes (loop / parallel section containers). */
|
|
5646
|
+
groupKind: _enum([
|
|
5647
|
+
"loop",
|
|
5648
|
+
"parallel",
|
|
5649
|
+
"conditional"
|
|
5650
|
+
]).optional(),
|
|
5651
|
+
description: string().optional(),
|
|
5652
|
+
/** {@link WorkflowCanvasCallKind} or a looser raw call-site label. */
|
|
5653
|
+
callKind: string().optional(),
|
|
5654
|
+
/**
|
|
5655
|
+
* App/integration slug for a `step` whose action/agent is imported directly
|
|
5656
|
+
* from a `@keystrokehq/<app>` package (e.g. "slack", "apollo"). Lets the client
|
|
5657
|
+
* badge the node with that app's logo; absent for custom (project-local)
|
|
5658
|
+
* actions, which fall back to the call-kind icon.
|
|
5659
|
+
*/
|
|
5660
|
+
appSlug: string().optional(),
|
|
5661
|
+
/** Cron/webhook/poll discriminator on trigger-source nodes. */
|
|
5662
|
+
triggerType: string().optional(),
|
|
5663
|
+
/** Branch outputs (decision nodes). */
|
|
5664
|
+
outputs: array(WorkflowCanvasNodeOutputSchema).optional(),
|
|
5665
|
+
/**
|
|
5666
|
+
* Action/agent/workflow slug resolved at deploy time (via import → definition).
|
|
5667
|
+
* Optional when the deploy build cannot resolve source (dist-only artifacts).
|
|
5668
|
+
*/
|
|
5669
|
+
slug: string().optional(),
|
|
5670
|
+
/**
|
|
5671
|
+
* Durable call-site ids nested inside an off-grammar `code-block` (same-file only).
|
|
5672
|
+
* Used by the run overlay to light the block when any contained step executes.
|
|
5673
|
+
*/
|
|
5674
|
+
containedCallSiteIds: array(string()).optional(),
|
|
5675
|
+
/**
|
|
5676
|
+
* Per-input call-site value bindings for `step` nodes, keyed by input field name.
|
|
5677
|
+
* Deterministically captured from the call's argument object; reference tokens point
|
|
5678
|
+
* at the upstream node that produced the value. The platform join fills display labels.
|
|
5679
|
+
*/
|
|
5680
|
+
inputBindings: record(string(), WorkflowCanvasRawBindingSchema).optional(),
|
|
5681
|
+
/**
|
|
5682
|
+
* Static `promptLlm(prompt, options)` configuration captured at the call site for
|
|
5683
|
+
* `llm` step nodes. Only literal values are captured (model/maxTokens/temperature/
|
|
5684
|
+
* thinkingLevel); `system`/`outputSchema` are usually expressions, so only their
|
|
5685
|
+
* presence is recorded. Absent when no options are statically resolvable.
|
|
5686
|
+
*/
|
|
5687
|
+
llmOptions: WorkflowCanvasLlmOptionsSchema.optional()
|
|
5688
|
+
});
|
|
5689
|
+
/**
|
|
5690
|
+
* A single structural node. This is the deploy artifact's shape: identity
|
|
5691
|
+
* (`id`), the canonical discriminator (`nodeType`), display `data`, and group
|
|
5692
|
+
* nesting (`parentId`). All layout/rendering — React Flow component key,
|
|
5693
|
+
* positions, sizes, `extent`, group box dimensions — is derived entirely
|
|
5694
|
+
* client-side from this structure, so it never leaks into the wire contract.
|
|
5695
|
+
*/
|
|
5696
|
+
const WorkflowCanvasGraphNodeSchema = object({
|
|
5697
|
+
id: string(),
|
|
5698
|
+
nodeType: WorkflowCanvasNodeTypeSchema,
|
|
5699
|
+
data: WorkflowCanvasNodeDataSchema,
|
|
5700
|
+
/** Set on children nested inside a group (loop / parallel) container. */
|
|
5701
|
+
parentId: string().optional()
|
|
5702
|
+
});
|
|
5703
|
+
const WorkflowCanvasEdgeSchema = object({
|
|
5704
|
+
id: string(),
|
|
5705
|
+
source: string(),
|
|
5706
|
+
target: string(),
|
|
5707
|
+
type: string().optional(),
|
|
5708
|
+
label: string().optional(),
|
|
5709
|
+
sourceHandle: string().optional(),
|
|
5710
|
+
targetHandle: string().optional(),
|
|
5711
|
+
data: object({ branchKind: _enum([
|
|
5712
|
+
"then",
|
|
5713
|
+
"else",
|
|
5714
|
+
"parallel-branch",
|
|
5715
|
+
"error"
|
|
5716
|
+
]).optional() }).optional()
|
|
5717
|
+
});
|
|
5718
|
+
/** A statically-evaluable top-level `const` value (literal scalars only). */
|
|
5719
|
+
const WorkflowCanvasConstantValueSchema = union([
|
|
5720
|
+
string(),
|
|
5721
|
+
number$1(),
|
|
5722
|
+
boolean()
|
|
5723
|
+
]);
|
|
5724
|
+
/**
|
|
5725
|
+
* Top-level `const NAME = <literal>` declarations in the workflow source, captured
|
|
5726
|
+
* at deploy. Lets the platform resolve `variable` value tokens (e.g. a `model` set
|
|
5727
|
+
* to a named const) to their concrete value for display. Scalars only — computed,
|
|
5728
|
+
* function-local, or non-literal consts are intentionally omitted.
|
|
5729
|
+
*/
|
|
5730
|
+
const WorkflowCanvasConstantsSchema = record(string(), WorkflowCanvasConstantValueSchema);
|
|
5731
|
+
const WorkflowCanvasGraphSchema = object({
|
|
5732
|
+
nodes: array(WorkflowCanvasGraphNodeSchema),
|
|
5733
|
+
edges: array(WorkflowCanvasEdgeSchema),
|
|
5734
|
+
/** Top-level literal constants from the workflow source (for value-token resolution). */
|
|
5735
|
+
constants: WorkflowCanvasConstantsSchema.optional()
|
|
5736
|
+
});
|
|
5737
|
+
/**
|
|
5738
|
+
* Deploy-time summary of one credential a step requires, derived from the
|
|
5739
|
+
* action/agent-tool definition's `.credentials`. The workflow-canvas credential
|
|
5740
|
+
* overlay joins a step node's `slug` to these to resolve the bound instance.
|
|
5741
|
+
* `key` doubles as the app slug (matches `credential_instances.app_slug`).
|
|
5742
|
+
*/
|
|
5743
|
+
const CredentialRequirementSummarySchema = object({
|
|
5744
|
+
key: string(),
|
|
5745
|
+
kind: CredentialAuthKindSchema,
|
|
5746
|
+
/** Scope pinned via `.scope(...)`; absent means project-default → org-default. */
|
|
5747
|
+
scope: CredentialScopeTypeSchema.optional()
|
|
5748
|
+
});
|
|
5488
5749
|
const StoredRouteManifestSkillSchema = object({
|
|
5489
5750
|
slug: string(),
|
|
5490
|
-
name:
|
|
5491
|
-
description:
|
|
5751
|
+
name: requiredDisplayTextSchema,
|
|
5752
|
+
description: requiredDisplayTextSchema,
|
|
5492
5753
|
moduleFile: string()
|
|
5493
5754
|
});
|
|
5494
5755
|
const attachmentSchemasSchema = record(string(), object({
|
|
@@ -5496,8 +5757,8 @@ const attachmentSchemasSchema = record(string(), object({
|
|
|
5496
5757
|
filterSchema: record(string(), unknown()).optional()
|
|
5497
5758
|
}));
|
|
5498
5759
|
const attachmentMetaSchema = record(string(), object({
|
|
5499
|
-
name:
|
|
5500
|
-
description:
|
|
5760
|
+
name: requiredDisplayTextSchema,
|
|
5761
|
+
description: requiredDisplayTextSchema
|
|
5501
5762
|
}));
|
|
5502
5763
|
const storedRouteManifestEntryV2Schema = discriminatedUnion("kind", [
|
|
5503
5764
|
object({ kind: literal("health") }),
|
|
@@ -5505,23 +5766,43 @@ const storedRouteManifestEntryV2Schema = discriminatedUnion("kind", [
|
|
|
5505
5766
|
kind: literal("agent"),
|
|
5506
5767
|
slug: string(),
|
|
5507
5768
|
moduleFile: string(),
|
|
5508
|
-
name:
|
|
5509
|
-
description:
|
|
5769
|
+
name: requiredDisplayTextSchema,
|
|
5770
|
+
description: requiredDisplayTextSchema,
|
|
5510
5771
|
model: string(),
|
|
5511
5772
|
systemPrompt: string(),
|
|
5512
5773
|
toolCount: number$1().int().nonnegative(),
|
|
5513
5774
|
credentialCount: number$1().int().nonnegative(),
|
|
5514
5775
|
appSlugs: array(string()).default([]),
|
|
5515
|
-
toolSlugs: array(string()).default([])
|
|
5776
|
+
toolSlugs: array(string()).default([]),
|
|
5777
|
+
/** Credential requirements per tool slug (the agent's credential consumer key). */
|
|
5778
|
+
toolRequirements: record(string(), array(CredentialRequirementSummarySchema)).optional()
|
|
5779
|
+
}),
|
|
5780
|
+
object({
|
|
5781
|
+
kind: literal("action"),
|
|
5782
|
+
slug: string(),
|
|
5783
|
+
name: requiredDisplayTextSchema,
|
|
5784
|
+
description: requiredDisplayTextSchema,
|
|
5785
|
+
moduleFile: string(),
|
|
5786
|
+
/** App slug for actions imported from an integration package (`@keystrokehq/<app>/actions`). */
|
|
5787
|
+
appSlug: string().optional(),
|
|
5788
|
+
inputSchema: record(string(), unknown()),
|
|
5789
|
+
outputSchema: record(string(), unknown()),
|
|
5790
|
+
/** Credentials this action requires (for the canvas credential overlay). */
|
|
5791
|
+
requirements: array(CredentialRequirementSummarySchema).optional()
|
|
5516
5792
|
}),
|
|
5517
5793
|
object({
|
|
5518
5794
|
kind: literal("workflow"),
|
|
5519
5795
|
slug: string(),
|
|
5520
|
-
name:
|
|
5521
|
-
description:
|
|
5796
|
+
name: requiredDisplayTextSchema,
|
|
5797
|
+
description: requiredDisplayTextSchema,
|
|
5522
5798
|
subscribable: boolean(),
|
|
5523
5799
|
moduleFile: string(),
|
|
5524
|
-
requestSchema: record(string(), unknown())
|
|
5800
|
+
requestSchema: record(string(), unknown()),
|
|
5801
|
+
responseSchema: record(string(), unknown()).optional(),
|
|
5802
|
+
/** Deterministic AST control-flow skeleton (deploy-time producer). */
|
|
5803
|
+
flowGraph: WorkflowCanvasGraphSchema.optional(),
|
|
5804
|
+
/** sha256 of the workflow source the `flowGraph` was produced from (staleness). */
|
|
5805
|
+
flowGraphSourceHash: string().optional()
|
|
5525
5806
|
}),
|
|
5526
5807
|
object({
|
|
5527
5808
|
kind: literal("trigger-webhook"),
|
|
@@ -5540,8 +5821,8 @@ const storedRouteManifestEntryV2Schema = discriminatedUnion("kind", [
|
|
|
5540
5821
|
moduleFile: string(),
|
|
5541
5822
|
sourceHash: string().optional(),
|
|
5542
5823
|
schedule: string(),
|
|
5543
|
-
name:
|
|
5544
|
-
description:
|
|
5824
|
+
name: requiredDisplayTextSchema,
|
|
5825
|
+
description: requiredDisplayTextSchema
|
|
5545
5826
|
}),
|
|
5546
5827
|
object({
|
|
5547
5828
|
kind: literal("trigger-poll-group"),
|
|
@@ -5557,8 +5838,8 @@ const storedRouteManifestEntryV2Schema = discriminatedUnion("kind", [
|
|
|
5557
5838
|
moduleFile: string(),
|
|
5558
5839
|
sourceHash: string().optional(),
|
|
5559
5840
|
schedule: string(),
|
|
5560
|
-
name:
|
|
5561
|
-
description:
|
|
5841
|
+
name: requiredDisplayTextSchema,
|
|
5842
|
+
description: requiredDisplayTextSchema
|
|
5562
5843
|
})
|
|
5563
5844
|
]);
|
|
5564
5845
|
const storedRouteManifestV2Schema = object({
|
|
@@ -5567,165 +5848,14 @@ const storedRouteManifestV2Schema = object({
|
|
|
5567
5848
|
skills: array(StoredRouteManifestSkillSchema).default([]),
|
|
5568
5849
|
integrations: array(string()).optional()
|
|
5569
5850
|
});
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
"trigger-run-detail"
|
|
5577
|
-
]);
|
|
5578
|
-
function webhookEndpointFromPath(path) {
|
|
5579
|
-
return path.replace(/^\/triggers\//, "").replace(/^\/+|\/+$/g, "");
|
|
5580
|
-
}
|
|
5581
|
-
function legacyAgentAppSlugs(entry) {
|
|
5582
|
-
if (Array.isArray(entry.appSlugs)) return entry.appSlugs;
|
|
5583
|
-
if (Array.isArray(entry.credentialSlugs)) return entry.credentialSlugs;
|
|
5584
|
-
if (Array.isArray(entry.credentialKeys)) return entry.credentialKeys;
|
|
5585
|
-
return [];
|
|
5586
|
-
}
|
|
5587
|
-
/** TODO remove after all artifacts rebuilt — upcasts legacy v1 manifests to v2. */
|
|
5588
|
-
function normalizeEntryToV2(entry) {
|
|
5589
|
-
const kind = entry.kind;
|
|
5590
|
-
if (typeof kind !== "string") return null;
|
|
5591
|
-
if (DERIVED_ENTRY_KINDS.has(kind) || kind === "plugin") return null;
|
|
5592
|
-
if (kind === "health") return { kind: "health" };
|
|
5593
|
-
if (kind === "agent") {
|
|
5594
|
-
const slug = typeof entry.slug === "string" ? entry.slug : typeof entry.agentSlug === "string" ? entry.agentSlug : void 0;
|
|
5595
|
-
if (!slug || typeof entry.moduleFile !== "string") return null;
|
|
5596
|
-
return {
|
|
5597
|
-
kind: "agent",
|
|
5598
|
-
slug,
|
|
5599
|
-
moduleFile: entry.moduleFile,
|
|
5600
|
-
...typeof entry.name === "string" ? { name: entry.name } : {},
|
|
5601
|
-
...typeof entry.description === "string" ? { description: entry.description } : {},
|
|
5602
|
-
model: typeof entry.model === "string" ? entry.model : "",
|
|
5603
|
-
systemPrompt: typeof entry.systemPrompt === "string" ? entry.systemPrompt : "",
|
|
5604
|
-
toolCount: typeof entry.toolCount === "number" ? entry.toolCount : 0,
|
|
5605
|
-
credentialCount: typeof entry.credentialCount === "number" ? entry.credentialCount : 0,
|
|
5606
|
-
appSlugs: legacyAgentAppSlugs(entry),
|
|
5607
|
-
toolSlugs: Array.isArray(entry.toolSlugs) ? entry.toolSlugs : []
|
|
5608
|
-
};
|
|
5609
|
-
}
|
|
5610
|
-
if (kind === "workflow") {
|
|
5611
|
-
const slug = typeof entry.slug === "string" ? entry.slug : typeof entry.workflowSlug === "string" ? entry.workflowSlug : void 0;
|
|
5612
|
-
if (!slug || typeof entry.moduleFile !== "string") return null;
|
|
5613
|
-
const name = typeof entry.name === "string" ? entry.name : typeof entry.workflowName === "string" ? entry.workflowName : void 0;
|
|
5614
|
-
return {
|
|
5615
|
-
kind: "workflow",
|
|
5616
|
-
slug,
|
|
5617
|
-
moduleFile: entry.moduleFile,
|
|
5618
|
-
...name ? { name } : {},
|
|
5619
|
-
...typeof entry.description === "string" ? { description: entry.description } : {},
|
|
5620
|
-
subscribable: entry.subscribable === true,
|
|
5621
|
-
requestSchema: entry.requestSchema && typeof entry.requestSchema === "object" ? entry.requestSchema : {}
|
|
5622
|
-
};
|
|
5623
|
-
}
|
|
5624
|
-
if (kind === "trigger-webhook") {
|
|
5625
|
-
if (typeof entry.moduleFile !== "string" || !Array.isArray(entry.attachmentIds)) return null;
|
|
5626
|
-
const endpoint = typeof entry.endpoint === "string" ? entry.endpoint : typeof entry.path === "string" ? webhookEndpointFromPath(entry.path) : void 0;
|
|
5627
|
-
if (!endpoint) return null;
|
|
5628
|
-
return {
|
|
5629
|
-
kind: "trigger-webhook",
|
|
5630
|
-
endpoint,
|
|
5631
|
-
attachmentIds: entry.attachmentIds,
|
|
5632
|
-
moduleFile: entry.moduleFile,
|
|
5633
|
-
...typeof entry.sourceHash === "string" ? { sourceHash: entry.sourceHash } : {},
|
|
5634
|
-
attachmentSchemas: entry.attachmentSchemas && typeof entry.attachmentSchemas === "object" ? entry.attachmentSchemas : {},
|
|
5635
|
-
...entry.attachmentMeta && typeof entry.attachmentMeta === "object" ? { attachmentMeta: entry.attachmentMeta } : {}
|
|
5636
|
-
};
|
|
5637
|
-
}
|
|
5638
|
-
if (kind === "trigger-poll") {
|
|
5639
|
-
if (typeof entry.attachmentId !== "string" || typeof entry.moduleFile !== "string" || typeof entry.schedule !== "string") return null;
|
|
5640
|
-
return {
|
|
5641
|
-
kind: "trigger-poll",
|
|
5642
|
-
attachmentId: entry.attachmentId,
|
|
5643
|
-
attachmentIds: Array.isArray(entry.attachmentIds) ? entry.attachmentIds : [entry.attachmentId],
|
|
5644
|
-
moduleFile: entry.moduleFile,
|
|
5645
|
-
...typeof entry.sourceHash === "string" ? { sourceHash: entry.sourceHash } : {},
|
|
5646
|
-
schedule: entry.schedule,
|
|
5647
|
-
...typeof entry.name === "string" ? { name: entry.name } : {},
|
|
5648
|
-
...typeof entry.description === "string" ? { description: entry.description } : {}
|
|
5649
|
-
};
|
|
5650
|
-
}
|
|
5651
|
-
if (kind === "trigger-poll-group") {
|
|
5652
|
-
if (typeof entry.pollId !== "string" || typeof entry.moduleFile !== "string" || typeof entry.schedule !== "string" || !Array.isArray(entry.attachmentIds)) return null;
|
|
5653
|
-
return {
|
|
5654
|
-
kind: "trigger-poll-group",
|
|
5655
|
-
pollId: entry.pollId,
|
|
5656
|
-
attachmentIds: entry.attachmentIds,
|
|
5657
|
-
moduleFile: entry.moduleFile,
|
|
5658
|
-
schedule: entry.schedule
|
|
5659
|
-
};
|
|
5660
|
-
}
|
|
5661
|
-
if (kind === "cron-schedule") {
|
|
5662
|
-
if (typeof entry.attachmentId !== "string" || typeof entry.moduleFile !== "string" || typeof entry.schedule !== "string") return null;
|
|
5663
|
-
return {
|
|
5664
|
-
kind: "cron-schedule",
|
|
5665
|
-
attachmentId: entry.attachmentId,
|
|
5666
|
-
attachmentIds: Array.isArray(entry.attachmentIds) ? entry.attachmentIds : [entry.attachmentId],
|
|
5667
|
-
moduleFile: entry.moduleFile,
|
|
5668
|
-
...typeof entry.sourceHash === "string" ? { sourceHash: entry.sourceHash } : {},
|
|
5669
|
-
schedule: entry.schedule,
|
|
5670
|
-
...typeof entry.name === "string" ? { name: entry.name } : {},
|
|
5671
|
-
...typeof entry.description === "string" ? { description: entry.description } : {}
|
|
5672
|
-
};
|
|
5673
|
-
}
|
|
5674
|
-
return null;
|
|
5675
|
-
}
|
|
5676
|
-
/** TODO remove after all artifacts rebuilt — upcasts legacy v1 manifests to v2. */
|
|
5677
|
-
function normalizeV2ManifestInput(value) {
|
|
5678
|
-
if (!value || typeof value !== "object") return value;
|
|
5679
|
-
const raw = value;
|
|
5680
|
-
if (raw.version !== 2 || !Array.isArray(raw.entries)) return value;
|
|
5681
|
-
return {
|
|
5682
|
-
...raw,
|
|
5683
|
-
entries: raw.entries.map((entry) => {
|
|
5684
|
-
if (!entry || typeof entry !== "object") return entry;
|
|
5685
|
-
const kind = entry.kind;
|
|
5686
|
-
if (kind === "trigger-poll" || kind === "cron-schedule" || kind === "trigger-webhook" || kind === "trigger-poll-group") {
|
|
5687
|
-
const trigger = entry;
|
|
5688
|
-
if (Array.isArray(trigger.attachmentIds)) return entry;
|
|
5689
|
-
return {
|
|
5690
|
-
...trigger,
|
|
5691
|
-
attachmentIds: typeof trigger.attachmentId === "string" ? [trigger.attachmentId] : []
|
|
5692
|
-
};
|
|
5693
|
-
}
|
|
5694
|
-
if (kind !== "agent") return entry;
|
|
5695
|
-
const agent = entry;
|
|
5696
|
-
if (Array.isArray(agent.appSlugs)) return entry;
|
|
5697
|
-
const appSlugs = legacyAgentAppSlugs(agent);
|
|
5698
|
-
if (appSlugs.length === 0) return entry;
|
|
5699
|
-
const { credentialKeys: _credentialKeys, credentialSlugs: _credentialSlugs, ...rest } = agent;
|
|
5700
|
-
return {
|
|
5701
|
-
...rest,
|
|
5702
|
-
appSlugs,
|
|
5703
|
-
toolSlugs: Array.isArray(agent.toolSlugs) ? agent.toolSlugs : []
|
|
5704
|
-
};
|
|
5705
|
-
})
|
|
5706
|
-
};
|
|
5707
|
-
}
|
|
5708
|
-
/** TODO remove after all artifacts rebuilt — upcasts legacy v1 manifests to v2. */
|
|
5709
|
-
function normalizeStoredRouteManifestToV2(value) {
|
|
5710
|
-
if (!value || typeof value !== "object") throw new Error("Invalid route manifest");
|
|
5711
|
-
const raw = value;
|
|
5712
|
-
if (raw.version === 2) return storedRouteManifestV2Schema.parse(normalizeV2ManifestInput(value));
|
|
5713
|
-
const entriesRaw = Array.isArray(raw.entries) ? raw.entries : [];
|
|
5714
|
-
const entries = [];
|
|
5715
|
-
for (const entry of entriesRaw) {
|
|
5716
|
-
if (!entry || typeof entry !== "object") continue;
|
|
5717
|
-
const normalized = normalizeEntryToV2(entry);
|
|
5718
|
-
if (normalized) entries.push(normalized);
|
|
5719
|
-
}
|
|
5720
|
-
return storedRouteManifestV2Schema.parse({
|
|
5721
|
-
version: 2,
|
|
5722
|
-
entries,
|
|
5723
|
-
skills: raw.skills ?? [],
|
|
5724
|
-
integrations: raw.integrations
|
|
5725
|
-
});
|
|
5726
|
-
}
|
|
5851
|
+
/**
|
|
5852
|
+
* Parse a stored route manifest. Only the strict v2 schema is supported: the
|
|
5853
|
+
* builder always emits v2 and every deploy regenerates the manifest, so there is
|
|
5854
|
+
* no legacy upcasting. (The pre-v2 `normalizeEntryToV2` path was removed once the
|
|
5855
|
+
* data tables were truncated and all artifacts redeployed.)
|
|
5856
|
+
*/
|
|
5727
5857
|
function parseStoredRouteManifest(value) {
|
|
5728
|
-
return
|
|
5858
|
+
return storedRouteManifestV2Schema.parse(value);
|
|
5729
5859
|
}
|
|
5730
5860
|
/** Messaging platforms that support agent gateway bindings. */
|
|
5731
5861
|
const ChannelPlatformKeySchema = _enum(["slack"]);
|
|
@@ -6264,24 +6394,6 @@ function isAcceptableInstallExit(manager, exitCode, output) {
|
|
|
6264
6394
|
if (manager === "pnpm" && output.includes("ERR_PNPM_IGNORED_BUILDS")) return true;
|
|
6265
6395
|
return false;
|
|
6266
6396
|
}
|
|
6267
|
-
/** How a credential instance is stored (`credential_instances.auth_kind`). */
|
|
6268
|
-
const CredentialAuthKindSchema = _enum([
|
|
6269
|
-
"api_key",
|
|
6270
|
-
"oauth_managed",
|
|
6271
|
-
"keystroke"
|
|
6272
|
-
]);
|
|
6273
|
-
/**
|
|
6274
|
-
* Where a credential instance is stored (`credential_instances.scope_type`), and the only thing an
|
|
6275
|
-
* action/tool can pin via `.scope(...)`. There is no resolution chain: when no scope is pinned, the
|
|
6276
|
-
* resolver tries the project default, then the org default, then throws.
|
|
6277
|
-
*/
|
|
6278
|
-
const CredentialScopeTypeSchema = _enum([
|
|
6279
|
-
"organization",
|
|
6280
|
-
"project",
|
|
6281
|
-
"user"
|
|
6282
|
-
]);
|
|
6283
|
-
CredentialAuthKindSchema.options;
|
|
6284
|
-
CredentialScopeTypeSchema.options;
|
|
6285
6397
|
/** Scope of a platform app credential (maps to `credential_instances.scope_type`). */
|
|
6286
6398
|
const AppCredentialScopeSchema = _enum([
|
|
6287
6399
|
"user",
|
|
@@ -7328,7 +7440,7 @@ const WorkspaceTriggerSummarySchema = object({
|
|
|
7328
7440
|
id: string(),
|
|
7329
7441
|
slug: string(),
|
|
7330
7442
|
name: string(),
|
|
7331
|
-
description: string().
|
|
7443
|
+
description: string().min(1),
|
|
7332
7444
|
type: TriggerTypeSchema,
|
|
7333
7445
|
status: TriggerStatusSchema,
|
|
7334
7446
|
projectId: string(),
|
|
@@ -7635,7 +7747,7 @@ const AgentSummarySchema = object({
|
|
|
7635
7747
|
name: string().min(1),
|
|
7636
7748
|
projectId: string().min(1),
|
|
7637
7749
|
updatedAt: string().min(1),
|
|
7638
|
-
description: string().
|
|
7750
|
+
description: string().min(1),
|
|
7639
7751
|
sourcePath: string().min(1).optional(),
|
|
7640
7752
|
model: string().optional(),
|
|
7641
7753
|
capabilities: object({
|
|
@@ -7657,7 +7769,7 @@ const WorkflowSummarySchema = object({
|
|
|
7657
7769
|
name: string().min(1),
|
|
7658
7770
|
projectId: string().min(1),
|
|
7659
7771
|
updatedAt: string().min(1),
|
|
7660
|
-
description: string().
|
|
7772
|
+
description: string().min(1),
|
|
7661
7773
|
sourcePath: string().min(1).optional(),
|
|
7662
7774
|
lastRunAt: optionalTimestamp
|
|
7663
7775
|
});
|
|
@@ -7667,7 +7779,7 @@ const SkillSummarySchema = object({
|
|
|
7667
7779
|
name: string().min(1),
|
|
7668
7780
|
projectId: string().min(1),
|
|
7669
7781
|
updatedAt: string().min(1),
|
|
7670
|
-
description: string().
|
|
7782
|
+
description: string().min(1),
|
|
7671
7783
|
sourcePath: string().min(1).optional()
|
|
7672
7784
|
});
|
|
7673
7785
|
const AgentSummaryListResponseSchema = array(AgentSummarySchema);
|
|
@@ -7786,7 +7898,252 @@ const ListAgentWorkspaceFilesResponseSchema = object({ files: array(object({
|
|
|
7786
7898
|
id: string(),
|
|
7787
7899
|
path: string().min(1)
|
|
7788
7900
|
})) });
|
|
7901
|
+
/** Whether the overview is still being produced or finished. */
|
|
7902
|
+
const WorkflowOverviewStatusSchema = _enum(["generating", "ready"]);
|
|
7903
|
+
/** One phase of the guided-tour overview. */
|
|
7904
|
+
const WorkflowPhaseSchema = object({
|
|
7905
|
+
id: string(),
|
|
7906
|
+
title: string(),
|
|
7907
|
+
copy: string(),
|
|
7908
|
+
nodeIds: array(string())
|
|
7909
|
+
});
|
|
7910
|
+
/** LLM-generated overview envelope. */
|
|
7911
|
+
const WorkspaceWorkflowOverviewSchema = object({
|
|
7912
|
+
status: WorkflowOverviewStatusSchema,
|
|
7913
|
+
summary: string(),
|
|
7914
|
+
phases: array(WorkflowPhaseSchema),
|
|
7915
|
+
hash: string(),
|
|
7916
|
+
generatedAt: string().nullable(),
|
|
7917
|
+
model: string()
|
|
7918
|
+
});
|
|
7919
|
+
/** Subset of JSON-Schema field types the dashboard form renders inline. */
|
|
7920
|
+
const WorkflowInputFieldTypeSchema = _enum([
|
|
7921
|
+
"string",
|
|
7922
|
+
"number",
|
|
7923
|
+
"boolean",
|
|
7924
|
+
"enum",
|
|
7925
|
+
"object",
|
|
7926
|
+
"array"
|
|
7927
|
+
]);
|
|
7928
|
+
const WorkflowInputFieldSchema = lazy(() => object({
|
|
7929
|
+
key: string(),
|
|
7930
|
+
label: string(),
|
|
7931
|
+
type: WorkflowInputFieldTypeSchema,
|
|
7932
|
+
required: boolean(),
|
|
7933
|
+
description: string().optional(),
|
|
7934
|
+
placeholder: string().optional(),
|
|
7935
|
+
options: array(string()).optional(),
|
|
7936
|
+
default: union([
|
|
7937
|
+
string(),
|
|
7938
|
+
number$1(),
|
|
7939
|
+
boolean()
|
|
7940
|
+
]).optional(),
|
|
7941
|
+
children: array(WorkflowInputFieldSchema).optional(),
|
|
7942
|
+
format: string().optional()
|
|
7943
|
+
}));
|
|
7944
|
+
/** A workflow's run-input contract plus its persisted values. */
|
|
7945
|
+
const WorkflowRunInputsSchema = object({
|
|
7946
|
+
schema: object({ fields: array(WorkflowInputFieldSchema) }),
|
|
7947
|
+
values: record(string(), unknown()).nullable()
|
|
7948
|
+
});
|
|
7949
|
+
/** Response of the manual workflow-run route (`POST /workflows/:id/run`). */
|
|
7950
|
+
const WorkflowRunResponseSchema = object({ runId: string() });
|
|
7951
|
+
/** Annotation lifecycle: "generating" while the LLM pass streams in, then "ready". */
|
|
7952
|
+
const WorkflowCanvasStatusSchema = _enum(["generating", "ready"]);
|
|
7953
|
+
/** LLM-produced enrichment for a single skeleton node. */
|
|
7954
|
+
const WorkflowCanvasAnnotationSchema = object({
|
|
7955
|
+
label: string().optional(),
|
|
7956
|
+
description: string().optional()
|
|
7957
|
+
});
|
|
7958
|
+
/** The configured value of one input at this call site. */
|
|
7959
|
+
const WorkflowNodeInputBindingSchema = object({
|
|
7960
|
+
tokens: array(discriminatedUnion("kind", [
|
|
7961
|
+
object({
|
|
7962
|
+
kind: literal("text"),
|
|
7963
|
+
text: string()
|
|
7964
|
+
}),
|
|
7965
|
+
object({
|
|
7966
|
+
kind: literal("reference"),
|
|
7967
|
+
sourceNodeId: string().optional(),
|
|
7968
|
+
sourceLabel: string(),
|
|
7969
|
+
field: string().optional()
|
|
7970
|
+
}),
|
|
7971
|
+
object({
|
|
7972
|
+
kind: literal("variable"),
|
|
7973
|
+
text: string(),
|
|
7974
|
+
/** Concrete value when `text` resolves to a top-level literal constant. */
|
|
7975
|
+
resolvedValue: string().optional()
|
|
7976
|
+
}),
|
|
7977
|
+
object({
|
|
7978
|
+
kind: literal("call"),
|
|
7979
|
+
name: string()
|
|
7980
|
+
})
|
|
7981
|
+
])),
|
|
7982
|
+
multiline: boolean().optional()
|
|
7983
|
+
});
|
|
7984
|
+
/** An inspector input with optional call-site binding. */
|
|
7985
|
+
const WorkflowCanvasNodeInputSchema = WorkflowInputFieldSchema.and(object({
|
|
7986
|
+
binding: WorkflowNodeInputBindingSchema.optional(),
|
|
7987
|
+
additional: boolean().optional()
|
|
7988
|
+
}));
|
|
7989
|
+
/** Authored, deterministic metadata for a single node. */
|
|
7990
|
+
const WorkflowCanvasNodeMetaSchema = object({
|
|
7991
|
+
kind: _enum([
|
|
7992
|
+
"action",
|
|
7993
|
+
"agent",
|
|
7994
|
+
"workflow",
|
|
7995
|
+
"llm",
|
|
7996
|
+
"trigger",
|
|
7997
|
+
"boundary"
|
|
7998
|
+
]),
|
|
7999
|
+
slug: string(),
|
|
8000
|
+
name: string(),
|
|
8001
|
+
description: string().optional(),
|
|
8002
|
+
appSlug: string().optional(),
|
|
8003
|
+
inputs: array(WorkflowCanvasNodeInputSchema),
|
|
8004
|
+
outputs: array(WorkflowInputFieldSchema),
|
|
8005
|
+
requiredApps: array(string()).optional(),
|
|
8006
|
+
model: string().optional(),
|
|
8007
|
+
toolCount: number$1().int().nonnegative().optional()
|
|
8008
|
+
});
|
|
8009
|
+
/** The workflow canvas envelope. */
|
|
8010
|
+
const WorkflowCanvasSchema = object({
|
|
8011
|
+
graph: WorkflowCanvasGraphSchema,
|
|
8012
|
+
nodeMetadata: record(string(), WorkflowCanvasNodeMetaSchema),
|
|
8013
|
+
annotations: record(string(), WorkflowCanvasAnnotationSchema),
|
|
8014
|
+
status: WorkflowCanvasStatusSchema,
|
|
8015
|
+
hash: string(),
|
|
8016
|
+
generatedAt: string().nullable(),
|
|
8017
|
+
model: string()
|
|
8018
|
+
});
|
|
8019
|
+
const WorkflowCanvasNodeRunStateSchema = object({
|
|
8020
|
+
status: _enum([
|
|
8021
|
+
"pending",
|
|
8022
|
+
"running",
|
|
8023
|
+
"succeeded",
|
|
8024
|
+
"failed",
|
|
8025
|
+
"skipped"
|
|
8026
|
+
]),
|
|
8027
|
+
iteration: object({
|
|
8028
|
+
index: number$1().int().nonnegative(),
|
|
8029
|
+
total: number$1().int().nonnegative()
|
|
8030
|
+
}).optional()
|
|
8031
|
+
});
|
|
8032
|
+
/** Overall lifecycle of a run as the canvas animates it. */
|
|
8033
|
+
const WorkflowCanvasRunStatusSchema = _enum([
|
|
8034
|
+
"running",
|
|
8035
|
+
"succeeded",
|
|
8036
|
+
"failed",
|
|
8037
|
+
"canceled"
|
|
8038
|
+
]);
|
|
8039
|
+
/** A run projected onto the canvas. */
|
|
8040
|
+
const WorkflowCanvasRunSchema = object({
|
|
8041
|
+
runId: string(),
|
|
8042
|
+
status: WorkflowCanvasRunStatusSchema,
|
|
8043
|
+
startedAt: string(),
|
|
8044
|
+
finishedAt: string().nullable(),
|
|
8045
|
+
nodeStates: record(string(), WorkflowCanvasNodeRunStateSchema)
|
|
8046
|
+
});
|
|
8047
|
+
/** Scope a credential instance lives in. */
|
|
8048
|
+
const WorkflowCredentialScopeSchema = _enum([
|
|
8049
|
+
"organization",
|
|
8050
|
+
"project",
|
|
8051
|
+
"user"
|
|
8052
|
+
]);
|
|
8053
|
+
/** The concrete credential instance a binding currently resolves to. */
|
|
8054
|
+
const WorkflowResolvedCredentialSchema = object({
|
|
8055
|
+
id: string(),
|
|
8056
|
+
name: string(),
|
|
8057
|
+
scope: WorkflowCredentialScopeSchema,
|
|
8058
|
+
appSlug: string().optional(),
|
|
8059
|
+
isDefault: boolean().optional(),
|
|
8060
|
+
projectId: string().optional(),
|
|
8061
|
+
projectName: string().optional()
|
|
8062
|
+
});
|
|
8063
|
+
record(string(), WorkflowCanvasAnnotationSchema);
|
|
8064
|
+
/** One opaque code-block the annotation pass should label, keyed by its canvas node id. */
|
|
8065
|
+
const WorkflowCanvasAnnotationCodeBlockSchema = object({
|
|
8066
|
+
nodeId: string(),
|
|
8067
|
+
/** The raw source snippet (the node's label) the LLM turns into human copy. */
|
|
8068
|
+
source: string()
|
|
8069
|
+
});
|
|
8070
|
+
/** Inputs the worker feeds the LLM for the gated code-block annotation pass. */
|
|
8071
|
+
const WorkflowCanvasAnnotationsInputSchema = object({
|
|
8072
|
+
workflowName: string(),
|
|
8073
|
+
workflowDescription: string().nullable(),
|
|
8074
|
+
codeBlocks: array(WorkflowCanvasAnnotationCodeBlockSchema)
|
|
8075
|
+
});
|
|
8076
|
+
object({
|
|
8077
|
+
workflowId: string(),
|
|
8078
|
+
projectId: string(),
|
|
8079
|
+
hash: string(),
|
|
8080
|
+
model: string(),
|
|
8081
|
+
input: WorkflowCanvasAnnotationsInputSchema
|
|
8082
|
+
});
|
|
8083
|
+
/** One node as the overview LLM sees it (derived from the canvas node metadata + graph). */
|
|
8084
|
+
const WorkflowOverviewNodeSchema = object({
|
|
8085
|
+
nodeId: string(),
|
|
8086
|
+
label: string(),
|
|
8087
|
+
kind: string(),
|
|
8088
|
+
description: string().optional(),
|
|
8089
|
+
/** App/integration slug for steps imported from a `@keystrokehq/<app>` package. */
|
|
8090
|
+
appSlug: string().optional(),
|
|
8091
|
+
/** Authored input field keys (from the action/agent/workflow definition). */
|
|
8092
|
+
inputs: array(string()).optional(),
|
|
8093
|
+
/** Authored output field keys. */
|
|
8094
|
+
outputs: array(string()).optional(),
|
|
8095
|
+
/** Agent-only: the model the agent runs on. */
|
|
8096
|
+
model: string().optional(),
|
|
8097
|
+
/** Agent-only: number of tools available to the agent. */
|
|
8098
|
+
toolCount: number$1().int().nonnegative().optional()
|
|
8099
|
+
});
|
|
8100
|
+
/** Inputs the worker feeds the LLM to produce the workflow overview (summary + phases). */
|
|
8101
|
+
const WorkflowOverviewInputSchema = object({
|
|
8102
|
+
workflowName: string(),
|
|
8103
|
+
workflowDescription: string().nullable(),
|
|
8104
|
+
/** Display labels of the trigger sources upstream of the workflow (read-only context). */
|
|
8105
|
+
triggers: array(string()),
|
|
8106
|
+
nodes: array(WorkflowOverviewNodeSchema),
|
|
8107
|
+
/** The workflow's TypeScript source (best-effort; null when the deploy has no source snapshot). */
|
|
8108
|
+
source: string().nullable()
|
|
8109
|
+
});
|
|
8110
|
+
object({
|
|
8111
|
+
workflowId: string(),
|
|
8112
|
+
projectId: string(),
|
|
8113
|
+
hash: string(),
|
|
8114
|
+
model: string(),
|
|
8115
|
+
input: WorkflowOverviewInputSchema
|
|
8116
|
+
});
|
|
8117
|
+
const WorkflowCanvasCredentialBindingBaseSchema = object({
|
|
8118
|
+
credentialKey: string(),
|
|
8119
|
+
label: string(),
|
|
8120
|
+
appSlug: string().optional()
|
|
8121
|
+
});
|
|
8122
|
+
/** How one credential requirement on a step currently resolves. */
|
|
8123
|
+
const WorkflowCanvasCredentialBindingSchema = union([
|
|
8124
|
+
WorkflowCanvasCredentialBindingBaseSchema.extend({
|
|
8125
|
+
policy: _enum([
|
|
8126
|
+
"project-default",
|
|
8127
|
+
"org-default",
|
|
8128
|
+
"assigned"
|
|
8129
|
+
]),
|
|
8130
|
+
instance: WorkflowResolvedCredentialSchema
|
|
8131
|
+
}),
|
|
8132
|
+
WorkflowCanvasCredentialBindingBaseSchema.extend({
|
|
8133
|
+
policy: literal("scope-pinned"),
|
|
8134
|
+
pinnedScope: WorkflowCredentialScopeSchema,
|
|
8135
|
+
instance: WorkflowResolvedCredentialSchema
|
|
8136
|
+
}),
|
|
8137
|
+
WorkflowCanvasCredentialBindingBaseSchema.extend({
|
|
8138
|
+
policy: literal("unresolved"),
|
|
8139
|
+
reason: _enum(["needs-selection", "missing"]),
|
|
8140
|
+
pinnedScope: WorkflowCredentialScopeSchema.optional()
|
|
8141
|
+
})
|
|
8142
|
+
]);
|
|
8143
|
+
/** Live credential overlay: canvas node id → its step's credential bindings. */
|
|
8144
|
+
const WorkflowCanvasCredentialBindingsSchema = record(string(), array(WorkflowCanvasCredentialBindingSchema));
|
|
8145
|
+
const WorkflowRunInputsPutBodySchema = record(string(), unknown());
|
|
7789
8146
|
//#endregion
|
|
7790
|
-
export { GetCustomAppResponseSchema as $,
|
|
8147
|
+
export { GetCustomAppResponseSchema as $, originFromPublicUrl as $n, SlugAvailabilityResponseSchema as $t, CreateCustomAppRequestSchema as A, WorkflowCanvasRunSchema as An, datetime as Ar, PollRunResponseSchema as At, CredentialConsumerListQuerySchema as B, WorkspaceTriggerDetailSchema as Bn, ProjectReachabilityResponseSchema as Bt, ConnectAuthorizeUrlResponseSchema as C, UploadProjectSourceResponseSchema as Cn, optional as Cr, ListProjectsResponseSchema as Ct, CreateCredentialInstanceBodySchema as D, UserPreferencesPatchSchema as Dn, union as Dr, OrganizationSidebarBrandingSchema as Dt, CreateApiKeyResponseSchema as E, UserAvatarSchema as En, string as Er, OrganizationSidebarBrandingPatchSchema as Et, CreateProjectRequestSchema as F, WorkflowRunInputsSchema as Fn, PresignProjectSourceRequestSchema as Ft, DOCS_QUERY_TOOL as G, WorkspaceWorkflowOverviewSchema as Gn, PromptResponseSchema as Gt, CredentialInstanceListResponseSchema as H, WorkspaceTriggerListResponseSchema as Hn, ProjectSettingsResponseSchema as Ht, CreateProjectResponseSchema as I, WorkflowRunListResponseSchema as In, PresignProjectSourceResponseSchema as It, DownloadActiveProjectArtifactResponseSchema as J, deriveCustomAppDisplay as Jn, QueuedRunResponseSchema as Jt, DOCS_SEARCH_TOOL as K, buildConnectDeeplink as Kn, PublicModelsResponseSchema as Kt, CredentialAssignmentListQuerySchema as L, WorkflowRunResponseSchema as Ln, PresignUserAvatarRequestSchema as Lt, CreateOrganizationRequestSchema as M, WorkflowRunDetailResponseSchema as Mn, safeParse$1 as Mr, PresignChatAttachmentResponseSchema as Mt, CreateOrganizationResponseSchema as N, WorkflowRunHooksResponseSchema as Nn, NEVER as Nr, PresignOrgLogoRequestSchema as Nt, CreateCredentialsRequestSchema as O, UserPreferencesSchema as On, unknown as Or, PROJECT_PULL_STATE_RELATIVE_PATH as Ot, CreateProjectArtifactResponseSchema as P, WorkflowRunInputsPutBodySchema as Pn, PresignOrgLogoResponseSchema as Pt, GetCredentialResponseSchema as Q, normalizeCredentialList as Qn, SkillSummaryListResponseSchema as Qt, CredentialAssignmentListResponseSchema as R, WorkflowSummaryDetailResponseSchema as Rn, PresignUserAvatarResponseSchema as Rt, CompleteProjectArtifactResponseSchema as S, UploadProjectSourceManifestRequestSchema as Sn, object as Sr, ListProjectMetricsResponseSchema as St, CreateApiKeyRequestSchema as T, UserAvatarPatchSchema as Tn, record as Tr, OpenApiDiscoverResponseSchema as Tt, CredentialInstanceRecordSchema as U, WorkspaceTriggerOverviewSchema as Un, ProjectSlugAvailabilityResponseSchema as Ut, CredentialConsumerListResponseSchema as V, WorkspaceTriggerFileSchema as Vn, ProjectResponseSchema as Vt, DEFAULT_CLOUD_PLATFORM_ORIGIN as W, WorkspaceTriggerRunListResponseSchema as Wn, PromptInputSchema as Wt, ErrorResponseSchema as X, isAcceptableInstallExit as Xn, RecentResourceListResponseSchema as Xt, DownloadActiveProjectSourceResponseSchema as Y, detectProjectPackageManagerFromSnapshot as Yn, ROUTE_MANIFEST_REL_PATH as Yt, GatewayAttachmentRecordSchema as Z, listenPortFromPublicUrl as Zn, SkillSummaryDetailResponseSchema as Zt, ChannelAccountListResponseSchema as _, UpdateOrganizationRequestSchema as _n, discriminatedUnion as _r, ListOrganizationMembersResponseSchema as _t, AgentSessionDetailResponseSchema as a, StartOAuthConnectionResultSchema as an, resolveDocsMcpUrl as ar, HistoryRunListResponseSchema as at, ChannelDirectoryListResponseSchema as b, UpdateProjectRequestSchema as bn, looseObject as br, ListProjectFilesResponseSchema as bt, AgentSummaryListResponseSchema as c, TriggerDetailResponseSchema as cn, number as cr, InviteProjectMembersRequestSchema as ct, AssignCredentialBodySchema as d, TriggerRunListResponseSchema as dn, _function as dr, ListAgentMemoryFilesResponseSchema as dt, StartKeystrokeConnectionInputSchema as en, parseAppSlug as er, GraphqlDiscoverResponseSchema as et, BindChannelBodySchema as f, UpdateChannelBindingBodySchema as fn, _null as fr, ListAgentWorkspaceFilesResponseSchema as ft, CatalogAppsPageResponseSchema as g, UpdateOrganizationMemberResponseSchema as gn, custom as gr, ListOrganizationInvitationsResponseSchema as gt, CatalogAppDetailResponseSchema as h, UpdateOrganizationMemberRequestSchema as hn, boolean as hr, ListCredentialsResponseSchema as ht, AgentSessionChatStateResponseSchema as i, StartOAuthConnectionInputSchema as in, resolveConnectAppSlug as ir, HistoryRunListQuerySchema as it, CreateCustomAppResponseSchema as j, WorkflowCanvasSchema as jn, toJSONSchema as jr, PresignChatAttachmentRequestSchema as jt, CreateCredentialsResponseSchema as k, WorkflowCanvasCredentialBindingsSchema as kn, url as kr, PROJECT_REACHABILITY_REQUEST_TIMEOUT_MS as kt, AgentTriggerSummaryListResponseSchema as l, TriggerListResponseSchema as ln, ZodType as lr, InviteProjectMembersResponseSchema as lt, CatalogActionsPageResponseSchema as m, UpdateCredentialRequestSchema as mn, array as mr, ListAppsResponseSchema as mt, AcceptOrganizationInvitationResponseSchema as n, StartMcpOAuthConnectionInputSchema as nn, parseStoredRouteManifest as nr, HistoryRunCancelResponseSchema as nt, AgentSessionListResponseSchema as o, SubmitMarketingContactRequestSchema as on, resolvePublicPlatformOrigin as or, InviteOrganizationMembersRequestSchema as ot, CatalogActionDetailResponseSchema as p, UpdateCredentialInstanceBodySchema as pn, any as pr, ListApiKeysResponseSchema as pt, DeclineOrganizationInvitationResponseSchema as q, credentialInputSchema as qn, QueuedAgentPromptResponseSchema as qt, ActiveOrganizationResponseSchema as r, StartMcpOAuthConnectionResultSchema as rn, requiredDisplayTextSchema as rr, HistoryRunDetailResponseSchema as rt, AgentSummaryDetailResponseSchema as s, SubmitTeamRequestRequestSchema as sn, slugifyAppName as sr, InviteOrganizationMembersResponseSchema as st, ACTIVE_ORG_HEADER as t, StartKeystrokeConnectionResultSchema as tn, parseErrorResponse as tr, HealthResponseSchema as tt, AppSlugAvailabilityResponseSchema as u, TriggerRunDetailResponseSchema as un, _enum as ur, LOCAL_PLATFORM_ORIGIN as ut, ChannelConnectionListResponseSchema as v, UpdateProjectMemberRequestSchema as vn, intersection as vr, ListOrganizationsResponseSchema as vt, ConnectProvidersResponseSchema as w, UpsertGatewayAttachmentBodySchema as wn, preprocess as wr, McpDiscoverResponseSchema as wt, ChannelPlatformSchema as x, UpdateProjectSettingsRequestSchema as xn, number$1 as xr, ListProjectMembersResponseSchema as xt, ChannelConnectionSchema as y, UpdateProjectMemberResponseSchema as yn, literal as yr, ListProjectDeploymentsResponseSchema as yt, CredentialAssignmentRecordSchema as z, WorkflowSummaryListResponseSchema as zn, ProjectPullStateSchema as zt };
|
|
7791
8148
|
|
|
7792
|
-
//# sourceMappingURL=dist-
|
|
8149
|
+
//# sourceMappingURL=dist-COhdZicI.mjs.map
|