@sentry/junior 0.279.0 → 0.281.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/{actor-B4DYygOB.js → actor-6jsm_v96.js} +1 -1
- package/dist/{adapter-phTTgw7H.js → adapter-RVQGEa98.js} +1 -1
- package/dist/{admin-PcpJDugZ.js → admin-DQpHx6Og.js} +1 -1
- package/dist/{agent-runner-DwvT1BY0.js → agent-runner-B229gXUY.js} +1002 -980
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +7 -7
- package/dist/api.d.ts +3 -3
- package/dist/api.js +188 -86
- package/dist/{app-DVs6noo7.d.ts → app-BQ9RZS43.d.ts} +4 -4
- package/dist/app.d.ts +1 -1
- package/dist/app.js +45 -38
- package/dist/{assistant-reply-BXfxczd7.js → assistant-reply-DQbtwc6j.js} +1 -1
- package/dist/{automation-BehArCcq.js → automation-sIsmIXH7.js} +2 -2
- package/dist/{background-compaction-queue-CcbuLJrZ.js → background-compaction-queue-oegyrxSe.js} +3 -3
- package/dist/{briefs-Dd_ezwED.js → briefs-BwzGWJgR.js} +5 -9
- package/dist/{catalog-runtime-BWVMeZhW.js → catalog-runtime-ClKzLvbN.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 +3 -3
- package/dist/{client-Bpxe4vKa.js → client-DkG0Tj53.js} +2 -2
- package/dist/{config-C_bmRhrJ.js → config-3AZ11aSM.js} +2 -2
- package/dist/{connections-B2rHe5W5.js → connections-C0ut_6RW.js} +11 -11
- package/dist/{conversation-CIiJtx5q.js → conversation-DNtcULyX.js} +45 -14
- package/dist/{conversation-pending-messages-CnBvE6-6.js → conversation-pending-messages-LlFnr9-m.js} +11 -3
- package/dist/{conversation-privacy-CzOfcz0U.js → conversation-privacy-DAgeBGLN.js} +1 -1
- package/dist/{credential-sync-Dal_unpv.js → credential-sync-Bg8NPuvj.js} +16 -16
- package/dist/{db-CyLrV9C7.d.ts → db-BCFM0CUX.d.ts} +2 -2
- package/dist/{executor-BfYH-Wws.js → executor-DLKnzP6S.js} +149 -6
- package/dist/instrumentation.js +2 -2
- package/dist/{logging-CkT3_Xxp.js → logging-DHzrobea.js} +1 -1
- package/dist/{media-DTAA8Qs_.js → media-Dq9_svfQ.js} +1 -1
- package/dist/{message-Q5dkgaJ5.js → message-LR8z5jXJ.js} +9 -9
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-BDRaqe8O.js → oauth-callback-server-EWdpj0_y.js} +2 -2
- package/dist/{oauth-relay-D0G3T16m.js → oauth-relay-D6xxVywK.js} +1 -1
- package/dist/{projection-DWxX7pb1.js → projection-Bhz1tp0G.js} +194 -119
- package/dist/{prompt--dwus7Y-.js → prompt-DI6KCtwb.js} +6 -27
- package/dist/{queue-C37RbDVc.d.ts → queue-CZyYgPF0.d.ts} +1 -1
- package/dist/{registry-DnrdeO4s.js → registry-EjhulgQW.js} +3 -3
- package/dist/{reporting-window-DgHgwQB3.js → reporting-window-B-QP9zX1.js} +28 -2
- package/dist/{resolve-C_QXfqD_.js → resolve-Cw6OW4Fj.js} +4 -4
- package/dist/{result-DNmOxT-N.js → result-BoD0jevy.js} +11 -11
- package/dist/{runner-zd_noJ1l.js → runner-D22bsBDS.js} +11 -11
- package/dist/{sandbox-egress-signals-DQjv-nbG.js → sandbox-egress-signals-BG5GYacQ.js} +1 -1
- package/dist/{schema-CNJNzvr8.js → schema-BN34Jy-U.js} +30 -7
- package/dist/{schema-e90H5FIN.d.ts → schema-CsqJzkP5.d.ts} +95 -13
- package/dist/{service-account-CCH2Hv4h.js → service-account-Dd1nnAQZ.js} +3 -3
- package/dist/{service-account-BK26XlHo.js → service-account-xo-CeMqI.js} +3 -3
- package/dist/{session-stop-6Tf--T7G.js → session-stop-CHSYB2uw.js} +13 -14
- package/dist/{skills-BNrk8gi4.js → skills-BGJr6xtW.js} +3 -3
- package/dist/{spawn-C75hAB9l.js → spawn-Cl8WS7zi.js} +2 -2
- package/dist/{stop-RYbf7PWi.js → stop-C9lHWpvl.js} +332 -149
- package/dist/{store-G3h2djJU.js → store-C4z8gOgZ.js} +3 -3
- package/dist/{store-CO5vGjwD.js → store-DeTnwVJt.js} +6 -6
- package/dist/{task-queue-DlN58XeM.js → task-queue-BBos68l0.js} +4 -4
- package/dist/{task-runner-B-Bdm23d.js → task-runner-BSF9zO-H.js} +8 -8
- package/dist/{thread-state-Cj_7Slru.js → thread-state-DGq1o5JX.js} +4 -4
- package/dist/{turn-failure-response-CE7gaoC7.js → turn-failure-response--9bA4uLP.js} +8 -8
- package/dist/{turn-lifecycle-7sXwXLJ6.js → turn-lifecycle-t5fimxwQ.js} +1 -1
- package/dist/{turn-session-routing-FBdaH1zf.js → turn-session-routing-RBtUe-3y.js} +10 -11
- package/dist/{validation-DLWxEzWW.js → validation-DrR0leBT.js} +1 -1
- package/dist/{version-DtQ8WFIZ.js → version-D_HFt_Dq.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-vsM8_90o.js → viewer-DWlpSFdj.js} +9 -8
- package/dist/{work-DsoFRO_0.js → work-pPoqtRea.js} +12 -12
- package/dist/{worker-6kZEsCXs.js → worker-CoVKgJ-O.js} +6 -6
- package/package.json +5 -5
- package/dist/agent-invocations-CUg_SODU.js +0 -181
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { On as resolvePluginOAuthAccount, d as recordAuthorizationCompleted, hi as resolveBaseUrl, ki as postSlackMessage, mi as parseOAuthStatePayload, pi as formatProviderLabel, q as getConversationPendingAuth, tt as getTurnRecord, u as recordAuthenticationLinked, wn as createUserTokenStore, zi as getSlackClient } from "./projection-
|
|
2
|
-
import { m as escapeXml } from "./client-
|
|
3
|
-
import { a as getRuntimeMetadata, n as botConfig } from "./config-
|
|
4
|
-
import { H as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-
|
|
5
|
-
import { p as parseSlackUserId } from "./actor-
|
|
6
|
-
import { B as findUserByVerifiedEmails, C as getSqlExecutor, I as resolveActorIdentityId, W as upsertLinkedIdentity, o as readIdentityById } from "./viewer-
|
|
1
|
+
import { On as resolvePluginOAuthAccount, d as recordAuthorizationCompleted, hi as resolveBaseUrl, ki as postSlackMessage, mi as parseOAuthStatePayload, pi as formatProviderLabel, q as getConversationPendingAuth, tt as getTurnRecord, u as recordAuthenticationLinked, wn as createUserTokenStore, zi as getSlackClient } from "./projection-Bhz1tp0G.js";
|
|
2
|
+
import { m as escapeXml } from "./client-DkG0Tj53.js";
|
|
3
|
+
import { a as getRuntimeMetadata, n as botConfig } from "./config-3AZ11aSM.js";
|
|
4
|
+
import { H as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-DHzrobea.js";
|
|
5
|
+
import { p as parseSlackUserId } from "./actor-6jsm_v96.js";
|
|
6
|
+
import { B as findUserByVerifiedEmails, C as getSqlExecutor, I as resolveActorIdentityId, W as upsertLinkedIdentity, o as readIdentityById } from "./viewer-DWlpSFdj.js";
|
|
7
7
|
import { i as homeDir } from "./package-discovery-DJhGdS4c.js";
|
|
8
|
-
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-
|
|
9
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
10
|
-
import { t as discoverSkills } from "./skills-
|
|
11
|
-
import { d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, y as lookupSlackUserProfile } from "./agent-runner-
|
|
8
|
+
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-EjhulgQW.js";
|
|
9
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-ClKzLvbN.js";
|
|
10
|
+
import { t as discoverSkills } from "./skills-BGJr6xtW.js";
|
|
11
|
+
import { d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, y as lookupSlackUserProfile } from "./agent-runner-B229gXUY.js";
|
|
12
12
|
import { r as acquireActiveLock } from "./locks-D-0h111u.js";
|
|
13
|
-
import { r as getStateAdapter } from "./adapter-
|
|
14
|
-
import { _ as getMcpProviderErrorAttributes } from "./service-account-
|
|
15
|
-
import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-
|
|
16
|
-
import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-
|
|
17
|
-
import { n as relayLocalOAuthCallback } from "./oauth-relay-
|
|
13
|
+
import { r as getStateAdapter } from "./adapter-RVQGEa98.js";
|
|
14
|
+
import { _ as getMcpProviderErrorAttributes } from "./service-account-Dd1nnAQZ.js";
|
|
15
|
+
import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-DGq1o5JX.js";
|
|
16
|
+
import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-C0ut_6RW.js";
|
|
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";
|
|
20
|
-
import
|
|
20
|
+
import * as z from "zod";
|
|
21
21
|
import { pluginStoredTokensSchema } from "@sentry/junior-plugin-api";
|
|
22
22
|
import fs from "node:fs";
|
|
23
23
|
// src/handlers/mcp-oauth-callback.ts
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import "./config-
|
|
2
|
-
import { p as logException } from "./logging-
|
|
3
|
-
import { a as juniorAgentInvocations, c as juniorIdentities, d as juniorDestinations, f as timestamptz, i as juniorAgentBindings, l as juniorUsers, s as juniorConversations } from "./agent-invocations-CUg_SODU.js";
|
|
1
|
+
import "./config-3AZ11aSM.js";
|
|
2
|
+
import { p as logException } from "./logging-DHzrobea.js";
|
|
4
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
|
-
import { sql } from "drizzle-orm";
|
|
6
|
-
import { bigint, boolean, check, date, doublePrecision, foreignKey, index, integer, jsonb, pgTable, primaryKey, text, uniqueIndex, uuid } from "drizzle-orm/pg-core";
|
|
4
|
+
import { getTableColumns, sql } from "drizzle-orm";
|
|
5
|
+
import { bigint, boolean, check, date, doublePrecision, foreignKey, index, integer, jsonb, pgTable, primaryKey, text, timestamp, uniqueIndex, uuid } from "drizzle-orm/pg-core";
|
|
7
6
|
import { Pool } from "@neondatabase/serverless";
|
|
8
7
|
import { drizzle } from "drizzle-orm/neon-serverless";
|
|
9
8
|
import { migrate } from "drizzle-orm/neon-serverless/migrator";
|
|
10
9
|
import pg from "pg";
|
|
11
10
|
import { drizzle as drizzle$1 } from "drizzle-orm/node-postgres";
|
|
12
11
|
import { migrate as migrate$1 } from "drizzle-orm/node-postgres/migrator";
|
|
12
|
+
// src/db/schema/timestamps.ts
|
|
13
|
+
const timestamptz = (name) => timestamp(name, { withTimezone: true });
|
|
13
14
|
// src/db/schema/artifacts.ts
|
|
14
15
|
/** Durable metadata for conversation-owned public artifacts. */
|
|
15
16
|
const juniorArtifacts = pgTable("junior_artifacts", {
|
|
@@ -30,6 +31,114 @@ const juniorArtifacts = pgTable("junior_artifacts", {
|
|
|
30
31
|
index("junior_artifacts_gc_idx").on(table.deleteRequestedAt, table.createdAt),
|
|
31
32
|
index("junior_artifacts_conversation_idx").on(table.conversationId)
|
|
32
33
|
]);
|
|
34
|
+
// src/db/schema/destinations.ts
|
|
35
|
+
const juniorDestinations = pgTable("junior_destinations", {
|
|
36
|
+
id: text("id").primaryKey(),
|
|
37
|
+
provider: text("provider").notNull(),
|
|
38
|
+
providerTenantId: text("provider_tenant_id").notNull().default(""),
|
|
39
|
+
providerDestinationId: text("provider_destination_id").notNull(),
|
|
40
|
+
kind: text("kind").$type().notNull(),
|
|
41
|
+
parentDestinationId: text("parent_destination_id"),
|
|
42
|
+
displayName: text("display_name"),
|
|
43
|
+
visibility: text("visibility").$type().notNull().default("unknown"),
|
|
44
|
+
metadata: jsonb("metadata_json"),
|
|
45
|
+
createdAt: timestamptz("created_at").notNull(),
|
|
46
|
+
updatedAt: timestamptz("updated_at").notNull()
|
|
47
|
+
}, (table) => [uniqueIndex("junior_destinations_provider_destination_uidx").on(table.provider, table.providerTenantId, table.providerDestinationId), index("junior_destinations_provider_kind_idx").on(table.provider, table.kind)]);
|
|
48
|
+
const juniorUsers = pgTable("junior_users", {
|
|
49
|
+
id: text("id").primaryKey(),
|
|
50
|
+
primaryEmail: text("primary_email").notNull(),
|
|
51
|
+
primaryEmailNormalized: text("primary_email_normalized").notNull(),
|
|
52
|
+
displayName: text("display_name"),
|
|
53
|
+
timezone: text("timezone"),
|
|
54
|
+
/** Text the user saved to change how Junior replies to them. */
|
|
55
|
+
customization: text("customization"),
|
|
56
|
+
/** Junior-wide admin role. Only the `junior admin` CLI changes it. */
|
|
57
|
+
isAdmin: boolean("is_admin").notNull().default(false),
|
|
58
|
+
/** Auto-archive this user's conversations when their work is done. */
|
|
59
|
+
autoArchiveDefault: boolean("auto_archive_default").notNull().default(false),
|
|
60
|
+
/** Hours done work and the conversation stay quiet before auto-archive. */
|
|
61
|
+
autoArchiveGraceHours: integer("auto_archive_grace_hours").notNull().default(24),
|
|
62
|
+
createdAt: timestamptz("created_at").notNull(),
|
|
63
|
+
updatedAt: timestamptz("updated_at").notNull()
|
|
64
|
+
}, (table) => [uniqueIndex("junior_users_primary_email_normalized_uidx").on(table.primaryEmailNormalized)]);
|
|
65
|
+
// src/db/schema/identities.ts
|
|
66
|
+
const juniorIdentities = pgTable("junior_identities", {
|
|
67
|
+
id: text("id").primaryKey(),
|
|
68
|
+
kind: text("kind").$type().notNull(),
|
|
69
|
+
provider: text("provider").notNull(),
|
|
70
|
+
providerTenantId: text("provider_tenant_id").notNull().default(""),
|
|
71
|
+
providerSubjectId: text("provider_subject_id").notNull(),
|
|
72
|
+
displayName: text("display_name"),
|
|
73
|
+
handle: text("handle"),
|
|
74
|
+
email: text("email"),
|
|
75
|
+
avatarUrl: text("avatar_url"),
|
|
76
|
+
metadata: jsonb("metadata_json"),
|
|
77
|
+
createdAt: timestamptz("created_at").notNull(),
|
|
78
|
+
updatedAt: timestamptz("updated_at").notNull(),
|
|
79
|
+
userId: text("user_id").references(() => juniorUsers.id),
|
|
80
|
+
emailNormalized: text("email_normalized"),
|
|
81
|
+
emailVerified: boolean("email_verified").notNull().default(false),
|
|
82
|
+
signedInAt: timestamptz("signed_in_at")
|
|
83
|
+
}, (table) => [
|
|
84
|
+
uniqueIndex("junior_identities_provider_subject_uidx").on(table.provider, table.providerTenantId, table.providerSubjectId),
|
|
85
|
+
index("junior_identities_user_idx").on(table.userId),
|
|
86
|
+
index("junior_identities_verified_email_idx").on(table.emailNormalized).where(sql`${table.emailVerified} = true AND ${table.emailNormalized} IS NOT NULL`),
|
|
87
|
+
index("junior_identities_kind_provider_idx").on(table.kind, table.provider)
|
|
88
|
+
]);
|
|
89
|
+
// src/db/schema/conversations.ts
|
|
90
|
+
const juniorConversations = pgTable("junior_conversations", {
|
|
91
|
+
conversationId: text("conversation_id").primaryKey(),
|
|
92
|
+
schemaVersion: integer("schema_version").notNull().default(1),
|
|
93
|
+
source: text("source").$type(),
|
|
94
|
+
/** Structured session Source locator; set-once on the conversation root. */
|
|
95
|
+
sessionSource: jsonb("source_json").$type(),
|
|
96
|
+
/** Complete Location associated with this Conversation. */
|
|
97
|
+
location: jsonb("location_json").$type(),
|
|
98
|
+
destinationId: text("destination_id").references(() => juniorDestinations.id),
|
|
99
|
+
destination: jsonb("destination_json").$type(),
|
|
100
|
+
actorIdentityId: text("actor_identity_id").references(() => juniorIdentities.id),
|
|
101
|
+
creatorIdentityId: text("creator_identity_id").references(() => juniorIdentities.id),
|
|
102
|
+
credentialSubjectIdentityId: text("credential_subject_identity_id").references(() => juniorIdentities.id),
|
|
103
|
+
actor: jsonb("actor_json").$type(),
|
|
104
|
+
channelName: text("channel_name"),
|
|
105
|
+
title: text("title"),
|
|
106
|
+
createdAt: timestamptz("created_at").notNull(),
|
|
107
|
+
lastActivityAt: timestamptz("last_activity_at").notNull(),
|
|
108
|
+
updatedAt: timestamptz("updated_at").notNull(),
|
|
109
|
+
executionUpdatedAt: timestamptz("execution_updated_at"),
|
|
110
|
+
executionStatus: text("execution_status").$type().notNull(),
|
|
111
|
+
runId: text("run_id"),
|
|
112
|
+
lastCheckpointAt: timestamptz("last_checkpoint_at"),
|
|
113
|
+
lastEnqueuedAt: timestamptz("last_enqueued_at"),
|
|
114
|
+
parentConversationId: text("parent_conversation_id").references(() => juniorConversations.conversationId),
|
|
115
|
+
forkedFromConversationId: text("forked_from_conversation_id").references(() => juniorConversations.conversationId, { onDelete: "set null" }),
|
|
116
|
+
quickQuestionAt: timestamptz("quick_question_at"),
|
|
117
|
+
rootConversationId: text("root_conversation_id").references(() => juniorConversations.conversationId),
|
|
118
|
+
transcriptPurgedAt: timestamptz("transcript_purged_at"),
|
|
119
|
+
/** Latest session stop. Automated input received before it is dropped. */
|
|
120
|
+
stoppedAt: timestamptz("stopped_at"),
|
|
121
|
+
durationMs: integer("duration_ms").notNull().default(0),
|
|
122
|
+
usage: jsonb("usage_json").$type(),
|
|
123
|
+
executionDurationMs: integer("execution_duration_ms").notNull().default(0),
|
|
124
|
+
executionUsage: jsonb("execution_usage_json").$type(),
|
|
125
|
+
metricRunId: text("metric_run_id"),
|
|
126
|
+
detailVersion: integer("detail_version").notNull().default(0),
|
|
127
|
+
legacyArchivedAt: timestamptz("archived_at")
|
|
128
|
+
}, (table) => [
|
|
129
|
+
index("junior_conversations_last_activity_idx").on(table.lastActivityAt.desc(), table.conversationId),
|
|
130
|
+
index("junior_conversations_active_idx").using("btree", sql`coalesce(${table.executionUpdatedAt}, ${table.updatedAt})`, table.conversationId).where(sql`${table.executionStatus} <> 'idle'`),
|
|
131
|
+
index("junior_conversations_destination_activity_idx").on(table.destinationId, table.lastActivityAt.desc()),
|
|
132
|
+
index("junior_conversations_actor_activity_idx").on(table.actorIdentityId, table.lastActivityAt.desc()),
|
|
133
|
+
index("junior_conversations_parent_idx").on(table.parentConversationId),
|
|
134
|
+
index("junior_conversations_forked_from_idx").on(table.forkedFromConversationId),
|
|
135
|
+
index("junior_conversations_root_idx").on(table.rootConversationId)
|
|
136
|
+
]);
|
|
137
|
+
/** Select runtime conversation fields without reading the legacy archive column. */
|
|
138
|
+
function conversationReadColumns() {
|
|
139
|
+
const { legacyArchivedAt, ...columns } = getTableColumns(juniorConversations);
|
|
140
|
+
return columns;
|
|
141
|
+
}
|
|
33
142
|
// src/db/schema/attachments.ts
|
|
34
143
|
/** Durable metadata for files owned by one conversation. */
|
|
35
144
|
const juniorAttachments = pgTable("junior_attachments", {
|
|
@@ -282,6 +391,40 @@ const juniorConversationReadPositions = pgTable("junior_conversation_read_positi
|
|
|
282
391
|
name: "junior_conversation_read_positions_user_conversation_pk",
|
|
283
392
|
columns: [table.userId, table.conversationId]
|
|
284
393
|
})]);
|
|
394
|
+
// src/db/schema/agent-invocations.ts
|
|
395
|
+
const juniorAgentBindings = pgTable("junior_agent_bindings", {
|
|
396
|
+
parentConversationId: text("parent_conversation_id").notNull().references(() => juniorConversations.conversationId),
|
|
397
|
+
name: text("name").notNull(),
|
|
398
|
+
childConversationId: text("child_conversation_id").notNull().references(() => juniorConversations.conversationId)
|
|
399
|
+
}, (table) => [primaryKey({ columns: [table.parentConversationId, table.name] }), uniqueIndex("junior_agent_bindings_child_idx").on(table.childConversationId)]);
|
|
400
|
+
const juniorAgentInvocations = pgTable("junior_agent_invocations", {
|
|
401
|
+
invocationId: text("invocation_id").primaryKey(),
|
|
402
|
+
parentConversationId: text("parent_conversation_id").notNull().references(() => juniorConversations.conversationId),
|
|
403
|
+
childConversationId: text("child_conversation_id").notNull().references(() => juniorConversations.conversationId),
|
|
404
|
+
agentName: text("agent_name"),
|
|
405
|
+
input: text("input").notNull(),
|
|
406
|
+
title: text("title"),
|
|
407
|
+
actor: jsonb("actor_json").$type().notNull(),
|
|
408
|
+
credentialContext: jsonb("credential_context_json").$type(),
|
|
409
|
+
source: jsonb("source_json").$type().notNull(),
|
|
410
|
+
destination: jsonb("destination_json").$type().notNull(),
|
|
411
|
+
destinationVisibility: text("destination_visibility").$type(),
|
|
412
|
+
agentType: text("agent_type").$type(),
|
|
413
|
+
reasoningLevel: text("reasoning_level").$type(),
|
|
414
|
+
parentToolCallId: text("parent_tool_call_id"),
|
|
415
|
+
status: text("status").$type().notNull(),
|
|
416
|
+
mailboxStatus: text("mailbox_status").$type().notNull(),
|
|
417
|
+
parentMailboxStatus: text("parent_mailbox_status").$type(),
|
|
418
|
+
result: text("result"),
|
|
419
|
+
errorMessage: text("error_message"),
|
|
420
|
+
createdAt: timestamptz("created_at").notNull(),
|
|
421
|
+
updatedAt: timestamptz("updated_at").notNull(),
|
|
422
|
+
terminalAt: timestamptz("terminal_at")
|
|
423
|
+
}, (table) => [
|
|
424
|
+
index("junior_agent_invocations_child_idx").on(table.childConversationId),
|
|
425
|
+
index("junior_agent_invocations_mailbox_idx").on(table.mailboxStatus, table.createdAt),
|
|
426
|
+
index("junior_agent_invocations_parent_mailbox_idx").on(table.parentMailboxStatus, table.terminalAt)
|
|
427
|
+
]);
|
|
285
428
|
// src/db/schema/location-configurations.ts
|
|
286
429
|
/** Durable user configuration entries scoped to provider Locations. */
|
|
287
430
|
const juniorLocationConfigurations = pgTable("junior_location_configurations", {
|
|
@@ -816,4 +959,4 @@ function createJuniorSqlExecutor(args) {
|
|
|
816
959
|
statementTimeoutMs
|
|
817
960
|
});
|
|
818
961
|
}
|
|
819
|
-
export {
|
|
962
|
+
export { juniorIdentities as A, juniorApiTokens as C, juniorAttachments as D, juniorCodeRepositories as E, juniorDestinations as M, juniorArtifacts as N, conversationReadColumns as O, juniorConversationEvents as S, juniorCodeChanges as T, juniorConversationParticipants as _, juniorReviewItemAssignees as a, CONVERSATION_METRICS as b, juniorReviewItems as c, juniorAutomations as d, juniorStats as f, juniorConversationReadPositions as g, juniorAgentInvocations as h, juniorWorkspaces as i, juniorUsers as j, juniorConversations as k, juniorAutomationRuns as l, juniorAgentBindings as m, juniorSnapshots as n, juniorReviewItemConversations as o, juniorLocationConfigurations as p, juniorWorkspaceRepos as r, juniorReviewItemSlackCards as s, createJuniorSqlExecutor as t, juniorAutomationVersions as u, juniorConversationBindings as v, juniorConversationAnnotations as w, juniorConversationMetrics as x, juniorConversationBriefs as y };
|
package/dist/instrumentation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as getClient, c as init, i as getActiveSpan, o as getGlobalScope, p as spanToJSON, s as getTraceData } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { R as getDeploymentServiceVersion, z as getDeploymentTelemetryAttributes } from "./logging-
|
|
3
|
-
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-
|
|
2
|
+
import { R as getDeploymentServiceVersion, z as getDeploymentTelemetryAttributes } from "./logging-DHzrobea.js";
|
|
3
|
+
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-DAgeBGLN.js";
|
|
4
4
|
import { n as redactSandboxEgressProxyPath } from "./proxy-path-BHYoKZdq.js";
|
|
5
5
|
import { t as consumePrivateTraceResultMarker } from "./private-trace-result-CE7_lEdq.js";
|
|
6
6
|
import { n as promoteHttpRouteName, r as routeNameMiddleware, t as nameRequestRoute } from "./sentry-route-name-BhwWnfqj.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as withScope, d as setTag, f as setUser, h as startSpan, i as getActiveSpan, l as logger, n as captureMessage, p as spanToJSON, s as getTraceData, t as captureException } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
2
|
+
import { t as JUNIOR_VERSION } from "./version-D_HFt_Dq.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { styleText } from "node:util";
|
|
5
5
|
import { ConfigError, configureSync, getConfig, getLogger } from "@logtape/logtape";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { Ma as readConversationAccessFromSql, ja as canAccessConversation } from "./projection-
|
|
3
|
-
import { n as botConfig } from "./config-
|
|
4
|
-
import { F as SYSTEM_IDENTITY_ID, S as getDb, x as getConversationStore } from "./viewer-
|
|
5
|
-
import { Ft as toolInvocationDestination, Pt as actorFromRun } from "./agent-runner-
|
|
6
|
-
import { F as findChildAgentConversationId, L as PARENT_AGENT_TARGET, N as AgentMessageTargetError, a as createAgentInvocationForMessage, j as AgentMessagePausedError, s as getActiveAgentInvocationForConversation } from "./store-
|
|
7
|
-
import { D as postAutomatedTurnLimitNoticeForConversation, a as EVENT_WAIT_MS, j as admitAutomatedTurn } from "./session-stop-
|
|
8
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
9
|
-
import { r as enqueueAgentMessageToParent } from "./result-
|
|
10
|
-
import { i as enqueueAgentInvocation } from "./work-
|
|
2
|
+
import { Ma as readConversationAccessFromSql, ja as canAccessConversation } from "./projection-Bhz1tp0G.js";
|
|
3
|
+
import { n as botConfig } from "./config-3AZ11aSM.js";
|
|
4
|
+
import { F as SYSTEM_IDENTITY_ID, S as getDb, x as getConversationStore } from "./viewer-DWlpSFdj.js";
|
|
5
|
+
import { Ft as toolInvocationDestination, Pt as actorFromRun } from "./agent-runner-B229gXUY.js";
|
|
6
|
+
import { F as findChildAgentConversationId, L as PARENT_AGENT_TARGET, N as AgentMessageTargetError, a as createAgentInvocationForMessage, j as AgentMessagePausedError, s as getActiveAgentInvocationForConversation } from "./store-DeTnwVJt.js";
|
|
7
|
+
import { D as postAutomatedTurnLimitNoticeForConversation, a as EVENT_WAIT_MS, j as admitAutomatedTurn } from "./session-stop-CHSYB2uw.js";
|
|
8
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-C4z8gOgZ.js";
|
|
9
|
+
import { r as enqueueAgentMessageToParent } from "./result-BoD0jevy.js";
|
|
10
|
+
import { i as enqueueAgentInvocation } from "./work-pPoqtRea.js";
|
|
11
11
|
// src/chat/agent-invocations/top-level-message.ts
|
|
12
12
|
const AGENT_MESSAGE_EVENT_NAMESPACE = "junior";
|
|
13
13
|
/** Event type of a message from another top-level agent. */
|
package/dist/nitro.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as JuniorDashboardOptions } from "./app-
|
|
1
|
+
import { i as JuniorDashboardOptions } from "./app-BQ9RZS43.js";
|
|
2
2
|
import { n as JuniorPluginSet } from "./plugins-DtmjkTza.js";
|
|
3
3
|
import { withSentryConfig as withSentryConfig$1 } from "@sentry/nitro";
|
|
4
4
|
type SentryNitroConfig = Parameters<typeof withSentryConfig$1>[0];
|
package/dist/nitro.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, D as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, F as JUNIOR_RETENTION_ROUTE, I as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, M as JUNIOR_HEARTBEAT_ROUTE, N as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, P as JUNIOR_RETENTION_CRON_SCHEDULE, R as getDeploymentServiceVersion, j as JUNIOR_HEARTBEAT_CRON_SCHEDULE, k as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE } from "./logging-
|
|
1
|
+
import { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, D as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, F as JUNIOR_RETENTION_ROUTE, I as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, M as JUNIOR_HEARTBEAT_ROUTE, N as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, P as JUNIOR_RETENTION_CRON_SCHEDULE, R as getDeploymentServiceVersion, j as JUNIOR_HEARTBEAT_CRON_SCHEDULE, k as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE } from "./logging-DHzrobea.js";
|
|
2
2
|
import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-DJhGdS4c.js";
|
|
3
|
-
import { a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as resolveConversationWorkQueueTopic } from "./background-compaction-queue-
|
|
3
|
+
import { a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as resolveConversationWorkQueueTopic } from "./background-compaction-queue-oegyrxSe.js";
|
|
4
4
|
import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-HYh_JOdw.js";
|
|
5
|
-
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-
|
|
5
|
+
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-BBos68l0.js";
|
|
6
6
|
import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-Cf5gVPWP.js";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { cpSync, existsSync, mkdirSync, readdirSync, statSync } from "node:fs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { wn as createUserTokenStore } from "./projection-
|
|
2
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
1
|
+
import { wn as createUserTokenStore } from "./projection-Bhz1tp0G.js";
|
|
2
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-Bg8NPuvj.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,6 +1,6 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
2
|
import { randomBytes } from "node:crypto";
|
|
3
|
-
import
|
|
3
|
+
import * as z from "zod";
|
|
4
4
|
import { SignJWT, jwtVerify } from "jose";
|
|
5
5
|
// src/chat/local/oauth-relay.ts
|
|
6
6
|
var oauth_relay_exports = /* @__PURE__ */ __exportAll({
|