@keystrokehq/cli 1.0.24 → 1.0.26
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-BIENrk9m.mjs → dist-6-Bdz4wY.mjs} +213 -128
- package/dist/dist-6-Bdz4wY.mjs.map +1 -0
- package/dist/{dist-DERbyHgP.mjs → dist-B3MtYrDr.mjs} +3 -3
- package/dist/{dist-DERbyHgP.mjs.map → dist-B3MtYrDr.mjs.map} +1 -1
- package/dist/{dist-3h33yl2W.mjs → dist-BUK3crkq.mjs} +361 -14
- package/dist/{dist-3h33yl2W.mjs.map → dist-BUK3crkq.mjs.map} +1 -1
- package/dist/dist-zR2BWACn.mjs +3 -0
- package/dist/index.mjs +77 -14
- package/dist/index.mjs.map +1 -1
- package/dist/{maybe-auto-update-DS6ED4YM.mjs → maybe-auto-update-HA7HooH4.mjs} +2 -2
- package/dist/{maybe-auto-update-DS6ED4YM.mjs.map → maybe-auto-update-HA7HooH4.mjs.map} +1 -1
- package/dist/{pack-artifact-NGxvGcXq-B30lSwyC.mjs → pack-artifact-DVnIKrsg-CZTT2aF_.mjs} +4 -4
- package/dist/pack-artifact-DVnIKrsg-CZTT2aF_.mjs.map +1 -0
- package/dist/{version-BMFuEgMn.mjs → version-CQ7xeQi9.mjs} +2 -2
- package/dist/{version-BMFuEgMn.mjs.map → version-CQ7xeQi9.mjs.map} +1 -1
- package/package.json +1 -1
- package/dist/dist-BIENrk9m.mjs.map +0 -1
- package/dist/dist-DE91OGfv.mjs +0 -3
- package/dist/pack-artifact-NGxvGcXq-B30lSwyC.mjs.map +0 -1
|
@@ -5508,13 +5508,17 @@ const storedRouteManifestEntryV2Schema = discriminatedUnion("kind", [
|
|
|
5508
5508
|
endpoint: string(),
|
|
5509
5509
|
attachmentIds: array(string()),
|
|
5510
5510
|
moduleFile: string(),
|
|
5511
|
+
/** sha256 of the trigger source file, baked at build time for overview change-detection. */
|
|
5512
|
+
sourceHash: string().optional(),
|
|
5511
5513
|
attachmentSchemas: attachmentSchemasSchema,
|
|
5512
5514
|
attachmentMeta: attachmentMetaSchema.optional()
|
|
5513
5515
|
}),
|
|
5514
5516
|
object({
|
|
5515
5517
|
kind: literal("trigger-poll"),
|
|
5516
5518
|
attachmentId: string(),
|
|
5519
|
+
attachmentIds: array(string()),
|
|
5517
5520
|
moduleFile: string(),
|
|
5521
|
+
sourceHash: string().optional(),
|
|
5518
5522
|
schedule: string(),
|
|
5519
5523
|
name: string().optional(),
|
|
5520
5524
|
description: string().optional()
|
|
@@ -5529,18 +5533,180 @@ const storedRouteManifestEntryV2Schema = discriminatedUnion("kind", [
|
|
|
5529
5533
|
object({
|
|
5530
5534
|
kind: literal("cron-schedule"),
|
|
5531
5535
|
attachmentId: string(),
|
|
5536
|
+
attachmentIds: array(string()),
|
|
5532
5537
|
moduleFile: string(),
|
|
5538
|
+
sourceHash: string().optional(),
|
|
5533
5539
|
schedule: string(),
|
|
5534
5540
|
name: string().optional(),
|
|
5535
5541
|
description: string().optional()
|
|
5536
5542
|
})
|
|
5537
5543
|
]);
|
|
5538
|
-
const
|
|
5544
|
+
const storedRouteManifestV2Schema = object({
|
|
5539
5545
|
version: literal(2),
|
|
5540
5546
|
entries: array(storedRouteManifestEntryV2Schema),
|
|
5541
5547
|
skills: array(StoredRouteManifestSkillSchema).default([]),
|
|
5542
5548
|
integrations: array(string()).optional()
|
|
5543
5549
|
});
|
|
5550
|
+
const DERIVED_ENTRY_KINDS = new Set([
|
|
5551
|
+
"agent-sessions-list",
|
|
5552
|
+
"agent-session-detail",
|
|
5553
|
+
"workflow-runs-list",
|
|
5554
|
+
"workflow-run-detail",
|
|
5555
|
+
"trigger-runs-list",
|
|
5556
|
+
"trigger-run-detail"
|
|
5557
|
+
]);
|
|
5558
|
+
function webhookEndpointFromPath(path) {
|
|
5559
|
+
return path.replace(/^\/triggers\//, "").replace(/^\/+|\/+$/g, "");
|
|
5560
|
+
}
|
|
5561
|
+
function legacyAgentAppSlugs(entry) {
|
|
5562
|
+
if (Array.isArray(entry.appSlugs)) return entry.appSlugs;
|
|
5563
|
+
if (Array.isArray(entry.credentialSlugs)) return entry.credentialSlugs;
|
|
5564
|
+
if (Array.isArray(entry.credentialKeys)) return entry.credentialKeys;
|
|
5565
|
+
return [];
|
|
5566
|
+
}
|
|
5567
|
+
/** TODO remove after all artifacts rebuilt — upcasts legacy v1 manifests to v2. */
|
|
5568
|
+
function normalizeEntryToV2(entry) {
|
|
5569
|
+
const kind = entry.kind;
|
|
5570
|
+
if (typeof kind !== "string") return null;
|
|
5571
|
+
if (DERIVED_ENTRY_KINDS.has(kind) || kind === "plugin") return null;
|
|
5572
|
+
if (kind === "health") return { kind: "health" };
|
|
5573
|
+
if (kind === "agent") {
|
|
5574
|
+
const slug = typeof entry.slug === "string" ? entry.slug : typeof entry.agentSlug === "string" ? entry.agentSlug : void 0;
|
|
5575
|
+
if (!slug || typeof entry.moduleFile !== "string") return null;
|
|
5576
|
+
return {
|
|
5577
|
+
kind: "agent",
|
|
5578
|
+
slug,
|
|
5579
|
+
moduleFile: entry.moduleFile,
|
|
5580
|
+
...typeof entry.name === "string" ? { name: entry.name } : {},
|
|
5581
|
+
...typeof entry.description === "string" ? { description: entry.description } : {},
|
|
5582
|
+
model: typeof entry.model === "string" ? entry.model : "",
|
|
5583
|
+
systemPrompt: typeof entry.systemPrompt === "string" ? entry.systemPrompt : "",
|
|
5584
|
+
toolCount: typeof entry.toolCount === "number" ? entry.toolCount : 0,
|
|
5585
|
+
credentialCount: typeof entry.credentialCount === "number" ? entry.credentialCount : 0,
|
|
5586
|
+
appSlugs: legacyAgentAppSlugs(entry),
|
|
5587
|
+
toolSlugs: Array.isArray(entry.toolSlugs) ? entry.toolSlugs : []
|
|
5588
|
+
};
|
|
5589
|
+
}
|
|
5590
|
+
if (kind === "workflow") {
|
|
5591
|
+
const slug = typeof entry.slug === "string" ? entry.slug : typeof entry.workflowSlug === "string" ? entry.workflowSlug : void 0;
|
|
5592
|
+
if (!slug || typeof entry.moduleFile !== "string") return null;
|
|
5593
|
+
const name = typeof entry.name === "string" ? entry.name : typeof entry.workflowName === "string" ? entry.workflowName : void 0;
|
|
5594
|
+
return {
|
|
5595
|
+
kind: "workflow",
|
|
5596
|
+
slug,
|
|
5597
|
+
moduleFile: entry.moduleFile,
|
|
5598
|
+
...name ? { name } : {},
|
|
5599
|
+
...typeof entry.description === "string" ? { description: entry.description } : {},
|
|
5600
|
+
subscribable: entry.subscribable === true,
|
|
5601
|
+
requestSchema: entry.requestSchema && typeof entry.requestSchema === "object" ? entry.requestSchema : {}
|
|
5602
|
+
};
|
|
5603
|
+
}
|
|
5604
|
+
if (kind === "trigger-webhook") {
|
|
5605
|
+
if (typeof entry.moduleFile !== "string" || !Array.isArray(entry.attachmentIds)) return null;
|
|
5606
|
+
const endpoint = typeof entry.endpoint === "string" ? entry.endpoint : typeof entry.path === "string" ? webhookEndpointFromPath(entry.path) : void 0;
|
|
5607
|
+
if (!endpoint) return null;
|
|
5608
|
+
return {
|
|
5609
|
+
kind: "trigger-webhook",
|
|
5610
|
+
endpoint,
|
|
5611
|
+
attachmentIds: entry.attachmentIds,
|
|
5612
|
+
moduleFile: entry.moduleFile,
|
|
5613
|
+
...typeof entry.sourceHash === "string" ? { sourceHash: entry.sourceHash } : {},
|
|
5614
|
+
attachmentSchemas: entry.attachmentSchemas && typeof entry.attachmentSchemas === "object" ? entry.attachmentSchemas : {},
|
|
5615
|
+
...entry.attachmentMeta && typeof entry.attachmentMeta === "object" ? { attachmentMeta: entry.attachmentMeta } : {}
|
|
5616
|
+
};
|
|
5617
|
+
}
|
|
5618
|
+
if (kind === "trigger-poll") {
|
|
5619
|
+
if (typeof entry.attachmentId !== "string" || typeof entry.moduleFile !== "string" || typeof entry.schedule !== "string") return null;
|
|
5620
|
+
return {
|
|
5621
|
+
kind: "trigger-poll",
|
|
5622
|
+
attachmentId: entry.attachmentId,
|
|
5623
|
+
attachmentIds: Array.isArray(entry.attachmentIds) ? entry.attachmentIds : [entry.attachmentId],
|
|
5624
|
+
moduleFile: entry.moduleFile,
|
|
5625
|
+
...typeof entry.sourceHash === "string" ? { sourceHash: entry.sourceHash } : {},
|
|
5626
|
+
schedule: entry.schedule,
|
|
5627
|
+
...typeof entry.name === "string" ? { name: entry.name } : {},
|
|
5628
|
+
...typeof entry.description === "string" ? { description: entry.description } : {}
|
|
5629
|
+
};
|
|
5630
|
+
}
|
|
5631
|
+
if (kind === "trigger-poll-group") {
|
|
5632
|
+
if (typeof entry.pollId !== "string" || typeof entry.moduleFile !== "string" || typeof entry.schedule !== "string" || !Array.isArray(entry.attachmentIds)) return null;
|
|
5633
|
+
return {
|
|
5634
|
+
kind: "trigger-poll-group",
|
|
5635
|
+
pollId: entry.pollId,
|
|
5636
|
+
attachmentIds: entry.attachmentIds,
|
|
5637
|
+
moduleFile: entry.moduleFile,
|
|
5638
|
+
schedule: entry.schedule
|
|
5639
|
+
};
|
|
5640
|
+
}
|
|
5641
|
+
if (kind === "cron-schedule") {
|
|
5642
|
+
if (typeof entry.attachmentId !== "string" || typeof entry.moduleFile !== "string" || typeof entry.schedule !== "string") return null;
|
|
5643
|
+
return {
|
|
5644
|
+
kind: "cron-schedule",
|
|
5645
|
+
attachmentId: entry.attachmentId,
|
|
5646
|
+
attachmentIds: Array.isArray(entry.attachmentIds) ? entry.attachmentIds : [entry.attachmentId],
|
|
5647
|
+
moduleFile: entry.moduleFile,
|
|
5648
|
+
...typeof entry.sourceHash === "string" ? { sourceHash: entry.sourceHash } : {},
|
|
5649
|
+
schedule: entry.schedule,
|
|
5650
|
+
...typeof entry.name === "string" ? { name: entry.name } : {},
|
|
5651
|
+
...typeof entry.description === "string" ? { description: entry.description } : {}
|
|
5652
|
+
};
|
|
5653
|
+
}
|
|
5654
|
+
return null;
|
|
5655
|
+
}
|
|
5656
|
+
/** TODO remove after all artifacts rebuilt — upcasts legacy v1 manifests to v2. */
|
|
5657
|
+
function normalizeV2ManifestInput(value) {
|
|
5658
|
+
if (!value || typeof value !== "object") return value;
|
|
5659
|
+
const raw = value;
|
|
5660
|
+
if (raw.version !== 2 || !Array.isArray(raw.entries)) return value;
|
|
5661
|
+
return {
|
|
5662
|
+
...raw,
|
|
5663
|
+
entries: raw.entries.map((entry) => {
|
|
5664
|
+
if (!entry || typeof entry !== "object") return entry;
|
|
5665
|
+
const kind = entry.kind;
|
|
5666
|
+
if (kind === "trigger-poll" || kind === "cron-schedule" || kind === "trigger-webhook" || kind === "trigger-poll-group") {
|
|
5667
|
+
const trigger = entry;
|
|
5668
|
+
if (Array.isArray(trigger.attachmentIds)) return entry;
|
|
5669
|
+
return {
|
|
5670
|
+
...trigger,
|
|
5671
|
+
attachmentIds: typeof trigger.attachmentId === "string" ? [trigger.attachmentId] : []
|
|
5672
|
+
};
|
|
5673
|
+
}
|
|
5674
|
+
if (kind !== "agent") return entry;
|
|
5675
|
+
const agent = entry;
|
|
5676
|
+
if (Array.isArray(agent.appSlugs)) return entry;
|
|
5677
|
+
const appSlugs = legacyAgentAppSlugs(agent);
|
|
5678
|
+
if (appSlugs.length === 0) return entry;
|
|
5679
|
+
const { credentialKeys: _credentialKeys, credentialSlugs: _credentialSlugs, ...rest } = agent;
|
|
5680
|
+
return {
|
|
5681
|
+
...rest,
|
|
5682
|
+
appSlugs,
|
|
5683
|
+
toolSlugs: Array.isArray(agent.toolSlugs) ? agent.toolSlugs : []
|
|
5684
|
+
};
|
|
5685
|
+
})
|
|
5686
|
+
};
|
|
5687
|
+
}
|
|
5688
|
+
/** TODO remove after all artifacts rebuilt — upcasts legacy v1 manifests to v2. */
|
|
5689
|
+
function normalizeStoredRouteManifestToV2(value) {
|
|
5690
|
+
if (!value || typeof value !== "object") throw new Error("Invalid route manifest");
|
|
5691
|
+
const raw = value;
|
|
5692
|
+
if (raw.version === 2) return storedRouteManifestV2Schema.parse(normalizeV2ManifestInput(value));
|
|
5693
|
+
const entriesRaw = Array.isArray(raw.entries) ? raw.entries : [];
|
|
5694
|
+
const entries = [];
|
|
5695
|
+
for (const entry of entriesRaw) {
|
|
5696
|
+
if (!entry || typeof entry !== "object") continue;
|
|
5697
|
+
const normalized = normalizeEntryToV2(entry);
|
|
5698
|
+
if (normalized) entries.push(normalized);
|
|
5699
|
+
}
|
|
5700
|
+
return storedRouteManifestV2Schema.parse({
|
|
5701
|
+
version: 2,
|
|
5702
|
+
entries,
|
|
5703
|
+
skills: raw.skills ?? [],
|
|
5704
|
+
integrations: raw.integrations
|
|
5705
|
+
});
|
|
5706
|
+
}
|
|
5707
|
+
function parseStoredRouteManifest(value) {
|
|
5708
|
+
return normalizeStoredRouteManifestToV2(value);
|
|
5709
|
+
}
|
|
5544
5710
|
/** Messaging platforms that support agent gateway bindings. */
|
|
5545
5711
|
const ChannelPlatformKeySchema = _enum(["slack"]);
|
|
5546
5712
|
const ChannelReactionSupportSchema = _enum([
|
|
@@ -5686,7 +5852,9 @@ const UpdateChannelBindingBodySchema = object({ patch: object({
|
|
|
5686
5852
|
const AppCredentialFieldSchema = object({
|
|
5687
5853
|
label: string().trim().min(1).optional(),
|
|
5688
5854
|
secret: boolean().optional(),
|
|
5689
|
-
optional: boolean().optional()
|
|
5855
|
+
optional: boolean().optional(),
|
|
5856
|
+
description: string().trim().min(1).optional(),
|
|
5857
|
+
default: string().optional()
|
|
5690
5858
|
});
|
|
5691
5859
|
/** Credential template keyed by vault field name. */
|
|
5692
5860
|
const AppCredentialFieldsSchema = record(string().regex(/^[a-zA-Z][a-zA-Z0-9_]*$/), AppCredentialFieldSchema).refine((fields) => Object.keys(fields).length > 0, { message: "At least one credential field is required" }).refine((fields) => Object.values(fields).some((field) => field.optional !== true), { message: "At least one credential field must be required" });
|
|
@@ -5703,6 +5871,13 @@ const AppAuthKindSchema = _enum([
|
|
|
5703
5871
|
"api_key",
|
|
5704
5872
|
"keystroke"
|
|
5705
5873
|
]);
|
|
5874
|
+
/** Composio auth scheme for API-key style connections. */
|
|
5875
|
+
const AppCredentialSchemeSchema = _enum([
|
|
5876
|
+
"API_KEY",
|
|
5877
|
+
"BEARER_TOKEN",
|
|
5878
|
+
"BASIC",
|
|
5879
|
+
"BASIC_WITH_JWT"
|
|
5880
|
+
]);
|
|
5706
5881
|
/**
|
|
5707
5882
|
* Where app metadata and execution are sourced (e.g. native, composio, pipedream, custom).
|
|
5708
5883
|
* Opaque string — cloud/hosted entrypoints choose values; keystroke stays provider-agnostic.
|
|
@@ -5716,7 +5891,11 @@ object({
|
|
|
5716
5891
|
logo: string().url().optional(),
|
|
5717
5892
|
authKind: AppAuthKindSchema,
|
|
5718
5893
|
oauthScopes: array(OAuthScopeOptionSchema)
|
|
5719
|
-
}).extend({
|
|
5894
|
+
}).extend({
|
|
5895
|
+
source: AppSourceSchema,
|
|
5896
|
+
credentialFields: AppCredentialFieldsSchema.optional(),
|
|
5897
|
+
credentialScheme: AppCredentialSchemeSchema.optional()
|
|
5898
|
+
});
|
|
5720
5899
|
const customAppNameSchema = string().trim().min(1, "Name is required");
|
|
5721
5900
|
const AppSlugAvailabilityReasonSchema = ProjectSlugAvailabilityReasonSchema;
|
|
5722
5901
|
const AppSlugAvailabilityResponseSchema = object({
|
|
@@ -5760,6 +5939,7 @@ object({
|
|
|
5760
5939
|
oauthScopes: array(OAuthScopeOptionSchema),
|
|
5761
5940
|
source: AppSourceSchema,
|
|
5762
5941
|
credentialFields: AppCredentialFieldsSchema.optional(),
|
|
5942
|
+
credentialScheme: AppCredentialSchemeSchema.optional(),
|
|
5763
5943
|
createdAt: string().min(1),
|
|
5764
5944
|
updatedAt: string().min(1)
|
|
5765
5945
|
});
|
|
@@ -5776,6 +5956,8 @@ const ListAppsResponseSchema = array(object({
|
|
|
5776
5956
|
source: AppSourceSchema,
|
|
5777
5957
|
/** Custom api_key apps — vault field template for connect UI and sync. */
|
|
5778
5958
|
credentialFields: AppCredentialFieldsSchema.optional(),
|
|
5959
|
+
/** Composio auth scheme when credentialFields are present. */
|
|
5960
|
+
credentialScheme: AppCredentialSchemeSchema.optional(),
|
|
5779
5961
|
/** When present, the app supports agent gateway bindings (external channels). */
|
|
5780
5962
|
gateway: AppGatewaySchema.optional()
|
|
5781
5963
|
}));
|
|
@@ -5899,7 +6081,7 @@ const AppCredentialSummarySchema = object({
|
|
|
5899
6081
|
});
|
|
5900
6082
|
const credentialSecretValueSchema = record(string(), unknown()).refine((value) => Object.keys(value).length > 0, { message: "value must be a non-empty object" });
|
|
5901
6083
|
function hasCredentialTarget(input) {
|
|
5902
|
-
return input.projects.length > 0 || input.createOrganizationCredential || input.createUserProvidedCredential;
|
|
6084
|
+
return input.projects.length > 0 || input.createOrganizationCredential || input.createUserProvidedCredential || Boolean(input.credentialInstanceId?.trim());
|
|
5903
6085
|
}
|
|
5904
6086
|
function addMissingCredentialTargetIssue(ctx, path = ["projects"]) {
|
|
5905
6087
|
ctx.addIssue({
|
|
@@ -5914,7 +6096,9 @@ const CredentialTargetsFieldsSchema = object({
|
|
|
5914
6096
|
createOrganizationCredential: boolean().default(false),
|
|
5915
6097
|
createUserProvidedCredential: boolean().default(false),
|
|
5916
6098
|
/** Display label for created credential instances (apps table / detail page). */
|
|
5917
|
-
label: string().trim().min(1).optional()
|
|
6099
|
+
label: string().trim().min(1).optional(),
|
|
6100
|
+
/** When set, update this credential instance in place (reconnect) instead of creating a new row. */
|
|
6101
|
+
credentialInstanceId: string().trim().min(1).optional()
|
|
5918
6102
|
});
|
|
5919
6103
|
/** Input for starting an OAuth connection (connect dialog / CLI connect). */
|
|
5920
6104
|
const StartOAuthConnectionInputSchema = CredentialTargetsFieldsSchema.extend({
|
|
@@ -5928,15 +6112,21 @@ const StartOAuthConnectionResultSchema = object({
|
|
|
5928
6112
|
authorizeUrl: string().url().nullable()
|
|
5929
6113
|
});
|
|
5930
6114
|
/** Input for starting a keystroke connection (connect dialog). */
|
|
5931
|
-
const StartKeystrokeConnectionInputSchema = CredentialTargetsFieldsSchema.extend({
|
|
6115
|
+
const StartKeystrokeConnectionInputSchema = CredentialTargetsFieldsSchema.extend({
|
|
6116
|
+
app: string().trim().min(1),
|
|
6117
|
+
value: credentialSecretValueSchema.optional()
|
|
6118
|
+
}).superRefine((input, ctx) => {
|
|
5932
6119
|
if (!hasCredentialTarget(input)) addMissingCredentialTargetIssue(ctx);
|
|
5933
6120
|
});
|
|
5934
6121
|
/** Result of starting a keystroke connection. */
|
|
5935
|
-
const StartKeystrokeConnectionResultSchema = object({
|
|
5936
|
-
status:
|
|
6122
|
+
const StartKeystrokeConnectionResultSchema = discriminatedUnion("status", [object({
|
|
6123
|
+
status: literal("connected"),
|
|
6124
|
+
connectionId: string().min(1)
|
|
6125
|
+
}), object({
|
|
6126
|
+
status: literal("redirecting"),
|
|
5937
6127
|
authorizeUrl: string().url(),
|
|
5938
|
-
connectionId: string()
|
|
5939
|
-
});
|
|
6128
|
+
connectionId: string().min(1)
|
|
6129
|
+
})]);
|
|
5940
6130
|
/** Request body for `POST /api/credentials` (manual api-key fan-out). */
|
|
5941
6131
|
const CreateCredentialsRequestSchema = CredentialTargetsFieldsSchema.extend({
|
|
5942
6132
|
appId: string().min(1),
|
|
@@ -6038,6 +6228,14 @@ object({
|
|
|
6038
6228
|
/** Tool/step consumer id for assignment lookup (action slug or workflow step correlation id). */
|
|
6039
6229
|
consumerId: string().trim().min(1).optional()
|
|
6040
6230
|
});
|
|
6231
|
+
object({
|
|
6232
|
+
error: _enum([
|
|
6233
|
+
"not_found",
|
|
6234
|
+
"forbidden",
|
|
6235
|
+
"mcp_execute_failed"
|
|
6236
|
+
]),
|
|
6237
|
+
message: string()
|
|
6238
|
+
});
|
|
6041
6239
|
const SubmitTeamRequestRequestSchema = object({
|
|
6042
6240
|
type: _enum([
|
|
6043
6241
|
"org-deletion",
|
|
@@ -6676,6 +6874,18 @@ const TriggerRunTypeSchema = _enum([
|
|
|
6676
6874
|
"webhook",
|
|
6677
6875
|
"poll"
|
|
6678
6876
|
]);
|
|
6877
|
+
const TriggerRunOutcomeSchema = _enum([
|
|
6878
|
+
"dispatched",
|
|
6879
|
+
"skipped",
|
|
6880
|
+
"failed"
|
|
6881
|
+
]);
|
|
6882
|
+
const TriggerRunReasonSchema = _enum([
|
|
6883
|
+
"filter_rejected",
|
|
6884
|
+
"transform_undefined",
|
|
6885
|
+
"invalid_payload",
|
|
6886
|
+
"source_error",
|
|
6887
|
+
"handler_error"
|
|
6888
|
+
]);
|
|
6679
6889
|
const TriggerRunWorkflowSummarySchema = object({
|
|
6680
6890
|
id: string(),
|
|
6681
6891
|
status: WorkflowRunStatusSchema,
|
|
@@ -6690,8 +6900,13 @@ const TriggerRunSummarySchema = object({
|
|
|
6690
6900
|
triggerType: TriggerRunTypeSchema,
|
|
6691
6901
|
triggeredAt: string(),
|
|
6692
6902
|
sourcePath: string().nullable(),
|
|
6693
|
-
|
|
6694
|
-
|
|
6903
|
+
outcome: TriggerRunOutcomeSchema,
|
|
6904
|
+
reason: TriggerRunReasonSchema.nullable(),
|
|
6905
|
+
detail: string().nullable(),
|
|
6906
|
+
/** Workflow runs dispatched by this fire (fan-out → one per matched workflow attachment). */
|
|
6907
|
+
workflowRuns: array(TriggerRunWorkflowSummarySchema),
|
|
6908
|
+
/** Agent sessions dispatched by this fire (fan-out → one per matched agent attachment). */
|
|
6909
|
+
agentSessions: array(TriggerRunAgentSessionSummarySchema)
|
|
6695
6910
|
});
|
|
6696
6911
|
const TriggerRunRecordSchema = object({
|
|
6697
6912
|
id: string(),
|
|
@@ -6699,6 +6914,9 @@ const TriggerRunRecordSchema = object({
|
|
|
6699
6914
|
attachmentSlug: string(),
|
|
6700
6915
|
triggerType: TriggerRunTypeSchema,
|
|
6701
6916
|
sourcePath: string().nullable(),
|
|
6917
|
+
outcome: TriggerRunOutcomeSchema,
|
|
6918
|
+
reason: TriggerRunReasonSchema.nullable(),
|
|
6919
|
+
detail: string().nullable(),
|
|
6702
6920
|
payload: unknown().nullable(),
|
|
6703
6921
|
triggeredAt: string()
|
|
6704
6922
|
});
|
|
@@ -6733,11 +6951,15 @@ const TriggerTypeSchema = _enum([
|
|
|
6733
6951
|
"cron"
|
|
6734
6952
|
]);
|
|
6735
6953
|
const TriggerTargetKindSchema = _enum(["workflow", "agent"]);
|
|
6954
|
+
const TriggerStatusSchema = _enum(["active", "disabled"]);
|
|
6736
6955
|
const TriggerListItemSchema = object({
|
|
6737
6956
|
slug: string(),
|
|
6738
6957
|
name: string().optional(),
|
|
6739
6958
|
description: string().optional(),
|
|
6740
6959
|
type: TriggerTypeSchema,
|
|
6960
|
+
status: TriggerStatusSchema.optional(),
|
|
6961
|
+
schedule: string().nullable().optional(),
|
|
6962
|
+
sourcePath: string().optional(),
|
|
6741
6963
|
route: string().optional(),
|
|
6742
6964
|
webhookUrl: string().url().optional(),
|
|
6743
6965
|
targetKind: TriggerTargetKindSchema,
|
|
@@ -6747,6 +6969,131 @@ const TriggerListItemSchema = object({
|
|
|
6747
6969
|
const TriggerListResponseSchema = object({ triggers: array(TriggerListItemSchema) });
|
|
6748
6970
|
object({ endpoint: string().min(1).optional() });
|
|
6749
6971
|
const TriggerDetailResponseSchema = TriggerListItemSchema;
|
|
6972
|
+
const TriggerAssignmentSchema = object({
|
|
6973
|
+
kind: TriggerTargetKindSchema,
|
|
6974
|
+
id: string(),
|
|
6975
|
+
slug: string(),
|
|
6976
|
+
name: string()
|
|
6977
|
+
});
|
|
6978
|
+
/** Status of the downstream run/session a dispatched fire produced. */
|
|
6979
|
+
const WorkspaceTriggerRunStatusSchema = _enum([
|
|
6980
|
+
"completed",
|
|
6981
|
+
"running",
|
|
6982
|
+
"failed"
|
|
6983
|
+
]);
|
|
6984
|
+
/**
|
|
6985
|
+
* Categorical reason a fire was recorded but produced no downstream run. These map
|
|
6986
|
+
* from the persisted `trigger_runs.reason` enum onto the labels the UI renders.
|
|
6987
|
+
*/
|
|
6988
|
+
const WorkspaceTriggerSkipReasonSchema = _enum([
|
|
6989
|
+
"filtered",
|
|
6990
|
+
"no_new_data",
|
|
6991
|
+
"transform_undefined"
|
|
6992
|
+
]);
|
|
6993
|
+
/**
|
|
6994
|
+
* A single downstream run/session a dispatched fire produced. A fan-out fire can
|
|
6995
|
+
* dispatch several of these (multiple workflows and/or agents off one source event).
|
|
6996
|
+
*/
|
|
6997
|
+
const WorkspaceTriggerRunTargetSchema = discriminatedUnion("kind", [object({
|
|
6998
|
+
kind: literal("workflow"),
|
|
6999
|
+
runId: string(),
|
|
7000
|
+
workflowId: string(),
|
|
7001
|
+
status: WorkspaceTriggerRunStatusSchema,
|
|
7002
|
+
name: string()
|
|
7003
|
+
}), object({
|
|
7004
|
+
kind: literal("agent"),
|
|
7005
|
+
sessionId: string(),
|
|
7006
|
+
agentId: string(),
|
|
7007
|
+
status: WorkspaceTriggerRunStatusSchema,
|
|
7008
|
+
name: string()
|
|
7009
|
+
})]);
|
|
7010
|
+
/**
|
|
7011
|
+
* Outcome of a single trigger fire — drives the run-history row presentation. Every
|
|
7012
|
+
* recorded fire either dispatched one or more workflow/agent targets, was skipped by
|
|
7013
|
+
* trigger logic, or failed before any target ran.
|
|
7014
|
+
*/
|
|
7015
|
+
const WorkspaceTriggerRunOutcomeSchema = discriminatedUnion("kind", [
|
|
7016
|
+
object({
|
|
7017
|
+
kind: literal("dispatched"),
|
|
7018
|
+
targets: array(WorkspaceTriggerRunTargetSchema)
|
|
7019
|
+
}),
|
|
7020
|
+
object({
|
|
7021
|
+
kind: literal("skipped"),
|
|
7022
|
+
reason: WorkspaceTriggerSkipReasonSchema
|
|
7023
|
+
}),
|
|
7024
|
+
object({
|
|
7025
|
+
kind: literal("failed"),
|
|
7026
|
+
error: string()
|
|
7027
|
+
})
|
|
7028
|
+
]);
|
|
7029
|
+
const WorkspaceTriggerSummarySchema = object({
|
|
7030
|
+
/** `triggers.id` UUID for the trigger row. */
|
|
7031
|
+
id: string(),
|
|
7032
|
+
slug: string(),
|
|
7033
|
+
name: string(),
|
|
7034
|
+
description: string().nullable(),
|
|
7035
|
+
type: TriggerTypeSchema,
|
|
7036
|
+
status: TriggerStatusSchema,
|
|
7037
|
+
projectId: string(),
|
|
7038
|
+
projectName: string(),
|
|
7039
|
+
/** Webhook ingress URL (webhook triggers only). */
|
|
7040
|
+
webhookUrl: string().nullable(),
|
|
7041
|
+
/** Cron expression or poll cadence label (cron/poll triggers only). */
|
|
7042
|
+
schedule: string().nullable(),
|
|
7043
|
+
/** Workflows + agents currently bound to this source. */
|
|
7044
|
+
assignments: array(TriggerAssignmentSchema),
|
|
7045
|
+
lastFiredAt: string().nullable(),
|
|
7046
|
+
fireCount: number$1().int().nonnegative(),
|
|
7047
|
+
createdAt: string()
|
|
7048
|
+
});
|
|
7049
|
+
const WorkspaceTriggerDetailSchema = WorkspaceTriggerSummarySchema.extend({
|
|
7050
|
+
/** Source module file path, relative to the project root. */
|
|
7051
|
+
sourcePath: string() });
|
|
7052
|
+
const WorkspaceTriggerListResponseSchema = array(WorkspaceTriggerSummarySchema);
|
|
7053
|
+
const WorkspaceTriggerRunListResponseSchema = object({
|
|
7054
|
+
items: array(object({
|
|
7055
|
+
id: string(),
|
|
7056
|
+
triggerType: TriggerTypeSchema,
|
|
7057
|
+
triggeredAt: string(),
|
|
7058
|
+
/** Poll/webhook source path or endpoint that produced the fire. */
|
|
7059
|
+
sourcePath: string().nullable(),
|
|
7060
|
+
outcome: WorkspaceTriggerRunOutcomeSchema
|
|
7061
|
+
})),
|
|
7062
|
+
nextCursor: string().nullable()
|
|
7063
|
+
});
|
|
7064
|
+
const WorkspaceTriggerFileSchema = object({
|
|
7065
|
+
path: string(),
|
|
7066
|
+
contents: string()
|
|
7067
|
+
});
|
|
7068
|
+
/** LLM-generated markdown overview envelope served to the web dashboard. */
|
|
7069
|
+
const WorkspaceTriggerOverviewSchema = object({
|
|
7070
|
+
status: _enum([
|
|
7071
|
+
"generating",
|
|
7072
|
+
"ready",
|
|
7073
|
+
"failed"
|
|
7074
|
+
]),
|
|
7075
|
+
markdown: string(),
|
|
7076
|
+
hash: string(),
|
|
7077
|
+
generatedAt: string().nullable(),
|
|
7078
|
+
model: string()
|
|
7079
|
+
});
|
|
7080
|
+
/** Inputs the worker feeds the LLM to generate a trigger overview. */
|
|
7081
|
+
const TriggerOverviewInputSchema = object({
|
|
7082
|
+
name: string(),
|
|
7083
|
+
description: string().nullable(),
|
|
7084
|
+
type: TriggerTypeSchema,
|
|
7085
|
+
schedule: string().nullable(),
|
|
7086
|
+
sourcePath: string(),
|
|
7087
|
+
sourceContents: string(),
|
|
7088
|
+
assignments: array(TriggerAssignmentSchema)
|
|
7089
|
+
});
|
|
7090
|
+
object({
|
|
7091
|
+
triggerId: string(),
|
|
7092
|
+
projectId: string(),
|
|
7093
|
+
triggerHash: string(),
|
|
7094
|
+
model: string(),
|
|
7095
|
+
input: TriggerOverviewInputSchema
|
|
7096
|
+
});
|
|
6750
7097
|
const OrganizationMemberRoleSchema = _enum([
|
|
6751
7098
|
"owner",
|
|
6752
7099
|
"admin",
|
|
@@ -7121,6 +7468,6 @@ const ListAgentWorkspaceFilesResponseSchema = object({ files: array(object({
|
|
|
7121
7468
|
path: string().min(1)
|
|
7122
7469
|
})) });
|
|
7123
7470
|
//#endregion
|
|
7124
|
-
export { HistoryRunListQuerySchema as $,
|
|
7471
|
+
export { HistoryRunListQuerySchema as $, union as $n, UpdateCredentialInstanceBodySchema as $t, CreateCustomAppRequestSchema as A, parseErrorResponse as An, ProjectResponseSchema as At, CredentialConsumerListQuerySchema as B, array as Bn, SkillSummaryListResponseSchema as Bt, ConnectAuthorizeUrlResponseSchema as C, WorkspaceTriggerRunListResponseSchema as Cn, PresignOrgLogoRequestSchema as Ct, CreateCredentialInstanceBodySchema as D, normalizeCredentialList as Dn, PresignUserAvatarRequestSchema as Dt, CreateApiKeyResponseSchema as E, listenPortFromPublicUrl as En, PresignProjectSourceResponseSchema as Et, CreateProjectRequestSchema as F, ZodType as Fn, QueuedAgentPromptResponseSchema as Ft, DownloadActiveProjectArtifactResponseSchema as G, literal as Gn, StartOAuthConnectionResultSchema as Gt, CredentialInstanceListResponseSchema as H, custom as Hn, StartKeystrokeConnectionInputSchema as Ht, CreateProjectResponseSchema as I, _enum as In, QueuedRunResponseSchema as It, GetCredentialResponseSchema as J, object as Jn, TriggerDetailResponseSchema as Jt, ErrorResponseSchema as K, looseObject as Kn, SubmitMarketingContactRequestSchema as Kt, CredentialAssignmentListQuerySchema as L, _function as Ln, ROUTE_MANIFEST_REL_PATH as Lt, CreateOrganizationRequestSchema as M, resolvePublicPlatformOrigin as Mn, ProjectSlugAvailabilityResponseSchema as Mt, CreateOrganizationResponseSchema as N, slugifyAppName as Nn, PromptInputSchema as Nt, CreateCredentialsRequestSchema as O, originFromPublicUrl as On, PresignUserAvatarResponseSchema as Ot, CreateProjectArtifactResponseSchema as P, number as Pn, PromptResponseSchema as Pt, HistoryRunDetailResponseSchema as Q, string as Qn, UpdateChannelBindingBodySchema as Qt, CredentialAssignmentListResponseSchema as R, _null as Rn, RecentResourceListResponseSchema as Rt, CompleteProjectArtifactResponseSchema as S, WorkspaceTriggerOverviewSchema as Sn, PollRunResponseSchema as St, CreateApiKeyRequestSchema as T, credentialInputSchema as Tn, PresignProjectSourceRequestSchema as Tt, CredentialInstanceRecordSchema as U, discriminatedUnion as Un, StartKeystrokeConnectionResultSchema as Ut, CredentialConsumerListResponseSchema as V, boolean as Vn, SlugAvailabilityResponseSchema as Vt, DeclineOrganizationInvitationResponseSchema as W, intersection as Wn, StartOAuthConnectionInputSchema as Wt, HealthResponseSchema as X, preprocess as Xn, TriggerRunDetailResponseSchema as Xt, GetCustomAppResponseSchema as Y, optional as Yn, TriggerListResponseSchema as Yt, HistoryRunCancelResponseSchema as Z, record as Zn, TriggerRunListResponseSchema as Zt, ChannelAccountListResponseSchema as _, WorkflowSummaryDetailResponseSchema as _n, ListProjectMetricsResponseSchema as _t, AgentSessionDetailResponseSchema as a, UpdateProjectMemberResponseSchema as an, LOCAL_PLATFORM_ORIGIN as at, ChannelDirectoryListResponseSchema as b, WorkspaceTriggerFileSchema as bn, OrganizationSidebarBrandingSchema as bt, AgentSummaryListResponseSchema as c, UploadProjectSourceManifestRequestSchema as cn, ListApiKeysResponseSchema as ct, AssignCredentialBodySchema as d, UserAvatarPatchSchema as dn, ListOrganizationInvitationsResponseSchema as dt, UpdateCredentialRequestSchema as en, unknown as er, HistoryRunListResponseSchema as et, BindChannelBodySchema as f, UserAvatarSchema as fn, ListOrganizationMembersResponseSchema as ft, CatalogAppsPageResponseSchema as g, WorkflowRunListResponseSchema as gn, ListProjectMembersResponseSchema as gt, CatalogAppDetailResponseSchema as h, WorkflowRunDetailResponseSchema as hn, ListProjectFilesResponseSchema as ht, AgentSessionChatStateResponseSchema as i, UpdateProjectMemberRequestSchema as in, NEVER as ir, InviteProjectMembersResponseSchema as it, CreateCustomAppResponseSchema as j, parseStoredRouteManifest as jn, ProjectSettingsResponseSchema as jt, CreateCredentialsResponseSchema as k, parseAppSlug as kn, ProjectReachabilityResponseSchema as kt, AgentTriggerSummaryListResponseSchema as l, UploadProjectSourceResponseSchema as ln, ListAppsResponseSchema as lt, CatalogActionsPageResponseSchema as m, UserPreferencesSchema as mn, ListProjectDeploymentsResponseSchema as mt, AcceptOrganizationInvitationResponseSchema as n, UpdateOrganizationMemberResponseSchema as nn, datetime as nr, InviteOrganizationMembersResponseSchema as nt, AgentSessionListResponseSchema as o, UpdateProjectRequestSchema as on, ListAgentMemoryFilesResponseSchema as ot, CatalogActionDetailResponseSchema as p, UserPreferencesPatchSchema as pn, ListOrganizationsResponseSchema as pt, GatewayAttachmentRecordSchema as q, number$1 as qn, SubmitTeamRequestRequestSchema as qt, ActiveOrganizationResponseSchema as r, UpdateOrganizationRequestSchema as rn, toJSONSchema as rr, InviteProjectMembersRequestSchema as rt, AgentSummaryDetailResponseSchema as s, UpdateProjectSettingsRequestSchema as sn, ListAgentWorkspaceFilesResponseSchema as st, ACTIVE_ORG_HEADER as t, UpdateOrganizationMemberRequestSchema as tn, url as tr, InviteOrganizationMembersRequestSchema as tt, AppSlugAvailabilityResponseSchema as u, UpsertGatewayAttachmentBodySchema as un, ListCredentialsResponseSchema as ut, ChannelConnectionListResponseSchema as v, WorkflowSummaryListResponseSchema as vn, ListProjectsResponseSchema as vt, ConnectProvidersResponseSchema as w, buildConnectDeeplink as wn, PresignOrgLogoResponseSchema as wt, ChannelPlatformSchema as x, WorkspaceTriggerListResponseSchema as xn, PROJECT_REACHABILITY_REQUEST_TIMEOUT_MS as xt, ChannelConnectionSchema as y, WorkspaceTriggerDetailSchema as yn, OrganizationSidebarBrandingPatchSchema as yt, CredentialAssignmentRecordSchema as z, any as zn, SkillSummaryDetailResponseSchema as zt };
|
|
7125
7472
|
|
|
7126
|
-
//# sourceMappingURL=dist-
|
|
7473
|
+
//# sourceMappingURL=dist-BUK3crkq.mjs.map
|