@sentry/junior 0.128.1 → 0.129.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/{agent-hooks-IWQNFJMS.js → agent-hooks-ZM4WMZCN.js} +9 -9
- package/dist/api/schema/task.d.ts +152 -0
- package/dist/api/schema.d.ts +2 -0
- package/dist/api/schema.js +13 -3
- package/dist/api/tasks/routes.d.ts +4 -0
- package/dist/api.js +425 -23
- package/dist/app.js +309 -27
- package/dist/{catalog-runtime-KLSYFS4A.js → catalog-runtime-TN2GPVEI.js} +5 -5
- package/dist/chat/agent-dispatch/context.d.ts +18 -0
- package/dist/chat/event-tasks/store.d.ts +7 -1
- package/dist/chat/event-tasks/tool-support.d.ts +1 -0
- package/dist/chat/resource-events/runtime-catalog.d.ts +3 -0
- package/dist/chat/scheduled-tasks/cadence.d.ts +27 -0
- package/dist/chat/scheduled-tasks/heartbeat.d.ts +6 -0
- package/dist/chat/scheduled-tasks/identity.d.ts +6 -0
- package/dist/chat/scheduled-tasks/personal.d.ts +26 -0
- package/dist/chat/scheduled-tasks/schedule-intent.d.ts +61 -0
- package/dist/chat/scheduled-tasks/store.d.ts +77 -0
- package/dist/chat/scheduled-tasks/tool-support.d.ts +203 -0
- package/dist/chat/scheduled-tasks/tools/create.d.ts +80 -0
- package/dist/chat/scheduled-tasks/tools/delete.d.ts +56 -0
- package/dist/chat/scheduled-tasks/tools/list.d.ts +54 -0
- package/dist/chat/scheduled-tasks/tools/run-now.d.ts +56 -0
- package/dist/chat/scheduled-tasks/tools/update.d.ts +82 -0
- package/dist/chat/scheduled-tasks/tools.d.ts +6 -0
- package/dist/chat/scheduled-tasks/types.d.ts +81 -0
- package/dist/chat/tasks/read.d.ts +9 -0
- package/dist/chat/tools/scheduled-tasks.d.ts +4 -0
- package/dist/{chunk-5IR7SGRO.js → chunk-2BCQKJTX.js} +2 -2
- package/dist/{chunk-MZ6ZOWMJ.js → chunk-3N4MWF3R.js} +1 -1
- package/dist/{chunk-ETGUGGO2.js → chunk-6CMYU62S.js} +7 -7
- package/dist/{chunk-AAMF2IRC.js → chunk-6QQOLIJJ.js} +1308 -804
- package/dist/{chunk-R2LXTX4J.js → chunk-A6QQPVSH.js} +1 -1
- package/dist/chunk-BDIEEZK7.js +1470 -0
- package/dist/{chunk-AFJF3RGU.js → chunk-BVKP37NE.js} +61 -13
- package/dist/{chunk-54KP2EAH.js → chunk-CZJUBH6O.js} +12 -12
- package/dist/{chunk-O3YROBH4.js → chunk-CZQ2DSQZ.js} +1 -1
- package/dist/{chunk-O3C5BJFD.js → chunk-E4UCPRYL.js} +1 -1
- package/dist/{chunk-S2O64VXP.js → chunk-ESYXDXNX.js} +6 -6
- package/dist/{chunk-EHEACYJ6.js → chunk-GPWHBHAG.js} +1 -1
- package/dist/{chunk-PLAMHS3D.js → chunk-GURSWCI4.js} +2 -2
- package/dist/{chunk-Q5TMMCBV.js → chunk-K3U5447S.js} +1 -1
- package/dist/{chunk-SHMHHXD5.js → chunk-KB2M27DL.js} +58 -0
- package/dist/{chunk-LIJ4APSS.js → chunk-LV2BQ26V.js} +1 -1
- package/dist/{chunk-MKM5552O.js → chunk-NNRV4T2C.js} +1 -2
- package/dist/{chunk-TONH5NXR.js → chunk-P6I7LFKC.js} +1 -1
- package/dist/{chunk-J3YIO3LE.js → chunk-PQFNTLZI.js} +3 -3
- package/dist/{chunk-H4HMCSOZ.js → chunk-QAOA4GUG.js} +5 -5
- package/dist/{chunk-EOIA25WC.js → chunk-R62DRNKB.js} +2 -2
- package/dist/{chunk-OIQCRZ67.js → chunk-U23X4ASF.js} +4 -4
- package/dist/{chunk-P7UUNWC4.js → chunk-XENYUOZG.js} +4 -4
- package/dist/cli/chat.js +24 -24
- package/dist/cli/check.js +6 -6
- package/dist/cli/plugins.js +12 -12
- package/dist/cli/snapshot-create.js +9 -9
- package/dist/cli/upgrade.js +9 -17
- package/dist/db/schema/scheduled-tasks.d.ts +257 -0
- package/dist/db/schema.d.ts +258 -1
- package/dist/{db-VOU5QNLY.js → db-ZI6TBXIS.js} +7 -7
- package/dist/instrumentation.js +4 -4
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-GS7FBYBC.js → oauth-callback-server-TLA4GARF.js} +17 -17
- package/dist/{runner-GSJSBI3J.js → runner-23YFRWQJ.js} +11 -11
- package/dist/{skills-DSHG54LM.js → skills-QIUG4D6M.js} +6 -6
- package/dist/{validation-25XWT6TA.js → validation-3KGEBATS.js} +6 -6
- package/dist/version.js +1 -1
- package/migrations/0016_neat_the_anarchist.sql +171 -0
- package/migrations/meta/0016_snapshot.json +1617 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +5 -6
- package/dist/chunk-REHOYCYS.js +0 -37
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/** Durable scheduled-task domain types owned by Junior core. */
|
|
2
|
+
import type { SlackDestination, SystemActor } from "@sentry/junior-plugin-api";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
export type ScheduledTaskStatus = "active" | "paused" | "blocked" | "deleted";
|
|
5
|
+
export declare const scheduledTaskCredentialModeSchema: z.ZodEnum<{
|
|
6
|
+
system: "system";
|
|
7
|
+
creator: "creator";
|
|
8
|
+
}>;
|
|
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;
|
|
17
|
+
export declare const SCHEDULED_TASK_SYSTEM_ACTOR: Readonly<{
|
|
18
|
+
platform: "system";
|
|
19
|
+
name: string;
|
|
20
|
+
}>;
|
|
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
|
+
updatedAtMs: number;
|
|
68
|
+
}
|
|
69
|
+
export interface ScheduledRun {
|
|
70
|
+
id: string;
|
|
71
|
+
attempt: number;
|
|
72
|
+
claimedAtMs: number;
|
|
73
|
+
completedAtMs?: number;
|
|
74
|
+
dispatchId?: string;
|
|
75
|
+
errorMessage?: string;
|
|
76
|
+
resultMessageTs?: string;
|
|
77
|
+
scheduledForMs: number;
|
|
78
|
+
startedAtMs?: number;
|
|
79
|
+
status: ScheduledRunStatus;
|
|
80
|
+
taskId: string;
|
|
81
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { User } from "@sentry/junior-plugin-api";
|
|
2
|
+
import type { TaskList } from "@/api/schema/task";
|
|
3
|
+
/** Read viewer-owned and public-workspace tasks as one bounded newest-first projection. */
|
|
4
|
+
export declare function readViewerTasks(user: User): Promise<TaskList>;
|
|
5
|
+
export declare class ViewerTaskNotFoundError extends Error {
|
|
6
|
+
constructor();
|
|
7
|
+
}
|
|
8
|
+
/** Delete one viewer-owned scheduled or event task. */
|
|
9
|
+
export declare function deleteViewerTask(user: User, kind: "scheduled" | "event", id: string): Promise<void>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ToolRegistry } from "@/chat/tools/definition";
|
|
2
|
+
import type { ToolRuntimeContext } from "@/chat/tools/types";
|
|
3
|
+
/** Build scheduled-task tools for an interactive Slack actor. */
|
|
4
|
+
export declare function createScheduledTaskTools(context: ToolRuntimeContext): ToolRegistry;
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
toCanonicalInputMessage,
|
|
4
4
|
toCanonicalOutputMessage,
|
|
5
5
|
toGenAiMessagesTraceAttributes
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GPWHBHAG.js";
|
|
7
7
|
import {
|
|
8
8
|
extractGenAiUsageAttributes,
|
|
9
9
|
logException,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
normalizeGenAiFinishReason,
|
|
12
12
|
serializeGenAiAttribute,
|
|
13
13
|
withSpan
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-P6I7LFKC.js";
|
|
15
15
|
|
|
16
16
|
// src/chat/config.ts
|
|
17
17
|
import { getModel as getModel2 } from "@earendil-works/pi-ai/compat";
|
|
@@ -6,25 +6,25 @@ import {
|
|
|
6
6
|
isDmChannel,
|
|
7
7
|
normalizeSlackConversationId,
|
|
8
8
|
withSlackRetries
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QAOA4GUG.js";
|
|
10
10
|
import {
|
|
11
11
|
getDb,
|
|
12
12
|
parseDestination
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-PQFNTLZI.js";
|
|
14
14
|
import {
|
|
15
15
|
acquireActiveLock,
|
|
16
16
|
getStateAdapter,
|
|
17
17
|
sleep
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-3N4MWF3R.js";
|
|
19
19
|
import {
|
|
20
20
|
normalizeSlackEmojiName
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-2BCQKJTX.js";
|
|
22
22
|
import {
|
|
23
23
|
pluginCatalogRuntime
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-A6QQPVSH.js";
|
|
25
25
|
import {
|
|
26
26
|
fetchWithBoundedOAuthErrorBodies
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-CZQ2DSQZ.js";
|
|
28
28
|
import {
|
|
29
29
|
parseSlackMessageTs,
|
|
30
30
|
parseSlackUserId
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
isRecord,
|
|
34
34
|
logInfo,
|
|
35
35
|
logWarn
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-P6I7LFKC.js";
|
|
37
37
|
|
|
38
38
|
// src/chat/capabilities/router.ts
|
|
39
39
|
var ProviderCredentialRouter = class {
|