@sentry/junior 0.108.0 → 0.110.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/{agent-hooks-NU5HK3PS.js → agent-hooks-ELT4ODFF.js} +12 -13
- package/dist/api/conversations/access.d.ts +9 -0
- package/dist/api/conversations/aggregate.d.ts +12 -1
- package/dist/api/conversations/archive.d.ts +3 -5
- package/dist/api/conversations/detail.d.ts +156 -7
- package/dist/api/conversations/events.d.ts +2 -2
- package/dist/api/conversations/list.d.ts +57 -6
- package/dist/api/conversations/projection.d.ts +6 -7
- package/dist/api/conversations/reporting.d.ts +10 -4
- package/dist/api/conversations/routes.d.ts +2 -1
- package/dist/api/conversations/shared.d.ts +1 -1
- package/dist/api/conversations/stats.d.ts +37 -6
- package/dist/api/conversations/stats.query.d.ts +1 -1
- package/dist/api/conversations/usage.d.ts +9 -0
- package/dist/api/http.d.ts +7 -0
- package/dist/api/locations/detail.d.ts +102 -6
- package/dist/api/locations/list.d.ts +43 -5
- package/dist/api/locations/query.d.ts +4 -2
- package/dist/api/locations/routes.d.ts +2 -1
- package/dist/api/people/list.d.ts +28 -6
- package/dist/api/people/list.query.d.ts +1 -1
- package/dist/api/people/profile.d.ts +96 -7
- package/dist/api/people/profile.query.d.ts +4 -2
- package/dist/api/people/routes.d.ts +2 -1
- package/dist/api/people/shared.d.ts +1219 -2
- package/dist/api/route.d.ts +18 -4
- package/dist/api/schema/common.d.ts +6 -0
- package/dist/api/{conversations/schema.d.ts → schema/conversation.d.ts} +88 -9
- package/dist/api/{locations/schema.d.ts → schema/location.d.ts} +5 -0
- package/dist/api/{people/schema.d.ts → schema/person.d.ts} +37 -45
- package/dist/api/schema.d.ts +8 -22
- package/dist/api/schema.js +10 -2
- package/dist/api.d.ts +5 -1
- package/dist/api.js +838 -369
- package/dist/app.d.ts +1 -0
- package/dist/app.js +1564 -486
- package/dist/catalog-runtime-4GI22PXK.js +16 -0
- package/dist/chat/agent/resume.d.ts +11 -12
- package/dist/chat/conversations/history.d.ts +3 -0
- package/dist/chat/conversations/sql/privacy.d.ts +3 -15
- package/dist/chat/conversations/sql/store.d.ts +0 -7
- package/dist/chat/log-context.d.ts +40 -0
- package/dist/chat/logging.d.ts +3 -26
- package/dist/chat/pi/messages.d.ts +2 -2
- package/dist/chat/pi/sql-model-usage.d.ts +4 -1
- package/dist/chat/runtime/slack-resume.d.ts +2 -2
- package/dist/chat/services/auth-pause.d.ts +4 -0
- package/dist/chat/services/context-compaction.d.ts +1 -0
- package/dist/chat/services/turn-session-record.d.ts +0 -2
- package/dist/chat/slack/reply.d.ts +7 -19
- package/dist/chat/state/conversation.d.ts +1 -0
- package/dist/chat/task-execution/queue-signing.d.ts +10 -8
- package/dist/chat/task-execution/queue.d.ts +9 -7
- package/dist/chat/task-execution/slack-work.d.ts +6 -6
- package/dist/{chunk-UD6THJ2I.js → chunk-2T7TIEXI.js} +197 -12
- package/dist/{chunk-CEA3A3UA.js → chunk-2ZTTXTSZ.js} +24 -1
- package/dist/{chunk-XKB7LGIW.js → chunk-3S7YYHBI.js} +3 -139
- package/dist/chunk-3TV7OEHL.js +10 -0
- package/dist/{chunk-A5CO2EHL.js → chunk-3UBQI73J.js} +11 -15
- package/dist/{chunk-7FBGKXPE.js → chunk-42WRQLJ6.js} +10 -33
- package/dist/{chunk-TE4QHJH4.js → chunk-4QU44P7Q.js} +135 -595
- package/dist/{chunk-RT5BUHR5.js → chunk-6Y5L4BOM.js} +3 -5
- package/dist/{chunk-VIXFG2VC.js → chunk-C4MZ3GP5.js} +1 -2
- package/dist/{chunk-3RGQLX2F.js → chunk-C5XAFTHY.js} +1011 -29
- package/dist/{chunk-PUAMO4PI.js → chunk-FPK7XY3F.js} +139 -99
- package/dist/{chunk-H3QYZL7K.js → chunk-GK47NBDE.js} +28 -3
- package/dist/{chunk-O24R4DCK.js → chunk-IYKPU7H6.js} +94 -56
- package/dist/chunk-JQFJO5WH.js +477 -0
- package/dist/{chunk-VH6KWKG2.js → chunk-L5XQPJ7T.js} +3 -3
- package/dist/{chunk-2XXEKR44.js → chunk-MIAKQNYX.js} +43 -31
- package/dist/{chunk-KPMPQ6AA.js → chunk-RHHRKSPI.js} +249 -223
- package/dist/{chunk-YT72TOEK.js → chunk-SBOBTS27.js} +2 -2
- package/dist/{chunk-B5I5LMSP.js → chunk-W6RJZG7F.js} +5 -7
- package/dist/chunk-W75ZPAGG.js +44 -0
- package/dist/{chunk-SS67LUOK.js → chunk-WNOVRQ67.js} +6 -7
- package/dist/{chunk-YIPD3L6L.js → chunk-Y3H2DN6F.js} +8 -10
- package/dist/{chunk-DY7TRYB5.js → chunk-Y5FK3CNG.js} +1 -1
- package/dist/chunk-ZKIOWEFL.js +125 -0
- package/dist/cli/chat.js +23 -24
- package/dist/cli/check.js +9 -7
- package/dist/cli/plugins.js +16 -17
- package/dist/cli/snapshot-warmup.js +11 -10
- package/dist/cli/upgrade.js +314 -3505
- package/dist/db/db.d.ts +1 -1
- package/dist/db/schema/conversations.d.ts +17 -0
- package/dist/db/schema.d.ts +17 -0
- package/dist/{db-AMRBAT5D.js → db-Y6W6CWWW.js} +8 -7
- package/dist/instrumentation.js +4 -3
- package/dist/nitro.js +4 -4
- package/dist/reporting-schema.d.ts +46 -0
- package/dist/{runner-TQH5GAJ4.js → runner-BBFV5GLR.js} +17 -21
- package/dist/{skills-ITNHBARB.js → skills-AR4AF32L.js} +8 -6
- package/dist/{validation-AGQ46ZGV.js → validation-FBIEPTC2.js} +8 -6
- package/dist/version.d.ts +2 -0
- package/dist/version.js +7 -0
- package/migrations/0006_drop_legacy_conversation_messages.sql +1 -0
- package/migrations/0007_thick_sugar_man.sql +23 -0
- package/migrations/README.md +12 -9
- package/migrations/meta/0006_snapshot.json +948 -0
- package/migrations/meta/0007_snapshot.json +1013 -0
- package/migrations/meta/_journal.json +14 -0
- package/package.json +9 -5
- package/dist/catalog-runtime-FOFNPR3P.js +0 -14
- package/dist/chunk-AHJR2IFF.js +0 -115
- package/dist/chunk-B7PUBQQM.js +0 -53
- package/dist/chunk-G3E7SCME.js +0 -28
- package/dist/chunk-J3B3FPP2.js +0 -1061
- package/dist/chunk-OB42YVAE.js +0 -16
- package/dist/chunk-TWINAEZQ.js +0 -1283
|
@@ -43,6 +43,20 @@
|
|
|
43
43
|
"when": 1784137322421,
|
|
44
44
|
"tag": "0005_conversation_events",
|
|
45
45
|
"breakpoints": true
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"idx": 6,
|
|
49
|
+
"version": "7",
|
|
50
|
+
"when": 1784780915306,
|
|
51
|
+
"tag": "0006_drop_legacy_conversation_messages",
|
|
52
|
+
"breakpoints": true
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"idx": 7,
|
|
56
|
+
"version": "7",
|
|
57
|
+
"when": 1784783172749,
|
|
58
|
+
"tag": "0007_thick_sugar_man",
|
|
59
|
+
"breakpoints": true
|
|
46
60
|
}
|
|
47
61
|
]
|
|
48
62
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.110.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -39,6 +39,10 @@
|
|
|
39
39
|
"./vercel": {
|
|
40
40
|
"types": "./dist/vercel.d.ts",
|
|
41
41
|
"default": "./dist/vercel.js"
|
|
42
|
+
},
|
|
43
|
+
"./version": {
|
|
44
|
+
"types": "./dist/version.d.ts",
|
|
45
|
+
"default": "./dist/version.js"
|
|
42
46
|
}
|
|
43
47
|
},
|
|
44
48
|
"files": [
|
|
@@ -75,7 +79,7 @@
|
|
|
75
79
|
"pg": "^8.16.3",
|
|
76
80
|
"yaml": "^2.9.0",
|
|
77
81
|
"zod": "^4.4.3",
|
|
78
|
-
"@sentry/junior-plugin-api": "0.
|
|
82
|
+
"@sentry/junior-plugin-api": "0.110.0"
|
|
79
83
|
},
|
|
80
84
|
"devDependencies": {
|
|
81
85
|
"@emnapi/core": "^1.10.0",
|
|
@@ -92,10 +96,10 @@
|
|
|
92
96
|
"typescript": "^6.0.3",
|
|
93
97
|
"vercel": "^54.4.0",
|
|
94
98
|
"vitest": "^4.1.7",
|
|
95
|
-
"@sentry/junior-
|
|
96
|
-
"@sentry/junior-
|
|
99
|
+
"@sentry/junior-github": "0.110.0",
|
|
100
|
+
"@sentry/junior-scheduler": "0.110.0",
|
|
97
101
|
"@sentry/junior-testing": "0.0.0",
|
|
98
|
-
"@sentry/junior-
|
|
102
|
+
"@sentry/junior-memory": "0.110.0"
|
|
99
103
|
},
|
|
100
104
|
"scripts": {
|
|
101
105
|
"build": "tsup && tsc -p tsconfig.build.json --emitDeclarationOnly",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
pluginCatalogRuntime
|
|
3
|
-
} from "./chunk-YIPD3L6L.js";
|
|
4
|
-
import "./chunk-VIXFG2VC.js";
|
|
5
|
-
import "./chunk-O24R4DCK.js";
|
|
6
|
-
import "./chunk-OB42YVAE.js";
|
|
7
|
-
import "./chunk-6GWA276C.js";
|
|
8
|
-
import "./chunk-B3IT5END.js";
|
|
9
|
-
import "./chunk-7FBGKXPE.js";
|
|
10
|
-
import "./chunk-3V7OFJZC.js";
|
|
11
|
-
import "./chunk-MLKGABMK.js";
|
|
12
|
-
export {
|
|
13
|
-
pluginCatalogRuntime
|
|
14
|
-
};
|
package/dist/chunk-AHJR2IFF.js
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getStateAdapter
|
|
3
|
-
} from "./chunk-H3QYZL7K.js";
|
|
4
|
-
import {
|
|
5
|
-
logException,
|
|
6
|
-
logInfo,
|
|
7
|
-
logWarn
|
|
8
|
-
} from "./chunk-O24R4DCK.js";
|
|
9
|
-
|
|
10
|
-
// src/chat/plugins/logging.ts
|
|
11
|
-
function createPluginLogger(plugin) {
|
|
12
|
-
return {
|
|
13
|
-
info(message, metadata) {
|
|
14
|
-
logInfo(
|
|
15
|
-
"agent_plugin_log_info",
|
|
16
|
-
{},
|
|
17
|
-
{ "app.plugin.name": plugin, ...metadata },
|
|
18
|
-
message
|
|
19
|
-
);
|
|
20
|
-
},
|
|
21
|
-
warn(message, metadata) {
|
|
22
|
-
logWarn(
|
|
23
|
-
"agent_plugin_log_warn",
|
|
24
|
-
{},
|
|
25
|
-
{ "app.plugin.name": plugin, ...metadata },
|
|
26
|
-
message
|
|
27
|
-
);
|
|
28
|
-
},
|
|
29
|
-
error(message, metadata) {
|
|
30
|
-
logException(
|
|
31
|
-
new Error(message),
|
|
32
|
-
"agent_plugin_log_error",
|
|
33
|
-
{},
|
|
34
|
-
{ "app.plugin.name": plugin, ...metadata },
|
|
35
|
-
message
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// src/chat/plugins/state.ts
|
|
42
|
-
import { createHash } from "crypto";
|
|
43
|
-
var MAX_PLUGIN_STATE_KEY_LENGTH = 512;
|
|
44
|
-
function hashKeyPart(value) {
|
|
45
|
-
return createHash("sha256").update(value).digest("hex").slice(0, 32);
|
|
46
|
-
}
|
|
47
|
-
function pluginStateKey(plugin, key) {
|
|
48
|
-
const pluginPrefix = `junior:${plugin}`;
|
|
49
|
-
if (key === pluginPrefix || key.startsWith(`${pluginPrefix}:`)) {
|
|
50
|
-
return key;
|
|
51
|
-
}
|
|
52
|
-
return `junior:plugin_state:${hashKeyPart(plugin)}:${hashKeyPart(key)}`;
|
|
53
|
-
}
|
|
54
|
-
function validatePluginStateKey(key) {
|
|
55
|
-
if (!key.trim()) {
|
|
56
|
-
throw new Error("Plugin state key is required");
|
|
57
|
-
}
|
|
58
|
-
if (key.length > MAX_PLUGIN_STATE_KEY_LENGTH) {
|
|
59
|
-
throw new Error("Plugin state key exceeds the maximum length");
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
function createPluginState(plugin, adapter) {
|
|
63
|
-
const getAdapter = () => adapter ?? getStateAdapter();
|
|
64
|
-
return {
|
|
65
|
-
async delete(key) {
|
|
66
|
-
validatePluginStateKey(key);
|
|
67
|
-
const state = getAdapter();
|
|
68
|
-
await state.connect();
|
|
69
|
-
await state.delete(pluginStateKey(plugin, key));
|
|
70
|
-
},
|
|
71
|
-
async get(key) {
|
|
72
|
-
validatePluginStateKey(key);
|
|
73
|
-
const state = getAdapter();
|
|
74
|
-
await state.connect();
|
|
75
|
-
const value = await state.get(pluginStateKey(plugin, key));
|
|
76
|
-
return value ?? void 0;
|
|
77
|
-
},
|
|
78
|
-
async set(key, value, ttlMs) {
|
|
79
|
-
validatePluginStateKey(key);
|
|
80
|
-
const state = getAdapter();
|
|
81
|
-
await state.connect();
|
|
82
|
-
await state.set(pluginStateKey(plugin, key), value, ttlMs);
|
|
83
|
-
},
|
|
84
|
-
async setIfNotExists(key, value, ttlMs) {
|
|
85
|
-
validatePluginStateKey(key);
|
|
86
|
-
const state = getAdapter();
|
|
87
|
-
await state.connect();
|
|
88
|
-
return await state.setIfNotExists(
|
|
89
|
-
pluginStateKey(plugin, key),
|
|
90
|
-
value,
|
|
91
|
-
ttlMs
|
|
92
|
-
);
|
|
93
|
-
},
|
|
94
|
-
async withLock(key, ttlMs, callback) {
|
|
95
|
-
validatePluginStateKey(key);
|
|
96
|
-
const state = getAdapter();
|
|
97
|
-
await state.connect();
|
|
98
|
-
const lockKey = pluginStateKey(plugin, key);
|
|
99
|
-
const lock = await state.acquireLock(lockKey, ttlMs);
|
|
100
|
-
if (!lock) {
|
|
101
|
-
throw new Error(`Could not acquire plugin state lock for ${key}`);
|
|
102
|
-
}
|
|
103
|
-
try {
|
|
104
|
-
return await callback();
|
|
105
|
-
} finally {
|
|
106
|
-
await state.releaseLock(lock);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
export {
|
|
113
|
-
createPluginLogger,
|
|
114
|
-
createPluginState
|
|
115
|
-
};
|
package/dist/chunk-B7PUBQQM.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
parseSlackChannelReferenceId,
|
|
3
|
-
parseSlackTeamId
|
|
4
|
-
} from "./chunk-7FBGKXPE.js";
|
|
5
|
-
|
|
6
|
-
// src/chat/destination.ts
|
|
7
|
-
import {
|
|
8
|
-
destinationSchema
|
|
9
|
-
} from "@sentry/junior-plugin-api";
|
|
10
|
-
function createSlackDestination(input) {
|
|
11
|
-
const channelId = parseSlackChannelReferenceId(input.channelId);
|
|
12
|
-
const teamId = parseSlackTeamId(input.teamId);
|
|
13
|
-
if (!channelId || !teamId) {
|
|
14
|
-
return void 0;
|
|
15
|
-
}
|
|
16
|
-
return { platform: "slack", teamId, channelId };
|
|
17
|
-
}
|
|
18
|
-
function parseDestination(value) {
|
|
19
|
-
const parsed = destinationSchema.safeParse(value);
|
|
20
|
-
return parsed.success ? parsed.data : void 0;
|
|
21
|
-
}
|
|
22
|
-
function requireSlackDestination(destination, action) {
|
|
23
|
-
if (destination?.platform === "slack") {
|
|
24
|
-
return destination;
|
|
25
|
-
}
|
|
26
|
-
throw new Error(`${action} requires a Slack destination`);
|
|
27
|
-
}
|
|
28
|
-
function sameDestination(left, right) {
|
|
29
|
-
if (left.platform !== right.platform) {
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
if (left.platform === "local" && right.platform === "local") {
|
|
33
|
-
return left.conversationId === right.conversationId;
|
|
34
|
-
}
|
|
35
|
-
if (left.platform === "slack" && right.platform === "slack") {
|
|
36
|
-
return left.teamId === right.teamId && left.channelId === right.channelId;
|
|
37
|
-
}
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
function destinationKey(destination) {
|
|
41
|
-
if (destination.platform === "local") {
|
|
42
|
-
return destination.conversationId;
|
|
43
|
-
}
|
|
44
|
-
return `slack:${destination.teamId}:${destination.channelId}`;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export {
|
|
48
|
-
createSlackDestination,
|
|
49
|
-
parseDestination,
|
|
50
|
-
requireSlackDestination,
|
|
51
|
-
sameDestination,
|
|
52
|
-
destinationKey
|
|
53
|
-
};
|
package/dist/chunk-G3E7SCME.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// src/chat/sandbox/paths.ts
|
|
2
|
-
function normalizeWorkspaceRoot(input) {
|
|
3
|
-
const candidate = (input ?? "").trim();
|
|
4
|
-
if (!candidate) {
|
|
5
|
-
return "/vercel/sandbox";
|
|
6
|
-
}
|
|
7
|
-
const normalized = candidate.replace(/\/+$/, "");
|
|
8
|
-
return normalized.startsWith("/") ? normalized : `/${normalized}`;
|
|
9
|
-
}
|
|
10
|
-
var SANDBOX_WORKSPACE_ROOT = normalizeWorkspaceRoot(
|
|
11
|
-
process.env.VERCEL_SANDBOX_WORKSPACE_DIR
|
|
12
|
-
);
|
|
13
|
-
var SANDBOX_SKILLS_ROOT = `${SANDBOX_WORKSPACE_ROOT}/skills`;
|
|
14
|
-
var SANDBOX_DATA_ROOT = `${SANDBOX_WORKSPACE_ROOT}/data`;
|
|
15
|
-
function sandboxSkillDir(skillName) {
|
|
16
|
-
return `${SANDBOX_SKILLS_ROOT}/${skillName}`;
|
|
17
|
-
}
|
|
18
|
-
function sandboxSkillFile(skillName) {
|
|
19
|
-
return `${sandboxSkillDir(skillName)}/SKILL.md`;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export {
|
|
23
|
-
SANDBOX_WORKSPACE_ROOT,
|
|
24
|
-
SANDBOX_SKILLS_ROOT,
|
|
25
|
-
SANDBOX_DATA_ROOT,
|
|
26
|
-
sandboxSkillDir,
|
|
27
|
-
sandboxSkillFile
|
|
28
|
-
};
|