@keystrokehq/keystroke 1.0.20 → 1.0.22
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/action.cjs +1 -1
- package/dist/action.mjs +1 -1
- package/dist/agent.cjs +4 -4
- package/dist/agent.cjs.map +1 -1
- package/dist/agent.mjs +4 -4
- package/dist/agent.mjs.map +1 -1
- package/dist/app.cjs +1 -1
- package/dist/app.mjs +1 -1
- package/dist/client.cjs +1 -1
- package/dist/client.mjs +1 -1
- package/dist/config.d.cts +2 -2
- package/dist/config.d.cts.map +1 -1
- package/dist/config.d.mts +2 -2
- package/dist/config.d.mts.map +1 -1
- package/dist/credentials.cjs +1 -1
- package/dist/credentials.mjs +1 -1
- package/dist/{dist-CHlytoPR.cjs → dist-CE8Bys_M.cjs} +160 -3
- package/dist/dist-CE8Bys_M.cjs.map +1 -0
- package/dist/{dist-D_ZLF88C.mjs → dist-CYP5TXGO.mjs} +3 -3
- package/dist/{dist-D_ZLF88C.mjs.map → dist-CYP5TXGO.mjs.map} +1 -1
- package/dist/{dist-BF8uTixs.cjs → dist-CbLrJ50M.cjs} +65 -41
- package/dist/dist-CbLrJ50M.cjs.map +1 -0
- package/dist/{dist-BZaoAtmj.cjs → dist-CwfjWo4B.cjs} +3 -3
- package/dist/{dist-BZaoAtmj.cjs.map → dist-CwfjWo4B.cjs.map} +1 -1
- package/dist/{dist-Bqsbf3hX.mjs → dist-DN31JPna.mjs} +65 -41
- package/dist/dist-DN31JPna.mjs.map +1 -0
- package/dist/{dist-D0HbZRpR.mjs → dist-Kz_xVVMR.mjs} +160 -3
- package/dist/dist-Kz_xVVMR.mjs.map +1 -0
- package/dist/index-BTz2OMAM.d.cts.map +1 -1
- package/dist/index-Cq2F2XdS.d.mts.map +1 -1
- package/dist/index-WT4ULMiw.d.cts.map +1 -1
- package/dist/index-WT4ULMiw.d.mts.map +1 -1
- package/dist/{mistral-BAq-vJbL.cjs → mistral-BrDQAJSw.cjs} +2 -2
- package/dist/{mistral-BAq-vJbL.cjs.map → mistral-BrDQAJSw.cjs.map} +1 -1
- package/dist/{mistral-kplxV6Rf.mjs → mistral-j9b3vM0i.mjs} +2 -2
- package/dist/{mistral-kplxV6Rf.mjs.map → mistral-j9b3vM0i.mjs.map} +1 -1
- package/dist/{sse-DQi5Gnnd.mjs → sse-DUu9Naud.mjs} +2 -2
- package/dist/{sse-DQi5Gnnd.mjs.map → sse-DUu9Naud.mjs.map} +1 -1
- package/dist/{sse-5bXReLPW.cjs → sse-DaIihZIC.cjs} +2 -2
- package/dist/{sse-5bXReLPW.cjs.map → sse-DaIihZIC.cjs.map} +1 -1
- package/dist/trigger.cjs +68 -12
- package/dist/trigger.cjs.map +1 -1
- package/dist/trigger.d.cts +29 -5
- package/dist/trigger.d.cts.map +1 -1
- package/dist/trigger.d.mts +29 -5
- package/dist/trigger.d.mts.map +1 -1
- package/dist/trigger.mjs +66 -13
- package/dist/trigger.mjs.map +1 -1
- package/dist/workflow.cjs +1 -1
- package/dist/workflow.mjs +1 -1
- package/package.json +3 -3
- package/dist/dist-BF8uTixs.cjs.map +0 -1
- package/dist/dist-Bqsbf3hX.mjs.map +0 -1
- package/dist/dist-CHlytoPR.cjs.map +0 -1
- package/dist/dist-D0HbZRpR.mjs.map +0 -1
|
@@ -704,13 +704,17 @@ const storedRouteManifestEntryV2Schema = zod.z.discriminatedUnion("kind", [
|
|
|
704
704
|
endpoint: zod.z.string(),
|
|
705
705
|
attachmentIds: zod.z.array(zod.z.string()),
|
|
706
706
|
moduleFile: zod.z.string(),
|
|
707
|
+
/** sha256 of the trigger source file, baked at build time for overview change-detection. */
|
|
708
|
+
sourceHash: zod.z.string().optional(),
|
|
707
709
|
attachmentSchemas: attachmentSchemasSchema,
|
|
708
710
|
attachmentMeta: attachmentMetaSchema.optional()
|
|
709
711
|
}),
|
|
710
712
|
zod.z.object({
|
|
711
713
|
kind: zod.z.literal("trigger-poll"),
|
|
712
714
|
attachmentId: zod.z.string(),
|
|
715
|
+
attachmentIds: zod.z.array(zod.z.string()),
|
|
713
716
|
moduleFile: zod.z.string(),
|
|
717
|
+
sourceHash: zod.z.string().optional(),
|
|
714
718
|
schedule: zod.z.string(),
|
|
715
719
|
name: zod.z.string().optional(),
|
|
716
720
|
description: zod.z.string().optional()
|
|
@@ -725,7 +729,9 @@ const storedRouteManifestEntryV2Schema = zod.z.discriminatedUnion("kind", [
|
|
|
725
729
|
zod.z.object({
|
|
726
730
|
kind: zod.z.literal("cron-schedule"),
|
|
727
731
|
attachmentId: zod.z.string(),
|
|
732
|
+
attachmentIds: zod.z.array(zod.z.string()),
|
|
728
733
|
moduleFile: zod.z.string(),
|
|
734
|
+
sourceHash: zod.z.string().optional(),
|
|
729
735
|
schedule: zod.z.string(),
|
|
730
736
|
name: zod.z.string().optional(),
|
|
731
737
|
description: zod.z.string().optional()
|
|
@@ -1938,6 +1944,18 @@ const TriggerRunTypeSchema = zod.z.enum([
|
|
|
1938
1944
|
"webhook",
|
|
1939
1945
|
"poll"
|
|
1940
1946
|
]);
|
|
1947
|
+
const TriggerRunOutcomeSchema = zod.z.enum([
|
|
1948
|
+
"dispatched",
|
|
1949
|
+
"skipped",
|
|
1950
|
+
"failed"
|
|
1951
|
+
]);
|
|
1952
|
+
const TriggerRunReasonSchema = zod.z.enum([
|
|
1953
|
+
"filter_rejected",
|
|
1954
|
+
"transform_undefined",
|
|
1955
|
+
"invalid_payload",
|
|
1956
|
+
"source_error",
|
|
1957
|
+
"handler_error"
|
|
1958
|
+
]);
|
|
1941
1959
|
const TriggerRunWorkflowSummarySchema = zod.z.object({
|
|
1942
1960
|
id: zod.z.string(),
|
|
1943
1961
|
status: WorkflowRunStatusSchema,
|
|
@@ -1952,8 +1970,13 @@ const TriggerRunSummarySchema = zod.z.object({
|
|
|
1952
1970
|
triggerType: TriggerRunTypeSchema,
|
|
1953
1971
|
triggeredAt: zod.z.string(),
|
|
1954
1972
|
sourcePath: zod.z.string().nullable(),
|
|
1955
|
-
|
|
1956
|
-
|
|
1973
|
+
outcome: TriggerRunOutcomeSchema,
|
|
1974
|
+
reason: TriggerRunReasonSchema.nullable(),
|
|
1975
|
+
detail: zod.z.string().nullable(),
|
|
1976
|
+
/** Workflow runs dispatched by this fire (fan-out → one per matched workflow attachment). */
|
|
1977
|
+
workflowRuns: zod.z.array(TriggerRunWorkflowSummarySchema),
|
|
1978
|
+
/** Agent sessions dispatched by this fire (fan-out → one per matched agent attachment). */
|
|
1979
|
+
agentSessions: zod.z.array(TriggerRunAgentSessionSummarySchema)
|
|
1957
1980
|
});
|
|
1958
1981
|
const TriggerRunRecordSchema = zod.z.object({
|
|
1959
1982
|
id: zod.z.string(),
|
|
@@ -1961,6 +1984,9 @@ const TriggerRunRecordSchema = zod.z.object({
|
|
|
1961
1984
|
attachmentSlug: zod.z.string(),
|
|
1962
1985
|
triggerType: TriggerRunTypeSchema,
|
|
1963
1986
|
sourcePath: zod.z.string().nullable(),
|
|
1987
|
+
outcome: TriggerRunOutcomeSchema,
|
|
1988
|
+
reason: TriggerRunReasonSchema.nullable(),
|
|
1989
|
+
detail: zod.z.string().nullable(),
|
|
1964
1990
|
payload: zod.z.unknown().nullable(),
|
|
1965
1991
|
triggeredAt: zod.z.string()
|
|
1966
1992
|
});
|
|
@@ -1995,11 +2021,15 @@ const TriggerTypeSchema = zod.z.enum([
|
|
|
1995
2021
|
"cron"
|
|
1996
2022
|
]);
|
|
1997
2023
|
const TriggerTargetKindSchema = zod.z.enum(["workflow", "agent"]);
|
|
2024
|
+
const TriggerStatusSchema = zod.z.enum(["active", "disabled"]);
|
|
1998
2025
|
const TriggerListItemSchema = zod.z.object({
|
|
1999
2026
|
slug: zod.z.string(),
|
|
2000
2027
|
name: zod.z.string().optional(),
|
|
2001
2028
|
description: zod.z.string().optional(),
|
|
2002
2029
|
type: TriggerTypeSchema,
|
|
2030
|
+
status: TriggerStatusSchema.optional(),
|
|
2031
|
+
schedule: zod.z.string().nullable().optional(),
|
|
2032
|
+
sourcePath: zod.z.string().optional(),
|
|
2003
2033
|
route: zod.z.string().optional(),
|
|
2004
2034
|
webhookUrl: zod.z.string().url().optional(),
|
|
2005
2035
|
targetKind: TriggerTargetKindSchema,
|
|
@@ -2008,6 +2038,133 @@ const TriggerListItemSchema = zod.z.object({
|
|
|
2008
2038
|
});
|
|
2009
2039
|
zod.z.object({ triggers: zod.z.array(TriggerListItemSchema) });
|
|
2010
2040
|
zod.z.object({ endpoint: zod.z.string().min(1).optional() });
|
|
2041
|
+
const TriggerAssignmentSchema = zod.z.object({
|
|
2042
|
+
kind: TriggerTargetKindSchema,
|
|
2043
|
+
id: zod.z.string(),
|
|
2044
|
+
slug: zod.z.string(),
|
|
2045
|
+
name: zod.z.string()
|
|
2046
|
+
});
|
|
2047
|
+
/** Status of the downstream run/session a dispatched fire produced. */
|
|
2048
|
+
const WorkspaceTriggerRunStatusSchema = zod.z.enum([
|
|
2049
|
+
"completed",
|
|
2050
|
+
"running",
|
|
2051
|
+
"failed"
|
|
2052
|
+
]);
|
|
2053
|
+
/**
|
|
2054
|
+
* Categorical reason a fire was recorded but produced no downstream run. These map
|
|
2055
|
+
* from the persisted `trigger_runs.reason` enum onto the labels the UI renders.
|
|
2056
|
+
*/
|
|
2057
|
+
const WorkspaceTriggerSkipReasonSchema = zod.z.enum([
|
|
2058
|
+
"filtered",
|
|
2059
|
+
"no_new_data",
|
|
2060
|
+
"transform_undefined"
|
|
2061
|
+
]);
|
|
2062
|
+
/**
|
|
2063
|
+
* A single downstream run/session a dispatched fire produced. A fan-out fire can
|
|
2064
|
+
* dispatch several of these (multiple workflows and/or agents off one source event).
|
|
2065
|
+
*/
|
|
2066
|
+
const WorkspaceTriggerRunTargetSchema = zod.z.discriminatedUnion("kind", [zod.z.object({
|
|
2067
|
+
kind: zod.z.literal("workflow"),
|
|
2068
|
+
runId: zod.z.string(),
|
|
2069
|
+
workflowId: zod.z.string(),
|
|
2070
|
+
status: WorkspaceTriggerRunStatusSchema,
|
|
2071
|
+
name: zod.z.string()
|
|
2072
|
+
}), zod.z.object({
|
|
2073
|
+
kind: zod.z.literal("agent"),
|
|
2074
|
+
sessionId: zod.z.string(),
|
|
2075
|
+
agentId: zod.z.string(),
|
|
2076
|
+
status: WorkspaceTriggerRunStatusSchema,
|
|
2077
|
+
name: zod.z.string()
|
|
2078
|
+
})]);
|
|
2079
|
+
/**
|
|
2080
|
+
* Outcome of a single trigger fire — drives the run-history row presentation. Every
|
|
2081
|
+
* recorded fire either dispatched one or more workflow/agent targets, was skipped by
|
|
2082
|
+
* trigger logic, or failed before any target ran.
|
|
2083
|
+
*/
|
|
2084
|
+
const WorkspaceTriggerRunOutcomeSchema = zod.z.discriminatedUnion("kind", [
|
|
2085
|
+
zod.z.object({
|
|
2086
|
+
kind: zod.z.literal("dispatched"),
|
|
2087
|
+
targets: zod.z.array(WorkspaceTriggerRunTargetSchema)
|
|
2088
|
+
}),
|
|
2089
|
+
zod.z.object({
|
|
2090
|
+
kind: zod.z.literal("skipped"),
|
|
2091
|
+
reason: WorkspaceTriggerSkipReasonSchema
|
|
2092
|
+
}),
|
|
2093
|
+
zod.z.object({
|
|
2094
|
+
kind: zod.z.literal("failed"),
|
|
2095
|
+
error: zod.z.string()
|
|
2096
|
+
})
|
|
2097
|
+
]);
|
|
2098
|
+
const WorkspaceTriggerSummarySchema = zod.z.object({
|
|
2099
|
+
/** `triggers.id` UUID for the trigger row. */
|
|
2100
|
+
id: zod.z.string(),
|
|
2101
|
+
slug: zod.z.string(),
|
|
2102
|
+
name: zod.z.string(),
|
|
2103
|
+
description: zod.z.string().nullable(),
|
|
2104
|
+
type: TriggerTypeSchema,
|
|
2105
|
+
status: TriggerStatusSchema,
|
|
2106
|
+
projectId: zod.z.string(),
|
|
2107
|
+
projectName: zod.z.string(),
|
|
2108
|
+
/** Webhook ingress URL (webhook triggers only). */
|
|
2109
|
+
webhookUrl: zod.z.string().nullable(),
|
|
2110
|
+
/** Cron expression or poll cadence label (cron/poll triggers only). */
|
|
2111
|
+
schedule: zod.z.string().nullable(),
|
|
2112
|
+
/** Workflows + agents currently bound to this source. */
|
|
2113
|
+
assignments: zod.z.array(TriggerAssignmentSchema),
|
|
2114
|
+
lastFiredAt: zod.z.string().nullable(),
|
|
2115
|
+
fireCount: zod.z.number().int().nonnegative(),
|
|
2116
|
+
createdAt: zod.z.string()
|
|
2117
|
+
});
|
|
2118
|
+
WorkspaceTriggerSummarySchema.extend({
|
|
2119
|
+
/** Source module file path, relative to the project root. */
|
|
2120
|
+
sourcePath: zod.z.string() });
|
|
2121
|
+
zod.z.array(WorkspaceTriggerSummarySchema);
|
|
2122
|
+
const WorkspaceTriggerRunSummarySchema = zod.z.object({
|
|
2123
|
+
id: zod.z.string(),
|
|
2124
|
+
triggerType: TriggerTypeSchema,
|
|
2125
|
+
triggeredAt: zod.z.string(),
|
|
2126
|
+
/** Poll/webhook source path or endpoint that produced the fire. */
|
|
2127
|
+
sourcePath: zod.z.string().nullable(),
|
|
2128
|
+
outcome: WorkspaceTriggerRunOutcomeSchema
|
|
2129
|
+
});
|
|
2130
|
+
zod.z.object({
|
|
2131
|
+
items: zod.z.array(WorkspaceTriggerRunSummarySchema),
|
|
2132
|
+
nextCursor: zod.z.string().nullable()
|
|
2133
|
+
});
|
|
2134
|
+
zod.z.object({
|
|
2135
|
+
path: zod.z.string(),
|
|
2136
|
+
contents: zod.z.string()
|
|
2137
|
+
});
|
|
2138
|
+
/** Whether the LLM overview is still being produced, finished, or errored. */
|
|
2139
|
+
const WorkspaceTriggerOverviewStatusSchema = zod.z.enum([
|
|
2140
|
+
"generating",
|
|
2141
|
+
"ready",
|
|
2142
|
+
"failed"
|
|
2143
|
+
]);
|
|
2144
|
+
zod.z.object({
|
|
2145
|
+
status: WorkspaceTriggerOverviewStatusSchema,
|
|
2146
|
+
markdown: zod.z.string(),
|
|
2147
|
+
hash: zod.z.string(),
|
|
2148
|
+
generatedAt: zod.z.string().nullable(),
|
|
2149
|
+
model: zod.z.string()
|
|
2150
|
+
});
|
|
2151
|
+
/** Inputs the worker feeds the LLM to generate a trigger overview. */
|
|
2152
|
+
const TriggerOverviewInputSchema = zod.z.object({
|
|
2153
|
+
name: zod.z.string(),
|
|
2154
|
+
description: zod.z.string().nullable(),
|
|
2155
|
+
type: TriggerTypeSchema,
|
|
2156
|
+
schedule: zod.z.string().nullable(),
|
|
2157
|
+
sourcePath: zod.z.string(),
|
|
2158
|
+
sourceContents: zod.z.string(),
|
|
2159
|
+
assignments: zod.z.array(TriggerAssignmentSchema)
|
|
2160
|
+
});
|
|
2161
|
+
zod.z.object({
|
|
2162
|
+
triggerId: zod.z.string(),
|
|
2163
|
+
projectId: zod.z.string(),
|
|
2164
|
+
triggerHash: zod.z.string(),
|
|
2165
|
+
model: zod.z.string(),
|
|
2166
|
+
input: TriggerOverviewInputSchema
|
|
2167
|
+
});
|
|
2011
2168
|
const OrganizationMemberRoleSchema = zod.z.enum([
|
|
2012
2169
|
"owner",
|
|
2013
2170
|
"admin",
|
|
@@ -2818,4 +2975,4 @@ Object.defineProperty(exports, "toolParameters", {
|
|
|
2818
2975
|
}
|
|
2819
2976
|
});
|
|
2820
2977
|
|
|
2821
|
-
//# sourceMappingURL=dist-
|
|
2978
|
+
//# sourceMappingURL=dist-CE8Bys_M.cjs.map
|