@sentry/junior 0.318.0 → 0.320.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/{context-BKF_5zzI.js → adapter-DlLLoJKj.js} +537 -537
- package/dist/{admin-UOHix_5P.js → admin-BzRXDVfh.js} +1 -1
- package/dist/{agent-runner-DeYymwh2.js → agent-DxZ7nHfD.js} +19866 -6720
- package/dist/{agent-status-BA5x3Xtp.js → agent-status-Bq_AIpyp.js} +105 -1
- package/dist/{agent-update-delivery-DH8bx7jU.js → agent-update-delivery-CO4FU5Gg.js} +4 -5
- package/dist/api/schema.d.ts +45 -23
- package/dist/api/schema.js +4 -4
- package/dist/api.js +79 -84
- package/dist/{app-DKAOuaoC.d.ts → app-CHCFIIDu.d.ts} +5 -4
- package/dist/app.d.ts +2 -2
- package/dist/app.js +119 -194
- package/dist/{change-record-BzJgLsv7.d.ts → change-record-K-KsqNhT.d.ts} +9 -5
- package/dist/{channel-access-A0de5lRv.js → channel-access-BghWqlXx.js} +1 -1
- package/dist/{chat-core-engine-D3Wd7f5n.js → chat-core-engine-BgfSLrDu.js} +31 -14
- package/dist/cli/chat.d.ts +1 -1
- package/dist/cli/chat.js +23 -23
- package/dist/cli/check.js +5 -5
- package/dist/cli/main.js +2 -2
- package/dist/cli/plugins.d.ts +1 -1
- package/dist/cli/plugins.js +8 -8
- package/dist/cli/snapshot-create.js +5 -5
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +3 -4
- package/dist/{continue-in-slack-YxwMQVeR.js → continue-in-slack-DBlQP4PC.js} +3 -3
- package/dist/{conversation-feed-Cj7IuBtM.js → conversation-feed-DEUdD7mb.js} +2 -106
- package/dist/{conversation-privacy-Cr_dNW1p.js → conversation-privacy-qoh95v90.js} +1 -1
- package/dist/{create-Btl1y1rq.js → create-jZSaDrCR.js} +115 -5
- package/dist/{credential-sync-DTarZ63K.js → credential-sync-Bj9-UlNE.js} +15 -18
- package/dist/{db-of6e3sGt.js → db-BacvswT0.js} +4602 -727
- package/dist/{deployment-C0qXa0FD.js → deployment-BoJkRPDt.js} +3 -3
- package/dist/{engine-context-C_QL_bMQ.js → engine-context-Bi3Ync5t.js} +521 -150
- package/dist/{html-9_pS9SjY.js → html-DW0pw5Pr.js} +6 -8
- package/dist/instrumentation.js +7 -23
- package/dist/list-Dz3CdP3g.js +5016 -0
- package/dist/{logging-BnOG0qz2.js → logging-DsTnMqyi.js} +8 -33
- package/dist/{mailbox-turn-Byrry9o1.js → markers-C33gNYNE.js} +1705 -1284
- package/dist/nitro.d.ts +2 -2
- package/dist/nitro.js +6 -7
- package/dist/{oauth-callback-server-CjnnUr4o.js → oauth-callback-server-C-pEhAQK.js} +2 -2
- package/dist/{oauth-relay-BvHFH0fV.js → oauth-relay-DIXdH-io.js} +1 -1
- package/dist/{plugins-fBrz8PCV.d.ts → plugins-DhGXZjlu.d.ts} +1 -0
- package/dist/{profile-iHw1uu32.js → profile-v9vA3RvH.js} +16 -18
- package/dist/{prompt-DEkStuxG.js → prompt-C5CW2wKO.js} +1 -1
- package/dist/{reports-C1d9azyV.js → reports-eBgrhPXS.js} +2 -2
- package/dist/{resolve-DC6zBuDV.js → resolve-HVXmbeCr.js} +5 -5
- package/dist/{result-DxewDuXb.js → result-BPNzgeTl.js} +20 -9
- package/dist/{runner-99YxVN_r.js → runner-aNSDTST6.js} +7 -8
- package/dist/{sandbox-egress-signals-CgoX5CTI.js → sandbox-egress-signals-nzp9Ykf7.js} +1 -1
- package/dist/{schema-BTojNBr5.js → schema-BlTO5M1d.js} +16 -8
- package/dist/{service-account-YDCPSByj.js → service-account-DWIf1t6p.js} +4 -5
- package/dist/{skills-CleC0Hze.js → skills-50izzzdK.js} +9 -9
- package/dist/{slack-conversation-unfurl-BNQLC12R.js → slack-conversation-unfurl-C6jXhVYg.js} +7 -7
- package/dist/storage-BtCxXiNt.js +273 -0
- package/dist/{system-prompt-table-Ci6Ck4gk.js → system-prompt-table-CIR1B44Z.js} +27 -85
- package/dist/topic-B2EWKKBT.js +6 -0
- package/dist/{package-discovery-DD9vencX.js → topics-DxuKurCX.js} +21 -1
- package/dist/{types-DCzTAA63.js → types-BNHkJrOP.js} +25 -11
- package/dist/{users-Cb9c1k9q.js → users-DOVo9sdU.js} +1 -1
- package/dist/{validation-BiUmWPhy.js → validation-CK0vuEHB.js} +4 -4
- package/dist/{version-VEXiEcZu.js → version-BuLVNlxB.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{worker-ChWYQdhm.js → worker-C82kHU1R.js} +4 -4
- package/migrations/20261127052408_space_name_nullable/migration.sql +5 -0
- package/migrations/20261127052408_space_name_nullable/snapshot.json +29 -0
- package/migrations/20261127060000_annotation_object_id_index/migration.sql +1 -0
- package/migrations/20261127060000_annotation_object_id_index/snapshot.json +69 -0
- package/migrations/20261127060001_annotation_subjects/migration.sql +78 -0
- package/migrations/20261127060001_annotation_subjects/snapshot.json +104 -0
- package/migrations/20261127060002_annotation_subject_index/migration.sql +1 -0
- package/migrations/20261127060002_annotation_subject_index/snapshot.json +70 -0
- package/migrations/20261127060003_annotation_title_url/migration.sql +84 -0
- package/migrations/20261127060003_annotation_title_url/snapshot.json +73 -0
- package/migrations/20261127150242_drop_space_members/migration.sql +9 -0
- package/migrations/20261127150242_drop_space_members/snapshot.json +53 -0
- package/package.json +9 -7
- package/dist/auth-pause-state-f9hJM_zO.js +0 -113
- package/dist/catalog-runtime-BfdAnztW.js +0 -6
- package/dist/child-message-peFWLcCZ.js +0 -15
- package/dist/conversation-turn-Bru4w_FD.js +0 -1250
- package/dist/job-runner-B2XEvpif.js +0 -1505
- package/dist/lineage-nh4z9iQN.js +0 -36
- package/dist/list-HRP3TIRl.js +0 -12631
- package/dist/markers-CTTtJqYn.js +0 -342
- package/dist/message-BRUuLgrY.js +0 -153
- package/dist/model-input-CFC62mf-.js +0 -82
- package/dist/registry-Cl7Labpe.js +0 -3279
- package/dist/run-conversation-Cz2ubZK-.js +0 -337
- package/dist/sender-actors-77zTQbSG.js +0 -84
- package/dist/spawn-DuZfodPa.js +0 -45
- package/dist/task-runner-BJ9Up3bG.js +0 -1529
- package/dist/topic-CRYYBYp-.js +0 -7
- package/dist/topics-BoCkoPJJ.js +0 -21
- package/dist/turn-membership-VT7XZh-L.js +0 -856
- package/dist/turn-wake-C7HeLHAM.js +0 -151
package/dist/nitro.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as JuniorPluginSet } from "./plugins-
|
|
2
|
-
import { r as JuniorDashboardOptions } from "./app-
|
|
1
|
+
import { n as JuniorPluginSet } from "./plugins-DhGXZjlu.js";
|
|
2
|
+
import { r as JuniorDashboardOptions } from "./app-CHCFIIDu.js";
|
|
3
3
|
import { withSentryConfig as withSentryConfig$1 } from "@sentry/nitro";
|
|
4
4
|
type SentryNitroConfig = Parameters<typeof withSentryConfig$1>[0];
|
|
5
5
|
type SentryNitroOptions = NonNullable<Parameters<typeof withSentryConfig$1>[1]>;
|
package/dist/nitro.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, i as PLUGIN_TASK_QUEUE_TOPIC, n as CACHE_WARMUP_QUEUE_TOPIC, o as
|
|
1
|
+
import { _ as toOptionalTrimmed, a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, g as resolvePackageDir, h as isValidPackageName, i as PLUGIN_TASK_QUEUE_TOPIC, n as CACHE_WARMUP_QUEUE_TOPIC, o as discoverInstalledPluginPackageContent, t as BACKGROUND_COMPACTION_QUEUE_TOPIC } from "./topics-DxuKurCX.js";
|
|
2
2
|
import { t as startLocalVercelQueueServer } from "./local-server-CpnGhYml.js";
|
|
3
|
-
import { n as TURN_STEP_TOPIC, t as
|
|
4
|
-
import { a as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, c as
|
|
5
|
-
import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-DD9vencX.js";
|
|
3
|
+
import { n as TURN_STEP_TOPIC, t as TURN_ENDED_TOPIC } from "./topic-B2EWKKBT.js";
|
|
4
|
+
import { a as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, c as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, d as JUNIOR_TURN_ENDED_CALLBACK_ROUTE, f as JUNIOR_TURN_STEP_CALLBACK_ROUTE, g as getDeploymentServiceVersion, i as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, l as JUNIOR_RETENTION_CRON_SCHEDULE, n as JUNIOR_AUTO_ARCHIVE_ROUTE, o as JUNIOR_HEARTBEAT_CRON_SCHEDULE, p as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, r as JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE, s as JUNIOR_HEARTBEAT_ROUTE, t as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, u as JUNIOR_RETENTION_ROUTE } from "./deployment-BoJkRPDt.js";
|
|
6
5
|
import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-D_Ru4CWc.js";
|
|
7
6
|
import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-Cv2ETe8Y.js";
|
|
8
7
|
import path from "node:path";
|
|
@@ -41,8 +40,8 @@ function queueCallbackRoutes() {
|
|
|
41
40
|
topic: TURN_STEP_TOPIC
|
|
42
41
|
},
|
|
43
42
|
{
|
|
44
|
-
route:
|
|
45
|
-
topic:
|
|
43
|
+
route: JUNIOR_TURN_ENDED_CALLBACK_ROUTE,
|
|
44
|
+
topic: TURN_ENDED_TOPIC
|
|
46
45
|
}
|
|
47
46
|
];
|
|
48
47
|
}
|
|
@@ -253,7 +252,7 @@ function injectVirtualConfig(nitro, options) {
|
|
|
253
252
|
*/
|
|
254
253
|
function injectVirtualSystemPrompts(nitro, options) {
|
|
255
254
|
nitro.options.virtual["#junior/system-prompts"] = async () => {
|
|
256
|
-
const { buildSystemPromptTable } = await import("./system-prompt-table-
|
|
255
|
+
const { buildSystemPromptTable } = await import("./system-prompt-table-CIR1B44Z.js").then((n) => n.r);
|
|
257
256
|
const table = await buildSystemPromptTable(await options.loadPlugins(), options.botName);
|
|
258
257
|
return `export const systemPrompts = ${JSON.stringify(table)};`;
|
|
259
258
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
2
|
-
import { A as createUserTokenStore } from "./profile-
|
|
1
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-Bj9-UlNE.js";
|
|
2
|
+
import { A as createUserTokenStore } from "./profile-v9vA3RvH.js";
|
|
3
3
|
import { createServer } from "node:http";
|
|
4
4
|
// src/chat/local/oauth-callback-server.ts
|
|
5
5
|
const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import { R as getChatConfig } from "./
|
|
2
|
+
import { R as getChatConfig } from "./adapter-DlLLoJKj.js";
|
|
3
3
|
import * as z from "zod";
|
|
4
4
|
import { randomBytes } from "node:crypto";
|
|
5
5
|
import { SignJWT, jwtVerify } from "jose";
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { T as withSpan, f as logException, m as logWarn, u as logAudit, v as setSentryUser, y as setSpanAttributes } from "./logging-BnOG0qz2.js";
|
|
6
|
-
import { A as createEncryptedState, I as resolvePluginCommandEnv, J as CredentialUnavailableError, M as findLegacyWebActorUserId, P as resolveApiHeaderTransforms, Q as workloadIdentityHeader, Y as ServiceAccountUnavailableError, i as mergeHeaderTransforms, j as readEncryptedState, n as HOST_MANAGED_CREDENTIAL_PLACEHOLDER, q as CredentialMintError, r as resolveAuthTokenPlaceholder } from "./registry-Cl7Labpe.js";
|
|
1
|
+
import { R as getChatConfig, c as acquireActiveLock, g as credentialUserSubjectId, i as getStateAdapter, m as credentialLogContext, p as credentialContextSchema, s as MUTATION_LOCK_TTL_MS, u as withLock } from "./adapter-DlLLoJKj.js";
|
|
2
|
+
import { Af as ServiceAccountUnavailableError, Ld as HOST_MANAGED_CREDENTIAL_PLACEHOLDER, Nf as workloadIdentityHeader, Of as CredentialMintError, Pd as getAppContext, Rd as resolveAuthTokenPlaceholder, Tt as getPlugins, _f as resolvePluginCommandEnv, a as getDb, aa as createPluginCache, ac as sleep, df as createEncryptedState, ff as readEncryptedState, hf as resolveApiHeaderTransforms, ia as runNonInteractiveCommand, kf as CredentialUnavailableError, pf as findLegacyWebActorUserId, zd as mergeHeaderTransforms } from "./db-BacvswT0.js";
|
|
3
|
+
import { G as mapBounded, d as SANDBOX_WORKSPACE_ROOT, h as createPluginLogger } from "./prompt-C5CW2wKO.js";
|
|
4
|
+
import { T as withSpan, f as logException, m as logWarn, u as logAudit, v as setSentryUser, y as setSpanAttributes } from "./logging-DsTnMqyi.js";
|
|
7
5
|
import { n as redactSandboxEgressProxyPath, t as SANDBOX_EGRESS_PROXY_PATH } from "./proxy-path-BHYoKZdq.js";
|
|
8
6
|
import { r as continueTrace } from "./sentry-CPbZjomA.js";
|
|
9
7
|
import * as z from "zod";
|
|
@@ -403,7 +401,7 @@ function manifestDomains(manifest) {
|
|
|
403
401
|
return [.../* @__PURE__ */ new Set([...manifest.credentials?.domains ?? [], ...manifest.domains ?? []])].sort((left, right) => left.localeCompare(right));
|
|
404
402
|
}
|
|
405
403
|
function providerEntries() {
|
|
406
|
-
return
|
|
404
|
+
return getAppContext().catalog.getProviders().map((plugin) => ({
|
|
407
405
|
provider: plugin.manifest.name,
|
|
408
406
|
domains: manifestDomains(plugin.manifest)
|
|
409
407
|
})).filter((entry) => entry.domains.length > 0).sort((left, right) => left.provider.localeCompare(right.provider));
|
|
@@ -451,7 +449,7 @@ function buildSandboxEgressNetworkPolicy(input) {
|
|
|
451
449
|
*/
|
|
452
450
|
async function resolveSandboxCommandEnvironment() {
|
|
453
451
|
const env = {};
|
|
454
|
-
for (const plugin of
|
|
452
|
+
for (const plugin of getAppContext().catalog.getProviders().sort((left, right) => left.manifest.name.localeCompare(right.manifest.name))) {
|
|
455
453
|
Object.assign(env, resolvePluginCommandEnv(plugin.manifest));
|
|
456
454
|
const credentials = plugin.manifest.credentials;
|
|
457
455
|
if (credentials?.type === "oauth-bearer" && credentials.authTokenEnv) env[credentials.authTokenEnv] = resolveAuthTokenPlaceholder(credentials);
|
|
@@ -582,10 +580,10 @@ function createUserTokenStore() {
|
|
|
582
580
|
}
|
|
583
581
|
function createProviderCredentialRouter(userTokenStore) {
|
|
584
582
|
const brokersByProvider = {};
|
|
585
|
-
for (const plugin of
|
|
583
|
+
for (const plugin of getAppContext().catalog.getProviders()) {
|
|
586
584
|
const { name } = plugin.manifest;
|
|
587
585
|
if (!plugin.manifest.credentials && !plugin.manifest.apiHeaders) continue;
|
|
588
|
-
brokersByProvider[name] =
|
|
586
|
+
brokersByProvider[name] = getAppContext().catalog.createBroker(name, { userTokenStore });
|
|
589
587
|
}
|
|
590
588
|
return new ProviderCredentialRouter({ brokersByProvider });
|
|
591
589
|
}
|
|
@@ -918,7 +916,7 @@ var SandboxEgressCredentialError = class extends Error {
|
|
|
918
916
|
};
|
|
919
917
|
/** True when the provider's credential is a host-minted workload identity token. */
|
|
920
918
|
function isWorkloadIdentityProvider(provider) {
|
|
921
|
-
return
|
|
919
|
+
return getAppContext().catalog.getDefinition(provider)?.manifest.credentials?.type === "workload-identity";
|
|
922
920
|
}
|
|
923
921
|
/**
|
|
924
922
|
* Add a workload identity plugin's static `api-headers` to its lease.
|
|
@@ -927,7 +925,7 @@ function isWorkloadIdentityProvider(provider) {
|
|
|
927
925
|
* such as an app API key, resolve from env on each request instead.
|
|
928
926
|
*/
|
|
929
927
|
function withStaticApiHeaders(lease) {
|
|
930
|
-
const manifest =
|
|
928
|
+
const manifest = getAppContext().catalog.getDefinition(lease.provider)?.manifest;
|
|
931
929
|
if (manifest?.credentials?.type !== "workload-identity") return lease;
|
|
932
930
|
return {
|
|
933
931
|
...lease,
|
|
@@ -946,11 +944,11 @@ function defaultGrantForProvider(input) {
|
|
|
946
944
|
};
|
|
947
945
|
}
|
|
948
946
|
function hasGenericCredentials(provider) {
|
|
949
|
-
const manifest =
|
|
947
|
+
const manifest = getAppContext().catalog.getDefinition(provider)?.manifest;
|
|
950
948
|
return Boolean(manifest?.credentials || manifest?.apiHeaders);
|
|
951
949
|
}
|
|
952
950
|
function oauthAuthorizationForProvider(provider) {
|
|
953
|
-
const oauth =
|
|
951
|
+
const oauth = getAppContext().catalog.getOAuthConfig(provider);
|
|
954
952
|
return oauth ? {
|
|
955
953
|
type: "oauth",
|
|
956
954
|
provider,
|
|
@@ -976,7 +974,7 @@ function assertLeaseTransformsOwnedByProvider(provider, lease) {
|
|
|
976
974
|
*/
|
|
977
975
|
async function selectSandboxEgressGrant(input) {
|
|
978
976
|
if (input.userOAuthOnly) {
|
|
979
|
-
const manifest =
|
|
977
|
+
const manifest = getAppContext().catalog.getDefinition(input.provider)?.manifest;
|
|
980
978
|
if (!manifest?.credentials || !manifest.oauth) throw new Error(`Plugin "${input.provider}" has no user OAuth for user-only egress`);
|
|
981
979
|
return defaultGrantForProvider(input);
|
|
982
980
|
}
|
|
@@ -3067,7 +3065,7 @@ function continueSandboxEgressTrace(request, upstreamHost, tracePropagation, cre
|
|
|
3067
3065
|
* because it calls a provider domain.
|
|
3068
3066
|
*/
|
|
3069
3067
|
function credentialRequestInput(provider, request) {
|
|
3070
|
-
const manifest =
|
|
3068
|
+
const manifest = getAppContext().catalog.getDefinition(provider)?.manifest;
|
|
3071
3069
|
if (!manifest) throw new Error(`Plugin "${provider}" has no manifest for sandbox egress`);
|
|
3072
3070
|
const credentialRequest = classifySandboxCredentialRequest(manifest, request.headers);
|
|
3073
3071
|
if (credentialRequest === "placeholder" || sandboxRequestGetsCredential(manifest, credentialRequest)) return {};
|
|
@@ -4621,8 +4619,8 @@ function workspaceRecipe(workspace) {
|
|
|
4621
4619
|
/** Build the complete profile that selects one reusable sandbox snapshot. */
|
|
4622
4620
|
function create(runtime, workspace) {
|
|
4623
4621
|
const declared = {
|
|
4624
|
-
dependencies: mergeDependencies([...GLOBAL_RUNTIME_DEPENDENCIES, ...
|
|
4625
|
-
postinstall: [...GLOBAL_RUNTIME_POSTINSTALL, ...
|
|
4622
|
+
dependencies: mergeDependencies([...GLOBAL_RUNTIME_DEPENDENCIES, ...getAppContext().catalog.getRuntimeDependencies()]),
|
|
4623
|
+
postinstall: [...GLOBAL_RUNTIME_POSTINSTALL, ...getAppContext().catalog.getRuntimePostinstall()]
|
|
4626
4624
|
};
|
|
4627
4625
|
const { dependencies, postinstall } = getSandboxProvider().selectSnapshotRuntime?.(declared) ?? declared;
|
|
4628
4626
|
const pluginPostinstall = postinstall.filter((command) => !GLOBAL_RUNTIME_POSTINSTALL.includes(command));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as logException, m as logWarn, p as logInfo } from "./logging-
|
|
1
|
+
import { f as logException, m as logWarn, p as logInfo } from "./logging-DsTnMqyi.js";
|
|
2
2
|
import { escapeClosingTags, escapeTagText, escapeTagTextAndQuotes, findTag, openingTag, readTag, renderTag, startsWithTag, stripTags, unescapeClosingTags, unescapeTagText } from "@sentry/junior-plugin-api";
|
|
3
3
|
import pLimit from "p-limit";
|
|
4
4
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { h as createPluginLogger, r as runPluginHooksAtOnce } from "./prompt-
|
|
1
|
+
import { Et as getRegistrations, Gi as createPluginState, Qi as basePluginContext, fr as createPluginConversationEventStats } from "./db-BacvswT0.js";
|
|
2
|
+
import { h as createPluginLogger, r as runPluginHooksAtOnce } from "./prompt-C5CW2wKO.js";
|
|
3
3
|
// src/chat/plugins/hooks/reports.ts
|
|
4
4
|
const OPERATIONAL_REPORT_MAX_METRICS = 8;
|
|
5
5
|
const OPERATIONAL_REPORT_MAX_WIDGETS = 12;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { R as getChatConfig,
|
|
2
|
-
import {
|
|
3
|
-
import { a as SANDBOX_COMMAND_PATH, d as SANDBOX_WORKSPACE_ROOT } from "./prompt-
|
|
4
|
-
import { i as CURL_DOWNLOAD_ARGS, o as getSandboxProvider, r as isStale, t as create } from "./profile-
|
|
5
|
-
import { T as withSpan, y as setSpanAttributes } from "./logging-
|
|
1
|
+
import { R as getChatConfig, i as getStateAdapter } from "./adapter-DlLLoJKj.js";
|
|
2
|
+
import { ac as sleep, ia as runNonInteractiveCommand } from "./db-BacvswT0.js";
|
|
3
|
+
import { a as SANDBOX_COMMAND_PATH, d as SANDBOX_WORKSPACE_ROOT } from "./prompt-C5CW2wKO.js";
|
|
4
|
+
import { i as CURL_DOWNLOAD_ARGS, o as getSandboxProvider, r as isStale, t as create } from "./profile-v9vA3RvH.js";
|
|
5
|
+
import { T as withSpan, y as setSpanAttributes } from "./logging-DsTnMqyi.js";
|
|
6
6
|
import * as z from "zod";
|
|
7
7
|
// src/chat/sandbox/resources.ts
|
|
8
8
|
/**
|
|
@@ -1,11 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { Eo as publishAgentUpdate, Fn as readInboundMessageSender, an as getConversationWorkState, au as remindsNoReplyForChildStatus, i as getConversationStore, mu as CORE_EVENT_NAMESPACE, nu as parentResultActor, uu as EVENT_SYSTEM_ACTOR, vc as SYSTEM_IDENTITY_ID } from "./db-BacvswT0.js";
|
|
2
|
+
import { Jt as buildDeterministicTurnId, L as listActiveMailboxTurns, O as enqueueAutomatedInput, S as getAgentReplyMessageId, b as readAgentConfig, c as resultAuthorId, f as readChildConversationSender, it as EVENT_WAIT_MS, k as getConversationStoppedAtMs, o as listOpenChildAgents, s as listUnreportedSiblingAgents, t as recordChildAgentEnded, x as getAgentMessageId } from "./markers-C33gNYNE.js";
|
|
3
|
+
import { H as renderDataTag } from "./prompt-C5CW2wKO.js";
|
|
4
|
+
import { _ as NO_REPLY_TOOL_NAME } from "./system-prompt-table-CIR1B44Z.js";
|
|
5
|
+
import { Bn as AGENT_UPDATE_EVENT_TYPE, zn as AGENT_MESSAGE_EVENT_TYPE } from "./types-BNHkJrOP.js";
|
|
6
|
+
// src/chat/child-agents/child-message.ts
|
|
7
|
+
/**
|
|
8
|
+
* List the child replies and results among the ids that reached one
|
|
9
|
+
* mailbox, oldest first, with the sender fields that the mailbox keeps.
|
|
10
|
+
*/
|
|
11
|
+
function listChildMessages(inboundMessageIds, messageSenders) {
|
|
12
|
+
return inboundMessageIds.flatMap((inboundMessageId) => {
|
|
13
|
+
const sender = messageSenders[inboundMessageId];
|
|
14
|
+
return sender ? [{
|
|
15
|
+
inboundMessageId,
|
|
16
|
+
sender
|
|
17
|
+
}] : [];
|
|
18
|
+
});
|
|
19
|
+
}
|
|
9
20
|
// src/chat/child-agents/store.ts
|
|
10
21
|
/**
|
|
11
22
|
* Read the name, agent type, fork flag, and title of one child Conversation,
|
|
@@ -259,4 +270,4 @@ function createEndStoppedChildWork(options) {
|
|
|
259
270
|
});
|
|
260
271
|
};
|
|
261
272
|
}
|
|
262
|
-
export { getChildAgentLabel as a, renderAgentResult as i, enqueueAgentMessageToParent as n, enqueueStarterUpdate as r, createEndStoppedChildWork as t };
|
|
273
|
+
export { getChildAgentLabel as a, renderAgentResult as i, enqueueAgentMessageToParent as n, listChildMessages as o, enqueueStarterUpdate as r, createEndStoppedChildWork as t };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { Ht as messageCardText } from "./types-
|
|
2
|
-
import {
|
|
3
|
-
import { h as getAssistantReplyText } from "./system-prompt-table-
|
|
4
|
-
import { f as logException, w as withLogContext, x as setTags } from "./logging-
|
|
5
|
-
import { n as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { $s as SYSTEM_IDENTITY_ID, i as getConversationStore } from "./db-of6e3sGt.js";
|
|
1
|
+
import { Ht as messageCardText } from "./types-BNHkJrOP.js";
|
|
2
|
+
import { St as loadPendingMessageCards, bt as completeAuthPauseTurn, ct as scheduleSessionCompletedPluginTasks, st as processPluginTask, xt as buildDeliveredTurnStatePatch } from "./agent-DxZ7nHfD.js";
|
|
3
|
+
import { h as getAssistantReplyText } from "./system-prompt-table-CIR1B44Z.js";
|
|
4
|
+
import { f as logException, w as withLogContext, x as setTags } from "./logging-DsTnMqyi.js";
|
|
5
|
+
import { $n as normalizeConversationText, Dn as loadConversationProjection, Gt as markTurnFailed, J as getPersistedThreadState, Kr as finalizeFailedTurnReplyWithEvent, Kt as startActiveTurn, Mr as getTurnLifecycle, Nn as recordAuthorizationCompleted, Qn as markConversationMessage, Un as persistConversationMessages, Vn as hydrateConversationMessages, X as persistThreadStateById, Z as coerceThreadConversationState, Zn as latestConversationMessageSeq, er as recordDeliveredAssistantMessage, fr as authorizationId, ir as upsertConversationMessage, li as persistWithRetry, q as getPersistedSandboxState, wn as commitAcceptedReply, wr as saveTurnCheckpoint } from "./markers-C33gNYNE.js";
|
|
6
|
+
import { f as credentialContextForActor } from "./adapter-DlLLoJKj.js";
|
|
7
|
+
import { i as getConversationStore, vc as SYSTEM_IDENTITY_ID } from "./db-BacvswT0.js";
|
|
9
8
|
import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
|
|
10
9
|
import { randomUUID } from "node:crypto";
|
|
11
10
|
// src/chat/local/runner.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { k as sandboxEgressSignalsResponseSchema } from "./profile-
|
|
1
|
+
import { k as sandboxEgressSignalsResponseSchema } from "./profile-v9vA3RvH.js";
|
|
2
2
|
// src/chat/local/sandbox-egress-signals.ts
|
|
3
3
|
const SANDBOX_EGRESS_SIGNALS_PATH = "/api/internal/sandbox-egress/signals";
|
|
4
4
|
const LOCAL_DEV_SERVER_TIMEOUT_MS = 1e3;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./user-customization-CvfuY9Eo.js";
|
|
2
|
-
import { F as actorIdentitySchema, G as conversationParamsSchema,
|
|
3
|
-
import {
|
|
4
|
-
import { f as conversationTitleSchema } from "./conversation-feed-
|
|
2
|
+
import { F as actorIdentitySchema, G as conversationParamsSchema, Lt as conversationTreeStateSchema, Mn as notificationScheduleSchema, Q as conversationUsageSchema, X as conversationSummaryReportSchema, Yt as inputFileSchema, et as conversationChildAgentTotalsSchema, fn as inboxItemNoticeRequestSchema, i as TODO_STATUSES, mn as inboxItemRequestSchema, z as conversationAuxiliaryCostsSchema } from "./types-BNHkJrOP.js";
|
|
3
|
+
import { l as fillUtcDays, p as sumUtcHoursIntoSixHours, t as AGENT_STATUSES, u as fillUtcHours, v as CHILD_AGENT_RESULTS } from "./agent-status-Bq_AIpyp.js";
|
|
4
|
+
import { f as conversationTitleSchema } from "./conversation-feed-DEUdD7mb.js";
|
|
5
5
|
import { t as isPushServiceEndpoint } from "./push-endpoint-CO-nomUd.js";
|
|
6
6
|
import * as z from "zod";
|
|
7
7
|
import { codeChangeStateSchema, eventMatchSchema, objectTypeSchema, ownedObjectAnnotationSchema } from "@sentry/junior-plugin-api";
|
|
@@ -300,7 +300,9 @@ const todoAssigneeSchema = z.discriminatedUnion("kind", [
|
|
|
300
300
|
}).strict(),
|
|
301
301
|
z.object({
|
|
302
302
|
kind: z.literal("user"),
|
|
303
|
-
name: z.string().min(1).optional()
|
|
303
|
+
name: z.string().min(1).optional(),
|
|
304
|
+
/** The To-do is assigned to the person who reads it. */
|
|
305
|
+
viewer: z.literal(true).optional()
|
|
304
306
|
}).strict()
|
|
305
307
|
]);
|
|
306
308
|
/**
|
|
@@ -1174,10 +1176,10 @@ const inboxItemSchema = z.object({
|
|
|
1174
1176
|
*/
|
|
1175
1177
|
request: z.union([inboxItemRequestSchema, inboxItemNoticeRequestSchema]).optional(),
|
|
1176
1178
|
/**
|
|
1177
|
-
* The top of the owner Conversation's tree that the viewer can see
|
|
1178
|
-
*
|
|
1179
|
-
*
|
|
1180
|
-
*
|
|
1179
|
+
* The top of the owner Conversation's tree that the viewer can see. The
|
|
1180
|
+
* Inbox stacks items by it. Unset when the owner is not a Conversation,
|
|
1181
|
+
* or when the viewer cannot see it, such as a person on the item by a
|
|
1182
|
+
* role on the subject; then the payload names no Conversation or Turn.
|
|
1181
1183
|
*/
|
|
1182
1184
|
rootConversationId: z.string().min(1).optional(),
|
|
1183
1185
|
status: z.enum([
|
|
@@ -1193,6 +1195,12 @@ const inboxItemSchema = z.object({
|
|
|
1193
1195
|
subject: z.object({
|
|
1194
1196
|
id: z.string().min(1),
|
|
1195
1197
|
kind: z.string().min(1),
|
|
1198
|
+
/**
|
|
1199
|
+
* What else the viewer's Dismiss changes on the provider, such as
|
|
1200
|
+
* `Also removes you from the reviewers on GitHub.` Unset when it
|
|
1201
|
+
* changes nothing there.
|
|
1202
|
+
*/
|
|
1203
|
+
dismissNote: z.string().min(1).optional(),
|
|
1196
1204
|
/** The name of a plugin kind's ask, such as `Review requested`. */
|
|
1197
1205
|
label: z.string().min(1).optional(),
|
|
1198
1206
|
/**
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as
|
|
3
|
-
import { _ as disconnectStateAdapter } from "./context-BKF_5zzI.js";
|
|
1
|
+
import { Bd as disconnectServiceAccount, Gd as serviceAccountPlugins, Hd as getServiceAccountStatus, Kd as startServiceAccountSignIn, Pd as getAppContext, Vd as finishServiceAccountSignIn } from "./db-BacvswT0.js";
|
|
2
|
+
import { n as disconnectStateAdapter } from "./adapter-DlLLoJKj.js";
|
|
4
3
|
import { CLI_USAGE } from "./cli/run.js";
|
|
5
4
|
import { createServer } from "node:http";
|
|
6
5
|
// src/cli/service-account.ts
|
|
@@ -55,9 +54,9 @@ async function listenForCallback() {
|
|
|
55
54
|
};
|
|
56
55
|
}
|
|
57
56
|
function requireServiceAccountPlugin(name) {
|
|
58
|
-
const plugin =
|
|
57
|
+
const plugin = getAppContext().catalog.getDefinition(name);
|
|
59
58
|
if (plugin?.manifest.accounts?.serviceAccount) return plugin;
|
|
60
|
-
const supported = serviceAccountPlugins(
|
|
59
|
+
const supported = serviceAccountPlugins(getAppContext().catalog.getProviders()).map((candidate) => candidate.manifest.name);
|
|
61
60
|
console.error(`Plugin "${name}" does not support a service account.` + (supported.length ? ` Supported plugins: ${supported.join(", ")}.` : ""));
|
|
62
61
|
}
|
|
63
62
|
async function runConnect(plugin) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import { R as getChatConfig } from "./
|
|
3
|
-
import {
|
|
4
|
-
import { m as logWarn } from "./logging-
|
|
5
|
-
import {
|
|
6
|
-
import { G as mapBounded } from "./prompt-
|
|
2
|
+
import { R as getChatConfig } from "./adapter-DlLLoJKj.js";
|
|
3
|
+
import { f as skillRoots } from "./topics-DxuKurCX.js";
|
|
4
|
+
import { m as logWarn } from "./logging-DsTnMqyi.js";
|
|
5
|
+
import { Pd as getAppContext } from "./db-BacvswT0.js";
|
|
6
|
+
import { G as mapBounded } from "./prompt-C5CW2wKO.js";
|
|
7
7
|
import * as z from "zod";
|
|
8
8
|
import path from "node:path";
|
|
9
|
-
import fs from "node:fs/promises";
|
|
10
9
|
import { parse } from "yaml";
|
|
10
|
+
import fs from "node:fs/promises";
|
|
11
11
|
// src/chat/skill-references.ts
|
|
12
12
|
function isCommonEnvironmentVariable(name) {
|
|
13
13
|
return [
|
|
@@ -180,7 +180,7 @@ function resolveSkillRoots(options) {
|
|
|
180
180
|
const additionalRoots = options?.additionalRoots ?? [];
|
|
181
181
|
const envRoots = getChatConfig().skills.dirs;
|
|
182
182
|
const defaults = skillRoots();
|
|
183
|
-
const pluginRoots =
|
|
183
|
+
const pluginRoots = getAppContext().catalog.getSkillRoots();
|
|
184
184
|
const seen = /* @__PURE__ */ new Set();
|
|
185
185
|
const resolved = [];
|
|
186
186
|
for (const root of [
|
|
@@ -197,7 +197,7 @@ function resolveSkillRoots(options) {
|
|
|
197
197
|
return resolved;
|
|
198
198
|
}
|
|
199
199
|
function resolveSkillPlugin(meta) {
|
|
200
|
-
const plugin =
|
|
200
|
+
const plugin = getAppContext().catalog.getForSkillPath(meta.skillPath);
|
|
201
201
|
if (meta.pluginProvider && plugin?.manifest.name !== meta.pluginProvider) throw new Error(`Skill "${meta.name}" metadata names plugin "${meta.pluginProvider}" but is not owned by that plugin`);
|
|
202
202
|
return plugin;
|
|
203
203
|
}
|
|
@@ -275,7 +275,7 @@ async function readSkillDirectory(skillDir) {
|
|
|
275
275
|
}
|
|
276
276
|
const { name, description, allowedTools } = parsed.skill;
|
|
277
277
|
const disableModelInvocation = parsed.skill.disableModelInvocation === true || await openAiImplicitInvocationDisabled(skillDir);
|
|
278
|
-
const plugin =
|
|
278
|
+
const plugin = getAppContext().catalog.getForSkillPath(skillDir);
|
|
279
279
|
const references = skillBodyReferences(parsed.skill.body);
|
|
280
280
|
return {
|
|
281
281
|
name,
|
package/dist/{slack-conversation-unfurl-BNQLC12R.js → slack-conversation-unfurl-C6jXhVYg.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import {
|
|
3
|
-
import { A as slackBotIdSchema, E as parseSlackChannelId, I as slackMessageTsSchema, L as botConfig, M as slackTeamIdSchema, N as slackUserIdSchema, O as parseSlackTeamId,
|
|
4
|
-
import { i as lookupSlackUserProfile, n as lookupSlackBot } from "./users-
|
|
5
|
-
import { T as withSpan } from "./logging-
|
|
6
|
-
import { a as isMovableToSlack, i as continueConversationInSlack, n as alreadyContinuesInSlackMessage, t as BUSY } from "./continue-in-slack-
|
|
7
|
-
import { t as checkSlackChannelReadAccess } from "./channel-access-
|
|
8
|
-
import { G as mapBounded } from "./prompt-
|
|
2
|
+
import { Al as parseDashboardConversationLink, Ii as escapeSlackMrkdwnText, Li as formatSlackLink, Oi as postSlackEphemeralMessage, P as getConversationIdByProviderConversation, a as getDb, bn as deferConversationMove, dc as readActorIdentity, i as getConversationStore, ji as unfurlSlackLinks, kr as readConversationAccessFromSql, o as getSqlExecutor, oc as getWorkspaceTeamId, od as createCache, ti as runWithSlackInstallation } from "./db-BacvswT0.js";
|
|
3
|
+
import { A as slackBotIdSchema, C as parseActorUserId, E as parseSlackChannelId, I as slackMessageTsSchema, L as botConfig, M as slackTeamIdSchema, N as slackUserIdSchema, O as parseSlackTeamId, j as slackChannelIdSchema, k as parseSlackUserId, v as createSlackActor } from "./adapter-DlLLoJKj.js";
|
|
4
|
+
import { i as lookupSlackUserProfile, n as lookupSlackBot } from "./users-DOVo9sdU.js";
|
|
5
|
+
import { T as withSpan } from "./logging-DsTnMqyi.js";
|
|
6
|
+
import { a as isMovableToSlack, i as continueConversationInSlack, n as alreadyContinuesInSlackMessage, t as BUSY } from "./continue-in-slack-DBlQP4PC.js";
|
|
7
|
+
import { t as checkSlackChannelReadAccess } from "./channel-access-BghWqlXx.js";
|
|
8
|
+
import { G as mapBounded } from "./prompt-C5CW2wKO.js";
|
|
9
9
|
import * as z from "zod";
|
|
10
10
|
// src/chat/ingress/workspace-membership.ts
|
|
11
11
|
const MEMBER_TTL_MS = 3e5;
|