@sentry/junior 0.169.0 → 0.171.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-YGKANST4.js → agent-hooks-UXIRPATC.js} +16 -11
- package/dist/api.js +33 -32
- package/dist/app.js +35 -35
- package/dist/catalog-runtime-PQCGQUXA.js +16 -0
- package/dist/chat/conversations/sql/store.d.ts +7 -0
- package/dist/chat/conversations/store.d.ts +14 -0
- package/dist/chat/sandbox/snapshot/store.d.ts +28 -0
- package/dist/chat/slack/channel.d.ts +0 -13
- package/dist/chat/slack/ids.d.ts +7 -1
- package/dist/chat/slack/tool-support/channel-target.d.ts +6 -5
- package/dist/chat/workspaces/store.d.ts +1 -10
- package/dist/chat/workspaces/types.d.ts +14 -1
- package/dist/{chunk-Q62IHFIH.js → chunk-2AYWP7PZ.js} +6 -270
- package/dist/{chunk-VRMPMOAT.js → chunk-3AX2WCFV.js} +2 -2
- package/dist/{chunk-OU2DMDUI.js → chunk-4TKPTFSO.js} +1 -1
- package/dist/{chunk-MKEHLCSM.js → chunk-5GF7HQOP.js} +70 -11
- package/dist/{chunk-S6JDUILF.js → chunk-5ML752HJ.js} +8 -8
- package/dist/{chunk-2VK3CYSL.js → chunk-5TZ2DKVU.js} +1 -1
- package/dist/{chunk-EEKFF74Y.js → chunk-62WK6FLT.js} +183 -69
- package/dist/{chunk-FSH6HT5C.js → chunk-6RRTVWAD.js} +1 -1
- package/dist/{chunk-7MA4HV4W.js → chunk-6ZWRNC4D.js} +1 -1
- package/dist/{chunk-ELOZI777.js → chunk-AOAOBZJQ.js} +18 -18
- package/dist/{chunk-BDUENQD3.js → chunk-CGA4ERJ5.js} +1 -1
- package/dist/chunk-CVHKLS7B.js +399 -0
- package/dist/{chunk-HWXQZCKV.js → chunk-CWTWZKWH.js} +7 -7
- package/dist/{chunk-23IKSW3E.js → chunk-FI5A2RF6.js} +1 -1
- package/dist/{chunk-FIMO3IDW.js → chunk-HKWEMKK4.js} +32 -4
- package/dist/{chunk-65QX23BY.js → chunk-HWXXFINO.js} +13 -13
- package/dist/{chunk-7RIHHVFN.js → chunk-IZSMYLCS.js} +11 -11
- package/dist/{chunk-URM4KBIU.js → chunk-JNYIJHFF.js} +1 -1
- package/dist/{chunk-JNK444WM.js → chunk-KUYIW4BD.js} +2 -2
- package/dist/{chunk-WYNLAO2K.js → chunk-M5QJJMFK.js} +4 -4
- package/dist/{chunk-V7YE4WCP.js → chunk-M63DETLL.js} +7 -4
- package/dist/{chunk-BOZCSRAR.js → chunk-MFFU45QO.js} +1 -1
- package/dist/{chunk-73XNLM4O.js → chunk-O2SUZKWU.js} +5 -5
- package/dist/{chunk-WF3WTELH.js → chunk-POF7HORW.js} +6 -6
- package/dist/{chunk-5Z7QQYHV.js → chunk-QHBHUCDS.js} +7 -7
- package/dist/{chunk-TMZOUVEP.js → chunk-SIOO3CCL.js} +1 -1
- package/dist/{chunk-MPLBAWGP.js → chunk-UC35XHGT.js} +2 -2
- package/dist/{chunk-VVQYG2GD.js → chunk-UTG3IY2C.js} +63 -100
- package/dist/{chunk-JJUZK6P2.js → chunk-VGWC4KG2.js} +5 -9
- package/dist/{chunk-YTVYU5IF.js → chunk-WCWPRFHZ.js} +1 -1
- package/dist/{chunk-ECBD46QI.js → chunk-WIUGVE66.js} +6 -6
- package/dist/{chunk-EPXPE5Y5.js → chunk-XHBYNJNZ.js} +2 -2
- package/dist/{chunk-ZXCVYSTS.js → chunk-Y5RRKS67.js} +5 -5
- package/dist/{chunk-5OUQCD2J.js → chunk-Y6DW6AVG.js} +1 -1
- package/dist/{chunk-N7V2WPZV.js → chunk-YURMXTZF.js} +1 -1
- package/dist/cli/chat.js +34 -34
- package/dist/cli/check.js +8 -8
- package/dist/cli/plugins.js +15 -15
- package/dist/cli/snapshot-create.js +14 -13
- package/dist/cli/upgrade.js +9 -9
- package/dist/db/schema/snapshots.d.ts +254 -0
- package/dist/db/schema/workspaces.d.ts +0 -68
- package/dist/db/schema.d.ts +251 -69
- package/dist/{db-CA3AJ2BU.js → db-EHCO5WGL.js} +8 -8
- package/dist/instrumentation.js +4 -4
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-JVWWSDT5.js → oauth-callback-server-O7CH6FOJ.js} +25 -25
- package/dist/{runner-CMDQJDCH.js → runner-3D5AGGUD.js} +19 -15
- package/dist/{sandbox-egress-signals-U3ZX7C5W.js → sandbox-egress-signals-DXOOBSBI.js} +3 -3
- package/dist/{skills-GYJ4MBNQ.js → skills-6IW3DDW2.js} +8 -8
- package/dist/spawn-5LKOLABU.js +37 -0
- package/dist/{validation-55EBPZHH.js → validation-RCLP4EU4.js} +8 -8
- package/dist/version.js +1 -1
- package/dist/{work-N7CBTARL.js → work-L54N7O65.js} +21 -21
- package/dist/worker-VJCSXI5L.js +24 -0
- package/migrations/0032_workspace_snapshots_table.sql +69 -0
- package/migrations/meta/0032_snapshot.json +2892 -0
- package/migrations/meta/_journal.json +8 -1
- package/package.json +5 -5
- package/dist/catalog-runtime-BFDMFZV4.js +0 -16
- package/dist/chunk-BVREIWBD.js +0 -131
- package/dist/spawn-KSP4DKK6.js +0 -37
- package/dist/worker-CGMUVQ2Q.js +0 -24
|
@@ -13,19 +13,24 @@ import {
|
|
|
13
13
|
getPlugins,
|
|
14
14
|
setPlugins,
|
|
15
15
|
validatePlugins
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-62WK6FLT.js";
|
|
17
|
+
import "./chunk-HKWEMKK4.js";
|
|
18
|
+
import "./chunk-5GF7HQOP.js";
|
|
19
|
+
import "./chunk-CVHKLS7B.js";
|
|
20
|
+
import "./chunk-YURMXTZF.js";
|
|
21
|
+
import "./chunk-UC35XHGT.js";
|
|
22
22
|
import "./chunk-VFUK3X5B.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-FI5A2RF6.js";
|
|
24
|
+
import "./chunk-SIOO3CCL.js";
|
|
25
|
+
import "./chunk-KUYIW4BD.js";
|
|
26
|
+
import "./chunk-CGA4ERJ5.js";
|
|
27
|
+
import "./chunk-M63DETLL.js";
|
|
28
|
+
import "./chunk-6RRTVWAD.js";
|
|
26
29
|
import "./chunk-6GWA276C.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-OOUNJNMR.js";
|
|
31
|
+
import "./chunk-H4HBKISO.js";
|
|
32
|
+
import "./chunk-WCWPRFHZ.js";
|
|
33
|
+
import "./chunk-Y6DW6AVG.js";
|
|
29
34
|
import "./chunk-MLKGABMK.js";
|
|
30
35
|
export {
|
|
31
36
|
PluginHookDeniedError,
|
package/dist/api.js
CHANGED
|
@@ -59,15 +59,15 @@ import {
|
|
|
59
59
|
revokePersonalToken,
|
|
60
60
|
viewerConversationMembership,
|
|
61
61
|
webActorFromEmail
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-HWXXFINO.js";
|
|
63
63
|
import {
|
|
64
64
|
buildSentryConversationUrl,
|
|
65
65
|
getWebAuthorization
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-MFFU45QO.js";
|
|
67
67
|
import {
|
|
68
68
|
cancelHumanFacingPendingMessages,
|
|
69
69
|
getConversation
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-Y5RRKS67.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-IZSMYLCS.js";
|
|
79
|
+
import "./chunk-O2SUZKWU.js";
|
|
80
80
|
import {
|
|
81
81
|
healthReportSchema,
|
|
82
82
|
pluginOperationalReportFeedSchema,
|
|
@@ -90,7 +90,6 @@ import {
|
|
|
90
90
|
import "./chunk-JAL3CH4G.js";
|
|
91
91
|
import "./chunk-5I6ORJUY.js";
|
|
92
92
|
import {
|
|
93
|
-
SANDBOX_RUNTIME,
|
|
94
93
|
createSchedulerSqlStore,
|
|
95
94
|
deleteEventTask,
|
|
96
95
|
eventTaskBelongsToUser,
|
|
@@ -102,24 +101,23 @@ import {
|
|
|
102
101
|
listPublicScheduledTasksForTeams,
|
|
103
102
|
readLiveAttachment,
|
|
104
103
|
readStats
|
|
105
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-VGWC4KG2.js";
|
|
106
105
|
import {
|
|
107
106
|
parseSlackThreadId
|
|
108
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-XHBYNJNZ.js";
|
|
109
108
|
import {
|
|
110
109
|
agentTurnUsageSchema,
|
|
111
110
|
fallbackShortTitle,
|
|
112
111
|
hasAgentTurnUsage,
|
|
113
112
|
renderJuniorNativeConversationEvent
|
|
114
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-WIUGVE66.js";
|
|
115
114
|
import "./chunk-3Y47VMHV.js";
|
|
116
115
|
import {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
hash
|
|
120
|
-
} from "./chunk-Q62IHFIH.js";
|
|
116
|
+
getCachedSnapshot
|
|
117
|
+
} from "./chunk-2AYWP7PZ.js";
|
|
121
118
|
import "./chunk-PDO5BLNM.js";
|
|
122
119
|
import {
|
|
120
|
+
SANDBOX_RUNTIME,
|
|
123
121
|
WorkspaceValidationError,
|
|
124
122
|
createPluginLogger,
|
|
125
123
|
createWorkspace,
|
|
@@ -137,7 +135,7 @@ import {
|
|
|
137
135
|
updateWorkspace,
|
|
138
136
|
withSlackRetries,
|
|
139
137
|
workspaceRepoCheckoutPath
|
|
140
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-62WK6FLT.js";
|
|
141
139
|
import {
|
|
142
140
|
decodeStoredConversationEvent,
|
|
143
141
|
getConversationStore,
|
|
@@ -145,37 +143,40 @@ import {
|
|
|
145
143
|
getSqlExecutor,
|
|
146
144
|
locationFromRow,
|
|
147
145
|
parseSessionSource
|
|
148
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-HKWEMKK4.js";
|
|
149
147
|
import {
|
|
150
148
|
juniorConversationEvents,
|
|
151
149
|
juniorConversations,
|
|
152
150
|
juniorIdentities,
|
|
153
151
|
juniorUsers
|
|
154
|
-
} from "./chunk-
|
|
155
|
-
import
|
|
156
|
-
|
|
157
|
-
|
|
152
|
+
} from "./chunk-5GF7HQOP.js";
|
|
153
|
+
import {
|
|
154
|
+
create,
|
|
155
|
+
hash
|
|
156
|
+
} from "./chunk-CVHKLS7B.js";
|
|
157
|
+
import "./chunk-YURMXTZF.js";
|
|
158
|
+
import "./chunk-UC35XHGT.js";
|
|
158
159
|
import {
|
|
159
160
|
juniorDestinations
|
|
160
161
|
} from "./chunk-VFUK3X5B.js";
|
|
161
|
-
import "./chunk-
|
|
162
|
-
import "./chunk-
|
|
163
|
-
import "./chunk-
|
|
164
|
-
import "./chunk-
|
|
162
|
+
import "./chunk-FI5A2RF6.js";
|
|
163
|
+
import "./chunk-SIOO3CCL.js";
|
|
164
|
+
import "./chunk-KUYIW4BD.js";
|
|
165
|
+
import "./chunk-CGA4ERJ5.js";
|
|
165
166
|
import {
|
|
166
167
|
parseSlackChannelId,
|
|
167
168
|
parseSlackMessageTs,
|
|
168
169
|
parseSlackTeamId
|
|
169
|
-
} from "./chunk-
|
|
170
|
+
} from "./chunk-M63DETLL.js";
|
|
170
171
|
import {
|
|
171
172
|
logException,
|
|
172
173
|
logWarn
|
|
173
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-6RRTVWAD.js";
|
|
174
175
|
import "./chunk-6GWA276C.js";
|
|
175
176
|
import "./chunk-OOUNJNMR.js";
|
|
176
177
|
import "./chunk-H4HBKISO.js";
|
|
177
|
-
import "./chunk-
|
|
178
|
-
import "./chunk-
|
|
178
|
+
import "./chunk-WCWPRFHZ.js";
|
|
179
|
+
import "./chunk-Y6DW6AVG.js";
|
|
179
180
|
import "./chunk-MLKGABMK.js";
|
|
180
181
|
|
|
181
182
|
// src/api.ts
|
|
@@ -4076,7 +4077,7 @@ async function readPeoplePluginReports(args) {
|
|
|
4076
4077
|
source: "plugins"
|
|
4077
4078
|
});
|
|
4078
4079
|
}
|
|
4079
|
-
const { getPluginProfileReports } = await import("./agent-hooks-
|
|
4080
|
+
const { getPluginProfileReports } = await import("./agent-hooks-UXIRPATC.js");
|
|
4080
4081
|
return pluginOperationalReportFeedSchema.parse({
|
|
4081
4082
|
generatedAt: new Date(nowMs).toISOString(),
|
|
4082
4083
|
reports: await getPluginProfileReports({
|
|
@@ -4795,7 +4796,7 @@ function readDescriptionText(home) {
|
|
|
4795
4796
|
}
|
|
4796
4797
|
}
|
|
4797
4798
|
async function readSkillReports() {
|
|
4798
|
-
const { discoverSkills } = await import("./skills-
|
|
4799
|
+
const { discoverSkills } = await import("./skills-6IW3DDW2.js");
|
|
4799
4800
|
const skills = await discoverSkills();
|
|
4800
4801
|
return skillReportsSchema.parse(
|
|
4801
4802
|
skills.map((skill) => ({
|
|
@@ -4805,7 +4806,7 @@ async function readSkillReports() {
|
|
|
4805
4806
|
);
|
|
4806
4807
|
}
|
|
4807
4808
|
async function readPlugins() {
|
|
4808
|
-
const { pluginCatalogRuntime } = await import("./catalog-runtime-
|
|
4809
|
+
const { pluginCatalogRuntime } = await import("./catalog-runtime-PQCGQUXA.js");
|
|
4809
4810
|
return pluginsSchema.parse(
|
|
4810
4811
|
pluginCatalogRuntime.getProviders().map((plugin) => ({
|
|
4811
4812
|
configKeys: plugin.manifest.configKeys ?? [],
|
|
@@ -4818,7 +4819,7 @@ async function readPlugins() {
|
|
|
4818
4819
|
async function readRuntimeInfoReport() {
|
|
4819
4820
|
const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
|
|
4820
4821
|
import("./discovery-GUFTFBTL.js"),
|
|
4821
|
-
import("./catalog-runtime-
|
|
4822
|
+
import("./catalog-runtime-PQCGQUXA.js"),
|
|
4822
4823
|
readPlugins(),
|
|
4823
4824
|
readSkillReports()
|
|
4824
4825
|
]);
|
|
@@ -4834,7 +4835,7 @@ async function readRuntimeInfoReport() {
|
|
|
4834
4835
|
}
|
|
4835
4836
|
async function readPluginOperationalReportFeed() {
|
|
4836
4837
|
const nowMs = Date.now();
|
|
4837
|
-
const { getPluginOperationalReports } = await import("./agent-hooks-
|
|
4838
|
+
const { getPluginOperationalReports } = await import("./agent-hooks-UXIRPATC.js");
|
|
4838
4839
|
return pluginOperationalReportFeedSchema.parse({
|
|
4839
4840
|
source: "plugins",
|
|
4840
4841
|
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-M5QJJMFK.js";
|
|
4
4
|
import {
|
|
5
5
|
bindSpawnAgent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5TZ2DKVU.js";
|
|
7
7
|
import {
|
|
8
8
|
createAgentInvocationWorker,
|
|
9
9
|
enqueueAgentInvocation,
|
|
10
10
|
listPendingAgentInvocationMailboxAppends,
|
|
11
11
|
routeAgentInvocationWork
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-POF7HORW.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-AOAOBZJQ.js";
|
|
40
40
|
import "./chunk-FA6POGLH.js";
|
|
41
41
|
import {
|
|
42
42
|
getTurnRequestDeadline,
|
|
43
43
|
runWithTurnRequestDeadline
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-4TKPTFSO.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-HWXXFINO.js";
|
|
62
|
+
import "./chunk-MFFU45QO.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-Y5RRKS67.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-IZSMYLCS.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-O2SUZKWU.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-JNYIJHFF.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-UTG3IY2C.js";
|
|
169
169
|
import {
|
|
170
170
|
AuthorizationFlowDisabledError,
|
|
171
171
|
PluginCredentialFailureError
|
|
172
|
-
} from "./chunk-
|
|
172
|
+
} from "./chunk-QHBHUCDS.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-5ML752HJ.js";
|
|
181
181
|
import {
|
|
182
182
|
RetryableDeliveryError
|
|
183
183
|
} from "./chunk-RF6J3DIO.js";
|
|
@@ -185,8 +185,8 @@ import {
|
|
|
185
185
|
formatProviderLabel,
|
|
186
186
|
postSlackMessage,
|
|
187
187
|
startOAuthFlow
|
|
188
|
-
} from "./chunk-
|
|
189
|
-
import "./chunk-
|
|
188
|
+
} from "./chunk-CWTWZKWH.js";
|
|
189
|
+
import "./chunk-6ZWRNC4D.js";
|
|
190
190
|
import {
|
|
191
191
|
getExperimentalFeatures,
|
|
192
192
|
isExperimentalFeatureEnabled,
|
|
@@ -199,10 +199,10 @@ import {
|
|
|
199
199
|
logScheduledTaskRunSkipped,
|
|
200
200
|
requestAttachmentDeletion,
|
|
201
201
|
scheduledTaskRunAttributes
|
|
202
|
-
} from "./chunk-
|
|
202
|
+
} from "./chunk-VGWC4KG2.js";
|
|
203
203
|
import {
|
|
204
204
|
parseSlackThreadId
|
|
205
|
-
} from "./chunk-
|
|
205
|
+
} from "./chunk-XHBYNJNZ.js";
|
|
206
206
|
import {
|
|
207
207
|
ConversationTurnBoundaryError,
|
|
208
208
|
CooperativeTurnYieldError,
|
|
@@ -254,12 +254,12 @@ import {
|
|
|
254
254
|
trimTrailingAssistantMessages,
|
|
255
255
|
turnHasReply,
|
|
256
256
|
upsertConversationMessage
|
|
257
|
-
} from "./chunk-
|
|
257
|
+
} from "./chunk-WIUGVE66.js";
|
|
258
258
|
import "./chunk-3Y47VMHV.js";
|
|
259
259
|
import {
|
|
260
260
|
getSandboxResourceConfig,
|
|
261
261
|
setSandboxResourceConfig
|
|
262
|
-
} from "./chunk-
|
|
262
|
+
} from "./chunk-2AYWP7PZ.js";
|
|
263
263
|
import "./chunk-PDO5BLNM.js";
|
|
264
264
|
import "./chunk-UIE3R5XU.js";
|
|
265
265
|
import {
|
|
@@ -287,7 +287,7 @@ import {
|
|
|
287
287
|
verifyEventTaskCredentialSubject,
|
|
288
288
|
verifyScheduledTaskCredentialSubject,
|
|
289
289
|
verifySlackDirectCredentialSubject
|
|
290
|
-
} from "./chunk-
|
|
290
|
+
} from "./chunk-62WK6FLT.js";
|
|
291
291
|
import {
|
|
292
292
|
contextProvenance,
|
|
293
293
|
createSlackDestination,
|
|
@@ -300,21 +300,21 @@ import {
|
|
|
300
300
|
requireSlackDestination,
|
|
301
301
|
withConversationEventLock,
|
|
302
302
|
withConversationMutationLock
|
|
303
|
-
} from "./chunk-
|
|
303
|
+
} from "./chunk-HKWEMKK4.js";
|
|
304
304
|
import {
|
|
305
305
|
juniorAgentBindings,
|
|
306
306
|
juniorAgentInvocations,
|
|
307
307
|
juniorConversationEvents,
|
|
308
308
|
juniorConversations
|
|
309
|
-
} from "./chunk-
|
|
309
|
+
} from "./chunk-5GF7HQOP.js";
|
|
310
310
|
import {
|
|
311
311
|
sleep
|
|
312
|
-
} from "./chunk-
|
|
312
|
+
} from "./chunk-CVHKLS7B.js";
|
|
313
313
|
import {
|
|
314
314
|
acquireActiveLock,
|
|
315
315
|
getStateAdapter,
|
|
316
316
|
withActiveLock
|
|
317
|
-
} from "./chunk-
|
|
317
|
+
} from "./chunk-YURMXTZF.js";
|
|
318
318
|
import {
|
|
319
319
|
STANDARD_MODEL_PROFILE,
|
|
320
320
|
botConfig,
|
|
@@ -332,19 +332,19 @@ import {
|
|
|
332
332
|
modelIdForProfile,
|
|
333
333
|
setSlackReactionConfig,
|
|
334
334
|
standardModelId
|
|
335
|
-
} from "./chunk-
|
|
335
|
+
} from "./chunk-UC35XHGT.js";
|
|
336
336
|
import {
|
|
337
337
|
juniorDestinations
|
|
338
338
|
} from "./chunk-VFUK3X5B.js";
|
|
339
|
-
import "./chunk-
|
|
340
|
-
import "./chunk-
|
|
339
|
+
import "./chunk-FI5A2RF6.js";
|
|
340
|
+
import "./chunk-3AX2WCFV.js";
|
|
341
341
|
import {
|
|
342
342
|
pluginCatalogRuntime
|
|
343
|
-
} from "./chunk-
|
|
344
|
-
import "./chunk-
|
|
343
|
+
} from "./chunk-SIOO3CCL.js";
|
|
344
|
+
import "./chunk-KUYIW4BD.js";
|
|
345
345
|
import {
|
|
346
346
|
credentialContextForActor
|
|
347
|
-
} from "./chunk-
|
|
347
|
+
} from "./chunk-CGA4ERJ5.js";
|
|
348
348
|
import {
|
|
349
349
|
createActor,
|
|
350
350
|
createSlackActor,
|
|
@@ -353,7 +353,7 @@ import {
|
|
|
353
353
|
parseActorUserId,
|
|
354
354
|
parseSlackChannelId,
|
|
355
355
|
parseSlackMessageTs
|
|
356
|
-
} from "./chunk-
|
|
356
|
+
} from "./chunk-M63DETLL.js";
|
|
357
357
|
import {
|
|
358
358
|
buildTurnFailureResponse,
|
|
359
359
|
createChatSdkLogger,
|
|
@@ -373,7 +373,7 @@ import {
|
|
|
373
373
|
withContext,
|
|
374
374
|
withLogContext,
|
|
375
375
|
withSpan
|
|
376
|
-
} from "./chunk-
|
|
376
|
+
} from "./chunk-6RRTVWAD.js";
|
|
377
377
|
import {
|
|
378
378
|
continueTrace
|
|
379
379
|
} from "./chunk-6GWA276C.js";
|
|
@@ -381,10 +381,10 @@ import "./chunk-OOUNJNMR.js";
|
|
|
381
381
|
import "./chunk-H4HBKISO.js";
|
|
382
382
|
import {
|
|
383
383
|
JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE
|
|
384
|
-
} from "./chunk-
|
|
384
|
+
} from "./chunk-WCWPRFHZ.js";
|
|
385
385
|
import {
|
|
386
386
|
JUNIOR_VERSION
|
|
387
|
-
} from "./chunk-
|
|
387
|
+
} from "./chunk-Y6DW6AVG.js";
|
|
388
388
|
import "./chunk-MLKGABMK.js";
|
|
389
389
|
|
|
390
390
|
// src/app.ts
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
pluginCatalogRuntime
|
|
3
|
+
} from "./chunk-SIOO3CCL.js";
|
|
4
|
+
import "./chunk-KUYIW4BD.js";
|
|
5
|
+
import "./chunk-CGA4ERJ5.js";
|
|
6
|
+
import "./chunk-M63DETLL.js";
|
|
7
|
+
import "./chunk-6RRTVWAD.js";
|
|
8
|
+
import "./chunk-6GWA276C.js";
|
|
9
|
+
import "./chunk-OOUNJNMR.js";
|
|
10
|
+
import "./chunk-H4HBKISO.js";
|
|
11
|
+
import "./chunk-WCWPRFHZ.js";
|
|
12
|
+
import "./chunk-Y6DW6AVG.js";
|
|
13
|
+
import "./chunk-MLKGABMK.js";
|
|
14
|
+
export {
|
|
15
|
+
pluginCatalogRuntime
|
|
16
|
+
};
|
|
@@ -59,6 +59,13 @@ export declare class SqlStore implements ConversationStore {
|
|
|
59
59
|
providerDestinationId: string;
|
|
60
60
|
providerTenantId?: string;
|
|
61
61
|
}): Promise<ConversationPrivacy | undefined>;
|
|
62
|
+
findSlackDestinationByName(args: {
|
|
63
|
+
channelName: string;
|
|
64
|
+
teamId: string;
|
|
65
|
+
}): Promise<{
|
|
66
|
+
channelId: string;
|
|
67
|
+
channelName?: string;
|
|
68
|
+
} | undefined>;
|
|
62
69
|
/** Serialize all durable mutations for one conversation inside a SQL transaction. */
|
|
63
70
|
private withConversationMutation;
|
|
64
71
|
private readConversationRow;
|
|
@@ -85,6 +85,20 @@ export interface ConversationStore {
|
|
|
85
85
|
providerDestinationId: string;
|
|
86
86
|
providerTenantId?: string;
|
|
87
87
|
}): Promise<ConversationPrivacy | undefined>;
|
|
88
|
+
/**
|
|
89
|
+
* Resolve one Slack channel id from a known destination display name.
|
|
90
|
+
*
|
|
91
|
+
* Matches only destinations Junior already stored for this workspace. Exact
|
|
92
|
+
* name match after stripping a leading `#`. Returns undefined when missing
|
|
93
|
+
* or ambiguous. Does not scan Slack.
|
|
94
|
+
*/
|
|
95
|
+
findSlackDestinationByName(args: {
|
|
96
|
+
channelName: string;
|
|
97
|
+
teamId: string;
|
|
98
|
+
}): Promise<{
|
|
99
|
+
channelId: string;
|
|
100
|
+
channelName?: string;
|
|
101
|
+
} | undefined>;
|
|
88
102
|
recordActivity(args: {
|
|
89
103
|
activityAtMs?: number;
|
|
90
104
|
channelName?: string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { JuniorDatabase } from "@/db/db";
|
|
2
|
+
import type { WorkspaceSnapshot, WorkspaceSnapshotBuild } from "@/chat/workspaces/types";
|
|
3
|
+
/** Current ready artifact and build state for one Workspace profile. */
|
|
4
|
+
export interface WorkspaceSnapshots {
|
|
5
|
+
ready: WorkspaceSnapshot | null;
|
|
6
|
+
build: WorkspaceSnapshotBuild | null;
|
|
7
|
+
}
|
|
8
|
+
/** Load bounded ready and build views for one Workspace profile hash. */
|
|
9
|
+
export declare function loadSnapshotsForProfile(db: JuniorDatabase, workspaceId: string, profileHash: string): Promise<WorkspaceSnapshots>;
|
|
10
|
+
/** Drop in-flight or failed rows when a recipe changes. Keep ready rows. */
|
|
11
|
+
export declare function clearNonReadySnapshots(db: JuniorDatabase, workspaceId: string): Promise<string[]>;
|
|
12
|
+
/** Drop one ready row whose provider snapshot no longer exists. */
|
|
13
|
+
export declare function invalidateMissingReadySnapshot(params: {
|
|
14
|
+
workspaceId: string;
|
|
15
|
+
profileHash: string;
|
|
16
|
+
snapshotId: string;
|
|
17
|
+
}): Promise<void>;
|
|
18
|
+
/** Record the full Sandbox snapshot after a successful Workspace prepare. */
|
|
19
|
+
export declare function setWorkspaceSnapshot(workspaceId: string, snapshot: WorkspaceSnapshot): Promise<void>;
|
|
20
|
+
/** Record a Workspace snapshot build that can continue across execution slices. */
|
|
21
|
+
export declare function setWorkspaceSnapshotBuild(workspaceId: string, build: WorkspaceSnapshotBuild): Promise<void>;
|
|
22
|
+
/** Persist Workspace snapshot facts when resolve returns a concrete entry. */
|
|
23
|
+
export declare function recordResolvedWorkspaceSnapshot(workspaceId: string, snapshot: {
|
|
24
|
+
snapshotId?: string;
|
|
25
|
+
profileHash?: string;
|
|
26
|
+
createdAtMs?: number;
|
|
27
|
+
buildDurationMs?: number;
|
|
28
|
+
}): Promise<void>;
|
|
@@ -63,16 +63,3 @@ export interface SlackConversationInfo {
|
|
|
63
63
|
export declare function getConversationInfo(channelId: SlackChannelId): Promise<SlackConversationInfo>;
|
|
64
64
|
/** Join a public channel so the bot can read history and threads there. */
|
|
65
65
|
export declare function joinPublicChannel(channelId: SlackChannelId): Promise<void>;
|
|
66
|
-
export interface SlackPublicChannelSummary {
|
|
67
|
-
id: SlackChannelId;
|
|
68
|
-
name?: string;
|
|
69
|
-
isMember?: boolean;
|
|
70
|
-
isArchived?: boolean;
|
|
71
|
-
}
|
|
72
|
-
/** List public channels the bot can see for name resolution. */
|
|
73
|
-
export declare function listPublicChannels(input?: {
|
|
74
|
-
limit?: number;
|
|
75
|
-
maxPages?: number;
|
|
76
|
-
}): Promise<SlackPublicChannelSummary[]>;
|
|
77
|
-
/** Resolve a public channel name (with or without leading #) to a channel id. */
|
|
78
|
-
export declare function resolvePublicChannelByName(channelName: string): Promise<SlackPublicChannelSummary | undefined>;
|
package/dist/chat/slack/ids.d.ts
CHANGED
|
@@ -7,7 +7,13 @@ export type SlackTeamId = z.output<typeof slackTeamIdSchema>;
|
|
|
7
7
|
export type SlackUserId = z.output<typeof slackUserIdSchema>;
|
|
8
8
|
/** Parse an exact Slack channel/conversation ID from untrusted input. */
|
|
9
9
|
export declare function parseSlackChannelId(value: unknown): SlackChannelId | undefined;
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Parse a channel id from common tool/model reference forms.
|
|
12
|
+
*
|
|
13
|
+
* Accepts exact ids (`C123`), Slack mentions (`<#C123>` / `<#C123|name>`),
|
|
14
|
+
* and Junior slack references (`slack:C123`, `slack:C123:ts`). Plain channel
|
|
15
|
+
* names are not ids and are rejected here.
|
|
16
|
+
*/
|
|
11
17
|
export declare function parseSlackChannelReferenceId(value: unknown): SlackChannelId | undefined;
|
|
12
18
|
/** Parse a Slack workspace/team ID from untrusted metadata. */
|
|
13
19
|
export declare function parseSlackTeamId(value: unknown): SlackTeamId | undefined;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { type SlackChannelId } from "@/chat/slack/ids";
|
|
1
|
+
import { type SlackChannelId, type SlackTeamId } from "@/chat/slack/ids";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
export interface ResolvedSlackChannelTarget {
|
|
4
4
|
channelId: SlackChannelId;
|
|
5
5
|
channelName?: string;
|
|
6
|
-
resolvedFromName: boolean;
|
|
7
6
|
}
|
|
8
|
-
/** Model-facing Slack channel
|
|
7
|
+
/** Model-facing Slack channel id or known channel name parameter. */
|
|
9
8
|
export declare const slackChannelRefParam: z.ZodString;
|
|
10
9
|
/**
|
|
11
10
|
* Resolve a channel reference from a tool param value.
|
|
12
11
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* Prefer id-bearing forms. Plain names may match one known destination already
|
|
13
|
+
* stored for this workspace. Do not scan Slack's public channel list.
|
|
15
14
|
*/
|
|
16
15
|
export declare function resolveSlackChannelRef(input: {
|
|
17
16
|
field: string;
|
|
18
17
|
value: string;
|
|
18
|
+
teamId: SlackTeamId;
|
|
19
19
|
}): Promise<ResolvedSlackChannelTarget>;
|
|
20
20
|
/**
|
|
21
21
|
* Resolve an optional channel reference, falling back to the active channel.
|
|
@@ -24,4 +24,5 @@ export declare function resolveOptionalSlackChannelRef(input: {
|
|
|
24
24
|
field?: string;
|
|
25
25
|
value?: string;
|
|
26
26
|
defaultChannelId?: SlackChannelId;
|
|
27
|
+
teamId: SlackTeamId;
|
|
27
28
|
}): Promise<ResolvedSlackChannelTarget>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { JuniorDatabase } from "@/db/db";
|
|
2
|
-
import type { Workspace
|
|
2
|
+
import type { Workspace } from "./types";
|
|
3
3
|
import { WorkspaceValidationError } from "./validation";
|
|
4
4
|
/** List Workspace recipes by stable name. */
|
|
5
5
|
export declare function listWorkspaces(db: JuniorDatabase): Promise<Workspace[]>;
|
|
@@ -32,13 +32,4 @@ export declare function updateWorkspace(id: string, input: {
|
|
|
32
32
|
}): Promise<Workspace | undefined>;
|
|
33
33
|
/** Delete one install-wide Workspace recipe. */
|
|
34
34
|
export declare function deleteWorkspace(id: string): Promise<boolean>;
|
|
35
|
-
/** Record the current Sandbox snapshot after a successful Workspace prepare. */
|
|
36
|
-
export declare function setWorkspaceSnapshot(workspaceId: string, snapshot: WorkspaceSnapshot): Promise<void>;
|
|
37
|
-
/** Persist dashboard snapshot facts when resolve returned a concrete entry. */
|
|
38
|
-
export declare function recordResolvedWorkspaceSnapshot(workspaceId: string, snapshot: {
|
|
39
|
-
snapshotId?: string;
|
|
40
|
-
profileHash?: string;
|
|
41
|
-
createdAtMs?: number;
|
|
42
|
-
buildDurationMs?: number;
|
|
43
|
-
}): Promise<void>;
|
|
44
35
|
export { WorkspaceValidationError };
|
|
@@ -3,13 +3,26 @@ export interface WorkspaceRepo {
|
|
|
3
3
|
provider: string;
|
|
4
4
|
repo: string;
|
|
5
5
|
}
|
|
6
|
-
/**
|
|
6
|
+
/** Ready Sandbox snapshot artifact owned by one Workspace recipe. */
|
|
7
7
|
export interface WorkspaceSnapshot {
|
|
8
8
|
id: string;
|
|
9
9
|
generatedAt: Date;
|
|
10
10
|
buildDurationMs: number;
|
|
11
11
|
profileHash: string;
|
|
12
12
|
}
|
|
13
|
+
export type WorkspaceSnapshotBuildStatus = "building" | "failed";
|
|
14
|
+
export type WorkspaceSnapshotStatus = WorkspaceSnapshotBuildStatus | "ready";
|
|
15
|
+
export type WorkspaceSnapshotBuildPhase = "created" | "dependencies_installed" | "repositories_prepared";
|
|
16
|
+
/** Current snapshot build for one Workspace recipe. */
|
|
17
|
+
export interface WorkspaceSnapshotBuild {
|
|
18
|
+
status: WorkspaceSnapshotBuildStatus;
|
|
19
|
+
phase: WorkspaceSnapshotBuildPhase;
|
|
20
|
+
profileHash: string;
|
|
21
|
+
startedAt: Date;
|
|
22
|
+
sandboxName: string | null;
|
|
23
|
+
commandId: string | null;
|
|
24
|
+
error: string | null;
|
|
25
|
+
}
|
|
13
26
|
/** Named recipe used to prepare reusable sandbox contents. */
|
|
14
27
|
export interface Workspace {
|
|
15
28
|
id: string;
|