@sentry/junior 0.115.0 → 0.116.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/dist/{agent-hooks-4EUUXP2F.js → agent-hooks-67NFITDH.js} +9 -9
  2. package/dist/api/conversations/detail.d.ts +18 -0
  3. package/dist/api/conversations/event-page.d.ts +1 -1
  4. package/dist/api/conversations/events.d.ts +1 -1
  5. package/dist/api/people/profile.d.ts +2 -2
  6. package/dist/api/people/shared.d.ts +1 -1
  7. package/dist/api/personal-tokens/create.d.ts +11 -0
  8. package/dist/api/personal-tokens/list.d.ts +12 -0
  9. package/dist/api/personal-tokens/revoke.d.ts +5 -0
  10. package/dist/api/personal-tokens/routes.d.ts +4 -0
  11. package/dist/api/plugins.d.ts +0 -1
  12. package/dist/api/route.d.ts +1 -1
  13. package/dist/api/schema/conversation.d.ts +18 -0
  14. package/dist/api/schema/person.d.ts +3 -3
  15. package/dist/api/schema/personal-token.d.ts +38 -0
  16. package/dist/api/schema.d.ts +2 -0
  17. package/dist/api/schema.js +15 -3
  18. package/dist/api.d.ts +1 -0
  19. package/dist/api.js +179 -39
  20. package/dist/app.js +1035 -853
  21. package/dist/{catalog-runtime-Y32UEQLB.js → catalog-runtime-CWZY6GTH.js} +5 -5
  22. package/dist/chat/agent/request.d.ts +1 -0
  23. package/dist/chat/agent/resume.d.ts +1 -0
  24. package/dist/chat/agent/sandbox.d.ts +1 -0
  25. package/dist/chat/agent/tools.d.ts +1 -0
  26. package/dist/chat/agent-dispatch/context.d.ts +2 -0
  27. package/dist/chat/agent-dispatch/heartbeat.d.ts +11 -5
  28. package/dist/chat/agent-dispatch/signing.d.ts +14 -5
  29. package/dist/chat/agent-dispatch/store.d.ts +36 -15
  30. package/dist/chat/agent-dispatch/types.d.ts +23 -10
  31. package/dist/chat/agent-dispatch/work.d.ts +58 -0
  32. package/dist/chat/app/factory.d.ts +12 -3
  33. package/dist/chat/conversations/history.d.ts +285 -290
  34. package/dist/chat/conversations/projection.d.ts +2 -2
  35. package/dist/chat/mcp/tool-manager.d.ts +2 -1
  36. package/dist/chat/pi/conversation-events.d.ts +6 -2
  37. package/dist/chat/plugins/annotations.d.ts +8 -0
  38. package/dist/chat/plugins/registry.d.ts +0 -3
  39. package/dist/chat/plugins/types.d.ts +0 -2
  40. package/dist/chat/runtime/agent-continue-runner.d.ts +4 -0
  41. package/dist/chat/runtime/reply-executor.d.ts +6 -1
  42. package/dist/chat/runtime/slack-resume.d.ts +5 -1
  43. package/dist/chat/runtime/turn-input.d.ts +3 -0
  44. package/dist/chat/sandbox/sandbox.d.ts +2 -1
  45. package/dist/chat/sandbox/session.d.ts +2 -11
  46. package/dist/chat/sandbox/workspace.d.ts +10 -2
  47. package/dist/chat/services/turn-session-record.d.ts +14 -1
  48. package/dist/chat/slack/dispatch-turn.d.ts +25 -0
  49. package/dist/chat/state/turn-session.d.ts +11 -0
  50. package/dist/chat/tool-support/text-range-result.d.ts +3 -0
  51. package/dist/chat/tool-support/zod-tool.d.ts +1 -0
  52. package/dist/chat/tools/definition.d.ts +3 -10
  53. package/dist/chat/tools/query-conversation-events.d.ts +68 -0
  54. package/dist/chat/tools/sandbox/file-utils.d.ts +8 -1
  55. package/dist/chat/tools/sandbox/find-files.d.ts +2 -1
  56. package/dist/chat/tools/sandbox/grep.d.ts +2 -1
  57. package/dist/{chunk-6FKLPVF3.js → chunk-25GU5B5E.js} +1 -1
  58. package/dist/{chunk-PVZHG2XZ.js → chunk-3H45VOBZ.js} +32 -7
  59. package/dist/{chunk-NVUQSFWX.js → chunk-3JOGUT46.js} +3 -15
  60. package/dist/{chunk-G5SX4UPR.js → chunk-4DD6AOCG.js} +2 -2
  61. package/dist/{chunk-67CVNDJ7.js → chunk-53ZKTQO6.js} +1 -1
  62. package/dist/{chunk-43RYMWJ2.js → chunk-5UNB623T.js} +809 -213
  63. package/dist/{chunk-2QG4MZQ7.js → chunk-6RQ5GCWH.js} +2 -2
  64. package/dist/{chunk-MIAKQNYX.js → chunk-6ZK6FZIV.js} +1 -1
  65. package/dist/{chunk-6V762AB4.js → chunk-BXLS3I4W.js} +1 -1
  66. package/dist/{chunk-CWEZEPD4.js → chunk-CI3VK7X5.js} +68 -2
  67. package/dist/{chunk-EW5MLKT5.js → chunk-JZPQ5K4V.js} +1 -55
  68. package/dist/{chunk-HWCQRGLL.js → chunk-KBNDFU6J.js} +105 -37
  69. package/dist/{chunk-FHC4JUSF.js → chunk-MGH5ADQS.js} +1 -2
  70. package/dist/{chunk-TVE25LPW.js → chunk-N7TMYLF2.js} +1 -1
  71. package/dist/{chunk-CEYOL62C.js → chunk-OF5FODBL.js} +120 -20
  72. package/dist/{chunk-6OPTF4BQ.js → chunk-PE44LDDQ.js} +0 -1
  73. package/dist/{chunk-LYA2AB5G.js → chunk-PGKWXHYJ.js} +8 -52
  74. package/dist/{chunk-SYJT7AKB.js → chunk-PZGPCOSD.js} +1 -1
  75. package/dist/{chunk-JQFJO5WH.js → chunk-RXRQJF7Y.js} +74 -17
  76. package/dist/{chunk-G36V2YGB.js → chunk-TC4ZEM2D.js} +33 -1
  77. package/dist/{chunk-AGLQYELI.js → chunk-UEVLIYK5.js} +170 -170
  78. package/dist/{chunk-YCLO7D7M.js → chunk-VKZ6WVAY.js} +77 -26
  79. package/dist/{chunk-RAVKCKXA.js → chunk-VZCSLYCE.js} +20 -5
  80. package/dist/{chunk-SG5WAA7H.js → chunk-WKU7TY22.js} +0 -3
  81. package/dist/cli/chat.js +23 -23
  82. package/dist/cli/check.js +6 -6
  83. package/dist/cli/plugins.js +13 -13
  84. package/dist/cli/snapshot-warmup.js +8 -8
  85. package/dist/cli/upgrade.js +7 -7
  86. package/dist/db/schema/api-tokens.d.ts +160 -0
  87. package/dist/db/schema/conversation-annotations.d.ts +142 -0
  88. package/dist/db/schema.d.ts +305 -1
  89. package/dist/{db-KBSJHAZU.js → db-57FHVGGQ.js} +6 -6
  90. package/dist/handlers/agent-dispatch.d.ts +7 -3
  91. package/dist/instrumentation.js +2 -2
  92. package/dist/nitro.js +5 -5
  93. package/dist/{oauth-callback-server-EYRMJTCS.js → oauth-callback-server-PAQRPXZX.js} +18 -18
  94. package/dist/personal-tokens/store.d.ts +27 -0
  95. package/dist/{plugins-PZMDS7AT.js → plugins-IUJA4VBU.js} +1 -1
  96. package/dist/reporting-schema.d.ts +0 -2
  97. package/dist/{runner-RQGZ5Z2S.js → runner-4ISZYJEX.js} +12 -12
  98. package/dist/{skills-JJQIE3BT.js → skills-UE2KXQMB.js} +6 -6
  99. package/dist/{validation-MZ47PZP5.js → validation-PO5LHTJT.js} +6 -6
  100. package/dist/version.js +1 -1
  101. package/migrations/0008_sticky_rage.sql +14 -0
  102. package/migrations/0009_slippery_harrier.sql +12 -0
  103. package/migrations/0010_native_conversation_history.sql +142 -0
  104. package/migrations/meta/0008_snapshot.json +1076 -0
  105. package/migrations/meta/0009_snapshot.json +1146 -0
  106. package/migrations/meta/0010_snapshot.json +1190 -0
  107. package/migrations/meta/_journal.json +22 -1
  108. package/package.json +6 -7
  109. package/dist/chat/agent-dispatch/runner.d.ts +0 -13
  110. package/dist/chat/capabilities/catalog.d.ts +0 -16
  111. package/dist/{chunk-KNFROR7R.js → chunk-5I6ORJUY.js} +1 -1
@@ -1,10 +1,314 @@
1
+ import { juniorConversationAnnotations } from "./schema/conversation-annotations";
2
+ import { juniorApiTokens } from "./schema/api-tokens";
1
3
  import { juniorConversationEvents } from "./schema/conversation-events";
2
4
  import { juniorConversations } from "./schema/conversations";
3
5
  import { juniorDestinations } from "./schema/destinations";
4
6
  import { juniorIdentities } from "./schema/identities";
5
7
  import { juniorUsers } from "./schema/users";
6
- export { juniorConversationEvents, juniorConversations, juniorDestinations, juniorIdentities, juniorUsers, };
8
+ export { juniorConversationAnnotations, juniorApiTokens, juniorConversationEvents, juniorConversations, juniorDestinations, juniorIdentities, juniorUsers, };
7
9
  export declare const juniorSqlSchema: {
10
+ juniorConversationAnnotations: import("drizzle-orm/pg-core").PgTableWithColumns<{
11
+ name: "junior_conversation_annotations";
12
+ schema: undefined;
13
+ columns: {
14
+ conversationId: import("drizzle-orm/pg-core").PgColumn<{
15
+ name: "conversation_id";
16
+ tableName: "junior_conversation_annotations";
17
+ dataType: "string";
18
+ columnType: "PgText";
19
+ data: string;
20
+ driverParam: string;
21
+ notNull: true;
22
+ hasDefault: false;
23
+ isPrimaryKey: false;
24
+ isAutoincrement: false;
25
+ hasRuntimeDefault: false;
26
+ enumValues: [string, ...string[]];
27
+ baseColumn: never;
28
+ identity: undefined;
29
+ generated: undefined;
30
+ }, {}, {}>;
31
+ plugin: import("drizzle-orm/pg-core").PgColumn<{
32
+ name: "plugin";
33
+ tableName: "junior_conversation_annotations";
34
+ dataType: "string";
35
+ columnType: "PgText";
36
+ data: string;
37
+ driverParam: string;
38
+ notNull: true;
39
+ hasDefault: false;
40
+ isPrimaryKey: false;
41
+ isAutoincrement: false;
42
+ hasRuntimeDefault: false;
43
+ enumValues: [string, ...string[]];
44
+ baseColumn: never;
45
+ identity: undefined;
46
+ generated: undefined;
47
+ }, {}, {}>;
48
+ kind: import("drizzle-orm/pg-core").PgColumn<{
49
+ name: "kind";
50
+ tableName: "junior_conversation_annotations";
51
+ dataType: "string";
52
+ columnType: "PgText";
53
+ data: string;
54
+ driverParam: string;
55
+ notNull: true;
56
+ hasDefault: false;
57
+ isPrimaryKey: false;
58
+ isAutoincrement: false;
59
+ hasRuntimeDefault: false;
60
+ enumValues: [string, ...string[]];
61
+ baseColumn: never;
62
+ identity: undefined;
63
+ generated: undefined;
64
+ }, {}, {}>;
65
+ key: import("drizzle-orm/pg-core").PgColumn<{
66
+ name: "key";
67
+ tableName: "junior_conversation_annotations";
68
+ dataType: "string";
69
+ columnType: "PgText";
70
+ data: string;
71
+ driverParam: string;
72
+ notNull: true;
73
+ hasDefault: false;
74
+ isPrimaryKey: false;
75
+ isAutoincrement: false;
76
+ hasRuntimeDefault: false;
77
+ enumValues: [string, ...string[]];
78
+ baseColumn: never;
79
+ identity: undefined;
80
+ generated: undefined;
81
+ }, {}, {}>;
82
+ annotation: import("drizzle-orm/pg-core").PgColumn<{
83
+ name: "annotation_json";
84
+ tableName: "junior_conversation_annotations";
85
+ dataType: "json";
86
+ columnType: "PgJsonb";
87
+ data: {
88
+ kind: "resource_link";
89
+ key: string;
90
+ label: string;
91
+ url: string;
92
+ description?: string | undefined;
93
+ status?: "warning" | "open" | "draft" | "closed" | "merged" | undefined;
94
+ };
95
+ driverParam: unknown;
96
+ notNull: true;
97
+ hasDefault: false;
98
+ isPrimaryKey: false;
99
+ isAutoincrement: false;
100
+ hasRuntimeDefault: false;
101
+ enumValues: undefined;
102
+ baseColumn: never;
103
+ identity: undefined;
104
+ generated: undefined;
105
+ }, {}, {
106
+ $type: {
107
+ kind: "resource_link";
108
+ key: string;
109
+ label: string;
110
+ url: string;
111
+ description?: string | undefined;
112
+ status?: "warning" | "open" | "draft" | "closed" | "merged" | undefined;
113
+ };
114
+ }>;
115
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
116
+ name: string;
117
+ tableName: "junior_conversation_annotations";
118
+ dataType: "date";
119
+ columnType: "PgTimestamp";
120
+ data: Date;
121
+ driverParam: string;
122
+ notNull: true;
123
+ hasDefault: false;
124
+ isPrimaryKey: false;
125
+ isAutoincrement: false;
126
+ hasRuntimeDefault: false;
127
+ enumValues: undefined;
128
+ baseColumn: never;
129
+ identity: undefined;
130
+ generated: undefined;
131
+ }, {}, {}>;
132
+ updatedAt: import("drizzle-orm/pg-core").PgColumn<{
133
+ name: string;
134
+ tableName: "junior_conversation_annotations";
135
+ dataType: "date";
136
+ columnType: "PgTimestamp";
137
+ data: Date;
138
+ driverParam: string;
139
+ notNull: true;
140
+ hasDefault: false;
141
+ isPrimaryKey: false;
142
+ isAutoincrement: false;
143
+ hasRuntimeDefault: false;
144
+ enumValues: undefined;
145
+ baseColumn: never;
146
+ identity: undefined;
147
+ generated: undefined;
148
+ }, {}, {}>;
149
+ };
150
+ dialect: "pg";
151
+ }>;
152
+ juniorApiTokens: import("drizzle-orm/pg-core").PgTableWithColumns<{
153
+ name: "junior_api_tokens";
154
+ schema: undefined;
155
+ columns: {
156
+ id: import("drizzle-orm/pg-core").PgColumn<{
157
+ name: "id";
158
+ tableName: "junior_api_tokens";
159
+ dataType: "string";
160
+ columnType: "PgText";
161
+ data: string;
162
+ driverParam: string;
163
+ notNull: true;
164
+ hasDefault: false;
165
+ isPrimaryKey: true;
166
+ isAutoincrement: false;
167
+ hasRuntimeDefault: false;
168
+ enumValues: [string, ...string[]];
169
+ baseColumn: never;
170
+ identity: undefined;
171
+ generated: undefined;
172
+ }, {}, {}>;
173
+ ownerEmailNormalized: import("drizzle-orm/pg-core").PgColumn<{
174
+ name: "owner_email_normalized";
175
+ tableName: "junior_api_tokens";
176
+ dataType: "string";
177
+ columnType: "PgText";
178
+ data: string;
179
+ driverParam: string;
180
+ notNull: true;
181
+ hasDefault: false;
182
+ isPrimaryKey: false;
183
+ isAutoincrement: false;
184
+ hasRuntimeDefault: false;
185
+ enumValues: [string, ...string[]];
186
+ baseColumn: never;
187
+ identity: undefined;
188
+ generated: undefined;
189
+ }, {}, {}>;
190
+ name: import("drizzle-orm/pg-core").PgColumn<{
191
+ name: "name";
192
+ tableName: "junior_api_tokens";
193
+ dataType: "string";
194
+ columnType: "PgText";
195
+ data: string;
196
+ driverParam: string;
197
+ notNull: true;
198
+ hasDefault: false;
199
+ isPrimaryKey: false;
200
+ isAutoincrement: false;
201
+ hasRuntimeDefault: false;
202
+ enumValues: [string, ...string[]];
203
+ baseColumn: never;
204
+ identity: undefined;
205
+ generated: undefined;
206
+ }, {}, {}>;
207
+ tokenHash: import("drizzle-orm/pg-core").PgColumn<{
208
+ name: "token_hash";
209
+ tableName: "junior_api_tokens";
210
+ dataType: "string";
211
+ columnType: "PgText";
212
+ data: string;
213
+ driverParam: string;
214
+ notNull: true;
215
+ hasDefault: false;
216
+ isPrimaryKey: false;
217
+ isAutoincrement: false;
218
+ hasRuntimeDefault: false;
219
+ enumValues: [string, ...string[]];
220
+ baseColumn: never;
221
+ identity: undefined;
222
+ generated: undefined;
223
+ }, {}, {}>;
224
+ tokenSuffix: import("drizzle-orm/pg-core").PgColumn<{
225
+ name: "token_suffix";
226
+ tableName: "junior_api_tokens";
227
+ dataType: "string";
228
+ columnType: "PgText";
229
+ data: string;
230
+ driverParam: string;
231
+ notNull: true;
232
+ hasDefault: false;
233
+ isPrimaryKey: false;
234
+ isAutoincrement: false;
235
+ hasRuntimeDefault: false;
236
+ enumValues: [string, ...string[]];
237
+ baseColumn: never;
238
+ identity: undefined;
239
+ generated: undefined;
240
+ }, {}, {}>;
241
+ createdAt: import("drizzle-orm/pg-core").PgColumn<{
242
+ name: string;
243
+ tableName: "junior_api_tokens";
244
+ dataType: "date";
245
+ columnType: "PgTimestamp";
246
+ data: Date;
247
+ driverParam: string;
248
+ notNull: true;
249
+ hasDefault: false;
250
+ isPrimaryKey: false;
251
+ isAutoincrement: false;
252
+ hasRuntimeDefault: false;
253
+ enumValues: undefined;
254
+ baseColumn: never;
255
+ identity: undefined;
256
+ generated: undefined;
257
+ }, {}, {}>;
258
+ expiresAt: import("drizzle-orm/pg-core").PgColumn<{
259
+ name: string;
260
+ tableName: "junior_api_tokens";
261
+ dataType: "date";
262
+ columnType: "PgTimestamp";
263
+ data: Date;
264
+ driverParam: string;
265
+ notNull: true;
266
+ hasDefault: false;
267
+ isPrimaryKey: false;
268
+ isAutoincrement: false;
269
+ hasRuntimeDefault: false;
270
+ enumValues: undefined;
271
+ baseColumn: never;
272
+ identity: undefined;
273
+ generated: undefined;
274
+ }, {}, {}>;
275
+ lastUsedAt: import("drizzle-orm/pg-core").PgColumn<{
276
+ name: string;
277
+ tableName: "junior_api_tokens";
278
+ dataType: "date";
279
+ columnType: "PgTimestamp";
280
+ data: Date;
281
+ driverParam: string;
282
+ notNull: false;
283
+ hasDefault: false;
284
+ isPrimaryKey: false;
285
+ isAutoincrement: false;
286
+ hasRuntimeDefault: false;
287
+ enumValues: undefined;
288
+ baseColumn: never;
289
+ identity: undefined;
290
+ generated: undefined;
291
+ }, {}, {}>;
292
+ revokedAt: import("drizzle-orm/pg-core").PgColumn<{
293
+ name: string;
294
+ tableName: "junior_api_tokens";
295
+ dataType: "date";
296
+ columnType: "PgTimestamp";
297
+ data: Date;
298
+ driverParam: string;
299
+ notNull: false;
300
+ hasDefault: false;
301
+ isPrimaryKey: false;
302
+ isAutoincrement: false;
303
+ hasRuntimeDefault: false;
304
+ enumValues: undefined;
305
+ baseColumn: never;
306
+ identity: undefined;
307
+ generated: undefined;
308
+ }, {}, {}>;
309
+ };
310
+ dialect: "pg";
311
+ }>;
8
312
  juniorConversationEvents: import("drizzle-orm/pg-core").PgTableWithColumns<{
9
313
  name: "junior_conversation_events";
10
314
  schema: undefined;
@@ -5,17 +5,17 @@ import {
5
5
  getConversationStore,
6
6
  getDb,
7
7
  getSqlExecutor
8
- } from "./chunk-HWCQRGLL.js";
9
- import "./chunk-JQFJO5WH.js";
10
- import "./chunk-SYJT7AKB.js";
8
+ } from "./chunk-KBNDFU6J.js";
9
+ import "./chunk-RXRQJF7Y.js";
10
+ import "./chunk-PZGPCOSD.js";
11
11
  import "./chunk-VFUK3X5B.js";
12
12
  import "./chunk-FXOYURO4.js";
13
- import "./chunk-NVUQSFWX.js";
13
+ import "./chunk-3JOGUT46.js";
14
14
  import "./chunk-OB42YVAE.js";
15
15
  import "./chunk-F3B2YJ76.js";
16
16
  import "./chunk-6GWA276C.js";
17
- import "./chunk-TVE25LPW.js";
18
- import "./chunk-FHC4JUSF.js";
17
+ import "./chunk-N7TMYLF2.js";
18
+ import "./chunk-MGH5ADQS.js";
19
19
  import "./chunk-MLKGABMK.js";
20
20
  export {
21
21
  closeDb,
@@ -1,8 +1,12 @@
1
- import type { AgentRunner } from "@/chat/runtime/agent-runner";
1
+ import type { ConversationWorkQueue } from "@/chat/task-execution/queue";
2
2
  import type { WaitUntilFn } from "@/handlers/types";
3
3
  interface AgentDispatchHandlerOptions {
4
- agentRunner: AgentRunner;
4
+ conversationWorkQueue: ConversationWorkQueue;
5
5
  }
6
- /** Handle the authenticated internal agent-dispatch callback. */
6
+ /**
7
+ * Convert a legacy authenticated dispatch callback into conversation work.
8
+ *
9
+ * TODO(v0.116.0): Remove with the v0.114 callback verification route.
10
+ */
7
11
  export declare function POST(request: Request, waitUntil: WaitUntilFn, options: AgentDispatchHandlerOptions): Promise<Response>;
8
12
  export {};
@@ -16,8 +16,8 @@ import {
16
16
  import {
17
17
  getDeploymentServiceVersion,
18
18
  getDeploymentTelemetryAttributes
19
- } from "./chunk-TVE25LPW.js";
20
- import "./chunk-FHC4JUSF.js";
19
+ } from "./chunk-N7TMYLF2.js";
20
+ import "./chunk-MGH5ADQS.js";
21
21
  import "./chunk-MLKGABMK.js";
22
22
 
23
23
  // src/chat/sentry-payload-filter.ts
package/dist/nitro.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  resolveConversationWorkQueueTopic
3
- } from "./chunk-MIAKQNYX.js";
3
+ } from "./chunk-6ZK6FZIV.js";
4
4
  import {
5
5
  PLUGIN_TASK_QUEUE_TOPIC
6
- } from "./chunk-KNFROR7R.js";
6
+ } from "./chunk-5I6ORJUY.js";
7
7
  import {
8
8
  pluginCatalogConfigFromPluginSet,
9
9
  pluginRuntimeRegistrationsFromPluginSet
10
- } from "./chunk-SG5WAA7H.js";
10
+ } from "./chunk-WKU7TY22.js";
11
11
  import {
12
12
  loadPluginSetFromModule,
13
13
  resolvePluginModule
@@ -25,8 +25,8 @@ import {
25
25
  JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE,
26
26
  JUNIOR_RETENTION_CRON_SCHEDULE,
27
27
  JUNIOR_RETENTION_ROUTE
28
- } from "./chunk-TVE25LPW.js";
29
- import "./chunk-FHC4JUSF.js";
28
+ } from "./chunk-N7TMYLF2.js";
29
+ import "./chunk-MGH5ADQS.js";
30
30
  import "./chunk-MLKGABMK.js";
31
31
 
32
32
  // src/nitro.ts
@@ -2,40 +2,40 @@ import {
2
2
  GET,
3
3
  GET2,
4
4
  syncLocalOAuthCredential
5
- } from "./chunk-YCLO7D7M.js";
5
+ } from "./chunk-VKZ6WVAY.js";
6
6
  import "./chunk-FA6POGLH.js";
7
- import "./chunk-AGLQYELI.js";
7
+ import "./chunk-UEVLIYK5.js";
8
8
  import "./chunk-4CODA7P5.js";
9
- import "./chunk-MIAKQNYX.js";
10
- import "./chunk-KNFROR7R.js";
9
+ import "./chunk-6ZK6FZIV.js";
10
+ import "./chunk-5I6ORJUY.js";
11
11
  import {
12
12
  createUserTokenStore
13
- } from "./chunk-LYA2AB5G.js";
14
- import "./chunk-CEYOL62C.js";
13
+ } from "./chunk-PGKWXHYJ.js";
14
+ import "./chunk-OF5FODBL.js";
15
15
  import "./chunk-MU6HHZEN.js";
16
16
  import "./chunk-PDO5BLNM.js";
17
- import "./chunk-RAVKCKXA.js";
18
- import "./chunk-67CVNDJ7.js";
19
- import "./chunk-CWEZEPD4.js";
20
- import "./chunk-HWCQRGLL.js";
21
- import "./chunk-JQFJO5WH.js";
17
+ import "./chunk-VZCSLYCE.js";
18
+ import "./chunk-53ZKTQO6.js";
19
+ import "./chunk-CI3VK7X5.js";
20
+ import "./chunk-KBNDFU6J.js";
21
+ import "./chunk-RXRQJF7Y.js";
22
22
  import "./chunk-4ZNGQH7C.js";
23
- import "./chunk-SYJT7AKB.js";
23
+ import "./chunk-PZGPCOSD.js";
24
24
  import "./chunk-VFUK3X5B.js";
25
25
  import "./chunk-FXOYURO4.js";
26
- import "./chunk-2QG4MZQ7.js";
27
- import "./chunk-6FKLPVF3.js";
28
- import "./chunk-EW5MLKT5.js";
26
+ import "./chunk-6RQ5GCWH.js";
27
+ import "./chunk-25GU5B5E.js";
28
+ import "./chunk-JZPQ5K4V.js";
29
29
  import "./chunk-W3U3YQYI.js";
30
30
  import "./chunk-HZF5P5UN.js";
31
- import "./chunk-NVUQSFWX.js";
31
+ import "./chunk-3JOGUT46.js";
32
32
  import "./chunk-OB42YVAE.js";
33
33
  import "./chunk-F3B2YJ76.js";
34
34
  import "./chunk-6GWA276C.js";
35
35
  import "./chunk-B3IT5END.js";
36
36
  import "./chunk-3V7OFJZC.js";
37
- import "./chunk-TVE25LPW.js";
38
- import "./chunk-FHC4JUSF.js";
37
+ import "./chunk-N7TMYLF2.js";
38
+ import "./chunk-MGH5ADQS.js";
39
39
  import "./chunk-MLKGABMK.js";
40
40
 
41
41
  // src/chat/local/oauth-callback-server.ts
@@ -0,0 +1,27 @@
1
+ export interface PersonalTokenMetadata {
2
+ id: string;
3
+ name: string;
4
+ tokenSuffix: string;
5
+ createdAt: string;
6
+ expiresAt: string;
7
+ lastUsedAt: string | null;
8
+ }
9
+ export interface CreatedPersonalToken extends PersonalTokenMetadata {
10
+ token: string;
11
+ }
12
+ /** Create a personal token and return its plaintext value exactly once. */
13
+ export declare function createPersonalToken(args: {
14
+ email: string;
15
+ name: string;
16
+ now?: Date;
17
+ }): Promise<CreatedPersonalToken>;
18
+ /** List active personal tokens owned by one verified user. */
19
+ export declare function listPersonalTokens(email: string, now?: Date): Promise<PersonalTokenMetadata[]>;
20
+ /** Revoke a personal token owned by one verified user. */
21
+ export declare function revokePersonalToken(args: {
22
+ email: string;
23
+ id: string;
24
+ now?: Date;
25
+ }): Promise<boolean>;
26
+ /** Resolve an active personal bearer token to its verified owner email. */
27
+ export declare function authenticatePersonalToken(token: string, now?: Date): Promise<string | undefined>;
@@ -4,7 +4,7 @@ import {
4
4
  pluginCatalogConfigFromPluginSet,
5
5
  pluginCliRegistrationsFromPluginSet,
6
6
  pluginRuntimeRegistrationsFromPluginSet
7
- } from "./chunk-SG5WAA7H.js";
7
+ } from "./chunk-WKU7TY22.js";
8
8
  import "./chunk-MLKGABMK.js";
9
9
  export {
10
10
  defineJuniorPlugins,
@@ -5,14 +5,12 @@ export declare const healthReportSchema: z.ZodObject<{
5
5
  timestamp: z.ZodString;
6
6
  }, z.core.$strict>;
7
7
  export declare const pluginSchema: z.ZodObject<{
8
- capabilities: z.ZodArray<z.ZodString>;
9
8
  configKeys: z.ZodArray<z.ZodString>;
10
9
  description: z.ZodString;
11
10
  displayName: z.ZodString;
12
11
  name: z.ZodString;
13
12
  }, z.core.$strict>;
14
13
  export declare const pluginsSchema: z.ZodArray<z.ZodObject<{
15
- capabilities: z.ZodArray<z.ZodString>;
16
14
  configKeys: z.ZodArray<z.ZodString>;
17
15
  description: z.ZodString;
18
16
  displayName: z.ZodString;
@@ -5,8 +5,8 @@ import {
5
5
  finalizeFailedTurnReplyWithEvent,
6
6
  processPluginTask,
7
7
  scheduleSessionCompletedPluginTasks
8
- } from "./chunk-AGLQYELI.js";
9
- import "./chunk-KNFROR7R.js";
8
+ } from "./chunk-UEVLIYK5.js";
9
+ import "./chunk-5I6ORJUY.js";
10
10
  import {
11
11
  authorizationId
12
12
  } from "./chunk-DIB4GX3G.js";
@@ -32,29 +32,29 @@ import {
32
32
  trimTrailingAssistantMessages,
33
33
  updateConversationStats,
34
34
  upsertConversationMessage
35
- } from "./chunk-CEYOL62C.js";
35
+ } from "./chunk-OF5FODBL.js";
36
36
  import "./chunk-MU6HHZEN.js";
37
37
  import "./chunk-PDO5BLNM.js";
38
- import "./chunk-RAVKCKXA.js";
39
- import "./chunk-67CVNDJ7.js";
40
- import "./chunk-CWEZEPD4.js";
38
+ import "./chunk-VZCSLYCE.js";
39
+ import "./chunk-53ZKTQO6.js";
40
+ import "./chunk-CI3VK7X5.js";
41
41
  import {
42
42
  getConversationEventStore
43
- } from "./chunk-HWCQRGLL.js";
44
- import "./chunk-JQFJO5WH.js";
43
+ } from "./chunk-KBNDFU6J.js";
44
+ import "./chunk-RXRQJF7Y.js";
45
45
  import "./chunk-4ZNGQH7C.js";
46
- import "./chunk-SYJT7AKB.js";
46
+ import "./chunk-PZGPCOSD.js";
47
47
  import "./chunk-VFUK3X5B.js";
48
48
  import "./chunk-FXOYURO4.js";
49
49
  import "./chunk-HZF5P5UN.js";
50
50
  import {
51
51
  logException
52
- } from "./chunk-NVUQSFWX.js";
52
+ } from "./chunk-3JOGUT46.js";
53
53
  import "./chunk-OB42YVAE.js";
54
54
  import "./chunk-F3B2YJ76.js";
55
55
  import "./chunk-6GWA276C.js";
56
- import "./chunk-TVE25LPW.js";
57
- import "./chunk-FHC4JUSF.js";
56
+ import "./chunk-N7TMYLF2.js";
57
+ import "./chunk-MGH5ADQS.js";
58
58
  import "./chunk-MLKGABMK.js";
59
59
 
60
60
  // src/chat/local/runner.ts
@@ -6,19 +6,19 @@ import {
6
6
  parseSkillInvocation,
7
7
  resetSkillDiscoveryCache,
8
8
  stripFrontmatter
9
- } from "./chunk-2QG4MZQ7.js";
10
- import "./chunk-6FKLPVF3.js";
11
- import "./chunk-EW5MLKT5.js";
9
+ } from "./chunk-6RQ5GCWH.js";
10
+ import "./chunk-25GU5B5E.js";
11
+ import "./chunk-JZPQ5K4V.js";
12
12
  import "./chunk-W3U3YQYI.js";
13
13
  import "./chunk-HZF5P5UN.js";
14
- import "./chunk-NVUQSFWX.js";
14
+ import "./chunk-3JOGUT46.js";
15
15
  import "./chunk-OB42YVAE.js";
16
16
  import "./chunk-F3B2YJ76.js";
17
17
  import "./chunk-6GWA276C.js";
18
18
  import "./chunk-B3IT5END.js";
19
19
  import "./chunk-3V7OFJZC.js";
20
- import "./chunk-TVE25LPW.js";
21
- import "./chunk-FHC4JUSF.js";
20
+ import "./chunk-N7TMYLF2.js";
21
+ import "./chunk-MGH5ADQS.js";
22
22
  import "./chunk-MLKGABMK.js";
23
23
  export {
24
24
  discoverSkills,
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  validatePluginEgressCredentialHooks,
3
3
  validatePluginRegistrations
4
- } from "./chunk-6V762AB4.js";
5
- import "./chunk-6FKLPVF3.js";
6
- import "./chunk-EW5MLKT5.js";
4
+ } from "./chunk-BXLS3I4W.js";
5
+ import "./chunk-25GU5B5E.js";
6
+ import "./chunk-JZPQ5K4V.js";
7
7
  import "./chunk-W3U3YQYI.js";
8
8
  import "./chunk-HZF5P5UN.js";
9
- import "./chunk-NVUQSFWX.js";
9
+ import "./chunk-3JOGUT46.js";
10
10
  import "./chunk-OB42YVAE.js";
11
11
  import "./chunk-F3B2YJ76.js";
12
12
  import "./chunk-6GWA276C.js";
13
13
  import "./chunk-B3IT5END.js";
14
14
  import "./chunk-3V7OFJZC.js";
15
- import "./chunk-TVE25LPW.js";
16
- import "./chunk-FHC4JUSF.js";
15
+ import "./chunk-N7TMYLF2.js";
16
+ import "./chunk-MGH5ADQS.js";
17
17
  import "./chunk-MLKGABMK.js";
18
18
  export {
19
19
  validatePluginEgressCredentialHooks,
package/dist/version.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  JUNIOR_VERSION
3
- } from "./chunk-FHC4JUSF.js";
3
+ } from "./chunk-MGH5ADQS.js";
4
4
  import "./chunk-MLKGABMK.js";
5
5
  export {
6
6
  JUNIOR_VERSION
@@ -0,0 +1,14 @@
1
+ CREATE TABLE "junior_api_tokens" (
2
+ "id" text PRIMARY KEY NOT NULL,
3
+ "owner_email_normalized" text NOT NULL,
4
+ "name" text NOT NULL,
5
+ "token_hash" text NOT NULL,
6
+ "token_suffix" text NOT NULL,
7
+ "created_at" timestamp with time zone NOT NULL,
8
+ "expires_at" timestamp with time zone NOT NULL,
9
+ "last_used_at" timestamp with time zone,
10
+ "revoked_at" timestamp with time zone
11
+ );
12
+ --> statement-breakpoint
13
+ CREATE UNIQUE INDEX "junior_api_tokens_token_hash_uidx" ON "junior_api_tokens" USING btree ("token_hash");--> statement-breakpoint
14
+ CREATE INDEX "junior_api_tokens_owner_email_idx" ON "junior_api_tokens" USING btree ("owner_email_normalized");
@@ -0,0 +1,12 @@
1
+ CREATE TABLE "junior_conversation_annotations" (
2
+ "conversation_id" text NOT NULL,
3
+ "plugin" text NOT NULL,
4
+ "kind" text NOT NULL,
5
+ "key" text NOT NULL,
6
+ "annotation_json" jsonb NOT NULL,
7
+ "created_at" timestamp with time zone NOT NULL,
8
+ "updated_at" timestamp with time zone NOT NULL,
9
+ CONSTRAINT "junior_conversation_annotations_pk" PRIMARY KEY("conversation_id","plugin","kind","key")
10
+ );
11
+ --> statement-breakpoint
12
+ ALTER TABLE "junior_conversation_annotations" ADD CONSTRAINT "junior_conversation_annotations_conversation_id_fk" FOREIGN KEY ("conversation_id") REFERENCES "public"."junior_conversations"("conversation_id") ON DELETE cascade ON UPDATE no action;