@sentry/junior 0.87.0 → 0.89.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/README.md +16 -5
- package/dist/{agent-hooks-NWOUB3UR.js → agent-hooks-RIJ5TSWP.js} +8 -8
- package/dist/api/people/list.d.ts +4 -0
- package/dist/api/people/list.js +83 -0
- package/dist/api/people/list.query.d.ts +4 -0
- package/dist/api/people/profile.d.ts +4 -0
- package/dist/api/people/profile.js +131 -0
- package/dist/api/people/profile.query.d.ts +4 -0
- package/dist/api/people/shared.d.ts +76 -0
- package/dist/api/people/types.d.ts +85 -0
- package/dist/app.js +43 -40
- package/dist/{catalog-runtime-XOD7YPRS.js → catalog-runtime-MW7XERSU.js} +3 -3
- package/dist/chat/conversations/sql/migrations.d.ts +1 -1
- package/dist/chat/conversations/sql/schema/identities.d.ts +54 -3
- package/dist/chat/conversations/sql/schema/users.d.ts +109 -0
- package/dist/chat/conversations/sql/schema.d.ts +164 -3
- package/dist/chat/conversations/sql/store.d.ts +0 -1
- package/dist/chat/identities/identity.d.ts +18 -0
- package/dist/chat/identities/sql.d.ts +4 -0
- package/dist/chat/runtime/processing-reaction.d.ts +2 -1
- package/dist/chat/runtime/slack-resume.d.ts +3 -2
- package/dist/chat/runtime/thread-context.d.ts +3 -1
- package/dist/chat/runtime/turn-user-message.d.ts +2 -1
- package/dist/chat/services/conversation-memory.d.ts +3 -1
- package/dist/chat/slack/message.d.ts +2 -1
- package/dist/chat/slack/outbound.d.ts +5 -4
- package/dist/chat/slack/timestamp.d.ts +6 -0
- package/dist/chat/sql/schema.d.ts +163 -3
- package/dist/chat/tools/slack/context.d.ts +2 -1
- package/dist/{chunk-ENPSU7L7.js → chunk-2DPZRS3B.js} +4 -4
- package/dist/{chunk-6I6HBOQM.js → chunk-4IXHIV37.js} +413 -157
- package/dist/{chunk-JRXCSSSU.js → chunk-6UPQ5GTJ.js} +3 -3
- package/dist/{chunk-64ACM6AP.js → chunk-7ES37H6U.js} +2 -2
- package/dist/{chunk-GGD6WK6V.js → chunk-AHLSXMOU.js} +2 -2
- package/dist/{chunk-2TAIGJPQ.js → chunk-C5NCV3OB.js} +1 -1
- package/dist/{chunk-6O5UI3RG.js → chunk-F22AM3OW.js} +1 -1
- package/dist/{chunk-BRSQQRG6.js → chunk-IATAYWFU.js} +2 -2
- package/dist/{chunk-BQ3ITJA6.js → chunk-KBFQXJL4.js} +2 -2
- package/dist/{chunk-ACJJJEGG.js → chunk-KBSLCOGE.js} +8 -8
- package/dist/{chunk-IXTBFABZ.js → chunk-KQKIA4CU.js} +1 -1
- package/dist/{chunk-B6FQPS7A.js → chunk-NYJLQI42.js} +22 -20
- package/dist/chunk-PBV4ZIVM.js +261 -0
- package/dist/{chunk-ZU2ALUVQ.js → chunk-S35CPNPT.js} +1 -1
- package/dist/{chunk-RIB3M6YA.js → chunk-V6XDCS3X.js} +4 -4
- package/dist/{chunk-KF7522P3.js → chunk-VMBZFPZM.js} +11 -1
- package/dist/{chunk-2NFV5FMB.js → chunk-XS6NLQPA.js} +21 -12
- package/dist/{chunk-GB5DFM4D.js → chunk-YPAE5RH3.js} +1 -1
- package/dist/cli/chat.js +6 -6
- package/dist/cli/check.js +4 -4
- package/dist/cli/init.js +30 -36
- package/dist/cli/plugins.js +11 -11
- package/dist/cli/snapshot-warmup.js +6 -6
- package/dist/cli/upgrade.js +12 -12
- package/dist/{db-SZVUU7RB.js → db-37HOGLI7.js} +5 -5
- package/dist/nitro.js +4 -4
- package/dist/reporting/conversations.d.ts +0 -56
- package/dist/reporting.d.ts +2 -8
- package/dist/reporting.js +14 -290
- package/dist/{runner-DMP3IQNM.js → runner-BCRF2FCI.js} +13 -13
- package/dist/{validation-MBNJKWPQ.js → validation-FMJO3L5P.js} +4 -4
- package/package.json +13 -5
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createPluginLogger,
|
|
3
3
|
createPluginState
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import {
|
|
6
|
-
getDb
|
|
7
|
-
} from "./chunk-6I6HBOQM.js";
|
|
4
|
+
} from "./chunk-IATAYWFU.js";
|
|
8
5
|
import {
|
|
9
6
|
SANDBOX_WORKSPACE_ROOT
|
|
10
7
|
} from "./chunk-G3E7SCME.js";
|
|
8
|
+
import {
|
|
9
|
+
getDb
|
|
10
|
+
} from "./chunk-4IXHIV37.js";
|
|
11
11
|
import {
|
|
12
12
|
isConversationChannel,
|
|
13
13
|
isConversationScopedChannel,
|
|
14
14
|
isDmChannel,
|
|
15
15
|
normalizeSlackConversationId
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-AHLSXMOU.js";
|
|
17
17
|
import {
|
|
18
18
|
botConfig,
|
|
19
19
|
completeObject,
|
|
20
20
|
embedTexts
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-S35CPNPT.js";
|
|
22
22
|
import {
|
|
23
23
|
isActorUserId,
|
|
24
24
|
parseActorUserId
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-KQKIA4CU.js";
|
|
26
26
|
import {
|
|
27
27
|
logInfo,
|
|
28
28
|
logWarn
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-VMBZFPZM.js";
|
|
30
30
|
|
|
31
31
|
// src/chat/plugins/agent-hooks.ts
|
|
32
32
|
import { promptMessageSchema } from "@sentry/junior-plugin-api";
|
|
@@ -68,6 +68,14 @@ function createPluginEmbedder(pluginName, runtime = {}) {
|
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
// src/chat/slack/timestamp.ts
|
|
72
|
+
import { z } from "zod";
|
|
73
|
+
var slackMessageTsSchema = z.string().trim().regex(/^\d+(?:\.\d+)?$/).brand();
|
|
74
|
+
function parseSlackMessageTs(value) {
|
|
75
|
+
const parsed = slackMessageTsSchema.safeParse(value);
|
|
76
|
+
return parsed.success ? parsed.data : void 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
71
79
|
// src/chat/tools/slack/context.ts
|
|
72
80
|
function getSlackToolContext(context) {
|
|
73
81
|
if (context.source.platform !== "slack") {
|
|
@@ -81,7 +89,7 @@ function getSlackToolContext(context) {
|
|
|
81
89
|
source: context.source,
|
|
82
90
|
requester: context.requester?.platform === "slack" ? context.requester : void 0,
|
|
83
91
|
destinationChannelId: context.destination.channelId,
|
|
84
|
-
messageTs: context.source.messageTs,
|
|
92
|
+
messageTs: parseSlackMessageTs(context.source.messageTs),
|
|
85
93
|
sourceChannelId: context.source.channelId,
|
|
86
94
|
teamId: context.source.teamId,
|
|
87
95
|
threadTs: context.source.threadTs
|
|
@@ -191,7 +199,7 @@ function resolveChannelCapabilities(channelId) {
|
|
|
191
199
|
}
|
|
192
200
|
|
|
193
201
|
// src/chat/plugins/agent-hooks.ts
|
|
194
|
-
import { z } from "zod";
|
|
202
|
+
import { z as z2 } from "zod";
|
|
195
203
|
var PluginHookDeniedError = class extends Error {
|
|
196
204
|
constructor(message) {
|
|
197
205
|
super(message);
|
|
@@ -218,8 +226,8 @@ var PLUGIN_ROUTE_METHODS = /* @__PURE__ */ new Set([
|
|
|
218
226
|
"ALL"
|
|
219
227
|
]);
|
|
220
228
|
var PLUGIN_PROMPT_CONTRIBUTION_TOTAL_MAX_CHARS = 16e3;
|
|
221
|
-
var systemPromptMessageArraySchema =
|
|
222
|
-
var userPromptMessageArraySchema =
|
|
229
|
+
var systemPromptMessageArraySchema = z2.array(promptMessageSchema);
|
|
230
|
+
var userPromptMessageArraySchema = z2.array(promptMessageSchema);
|
|
223
231
|
function isRecord(value) {
|
|
224
232
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
225
233
|
}
|
|
@@ -984,6 +992,7 @@ function createPluginHookRunner(input = {}) {
|
|
|
984
992
|
export {
|
|
985
993
|
createPluginModel,
|
|
986
994
|
createPluginEmbedder,
|
|
995
|
+
parseSlackMessageTs,
|
|
987
996
|
getSlackToolContext,
|
|
988
997
|
bindSlackDirectCredentialSubject,
|
|
989
998
|
verifySlackDirectCredentialSubject,
|
package/dist/cli/chat.js
CHANGED
|
@@ -130,10 +130,10 @@ async function configureLocalChatPlugins(pluginSet) {
|
|
|
130
130
|
databaseModule
|
|
131
131
|
] = await Promise.all([
|
|
132
132
|
import("../plugins-PZMDS7AT.js"),
|
|
133
|
-
import("../agent-hooks-
|
|
134
|
-
import("../catalog-runtime-
|
|
135
|
-
import("../validation-
|
|
136
|
-
import("../db-
|
|
133
|
+
import("../agent-hooks-RIJ5TSWP.js"),
|
|
134
|
+
import("../catalog-runtime-MW7XERSU.js"),
|
|
135
|
+
import("../validation-FMJO3L5P.js"),
|
|
136
|
+
import("../db-37HOGLI7.js")
|
|
137
137
|
]);
|
|
138
138
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
139
139
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -195,7 +195,7 @@ async function runPrompt(options, io, pluginSet) {
|
|
|
195
195
|
defaultStateAdapterForLocalChat();
|
|
196
196
|
await configureLocalChatPlugins(pluginSet);
|
|
197
197
|
const conversationId = newRunConversationId();
|
|
198
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
198
|
+
const { runLocalAgentTurn } = await import("../runner-BCRF2FCI.js");
|
|
199
199
|
const result = await runLocalAgentTurn(
|
|
200
200
|
{
|
|
201
201
|
conversationId,
|
|
@@ -219,7 +219,7 @@ async function runInteractive(io, pluginSet) {
|
|
|
219
219
|
defaultStateAdapterForLocalChat();
|
|
220
220
|
await configureLocalChatPlugins(pluginSet);
|
|
221
221
|
const conversationId = newRunConversationId();
|
|
222
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
222
|
+
const { runLocalAgentTurn } = await import("../runner-BCRF2FCI.js");
|
|
223
223
|
const rl = readline.createInterface({
|
|
224
224
|
input: io.input,
|
|
225
225
|
output: io.output,
|
package/dist/cli/check.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseSkillFile
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-7ES37H6U.js";
|
|
4
4
|
import {
|
|
5
5
|
parseInlinePluginManifest,
|
|
6
6
|
parsePluginManifest
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-KBFQXJL4.js";
|
|
8
|
+
import "../chunk-KQKIA4CU.js";
|
|
9
9
|
import "../chunk-6APU57E6.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-VMBZFPZM.js";
|
|
11
11
|
import {
|
|
12
12
|
JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE,
|
|
13
13
|
JUNIOR_HEARTBEAT_ROUTE,
|
package/dist/cli/init.js
CHANGED
|
@@ -9,28 +9,20 @@ import path from "path";
|
|
|
9
9
|
function writeServerEntry(targetDir) {
|
|
10
10
|
fs.writeFileSync(
|
|
11
11
|
path.join(targetDir, "server.ts"),
|
|
12
|
-
`import {
|
|
13
|
-
initSentry
|
|
12
|
+
`import { createApp } from "@sentry/junior";
|
|
13
|
+
import { initSentry } from "@sentry/junior/instrumentation";
|
|
14
|
+
import { plugins } from "./plugins.ts";
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
initSentry();
|
|
16
17
|
|
|
17
|
-
const app = await createApp(
|
|
18
|
+
const app = await createApp({
|
|
19
|
+
plugins,
|
|
20
|
+
});
|
|
18
21
|
|
|
19
22
|
export default app;
|
|
20
23
|
`
|
|
21
24
|
);
|
|
22
25
|
}
|
|
23
|
-
function writeQueueConsumerEntry(targetDir) {
|
|
24
|
-
const queueConsumerDir = path.join(targetDir, "api", "internal", "agent");
|
|
25
|
-
fs.mkdirSync(queueConsumerDir, { recursive: true });
|
|
26
|
-
fs.writeFileSync(
|
|
27
|
-
path.join(queueConsumerDir, "continue.ts"),
|
|
28
|
-
`import app from "../../../server.ts";
|
|
29
|
-
|
|
30
|
-
export const POST = (request: Request) => app.fetch(request);
|
|
31
|
-
`
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
26
|
function writePluginsFile(targetDir) {
|
|
35
27
|
fs.writeFileSync(
|
|
36
28
|
path.join(targetDir, "plugins.ts"),
|
|
@@ -64,18 +56,17 @@ export default defineConfig({
|
|
|
64
56
|
`
|
|
65
57
|
);
|
|
66
58
|
}
|
|
67
|
-
function
|
|
59
|
+
function writeTsConfig(targetDir) {
|
|
68
60
|
fs.writeFileSync(
|
|
69
|
-
path.join(targetDir, "
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
});
|
|
61
|
+
path.join(targetDir, "tsconfig.json"),
|
|
62
|
+
`${JSON.stringify(
|
|
63
|
+
{
|
|
64
|
+
extends: "nitro/tsconfig",
|
|
65
|
+
compilerOptions: {}
|
|
66
|
+
},
|
|
67
|
+
null,
|
|
68
|
+
2
|
|
69
|
+
)}
|
|
79
70
|
`
|
|
80
71
|
);
|
|
81
72
|
}
|
|
@@ -110,7 +101,7 @@ jobs:
|
|
|
110
101
|
with:
|
|
111
102
|
node-version: 24
|
|
112
103
|
cache: pnpm
|
|
113
|
-
- run: pnpm install
|
|
104
|
+
- run: pnpm install
|
|
114
105
|
- run: pnpm check
|
|
115
106
|
- run: pnpm build
|
|
116
107
|
`
|
|
@@ -140,21 +131,23 @@ async function runInit(dir, log = console.log) {
|
|
|
140
131
|
private: true,
|
|
141
132
|
type: "module",
|
|
142
133
|
scripts: {
|
|
143
|
-
dev: "
|
|
134
|
+
dev: "nitro dev",
|
|
144
135
|
check: "junior check",
|
|
145
|
-
build: "junior snapshot create &&
|
|
136
|
+
build: "junior snapshot create && nitro build",
|
|
137
|
+
preview: "nitro preview",
|
|
138
|
+
typecheck: "tsc --noEmit"
|
|
146
139
|
},
|
|
147
140
|
dependencies: {
|
|
148
141
|
"@sentry/junior": "latest",
|
|
149
142
|
"@sentry/junior-memory": "latest",
|
|
150
143
|
"@sentry/junior-maintenance": "latest",
|
|
151
|
-
hono: "^4.12.
|
|
144
|
+
hono: "^4.12.22"
|
|
152
145
|
},
|
|
153
146
|
devDependencies: {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
147
|
+
"@types/node": "^25.9.1",
|
|
148
|
+
jiti: "^2.7.0",
|
|
149
|
+
nitro: "3.0.260522-beta",
|
|
150
|
+
typescript: "^6.0.3"
|
|
158
151
|
}
|
|
159
152
|
};
|
|
160
153
|
fs.writeFileSync(
|
|
@@ -213,6 +206,8 @@ AI_EMBEDDING_MODEL=
|
|
|
213
206
|
MEMORY_RECALL_MAX_VECTOR_DISTANCE=
|
|
214
207
|
AI_VISION_MODEL=
|
|
215
208
|
AI_WEB_SEARCH_MODEL=
|
|
209
|
+
DATABASE_URL=
|
|
210
|
+
JUNIOR_DATABASE_DRIVER=
|
|
216
211
|
REDIS_URL=
|
|
217
212
|
CRON_SECRET=
|
|
218
213
|
SENTRY_DSN=
|
|
@@ -220,10 +215,9 @@ SENTRY_ORG_SLUG=
|
|
|
220
215
|
`
|
|
221
216
|
);
|
|
222
217
|
writeServerEntry(target);
|
|
223
|
-
writeQueueConsumerEntry(target);
|
|
224
218
|
writePluginsFile(target);
|
|
225
219
|
writeNitroConfig(target);
|
|
226
|
-
|
|
220
|
+
writeTsConfig(target);
|
|
227
221
|
writeVercelJson(target);
|
|
228
222
|
writeGitHubWorkflow(target);
|
|
229
223
|
log(`Created ${name} at ${target}`);
|
package/dist/cli/plugins.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
validatePluginEgressCredentialHooks,
|
|
3
3
|
validatePluginRegistrations
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-C5NCV3OB.js";
|
|
5
5
|
import {
|
|
6
6
|
pluginCatalogConfigFromPluginSet,
|
|
7
7
|
pluginCliRegistrationsFromPluginSet,
|
|
@@ -10,27 +10,27 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
setPlugins,
|
|
12
12
|
validatePlugins
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-XS6NLQPA.js";
|
|
14
14
|
import {
|
|
15
15
|
createPluginLogger
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-IATAYWFU.js";
|
|
17
|
+
import "../chunk-G3E7SCME.js";
|
|
18
|
+
import "../chunk-YPAE5RH3.js";
|
|
17
19
|
import {
|
|
18
20
|
getDb
|
|
19
|
-
} from "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-GGD6WK6V.js";
|
|
23
|
-
import "../chunk-ZU2ALUVQ.js";
|
|
21
|
+
} from "../chunk-4IXHIV37.js";
|
|
22
|
+
import "../chunk-AHLSXMOU.js";
|
|
23
|
+
import "../chunk-S35CPNPT.js";
|
|
24
24
|
import "../chunk-L7OHKDOX.js";
|
|
25
25
|
import {
|
|
26
26
|
loadAppPluginSet
|
|
27
27
|
} from "../chunk-Y2CM7HXH.js";
|
|
28
28
|
import {
|
|
29
29
|
pluginCatalogRuntime
|
|
30
|
-
} from "../chunk-
|
|
31
|
-
import "../chunk-
|
|
30
|
+
} from "../chunk-KBFQXJL4.js";
|
|
31
|
+
import "../chunk-KQKIA4CU.js";
|
|
32
32
|
import "../chunk-6APU57E6.js";
|
|
33
|
-
import "../chunk-
|
|
33
|
+
import "../chunk-VMBZFPZM.js";
|
|
34
34
|
import "../chunk-FTMXFBDC.js";
|
|
35
35
|
import "../chunk-3DA7X2U3.js";
|
|
36
36
|
import "../chunk-MLKGABMK.js";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveRuntimeDependencySnapshot
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-V6XDCS3X.js";
|
|
4
4
|
import "../chunk-G3E7SCME.js";
|
|
5
5
|
import {
|
|
6
6
|
disconnectStateAdapter
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-YPAE5RH3.js";
|
|
8
|
+
import "../chunk-S35CPNPT.js";
|
|
9
9
|
import "../chunk-L7OHKDOX.js";
|
|
10
10
|
import {
|
|
11
11
|
pluginCatalogRuntime
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-KBFQXJL4.js";
|
|
13
|
+
import "../chunk-KQKIA4CU.js";
|
|
14
14
|
import "../chunk-6APU57E6.js";
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-VMBZFPZM.js";
|
|
16
16
|
import "../chunk-FTMXFBDC.js";
|
|
17
17
|
import "../chunk-3DA7X2U3.js";
|
|
18
18
|
import "../chunk-MLKGABMK.js";
|
package/dist/cli/upgrade.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
recordConversationActivity,
|
|
5
5
|
recordConversationExecution,
|
|
6
6
|
requestConversationWork
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-2DPZRS3B.js";
|
|
8
8
|
import {
|
|
9
9
|
JUNIOR_THREAD_STATE_TTL_MS,
|
|
10
10
|
coerceThreadConversationState
|
|
@@ -18,33 +18,33 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
createPluginLogger,
|
|
20
20
|
createPluginState
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-IATAYWFU.js";
|
|
22
|
+
import {
|
|
23
|
+
disconnectStateAdapter,
|
|
24
|
+
getConnectedStateContext
|
|
25
|
+
} from "../chunk-YPAE5RH3.js";
|
|
22
26
|
import {
|
|
23
27
|
createJuniorSqlExecutor,
|
|
24
28
|
createSqlStore,
|
|
25
29
|
getDb
|
|
26
|
-
} from "../chunk-
|
|
27
|
-
import {
|
|
28
|
-
disconnectStateAdapter,
|
|
29
|
-
getConnectedStateContext
|
|
30
|
-
} from "../chunk-GB5DFM4D.js";
|
|
30
|
+
} from "../chunk-4IXHIV37.js";
|
|
31
31
|
import {
|
|
32
32
|
parseDestination,
|
|
33
33
|
sameDestination
|
|
34
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-AHLSXMOU.js";
|
|
35
35
|
import {
|
|
36
36
|
getChatConfig
|
|
37
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-S35CPNPT.js";
|
|
38
38
|
import "../chunk-L7OHKDOX.js";
|
|
39
39
|
import {
|
|
40
40
|
loadAppPluginSet
|
|
41
41
|
} from "../chunk-Y2CM7HXH.js";
|
|
42
42
|
import {
|
|
43
43
|
pluginCatalogRuntime
|
|
44
|
-
} from "../chunk-
|
|
45
|
-
import "../chunk-
|
|
44
|
+
} from "../chunk-KBFQXJL4.js";
|
|
45
|
+
import "../chunk-KQKIA4CU.js";
|
|
46
46
|
import "../chunk-6APU57E6.js";
|
|
47
|
-
import "../chunk-
|
|
47
|
+
import "../chunk-VMBZFPZM.js";
|
|
48
48
|
import {
|
|
49
49
|
isRecord,
|
|
50
50
|
toOptionalNumber,
|
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
closeDb,
|
|
3
3
|
getConversationStore,
|
|
4
4
|
getDb
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-4IXHIV37.js";
|
|
6
|
+
import "./chunk-AHLSXMOU.js";
|
|
7
|
+
import "./chunk-S35CPNPT.js";
|
|
8
8
|
import "./chunk-L7OHKDOX.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-KQKIA4CU.js";
|
|
10
|
+
import "./chunk-VMBZFPZM.js";
|
|
11
11
|
import "./chunk-FTMXFBDC.js";
|
|
12
12
|
import "./chunk-3DA7X2U3.js";
|
|
13
13
|
import "./chunk-MLKGABMK.js";
|
package/dist/nitro.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveConversationWorkQueueTopic
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-F22AM3OW.js";
|
|
4
4
|
import {
|
|
5
5
|
PLUGIN_TASK_QUEUE_TOPIC
|
|
6
6
|
} from "./chunk-KNFROR7R.js";
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
pluginCatalogConfigFromPluginSet,
|
|
9
9
|
pluginRuntimeRegistrationsFromPluginSet
|
|
10
10
|
} from "./chunk-SG5WAA7H.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-AHLSXMOU.js";
|
|
12
|
+
import "./chunk-S35CPNPT.js";
|
|
13
13
|
import "./chunk-L7OHKDOX.js";
|
|
14
14
|
import {
|
|
15
15
|
loadPluginSetFromModule,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
isValidPackageName,
|
|
21
21
|
resolvePackageDir
|
|
22
22
|
} from "./chunk-6APU57E6.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-VMBZFPZM.js";
|
|
24
24
|
import {
|
|
25
25
|
JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE,
|
|
26
26
|
JUNIOR_HEARTBEAT_CRON_SCHEDULE,
|
|
@@ -164,62 +164,6 @@ export interface ConversationStatsReport {
|
|
|
164
164
|
windowEnd: string;
|
|
165
165
|
windowStart: string;
|
|
166
166
|
}
|
|
167
|
-
export interface RequesterActivityDayReport {
|
|
168
|
-
active: number;
|
|
169
|
-
conversations: number;
|
|
170
|
-
date: string;
|
|
171
|
-
durationMs: number;
|
|
172
|
-
failed: number;
|
|
173
|
-
hung: number;
|
|
174
|
-
runs: number;
|
|
175
|
-
tokens?: number;
|
|
176
|
-
}
|
|
177
|
-
export interface RequesterTotalsReport {
|
|
178
|
-
active: number;
|
|
179
|
-
activeDays: number;
|
|
180
|
-
conversations: number;
|
|
181
|
-
durationMs: number;
|
|
182
|
-
failed: number;
|
|
183
|
-
hung: number;
|
|
184
|
-
runs: number;
|
|
185
|
-
tokens?: number;
|
|
186
|
-
}
|
|
187
|
-
export interface RequesterSummaryReport extends RequesterTotalsReport {
|
|
188
|
-
firstSeenAt: string;
|
|
189
|
-
lastSeenAt: string;
|
|
190
|
-
requester: RequesterIdentity & {
|
|
191
|
-
email: string;
|
|
192
|
-
};
|
|
193
|
-
}
|
|
194
|
-
export interface RequesterDirectoryReport {
|
|
195
|
-
generatedAt: string;
|
|
196
|
-
people: RequesterSummaryReport[];
|
|
197
|
-
sampleLimit: number;
|
|
198
|
-
sampleSize: number;
|
|
199
|
-
source: "conversation_index";
|
|
200
|
-
truncated: boolean;
|
|
201
|
-
}
|
|
202
|
-
export interface RequesterProfileReport {
|
|
203
|
-
activityDays: RequesterActivityDayReport[];
|
|
204
|
-
generatedAt: string;
|
|
205
|
-
locations: ConversationStatsItem[];
|
|
206
|
-
recentConversations: ConversationSummaryReport[];
|
|
207
|
-
requester: RequesterIdentity & {
|
|
208
|
-
email: string;
|
|
209
|
-
};
|
|
210
|
-
sampleLimit: number;
|
|
211
|
-
sampleSize: number;
|
|
212
|
-
source: "conversation_index";
|
|
213
|
-
surfaces: ConversationStatsItem[];
|
|
214
|
-
totals: RequesterTotalsReport;
|
|
215
|
-
truncated: boolean;
|
|
216
|
-
windowEnd: string;
|
|
217
|
-
windowStart: string;
|
|
218
|
-
}
|
|
219
|
-
/** Read the requester directory from durable conversation metadata. */
|
|
220
|
-
export declare function readRequesterDirectoryReport(options?: ConversationReaderOptions): Promise<RequesterDirectoryReport>;
|
|
221
|
-
/** Read one requester profile without exposing transcript payloads. */
|
|
222
|
-
export declare function readRequesterProfileReport(email: string, options?: ConversationReaderOptions): Promise<RequesterProfileReport>;
|
|
223
167
|
/** Read the recent conversation feed for reporting consumers. */
|
|
224
168
|
export declare function readConversationFeed(options?: ConversationReaderOptions): Promise<ConversationFeed>;
|
|
225
169
|
/** Read aggregate conversation statistics for reporting consumers. */
|
package/dist/reporting.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PluginOperationalReport } from "@sentry/junior-plugin-api";
|
|
2
|
-
import { type ConversationFeed, type PluginConversationSummary, type ConversationReport, type ConversationSubagentTranscriptReport, type ConversationStatsReport
|
|
3
|
-
export type { PluginConversationStatus, PluginConversations, PluginConversationSummary, ConversationActivityReport, ConversationActivityStatus, ConversationFeed, ConversationReport, ConversationReportStatus, ConversationRunReport, ConversationSubagentActivityReport, ConversationSubagentTranscriptReport, ConversationStatsItem, ConversationStatsReport, ConversationSummaryReport, ConversationSurface, ConversationToolActivityReport, ConversationUsage,
|
|
2
|
+
import { type ConversationFeed, type PluginConversationSummary, type ConversationReport, type ConversationSubagentTranscriptReport, type ConversationStatsReport } from "./reporting/conversations";
|
|
3
|
+
export type { PluginConversationStatus, PluginConversations, PluginConversationSummary, ConversationActivityReport, ConversationActivityStatus, ConversationFeed, ConversationReport, ConversationReportStatus, ConversationRunReport, ConversationSubagentActivityReport, ConversationSubagentTranscriptReport, ConversationStatsItem, ConversationStatsReport, ConversationSummaryReport, ConversationSurface, ConversationToolActivityReport, ConversationUsage, RequesterIdentity, TranscriptMessage, TranscriptPart, TranscriptPartType, TranscriptRole, } from "./reporting/conversations";
|
|
4
4
|
export interface HealthReport {
|
|
5
5
|
status: "ok";
|
|
6
6
|
service: string;
|
|
@@ -53,10 +53,6 @@ export interface JuniorReporting {
|
|
|
53
53
|
listConversations(): Promise<ConversationFeed>;
|
|
54
54
|
/** Read aggregate conversation stats for reporting consumers. */
|
|
55
55
|
getConversationStats?(): Promise<ConversationStatsReport>;
|
|
56
|
-
/** List requester profiles derived from trusted conversation requester emails. */
|
|
57
|
-
listRequesters?(): Promise<RequesterDirectoryReport>;
|
|
58
|
-
/** Read one requester profile derived from trusted conversation requester emails. */
|
|
59
|
-
getRequesterProfile?(email: string): Promise<RequesterProfileReport>;
|
|
60
56
|
/** Read recent conversation summaries without transcript payloads. */
|
|
61
57
|
listRecentConversations?(options?: {
|
|
62
58
|
limit?: number;
|
|
@@ -77,8 +73,6 @@ export interface JuniorReporting {
|
|
|
77
73
|
/** Create the read-only reporting boundary used by plugins and other consumers. */
|
|
78
74
|
export declare function createJuniorReporting(): JuniorReporting & {
|
|
79
75
|
getConversationStats(): Promise<ConversationStatsReport>;
|
|
80
|
-
listRequesters(): Promise<RequesterDirectoryReport>;
|
|
81
|
-
getRequesterProfile(email: string): Promise<RequesterProfileReport>;
|
|
82
76
|
listRecentConversations(options?: {
|
|
83
77
|
limit?: number;
|
|
84
78
|
}): Promise<PluginConversationSummary[]>;
|