@sentry/junior 0.178.0 → 0.179.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.
Files changed (67) hide show
  1. package/dist/{agent-hooks-PBT4NNBV.js → agent-hooks-32IDCLMW.js} +12 -12
  2. package/dist/api.js +229 -196
  3. package/dist/app.js +570 -195
  4. package/dist/{catalog-runtime-M7QGKPFZ.js → catalog-runtime-FBVA6WAQ.js} +5 -5
  5. package/dist/chat/scheduled-tasks/personal.d.ts +5 -8
  6. package/dist/chat/scheduled-tasks/runs.d.ts +49 -0
  7. package/dist/chat/scheduled-tasks/schedule-intent.d.ts +1 -1
  8. package/dist/chat/scheduled-tasks/tasks.d.ts +27 -0
  9. package/dist/chat/scheduled-tasks/tool-support.d.ts +0 -4
  10. package/dist/chat/scheduled-tasks/tools/create.d.ts +1 -1
  11. package/dist/chat/scheduled-tasks/tools/update.d.ts +1 -1
  12. package/dist/chat/scheduled-tasks/types.d.ts +127 -78
  13. package/dist/{chunk-JVXZ3WDH.js → chunk-2HIPYNQI.js} +6 -6
  14. package/dist/{chunk-BHHWCNXI.js → chunk-3AFVR5UC.js} +5 -5
  15. package/dist/{chunk-XWUJWHFD.js → chunk-3I7XE3PA.js} +6 -6
  16. package/dist/{chunk-H6ZXBFGX.js → chunk-3TM3FYLQ.js} +1 -1
  17. package/dist/{chunk-6OYVH66J.js → chunk-4GWXAILB.js} +1 -1
  18. package/dist/{chunk-BUGO42R6.js → chunk-5IRROPA5.js} +4 -4
  19. package/dist/{chunk-534BO42N.js → chunk-B6ECUSVX.js} +3 -3
  20. package/dist/{chunk-G3CQEUHI.js → chunk-CJLBLELR.js} +5 -5
  21. package/dist/{chunk-22T3HB44.js → chunk-FAS6AIMF.js} +1 -1
  22. package/dist/{chunk-BFLMRTPD.js → chunk-FIDMHAO6.js} +6 -6
  23. package/dist/{chunk-AVRWMQ4U.js → chunk-FTGD2FBP.js} +1 -1
  24. package/dist/{chunk-UMG7M32G.js → chunk-G2CAC4CV.js} +17 -17
  25. package/dist/{chunk-3ZZEPLLB.js → chunk-GENV6KF2.js} +2 -2
  26. package/dist/{chunk-RE4XWXBV.js → chunk-GPLAT6H7.js} +6 -6
  27. package/dist/{chunk-UGWBJAGN.js → chunk-HQNE5APD.js} +1 -1
  28. package/dist/{chunk-AQHSXA3J.js → chunk-JMJNFEDC.js} +3 -3
  29. package/dist/{chunk-PRDKO3QB.js → chunk-JT4WMD3C.js} +12 -12
  30. package/dist/{chunk-4K6VNP3S.js → chunk-KJLHIHFF.js} +9 -9
  31. package/dist/{chunk-QCCLDJHB.js → chunk-Q5B3WTGG.js} +8 -8
  32. package/dist/{chunk-RGXOLPWO.js → chunk-R5NWWYIS.js} +1 -1
  33. package/dist/{chunk-ZCHHVTMF.js → chunk-R6U7N4FS.js} +1 -1
  34. package/dist/{chunk-OGRD5PFM.js → chunk-RTRBYSF3.js} +1 -1
  35. package/dist/{chunk-FQ6BMP5P.js → chunk-RZRYOLCE.js} +396 -74
  36. package/dist/{chunk-D3UJTX4U.js → chunk-SLGGOASN.js} +1 -1
  37. package/dist/{chunk-IQRPDKPJ.js → chunk-TIEKUH4Q.js} +1 -1
  38. package/dist/{chunk-LAOP4EPL.js → chunk-U4TKB6F6.js} +4 -4
  39. package/dist/{chunk-AGJ4OQ2V.js → chunk-UT6X7XN7.js} +1 -1
  40. package/dist/{chunk-XCNS3CXE.js → chunk-VP4OVRDD.js} +3 -3
  41. package/dist/{chunk-KEQAA42D.js → chunk-XSPSCWLH.js} +1 -1
  42. package/dist/chunk-XZY6G5YZ.js +1088 -0
  43. package/dist/{chunk-ABLODWPO.js → chunk-YFNAMRGE.js} +1 -1
  44. package/dist/{chunk-U3UDPGZG.js → chunk-ZQMG3CL5.js} +2 -2
  45. package/dist/cli/chat.js +31 -31
  46. package/dist/cli/check.js +6 -6
  47. package/dist/cli/plugins.js +13 -13
  48. package/dist/cli/snapshot-create.js +10 -10
  49. package/dist/cli/upgrade.js +7 -7
  50. package/dist/db/schema/scheduled-tasks.d.ts +29 -5
  51. package/dist/db/schema.d.ts +28 -4
  52. package/dist/{db-QVYOWATH.js → db-EJAV7JL6.js} +7 -7
  53. package/dist/instrumentation.js +4 -4
  54. package/dist/nitro.js +2 -2
  55. package/dist/{oauth-callback-server-PLPAFXO6.js → oauth-callback-server-GAVSUBTQ.js} +23 -23
  56. package/dist/{runner-AGNEIOZS.js → runner-34JL64JF.js} +15 -15
  57. package/dist/{skills-U5KQ66EM.js → skills-U545HALM.js} +6 -6
  58. package/dist/spawn-I2S4IDUQ.js +37 -0
  59. package/dist/{validation-QE4U45KS.js → validation-EVXVGA44.js} +6 -6
  60. package/dist/version.js +1 -1
  61. package/dist/{work-ATAXAHJJ.js → work-QOAUPDBU.js} +18 -18
  62. package/dist/worker-5GX2IKLZ.js +24 -0
  63. package/package.json +5 -5
  64. package/dist/chat/scheduled-tasks/store.d.ts +0 -78
  65. package/dist/chunk-RGV6KHDM.js +0 -1944
  66. package/dist/spawn-ZRYYZP2B.js +0 -37
  67. package/dist/worker-LIL5AOER.js +0 -24
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-ABLODWPO.js";
4
- import "./chunk-D3UJTX4U.js";
3
+ } from "./chunk-YFNAMRGE.js";
4
+ import "./chunk-SLGGOASN.js";
5
5
  import "./chunk-CGA4ERJ5.js";
6
6
  import "./chunk-M63DETLL.js";
7
- import "./chunk-UGWBJAGN.js";
7
+ import "./chunk-HQNE5APD.js";
8
8
  import "./chunk-6GWA276C.js";
9
9
  import "./chunk-OOUNJNMR.js";
10
10
  import "./chunk-H4HBKISO.js";
11
- import "./chunk-AGJ4OQ2V.js";
12
- import "./chunk-IQRPDKPJ.js";
11
+ import "./chunk-UT6X7XN7.js";
12
+ import "./chunk-TIEKUH4Q.js";
13
13
  import "./chunk-MLKGABMK.js";
14
14
  export {
15
15
  pluginCatalogRuntime
@@ -1,8 +1,7 @@
1
1
  /** Viewer-scoped scheduled-task queries and mutations. */
2
2
  import type { User } from "@sentry/junior-plugin-api";
3
- import type { SchedulerStore } from "./store";
3
+ import type { JuniorDatabase } from "@/db/db";
4
4
  import type { ScheduledTask } from "./types";
5
- type PersonalScheduledTaskStore = Pick<SchedulerStore, "getTask" | "listTasksCreatedBy" | "saveTask">;
6
5
  export interface ViewerScheduledTaskPage {
7
6
  nextCursor?: string;
8
7
  tasks: ScheduledTask[];
@@ -18,9 +17,7 @@ export declare class InvalidScheduledTaskCursorError extends Error {
18
17
  export declare class PersonalScheduledTaskNotFoundError extends Error {
19
18
  constructor();
20
19
  }
21
- /** Build scheduled-task operations limited to tasks created by one user. */
22
- export declare function createViewerScheduledTasks(store: PersonalScheduledTaskStore, user: User): {
23
- delete(id: string, nowMs?: number): Promise<void>;
24
- list(input: ViewerScheduledTaskPageInput): Promise<ViewerScheduledTaskPage>;
25
- };
26
- export {};
20
+ /** Delete one scheduled task created by the viewer. */
21
+ export declare function deleteViewerScheduledTask(db: JuniorDatabase, user: User, id: string, nowMs?: number): Promise<void>;
22
+ /** List scheduled tasks created by the viewer with a stable SQL cursor. */
23
+ export declare function listViewerScheduledTasks(db: JuniorDatabase, user: User, input: ViewerScheduledTaskPageInput): Promise<ViewerScheduledTaskPage>;
@@ -0,0 +1,49 @@
1
+ import type { JuniorDatabase } from "@/db/db";
2
+ import { type ScheduledRun } from "./types";
3
+ /** List incomplete runs for retained scheduled tasks. */
4
+ export declare function listIncompleteScheduledRuns(db: JuniorDatabase): Promise<ScheduledRun[]>;
5
+ /** Claim one due scheduler run under the deployed global claim lock. */
6
+ export declare function claimDueScheduledRun(db: JuniorDatabase, args: {
7
+ nowMs: number;
8
+ }): Promise<ScheduledRun | undefined>;
9
+ /** Mark a pending run dispatched only for the active claim. */
10
+ export declare function markScheduledRunDispatched(db: JuniorDatabase, args: {
11
+ claimedAtMs: number;
12
+ dispatchId: string;
13
+ nowMs: number;
14
+ runId: string;
15
+ }): Promise<ScheduledRun | undefined>;
16
+ /** Complete a run only for its active start timestamp. */
17
+ export declare function markScheduledRunCompleted(db: JuniorDatabase, args: {
18
+ completedAtMs: number;
19
+ resultMessageTs?: string;
20
+ runId: string;
21
+ startedAtMs: number;
22
+ }): Promise<ScheduledRun | undefined>;
23
+ /** Fail a claimed or running run only for its active transition guard. */
24
+ export declare function markScheduledRunFailed(db: JuniorDatabase, args: {
25
+ completedAtMs: number;
26
+ errorMessage: string;
27
+ startedAtMs?: number;
28
+ runId: string;
29
+ }): Promise<ScheduledRun | undefined>;
30
+ /** Block a claimed or running run only for its active transition guard. */
31
+ export declare function markScheduledRunBlocked(db: JuniorDatabase, args: {
32
+ completedAtMs: number;
33
+ errorMessage: string;
34
+ runId: string;
35
+ startedAtMs?: number;
36
+ }): Promise<ScheduledRun | undefined>;
37
+ /** Skip a pending run only before dispatch begins. */
38
+ export declare function markScheduledRunSkipped(db: JuniorDatabase, args: {
39
+ completedAtMs: number;
40
+ errorMessage: string;
41
+ runId: string;
42
+ }): Promise<ScheduledRun | undefined>;
43
+ /** Advance a scheduled task after a terminal run under its task lock. */
44
+ export declare function advanceScheduledTaskAfterRun(db: JuniorDatabase, args: {
45
+ errorMessage?: string;
46
+ nowMs: number;
47
+ run: ScheduledRun;
48
+ status: "blocked" | "completed" | "failed";
49
+ }): Promise<void>;
@@ -11,9 +11,9 @@ export declare const scheduleIntentSchema: z.ZodUnion<readonly [z.ZodObject<{
11
11
  type: z.ZodLiteral<"after">;
12
12
  value: z.ZodNumber;
13
13
  unit: z.ZodEnum<{
14
- day: "day";
15
14
  hour: "hour";
16
15
  minute: "minute";
16
+ day: "day";
17
17
  second: "second";
18
18
  week: "week";
19
19
  }>;
@@ -0,0 +1,27 @@
1
+ import type { JuniorDatabase } from "@/db/db";
2
+ import { juniorSchedulerTasks } from "@/db/schema/scheduled-tasks";
3
+ import { type ScheduledTask } from "./types";
4
+ type ScheduledTaskRow = Pick<typeof juniorSchedulerTasks.$inferSelect, "creatorIdentityId" | "record" | "title">;
5
+ /** Decode a retained scheduler task row and reject invalid routing context. */
6
+ export declare function parseScheduledTaskRow(row: ScheduledTaskRow): ScheduledTask | undefined;
7
+ /** Keep scan paths from returning current or legacy tombstones. */
8
+ export declare function isListedScheduledTask(task: ScheduledTask | undefined): task is ScheduledTask;
9
+ /** Build the stable run id for one task occurrence. */
10
+ export declare function scheduledRunId(taskId: string, scheduledForMs: number): string;
11
+ /** Acquire the deployed advisory lock for one scheduled task. */
12
+ export declare function withScheduledTaskLock<T>(db: JuniorDatabase, taskId: string, callback: (db: JuniorDatabase) => Promise<T>): Promise<T>;
13
+ /** Read and decode one scheduled task. */
14
+ export declare function readScheduledTask(db: JuniorDatabase, taskId: string): Promise<ScheduledTask | undefined>;
15
+ /** List decoded scheduled tasks in stable creation order. */
16
+ export declare function listScheduledTasks(db: JuniorDatabase): Promise<ScheduledTask[]>;
17
+ /** List decoded scheduled tasks for one team in stable creation order. */
18
+ export declare function listScheduledTasksForTeam(db: JuniorDatabase, teamId: string): Promise<ScheduledTask[]>;
19
+ /** Create a scheduled task once under its retry-stable task lock. */
20
+ export declare function createScheduledTask(db: JuniorDatabase, task: ScheduledTask): Promise<ScheduledTask>;
21
+ /** Save a scheduled task and clear its blocked occurrence on reactivation. */
22
+ export declare function saveScheduledTask(db: JuniorDatabase, task: ScheduledTask): Promise<ScheduledTask>;
23
+ /** Save a scheduled task inside a task lock already held by the caller. */
24
+ export declare function saveScheduledTaskInLock(db: JuniorDatabase, task: ScheduledTask, current: ScheduledTask | undefined): Promise<void>;
25
+ /** List scheduled tasks whose current Slack destination is public. */
26
+ export declare function listPublicScheduledTasksForTeams(db: JuniorDatabase, teamIds: string[], limit: number): Promise<ScheduledTask[]>;
27
+ export {};
@@ -1,12 +1,10 @@
1
1
  import { type Identity, type SlackDestination, type SlackActor, type SlackSource, type User } from "@sentry/junior-plugin-api";
2
2
  import { z } from "zod";
3
- import { type SchedulerStore } from "./store";
4
3
  import type { ScheduledTask, ScheduledTaskConversationAccess, ScheduledTaskPrincipal, ScheduledTaskStatus } from "./types";
5
4
  export interface SchedulerToolContext {
6
5
  actor?: SlackActor;
7
6
  now?: () => number;
8
7
  source?: SlackSource;
9
- store: SchedulerStore;
10
8
  users: {
11
9
  resolveActor(): Promise<{
12
10
  identity: Identity;
@@ -226,8 +224,6 @@ export declare function buildTaskId(args: {
226
224
  destination: SlackDestination;
227
225
  toolCallId: string | undefined;
228
226
  }): string;
229
- /** Keep concrete scheduler tools coupled to the injected store, not global state. */
230
- export declare function schedulerStore(context: SchedulerToolContext): SchedulerStore;
231
227
  /** Accept only persisted scheduler statuses from model-facing update input. */
232
228
  export declare function normalizeStatus(value: string | undefined): ScheduledTaskStatus | undefined;
233
229
  /** Centralize scheduler timezone defaulting for all concrete tool entry points. */
@@ -20,7 +20,7 @@ export declare function createSlackScheduleCreateTaskTool(context: SchedulerTool
20
20
  timing: {
21
21
  type: "after";
22
22
  value: number;
23
- unit: "day" | "hour" | "minute" | "second" | "week";
23
+ unit: "hour" | "minute" | "day" | "second" | "week";
24
24
  } | {
25
25
  type: "at";
26
26
  date: string;
@@ -21,7 +21,7 @@ export declare function createSlackScheduleUpdateTaskTool(context: SchedulerTool
21
21
  timing: {
22
22
  type: "after";
23
23
  value: number;
24
- unit: "day" | "hour" | "minute" | "second" | "week";
24
+ unit: "hour" | "minute" | "day" | "second" | "week";
25
25
  } | {
26
26
  type: "at";
27
27
  date: string;
@@ -1,86 +1,135 @@
1
- /** Durable scheduled-task domain types owned by Junior core. */
2
- import type { SlackDestination, SystemActor } from "@sentry/junior-plugin-api";
3
1
  import { z } from "zod";
4
- export type ScheduledTaskStatus = "active" | "blocked" | "completed" | "deleted";
5
- export declare const scheduledTaskCredentialModeSchema: z.ZodEnum<{
2
+ declare const scheduledTaskStatusSchema: z.ZodEnum<{
3
+ completed: "completed";
4
+ blocked: "blocked";
5
+ active: "active";
6
+ deleted: "deleted";
7
+ }>;
8
+ export type ScheduledTaskStatus = z.output<typeof scheduledTaskStatusSchema>;
9
+ declare const scheduledTaskCredentialModeSchema: z.ZodEnum<{
6
10
  system: "system";
7
11
  creator: "creator";
8
12
  }>;
9
- export type ScheduledTaskCredentialMode = z.infer<typeof scheduledTaskCredentialModeSchema>;
10
- export type ScheduledRunStatus = "pending" | "running" | "completed" | "failed" | "blocked" | "skipped";
11
- export interface ScheduledTaskPrincipal {
12
- slackUserId: string;
13
- fullName?: string;
14
- userName?: string;
15
- }
16
- export type ScheduledTaskExecutionActor = SystemActor;
13
+ export type ScheduledTaskCredentialMode = z.output<typeof scheduledTaskCredentialModeSchema>;
14
+ declare const scheduledRunStatusSchema: z.ZodEnum<{
15
+ pending: "pending";
16
+ running: "running";
17
+ completed: "completed";
18
+ failed: "failed";
19
+ blocked: "blocked";
20
+ skipped: "skipped";
21
+ }>;
22
+ export type ScheduledRunStatus = z.output<typeof scheduledRunStatusSchema>;
23
+ /** Validate the current scheduled-task domain shape. */
24
+ export declare const scheduledTaskSchema: z.ZodObject<{
25
+ id: z.ZodString;
26
+ conversationAccess: z.ZodObject<{
27
+ audience: z.ZodEnum<{
28
+ channel: "channel";
29
+ direct: "direct";
30
+ group: "group";
31
+ }>;
32
+ visibility: z.ZodEnum<{
33
+ private: "private";
34
+ public: "public";
35
+ }>;
36
+ }, z.core.$strict>;
37
+ createdAtMs: z.ZodNumber;
38
+ createdBy: z.ZodObject<{
39
+ slackUserId: z.ZodString;
40
+ fullName: z.ZodOptional<z.ZodString>;
41
+ userName: z.ZodOptional<z.ZodString>;
42
+ }, z.core.$strict>;
43
+ creatorIdentityId: z.ZodString;
44
+ credentialMode: z.ZodEnum<{
45
+ system: "system";
46
+ creator: "creator";
47
+ }>;
48
+ destination: z.ZodObject<{
49
+ platform: z.ZodLiteral<"slack">;
50
+ teamId: z.ZodString;
51
+ channelId: z.ZodString;
52
+ }, z.core.$strict>;
53
+ executionActor: z.ZodOptional<z.ZodObject<{
54
+ platform: z.ZodLiteral<"system">;
55
+ name: z.ZodString;
56
+ }, z.core.$strict>>;
57
+ lastRunAtMs: z.ZodOptional<z.ZodNumber>;
58
+ nextRunAtMs: z.ZodOptional<z.ZodNumber>;
59
+ originalRequest: z.ZodOptional<z.ZodString>;
60
+ runNowAtMs: z.ZodOptional<z.ZodNumber>;
61
+ schedule: z.ZodObject<{
62
+ description: z.ZodString;
63
+ kind: z.ZodEnum<{
64
+ one_off: "one_off";
65
+ recurring: "recurring";
66
+ }>;
67
+ recurrence: z.ZodOptional<z.ZodObject<{
68
+ dayOfMonth: z.ZodOptional<z.ZodNumber>;
69
+ frequency: z.ZodEnum<{
70
+ daily: "daily";
71
+ weekly: "weekly";
72
+ monthly: "monthly";
73
+ yearly: "yearly";
74
+ }>;
75
+ interval: z.ZodNumber;
76
+ month: z.ZodOptional<z.ZodNumber>;
77
+ startDate: z.ZodString;
78
+ time: z.ZodObject<{
79
+ hour: z.ZodNumber;
80
+ minute: z.ZodNumber;
81
+ }, z.core.$strict>;
82
+ weekdays: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
83
+ }, z.core.$strict>>;
84
+ timezone: z.ZodString;
85
+ }, z.core.$strict>;
86
+ status: z.ZodEnum<{
87
+ completed: "completed";
88
+ blocked: "blocked";
89
+ active: "active";
90
+ deleted: "deleted";
91
+ }>;
92
+ statusReason: z.ZodOptional<z.ZodString>;
93
+ task: z.ZodObject<{
94
+ text: z.ZodString;
95
+ }, z.core.$strict>;
96
+ title: z.ZodOptional<z.ZodString>;
97
+ updatedAtMs: z.ZodNumber;
98
+ }, z.core.$strict>;
99
+ /** Validate the current scheduled-run domain shape. */
100
+ export declare const scheduledRunSchema: z.ZodObject<{
101
+ id: z.ZodString;
102
+ attempt: z.ZodNumber;
103
+ claimedAtMs: z.ZodNumber;
104
+ completedAtMs: z.ZodOptional<z.ZodNumber>;
105
+ dispatchId: z.ZodOptional<z.ZodString>;
106
+ errorMessage: z.ZodOptional<z.ZodString>;
107
+ resultMessageTs: z.ZodOptional<z.ZodString>;
108
+ scheduledForMs: z.ZodNumber;
109
+ startedAtMs: z.ZodOptional<z.ZodNumber>;
110
+ status: z.ZodEnum<{
111
+ pending: "pending";
112
+ running: "running";
113
+ completed: "completed";
114
+ failed: "failed";
115
+ blocked: "blocked";
116
+ skipped: "skipped";
117
+ }>;
118
+ taskId: z.ZodString;
119
+ }, z.core.$strict>;
120
+ export type ScheduledTask = z.output<typeof scheduledTaskSchema>;
121
+ export type ScheduledRun = z.output<typeof scheduledRunSchema>;
122
+ export type ScheduledTaskRecord = Omit<ScheduledTask, "title">;
123
+ export type ScheduledTaskPrincipal = ScheduledTask["createdBy"];
124
+ export type ScheduledTaskExecutionActor = NonNullable<ScheduledTask["executionActor"]>;
125
+ export type ScheduledTaskConversationAccess = ScheduledTask["conversationAccess"];
126
+ export type ScheduledTaskSchedule = ScheduledTask["schedule"];
127
+ export type ScheduledTaskRecurrence = NonNullable<ScheduledTaskSchedule["recurrence"]>;
128
+ export type ScheduledTaskSpec = ScheduledTask["task"];
129
+ export type ScheduledCalendarFrequency = ScheduledTaskRecurrence["frequency"];
130
+ export type ScheduledLocalTime = ScheduledTaskRecurrence["time"];
17
131
  export declare const SCHEDULED_TASK_SYSTEM_ACTOR: Readonly<{
18
132
  platform: "system";
19
133
  name: string;
20
134
  }>;
21
- export interface ScheduledTaskConversationAccess {
22
- audience: "direct" | "group" | "channel";
23
- visibility: "private" | "public";
24
- }
25
- export type ScheduledCalendarFrequency = "daily" | "weekly" | "monthly" | "yearly";
26
- export interface ScheduledLocalTime {
27
- hour: number;
28
- minute: number;
29
- }
30
- export interface ScheduledTaskRecurrence {
31
- dayOfMonth?: number;
32
- frequency: ScheduledCalendarFrequency;
33
- interval: number;
34
- month?: number;
35
- startDate: string;
36
- time: ScheduledLocalTime;
37
- weekdays?: number[];
38
- }
39
- export interface ScheduledTaskSchedule {
40
- description: string;
41
- timezone: string;
42
- kind: "one_off" | "recurring";
43
- recurrence?: ScheduledTaskRecurrence;
44
- }
45
- export interface ScheduledTaskSpec {
46
- text: string;
47
- }
48
- export interface ScheduledTask {
49
- id: string;
50
- createdAtMs: number;
51
- createdBy: ScheduledTaskPrincipal;
52
- /** Authoritative provider identity that created the task. */
53
- creatorIdentityId: string;
54
- conversationAccess: ScheduledTaskConversationAccess;
55
- /** Selects system credentials or task-bound creator credential delegation. */
56
- credentialMode: ScheduledTaskCredentialMode;
57
- destination: SlackDestination;
58
- executionActor?: ScheduledTaskExecutionActor;
59
- lastRunAtMs?: number;
60
- nextRunAtMs?: number;
61
- originalRequest?: string;
62
- runNowAtMs?: number;
63
- schedule: ScheduledTaskSchedule;
64
- status: ScheduledTaskStatus;
65
- statusReason?: string;
66
- task: ScheduledTaskSpec;
67
- /**
68
- * Short display title generated from the task instruction.
69
- * SQL-backed column; never stored inside the JSON record payload.
70
- */
71
- title?: string;
72
- updatedAtMs: number;
73
- }
74
- export interface ScheduledRun {
75
- id: string;
76
- attempt: number;
77
- claimedAtMs: number;
78
- completedAtMs?: number;
79
- dispatchId?: string;
80
- errorMessage?: string;
81
- resultMessageTs?: string;
82
- scheduledForMs: number;
83
- startedAtMs?: number;
84
- status: ScheduledRunStatus;
85
- taskId: string;
86
- }
135
+ export {};
@@ -5,19 +5,19 @@ import {
5
5
  isDmChannel,
6
6
  normalizeSlackConversationId,
7
7
  withSlackRetries
8
- } from "./chunk-XWUJWHFD.js";
8
+ } from "./chunk-3I7XE3PA.js";
9
9
  import {
10
10
  parseDestination
11
- } from "./chunk-XCNS3CXE.js";
11
+ } from "./chunk-VP4OVRDD.js";
12
12
  import {
13
13
  getStateAdapter
14
- } from "./chunk-H6ZXBFGX.js";
14
+ } from "./chunk-3TM3FYLQ.js";
15
15
  import {
16
16
  normalizeSlackEmojiName
17
- } from "./chunk-3ZZEPLLB.js";
17
+ } from "./chunk-GENV6KF2.js";
18
18
  import {
19
19
  pluginCatalogRuntime
20
- } from "./chunk-ABLODWPO.js";
20
+ } from "./chunk-YFNAMRGE.js";
21
21
  import {
22
22
  parseSlackMessageTs,
23
23
  parseSlackUserId
@@ -26,7 +26,7 @@ import {
26
26
  isRecord,
27
27
  logInfo,
28
28
  logWarn
29
- } from "./chunk-UGWBJAGN.js";
29
+ } from "./chunk-HQNE5APD.js";
30
30
 
31
31
  // src/chat/slack/outbound.ts
32
32
  var MAX_SLACK_MESSAGE_TEXT_CHARS = 4e4;
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  formatProviderLabel,
6
6
  startOAuthFlow
7
- } from "./chunk-JVXZ3WDH.js";
7
+ } from "./chunk-2HIPYNQI.js";
8
8
  import {
9
9
  parseSandboxEgressAuthRequiredSignal
10
10
  } from "./chunk-6ZWRNC4D.js";
@@ -12,16 +12,16 @@ import {
12
12
  abandonReplacedPendingAuth,
13
13
  canReusePendingAuthLink,
14
14
  recordAuthorizationRequested
15
- } from "./chunk-BFLMRTPD.js";
15
+ } from "./chunk-FIDMHAO6.js";
16
16
  import {
17
17
  AGENT_INVOCATION_MAILBOX_STATUSES
18
- } from "./chunk-ZCHHVTMF.js";
18
+ } from "./chunk-R6U7N4FS.js";
19
19
  import {
20
20
  TURN_REASONING_LEVELS
21
- } from "./chunk-3ZZEPLLB.js";
21
+ } from "./chunk-GENV6KF2.js";
22
22
  import {
23
23
  pluginCatalogRuntime
24
- } from "./chunk-ABLODWPO.js";
24
+ } from "./chunk-YFNAMRGE.js";
25
25
  import {
26
26
  credentialContextSchema
27
27
  } from "./chunk-CGA4ERJ5.js";
@@ -5,7 +5,7 @@ import {
5
5
  getConversationEventStore,
6
6
  getDb,
7
7
  getSqlExecutor
8
- } from "./chunk-XCNS3CXE.js";
8
+ } from "./chunk-VP4OVRDD.js";
9
9
  import {
10
10
  juniorConversationAnnotations,
11
11
  juniorConversationEvents,
@@ -14,7 +14,7 @@ import {
14
14
  juniorUsers,
15
15
  juniorWorkspaceRepos,
16
16
  juniorWorkspaces
17
- } from "./chunk-ZCHHVTMF.js";
17
+ } from "./chunk-R6U7N4FS.js";
18
18
  import {
19
19
  SANDBOX_WORKSPACE_ROOT,
20
20
  getVercelSandboxCredentials,
@@ -22,17 +22,17 @@ import {
22
22
  isSandboxMissingError,
23
23
  runNonInteractiveCommand,
24
24
  sleep
25
- } from "./chunk-AQHSXA3J.js";
25
+ } from "./chunk-JMJNFEDC.js";
26
26
  import {
27
27
  getStateAdapter
28
- } from "./chunk-H6ZXBFGX.js";
28
+ } from "./chunk-3TM3FYLQ.js";
29
29
  import {
30
30
  botConfig,
31
31
  completeObject,
32
32
  embedTexts,
33
33
  getSlackBotToken,
34
34
  standardModelId
35
- } from "./chunk-3ZZEPLLB.js";
35
+ } from "./chunk-GENV6KF2.js";
36
36
  import {
37
37
  isActorUserId,
38
38
  parseActorUserId,
@@ -48,7 +48,7 @@ import {
48
48
  setSpanAttributes,
49
49
  setSpanStatus,
50
50
  withSpan
51
- } from "./chunk-UGWBJAGN.js";
51
+ } from "./chunk-HQNE5APD.js";
52
52
 
53
53
  // src/chat/plugins/agent-hooks.ts
54
54
  import {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getChatConfig
3
- } from "./chunk-3ZZEPLLB.js";
3
+ } from "./chunk-GENV6KF2.js";
4
4
 
5
5
  // src/chat/state/adapter.ts
6
6
  import { createMemoryState } from "@chat-adapter/state-memory";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FUNCTION_TIMEOUT_BUFFER_SECONDS,
3
3
  getChatConfig
4
- } from "./chunk-3ZZEPLLB.js";
4
+ } from "./chunk-GENV6KF2.js";
5
5
 
6
6
  // src/chat/runtime/request-deadline.ts
7
7
  import { AsyncLocalStorage } from "async_hooks";
@@ -8,14 +8,14 @@ import {
8
8
  getConversationStore,
9
9
  parseDestination,
10
10
  sameDestination
11
- } from "./chunk-XCNS3CXE.js";
11
+ } from "./chunk-VP4OVRDD.js";
12
12
  import {
13
13
  getDefaultRedisStateAdapterFor,
14
14
  getStateAdapter
15
- } from "./chunk-H6ZXBFGX.js";
15
+ } from "./chunk-3TM3FYLQ.js";
16
16
  import {
17
17
  getChatConfig
18
- } from "./chunk-3ZZEPLLB.js";
18
+ } from "./chunk-GENV6KF2.js";
19
19
  import {
20
20
  parseStoredSlackActor
21
21
  } from "./chunk-M63DETLL.js";
@@ -23,7 +23,7 @@ import {
23
23
  isRecord,
24
24
  toOptionalNumber,
25
25
  toOptionalString
26
- } from "./chunk-UGWBJAGN.js";
26
+ } from "./chunk-HQNE5APD.js";
27
27
 
28
28
  // src/chat/task-execution/state.ts
29
29
  import { randomUUID } from "crypto";
@@ -6,14 +6,14 @@ import {
6
6
  isStale,
7
7
  runNonInteractiveCommand,
8
8
  sleep
9
- } from "./chunk-AQHSXA3J.js";
9
+ } from "./chunk-JMJNFEDC.js";
10
10
  import {
11
11
  getStateAdapter
12
- } from "./chunk-H6ZXBFGX.js";
12
+ } from "./chunk-3TM3FYLQ.js";
13
13
  import {
14
14
  setSpanAttributes,
15
15
  withSpan
16
- } from "./chunk-UGWBJAGN.js";
16
+ } from "./chunk-HQNE5APD.js";
17
17
 
18
18
  // src/chat/sandbox/resources.ts
19
19
  var configuredResources;
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  persistConversationMessages
3
- } from "./chunk-BFLMRTPD.js";
3
+ } from "./chunk-FIDMHAO6.js";
4
4
  import {
5
5
  JUNIOR_THREAD_STATE_TTL_MS
6
6
  } from "./chunk-3Y47VMHV.js";
7
7
  import {
8
8
  getDb
9
- } from "./chunk-XCNS3CXE.js";
9
+ } from "./chunk-VP4OVRDD.js";
10
10
  import {
11
11
  juniorLocationConfigurations
12
- } from "./chunk-ZCHHVTMF.js";
12
+ } from "./chunk-R6U7N4FS.js";
13
13
  import {
14
14
  getStateAdapter
15
- } from "./chunk-H6ZXBFGX.js";
15
+ } from "./chunk-3TM3FYLQ.js";
16
16
  import {
17
17
  juniorDestinations
18
18
  } from "./chunk-VFUK3X5B.js";
@@ -20,7 +20,7 @@ import {
20
20
  isRecord,
21
21
  toOptionalNumber,
22
22
  toOptionalString
23
- } from "./chunk-UGWBJAGN.js";
23
+ } from "./chunk-HQNE5APD.js";
24
24
 
25
25
  // src/chat/conversations/turn-lifecycle.ts
26
26
  var ConversationTurnLifecycleService = class {
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-M63DETLL.js";
6
6
  import {
7
7
  toOptionalString
8
- } from "./chunk-UGWBJAGN.js";
8
+ } from "./chunk-HQNE5APD.js";
9
9
 
10
10
  // src/chat/slack/context.ts
11
11
  import { z } from "zod";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-PDO5BLNM.js";
4
4
  import {
5
5
  ToolInputError
6
- } from "./chunk-XWUJWHFD.js";
6
+ } from "./chunk-3I7XE3PA.js";
7
7
  import {
8
8
  agentHistoryItemSchema,
9
9
  bindProviderConversation,
@@ -16,25 +16,25 @@ import {
16
16
  instructionProvenanceFor,
17
17
  sanitizePostgresJson,
18
18
  withConversationEventLock
19
- } from "./chunk-XCNS3CXE.js";
19
+ } from "./chunk-VP4OVRDD.js";
20
20
  import {
21
21
  SANDBOX_REPOS_ROOT,
22
22
  SANDBOX_WORKSPACE_ROOT,
23
23
  sleep
24
- } from "./chunk-AQHSXA3J.js";
24
+ } from "./chunk-JMJNFEDC.js";
25
25
  import {
26
26
  MUTATION_LOCK_TTL_MS,
27
27
  fenceLock,
28
28
  getStateAdapter,
29
29
  withLock
30
- } from "./chunk-H6ZXBFGX.js";
30
+ } from "./chunk-3TM3FYLQ.js";
31
31
  import {
32
32
  botConfig,
33
33
  completeText,
34
34
  escapeXml,
35
35
  resolveGatewayModel,
36
36
  unwrapCurrentInstruction
37
- } from "./chunk-3ZZEPLLB.js";
37
+ } from "./chunk-GENV6KF2.js";
38
38
  import {
39
39
  parseSlackMessageTs,
40
40
  toStoredSlackActor
@@ -44,7 +44,7 @@ import {
44
44
  logException,
45
45
  logWarn,
46
46
  setSpanAttributes
47
- } from "./chunk-UGWBJAGN.js";
47
+ } from "./chunk-HQNE5APD.js";
48
48
 
49
49
  // src/chat/turn-context-tag.ts
50
50
  var TURN_CONTEXT_TAG = "runtime-turn-context";