@sentry/junior 0.291.0 → 0.293.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/{adapter-zphAlWE2.js → adapter-CMJfmHso.js} +1 -1
- package/dist/{admin-B3WR7Y6e.js → admin-uuecrKuD.js} +2 -2
- package/dist/{agent-runner-ke-hOiuv.js → agent-runner-DHq1pjUg.js} +283 -155
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +3 -3
- package/dist/api.d.ts +1 -1
- package/dist/api.js +43 -38
- package/dist/{app-C47PT68y.d.ts → app-fWzCHFIb.d.ts} +2 -2
- package/dist/app.d.ts +1 -1
- package/dist/app.js +422 -394
- package/dist/{assistant-reply-BV8SZaVd.js → assistant-reply-CIApSfor.js} +1 -1
- package/dist/{automation-CrsYnvdV.js → automation-BE3z19VN.js} +71 -22
- package/dist/{background-compaction-queue-QDH_JS3D.js → background-compaction-queue-D7ncdEa6.js} +4 -4
- package/dist/{briefs-Bdv9BG5J.js → briefs-NpgMEFh1.js} +2 -2
- package/dist/{catalog-runtime-yGnL9ywD.js → catalog-runtime-DwbTyNRD.js} +1 -1
- package/dist/cli/chat.js +15 -15
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +3 -3
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +4 -3
- package/dist/{config-UsaBOQgC.js → config-B4b-NXH5.js} +2 -2
- package/dist/{connections-CePSRCoR.js → connections-Dz_AQg5p.js} +6 -6
- package/dist/{conversation-pending-messages-Cd7ShwBs.js → conversation-pending-messages-1Kad1Mif.js} +4 -1
- package/dist/{conversation-privacy-B3wmawmz.js → conversation-privacy-DRsSgLGO.js} +1 -1
- package/dist/{credential-sync-LNRLXZCn.js → credential-sync-ClCnnGVj.js} +13 -13
- package/dist/{db-7glZCI18.d.ts → db-BbpttyKH.d.ts} +1 -1
- package/dist/{db-c__lw9GH.js → db-CoA7_Xqu.js} +3 -3
- package/dist/{executor-N8-D5Gvv.js → executor-SWyHhit0.js} +51 -15
- package/dist/instrumentation.js +2 -2
- package/dist/{logging-DbXHuhac.js → logging-BN5drSEZ.js} +1 -1
- package/dist/{message-D1MEh8iR.js → message-D4qjpW1C.js} +9 -9
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-DUtqhYwP.js → oauth-callback-server-Xi-mTLOV.js} +2 -2
- package/dist/{projection-D7XadqRY.js → projection-DXl4ftyL.js} +140 -50
- package/dist/{prompt-CzEV4BF4.js → prompt-Dmx6IfWZ.js} +3 -3
- package/dist/{registry-CTtGtXZP.js → registry-DosVt9f9.js} +1 -1
- package/dist/{resolve-nUuQ8yyH.js → resolve-BDjWJC9s.js} +3 -3
- package/dist/{result-Cr9tUdfS.js → result-CaAFpf4B.js} +8 -8
- package/dist/{runner-D7NMbBim.js → runner-h96Mkss6.js} +7 -7
- package/dist/{sandbox-egress-signals-BJAyfzOD.js → sandbox-egress-signals-rK91BW7i.js} +1 -1
- package/dist/{schema-CC2RxDAV.d.ts → schema-CHsBmXIj.d.ts} +246 -45
- package/dist/{schema-CVV5r-qP.js → schema-C_v8wb80.js} +2 -2
- package/dist/{service-account-_ml5D4Tk.js → service-account-BpGpScaT.js} +3 -3
- package/dist/{service-account-CP1oBWTc.js → service-account-WUMVuqVL.js} +3 -3
- package/dist/{session-stop-BbsyIbK2.js → session-stop-xYK15HUu.js} +20 -41
- package/dist/{skills-CayJ8-Bj.js → skills-DHApyCjj.js} +10 -9
- package/dist/{spawn-CktAopv_.js → spawn-BQQrwGNe.js} +5 -5
- package/dist/{stop-BUzUJuN_.js → stop-CBeD6_Gs.js} +34 -28
- package/dist/{store-lotbeXq3.js → store-xtibD98L.js} +3 -3
- package/dist/{task-runner-BinM1l5g.js → task-runner-BYPN4BEO.js} +65 -90
- package/dist/{turn-failure-response-DH5nE6HJ.js → turn-failure-response-jNVl00MD.js} +7 -7
- package/dist/{validation-I0CqX5NC.js → validation-DGeB_moV.js} +1 -1
- package/dist/{version-C3sVz3bv.js → version-C6nqU3Qc.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-so1MPU10.js → viewer-9KLQibjn.js} +3 -3
- package/dist/{warmup-BH9HRBCI.js → warmup-7S6z068f.js} +56 -24
- package/dist/{work-Cw6Fzvfz.js → work-xwX6unUE.js} +11 -11
- package/dist/{worker-qEykG39-.js → worker-CiCCfwd4.js} +6 -6
- package/migrations/0095_web_linked_slack_identity_repair.sql +252 -0
- package/migrations/0096_automation_task_kind.sql +75 -0
- package/migrations/meta/0095_snapshot.json +4452 -0
- package/migrations/meta/0096_snapshot.json +4490 -0
- package/migrations/meta/_journal.json +14 -0
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { hn as normalizeToolNameFromResult, mn as isToolResultMessage, pn as isToolResultError, rn as extractAssistantText } from "./projection-DXl4ftyL.js";
|
|
2
2
|
import * as z from "zod";
|
|
3
3
|
// src/chat/no-reply.ts
|
|
4
4
|
/** No-reply result of a Turn. */
|
|
@@ -2,6 +2,48 @@ import { c as resolveLocalScheduleAtMs, i as getFirstRunAtMs, o as getZonedDateT
|
|
|
2
2
|
import { i as actorIdentitySchema } from "./conversation-CtjR1Zcx.js";
|
|
3
3
|
import * as z from "zod";
|
|
4
4
|
import { actorUserIdSchema, destinationVisibilitySchema, eventMatchFieldsSchema, eventMatchSchema, eventReachSchema, eventTypeSchema, pluginEventTypeSchema, slackDestinationSchema, taskOutcomeSchema } from "@sentry/junior-plugin-api";
|
|
5
|
+
// src/chat/automations/task.ts
|
|
6
|
+
/**
|
|
7
|
+
* The work of an Automation run. An Automation runs either a written
|
|
8
|
+
* instruction or a skill. A skill can have context: what the Automation
|
|
9
|
+
* needs beyond the skill.
|
|
10
|
+
*/
|
|
11
|
+
/** A skill name, in the form that skill frontmatter allows. */
|
|
12
|
+
const automationSkillNameSchema = z.string().max(64).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/, "Use a skill name, such as tpm.");
|
|
13
|
+
/** Text of an instruction or a context, trimmed and not empty. */
|
|
14
|
+
const automationTaskTextSchema = z.string().trim().min(1, "Write at least one word.").max(4e3);
|
|
15
|
+
/** Validate the stored task of either Automation kind. */
|
|
16
|
+
const automationTaskSchema = z.discriminatedUnion("kind", [z.object({
|
|
17
|
+
kind: z.literal("instruction"),
|
|
18
|
+
instruction: automationTaskTextSchema
|
|
19
|
+
}).strict(), z.object({
|
|
20
|
+
kind: z.literal("skill"),
|
|
21
|
+
skill: automationSkillNameSchema,
|
|
22
|
+
/** Absent when the skill needs nothing more. */
|
|
23
|
+
context: automationTaskTextSchema.optional()
|
|
24
|
+
}).strict()]);
|
|
25
|
+
/** Return the written text of a task: its instruction or its context. */
|
|
26
|
+
function automationTaskText(task) {
|
|
27
|
+
return task.kind === "instruction" ? task.instruction : task.context;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Describe the work in one plain text for title fallback, title generation,
|
|
31
|
+
* and cards, so a skill-mode Automation shows its skill. Do not store it.
|
|
32
|
+
*/
|
|
33
|
+
function automationTaskDescription(task) {
|
|
34
|
+
if (task.kind === "instruction") return task.instruction;
|
|
35
|
+
return task.context ? `Run the ${task.skill} skill. ${task.context}` : `Run the ${task.skill} skill.`;
|
|
36
|
+
}
|
|
37
|
+
/** Return the `instruction` and `skill` columns of a task. One is null. */
|
|
38
|
+
function automationTaskColumns(task) {
|
|
39
|
+
return task.kind === "instruction" ? {
|
|
40
|
+
instruction: task.instruction,
|
|
41
|
+
skill: null
|
|
42
|
+
} : {
|
|
43
|
+
instruction: null,
|
|
44
|
+
skill: task.skill
|
|
45
|
+
};
|
|
46
|
+
}
|
|
5
47
|
// src/chat/scheduled-automations/schedule-intent.ts
|
|
6
48
|
/**
|
|
7
49
|
* Owns model-facing schedule intent and materializes it against the trusted
|
|
@@ -317,7 +359,7 @@ const scheduledAutomationSchema = z.object({
|
|
|
317
359
|
statusReason: z.string().optional(),
|
|
318
360
|
/** Explicit visible effects after successful work. An empty list is silent. */
|
|
319
361
|
outcomes: z.array(scheduledAutomationOutcomeSchema).max(5),
|
|
320
|
-
task:
|
|
362
|
+
task: automationTaskSchema,
|
|
321
363
|
/** SQL-backed short display title generated from the task instruction. */
|
|
322
364
|
title: z.string().optional(),
|
|
323
365
|
updatedAtMs: z.number()
|
|
@@ -378,7 +420,7 @@ const eventAutomationSchema = z.object({
|
|
|
378
420
|
destinationVisibility: destinationVisibilitySchema,
|
|
379
421
|
/** Explicit visible effects after successful work. An empty list is silent. */
|
|
380
422
|
outcomes: z.array(eventAutomationOutcomeSchema).max(5),
|
|
381
|
-
task:
|
|
423
|
+
task: automationTaskSchema,
|
|
382
424
|
trigger: eventAutomationTriggerSchema
|
|
383
425
|
}).strict();
|
|
384
426
|
// src/chat/task-outcomes-schema.ts
|
|
@@ -390,16 +432,18 @@ const taskOutcomeInputSchema = z.object({
|
|
|
390
432
|
}).strict();
|
|
391
433
|
// src/chat/automations/edit-schema.ts
|
|
392
434
|
const automationTitleSchema = z.string().trim().min(1).max(60);
|
|
393
|
-
const automationInstructionSchema = z.string().trim().min(1).max(4e3);
|
|
394
435
|
/**
|
|
395
436
|
* Instruction input for agent tools. The run does not see the request, so the
|
|
396
437
|
* instruction names exact targets. It calls the creator "the Automation
|
|
397
438
|
* creator". It names every other person with their mention.
|
|
398
439
|
*/
|
|
399
|
-
const automationInstructionToolSchema =
|
|
440
|
+
const automationInstructionToolSchema = automationTaskTextSchema.describe("Work to perform when the Automation runs. The run does not see this conversation, so words like \"this channel\" or \"here\" will mean nothing then. Write the exact target instead, such as a channel mention or a link. Call the person who created the Automation \"the Automation creator\", not \"me\"; each run knows who that is. Name every other person with their Slack mention, such as <@U123>, including a requester who did not create the Automation. Preserve the user's scope, targets, and constraints. Do not add permissions or side effects the user did not request.");
|
|
441
|
+
/** Context input for agent tools. It follows the same rules as an instruction. */
|
|
442
|
+
const automationContextToolSchema = automationTaskTextSchema.describe("What a skill run needs beyond the skill, such as a repo, a threshold, or who to tag. Follow the same rules as an instruction: write exact targets, call the creator \"the Automation creator\", and name other people with their Slack mention.");
|
|
400
443
|
const automationEditFieldsSchema = z.object({
|
|
401
444
|
title: automationTitleSchema.optional(),
|
|
402
|
-
|
|
445
|
+
/** Replaces the whole task, so a mode switch drops the other mode's text. */
|
|
446
|
+
task: automationTaskSchema.optional(),
|
|
403
447
|
credentialMode: z.enum(["system", "creator"]).optional(),
|
|
404
448
|
outcomes: z.array(z.union([taskOutcomeInputSchema, taskOutcomeSchema])).max(5).optional()
|
|
405
449
|
});
|
|
@@ -438,8 +482,8 @@ const automationSummaryBaseSchema = z.object({
|
|
|
438
482
|
createdByEmail: z.string().trim().email().optional(),
|
|
439
483
|
destination: automationDestinationSchema,
|
|
440
484
|
id: z.string().min(1),
|
|
441
|
-
|
|
442
|
-
/** People mentioned in the
|
|
485
|
+
task: automationTaskSchema,
|
|
486
|
+
/** People mentioned in the task text, resolved at read time. */
|
|
443
487
|
mentions: z.array(actorIdentitySchema).optional(),
|
|
444
488
|
lastConversationId: z.string().min(1).optional(),
|
|
445
489
|
lastRunAt: z.string().datetime().optional(),
|
|
@@ -449,10 +493,22 @@ const automationSummaryBaseSchema = z.object({
|
|
|
449
493
|
"failed"
|
|
450
494
|
]).optional(),
|
|
451
495
|
ownedByViewer: z.boolean(),
|
|
496
|
+
/** Newest terminal runs, oldest first, so the list can show recent health. */
|
|
497
|
+
recentRuns: z.array(z.object({
|
|
498
|
+
durationMs: z.number().finite().nonnegative().optional(),
|
|
499
|
+
executedAt: z.string().datetime(),
|
|
500
|
+
status: z.enum([
|
|
501
|
+
"blocked",
|
|
502
|
+
"completed",
|
|
503
|
+
"failed"
|
|
504
|
+
])
|
|
505
|
+
}).strict()).max(20),
|
|
452
506
|
runs: automationRunWindowsSchema,
|
|
453
507
|
outcomes: z.array(taskOutcomeSchema).max(5),
|
|
454
|
-
/** Short display title; falls back from
|
|
508
|
+
/** Short display title; falls back from the task when unset. */
|
|
455
509
|
title: z.string().min(1),
|
|
510
|
+
/** Linked Conversation cost of every run, since the Automation was created. */
|
|
511
|
+
totalCostUsd: z.number().finite().nonnegative(),
|
|
456
512
|
totalRuns: z.number().int().nonnegative()
|
|
457
513
|
});
|
|
458
514
|
const scheduledAutomationSummarySchema = automationSummaryBaseSchema.extend({
|
|
@@ -490,14 +546,6 @@ const eventAutomationSummarySchema = automationSummaryBaseSchema.extend({
|
|
|
490
546
|
const automationSummarySchema = z.discriminatedUnion("kind", [scheduledAutomationSummarySchema, eventAutomationSummarySchema]);
|
|
491
547
|
/** UTC day (`YYYY-MM-DD`) or hour (`YYYY-MM-DDTHH`) execution bucket key. */
|
|
492
548
|
const automationMetricBucketSchema = z.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/);
|
|
493
|
-
/** One UTC day/hour of completed automation executions stacked by automation type. */
|
|
494
|
-
const automationExecutionDaySchema = z.object({
|
|
495
|
-
/** Linked conversation spend for executions in this bucket. */
|
|
496
|
-
costUsd: z.number().finite().nonnegative(),
|
|
497
|
-
date: automationMetricBucketSchema,
|
|
498
|
-
event: z.number().int().nonnegative(),
|
|
499
|
-
scheduled: z.number().int().nonnegative()
|
|
500
|
-
}).strict();
|
|
501
549
|
const automationListQuerySchema = z.object({
|
|
502
550
|
q: z.string().trim().max(200).optional(),
|
|
503
551
|
scope: z.enum([
|
|
@@ -521,6 +569,8 @@ const automationListQuerySchema = z.object({
|
|
|
521
569
|
]).default("all"),
|
|
522
570
|
creator: z.string().max(300).optional(),
|
|
523
571
|
destination: z.string().max(300).optional(),
|
|
572
|
+
/** Only Automations that run this skill. */
|
|
573
|
+
skill: automationSkillNameSchema.optional(),
|
|
524
574
|
sort: z.enum([
|
|
525
575
|
"newest",
|
|
526
576
|
"oldest",
|
|
@@ -534,9 +584,6 @@ const automationFilterOptionSchema = z.object({
|
|
|
534
584
|
label: z.string()
|
|
535
585
|
}).strict();
|
|
536
586
|
const automationListSchema = z.object({
|
|
537
|
-
executionDays: z.array(automationExecutionDaySchema),
|
|
538
|
-
executionHours: z.array(automationExecutionDaySchema).optional(),
|
|
539
|
-
executionSixHours: z.array(automationExecutionDaySchema).optional(),
|
|
540
587
|
automations: z.array(automationSummarySchema),
|
|
541
588
|
total: z.number().int().nonnegative(),
|
|
542
589
|
page: z.number().int().positive(),
|
|
@@ -582,6 +629,8 @@ const automationExecutionSchema = z.object({
|
|
|
582
629
|
const automationExecutionStatusDaySchema = z.object({
|
|
583
630
|
blocked: z.number().int().nonnegative(),
|
|
584
631
|
completed: z.number().int().nonnegative(),
|
|
632
|
+
/** Linked Conversation cost of the runs in this bucket. */
|
|
633
|
+
costUsd: z.number().finite().nonnegative(),
|
|
585
634
|
date: automationMetricBucketSchema,
|
|
586
635
|
failed: z.number().int().nonnegative()
|
|
587
636
|
}).strict();
|
|
@@ -604,7 +653,7 @@ const automationRunListSchema = z.object({
|
|
|
604
653
|
}).strict();
|
|
605
654
|
const automationDefinitionFields = {
|
|
606
655
|
title: z.string().nullable(),
|
|
607
|
-
|
|
656
|
+
task: automationTaskSchema
|
|
608
657
|
};
|
|
609
658
|
const automationVersionFields = {
|
|
610
659
|
version: z.number().int().positive(),
|
|
@@ -663,7 +712,7 @@ const automationEditBaseSchema = scheduledAutomationSchema.pick({
|
|
|
663
712
|
id: z.string().min(1),
|
|
664
713
|
revision: automationRevisionSchema,
|
|
665
714
|
title: z.string().nullable(),
|
|
666
|
-
|
|
715
|
+
task: automationTaskSchema,
|
|
667
716
|
credentialMode: z.enum(["system", "creator"]),
|
|
668
717
|
outcomes: z.array(taskOutcomeSchema).max(5),
|
|
669
718
|
/** Creator-only rules apply when false. */
|
|
@@ -720,4 +769,4 @@ const automationEventCatalogSchema = z.array(z.object({
|
|
|
720
769
|
}).strict());
|
|
721
770
|
const automationScheduleIntentSchema = scheduleIntentSchema;
|
|
722
771
|
const automationSchedulePreviewSchema = scheduledAutomationSchema.pick({ schedule: true }).extend({ nextRunAtMs: z.number() }).strict();
|
|
723
|
-
export {
|
|
772
|
+
export { eventAutomationTriggerSchema as A, automationTaskColumns as B, eventAutomationSummarySchema as C, automationTitleSchema as D, automationInstructionToolSchema as E, compileScheduleIntent as F, automationTaskSchema as H, scheduleIntentFromTool as I, toolScheduleIntentSchema as L, scheduledAutomationSchema as M, scheduledRunSchema as N, taskOutcomeInputSchema as O, ScheduleIntentError as P, weekdaySchema as R, automationVersionSchema as S, automationContextToolSchema as T, automationTaskText as U, automationTaskDescription as V, automationSummarySchema as _, automationExecutionSchema as a, automationVersionListSchema as b, automationLifecycleSchema as c, automationParamsSchema as d, automationRunListSchema as f, automationSchedulePreviewSchema as g, automationScheduleIntentSchema as h, automationExecutionListSchema as i, SCHEDULED_AUTOMATION_SYSTEM_ACTOR as j, eventAutomationSchema as k, automationListQuerySchema as l, automationRunWindowsSchema as m, automationEditSchema as n, automationExecutionStatusDaySchema as o, automationRunSchema as p, automationEventCatalogSchema as r, automationExecutionStatusSchema as s, automationEditErrorSchema as t, automationListSchema as u, automationUpdateSchema as v, scheduledAutomationSummarySchema as w, automationVersionParamsSchema as x, automationVersionActivateSchema as y, automationSkillNameSchema as z };
|
package/dist/{background-compaction-queue-QDH_JS3D.js → background-compaction-queue-D7ncdEa6.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as getChatConfig } from "./config-
|
|
2
|
-
import { E as withSpan, h as logWarn, m as logInfo, p as logException } from "./logging-
|
|
1
|
+
import { i as getChatConfig } from "./config-B4b-NXH5.js";
|
|
2
|
+
import { E as withSpan, h as logWarn, m as logInfo, p as logException } from "./logging-BN5drSEZ.js";
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
4
|
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|
|
5
5
|
import * as z from "zod";
|
|
@@ -371,7 +371,7 @@ function cacheWarmupCallback() {
|
|
|
371
371
|
maxDeliveries: 1,
|
|
372
372
|
onRejected: logCacheWarmupRejected,
|
|
373
373
|
run: async (message) => {
|
|
374
|
-
const { runCacheWarmup } = await import("./warmup-
|
|
374
|
+
const { runCacheWarmup } = await import("./warmup-7S6z068f.js").then((n) => n.o);
|
|
375
375
|
await runCacheWarmup(message);
|
|
376
376
|
},
|
|
377
377
|
skip: () => !getChatConfig().cacheWarmingEnabled,
|
|
@@ -560,7 +560,7 @@ function pluginTaskCallback() {
|
|
|
560
560
|
maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
|
|
561
561
|
onRejected: logPluginTaskQueueMessageRejected,
|
|
562
562
|
run: async (message) => {
|
|
563
|
-
const { processPluginTask } = await import("./task-runner-
|
|
563
|
+
const { processPluginTask } = await import("./task-runner-BYPN4BEO.js").then((n) => n.r);
|
|
564
564
|
await processPluginTask(message);
|
|
565
565
|
},
|
|
566
566
|
topic: PLUGIN_TASK_QUEUE_TOPIC,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as completeObject, n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-
|
|
1
|
+
import { l as completeObject, n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-Dmx6IfWZ.js";
|
|
2
2
|
import { G as briefCodeChangeSchema, J as briefResourceLabel, X as parseBriefInput, d as conversationEventPageSchema, l as conversationDetailReportSchema } from "./conversation-CtjR1Zcx.js";
|
|
3
3
|
import { CLI_USAGE } from "./cli/run.js";
|
|
4
4
|
import path from "node:path";
|
|
@@ -262,7 +262,7 @@ async function parseRunOptions(argv) {
|
|
|
262
262
|
* token.
|
|
263
263
|
*/
|
|
264
264
|
async function configuredBriefModelId() {
|
|
265
|
-
const { botConfig } = await import("./config-
|
|
265
|
+
const { botConfig } = await import("./config-B4b-NXH5.js").then((n) => n.r);
|
|
266
266
|
return botConfig.fastModelId;
|
|
267
267
|
}
|
|
268
268
|
function apiUrl(baseUrl, pathname) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { t as createPluginCatalogRuntime } from "./registry-
|
|
2
|
+
import { t as createPluginCatalogRuntime } from "./registry-DosVt9f9.js";
|
|
3
3
|
// src/chat/plugins/catalog-runtime.ts
|
|
4
4
|
var catalog_runtime_exports = /* @__PURE__ */ __exportAll({ pluginCatalogRuntime: () => pluginCatalogRuntime });
|
|
5
5
|
const pluginCatalogRuntime = createPluginCatalogRuntime();
|
package/dist/cli/chat.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-
|
|
1
|
+
import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-DHq1pjUg.js";
|
|
2
2
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -99,10 +99,10 @@ async function loadLocalPluginSet() {
|
|
|
99
99
|
async function configureLocalChatPlugins(pluginSet) {
|
|
100
100
|
const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
|
|
101
101
|
import("../plugins-HYh_JOdw.js").then((n) => n.o),
|
|
102
|
-
import("../projection-
|
|
103
|
-
import("../catalog-runtime-
|
|
104
|
-
import("../validation-
|
|
105
|
-
import("../db-
|
|
102
|
+
import("../projection-DXl4ftyL.js").then((n) => n.Fn),
|
|
103
|
+
import("../catalog-runtime-DwbTyNRD.js").then((n) => n.t),
|
|
104
|
+
import("../validation-DGeB_moV.js").then((n) => n.r),
|
|
105
|
+
import("../db-CoA7_Xqu.js").then((n) => n.n)
|
|
106
106
|
]);
|
|
107
107
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
108
108
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -152,18 +152,18 @@ function localDevServerUrl() {
|
|
|
152
152
|
async function prepareLocalChatRun(io, pluginSet) {
|
|
153
153
|
defaultStateAdapterForLocalChat();
|
|
154
154
|
await configureLocalChatPlugins(pluginSet);
|
|
155
|
-
const { setBriefsConfig } = await import("../projection-
|
|
155
|
+
const { setBriefsConfig } = await import("../projection-DXl4ftyL.js").then((n) => n.Jn);
|
|
156
156
|
setBriefsConfig({ enabled: true });
|
|
157
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
158
|
-
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-
|
|
157
|
+
const { runLocalAgentTurn } = await import("../runner-h96Mkss6.js");
|
|
158
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-Xi-mTLOV.js");
|
|
159
159
|
const { createLocalOAuthState } = await import("../oauth-relay-D6xxVywK.js").then((n) => n.t);
|
|
160
|
-
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-
|
|
161
|
-
const { bindSpawnAgent } = await import("../spawn-
|
|
162
|
-
const { bindMessageAgent } = await import("../message-
|
|
163
|
-
const { createChildConversationWorker } = await import("../result-
|
|
164
|
-
const { skipInputAfterConversationStop } = await import("../session-stop-
|
|
160
|
+
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-rK91BW7i.js");
|
|
161
|
+
const { bindSpawnAgent } = await import("../spawn-BQQrwGNe.js").then((n) => n.n);
|
|
162
|
+
const { bindMessageAgent } = await import("../message-D4qjpW1C.js").then((n) => n.n);
|
|
163
|
+
const { createChildConversationWorker } = await import("../result-CaAFpf4B.js").then((n) => n.i);
|
|
164
|
+
const { skipInputAfterConversationStop } = await import("../session-stop-xYK15HUu.js").then((n) => n.a);
|
|
165
165
|
const { createLocalConversationWork } = await import("../conversation-work-BaT_T6EB.js");
|
|
166
|
-
const { processConversationWork } = await import("../worker-
|
|
166
|
+
const { processConversationWork } = await import("../worker-CiCCfwd4.js").then((n) => n.n);
|
|
167
167
|
let agentRunner;
|
|
168
168
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
169
169
|
if (!agentRunner) throw new Error("Local agent runner is not ready");
|
|
@@ -177,7 +177,7 @@ async function prepareLocalChatRun(io, pluginSet) {
|
|
|
177
177
|
});
|
|
178
178
|
});
|
|
179
179
|
agentRunner = createAgentRunner(executeAgentRun, {
|
|
180
|
-
bindMessageAgent: (request) =>
|
|
180
|
+
bindMessageAgent: (request, agents) => agents === "children_and_parent" ? void 0 : bindMessageAgent(request, { queue: localConversationWork.queue }),
|
|
181
181
|
bindSpawnAgent: (request) => bindSpawnAgent(request, { queue: localConversationWork.queue })
|
|
182
182
|
});
|
|
183
183
|
const oauthCallback = await startLocalOAuthCallbackServer();
|
package/dist/cli/check.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { N as JUNIOR_HEARTBEAT_ROUTE, R as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, j as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-
|
|
2
|
-
import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-
|
|
3
|
-
import { i as parseSkillFile } from "../skills-
|
|
1
|
+
import { N as JUNIOR_HEARTBEAT_ROUTE, R as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, j as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-BN5drSEZ.js";
|
|
2
|
+
import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-DosVt9f9.js";
|
|
3
|
+
import { i as parseSkillFile } from "../skills-DHApyCjj.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import fs from "node:fs/promises";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
package/dist/cli/main.js
CHANGED
|
@@ -45,13 +45,13 @@ async function runChat(argv, pluginSet) {
|
|
|
45
45
|
return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
|
|
46
46
|
}
|
|
47
47
|
async function runAdmin(argv) {
|
|
48
|
-
return await (await import("../admin-
|
|
48
|
+
return await (await import("../admin-uuecrKuD.js")).runAdmin(argv);
|
|
49
49
|
}
|
|
50
50
|
async function runServiceAccount(argv) {
|
|
51
|
-
return await (await import("../service-account-
|
|
51
|
+
return await (await import("../service-account-WUMVuqVL.js")).runServiceAccount(argv);
|
|
52
52
|
}
|
|
53
53
|
async function runBriefs(argv) {
|
|
54
|
-
return await (await import("../briefs-
|
|
54
|
+
return await (await import("../briefs-NpgMEFh1.js")).runBriefs(argv);
|
|
55
55
|
}
|
|
56
56
|
function topLevelCommand(argv) {
|
|
57
57
|
return (argv[0] === "--" ? argv.slice(1) : argv)[0];
|
package/dist/cli/plugins.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as getDb } from "../db-
|
|
3
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
4
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-
|
|
1
|
+
import { Gn as setPlugins, Kn as validatePlugins, eo as createPluginLogger } from "../projection-DXl4ftyL.js";
|
|
2
|
+
import { o as getDb } from "../db-CoA7_Xqu.js";
|
|
3
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-DwbTyNRD.js";
|
|
4
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-DGeB_moV.js";
|
|
5
5
|
import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-HYh_JOdw.js";
|
|
6
6
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
7
7
|
import { stderr, stdout } from "node:process";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
3
|
-
import { t as disconnectStateAdapter } from "../adapter-
|
|
4
|
-
import { n as resolve } from "../resolve-
|
|
1
|
+
import { Fa as SANDBOX_RUNTIME, ki as create } from "../projection-DXl4ftyL.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-DwbTyNRD.js";
|
|
3
|
+
import { t as disconnectStateAdapter } from "../adapter-CMJfmHso.js";
|
|
4
|
+
import { n as resolve } from "../resolve-BDjWJC9s.js";
|
|
5
5
|
// src/cli/snapshot-create.ts
|
|
6
6
|
const DEFAULT_TIMEOUT_MS = 6e5;
|
|
7
7
|
function progressMessage(phase) {
|
package/dist/cli/upgrade.d.ts
CHANGED
package/dist/cli/upgrade.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as getChatConfig } from "../config-
|
|
2
|
-
import { t as createJuniorSqlExecutor } from "../executor-
|
|
3
|
-
import { t as createPluginCatalogRuntime } from "../registry-
|
|
1
|
+
import { i as getChatConfig } from "../config-B4b-NXH5.js";
|
|
2
|
+
import { t as createJuniorSqlExecutor } from "../executor-SWyHhit0.js";
|
|
3
|
+
import { t as createPluginCatalogRuntime } from "../registry-DosVt9f9.js";
|
|
4
4
|
import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-HYh_JOdw.js";
|
|
5
5
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
6
6
|
import { basename, dirname, join, resolve } from "node:path";
|
|
@@ -381,6 +381,7 @@ async function runUpgrade(io = DEFAULT_IO, options = {}) {
|
|
|
381
381
|
const sqlExecutor = createJuniorSqlExecutor({
|
|
382
382
|
connectionString: readMigrationDatabaseUrl(sql.databaseUrl),
|
|
383
383
|
driver: sql.driver,
|
|
384
|
+
onInfo: (message) => io.info(` ${message}`),
|
|
384
385
|
statementTimeoutMs: false
|
|
385
386
|
});
|
|
386
387
|
try {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { E as withSpan, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, p as logException, v as serializeGenAiAttribute } from "./logging-
|
|
3
|
-
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-
|
|
2
|
+
import { E as withSpan, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, p as logException, v as serializeGenAiAttribute } from "./logging-BN5drSEZ.js";
|
|
3
|
+
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-DRsSgLGO.js";
|
|
4
4
|
import { AwsClient } from "aws4fetch";
|
|
5
5
|
import { del, get, put } from "@vercel/blob";
|
|
6
6
|
import { calculateCost, completeSimple, getEnvApiKey, getModels, registerApiProvider } from "@earendil-works/pi-ai/compat";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import { A as deleteProviderIdentityForUser, k as deleteProviderIdentityForSlackUser, s as getSqlExecutor } from "./db-
|
|
4
|
-
import { u as hasRequiredOAuthScope } from "./registry-
|
|
5
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
6
|
-
import { c as deleteMcpServerSessionId, l as deleteMcpStoredOAuthCredentials, s as deleteMcpAuthSessionsForUserProvider } from "./agent-runner-
|
|
1
|
+
import { Bi as startOAuthFlow } from "./projection-DXl4ftyL.js";
|
|
2
|
+
import { n as botConfig } from "./config-B4b-NXH5.js";
|
|
3
|
+
import { A as deleteProviderIdentityForUser, k as deleteProviderIdentityForSlackUser, s as getSqlExecutor } from "./db-CoA7_Xqu.js";
|
|
4
|
+
import { u as hasRequiredOAuthScope } from "./registry-DosVt9f9.js";
|
|
5
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-DwbTyNRD.js";
|
|
6
|
+
import { c as deleteMcpServerSessionId, l as deleteMcpStoredOAuthCredentials, s as deleteMcpAuthSessionsForUserProvider } from "./agent-runner-DHq1pjUg.js";
|
|
7
7
|
import { randomBytes } from "node:crypto";
|
|
8
8
|
// src/handlers/oauth-html.ts
|
|
9
9
|
/** Build pre-escaped callback HTML with the shared response security policy. */
|
package/dist/{conversation-pending-messages-Cd7ShwBs.js → conversation-pending-messages-1Kad1Mif.js}
RENAMED
|
@@ -15,7 +15,10 @@ const pluginSchema = z.object({
|
|
|
15
15
|
const pluginsSchema = z.array(pluginSchema);
|
|
16
16
|
const skillReportSchema = z.object({
|
|
17
17
|
name: z.string(),
|
|
18
|
-
|
|
18
|
+
description: z.string(),
|
|
19
|
+
pluginProvider: z.string().optional(),
|
|
20
|
+
/** The skill runs only when invoked by name, such as from an Automation. */
|
|
21
|
+
disableModelInvocation: z.boolean().optional()
|
|
19
22
|
}).strict();
|
|
20
23
|
const skillReportsSchema = z.array(skillReportSchema);
|
|
21
24
|
const pluginPackageContentItemReportSchema = z.object({
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { L as escapeXml, a as getRuntimeMetadata, n as botConfig } from "./config-
|
|
3
|
-
import { U as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-
|
|
1
|
+
import { $i as postSlackMessage, An as createUserTokenStore, Li as formatProviderLabel, Pn as resolvePluginOAuthAccount, Ri as parseOAuthStatePayload, Z as getConversationPendingAuth, d as recordAuthorizationCompleted, ot as getTurnRecord, u as recordAuthenticationLinked, ua as getSlackClient, zi as resolveBaseUrl } from "./projection-DXl4ftyL.js";
|
|
2
|
+
import { L as escapeXml, a as getRuntimeMetadata, n as botConfig } from "./config-B4b-NXH5.js";
|
|
3
|
+
import { U as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-BN5drSEZ.js";
|
|
4
4
|
import { p as parseSlackUserId } from "./actor-6jsm_v96.js";
|
|
5
|
-
import { D as resolveActorIdentityId, F as upsertLinkedIdentity, j as findUserByVerifiedEmails, s as getSqlExecutor } from "./db-
|
|
5
|
+
import { D as resolveActorIdentityId, F as upsertLinkedIdentity, j as findUserByVerifiedEmails, s as getSqlExecutor } from "./db-CoA7_Xqu.js";
|
|
6
6
|
import { i as homeDir } from "./package-discovery-DJhGdS4c.js";
|
|
7
|
-
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-
|
|
8
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
9
|
-
import { t as discoverSkills } from "./skills-
|
|
10
|
-
import { It as wakeAuthorizedTurn, Lt as wakePausedTurn, Yt as deleteWebAuthorization, a as finalizeMcpAuthorization, d as getMcpStoredOAuthCredentials, f as putMcpStoredOAuthCredentials, o as deleteMcpAuthSession, u as getMcpAuthSession, y as lookupSlackUserProfile } from "./agent-runner-
|
|
7
|
+
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-DosVt9f9.js";
|
|
8
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-DwbTyNRD.js";
|
|
9
|
+
import { t as discoverSkills } from "./skills-DHApyCjj.js";
|
|
10
|
+
import { It as wakeAuthorizedTurn, Lt as wakePausedTurn, Yt as deleteWebAuthorization, a as finalizeMcpAuthorization, d as getMcpStoredOAuthCredentials, f as putMcpStoredOAuthCredentials, o as deleteMcpAuthSession, u as getMcpAuthSession, y as lookupSlackUserProfile } from "./agent-runner-DHq1pjUg.js";
|
|
11
11
|
import { r as acquireActiveLock } from "./locks-D-0h111u.js";
|
|
12
|
-
import { o as readIdentityById } from "./viewer-
|
|
13
|
-
import { r as getStateAdapter } from "./adapter-
|
|
14
|
-
import {
|
|
15
|
-
import { _ as getMcpProviderErrorAttributes } from "./service-account-
|
|
16
|
-
import { i as readConnectedOAuthTokens, s as htmlCallbackResponse } from "./connections-
|
|
12
|
+
import { o as readIdentityById } from "./viewer-9KLQibjn.js";
|
|
13
|
+
import { r as getStateAdapter } from "./adapter-CMJfmHso.js";
|
|
14
|
+
import { gt as coerceThreadConversationState, pt as getPersistedThreadState } from "./task-runner-BYPN4BEO.js";
|
|
15
|
+
import { _ as getMcpProviderErrorAttributes } from "./service-account-BpGpScaT.js";
|
|
16
|
+
import { i as readConnectedOAuthTokens, s as htmlCallbackResponse } from "./connections-Dz_AQg5p.js";
|
|
17
17
|
import { n as relayLocalOAuthCallback } from "./oauth-relay-D6xxVywK.js";
|
|
18
18
|
import path from "node:path";
|
|
19
19
|
import { createHmac, createSecretKey, timingSafeEqual } from "node:crypto";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { i as getChatConfig } from "./config-
|
|
3
|
-
import { H as GOOGLE_IDENTITY_PROVIDER, W as normalizeIdentityEmail, h as logWarn } from "./logging-
|
|
2
|
+
import { i as getChatConfig } from "./config-B4b-NXH5.js";
|
|
3
|
+
import { H as GOOGLE_IDENTITY_PROVIDER, W as normalizeIdentityEmail, h as logWarn } from "./logging-BN5drSEZ.js";
|
|
4
4
|
import { a as isSlackUserId, d as parseSlackChannelReferenceId, f as parseSlackTeamId, s as parseActorUserId } from "./actor-6jsm_v96.js";
|
|
5
|
-
import { A as juniorConversations, E as juniorConversationAnnotations, M as juniorUsers, N as juniorDestinations, S as juniorConversationMetrics, j as juniorIdentities, t as createJuniorSqlExecutor, v as juniorConversationParticipants, w as juniorConversationEvents, x as CONVERSATION_METRICS, y as juniorConversationBindings } from "./executor-
|
|
5
|
+
import { A as juniorConversations, E as juniorConversationAnnotations, M as juniorUsers, N as juniorDestinations, S as juniorConversationMetrics, j as juniorIdentities, t as createJuniorSqlExecutor, v as juniorConversationParticipants, w as juniorConversationEvents, x as CONVERSATION_METRICS, y as juniorConversationBindings } from "./executor-SWyHhit0.js";
|
|
6
6
|
import { d as historyReplacementSchema, f as newConversationEventSchema, p as encodeHistoryPayload, s as conversationEventDataSchema, u as decodeStoredConversationEvent, y as usageSchema } from "./media-BepyEUNm.js";
|
|
7
7
|
import { randomUUID } from "node:crypto";
|
|
8
8
|
import { and, asc, desc, eq, gt, gte, inArray, isNull, lt, lte, ne, or, sql } from "drizzle-orm";
|