@schoolai/shipyard 3.28.0 → 3.29.0-rc.20260908.0
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/capability-detector-worker.js +4 -4
- package/dist/{chunk-HJXABEEV.js → chunk-4STNC5NO.js} +2 -2
- package/dist/{chunk-XUDNZERJ.js → chunk-55ZQ4RW6.js} +2 -2
- package/dist/{chunk-GBMR7R3J.js → chunk-73WBQO4T.js} +33 -2
- package/dist/{chunk-GBMR7R3J.js.map → chunk-73WBQO4T.js.map} +1 -1
- package/dist/{chunk-KKWHJ3BN.js → chunk-FNZ7OWSZ.js} +2 -2
- package/dist/{chunk-P56H5RCU.js → chunk-HBQHLK4G.js} +19 -4
- package/dist/chunk-HBQHLK4G.js.map +1 -0
- package/dist/{chunk-PS5MSEV6.js → chunk-NZKLLFRA.js} +3 -3
- package/dist/chunk-NZKLLFRA.js.map +1 -0
- package/dist/{chunk-JMXLEJCV.js → chunk-WO4YQPLB.js} +516 -14
- package/dist/chunk-WO4YQPLB.js.map +1 -0
- package/dist/{chunk-GUD5HUAM.js → chunk-Z42EKCC5.js} +3 -3
- package/dist/cursor-runner.js +3 -3
- package/dist/electron-utility.js +2 -2
- package/dist/index.js +4 -4
- package/dist/{login-5XG2GCJN.js → login-4SAAPONQ.js} +3 -3
- package/dist/{plan-backfill-RTYIZRZW.js → plan-backfill-QJUIVGRP.js} +4 -4
- package/dist/{serve-HNZN47KN.js → serve-UWXIY7F3.js} +3980 -685
- package/dist/{serve-HNZN47KN.js.map → serve-UWXIY7F3.js.map} +1 -1
- package/dist/{start-BCGXIN7G.js → start-PPBKTC73.js} +6 -6
- package/package.json +2 -1
- package/dist/chunk-JMXLEJCV.js.map +0 -1
- package/dist/chunk-P56H5RCU.js.map +0 -1
- package/dist/chunk-PS5MSEV6.js.map +0 -1
- /package/dist/{chunk-HJXABEEV.js.map → chunk-4STNC5NO.js.map} +0 -0
- /package/dist/{chunk-XUDNZERJ.js.map → chunk-55ZQ4RW6.js.map} +0 -0
- /package/dist/{chunk-KKWHJ3BN.js.map → chunk-FNZ7OWSZ.js.map} +0 -0
- /package/dist/{chunk-GUD5HUAM.js.map → chunk-Z42EKCC5.js.map} +0 -0
- /package/dist/{login-5XG2GCJN.js.map → login-4SAAPONQ.js.map} +0 -0
- /package/dist/{plan-backfill-RTYIZRZW.js.map → plan-backfill-QJUIVGRP.js.map} +0 -0
- /package/dist/{start-BCGXIN7G.js.map → start-PPBKTC73.js.map} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
PUBLISHED_PREVIEW_KINDS,
|
|
4
4
|
PUBLISH_TTL_CHOICES
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NZKLLFRA.js";
|
|
6
6
|
import {
|
|
7
7
|
external_exports
|
|
8
8
|
} from "./chunk-JCEWPG3R.js";
|
|
@@ -7364,6 +7364,15 @@ var CAPABILITY_BY_ACTION = {
|
|
|
7364
7364
|
delete_schedule: "manage_schedules",
|
|
7365
7365
|
list_schedules: "manage_schedules",
|
|
7366
7366
|
run_schedule_now: "manage_schedules",
|
|
7367
|
+
save_automation: "manage_schedules",
|
|
7368
|
+
set_automation_enabled: "manage_schedules",
|
|
7369
|
+
run_automation_now: "manage_schedules",
|
|
7370
|
+
stop_automation_run: "manage_schedules",
|
|
7371
|
+
retry_automation_run: "manage_schedules",
|
|
7372
|
+
list_automations: "manage_schedules",
|
|
7373
|
+
list_automation_runs: "manage_schedules",
|
|
7374
|
+
preview_automation: "manage_schedules",
|
|
7375
|
+
list_automation_candidates: "manage_schedules",
|
|
7367
7376
|
create_template: "manage_templates",
|
|
7368
7377
|
update_template: "manage_templates",
|
|
7369
7378
|
delete_template: "manage_templates",
|
|
@@ -8752,6 +8761,7 @@ var NotificationKindSchema = external_exports.enum([
|
|
|
8752
8761
|
"task_error",
|
|
8753
8762
|
"subagent_done",
|
|
8754
8763
|
"schedule_fired",
|
|
8764
|
+
"automation_result",
|
|
8755
8765
|
"agent_action"
|
|
8756
8766
|
]);
|
|
8757
8767
|
var NotificationTierSchema = external_exports.enum(["L0", "L1", "L2", "L3", "L4"]);
|
|
@@ -8802,7 +8812,8 @@ var ReplyPayloadSchema = external_exports.object({
|
|
|
8802
8812
|
var TaskErrorPayloadSchema = external_exports.object({
|
|
8803
8813
|
kind: external_exports.literal("task_error"),
|
|
8804
8814
|
errorKind: external_exports.string(),
|
|
8805
|
-
message: external_exports.string().optional()
|
|
8815
|
+
message: external_exports.string().optional(),
|
|
8816
|
+
automationRunId: external_exports.string().optional()
|
|
8806
8817
|
});
|
|
8807
8818
|
var SubagentDonePayloadSchema = external_exports.object({
|
|
8808
8819
|
kind: external_exports.literal("subagent_done"),
|
|
@@ -8814,6 +8825,20 @@ var ScheduleFiredPayloadSchema = external_exports.object({
|
|
|
8814
8825
|
scheduleId: external_exports.string(),
|
|
8815
8826
|
scheduleName: external_exports.string().optional()
|
|
8816
8827
|
});
|
|
8828
|
+
var AutomationResultOutcomeSchema = external_exports.enum([
|
|
8829
|
+
"completed",
|
|
8830
|
+
"failed",
|
|
8831
|
+
"stopped",
|
|
8832
|
+
"uncertain",
|
|
8833
|
+
"skipped"
|
|
8834
|
+
]);
|
|
8835
|
+
var AutomationResultPayloadSchema = external_exports.object({
|
|
8836
|
+
kind: external_exports.literal("automation_result"),
|
|
8837
|
+
scheduleId: external_exports.string(),
|
|
8838
|
+
runId: external_exports.string(),
|
|
8839
|
+
scheduleName: external_exports.string().optional(),
|
|
8840
|
+
outcome: AutomationResultOutcomeSchema
|
|
8841
|
+
});
|
|
8817
8842
|
var AgentActionSurfaceSchema = external_exports.enum([
|
|
8818
8843
|
"canvas",
|
|
8819
8844
|
"deliverables",
|
|
@@ -8845,6 +8870,7 @@ var NotificationPayloadSchema = external_exports.discriminatedUnion("kind", [
|
|
|
8845
8870
|
TaskErrorPayloadSchema,
|
|
8846
8871
|
SubagentDonePayloadSchema,
|
|
8847
8872
|
ScheduleFiredPayloadSchema,
|
|
8873
|
+
AutomationResultPayloadSchema,
|
|
8848
8874
|
AgentActionPayloadSchema
|
|
8849
8875
|
]);
|
|
8850
8876
|
var NotificationSchema = external_exports.object({
|
|
@@ -19509,7 +19535,56 @@ var BrowserPreviewUrlRequestSchema = external_exports.object({
|
|
|
19509
19535
|
|
|
19510
19536
|
// ../../packages/loro-schema/src/schedule-schemas.ts
|
|
19511
19537
|
var scheduleRunStatuses = ["completed", "failed", "canceled"];
|
|
19512
|
-
var
|
|
19538
|
+
var AutomationEventInputSchema = external_exports.object({
|
|
19539
|
+
source: external_exports.literal("github"),
|
|
19540
|
+
repository: external_exports.string().min(1),
|
|
19541
|
+
pullRequest: external_exports.object({
|
|
19542
|
+
number: external_exports.number().int().positive(),
|
|
19543
|
+
url: external_exports.string().url(),
|
|
19544
|
+
title: external_exports.string(),
|
|
19545
|
+
body: external_exports.string().nullable(),
|
|
19546
|
+
headSha: external_exports.string().min(1)
|
|
19547
|
+
}),
|
|
19548
|
+
requestedReviewer: external_exports.string().min(1),
|
|
19549
|
+
observedAt: external_exports.number()
|
|
19550
|
+
});
|
|
19551
|
+
var AutomationTriggerSchema = external_exports.discriminatedUnion("type", [
|
|
19552
|
+
external_exports.object({
|
|
19553
|
+
type: external_exports.literal("cron"),
|
|
19554
|
+
expression: external_exports.string().min(1),
|
|
19555
|
+
timezone: external_exports.string().min(1)
|
|
19556
|
+
}),
|
|
19557
|
+
external_exports.object({
|
|
19558
|
+
type: external_exports.literal("github-review-request"),
|
|
19559
|
+
repository: external_exports.string().min(1)
|
|
19560
|
+
})
|
|
19561
|
+
]);
|
|
19562
|
+
var AutomationWorkspaceSchema = external_exports.discriminatedUnion("mode", [
|
|
19563
|
+
external_exports.object({
|
|
19564
|
+
mode: external_exports.literal("selected-folder"),
|
|
19565
|
+
path: external_exports.string().min(1),
|
|
19566
|
+
/** Empty is retained only for legacy non-Git selected folders. */
|
|
19567
|
+
branch: external_exports.string()
|
|
19568
|
+
}),
|
|
19569
|
+
external_exports.object({
|
|
19570
|
+
mode: external_exports.literal("isolated-worktree"),
|
|
19571
|
+
repositoryPath: external_exports.string().min(1),
|
|
19572
|
+
baseBranch: external_exports.string().min(1)
|
|
19573
|
+
})
|
|
19574
|
+
]);
|
|
19575
|
+
var AutomationConfigurationSchema = external_exports.object({
|
|
19576
|
+
name: external_exports.string().min(1),
|
|
19577
|
+
prompt: external_exports.string().min(1),
|
|
19578
|
+
enabled: external_exports.boolean(),
|
|
19579
|
+
trigger: AutomationTriggerSchema,
|
|
19580
|
+
workspace: AutomationWorkspaceSchema,
|
|
19581
|
+
model: external_exports.string().min(1),
|
|
19582
|
+
reasoningEffort: ReasoningEffortSchema,
|
|
19583
|
+
permissionMode: PermissionModeSchema,
|
|
19584
|
+
fastMode: external_exports.boolean(),
|
|
19585
|
+
disabledMcpServers: external_exports.array(external_exports.string())
|
|
19586
|
+
});
|
|
19587
|
+
var AutomationRecordSchema = external_exports.object({
|
|
19513
19588
|
id: external_exports.string(),
|
|
19514
19589
|
name: external_exports.string(),
|
|
19515
19590
|
prompt: external_exports.string(),
|
|
@@ -19528,23 +19603,435 @@ var ScheduleRecordSchema = external_exports.object({
|
|
|
19528
19603
|
updatedAt: external_exports.number(),
|
|
19529
19604
|
lastRunAt: external_exports.number().nullable(),
|
|
19530
19605
|
lastRunTaskId: external_exports.string().nullable(),
|
|
19531
|
-
lastRunStatus: external_exports.enum(scheduleRunStatuses).nullable()
|
|
19606
|
+
lastRunStatus: external_exports.enum(scheduleRunStatuses).nullable(),
|
|
19607
|
+
/** Absent records use cron + daemon-local timezone semantics. */
|
|
19608
|
+
trigger: AutomationTriggerSchema.optional(),
|
|
19609
|
+
/** Absent records retain selected-folder behavior from environment. */
|
|
19610
|
+
workspace: AutomationWorkspaceSchema.optional()
|
|
19611
|
+
});
|
|
19612
|
+
var ScheduleRecordSchema = AutomationRecordSchema;
|
|
19613
|
+
var AutomationRunInputSchema = external_exports.discriminatedUnion("type", [
|
|
19614
|
+
external_exports.object({
|
|
19615
|
+
type: external_exports.literal("cron"),
|
|
19616
|
+
mode: external_exports.enum(["scheduled", "manual"]),
|
|
19617
|
+
scheduledFor: external_exports.number().nullable(),
|
|
19618
|
+
requestedAt: external_exports.number()
|
|
19619
|
+
}),
|
|
19620
|
+
external_exports.object({
|
|
19621
|
+
type: external_exports.literal("github-review-request"),
|
|
19622
|
+
mode: external_exports.enum(["event", "manual", "retry"]),
|
|
19623
|
+
event: AutomationEventInputSchema
|
|
19624
|
+
})
|
|
19625
|
+
]);
|
|
19626
|
+
var AutomationRunProvenanceSchema = external_exports.discriminatedUnion("type", [
|
|
19627
|
+
external_exports.object({
|
|
19628
|
+
type: external_exports.literal("cron"),
|
|
19629
|
+
mode: external_exports.enum(["scheduled", "manual"]),
|
|
19630
|
+
scheduledFor: external_exports.number().nullable(),
|
|
19631
|
+
requestedAt: external_exports.number(),
|
|
19632
|
+
catchUp: external_exports.boolean()
|
|
19633
|
+
}),
|
|
19634
|
+
external_exports.object({
|
|
19635
|
+
type: external_exports.literal("github-review-request"),
|
|
19636
|
+
mode: external_exports.enum(["event", "manual", "retry"]),
|
|
19637
|
+
repository: external_exports.string().min(1),
|
|
19638
|
+
pullRequestNumber: external_exports.number().int().positive(),
|
|
19639
|
+
pullRequestUrl: external_exports.string().url(),
|
|
19640
|
+
pullRequestTitle: external_exports.string(),
|
|
19641
|
+
headSha: external_exports.string().min(1),
|
|
19642
|
+
requestedReviewer: external_exports.string().min(1),
|
|
19643
|
+
observedAt: external_exports.number()
|
|
19644
|
+
})
|
|
19645
|
+
]);
|
|
19646
|
+
var AutomationFrozenConfigurationSchema = external_exports.object({
|
|
19647
|
+
prompt: external_exports.string(),
|
|
19648
|
+
workspace: AutomationWorkspaceSchema,
|
|
19649
|
+
model: external_exports.string(),
|
|
19650
|
+
reasoningEffort: ReasoningEffortSchema,
|
|
19651
|
+
permissionMode: PermissionModeSchema,
|
|
19652
|
+
fastMode: external_exports.boolean(),
|
|
19653
|
+
disabledMcpServers: external_exports.array(external_exports.string())
|
|
19654
|
+
});
|
|
19655
|
+
var AutomationRunPhaseSchema = external_exports.enum([
|
|
19656
|
+
"queued",
|
|
19657
|
+
"preparing",
|
|
19658
|
+
"dispatching",
|
|
19659
|
+
"running",
|
|
19660
|
+
"waiting_for_input",
|
|
19661
|
+
"finalizing",
|
|
19662
|
+
"terminal"
|
|
19663
|
+
]);
|
|
19664
|
+
var AutomationDispatchStateSchema = external_exports.discriminatedUnion("state", [
|
|
19665
|
+
external_exports.object({ state: external_exports.literal("not-dispatched") }),
|
|
19666
|
+
external_exports.object({ state: external_exports.literal("intent-persisted"), intentPersistedAt: external_exports.number() }),
|
|
19667
|
+
external_exports.object({
|
|
19668
|
+
state: external_exports.literal("confirmed"),
|
|
19669
|
+
intentPersistedAt: external_exports.number(),
|
|
19670
|
+
confirmedAt: external_exports.number()
|
|
19671
|
+
}),
|
|
19672
|
+
external_exports.object({
|
|
19673
|
+
state: external_exports.literal("uncertain"),
|
|
19674
|
+
intentPersistedAt: external_exports.number(),
|
|
19675
|
+
detectedAt: external_exports.number(),
|
|
19676
|
+
reason: external_exports.string()
|
|
19677
|
+
})
|
|
19678
|
+
]);
|
|
19679
|
+
var AutomationTerminalOutcomeSchema = external_exports.discriminatedUnion("status", [
|
|
19680
|
+
external_exports.object({ status: external_exports.literal("completed"), at: external_exports.number() }),
|
|
19681
|
+
external_exports.object({ status: external_exports.literal("failed"), at: external_exports.number(), error: external_exports.string() }),
|
|
19682
|
+
external_exports.object({ status: external_exports.literal("stopped"), at: external_exports.number(), reason: external_exports.string().nullable() }),
|
|
19683
|
+
external_exports.object({ status: external_exports.literal("uncertain"), at: external_exports.number(), error: external_exports.string() }),
|
|
19684
|
+
external_exports.object({
|
|
19685
|
+
status: external_exports.literal("skipped"),
|
|
19686
|
+
at: external_exports.number(),
|
|
19687
|
+
reason: external_exports.enum([
|
|
19688
|
+
"busy",
|
|
19689
|
+
"disabled",
|
|
19690
|
+
"duplicate",
|
|
19691
|
+
"event-expired",
|
|
19692
|
+
"event-overflow",
|
|
19693
|
+
"ineligible",
|
|
19694
|
+
"catch-up-expired"
|
|
19695
|
+
])
|
|
19696
|
+
})
|
|
19697
|
+
]);
|
|
19698
|
+
function availabilitySchema(value) {
|
|
19699
|
+
return external_exports.discriminatedUnion("availability", [
|
|
19700
|
+
external_exports.object({ availability: external_exports.literal("available"), value }),
|
|
19701
|
+
external_exports.object({ availability: external_exports.literal("unavailable"), reason: external_exports.string() })
|
|
19702
|
+
]);
|
|
19703
|
+
}
|
|
19704
|
+
var AutomationEvidenceSchema = external_exports.object({
|
|
19705
|
+
capturedAt: external_exports.number(),
|
|
19706
|
+
diff: availabilitySchema(
|
|
19707
|
+
external_exports.object({
|
|
19708
|
+
filesChanged: external_exports.number().int().nonnegative(),
|
|
19709
|
+
insertions: external_exports.number().int().nonnegative(),
|
|
19710
|
+
deletions: external_exports.number().int().nonnegative()
|
|
19711
|
+
})
|
|
19712
|
+
),
|
|
19713
|
+
commits: availabilitySchema(external_exports.array(external_exports.object({ sha: external_exports.string().min(1), subject: external_exports.string() }))),
|
|
19714
|
+
pullRequest: availabilitySchema(
|
|
19715
|
+
external_exports.object({ number: external_exports.number().int().positive(), url: external_exports.string().url() }).nullable()
|
|
19716
|
+
),
|
|
19717
|
+
deliverables: availabilitySchema(
|
|
19718
|
+
external_exports.array(external_exports.object({ id: external_exports.string(), title: external_exports.string(), kind: external_exports.string() }))
|
|
19719
|
+
)
|
|
19720
|
+
});
|
|
19721
|
+
var AutomationRunWorkspaceSchema = external_exports.discriminatedUnion("mode", [
|
|
19722
|
+
external_exports.object({
|
|
19723
|
+
mode: external_exports.literal("selected-folder"),
|
|
19724
|
+
path: external_exports.string().min(1),
|
|
19725
|
+
baseBranch: external_exports.string(),
|
|
19726
|
+
baseCommit: external_exports.string().nullable()
|
|
19727
|
+
}),
|
|
19728
|
+
external_exports.object({
|
|
19729
|
+
mode: external_exports.literal("isolated-worktree"),
|
|
19730
|
+
path: external_exports.string().min(1),
|
|
19731
|
+
baseBranch: external_exports.string().min(1),
|
|
19732
|
+
baseCommit: external_exports.string().min(1)
|
|
19733
|
+
})
|
|
19734
|
+
]);
|
|
19735
|
+
var AutomationRunBaseSchema = external_exports.object({
|
|
19736
|
+
id: external_exports.string(),
|
|
19737
|
+
scheduleId: external_exports.string(),
|
|
19738
|
+
/** Frozen display identity for task origin and result receipts. */
|
|
19739
|
+
scheduleName: external_exports.string().min(1).optional(),
|
|
19740
|
+
taskId: external_exports.string().nullable(),
|
|
19741
|
+
deliveryKey: external_exports.string().min(1),
|
|
19742
|
+
trigger: AutomationTriggerSchema,
|
|
19743
|
+
input: AutomationRunInputSchema,
|
|
19744
|
+
provenance: AutomationRunProvenanceSchema,
|
|
19745
|
+
configuration: AutomationFrozenConfigurationSchema,
|
|
19746
|
+
phase: AutomationRunPhaseSchema,
|
|
19747
|
+
dispatch: AutomationDispatchStateSchema,
|
|
19748
|
+
waitingReason: external_exports.enum(["question", "permission"]).nullable(),
|
|
19749
|
+
terminal: AutomationTerminalOutcomeSchema.nullable(),
|
|
19750
|
+
/** Durable intended outcome while final evidence waits on the checkpoint barrier. */
|
|
19751
|
+
pendingTerminal: AutomationTerminalOutcomeSchema.optional(),
|
|
19752
|
+
/** One-based end checkpoint required before the pending outcome can be frozen. */
|
|
19753
|
+
pendingCheckpointTurn: external_exports.number().int().positive().optional(),
|
|
19754
|
+
workspace: AutomationRunWorkspaceSchema.nullable(),
|
|
19755
|
+
evidence: AutomationEvidenceSchema.nullable(),
|
|
19756
|
+
/** Set only after the run-scoped result notification is durably persisted. */
|
|
19757
|
+
resultNotificationEmittedAt: external_exports.number().int().nonnegative().optional(),
|
|
19758
|
+
/** Durable history-only disposition for runs that never created a navigable task. */
|
|
19759
|
+
resultNotificationDisposition: external_exports.literal("not-applicable-taskless").optional(),
|
|
19760
|
+
attemptOfRunId: external_exports.string().optional(),
|
|
19761
|
+
createdAt: external_exports.number(),
|
|
19762
|
+
updatedAt: external_exports.number()
|
|
19763
|
+
});
|
|
19764
|
+
var AutomationRunSchema = AutomationRunBaseSchema.superRefine((run, ctx) => {
|
|
19765
|
+
if (run.phase === "terminal" !== (run.terminal !== null)) {
|
|
19766
|
+
ctx.addIssue({
|
|
19767
|
+
code: "custom",
|
|
19768
|
+
path: ["terminal"],
|
|
19769
|
+
message: "terminal outcome must be present exactly when phase is terminal"
|
|
19770
|
+
});
|
|
19771
|
+
}
|
|
19772
|
+
if (run.phase === "waiting_for_input" !== (run.waitingReason !== null)) {
|
|
19773
|
+
ctx.addIssue({
|
|
19774
|
+
code: "custom",
|
|
19775
|
+
path: ["waitingReason"],
|
|
19776
|
+
message: "waiting reason must be present exactly when phase is waiting_for_input"
|
|
19777
|
+
});
|
|
19778
|
+
}
|
|
19779
|
+
const hasPendingTerminal = run.pendingTerminal !== void 0;
|
|
19780
|
+
const hasPendingCheckpoint = run.pendingCheckpointTurn !== void 0;
|
|
19781
|
+
if (hasPendingTerminal !== hasPendingCheckpoint || run.phase === "finalizing" !== hasPendingTerminal) {
|
|
19782
|
+
ctx.addIssue({
|
|
19783
|
+
code: "custom",
|
|
19784
|
+
path: ["pendingTerminal"],
|
|
19785
|
+
message: "pending terminal outcome and checkpoint turn are required exactly while finalizing"
|
|
19786
|
+
});
|
|
19787
|
+
}
|
|
19788
|
+
});
|
|
19789
|
+
var AutomationRunSummarySchema = AutomationRunBaseSchema.pick({
|
|
19790
|
+
id: true,
|
|
19791
|
+
scheduleId: true,
|
|
19792
|
+
taskId: true,
|
|
19793
|
+
provenance: true,
|
|
19794
|
+
phase: true,
|
|
19795
|
+
waitingReason: true,
|
|
19796
|
+
terminal: true,
|
|
19797
|
+
evidence: true,
|
|
19798
|
+
createdAt: true,
|
|
19799
|
+
updatedAt: true
|
|
19800
|
+
});
|
|
19801
|
+
var AutomationSourceHealthSchema = external_exports.discriminatedUnion("status", [
|
|
19802
|
+
external_exports.object({
|
|
19803
|
+
source: external_exports.literal("github"),
|
|
19804
|
+
repository: external_exports.string(),
|
|
19805
|
+
status: external_exports.literal("available"),
|
|
19806
|
+
checkedAt: external_exports.number(),
|
|
19807
|
+
reviewer: external_exports.string()
|
|
19808
|
+
}),
|
|
19809
|
+
external_exports.object({
|
|
19810
|
+
source: external_exports.literal("github"),
|
|
19811
|
+
repository: external_exports.string(),
|
|
19812
|
+
status: external_exports.literal("unavailable"),
|
|
19813
|
+
checkedAt: external_exports.number(),
|
|
19814
|
+
reason: external_exports.enum([
|
|
19815
|
+
"authentication",
|
|
19816
|
+
"repository",
|
|
19817
|
+
"rate-limit",
|
|
19818
|
+
"transient",
|
|
19819
|
+
"malformed-response",
|
|
19820
|
+
"truncated"
|
|
19821
|
+
]),
|
|
19822
|
+
message: external_exports.string().optional()
|
|
19823
|
+
})
|
|
19824
|
+
]);
|
|
19825
|
+
var AutomationSourceCursorSchema = external_exports.object({
|
|
19826
|
+
latestScheduledFor: external_exports.number().nullable(),
|
|
19827
|
+
observedDeliveryKeys: external_exports.array(external_exports.string()).max(500),
|
|
19828
|
+
updatedAt: external_exports.number()
|
|
19829
|
+
});
|
|
19830
|
+
var AutomationQueuedEventSchema = external_exports.object({
|
|
19831
|
+
deliveryKey: external_exports.string().min(1),
|
|
19832
|
+
input: AutomationEventInputSchema,
|
|
19833
|
+
enqueuedAt: external_exports.number(),
|
|
19834
|
+
expiresAt: external_exports.number()
|
|
19835
|
+
});
|
|
19836
|
+
var AutomationDeliveryReceiptSchema = external_exports.object({
|
|
19837
|
+
deliveryKey: external_exports.string().min(1),
|
|
19838
|
+
scheduleId: external_exports.string().min(1),
|
|
19839
|
+
runId: external_exports.string().min(1),
|
|
19840
|
+
recordedAt: external_exports.number()
|
|
19841
|
+
});
|
|
19842
|
+
var AutomationIndexEntrySchema = external_exports.object({
|
|
19843
|
+
id: external_exports.string(),
|
|
19844
|
+
name: external_exports.string(),
|
|
19845
|
+
enabled: external_exports.boolean(),
|
|
19846
|
+
trigger: AutomationTriggerSchema,
|
|
19847
|
+
workspaceMode: external_exports.enum(["selected-folder", "isolated-worktree"]),
|
|
19848
|
+
activeRun: AutomationRunSummarySchema.nullable(),
|
|
19849
|
+
recentRuns: external_exports.array(AutomationRunSummarySchema).max(20),
|
|
19850
|
+
queuedEventCount: external_exports.number().int().nonnegative(),
|
|
19851
|
+
nextRuns: external_exports.array(external_exports.number()).max(3),
|
|
19852
|
+
sourceHealth: AutomationSourceHealthSchema.nullable()
|
|
19853
|
+
});
|
|
19854
|
+
var AutomationScheduleSnapshotSchema = external_exports.object({
|
|
19855
|
+
definition: AutomationRecordSchema,
|
|
19856
|
+
activeRun: AutomationRunSummarySchema.nullable(),
|
|
19857
|
+
recentRuns: external_exports.array(AutomationRunSummarySchema).max(20),
|
|
19858
|
+
queuedEventCount: external_exports.number().int().nonnegative(),
|
|
19859
|
+
nextRuns: external_exports.array(external_exports.number()).max(3),
|
|
19860
|
+
sourceHealth: AutomationSourceHealthSchema.nullable()
|
|
19532
19861
|
});
|
|
19533
|
-
var SCHEDULE_STORE_VERSION =
|
|
19862
|
+
var SCHEDULE_STORE_VERSION = 3;
|
|
19534
19863
|
var ScheduleStoreSchema = external_exports.object({
|
|
19535
|
-
schemaVersion: external_exports.
|
|
19536
|
-
schedules: external_exports.record(external_exports.string(),
|
|
19864
|
+
schemaVersion: external_exports.literal(SCHEDULE_STORE_VERSION),
|
|
19865
|
+
schedules: external_exports.record(external_exports.string(), AutomationRecordSchema),
|
|
19866
|
+
runs: external_exports.record(external_exports.string(), AutomationRunSchema),
|
|
19867
|
+
cursors: external_exports.record(external_exports.string(), AutomationSourceCursorSchema),
|
|
19868
|
+
eventQueues: external_exports.record(external_exports.string(), external_exports.array(AutomationQueuedEventSchema)),
|
|
19869
|
+
deliveryReceipts: external_exports.record(external_exports.string(), AutomationDeliveryReceiptSchema),
|
|
19870
|
+
sourceHealth: external_exports.record(external_exports.string(), AutomationSourceHealthSchema)
|
|
19537
19871
|
});
|
|
19872
|
+
var AutomationCommandNameSchema = external_exports.enum([
|
|
19873
|
+
"save",
|
|
19874
|
+
"set-enabled",
|
|
19875
|
+
"run-now",
|
|
19876
|
+
"stop-run",
|
|
19877
|
+
"retry-run"
|
|
19878
|
+
]);
|
|
19879
|
+
var automationControlRequestSchemas = [
|
|
19880
|
+
external_exports.object({
|
|
19881
|
+
type: external_exports.literal("save_automation"),
|
|
19882
|
+
correlationId: external_exports.string(),
|
|
19883
|
+
scheduleId: external_exports.string().nullable(),
|
|
19884
|
+
configuration: AutomationConfigurationSchema
|
|
19885
|
+
}),
|
|
19886
|
+
external_exports.object({
|
|
19887
|
+
type: external_exports.literal("set_automation_enabled"),
|
|
19888
|
+
correlationId: external_exports.string(),
|
|
19889
|
+
scheduleId: external_exports.string(),
|
|
19890
|
+
enabled: external_exports.boolean()
|
|
19891
|
+
}),
|
|
19892
|
+
external_exports.object({
|
|
19893
|
+
type: external_exports.literal("run_automation_now"),
|
|
19894
|
+
correlationId: external_exports.string(),
|
|
19895
|
+
scheduleId: external_exports.string(),
|
|
19896
|
+
input: AutomationEventInputSchema.nullable()
|
|
19897
|
+
}),
|
|
19898
|
+
external_exports.object({
|
|
19899
|
+
type: external_exports.literal("stop_automation_run"),
|
|
19900
|
+
correlationId: external_exports.string(),
|
|
19901
|
+
scheduleId: external_exports.string(),
|
|
19902
|
+
runId: external_exports.string()
|
|
19903
|
+
}),
|
|
19904
|
+
external_exports.object({
|
|
19905
|
+
type: external_exports.literal("retry_automation_run"),
|
|
19906
|
+
correlationId: external_exports.string(),
|
|
19907
|
+
scheduleId: external_exports.string(),
|
|
19908
|
+
priorRunId: external_exports.string(),
|
|
19909
|
+
confirmUncertainEffects: external_exports.boolean()
|
|
19910
|
+
}),
|
|
19911
|
+
external_exports.object({ type: external_exports.literal("list_automations"), correlationId: external_exports.string() }),
|
|
19912
|
+
external_exports.object({
|
|
19913
|
+
type: external_exports.literal("list_automation_runs"),
|
|
19914
|
+
correlationId: external_exports.string(),
|
|
19915
|
+
scheduleId: external_exports.string(),
|
|
19916
|
+
cursor: external_exports.string().nullable(),
|
|
19917
|
+
limit: external_exports.number().int().min(1).max(100)
|
|
19918
|
+
}),
|
|
19919
|
+
external_exports.object({
|
|
19920
|
+
type: external_exports.literal("preview_automation"),
|
|
19921
|
+
correlationId: external_exports.string(),
|
|
19922
|
+
trigger: AutomationTriggerSchema
|
|
19923
|
+
}),
|
|
19924
|
+
external_exports.object({
|
|
19925
|
+
type: external_exports.literal("list_automation_candidates"),
|
|
19926
|
+
correlationId: external_exports.string(),
|
|
19927
|
+
scheduleId: external_exports.string(),
|
|
19928
|
+
limit: external_exports.number().int().min(1).max(50)
|
|
19929
|
+
})
|
|
19930
|
+
];
|
|
19931
|
+
var AutomationControlRequestSchema = external_exports.discriminatedUnion(
|
|
19932
|
+
"type",
|
|
19933
|
+
automationControlRequestSchemas
|
|
19934
|
+
);
|
|
19935
|
+
var AutomationCommandResultSchema = external_exports.object({
|
|
19936
|
+
type: external_exports.literal("automation_command_result"),
|
|
19937
|
+
correlationId: external_exports.string(),
|
|
19938
|
+
command: AutomationCommandNameSchema,
|
|
19939
|
+
result: external_exports.discriminatedUnion("ok", [
|
|
19940
|
+
external_exports.object({
|
|
19941
|
+
ok: external_exports.literal(true),
|
|
19942
|
+
schedule: AutomationScheduleSnapshotSchema.optional(),
|
|
19943
|
+
run: AutomationRunSummarySchema.optional()
|
|
19944
|
+
}),
|
|
19945
|
+
external_exports.object({ ok: external_exports.literal(false), error: external_exports.string() })
|
|
19946
|
+
])
|
|
19947
|
+
});
|
|
19948
|
+
var AutomationPreviewResultSchema = external_exports.object({
|
|
19949
|
+
type: external_exports.literal("automation_preview"),
|
|
19950
|
+
correlationId: external_exports.string(),
|
|
19951
|
+
result: external_exports.discriminatedUnion("ok", [
|
|
19952
|
+
external_exports.object({ ok: external_exports.literal(true), nextRuns: external_exports.array(external_exports.number()).max(3) }),
|
|
19953
|
+
external_exports.object({ ok: external_exports.literal(false), error: external_exports.string() })
|
|
19954
|
+
])
|
|
19955
|
+
});
|
|
19956
|
+
var automationControlResponseSchemas = [
|
|
19957
|
+
AutomationCommandResultSchema,
|
|
19958
|
+
AutomationPreviewResultSchema,
|
|
19959
|
+
external_exports.object({
|
|
19960
|
+
type: external_exports.literal("automation_snapshot"),
|
|
19961
|
+
correlationId: external_exports.string(),
|
|
19962
|
+
schedules: external_exports.array(AutomationScheduleSnapshotSchema),
|
|
19963
|
+
generatedAt: external_exports.number(),
|
|
19964
|
+
ownerTimezone: external_exports.string().min(1)
|
|
19965
|
+
}),
|
|
19966
|
+
external_exports.object({
|
|
19967
|
+
type: external_exports.literal("automation_run_page"),
|
|
19968
|
+
correlationId: external_exports.string(),
|
|
19969
|
+
scheduleId: external_exports.string(),
|
|
19970
|
+
runs: external_exports.array(AutomationRunSummarySchema),
|
|
19971
|
+
nextCursor: external_exports.string().nullable()
|
|
19972
|
+
}),
|
|
19973
|
+
external_exports.object({
|
|
19974
|
+
type: external_exports.literal("automation_candidates"),
|
|
19975
|
+
correlationId: external_exports.string(),
|
|
19976
|
+
scheduleId: external_exports.string(),
|
|
19977
|
+
events: external_exports.array(AutomationEventInputSchema).max(50),
|
|
19978
|
+
sourceHealth: AutomationSourceHealthSchema
|
|
19979
|
+
}),
|
|
19980
|
+
external_exports.object({
|
|
19981
|
+
type: external_exports.literal("automation_index"),
|
|
19982
|
+
automations: external_exports.array(AutomationIndexEntrySchema),
|
|
19983
|
+
generatedAt: external_exports.number()
|
|
19984
|
+
}),
|
|
19985
|
+
external_exports.object({ type: external_exports.literal("automation_updated"), automation: AutomationIndexEntrySchema }),
|
|
19986
|
+
external_exports.object({ type: external_exports.literal("automation_run_updated"), run: AutomationRunSummarySchema }),
|
|
19987
|
+
external_exports.object({
|
|
19988
|
+
type: external_exports.literal("automation_source_health"),
|
|
19989
|
+
health: AutomationSourceHealthSchema
|
|
19990
|
+
})
|
|
19991
|
+
];
|
|
19992
|
+
var AutomationControlResponseSchema = external_exports.discriminatedUnion(
|
|
19993
|
+
"type",
|
|
19994
|
+
automationControlResponseSchemas
|
|
19995
|
+
);
|
|
19538
19996
|
function migrateScheduleStore(raw) {
|
|
19539
19997
|
if (typeof raw !== "object" || raw === null) {
|
|
19540
|
-
|
|
19998
|
+
throw new Error("Schedule store is corrupt: expected an object");
|
|
19541
19999
|
}
|
|
19542
20000
|
const schemaVersion = prop(raw, "schemaVersion");
|
|
19543
|
-
|
|
19544
|
-
|
|
19545
|
-
return { schemaVersion: SCHEDULE_STORE_VERSION, schedules: {} };
|
|
20001
|
+
if (typeof schemaVersion !== "number") {
|
|
20002
|
+
throw new Error("Schedule store is corrupt: missing numeric schemaVersion");
|
|
19546
20003
|
}
|
|
19547
|
-
|
|
20004
|
+
if (schemaVersion > SCHEDULE_STORE_VERSION) {
|
|
20005
|
+
throw new Error(
|
|
20006
|
+
`Schedule store version ${schemaVersion} is newer than supported version ${SCHEDULE_STORE_VERSION}`
|
|
20007
|
+
);
|
|
20008
|
+
}
|
|
20009
|
+
if (schemaVersion < 1) {
|
|
20010
|
+
throw new Error(`Schedule store version ${schemaVersion} is unsupported`);
|
|
20011
|
+
}
|
|
20012
|
+
if (schemaVersion === SCHEDULE_STORE_VERSION) {
|
|
20013
|
+
return ScheduleStoreSchema.parse(raw);
|
|
20014
|
+
}
|
|
20015
|
+
const legacy = external_exports.object({ schedules: external_exports.record(external_exports.string(), AutomationRecordSchema) }).passthrough().parse(raw);
|
|
20016
|
+
const cursors = Object.fromEntries(
|
|
20017
|
+
Object.values(legacy.schedules).filter((schedule) => schedule.lastRunAt !== null).map((schedule) => [
|
|
20018
|
+
schedule.id,
|
|
20019
|
+
{
|
|
20020
|
+
latestScheduledFor: schedule.lastRunAt,
|
|
20021
|
+
observedDeliveryKeys: [],
|
|
20022
|
+
updatedAt: schedule.updatedAt
|
|
20023
|
+
}
|
|
20024
|
+
])
|
|
20025
|
+
);
|
|
20026
|
+
return {
|
|
20027
|
+
schemaVersion: SCHEDULE_STORE_VERSION,
|
|
20028
|
+
schedules: legacy.schedules,
|
|
20029
|
+
runs: {},
|
|
20030
|
+
cursors,
|
|
20031
|
+
eventQueues: {},
|
|
20032
|
+
deliveryReceipts: {},
|
|
20033
|
+
sourceHealth: {}
|
|
20034
|
+
};
|
|
19548
20035
|
}
|
|
19549
20036
|
|
|
19550
20037
|
// ../../packages/loro-schema/src/state-machines/compaction-sm.ts
|
|
@@ -20539,6 +21026,10 @@ var TaskRecordSchema = external_exports.object({
|
|
|
20539
21026
|
projectId: external_exports.string().nullable().default(null),
|
|
20540
21027
|
scheduleId: external_exports.string().optional(),
|
|
20541
21028
|
scheduleName: external_exports.string().optional(),
|
|
21029
|
+
/** Durable provenance for tasks owned by the automation runtime. */
|
|
21030
|
+
automationRunId: external_exports.string().optional(),
|
|
21031
|
+
/** False once any non-seed input has been admitted to an automation task. */
|
|
21032
|
+
automationProjectionEligible: external_exports.boolean().optional(),
|
|
20542
21033
|
structuredTasks: external_exports.record(external_exports.string(), StructuredTaskSchema).optional(),
|
|
20543
21034
|
taskOverlay: TaskOverlaySchema.optional(),
|
|
20544
21035
|
/**
|
|
@@ -23401,6 +23892,7 @@ var BrowserToDaemonControlMessageSchema = external_exports.discriminatedUnion("t
|
|
|
23401
23892
|
external_exports.object({ type: external_exports.literal("delete_schedule"), scheduleId: external_exports.string() }),
|
|
23402
23893
|
external_exports.object({ type: external_exports.literal("list_schedules") }),
|
|
23403
23894
|
external_exports.object({ type: external_exports.literal("run_schedule_now"), scheduleId: external_exports.string() }),
|
|
23895
|
+
...automationControlRequestSchemas,
|
|
23404
23896
|
/** Template CRUD (browser → daemon) */
|
|
23405
23897
|
external_exports.object({ type: external_exports.literal("create_template"), template: TaskTemplateRecordSchema }),
|
|
23406
23898
|
external_exports.object({
|
|
@@ -24738,6 +25230,7 @@ var DaemonToBrowserControlMessageSchema = external_exports.discriminatedUnion("t
|
|
|
24738
25230
|
taskId: external_exports.string(),
|
|
24739
25231
|
firedAt: external_exports.number()
|
|
24740
25232
|
}),
|
|
25233
|
+
...automationControlResponseSchemas,
|
|
24741
25234
|
/** Template events (daemon → browser) */
|
|
24742
25235
|
external_exports.object({ type: external_exports.literal("template_list"), templates: external_exports.array(TaskTemplateRecordSchema) }),
|
|
24743
25236
|
external_exports.object({ type: external_exports.literal("template_updated"), template: TaskTemplateRecordSchema }),
|
|
@@ -25643,6 +26136,10 @@ function classifyCriticality(msg) {
|
|
|
25643
26136
|
case "schedule_updated":
|
|
25644
26137
|
case "schedule_deleted":
|
|
25645
26138
|
case "schedule_fired":
|
|
26139
|
+
case "automation_index":
|
|
26140
|
+
case "automation_updated":
|
|
26141
|
+
case "automation_run_updated":
|
|
26142
|
+
case "automation_source_health":
|
|
25646
26143
|
case "template_updated":
|
|
25647
26144
|
case "template_deleted":
|
|
25648
26145
|
case "background_agent_update":
|
|
@@ -25716,6 +26213,11 @@ function classifyCriticality(msg) {
|
|
|
25716
26213
|
case "vscode_themes_found":
|
|
25717
26214
|
case "claude_code_sessions_found":
|
|
25718
26215
|
case "schedule_list":
|
|
26216
|
+
case "automation_command_result":
|
|
26217
|
+
case "automation_preview":
|
|
26218
|
+
case "automation_snapshot":
|
|
26219
|
+
case "automation_run_page":
|
|
26220
|
+
case "automation_candidates":
|
|
25719
26221
|
case "template_list":
|
|
25720
26222
|
case "recent_logs":
|
|
25721
26223
|
case "task_search_result":
|
|
@@ -30014,8 +30516,8 @@ export {
|
|
|
30014
30516
|
parseAssetUri,
|
|
30015
30517
|
parseNativePreviewLabel,
|
|
30016
30518
|
BrowserPreviewRequestSchema,
|
|
30017
|
-
ScheduleRecordSchema,
|
|
30018
30519
|
SCHEDULE_STORE_VERSION,
|
|
30520
|
+
ScheduleStoreSchema,
|
|
30019
30521
|
migrateScheduleStore,
|
|
30020
30522
|
COMPACTION_SILENCE_TIMEOUT_MS,
|
|
30021
30523
|
transition,
|
|
@@ -30121,4 +30623,4 @@ export {
|
|
|
30121
30623
|
encodeDrain,
|
|
30122
30624
|
decodeFrame
|
|
30123
30625
|
};
|
|
30124
|
-
//# sourceMappingURL=chunk-
|
|
30626
|
+
//# sourceMappingURL=chunk-WO4YQPLB.js.map
|