@sentry/junior 0.165.0 → 0.167.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-GSNL33UA.js → agent-hooks-KEHBR4DB.js} +9 -9
- package/dist/api/schema/workspace.d.ts +16 -0
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +3 -1
- package/dist/api.js +64 -47
- package/dist/app.js +58 -60
- package/dist/{catalog-runtime-4ERDVI7V.js → catalog-runtime-7QFMBU2Q.js} +5 -5
- package/dist/chat/pi/transcript.d.ts +10 -10
- package/dist/chat/sandbox/snapshot/resolve.d.ts +4 -0
- package/dist/chat/services/conversation-memory.d.ts +7 -0
- package/dist/chat/workspaces/store.d.ts +10 -1
- package/dist/chat/workspaces/types.d.ts +8 -0
- package/dist/{chunk-AEBF6AO2.js → chunk-2MPO25ZZ.js} +1 -1
- package/dist/{chunk-VDNNVTX2.js → chunk-2RSPCWAV.js} +5 -5
- package/dist/{chunk-5WDDWMQ7.js → chunk-4KRDL4ZD.js} +64 -7
- package/dist/{chunk-NPW6LM2X.js → chunk-5IR2ABRO.js} +12 -12
- package/dist/{chunk-BEHPIDVZ.js → chunk-5LZVDKQJ.js} +42 -17
- package/dist/{chunk-DKO4RRGJ.js → chunk-6SJN7JZ3.js} +1 -1
- package/dist/{chunk-6RZ6MMEK.js → chunk-BGRLZPMI.js} +1 -1
- package/dist/{chunk-HPWZ4BJJ.js → chunk-CC4EYBUO.js} +58 -54
- package/dist/{chunk-FNNQCHOL.js → chunk-CU7YQNZ3.js} +4 -4
- package/dist/{chunk-N2BRRIQZ.js → chunk-EWAG7BNE.js} +1 -1
- package/dist/{chunk-XOINKFDJ.js → chunk-GC3AKBNP.js} +7 -7
- package/dist/{chunk-6OWVPXNO.js → chunk-GIGUXRMY.js} +1 -1
- package/dist/{chunk-FXX4NHOM.js → chunk-HIB3XTKR.js} +6 -6
- package/dist/{chunk-SA5FVUWJ.js → chunk-IHSPBOWG.js} +6 -6
- package/dist/{chunk-6YXCG2XL.js → chunk-KE5ETKIR.js} +4 -4
- package/dist/{chunk-EA4UL5H2.js → chunk-KSQIE2R4.js} +40 -11
- package/dist/{chunk-7S2JVUWS.js → chunk-L63FA77C.js} +1 -1
- package/dist/{chunk-FMOFCEAA.js → chunk-MKDIEH3C.js} +2 -2
- package/dist/{chunk-T6BAHCT6.js → chunk-MV4LDMRG.js} +17 -17
- package/dist/{chunk-AQEBOQUC.js → chunk-O5J556I2.js} +9 -9
- package/dist/{chunk-RQQTOF3H.js → chunk-PMULUKHL.js} +3 -3
- package/dist/{chunk-7J26TW64.js → chunk-PRV74X7E.js} +5 -5
- package/dist/{chunk-3V2EIQLT.js → chunk-TZHLY42G.js} +1 -1
- package/dist/{chunk-5T6WPPEI.js → chunk-UFTE42ZF.js} +1 -1
- package/dist/{chunk-BEC542E6.js → chunk-UTMP45YM.js} +13 -2
- package/dist/{chunk-32CCG4WP.js → chunk-V7GGA4LW.js} +1 -1
- package/dist/{chunk-65B3PDY7.js → chunk-W72TSO24.js} +1 -1
- package/dist/{chunk-G72LBEMZ.js → chunk-WD7PVGMA.js} +1 -1
- package/dist/{chunk-HZDLOFO4.js → chunk-WHMDWHZX.js} +5 -5
- package/dist/{chunk-TCWPG5VL.js → chunk-WRBQL2AW.js} +2 -2
- package/dist/{chunk-ZUKU2Y3J.js → chunk-WZGOP5BZ.js} +1 -1
- package/dist/{chunk-IZHR2OES.js → chunk-YVW44V5Y.js} +13 -2
- package/dist/cli/chat.js +29 -29
- 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 +7 -7
- package/dist/db/schema/workspaces.d.ts +68 -0
- package/dist/db/schema.d.ts +68 -0
- package/dist/{db-5TTEPMTY.js → db-H25MZO65.js} +7 -7
- package/dist/instrumentation.js +4 -4
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-IVFC5YHY.js → oauth-callback-server-BX334MQ6.js} +22 -22
- package/dist/{runner-G76TSHWO.js → runner-GRWCCCKP.js} +12 -12
- package/dist/{skills-F6PSLVSG.js → skills-TG76W7TS.js} +6 -6
- package/dist/spawn-4YBTXAR2.js +37 -0
- package/dist/{validation-56EJI6UQ.js → validation-JY6EXXR3.js} +6 -6
- package/dist/version.js +1 -1
- package/dist/{work-RNRQCP3Y.js → work-53J6P32F.js} +17 -17
- package/dist/worker-WLLGEEQS.js +24 -0
- package/migrations/0031_wild_phantom_reporter.sql +4 -0
- package/migrations/meta/0031_snapshot.json +2823 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +5 -5
- package/dist/spawn-WMJPIAZL.js +0 -37
- package/dist/worker-FBR2WUI4.js +0 -24
|
@@ -13,19 +13,19 @@ import {
|
|
|
13
13
|
getPlugins,
|
|
14
14
|
setPlugins,
|
|
15
15
|
validatePlugins
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-4KRDL4ZD.js";
|
|
17
|
+
import "./chunk-PMULUKHL.js";
|
|
18
|
+
import "./chunk-YVW44V5Y.js";
|
|
19
19
|
import "./chunk-BVREIWBD.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-W72TSO24.js";
|
|
21
|
+
import "./chunk-MKDIEH3C.js";
|
|
22
22
|
import "./chunk-VFUK3X5B.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-WZGOP5BZ.js";
|
|
24
24
|
import "./chunk-V7YE4WCP.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-V7GGA4LW.js";
|
|
26
26
|
import "./chunk-6GWA276C.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-UFTE42ZF.js";
|
|
28
|
+
import "./chunk-GIGUXRMY.js";
|
|
29
29
|
import "./chunk-MLKGABMK.js";
|
|
30
30
|
export {
|
|
31
31
|
PluginHookDeniedError,
|
|
@@ -4,6 +4,13 @@ export declare const workspaceRepoSchema: z.ZodObject<{
|
|
|
4
4
|
repo: z.ZodString;
|
|
5
5
|
checkoutPath: z.ZodString;
|
|
6
6
|
}, z.core.$strict>;
|
|
7
|
+
/** Install-wide baseline Sandbox snapshot used when no Workspace recipe is selected. */
|
|
8
|
+
export declare const baselineSnapshotSchema: z.ZodObject<{
|
|
9
|
+
id: z.ZodString;
|
|
10
|
+
generatedAt: z.ZodISODateTime;
|
|
11
|
+
buildDurationMs: z.ZodNumber;
|
|
12
|
+
dependencyCount: z.ZodNumber;
|
|
13
|
+
}, z.core.$strict>;
|
|
7
14
|
export declare const workspaceSchema: z.ZodObject<{
|
|
8
15
|
id: z.ZodString;
|
|
9
16
|
name: z.ZodString;
|
|
@@ -16,9 +23,16 @@ export declare const workspaceSchema: z.ZodObject<{
|
|
|
16
23
|
snapshot: z.ZodNullable<z.ZodObject<{
|
|
17
24
|
id: z.ZodString;
|
|
18
25
|
generatedAt: z.ZodISODateTime;
|
|
26
|
+
buildDurationMs: z.ZodNumber;
|
|
19
27
|
}, z.core.$strict>>;
|
|
20
28
|
}, z.core.$strict>;
|
|
21
29
|
export declare const workspaceListSchema: z.ZodObject<{
|
|
30
|
+
baselineSnapshot: z.ZodNullable<z.ZodObject<{
|
|
31
|
+
id: z.ZodString;
|
|
32
|
+
generatedAt: z.ZodISODateTime;
|
|
33
|
+
buildDurationMs: z.ZodNumber;
|
|
34
|
+
dependencyCount: z.ZodNumber;
|
|
35
|
+
}, z.core.$strict>>;
|
|
22
36
|
workspaces: z.ZodArray<z.ZodObject<{
|
|
23
37
|
id: z.ZodString;
|
|
24
38
|
name: z.ZodString;
|
|
@@ -31,6 +45,7 @@ export declare const workspaceListSchema: z.ZodObject<{
|
|
|
31
45
|
snapshot: z.ZodNullable<z.ZodObject<{
|
|
32
46
|
id: z.ZodString;
|
|
33
47
|
generatedAt: z.ZodISODateTime;
|
|
48
|
+
buildDurationMs: z.ZodNumber;
|
|
34
49
|
}, z.core.$strict>>;
|
|
35
50
|
}, z.core.$strict>>;
|
|
36
51
|
}, z.core.$strict>;
|
|
@@ -48,4 +63,5 @@ export declare const workspaceParamsSchema: z.ZodObject<{
|
|
|
48
63
|
export declare const deleteWorkspaceResponseSchema: z.ZodObject<{
|
|
49
64
|
deleted: z.ZodLiteral<true>;
|
|
50
65
|
}, z.core.$strict>;
|
|
66
|
+
export type BaselineSnapshotReport = z.infer<typeof baselineSnapshotSchema>;
|
|
51
67
|
export type WorkspaceReport = z.infer<typeof workspaceSchema>;
|
package/dist/api/schema.d.ts
CHANGED
|
@@ -10,8 +10,8 @@ export { apiErrorSchema } from "./schema/common";
|
|
|
10
10
|
export type { ApiError } from "./schema/common";
|
|
11
11
|
export { createPersonalTokenBodySchema, createdPersonalTokenSchema, personalTokenListSchema, personalTokenMetadataSchema, personalTokenParamsSchema, revokePersonalTokenResponseSchema, } from "./schema/personal-token";
|
|
12
12
|
export type { PersonalTokenMetadata } from "./schema/personal-token";
|
|
13
|
-
export { deleteWorkspaceResponseSchema, workspaceBodySchema, workspaceListSchema, workspaceParamsSchema, workspaceRepoSchema, workspaceSchema, } from "./schema/workspace";
|
|
14
|
-
export type { WorkspaceReport } from "./schema/workspace";
|
|
13
|
+
export { baselineSnapshotSchema, deleteWorkspaceResponseSchema, workspaceBodySchema, workspaceListSchema, workspaceParamsSchema, workspaceRepoSchema, workspaceSchema, } from "./schema/workspace";
|
|
14
|
+
export type { BaselineSnapshotReport, WorkspaceReport, } from "./schema/workspace";
|
|
15
15
|
export { eventTaskSummarySchema, scheduledTaskSummarySchema, taskExecutionListSchema, taskExecutionSchema, taskExecutionStatusDaySchema, taskExecutionStatusSchema, taskListSchema, taskParamsSchema, taskRunListSchema, taskRunSchema, taskSummarySchema, } from "./schema/task";
|
|
16
16
|
export type { TaskExecution, TaskExecutionDay, TaskExecutionList, TaskExecutionStatusDay, TaskList, TaskRun, TaskRunList, TaskSummary, } from "./schema/task";
|
|
17
17
|
export { statSchema, statsReportSchema } from "./schema/stats";
|
package/dist/api/schema.js
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
apiErrorSchema,
|
|
6
6
|
archiveConversationBodySchema,
|
|
7
7
|
archiveConversationResponseSchema,
|
|
8
|
+
baselineSnapshotSchema,
|
|
8
9
|
cancelConversationPendingMessagesBodySchema,
|
|
9
10
|
cancelConversationPendingMessagesResponseSchema,
|
|
10
11
|
conversationAuxiliaryCostsSchema,
|
|
@@ -58,7 +59,7 @@ import {
|
|
|
58
59
|
workspaceParamsSchema,
|
|
59
60
|
workspaceRepoSchema,
|
|
60
61
|
workspaceSchema
|
|
61
|
-
} from "../chunk-
|
|
62
|
+
} from "../chunk-UTMP45YM.js";
|
|
62
63
|
import {
|
|
63
64
|
healthReportSchema,
|
|
64
65
|
pluginOperationalReportFeedSchema,
|
|
@@ -81,6 +82,7 @@ export {
|
|
|
81
82
|
apiErrorSchema,
|
|
82
83
|
archiveConversationBodySchema,
|
|
83
84
|
archiveConversationResponseSchema,
|
|
85
|
+
baselineSnapshotSchema,
|
|
84
86
|
cancelConversationPendingMessagesBodySchema,
|
|
85
87
|
cancelConversationPendingMessagesResponseSchema,
|
|
86
88
|
conversationAuxiliaryCostsSchema,
|
package/dist/api.js
CHANGED
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
workspaceListSchema,
|
|
42
42
|
workspaceParamsSchema,
|
|
43
43
|
workspaceSchema
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-UTMP45YM.js";
|
|
45
45
|
import {
|
|
46
46
|
appendAndEnqueueApiConversationMessage,
|
|
47
47
|
authenticatePersonalToken,
|
|
@@ -59,15 +59,15 @@ import {
|
|
|
59
59
|
revokePersonalToken,
|
|
60
60
|
viewerConversationMembership,
|
|
61
61
|
webActorFromEmail
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-5IR2ABRO.js";
|
|
63
63
|
import {
|
|
64
64
|
buildSentryConversationUrl,
|
|
65
65
|
getWebAuthorization
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-2MPO25ZZ.js";
|
|
67
67
|
import {
|
|
68
68
|
cancelHumanFacingPendingMessages,
|
|
69
69
|
getConversation
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-KE5ETKIR.js";
|
|
71
71
|
import {
|
|
72
72
|
readTaskExecutionByConversationId,
|
|
73
73
|
readTaskExecutionDays,
|
|
@@ -75,8 +75,8 @@ import {
|
|
|
75
75
|
readTaskExecutionSummaries,
|
|
76
76
|
readTaskExecutions,
|
|
77
77
|
readTaskRuns
|
|
78
|
-
} from "./chunk-
|
|
79
|
-
import "./chunk-
|
|
78
|
+
} from "./chunk-O5J556I2.js";
|
|
79
|
+
import "./chunk-2RSPCWAV.js";
|
|
80
80
|
import {
|
|
81
81
|
healthReportSchema,
|
|
82
82
|
pluginOperationalReportFeedSchema,
|
|
@@ -102,21 +102,22 @@ import {
|
|
|
102
102
|
listPublicScheduledTasksForTeams,
|
|
103
103
|
readLiveAttachment,
|
|
104
104
|
readStats
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-WHMDWHZX.js";
|
|
106
106
|
import {
|
|
107
107
|
parseSlackThreadId
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-TZHLY42G.js";
|
|
109
109
|
import {
|
|
110
110
|
agentTurnUsageSchema,
|
|
111
111
|
fallbackShortTitle,
|
|
112
112
|
hasAgentTurnUsage,
|
|
113
113
|
renderJuniorNativeConversationEvent
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-KSQIE2R4.js";
|
|
115
115
|
import "./chunk-3Y47VMHV.js";
|
|
116
116
|
import {
|
|
117
|
+
create,
|
|
117
118
|
getCachedSnapshot,
|
|
118
119
|
hash
|
|
119
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-5LZVDKQJ.js";
|
|
120
121
|
import "./chunk-PDO5BLNM.js";
|
|
121
122
|
import {
|
|
122
123
|
WorkspaceValidationError,
|
|
@@ -136,7 +137,7 @@ import {
|
|
|
136
137
|
updateWorkspace,
|
|
137
138
|
withSlackRetries,
|
|
138
139
|
workspaceRepoCheckoutPath
|
|
139
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-4KRDL4ZD.js";
|
|
140
141
|
import {
|
|
141
142
|
decodeStoredConversationEvent,
|
|
142
143
|
getConversationStore,
|
|
@@ -144,22 +145,22 @@ import {
|
|
|
144
145
|
getSqlExecutor,
|
|
145
146
|
locationFromRow,
|
|
146
147
|
parseSessionSource
|
|
147
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-PMULUKHL.js";
|
|
148
149
|
import {
|
|
149
150
|
juniorConversationEvents,
|
|
150
151
|
juniorConversations,
|
|
151
152
|
juniorIdentities,
|
|
152
153
|
juniorUsers
|
|
153
|
-
} from "./chunk-
|
|
154
|
+
} from "./chunk-YVW44V5Y.js";
|
|
154
155
|
import "./chunk-BVREIWBD.js";
|
|
155
|
-
import "./chunk-
|
|
156
|
-
import "./chunk-
|
|
156
|
+
import "./chunk-W72TSO24.js";
|
|
157
|
+
import "./chunk-MKDIEH3C.js";
|
|
157
158
|
import {
|
|
158
159
|
juniorDestinations
|
|
159
160
|
} from "./chunk-VFUK3X5B.js";
|
|
160
|
-
import "./chunk-
|
|
161
|
-
import "./chunk-
|
|
162
|
-
import "./chunk-
|
|
161
|
+
import "./chunk-WZGOP5BZ.js";
|
|
162
|
+
import "./chunk-L63FA77C.js";
|
|
163
|
+
import "./chunk-EWAG7BNE.js";
|
|
163
164
|
import "./chunk-BDUENQD3.js";
|
|
164
165
|
import {
|
|
165
166
|
parseSlackChannelId,
|
|
@@ -169,12 +170,12 @@ import {
|
|
|
169
170
|
import {
|
|
170
171
|
logException,
|
|
171
172
|
logWarn
|
|
172
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-V7GGA4LW.js";
|
|
173
174
|
import "./chunk-6GWA276C.js";
|
|
174
175
|
import "./chunk-OOUNJNMR.js";
|
|
175
176
|
import "./chunk-H4HBKISO.js";
|
|
176
|
-
import "./chunk-
|
|
177
|
-
import "./chunk-
|
|
177
|
+
import "./chunk-UFTE42ZF.js";
|
|
178
|
+
import "./chunk-GIGUXRMY.js";
|
|
178
179
|
import "./chunk-MLKGABMK.js";
|
|
179
180
|
|
|
180
181
|
// src/api.ts
|
|
@@ -4075,7 +4076,7 @@ async function readPeoplePluginReports(args) {
|
|
|
4075
4076
|
source: "plugins"
|
|
4076
4077
|
});
|
|
4077
4078
|
}
|
|
4078
|
-
const { getPluginProfileReports } = await import("./agent-hooks-
|
|
4079
|
+
const { getPluginProfileReports } = await import("./agent-hooks-KEHBR4DB.js");
|
|
4079
4080
|
return pluginOperationalReportFeedSchema.parse({
|
|
4080
4081
|
generatedAt: new Date(nowMs).toISOString(),
|
|
4081
4082
|
reports: await getPluginProfileReports({
|
|
@@ -4629,6 +4630,34 @@ function createTaskRoutes() {
|
|
|
4629
4630
|
|
|
4630
4631
|
// src/api/workspaces/routes.ts
|
|
4631
4632
|
import { Hono as Hono7 } from "hono";
|
|
4633
|
+
function snapshotView(workspace) {
|
|
4634
|
+
const recorded = workspace.snapshot;
|
|
4635
|
+
if (!recorded) return null;
|
|
4636
|
+
const profileHash = hash(SANDBOX_RUNTIME, workspace);
|
|
4637
|
+
if (!profileHash || recorded.profileHash !== profileHash) return null;
|
|
4638
|
+
return {
|
|
4639
|
+
id: recorded.id,
|
|
4640
|
+
generatedAt: recorded.generatedAt.toISOString(),
|
|
4641
|
+
buildDurationMs: recorded.buildDurationMs
|
|
4642
|
+
};
|
|
4643
|
+
}
|
|
4644
|
+
async function baselineSnapshotView() {
|
|
4645
|
+
try {
|
|
4646
|
+
const profile = create(SANDBOX_RUNTIME);
|
|
4647
|
+
if (!profile) return null;
|
|
4648
|
+
const cached = await getCachedSnapshot(profile.hash);
|
|
4649
|
+
if (!cached) return null;
|
|
4650
|
+
return {
|
|
4651
|
+
id: cached.snapshotId,
|
|
4652
|
+
generatedAt: new Date(cached.createdAtMs).toISOString(),
|
|
4653
|
+
buildDurationMs: cached.buildDurationMs,
|
|
4654
|
+
dependencyCount: cached.dependencyCount
|
|
4655
|
+
};
|
|
4656
|
+
} catch (error) {
|
|
4657
|
+
logException(error, "sandbox.baseline_snapshot.read.failed");
|
|
4658
|
+
return null;
|
|
4659
|
+
}
|
|
4660
|
+
}
|
|
4632
4661
|
function view(workspace) {
|
|
4633
4662
|
return {
|
|
4634
4663
|
id: workspace.id,
|
|
@@ -4642,27 +4671,10 @@ function view(workspace) {
|
|
|
4642
4671
|
snapshot: null
|
|
4643
4672
|
};
|
|
4644
4673
|
}
|
|
4645
|
-
|
|
4646
|
-
const profileHash = hash(SANDBOX_RUNTIME, workspace);
|
|
4647
|
-
let snapshot = null;
|
|
4648
|
-
if (profileHash) {
|
|
4649
|
-
try {
|
|
4650
|
-
const cached = await getCachedSnapshot(profileHash);
|
|
4651
|
-
if (cached) {
|
|
4652
|
-
snapshot = {
|
|
4653
|
-
id: cached.snapshotId,
|
|
4654
|
-
generatedAt: new Date(cached.createdAtMs).toISOString()
|
|
4655
|
-
};
|
|
4656
|
-
}
|
|
4657
|
-
} catch (error) {
|
|
4658
|
-
logException(error, "api.workspaces.snapshot_lookup.failed", {
|
|
4659
|
-
"app.workspace.id": workspace.id
|
|
4660
|
-
});
|
|
4661
|
-
}
|
|
4662
|
-
}
|
|
4674
|
+
function detailView(workspace) {
|
|
4663
4675
|
return {
|
|
4664
4676
|
...view(workspace),
|
|
4665
|
-
snapshot
|
|
4677
|
+
snapshot: snapshotView(workspace)
|
|
4666
4678
|
};
|
|
4667
4679
|
}
|
|
4668
4680
|
function handleValidationError(error) {
|
|
@@ -4674,8 +4686,13 @@ function handleValidationError(error) {
|
|
|
4674
4686
|
function createWorkspaceRoutes() {
|
|
4675
4687
|
const app = new Hono7();
|
|
4676
4688
|
app.get("/", requireViewer, async () => {
|
|
4689
|
+
const [baselineSnapshot, workspaces] = await Promise.all([
|
|
4690
|
+
baselineSnapshotView(),
|
|
4691
|
+
listWorkspaces(getDb())
|
|
4692
|
+
]);
|
|
4677
4693
|
return jsonResponse(workspaceListSchema, {
|
|
4678
|
-
|
|
4694
|
+
baselineSnapshot,
|
|
4695
|
+
workspaces: workspaces.map(view)
|
|
4679
4696
|
});
|
|
4680
4697
|
});
|
|
4681
4698
|
app.post(
|
|
@@ -4704,7 +4721,7 @@ function createWorkspaceRoutes() {
|
|
|
4704
4721
|
const { id } = context.req.valid("param");
|
|
4705
4722
|
const workspace = await getWorkspace(getDb(), id);
|
|
4706
4723
|
if (!workspace) throwApiError(404, "Workspace not found.");
|
|
4707
|
-
return jsonResponse(workspaceSchema,
|
|
4724
|
+
return jsonResponse(workspaceSchema, detailView(workspace));
|
|
4708
4725
|
}
|
|
4709
4726
|
);
|
|
4710
4727
|
app.put(
|
|
@@ -4778,7 +4795,7 @@ function readDescriptionText(home) {
|
|
|
4778
4795
|
}
|
|
4779
4796
|
}
|
|
4780
4797
|
async function readSkillReports() {
|
|
4781
|
-
const { discoverSkills } = await import("./skills-
|
|
4798
|
+
const { discoverSkills } = await import("./skills-TG76W7TS.js");
|
|
4782
4799
|
const skills = await discoverSkills();
|
|
4783
4800
|
return skillReportsSchema.parse(
|
|
4784
4801
|
skills.map((skill) => ({
|
|
@@ -4788,7 +4805,7 @@ async function readSkillReports() {
|
|
|
4788
4805
|
);
|
|
4789
4806
|
}
|
|
4790
4807
|
async function readPlugins() {
|
|
4791
|
-
const { pluginCatalogRuntime } = await import("./catalog-runtime-
|
|
4808
|
+
const { pluginCatalogRuntime } = await import("./catalog-runtime-7QFMBU2Q.js");
|
|
4792
4809
|
return pluginsSchema.parse(
|
|
4793
4810
|
pluginCatalogRuntime.getProviders().map((plugin) => ({
|
|
4794
4811
|
configKeys: plugin.manifest.configKeys ?? [],
|
|
@@ -4801,7 +4818,7 @@ async function readPlugins() {
|
|
|
4801
4818
|
async function readRuntimeInfoReport() {
|
|
4802
4819
|
const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
|
|
4803
4820
|
import("./discovery-GUFTFBTL.js"),
|
|
4804
|
-
import("./catalog-runtime-
|
|
4821
|
+
import("./catalog-runtime-7QFMBU2Q.js"),
|
|
4805
4822
|
readPlugins(),
|
|
4806
4823
|
readSkillReports()
|
|
4807
4824
|
]);
|
|
@@ -4817,7 +4834,7 @@ async function readRuntimeInfoReport() {
|
|
|
4817
4834
|
}
|
|
4818
4835
|
async function readPluginOperationalReportFeed() {
|
|
4819
4836
|
const nowMs = Date.now();
|
|
4820
|
-
const { getPluginOperationalReports } = await import("./agent-hooks-
|
|
4837
|
+
const { getPluginOperationalReports } = await import("./agent-hooks-KEHBR4DB.js");
|
|
4821
4838
|
return pluginOperationalReportFeedSchema.parse({
|
|
4822
4839
|
source: "plugins",
|
|
4823
4840
|
generatedAt: new Date(nowMs).toISOString(),
|
package/dist/app.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
processConversationWork
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CU7YQNZ3.js";
|
|
4
4
|
import {
|
|
5
5
|
bindSpawnAgent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BGRLZPMI.js";
|
|
7
7
|
import {
|
|
8
8
|
createAgentInvocationWorker,
|
|
9
9
|
enqueueAgentInvocation,
|
|
10
10
|
listPendingAgentInvocationMailboxAppends,
|
|
11
11
|
routeAgentInvocationWork
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-IHSPBOWG.js";
|
|
13
13
|
import {
|
|
14
14
|
GET as GET2,
|
|
15
15
|
GET2 as GET3,
|
|
@@ -36,12 +36,12 @@ import {
|
|
|
36
36
|
startSlackProcessingReaction,
|
|
37
37
|
stripLeadingBotMention,
|
|
38
38
|
wakePausedTurn
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-MV4LDMRG.js";
|
|
40
40
|
import "./chunk-FA6POGLH.js";
|
|
41
41
|
import {
|
|
42
42
|
getTurnRequestDeadline,
|
|
43
43
|
runWithTurnRequestDeadline
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-6SJN7JZ3.js";
|
|
45
45
|
import {
|
|
46
46
|
GET,
|
|
47
47
|
apiTurnIdForMessage,
|
|
@@ -58,8 +58,8 @@ import {
|
|
|
58
58
|
resolveSlackConversationContext,
|
|
59
59
|
routeApiTurnWork,
|
|
60
60
|
webActorFromEmail
|
|
61
|
-
} from "./chunk-
|
|
62
|
-
import "./chunk-
|
|
61
|
+
} from "./chunk-5IR2ABRO.js";
|
|
62
|
+
import "./chunk-2MPO25ZZ.js";
|
|
63
63
|
import {
|
|
64
64
|
CONVERSATION_WORK_STALE_ENQUEUE_MS,
|
|
65
65
|
appendAndEnqueueInboundMessage,
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
isInvalidConversationRecordError,
|
|
71
71
|
listActiveConversationIds,
|
|
72
72
|
removeActiveConversation
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-KE5ETKIR.js";
|
|
74
74
|
import {
|
|
75
75
|
buildDeliveredTurnStatePatch,
|
|
76
76
|
claimDispatchMailboxAppend,
|
|
@@ -101,7 +101,7 @@ import {
|
|
|
101
101
|
requireTurnFailureEventId,
|
|
102
102
|
resolveTurnSessionRouting,
|
|
103
103
|
scheduleSessionCompletedPluginTasks
|
|
104
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-O5J556I2.js";
|
|
105
105
|
import {
|
|
106
106
|
ConversationTurnLifecycleService,
|
|
107
107
|
coerceThreadConversationState,
|
|
@@ -111,7 +111,7 @@ import {
|
|
|
111
111
|
persistThreadRuntimeState,
|
|
112
112
|
persistThreadState,
|
|
113
113
|
persistThreadStateById
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-2RSPCWAV.js";
|
|
115
115
|
import "./chunk-UTL3MHPC.js";
|
|
116
116
|
import {
|
|
117
117
|
getVercelConversationWorkQueue,
|
|
@@ -130,7 +130,7 @@ import {
|
|
|
130
130
|
import {
|
|
131
131
|
validatePluginEgressCredentialHooks,
|
|
132
132
|
validatePluginRegistrations
|
|
133
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-WD7PVGMA.js";
|
|
134
134
|
import {
|
|
135
135
|
defineJuniorPlugins,
|
|
136
136
|
pluginCatalogConfigFromEnv,
|
|
@@ -165,11 +165,11 @@ import {
|
|
|
165
165
|
shouldEmitDevAgentTrace,
|
|
166
166
|
shouldPropagateSandboxEgressTrace,
|
|
167
167
|
unpublishedArtifactHeaders
|
|
168
|
-
} from "./chunk-
|
|
168
|
+
} from "./chunk-CC4EYBUO.js";
|
|
169
169
|
import {
|
|
170
170
|
AuthorizationFlowDisabledError,
|
|
171
171
|
PluginCredentialFailureError
|
|
172
|
-
} from "./chunk-
|
|
172
|
+
} from "./chunk-PRV74X7E.js";
|
|
173
173
|
import "./chunk-DIB4GX3G.js";
|
|
174
174
|
import {
|
|
175
175
|
createAgentRunner,
|
|
@@ -177,7 +177,7 @@ import {
|
|
|
177
177
|
deleteMcpAuthSessionsForUserProvider,
|
|
178
178
|
deleteMcpServerSessionId,
|
|
179
179
|
deleteMcpStoredOAuthCredentials
|
|
180
|
-
} from "./chunk-
|
|
180
|
+
} from "./chunk-GC3AKBNP.js";
|
|
181
181
|
import {
|
|
182
182
|
RetryableDeliveryError
|
|
183
183
|
} from "./chunk-RF6J3DIO.js";
|
|
@@ -185,7 +185,7 @@ import {
|
|
|
185
185
|
formatProviderLabel,
|
|
186
186
|
postSlackMessage,
|
|
187
187
|
startOAuthFlow
|
|
188
|
-
} from "./chunk-
|
|
188
|
+
} from "./chunk-HIB3XTKR.js";
|
|
189
189
|
import "./chunk-7MA4HV4W.js";
|
|
190
190
|
import {
|
|
191
191
|
getExperimentalFeatures,
|
|
@@ -199,16 +199,17 @@ import {
|
|
|
199
199
|
logScheduledTaskRunSkipped,
|
|
200
200
|
requestAttachmentDeletion,
|
|
201
201
|
scheduledTaskRunAttributes
|
|
202
|
-
} from "./chunk-
|
|
202
|
+
} from "./chunk-WHMDWHZX.js";
|
|
203
203
|
import {
|
|
204
204
|
parseSlackThreadId
|
|
205
|
-
} from "./chunk-
|
|
205
|
+
} from "./chunk-TZHLY42G.js";
|
|
206
206
|
import {
|
|
207
207
|
ConversationTurnBoundaryError,
|
|
208
208
|
CooperativeTurnYieldError,
|
|
209
209
|
TurnInputCommitLostError,
|
|
210
210
|
TurnInputDeferredError,
|
|
211
211
|
abandonTurnRecord,
|
|
212
|
+
appendThreadContextMessages,
|
|
212
213
|
buildConversationContext,
|
|
213
214
|
buildDeterministicAssistantMessageId,
|
|
214
215
|
buildDeterministicTurnId,
|
|
@@ -253,12 +254,12 @@ import {
|
|
|
253
254
|
trimTrailingAssistantMessages,
|
|
254
255
|
turnHasReply,
|
|
255
256
|
upsertConversationMessage
|
|
256
|
-
} from "./chunk-
|
|
257
|
+
} from "./chunk-KSQIE2R4.js";
|
|
257
258
|
import "./chunk-3Y47VMHV.js";
|
|
258
259
|
import {
|
|
259
260
|
getSandboxResourceConfig,
|
|
260
261
|
setSandboxResourceConfig
|
|
261
|
-
} from "./chunk-
|
|
262
|
+
} from "./chunk-5LZVDKQJ.js";
|
|
262
263
|
import "./chunk-PDO5BLNM.js";
|
|
263
264
|
import "./chunk-UIE3R5XU.js";
|
|
264
265
|
import {
|
|
@@ -286,7 +287,7 @@ import {
|
|
|
286
287
|
verifyEventTaskCredentialSubject,
|
|
287
288
|
verifyScheduledTaskCredentialSubject,
|
|
288
289
|
verifySlackDirectCredentialSubject
|
|
289
|
-
} from "./chunk-
|
|
290
|
+
} from "./chunk-4KRDL4ZD.js";
|
|
290
291
|
import {
|
|
291
292
|
contextProvenance,
|
|
292
293
|
createSlackDestination,
|
|
@@ -299,13 +300,13 @@ import {
|
|
|
299
300
|
requireSlackDestination,
|
|
300
301
|
withConversationEventLock,
|
|
301
302
|
withConversationMutationLock
|
|
302
|
-
} from "./chunk-
|
|
303
|
+
} from "./chunk-PMULUKHL.js";
|
|
303
304
|
import {
|
|
304
305
|
juniorAgentBindings,
|
|
305
306
|
juniorAgentInvocations,
|
|
306
307
|
juniorConversationEvents,
|
|
307
308
|
juniorConversations
|
|
308
|
-
} from "./chunk-
|
|
309
|
+
} from "./chunk-YVW44V5Y.js";
|
|
309
310
|
import {
|
|
310
311
|
sleep
|
|
311
312
|
} from "./chunk-BVREIWBD.js";
|
|
@@ -313,7 +314,7 @@ import {
|
|
|
313
314
|
acquireActiveLock,
|
|
314
315
|
getStateAdapter,
|
|
315
316
|
withActiveLock
|
|
316
|
-
} from "./chunk-
|
|
317
|
+
} from "./chunk-W72TSO24.js";
|
|
317
318
|
import {
|
|
318
319
|
STANDARD_MODEL_PROFILE,
|
|
319
320
|
botConfig,
|
|
@@ -331,16 +332,16 @@ import {
|
|
|
331
332
|
modelIdForProfile,
|
|
332
333
|
setSlackReactionConfig,
|
|
333
334
|
standardModelId
|
|
334
|
-
} from "./chunk-
|
|
335
|
+
} from "./chunk-MKDIEH3C.js";
|
|
335
336
|
import {
|
|
336
337
|
juniorDestinations
|
|
337
338
|
} from "./chunk-VFUK3X5B.js";
|
|
338
|
-
import "./chunk-
|
|
339
|
-
import "./chunk-
|
|
339
|
+
import "./chunk-WZGOP5BZ.js";
|
|
340
|
+
import "./chunk-WRBQL2AW.js";
|
|
340
341
|
import {
|
|
341
342
|
pluginCatalogRuntime
|
|
342
|
-
} from "./chunk-
|
|
343
|
-
import "./chunk-
|
|
343
|
+
} from "./chunk-L63FA77C.js";
|
|
344
|
+
import "./chunk-EWAG7BNE.js";
|
|
344
345
|
import {
|
|
345
346
|
credentialContextForActor
|
|
346
347
|
} from "./chunk-BDUENQD3.js";
|
|
@@ -372,7 +373,7 @@ import {
|
|
|
372
373
|
withContext,
|
|
373
374
|
withLogContext,
|
|
374
375
|
withSpan
|
|
375
|
-
} from "./chunk-
|
|
376
|
+
} from "./chunk-V7GGA4LW.js";
|
|
376
377
|
import {
|
|
377
378
|
continueTrace
|
|
378
379
|
} from "./chunk-6GWA276C.js";
|
|
@@ -380,10 +381,10 @@ import "./chunk-OOUNJNMR.js";
|
|
|
380
381
|
import "./chunk-H4HBKISO.js";
|
|
381
382
|
import {
|
|
382
383
|
JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE
|
|
383
|
-
} from "./chunk-
|
|
384
|
+
} from "./chunk-UFTE42ZF.js";
|
|
384
385
|
import {
|
|
385
386
|
JUNIOR_VERSION
|
|
386
|
-
} from "./chunk-
|
|
387
|
+
} from "./chunk-GIGUXRMY.js";
|
|
387
388
|
import "./chunk-MLKGABMK.js";
|
|
388
389
|
|
|
389
390
|
// src/app.ts
|
|
@@ -6152,7 +6153,7 @@ function parkedInputKey(message) {
|
|
|
6152
6153
|
const text = first && typeof first === "object" && "text" in first ? String(first.text ?? "") : "";
|
|
6153
6154
|
return `${message.timestamp}:${text}`;
|
|
6154
6155
|
}
|
|
6155
|
-
function
|
|
6156
|
+
function renderRecentThreadMessageLines(conversationContext, messages) {
|
|
6156
6157
|
const passiveMessages = messages.filter((queued) => {
|
|
6157
6158
|
if (queued.explicitMention) {
|
|
6158
6159
|
return false;
|
|
@@ -6161,35 +6162,33 @@ function renderRecentThreadMessages(conversationContext, messages) {
|
|
|
6161
6162
|
return !slackTs || !conversationContext?.includes(`slack_ts="${slackTs}"`);
|
|
6162
6163
|
});
|
|
6163
6164
|
if (passiveMessages.length === 0) {
|
|
6164
|
-
return
|
|
6165
|
+
return [];
|
|
6165
6166
|
}
|
|
6166
|
-
const lines = [
|
|
6167
|
+
const lines = [];
|
|
6167
6168
|
for (const queued of passiveMessages) {
|
|
6168
6169
|
const actor = queuedInstructionActor(queued);
|
|
6170
|
+
const author = escapeXml(actor?.authorName ?? "user");
|
|
6169
6171
|
const attrs = [
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
+
`role="user"`,
|
|
6173
|
+
`author="${author}"`,
|
|
6174
|
+
actor?.authorId ? `actor_id="${escapeXml(actor.authorId)}"` : void 0,
|
|
6172
6175
|
actor?.slackTs ? `slack_ts="${escapeXml(actor.slackTs)}"` : void 0
|
|
6173
6176
|
].filter((attr) => Boolean(attr)).join(" ");
|
|
6177
|
+
const text = escapeXml(queued.userText.replace(/\s+/g, " "));
|
|
6174
6178
|
lines.push(
|
|
6175
|
-
|
|
6176
|
-
|
|
6179
|
+
` <message ${attrs}>`,
|
|
6180
|
+
`[user] ${author}: ${text}`,
|
|
6177
6181
|
" </message>"
|
|
6178
6182
|
);
|
|
6179
6183
|
}
|
|
6180
|
-
lines
|
|
6181
|
-
return lines.join("\n");
|
|
6184
|
+
return lines;
|
|
6182
6185
|
}
|
|
6183
6186
|
function appendRecentThreadMessagesToContext(conversationContext, messages, options) {
|
|
6184
|
-
const
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
+
const baseContext = options?.includeConversationContext === false ? void 0 : conversationContext;
|
|
6188
|
+
return appendThreadContextMessages(
|
|
6189
|
+
baseContext,
|
|
6190
|
+
renderRecentThreadMessageLines(conversationContext, messages)
|
|
6187
6191
|
);
|
|
6188
|
-
const contextParts = [
|
|
6189
|
-
options?.includeConversationContext === false ? void 0 : conversationContext?.trim(),
|
|
6190
|
-
recentThreadMessages
|
|
6191
|
-
].filter((part) => Boolean(part));
|
|
6192
|
-
return contextParts.length > 0 ? contextParts.join("\n\n") : void 0;
|
|
6193
6192
|
}
|
|
6194
6193
|
function queuedInstructionActor(queued) {
|
|
6195
6194
|
const actor = getMessageActorIdentity(queued.message);
|
|
@@ -6436,17 +6435,14 @@ function createReplyToThread(deps) {
|
|
|
6436
6435
|
text: queued.userText,
|
|
6437
6436
|
timestampMs: queued.message.metadata.dateSent.getTime(),
|
|
6438
6437
|
omittedImageAttachmentCount: !isVisionEnabled() && hasPotentialImageAttachment(attachments) ? countPotentialImageAttachments(attachments) : 0,
|
|
6439
|
-
attachments: await deps.resolveUserAttachments(
|
|
6440
|
-
|
|
6441
|
-
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6445
|
-
|
|
6446
|
-
|
|
6447
|
-
messageTs: getMessageTimestamp(queued.message)
|
|
6448
|
-
}
|
|
6449
|
-
)
|
|
6438
|
+
attachments: await deps.resolveUserAttachments(attachments, {
|
|
6439
|
+
threadId,
|
|
6440
|
+
actorId: isResourceEventSlackMessage(queued.message) ? void 0 : queued.message.author.userId,
|
|
6441
|
+
channelId,
|
|
6442
|
+
runId,
|
|
6443
|
+
conversation: preparedState.conversation,
|
|
6444
|
+
messageTs: getMessageTimestamp(queued.message)
|
|
6445
|
+
})
|
|
6450
6446
|
};
|
|
6451
6447
|
})
|
|
6452
6448
|
);
|
|
@@ -6989,7 +6985,9 @@ function createReplyToThread(deps) {
|
|
|
6989
6985
|
slackConversation,
|
|
6990
6986
|
source,
|
|
6991
6987
|
destination,
|
|
6992
|
-
publishExternally: shouldPublishExternally2(
|
|
6988
|
+
publishExternally: shouldPublishExternally2(
|
|
6989
|
+
options.publishExternally
|
|
6990
|
+
),
|
|
6993
6991
|
...destinationVisibility ? { destinationVisibility } : {},
|
|
6994
6992
|
surface: options.execution?.surface ?? "slack",
|
|
6995
6993
|
dispatch: options.execution?.dispatch,
|