@sentry/junior 0.163.0 → 0.164.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-6IX5CV7G.js → agent-hooks-WTBPNRTC.js} +9 -9
- package/dist/api/schema/workspace.d.ts +47 -0
- package/dist/api/schema.d.ts +2 -0
- package/dist/api/schema.js +15 -3
- package/dist/api/workspaces/routes.d.ts +4 -0
- package/dist/api.js +139 -27
- package/dist/app.js +33 -31
- package/dist/{catalog-runtime-NEPZNTOM.js → catalog-runtime-CZ2SQINY.js} +5 -5
- package/dist/chat/workspaces/store.d.ts +29 -0
- package/dist/chat/workspaces/validation.d.ts +21 -0
- package/dist/{chunk-ZDKTZG3G.js → chunk-26JYGL2L.js} +1 -1
- package/dist/{chunk-EKGJVUVS.js → chunk-2K25MRZK.js} +5 -5
- package/dist/{chunk-KD3ROG6P.js → chunk-3L23VTY7.js} +17 -17
- package/dist/{chunk-GCLHNRMU.js → chunk-4GTOFUQF.js} +1 -1
- package/dist/{chunk-NL53P7PS.js → chunk-5FWQ73UZ.js} +1 -1
- package/dist/{chunk-2FBPN2Y4.js → chunk-5GLGQHO3.js} +1 -1
- package/dist/{chunk-XY2IVIAY.js → chunk-6BXV63YX.js} +5 -5
- package/dist/{chunk-FEIHINKR.js → chunk-6ENAACWN.js} +5 -5
- package/dist/{chunk-IX4XI42N.js → chunk-7WKWMMYQ.js} +21 -73
- package/dist/{chunk-TPDNZCZU.js → chunk-BXBZDV3C.js} +1 -1
- package/dist/{chunk-SR6WRBJW.js → chunk-CGCNFEAU.js} +4 -4
- package/dist/{chunk-MWVQ35U6.js → chunk-FKDY7NTC.js} +12 -12
- package/dist/{chunk-YAUQXZVT.js → chunk-FX4PX3SA.js} +2 -2
- package/dist/{chunk-RTPJRLOP.js → chunk-H36GJVJV.js} +7 -7
- package/dist/{chunk-MXFL7LNZ.js → chunk-HHW6ZVIZ.js} +4 -4
- package/dist/{chunk-3OZNFCPR.js → chunk-JW23XD4I.js} +6 -6
- package/dist/{chunk-JI5EPI3O.js → chunk-LPLVNMVN.js} +3 -3
- package/dist/{chunk-IIT23D3M.js → chunk-NAGI2XH3.js} +4 -4
- package/dist/{chunk-4P2XNVTO.js → chunk-NLTQRYNP.js} +2 -2
- package/dist/{chunk-SA6BEEAB.js → chunk-PU45BSBS.js} +108 -74
- package/dist/{chunk-3T7RJVDJ.js → chunk-RBV4JHCP.js} +1 -1
- package/dist/{chunk-THS4CKN4.js → chunk-RJHZNPDH.js} +4 -4
- package/dist/{chunk-RK7KPI6G.js → chunk-RULIISEI.js} +1 -1
- package/dist/{chunk-BLZUFHM7.js → chunk-RYYEHWIL.js} +1 -1
- package/dist/{chunk-TPT6EF7K.js → chunk-VHSEMJTS.js} +1 -1
- package/dist/{chunk-O4IK4O7C.js → chunk-VV2DN24T.js} +1 -1
- package/dist/{chunk-ICJ3KCA2.js → chunk-WJUKESU2.js} +1 -1
- package/dist/{chunk-2HBJQEBE.js → chunk-XAIRI54J.js} +1 -1
- package/dist/{chunk-WPGYWDJR.js → chunk-Y2B6AXZQ.js} +6 -6
- package/dist/{chunk-ZF6IC27P.js → chunk-YHCTPDXS.js} +274 -8
- package/dist/{chunk-ATWHPSMF.js → chunk-ZSNABC2E.js} +1 -1
- package/dist/{chunk-O5ZZL7IR.js → chunk-ZUTAGCPH.js} +9 -9
- 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-6VBMHVW2.js → db-32KRFS6L.js} +7 -7
- package/dist/instrumentation.js +4 -4
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-5NCCUIM2.js → oauth-callback-server-CGZP2Z6U.js} +22 -22
- package/dist/{runner-6ONEB6TQ.js → runner-S5N4Q2XL.js} +31 -33
- package/dist/{skills-Y5R36UH4.js → skills-KYPSHSQR.js} +6 -6
- package/dist/spawn-EGOB3CLV.js +37 -0
- package/dist/{validation-HLHEQDEK.js → validation-SZBE7JNF.js} +6 -6
- package/dist/version.js +1 -1
- package/dist/{work-VIEFYTFG.js → work-GCZKHEZX.js} +17 -17
- package/dist/worker-6MY5Q4A2.js +24 -0
- package/package.json +5 -5
- package/dist/spawn-RFMBQ6B3.js +0 -37
- package/dist/worker-MRSKPKQZ.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-YHCTPDXS.js";
|
|
17
|
+
import "./chunk-LPLVNMVN.js";
|
|
18
|
+
import "./chunk-ZSNABC2E.js";
|
|
19
19
|
import "./chunk-BVREIWBD.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-BXBZDV3C.js";
|
|
21
|
+
import "./chunk-FX4PX3SA.js";
|
|
22
22
|
import "./chunk-VFUK3X5B.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-RBV4JHCP.js";
|
|
24
24
|
import "./chunk-V7YE4WCP.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-VHSEMJTS.js";
|
|
26
26
|
import "./chunk-6GWA276C.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-26JYGL2L.js";
|
|
28
|
+
import "./chunk-5GLGQHO3.js";
|
|
29
29
|
import "./chunk-MLKGABMK.js";
|
|
30
30
|
export {
|
|
31
31
|
PluginHookDeniedError,
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const workspaceRepoSchema: z.ZodObject<{
|
|
3
|
+
provider: z.ZodString;
|
|
4
|
+
repo: z.ZodString;
|
|
5
|
+
checkoutPath: z.ZodString;
|
|
6
|
+
isPrimary: z.ZodBoolean;
|
|
7
|
+
}, z.core.$strict>;
|
|
8
|
+
export declare const workspaceSchema: z.ZodObject<{
|
|
9
|
+
id: z.ZodString;
|
|
10
|
+
name: z.ZodString;
|
|
11
|
+
setupScript: z.ZodString;
|
|
12
|
+
repos: z.ZodArray<z.ZodObject<{
|
|
13
|
+
provider: z.ZodString;
|
|
14
|
+
repo: z.ZodString;
|
|
15
|
+
checkoutPath: z.ZodString;
|
|
16
|
+
isPrimary: z.ZodBoolean;
|
|
17
|
+
}, z.core.$strict>>;
|
|
18
|
+
}, z.core.$strict>;
|
|
19
|
+
export declare const workspaceListSchema: z.ZodObject<{
|
|
20
|
+
workspaces: z.ZodArray<z.ZodObject<{
|
|
21
|
+
id: z.ZodString;
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
setupScript: z.ZodString;
|
|
24
|
+
repos: z.ZodArray<z.ZodObject<{
|
|
25
|
+
provider: z.ZodString;
|
|
26
|
+
repo: z.ZodString;
|
|
27
|
+
checkoutPath: z.ZodString;
|
|
28
|
+
isPrimary: z.ZodBoolean;
|
|
29
|
+
}, z.core.$strict>>;
|
|
30
|
+
}, z.core.$strict>>;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
export declare const workspaceBodySchema: z.ZodObject<{
|
|
33
|
+
name: z.ZodString;
|
|
34
|
+
setupScript: z.ZodOptional<z.ZodString>;
|
|
35
|
+
repos: z.ZodArray<z.ZodObject<{
|
|
36
|
+
provider: z.ZodString;
|
|
37
|
+
repo: z.ZodString;
|
|
38
|
+
isPrimary: z.ZodOptional<z.ZodBoolean>;
|
|
39
|
+
}, z.core.$strict>>;
|
|
40
|
+
}, z.core.$strict>;
|
|
41
|
+
export declare const workspaceParamsSchema: z.ZodObject<{
|
|
42
|
+
id: z.ZodString;
|
|
43
|
+
}, z.core.$strict>;
|
|
44
|
+
export declare const deleteWorkspaceResponseSchema: z.ZodObject<{
|
|
45
|
+
deleted: z.ZodLiteral<true>;
|
|
46
|
+
}, z.core.$strict>;
|
|
47
|
+
export type WorkspaceReport = z.infer<typeof workspaceSchema>;
|
package/dist/api/schema.d.ts
CHANGED
|
@@ -10,6 +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
15
|
export { eventTaskSummarySchema, scheduledTaskSummarySchema, taskExecutionListSchema, taskExecutionSchema, taskExecutionStatusDaySchema, taskExecutionStatusSchema, taskListSchema, taskParamsSchema, taskRunListSchema, taskRunSchema, taskSummarySchema, } from "./schema/task";
|
|
14
16
|
export type { TaskExecution, TaskExecutionDay, TaskExecutionList, TaskExecutionStatusDay, TaskList, TaskRun, TaskRunList, TaskSummary, } from "./schema/task";
|
|
15
17
|
export { statSchema, statsReportSchema } from "./schema/stats";
|
package/dist/api/schema.js
CHANGED
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
createPersonalTokenBodySchema,
|
|
30
30
|
createdPersonalTokenSchema,
|
|
31
31
|
dailyConversationActivitySchema,
|
|
32
|
+
deleteWorkspaceResponseSchema,
|
|
32
33
|
eventTaskSummarySchema,
|
|
33
34
|
locationActivityDayReportSchema,
|
|
34
35
|
locationDetailReportSchema,
|
|
@@ -51,8 +52,13 @@ import {
|
|
|
51
52
|
taskParamsSchema,
|
|
52
53
|
taskRunListSchema,
|
|
53
54
|
taskRunSchema,
|
|
54
|
-
taskSummarySchema
|
|
55
|
-
|
|
55
|
+
taskSummarySchema,
|
|
56
|
+
workspaceBodySchema,
|
|
57
|
+
workspaceListSchema,
|
|
58
|
+
workspaceParamsSchema,
|
|
59
|
+
workspaceRepoSchema,
|
|
60
|
+
workspaceSchema
|
|
61
|
+
} from "../chunk-PU45BSBS.js";
|
|
56
62
|
import {
|
|
57
63
|
healthReportSchema,
|
|
58
64
|
pluginOperationalReportFeedSchema,
|
|
@@ -99,6 +105,7 @@ export {
|
|
|
99
105
|
createPersonalTokenBodySchema,
|
|
100
106
|
createdPersonalTokenSchema,
|
|
101
107
|
dailyConversationActivitySchema,
|
|
108
|
+
deleteWorkspaceResponseSchema,
|
|
102
109
|
eventTaskSummarySchema,
|
|
103
110
|
healthReportSchema,
|
|
104
111
|
locationActivityDayReportSchema,
|
|
@@ -131,5 +138,10 @@ export {
|
|
|
131
138
|
taskParamsSchema,
|
|
132
139
|
taskRunListSchema,
|
|
133
140
|
taskRunSchema,
|
|
134
|
-
taskSummarySchema
|
|
141
|
+
taskSummarySchema,
|
|
142
|
+
workspaceBodySchema,
|
|
143
|
+
workspaceListSchema,
|
|
144
|
+
workspaceParamsSchema,
|
|
145
|
+
workspaceRepoSchema,
|
|
146
|
+
workspaceSchema
|
|
135
147
|
};
|
package/dist/api.js
CHANGED
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
createConversationMessageBodySchema,
|
|
24
24
|
createPersonalTokenBodySchema,
|
|
25
25
|
createdPersonalTokenSchema,
|
|
26
|
+
deleteWorkspaceResponseSchema,
|
|
26
27
|
locationDetailReportSchema,
|
|
27
28
|
locationDirectoryReportSchema,
|
|
28
29
|
locationParamsSchema,
|
|
@@ -35,8 +36,12 @@ import {
|
|
|
35
36
|
taskExecutionListSchema,
|
|
36
37
|
taskListSchema,
|
|
37
38
|
taskParamsSchema,
|
|
38
|
-
taskRunListSchema
|
|
39
|
-
|
|
39
|
+
taskRunListSchema,
|
|
40
|
+
workspaceBodySchema,
|
|
41
|
+
workspaceListSchema,
|
|
42
|
+
workspaceParamsSchema,
|
|
43
|
+
workspaceSchema
|
|
44
|
+
} from "./chunk-PU45BSBS.js";
|
|
40
45
|
import {
|
|
41
46
|
appendAndEnqueueApiConversationMessage,
|
|
42
47
|
authenticatePersonalToken,
|
|
@@ -54,15 +59,15 @@ import {
|
|
|
54
59
|
revokePersonalToken,
|
|
55
60
|
viewerConversationMembership,
|
|
56
61
|
webActorFromEmail
|
|
57
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-FKDY7NTC.js";
|
|
58
63
|
import {
|
|
59
64
|
buildSentryConversationUrl,
|
|
60
65
|
getWebAuthorization
|
|
61
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-5FWQ73UZ.js";
|
|
62
67
|
import {
|
|
63
68
|
cancelHumanFacingPendingMessages,
|
|
64
69
|
getConversation
|
|
65
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-NAGI2XH3.js";
|
|
66
71
|
import {
|
|
67
72
|
readTaskExecutionByConversationId,
|
|
68
73
|
readTaskExecutionDays,
|
|
@@ -70,8 +75,8 @@ import {
|
|
|
70
75
|
readTaskExecutionSummaries,
|
|
71
76
|
readTaskExecutions,
|
|
72
77
|
readTaskRuns
|
|
73
|
-
} from "./chunk-
|
|
74
|
-
import "./chunk-
|
|
78
|
+
} from "./chunk-ZUTAGCPH.js";
|
|
79
|
+
import "./chunk-2K25MRZK.js";
|
|
75
80
|
import {
|
|
76
81
|
healthReportSchema,
|
|
77
82
|
pluginOperationalReportFeedSchema,
|
|
@@ -96,30 +101,37 @@ import {
|
|
|
96
101
|
listPublicScheduledTasksForTeams,
|
|
97
102
|
readLiveAttachment,
|
|
98
103
|
readStats
|
|
99
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-6ENAACWN.js";
|
|
100
105
|
import {
|
|
101
106
|
parseSlackThreadId
|
|
102
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-WJUKESU2.js";
|
|
103
108
|
import {
|
|
104
109
|
agentTurnUsageSchema,
|
|
105
110
|
fallbackShortTitle,
|
|
106
111
|
hasAgentTurnUsage,
|
|
107
112
|
renderJuniorNativeConversationEvent
|
|
108
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-HHW6ZVIZ.js";
|
|
109
114
|
import "./chunk-3Y47VMHV.js";
|
|
110
115
|
import "./chunk-PDO5BLNM.js";
|
|
111
116
|
import {
|
|
117
|
+
WorkspaceValidationError,
|
|
112
118
|
createPluginLogger,
|
|
119
|
+
createWorkspace,
|
|
120
|
+
deleteWorkspace,
|
|
113
121
|
findUserByEmail,
|
|
114
122
|
getPlugins,
|
|
115
123
|
getSlackClient,
|
|
124
|
+
getWorkspace,
|
|
116
125
|
listConversationAnnotations,
|
|
117
126
|
listConversationAnnotationsById,
|
|
127
|
+
listWorkspaces,
|
|
118
128
|
renderPluginConversationEvent,
|
|
119
129
|
resolveViewerUser,
|
|
120
130
|
updateViewerDisplayName,
|
|
121
|
-
|
|
122
|
-
|
|
131
|
+
updateWorkspace,
|
|
132
|
+
withSlackRetries,
|
|
133
|
+
workspaceRepoCheckoutPath
|
|
134
|
+
} from "./chunk-YHCTPDXS.js";
|
|
123
135
|
import {
|
|
124
136
|
decodeStoredConversationEvent,
|
|
125
137
|
getConversationStore,
|
|
@@ -127,20 +139,20 @@ import {
|
|
|
127
139
|
getSqlExecutor,
|
|
128
140
|
locationFromRow,
|
|
129
141
|
parseSessionSource
|
|
130
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-LPLVNMVN.js";
|
|
131
143
|
import {
|
|
132
144
|
juniorConversationEvents,
|
|
133
145
|
juniorConversations,
|
|
134
146
|
juniorIdentities,
|
|
135
147
|
juniorUsers
|
|
136
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-ZSNABC2E.js";
|
|
137
149
|
import "./chunk-BVREIWBD.js";
|
|
138
|
-
import "./chunk-
|
|
139
|
-
import "./chunk-
|
|
150
|
+
import "./chunk-BXBZDV3C.js";
|
|
151
|
+
import "./chunk-FX4PX3SA.js";
|
|
140
152
|
import {
|
|
141
153
|
juniorDestinations
|
|
142
154
|
} from "./chunk-VFUK3X5B.js";
|
|
143
|
-
import "./chunk-
|
|
155
|
+
import "./chunk-RBV4JHCP.js";
|
|
144
156
|
import "./chunk-BDUENQD3.js";
|
|
145
157
|
import {
|
|
146
158
|
parseSlackChannelId,
|
|
@@ -150,14 +162,14 @@ import {
|
|
|
150
162
|
import {
|
|
151
163
|
logException,
|
|
152
164
|
logWarn
|
|
153
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-VHSEMJTS.js";
|
|
154
166
|
import "./chunk-6GWA276C.js";
|
|
155
|
-
import "./chunk-
|
|
156
|
-
import "./chunk-
|
|
167
|
+
import "./chunk-26JYGL2L.js";
|
|
168
|
+
import "./chunk-5GLGQHO3.js";
|
|
157
169
|
import "./chunk-MLKGABMK.js";
|
|
158
170
|
|
|
159
171
|
// src/api.ts
|
|
160
|
-
import { Hono as
|
|
172
|
+
import { Hono as Hono8 } from "hono";
|
|
161
173
|
import { HTTPException as HTTPException2 } from "hono/http-exception";
|
|
162
174
|
|
|
163
175
|
// src/api/conversations/routes.ts
|
|
@@ -4054,7 +4066,7 @@ async function readPeoplePluginReports(args) {
|
|
|
4054
4066
|
source: "plugins"
|
|
4055
4067
|
});
|
|
4056
4068
|
}
|
|
4057
|
-
const { getPluginProfileReports } = await import("./agent-hooks-
|
|
4069
|
+
const { getPluginProfileReports } = await import("./agent-hooks-WTBPNRTC.js");
|
|
4058
4070
|
return pluginOperationalReportFeedSchema.parse({
|
|
4059
4071
|
generatedAt: new Date(nowMs).toISOString(),
|
|
4060
4072
|
reports: await getPluginProfileReports({
|
|
@@ -4606,6 +4618,105 @@ function createTaskRoutes() {
|
|
|
4606
4618
|
return app;
|
|
4607
4619
|
}
|
|
4608
4620
|
|
|
4621
|
+
// src/api/workspaces/routes.ts
|
|
4622
|
+
import { Hono as Hono7 } from "hono";
|
|
4623
|
+
function view(workspace) {
|
|
4624
|
+
return {
|
|
4625
|
+
id: workspace.id,
|
|
4626
|
+
name: workspace.name,
|
|
4627
|
+
setupScript: workspace.setupScript,
|
|
4628
|
+
repos: workspace.repos.map((repo) => ({
|
|
4629
|
+
provider: repo.provider,
|
|
4630
|
+
repo: repo.repo,
|
|
4631
|
+
checkoutPath: workspaceRepoCheckoutPath(repo.repo),
|
|
4632
|
+
isPrimary: repo.isPrimary
|
|
4633
|
+
}))
|
|
4634
|
+
};
|
|
4635
|
+
}
|
|
4636
|
+
function handleValidationError(error) {
|
|
4637
|
+
if (error instanceof WorkspaceValidationError) {
|
|
4638
|
+
throwApiError(400, error.message);
|
|
4639
|
+
}
|
|
4640
|
+
throw error;
|
|
4641
|
+
}
|
|
4642
|
+
function createWorkspaceRoutes() {
|
|
4643
|
+
const app = new Hono7();
|
|
4644
|
+
app.get("/", requireViewer, async () => {
|
|
4645
|
+
return jsonResponse(workspaceListSchema, {
|
|
4646
|
+
workspaces: (await listWorkspaces(getDb())).map(view)
|
|
4647
|
+
});
|
|
4648
|
+
});
|
|
4649
|
+
app.post(
|
|
4650
|
+
"/",
|
|
4651
|
+
requireViewer,
|
|
4652
|
+
validateRequest("json", workspaceBodySchema, "Invalid request body."),
|
|
4653
|
+
async (context) => {
|
|
4654
|
+
const body = context.req.valid("json");
|
|
4655
|
+
try {
|
|
4656
|
+
const workspace = await createWorkspace(body);
|
|
4657
|
+
return jsonResponse(workspaceSchema, view(workspace), { status: 201 });
|
|
4658
|
+
} catch (error) {
|
|
4659
|
+
handleValidationError(error);
|
|
4660
|
+
}
|
|
4661
|
+
}
|
|
4662
|
+
);
|
|
4663
|
+
app.get(
|
|
4664
|
+
"/:id",
|
|
4665
|
+
requireViewer,
|
|
4666
|
+
validateRequest(
|
|
4667
|
+
"param",
|
|
4668
|
+
workspaceParamsSchema,
|
|
4669
|
+
"Invalid route parameters."
|
|
4670
|
+
),
|
|
4671
|
+
async (context) => {
|
|
4672
|
+
const { id } = context.req.valid("param");
|
|
4673
|
+
const workspace = await getWorkspace(getDb(), id);
|
|
4674
|
+
if (!workspace) throwApiError(404, "Workspace not found.");
|
|
4675
|
+
return jsonResponse(workspaceSchema, view(workspace));
|
|
4676
|
+
}
|
|
4677
|
+
);
|
|
4678
|
+
app.put(
|
|
4679
|
+
"/:id",
|
|
4680
|
+
requireViewer,
|
|
4681
|
+
validateRequest(
|
|
4682
|
+
"param",
|
|
4683
|
+
workspaceParamsSchema,
|
|
4684
|
+
"Invalid route parameters."
|
|
4685
|
+
),
|
|
4686
|
+
validateRequest("json", workspaceBodySchema, "Invalid request body."),
|
|
4687
|
+
async (context) => {
|
|
4688
|
+
const { id } = context.req.valid("param");
|
|
4689
|
+
const body = context.req.valid("json");
|
|
4690
|
+
try {
|
|
4691
|
+
const workspace = await updateWorkspace(id, body);
|
|
4692
|
+
if (!workspace) throwApiError(404, "Workspace not found.");
|
|
4693
|
+
return jsonResponse(workspaceSchema, view(workspace));
|
|
4694
|
+
} catch (error) {
|
|
4695
|
+
handleValidationError(error);
|
|
4696
|
+
}
|
|
4697
|
+
}
|
|
4698
|
+
);
|
|
4699
|
+
app.delete(
|
|
4700
|
+
"/:id",
|
|
4701
|
+
requireViewer,
|
|
4702
|
+
validateRequest(
|
|
4703
|
+
"param",
|
|
4704
|
+
workspaceParamsSchema,
|
|
4705
|
+
"Invalid route parameters."
|
|
4706
|
+
),
|
|
4707
|
+
async (context) => {
|
|
4708
|
+
const { id } = context.req.valid("param");
|
|
4709
|
+
if (!await deleteWorkspace(id)) {
|
|
4710
|
+
throwApiError(404, "Workspace not found.");
|
|
4711
|
+
}
|
|
4712
|
+
return jsonResponse(deleteWorkspaceResponseSchema, {
|
|
4713
|
+
deleted: true
|
|
4714
|
+
});
|
|
4715
|
+
}
|
|
4716
|
+
);
|
|
4717
|
+
return app;
|
|
4718
|
+
}
|
|
4719
|
+
|
|
4609
4720
|
// src/api/stats.ts
|
|
4610
4721
|
var WINDOW_DAYS2 = 90;
|
|
4611
4722
|
async function readStatsReport() {
|
|
@@ -4635,7 +4746,7 @@ function readDescriptionText(home) {
|
|
|
4635
4746
|
}
|
|
4636
4747
|
}
|
|
4637
4748
|
async function readSkillReports() {
|
|
4638
|
-
const { discoverSkills } = await import("./skills-
|
|
4749
|
+
const { discoverSkills } = await import("./skills-KYPSHSQR.js");
|
|
4639
4750
|
const skills = await discoverSkills();
|
|
4640
4751
|
return skillReportsSchema.parse(
|
|
4641
4752
|
skills.map((skill) => ({
|
|
@@ -4645,7 +4756,7 @@ async function readSkillReports() {
|
|
|
4645
4756
|
);
|
|
4646
4757
|
}
|
|
4647
4758
|
async function readPlugins() {
|
|
4648
|
-
const { pluginCatalogRuntime } = await import("./catalog-runtime-
|
|
4759
|
+
const { pluginCatalogRuntime } = await import("./catalog-runtime-CZ2SQINY.js");
|
|
4649
4760
|
return pluginsSchema.parse(
|
|
4650
4761
|
pluginCatalogRuntime.getProviders().map((plugin) => ({
|
|
4651
4762
|
configKeys: plugin.manifest.configKeys ?? [],
|
|
@@ -4658,7 +4769,7 @@ async function readPlugins() {
|
|
|
4658
4769
|
async function readRuntimeInfoReport() {
|
|
4659
4770
|
const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
|
|
4660
4771
|
import("./discovery-GUFTFBTL.js"),
|
|
4661
|
-
import("./catalog-runtime-
|
|
4772
|
+
import("./catalog-runtime-CZ2SQINY.js"),
|
|
4662
4773
|
readPlugins(),
|
|
4663
4774
|
readSkillReports()
|
|
4664
4775
|
]);
|
|
@@ -4674,7 +4785,7 @@ async function readRuntimeInfoReport() {
|
|
|
4674
4785
|
}
|
|
4675
4786
|
async function readPluginOperationalReportFeed() {
|
|
4676
4787
|
const nowMs = Date.now();
|
|
4677
|
-
const { getPluginOperationalReports } = await import("./agent-hooks-
|
|
4788
|
+
const { getPluginOperationalReports } = await import("./agent-hooks-WTBPNRTC.js");
|
|
4678
4789
|
return pluginOperationalReportFeedSchema.parse({
|
|
4679
4790
|
source: "plugins",
|
|
4680
4791
|
generatedAt: new Date(nowMs).toISOString(),
|
|
@@ -4684,7 +4795,7 @@ async function readPluginOperationalReportFeed() {
|
|
|
4684
4795
|
|
|
4685
4796
|
// src/api.ts
|
|
4686
4797
|
function createJuniorApi() {
|
|
4687
|
-
const app = new
|
|
4798
|
+
const app = new Hono8();
|
|
4688
4799
|
app.get(
|
|
4689
4800
|
"/api/health",
|
|
4690
4801
|
async () => jsonResponse(healthReportSchema, readHealthReport())
|
|
@@ -4723,6 +4834,7 @@ function createJuniorApi() {
|
|
|
4723
4834
|
app.route("/api/locations", createLocationRoutes());
|
|
4724
4835
|
app.route("/api/user-pages", createUserPageRoutes());
|
|
4725
4836
|
app.route("/api/tasks", createTaskRoutes());
|
|
4837
|
+
app.route("/api/workspaces", createWorkspaceRoutes());
|
|
4726
4838
|
app.notFound(
|
|
4727
4839
|
() => jsonResponse(
|
|
4728
4840
|
apiErrorSchema,
|
package/dist/app.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
processConversationWork
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CGCNFEAU.js";
|
|
4
4
|
import {
|
|
5
5
|
bindSpawnAgent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XAIRI54J.js";
|
|
7
7
|
import {
|
|
8
8
|
createAgentInvocationWorker,
|
|
9
9
|
enqueueAgentInvocation,
|
|
10
10
|
listPendingAgentInvocationMailboxAppends,
|
|
11
11
|
routeAgentInvocationWork
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-Y2B6AXZQ.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-3L23VTY7.js";
|
|
40
40
|
import "./chunk-FA6POGLH.js";
|
|
41
41
|
import {
|
|
42
42
|
getTurnRequestDeadline,
|
|
43
43
|
runWithTurnRequestDeadline
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-RYYEHWIL.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-FKDY7NTC.js";
|
|
62
|
+
import "./chunk-5FWQ73UZ.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-NAGI2XH3.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-ZUTAGCPH.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-2K25MRZK.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-4GTOFUQF.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-7WKWMMYQ.js";
|
|
169
169
|
import {
|
|
170
170
|
AuthorizationFlowDisabledError,
|
|
171
171
|
PluginCredentialFailureError
|
|
172
|
-
} from "./chunk-
|
|
172
|
+
} from "./chunk-6BXV63YX.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-H36GJVJV.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-JW23XD4I.js";
|
|
189
189
|
import "./chunk-7MA4HV4W.js";
|
|
190
190
|
import {
|
|
191
191
|
getExperimentalFeatures,
|
|
@@ -195,7 +195,7 @@ import {
|
|
|
195
195
|
import {
|
|
196
196
|
getSandboxResourceConfig,
|
|
197
197
|
setSandboxResourceConfig
|
|
198
|
-
} from "./chunk-
|
|
198
|
+
} from "./chunk-RJHZNPDH.js";
|
|
199
199
|
import {
|
|
200
200
|
collectAttachmentGarbage,
|
|
201
201
|
createSchedulerSqlStore,
|
|
@@ -203,10 +203,10 @@ import {
|
|
|
203
203
|
logScheduledTaskRunSkipped,
|
|
204
204
|
requestAttachmentDeletion,
|
|
205
205
|
scheduledTaskRunAttributes
|
|
206
|
-
} from "./chunk-
|
|
206
|
+
} from "./chunk-6ENAACWN.js";
|
|
207
207
|
import {
|
|
208
208
|
parseSlackThreadId
|
|
209
|
-
} from "./chunk-
|
|
209
|
+
} from "./chunk-WJUKESU2.js";
|
|
210
210
|
import {
|
|
211
211
|
ConversationTurnBoundaryError,
|
|
212
212
|
CooperativeTurnYieldError,
|
|
@@ -257,7 +257,7 @@ import {
|
|
|
257
257
|
trimTrailingAssistantMessages,
|
|
258
258
|
turnHasReply,
|
|
259
259
|
upsertConversationMessage
|
|
260
|
-
} from "./chunk-
|
|
260
|
+
} from "./chunk-HHW6ZVIZ.js";
|
|
261
261
|
import "./chunk-3Y47VMHV.js";
|
|
262
262
|
import "./chunk-PDO5BLNM.js";
|
|
263
263
|
import "./chunk-UIE3R5XU.js";
|
|
@@ -286,7 +286,7 @@ import {
|
|
|
286
286
|
verifyEventTaskCredentialSubject,
|
|
287
287
|
verifyScheduledTaskCredentialSubject,
|
|
288
288
|
verifySlackDirectCredentialSubject
|
|
289
|
-
} from "./chunk-
|
|
289
|
+
} from "./chunk-YHCTPDXS.js";
|
|
290
290
|
import {
|
|
291
291
|
contextProvenance,
|
|
292
292
|
createSlackDestination,
|
|
@@ -299,13 +299,13 @@ import {
|
|
|
299
299
|
requireSlackDestination,
|
|
300
300
|
withConversationEventLock,
|
|
301
301
|
withConversationMutationLock
|
|
302
|
-
} from "./chunk-
|
|
302
|
+
} from "./chunk-LPLVNMVN.js";
|
|
303
303
|
import {
|
|
304
304
|
juniorAgentBindings,
|
|
305
305
|
juniorAgentInvocations,
|
|
306
306
|
juniorConversationEvents,
|
|
307
307
|
juniorConversations
|
|
308
|
-
} from "./chunk-
|
|
308
|
+
} from "./chunk-ZSNABC2E.js";
|
|
309
309
|
import {
|
|
310
310
|
sleep
|
|
311
311
|
} from "./chunk-BVREIWBD.js";
|
|
@@ -313,7 +313,7 @@ import {
|
|
|
313
313
|
acquireActiveLock,
|
|
314
314
|
getStateAdapter,
|
|
315
315
|
withActiveLock
|
|
316
|
-
} from "./chunk-
|
|
316
|
+
} from "./chunk-BXBZDV3C.js";
|
|
317
317
|
import {
|
|
318
318
|
STANDARD_MODEL_PROFILE,
|
|
319
319
|
botConfig,
|
|
@@ -331,16 +331,16 @@ import {
|
|
|
331
331
|
modelIdForProfile,
|
|
332
332
|
setSlackReactionConfig,
|
|
333
333
|
standardModelId
|
|
334
|
-
} from "./chunk-
|
|
334
|
+
} from "./chunk-FX4PX3SA.js";
|
|
335
335
|
import {
|
|
336
336
|
juniorDestinations
|
|
337
337
|
} from "./chunk-VFUK3X5B.js";
|
|
338
|
-
import "./chunk-
|
|
339
|
-
import "./chunk-
|
|
338
|
+
import "./chunk-RBV4JHCP.js";
|
|
339
|
+
import "./chunk-NLTQRYNP.js";
|
|
340
340
|
import {
|
|
341
341
|
pluginCatalogRuntime
|
|
342
|
-
} from "./chunk-
|
|
343
|
-
import "./chunk-
|
|
342
|
+
} from "./chunk-RULIISEI.js";
|
|
343
|
+
import "./chunk-VV2DN24T.js";
|
|
344
344
|
import {
|
|
345
345
|
credentialContextForActor
|
|
346
346
|
} from "./chunk-BDUENQD3.js";
|
|
@@ -372,7 +372,7 @@ import {
|
|
|
372
372
|
withContext,
|
|
373
373
|
withLogContext,
|
|
374
374
|
withSpan
|
|
375
|
-
} from "./chunk-
|
|
375
|
+
} from "./chunk-VHSEMJTS.js";
|
|
376
376
|
import {
|
|
377
377
|
continueTrace
|
|
378
378
|
} from "./chunk-6GWA276C.js";
|
|
@@ -380,10 +380,10 @@ import "./chunk-OOUNJNMR.js";
|
|
|
380
380
|
import "./chunk-H4HBKISO.js";
|
|
381
381
|
import {
|
|
382
382
|
JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE
|
|
383
|
-
} from "./chunk-
|
|
383
|
+
} from "./chunk-26JYGL2L.js";
|
|
384
384
|
import {
|
|
385
385
|
JUNIOR_VERSION
|
|
386
|
-
} from "./chunk-
|
|
386
|
+
} from "./chunk-5GLGQHO3.js";
|
|
387
387
|
import "./chunk-MLKGABMK.js";
|
|
388
388
|
|
|
389
389
|
// src/app.ts
|
|
@@ -9399,6 +9399,8 @@ function dashboardHostRoutePaths(dashboard) {
|
|
|
9399
9399
|
"/api/people/*",
|
|
9400
9400
|
"/api/personal-tokens",
|
|
9401
9401
|
"/api/personal-tokens/*",
|
|
9402
|
+
"/api/workspaces",
|
|
9403
|
+
"/api/workspaces/*",
|
|
9402
9404
|
"/api/config",
|
|
9403
9405
|
"/api/me",
|
|
9404
9406
|
authPath,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pluginCatalogRuntime
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-RULIISEI.js";
|
|
4
|
+
import "./chunk-VV2DN24T.js";
|
|
5
5
|
import "./chunk-BDUENQD3.js";
|
|
6
6
|
import "./chunk-V7YE4WCP.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-VHSEMJTS.js";
|
|
8
8
|
import "./chunk-6GWA276C.js";
|
|
9
9
|
import "./chunk-OOUNJNMR.js";
|
|
10
10
|
import "./chunk-H4HBKISO.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-26JYGL2L.js";
|
|
12
|
+
import "./chunk-5GLGQHO3.js";
|
|
13
13
|
import "./chunk-MLKGABMK.js";
|
|
14
14
|
export {
|
|
15
15
|
pluginCatalogRuntime
|