@sentry/junior 0.308.0 → 0.310.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-D2iXzvlN.js → actor-BsBdxDXQ.js} +0 -1
- package/dist/{adapter-context-BO432242.js → adapter-context-BhKpjpGD.js} +2 -2
- package/dist/{admin-vSmheo3Z.js → admin-tgZEZAk2.js} +2 -2
- package/dist/{agent-runner-BnOofGFG.js → agent-runner-D9cvNlQl.js} +245 -204
- package/dist/api/schema.d.ts +1 -1
- package/dist/api/schema.js +5 -5
- package/dist/api.d.ts +4 -2
- package/dist/api.js +416 -272
- package/dist/{app-CqYqy541.d.ts → app-B_7Wn0en.d.ts} +4 -6
- package/dist/app.d.ts +1 -1
- package/dist/app.js +74 -193
- package/dist/{background-compaction-queue-BpmDEQf6.js → background-compaction-queue-BGHqkhkY.js} +4 -4
- package/dist/{briefs-Dbh94cRp.js → briefs-DKxkoruh.js} +3 -3
- package/dist/{catalog-runtime-q9AJjuUN.js → catalog-runtime-BxwzbLKY.js} +1 -1
- package/dist/cli/chat.js +16 -16
- package/dist/cli/check.js +10 -10
- package/dist/cli/main.js +3 -3
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +5 -5
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +3 -3
- package/dist/{config-Cx8H0MRw.js → config-Dkt2Le2b.js} +51 -92
- package/dist/{continue-in-slack-CtTv1tkn.js → continue-in-slack-BWVwePKD.js} +6 -6
- package/dist/{conversation--f85g4zL.js → conversation-M9KZ5JxF.js} +7 -2
- package/dist/{conversation-feed-BNs9KiqC.js → conversation-feed-Ci6YD1N-.js} +1 -1
- package/dist/{conversation-privacy-CivmFlWP.js → conversation-privacy-C39g8BY4.js} +1 -1
- package/dist/{conversation-turn-C9-Nfnsy.js → conversation-turn-CBlZIH02.js} +20 -21
- package/dist/{credential-sync-CWIORwD9.js → credential-sync-vGnrB0BY.js} +31 -23
- package/dist/{db-C41UgdBj.d.ts → db-B4Hjxr-u.d.ts} +2 -2
- package/dist/{db-CO6Y10eM.js → db-CFZggNoy.js} +20 -10
- package/dist/{executor-Doo-N6Yn.js → executor-BPkZDx5-.js} +12 -4
- package/dist/fan-out-Cod-yEHG.js +10 -0
- package/dist/{history-N7IVbUom.js → history-CYstOMKX.js} +6 -0
- package/dist/{connections-DUylBPiR.js → html-2r2KmLwi.js} +146 -11
- package/dist/{install-Y2s9ZPvk.js → install-C-oE6C_u.js} +2 -2
- package/dist/instrumentation.js +2 -2
- package/dist/{lineage-BcqyhMyp.js → lineage-CsvrEFQe.js} +2 -2
- package/dist/{logging-DnBYBM8z.js → logging-D5gkyvnK.js} +1 -1
- package/dist/{message-fSnXIqvl.js → message-DwvJ-I3w.js} +8 -8
- package/dist/{model-input-DRChpXJ7.js → model-input-MAq2881y.js} +15 -10
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +4 -4
- package/dist/{oauth-callback-server-BUU6zd_T.js → oauth-callback-server-DIF6Li06.js} +2 -2
- package/dist/{oauth-relay-gO_Ynmpb.js → oauth-relay-DPE-wrwO.js} +1 -1
- package/dist/{package-discovery-x4AvVhMj.js → package-discovery-DD9vencX.js} +0 -1
- package/dist/{projection-Bqn6zdVT.js → projection-jZSlEAXG.js} +116 -123
- package/dist/{prompt-DAjjk5fm.js → prompt-CaMyeCpA.js} +25 -14
- package/dist/{registry-tHJLCtKS.js → registry-BBkWFCl8.js} +3 -3
- package/dist/{resolve-z2sKt8xM.js → resolve-B38MkHXE.js} +3 -3
- package/dist/{result-D2wshngt.js → result-BaqSZcJb.js} +12 -13
- package/dist/{runner-BvNPWLAy.js → runner-11h8PrHh.js} +10 -10
- package/dist/{sandbox-egress-signals-CmHD-6vr.js → sandbox-egress-signals-CTcACAtJ.js} +1 -1
- package/dist/{schedule-BG1tEbRF.js → schedule-DWxZ3kja.js} +1 -1
- package/dist/{schema-CRXcj4fj.d.ts → schema-DriSvB40.d.ts} +43 -43
- package/dist/{schema-D4jdesIu.js → schema-obw5jvR4.js} +65 -28
- package/dist/{service-account-B2d1Er_r.js → service-account-Bx93N1n1.js} +3 -3
- package/dist/{service-account-CddxU-yC.js → service-account-Zc5bUcIJ.js} +7 -8
- package/dist/{session-stop-BQ0J0Fph.js → session-stop-BfY4rhJs.js} +179 -199
- package/dist/{skills-Dm2-5nn5.js → skills-C8Npu5zO.js} +99 -57
- package/dist/{slack-conversation-unfurl-CLH0tTLk.js → slack-conversation-unfurl-DlRVA02H.js} +18 -15
- package/dist/{spawn-PwAuSN59.js → spawn-CXr58R0x.js} +6 -6
- package/dist/{state-rXH58smZ.js → state-CGrGVeQC.js} +4 -4
- package/dist/{stop-CcHPEcFE.js → stop-DYzjRf2U.js} +176 -135
- package/dist/{store-7QA00oK6.js → store-D4FQ1Nml.js} +5 -5
- package/dist/{task-queue-DvQZH5rG.js → task-queue-CaZffYaH.js} +7 -4
- package/dist/{task-runner-CyZMcuZy.js → task-runner-Dm7BHbGp.js} +11 -12
- package/dist/{thread-context-C-hLTQST.js → thread-context-Dyj1KWaY.js} +13 -11
- package/dist/{turn-session-routing-Cqjj1B3i.js → turn-session-routing-CD0BRCex.js} +4 -4
- package/dist/{turn-user-message-DbU7MNd9.js → turn-user-message-9IxeEv5v.js} +14 -5
- package/dist/{queue-CbEHUO0l.d.ts → types-fnU7Xs__.d.ts} +3 -1
- package/dist/{users-B-UpCmw9.js → users-CaUAYMb3.js} +1 -1
- package/dist/{validation-BEUlev32.js → validation-DxVNIxA0.js} +1 -1
- package/dist/{version-BE1OyrXV.js → version-Cr7Z71yG.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-CqOkWizK.js → viewer-AHldghAD.js} +7 -5
- package/dist/{warmup-HFgFZFwS.js → warmup-C6LOZ2d2.js} +138 -80
- package/dist/{worker-CCEDWbsY.js → worker-CUBtu1Li.js} +8 -8
- package/migrations/0121_people_list_metric_index.sql +1 -0
- package/migrations/0122_automation_rollout_repair.sql +56 -0
- package/migrations/0123_cache_warming_history_reset.sql +10 -0
- package/migrations/0124_artifact_visibility.sql +9 -0
- package/migrations/0125_artifact_public_sha_index.sql +1 -0
- package/migrations/meta/0121_snapshot.json +5481 -0
- package/migrations/meta/0122_snapshot.json +5481 -0
- package/migrations/meta/0123_snapshot.json +5481 -0
- package/migrations/meta/0124_snapshot.json +5516 -0
- package/migrations/meta/0125_snapshot.json +5516 -0
- package/migrations/meta/_journal.json +35 -0
- package/package.json +7 -7
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import { s as skillRoots } from "./package-discovery-
|
|
3
|
-
import { h as logWarn } from "./logging-
|
|
4
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
2
|
+
import { s as skillRoots } from "./package-discovery-DD9vencX.js";
|
|
3
|
+
import { h as logWarn } from "./logging-D5gkyvnK.js";
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-BxwzbLKY.js";
|
|
5
|
+
import { t as mapBounded } from "./fan-out-Cod-yEHG.js";
|
|
5
6
|
import * as z from "zod";
|
|
6
7
|
import path from "node:path";
|
|
7
8
|
import fs from "node:fs/promises";
|
|
@@ -18,20 +19,36 @@ function isCommonEnvironmentVariable(name) {
|
|
|
18
19
|
"TERM",
|
|
19
20
|
"TMP",
|
|
20
21
|
"TMPDIR",
|
|
21
|
-
"USER"
|
|
22
|
-
"XDG_CONFIG_HOME"
|
|
22
|
+
"USER"
|
|
23
23
|
].includes(name.toUpperCase());
|
|
24
24
|
}
|
|
25
|
+
const DOLLAR_REFERENCE = /(?<![a-z0-9$])\$([a-z0-9]+(?:-[a-z0-9]+)*)(?![a-z0-9]|[-_][a-z0-9])/gi;
|
|
26
|
+
const SLASH_REFERENCE = /(?:^|\s)\/([a-z0-9]+(?:-[a-z0-9]+)*)(?![a-z0-9/-])/gi;
|
|
27
|
+
function referenceMatches(text, pattern) {
|
|
28
|
+
return [...text.matchAll(pattern)].flatMap((match) => match[1] ? [{
|
|
29
|
+
index: match.index,
|
|
30
|
+
name: match[1].toLowerCase()
|
|
31
|
+
}] : []);
|
|
32
|
+
}
|
|
33
|
+
function dollarReferenceMatches(text) {
|
|
34
|
+
return referenceMatches(text, DOLLAR_REFERENCE).filter(({ name }) => !isCommonEnvironmentVariable(name));
|
|
35
|
+
}
|
|
25
36
|
/**
|
|
26
|
-
* Return the skills that `text` references explicitly,
|
|
27
|
-
*
|
|
37
|
+
* Return the skills that a person's `text` references explicitly, once each,
|
|
38
|
+
* in the order they appear. `$name` is the reference form; `/name` is
|
|
39
|
+
* accepted as older input.
|
|
28
40
|
*/
|
|
29
41
|
function skillReferences(text, availableSkills) {
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
42
|
+
const names = [...dollarReferenceMatches(text), ...referenceMatches(text, SLASH_REFERENCE)].sort((left, right) => left.index - right.index).map(({ name }) => name).filter((name) => availableSkills.some((skill) => skill.name === name));
|
|
43
|
+
return [...new Set(names)];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Return the names that a SKILL.md body references as `$name`, once each, in
|
|
47
|
+
* the order they appear, whether or not a skill has that name. A body has no
|
|
48
|
+
* `/name` form, so a path such as `/brief` unlocks nothing.
|
|
49
|
+
*/
|
|
50
|
+
function skillBodyReferences(body) {
|
|
51
|
+
return [...new Set(dollarReferenceMatches(body).map(({ name }) => name))];
|
|
35
52
|
}
|
|
36
53
|
// src/chat/skills.ts
|
|
37
54
|
var skills_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -207,6 +224,43 @@ function buildPluginRuntimeBoundary(manifest) {
|
|
|
207
224
|
function applyPluginRuntimeBoundary(plugin, body) {
|
|
208
225
|
return plugin ? `${buildPluginRuntimeBoundary(plugin.manifest)}\n\n${body}` : body;
|
|
209
226
|
}
|
|
227
|
+
/**
|
|
228
|
+
* Codex's `agents/openai.yaml` makes a skill manual-only with
|
|
229
|
+
* `policy.allow_implicit_invocation: false`. Junior treats it the same as
|
|
230
|
+
* `disable-model-invocation: true`.
|
|
231
|
+
*/
|
|
232
|
+
const openAiSkillPolicySchema = z.object({ policy: z.object({ allow_implicit_invocation: z.boolean().optional() }).optional() });
|
|
233
|
+
/**
|
|
234
|
+
* Return whether the text of a skill's `agents/openai.yaml` makes the skill
|
|
235
|
+
* manual-only. Invalid YAML leaves the skill model-invocable.
|
|
236
|
+
*/
|
|
237
|
+
function openAiPolicyDisablesImplicitInvocation(raw, filePath) {
|
|
238
|
+
let parsed;
|
|
239
|
+
try {
|
|
240
|
+
parsed = parse(raw);
|
|
241
|
+
} catch (error) {
|
|
242
|
+
logWarn("skill.openai_yaml.invalid", {
|
|
243
|
+
"file.path": filePath,
|
|
244
|
+
"exception.message": error instanceof Error ? error.message : String(error)
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
const result = openAiSkillPolicySchema.safeParse(parsed);
|
|
248
|
+
return result.success && result.data.policy?.allow_implicit_invocation === false;
|
|
249
|
+
}
|
|
250
|
+
async function openAiImplicitInvocationDisabled(skillDir) {
|
|
251
|
+
const policyFile = path.join(skillDir, "agents", "openai.yaml");
|
|
252
|
+
let raw;
|
|
253
|
+
try {
|
|
254
|
+
raw = await fs.readFile(policyFile, "utf8");
|
|
255
|
+
} catch (error) {
|
|
256
|
+
if (!(error instanceof Error && "code" in error && error.code === "ENOENT")) logWarn("skill.openai_yaml.invalid", {
|
|
257
|
+
"file.path": policyFile,
|
|
258
|
+
"exception.message": error instanceof Error ? error.message : String(error)
|
|
259
|
+
});
|
|
260
|
+
return false;
|
|
261
|
+
}
|
|
262
|
+
return openAiPolicyDisablesImplicitInvocation(raw, policyFile);
|
|
263
|
+
}
|
|
210
264
|
async function readSkillDirectory(skillDir) {
|
|
211
265
|
const skillFile = path.join(skillDir, "SKILL.md");
|
|
212
266
|
try {
|
|
@@ -218,15 +272,18 @@ async function readSkillDirectory(skillDir) {
|
|
|
218
272
|
});
|
|
219
273
|
return null;
|
|
220
274
|
}
|
|
221
|
-
const { name, description, allowedTools
|
|
275
|
+
const { name, description, allowedTools } = parsed.skill;
|
|
276
|
+
const disableModelInvocation = parsed.skill.disableModelInvocation === true || await openAiImplicitInvocationDisabled(skillDir);
|
|
222
277
|
const plugin = pluginCatalogRuntime.getForSkillPath(skillDir);
|
|
278
|
+
const references = skillBodyReferences(parsed.skill.body);
|
|
223
279
|
return {
|
|
224
280
|
name,
|
|
225
281
|
description,
|
|
226
282
|
skillPath: skillDir,
|
|
227
283
|
...plugin ? { pluginProvider: plugin.manifest.name } : void 0,
|
|
228
284
|
...allowedTools ? { allowedTools } : void 0,
|
|
229
|
-
...disableModelInvocation ? { disableModelInvocation } : void 0
|
|
285
|
+
...disableModelInvocation ? { disableModelInvocation } : void 0,
|
|
286
|
+
...references.length > 0 ? { references } : void 0
|
|
230
287
|
};
|
|
231
288
|
} catch (error) {
|
|
232
289
|
logWarn("skill.directory.read.failed", {
|
|
@@ -241,23 +298,23 @@ async function discoverSkills(options) {
|
|
|
241
298
|
const roots = resolveSkillRoots(options);
|
|
242
299
|
const cacheKey = roots.join(path.delimiter);
|
|
243
300
|
if (skillCache && skillCache.expiresAt > Date.now() && skillCache.key === cacheKey) return skillCache.skills;
|
|
301
|
+
const directoriesByRoot = await mapBounded(roots, async (root) => {
|
|
302
|
+
try {
|
|
303
|
+
return (await fs.readdir(root, { withFileTypes: true })).filter((entry) => entry.isDirectory()).sort((a, b) => a.name.localeCompare(b.name)).map((entry) => path.join(root, entry.name));
|
|
304
|
+
} catch (error) {
|
|
305
|
+
logWarn("skill.root.read.failed", {
|
|
306
|
+
"file.directory": root,
|
|
307
|
+
"exception.message": error instanceof Error ? error.message : String(error)
|
|
308
|
+
});
|
|
309
|
+
return [];
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
const skills = await mapBounded(directoriesByRoot.flat(), readSkillDirectory);
|
|
244
313
|
const discovered = [];
|
|
245
314
|
const seen = /* @__PURE__ */ new Set();
|
|
246
|
-
for (const
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
if (!entry.isDirectory()) continue;
|
|
250
|
-
const skill = await readSkillDirectory(path.join(root, entry.name));
|
|
251
|
-
if (skill && !seen.has(skill.name)) {
|
|
252
|
-
seen.add(skill.name);
|
|
253
|
-
discovered.push(skill);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
} catch (error) {
|
|
257
|
-
logWarn("skill.root.read.failed", {
|
|
258
|
-
"file.directory": root,
|
|
259
|
-
"exception.message": error instanceof Error ? error.message : String(error)
|
|
260
|
-
});
|
|
315
|
+
for (const skill of skills) if (skill && !seen.has(skill.name)) {
|
|
316
|
+
seen.add(skill.name);
|
|
317
|
+
discovered.push(skill);
|
|
261
318
|
}
|
|
262
319
|
const sorted = discovered.sort((a, b) => a.name.localeCompare(b.name));
|
|
263
320
|
skillCache = {
|
|
@@ -267,24 +324,14 @@ async function discoverSkills(options) {
|
|
|
267
324
|
};
|
|
268
325
|
return sorted;
|
|
269
326
|
}
|
|
327
|
+
/** Most skills one message can invoke, like Claude Code. */
|
|
328
|
+
const MAX_INVOKED_SKILLS = 6;
|
|
270
329
|
/**
|
|
271
|
-
*
|
|
272
|
-
*
|
|
330
|
+
* Return the skills that a message invokes with `$name`, in message order,
|
|
331
|
+
* once each. `/name` still works as older input.
|
|
273
332
|
*/
|
|
274
|
-
function
|
|
275
|
-
|
|
276
|
-
const escapePattern = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
277
|
-
const [referencedSkill] = skillReferences(trimmed, availableSkills);
|
|
278
|
-
if (referencedSkill) return { skillName: referencedSkill };
|
|
279
|
-
const namedSkill = availableSkills.find((skill) => {
|
|
280
|
-
if (skill.disableModelInvocation !== true) return false;
|
|
281
|
-
const skillPattern = escapePattern(skill.name);
|
|
282
|
-
const explicitUse = new RegExp(`\\b(?:use|run|load|call|invoke)\\s+(?:the\\s+)?${skillPattern}(?:\\s+skill)?\\b`, "i");
|
|
283
|
-
const negatedUse = new RegExp(`\\b(?:do\\s+not|don't|dont|never)\\s+(?:use|run|load|call|invoke)\\s+(?:the\\s+)?${skillPattern}(?:\\s+skill)?\\b`, "i");
|
|
284
|
-
return explicitUse.test(trimmed) && !negatedUse.test(trimmed);
|
|
285
|
-
});
|
|
286
|
-
if (!namedSkill) return null;
|
|
287
|
-
return { skillName: namedSkill.name };
|
|
333
|
+
function parseSkillInvocations(messageText, availableSkills) {
|
|
334
|
+
return skillReferences(messageText, availableSkills).slice(0, MAX_INVOKED_SKILLS);
|
|
288
335
|
}
|
|
289
336
|
/** Look up a skill by name from the available set. */
|
|
290
337
|
function findSkillByName(skillName, available) {
|
|
@@ -293,26 +340,21 @@ function findSkillByName(skillName, available) {
|
|
|
293
340
|
/** Load full skill bodies for a list of skill names, reading SKILL.md files from disk. */
|
|
294
341
|
async function loadSkillsByName(skillNames, available) {
|
|
295
342
|
const selected = new Set(skillNames);
|
|
296
|
-
const
|
|
297
|
-
for (const meta of available) {
|
|
298
|
-
if (!selected.has(meta.name)) continue;
|
|
343
|
+
const loadSkill = async (meta) => {
|
|
299
344
|
const skillFile = path.join(meta.skillPath, "SKILL.md");
|
|
300
345
|
const parsed = parseSkillFile(await fs.readFile(skillFile, "utf8"), meta.name);
|
|
301
346
|
if (!parsed.ok) throw new Error(`Invalid skill file in ${skillFile}: ${parsed.error}`);
|
|
302
347
|
const plugin = resolveSkillPlugin(meta);
|
|
303
|
-
|
|
348
|
+
return {
|
|
304
349
|
name: parsed.skill.name,
|
|
305
350
|
description: parsed.skill.description,
|
|
306
351
|
skillPath: meta.skillPath,
|
|
307
352
|
...plugin ? { pluginProvider: plugin.manifest.name } : void 0,
|
|
308
353
|
...parsed.skill.allowedTools ? { allowedTools: parsed.skill.allowedTools } : void 0,
|
|
309
|
-
...parsed.skill.disableModelInvocation ? { disableModelInvocation:
|
|
310
|
-
};
|
|
311
|
-
skills.push({
|
|
312
|
-
...loadedMeta,
|
|
354
|
+
...parsed.skill.disableModelInvocation || meta.disableModelInvocation ? { disableModelInvocation: true } : void 0,
|
|
313
355
|
body: applyPluginRuntimeBoundary(plugin, parsed.skill.body)
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
return
|
|
356
|
+
};
|
|
357
|
+
};
|
|
358
|
+
return await mapBounded(available.filter((meta) => selected.has(meta.name)), loadSkill);
|
|
317
359
|
}
|
|
318
|
-
export {
|
|
360
|
+
export { parseSkillFile as a, openAiPolicyDisablesImplicitInvocation as i, findSkillByName as n, parseSkillInvocations as o, loadSkillsByName as r, skills_exports as s, discoverSkills as t };
|
package/dist/{slack-conversation-unfurl-CLH0tTLk.js → slack-conversation-unfurl-DlRVA02H.js}
RENAMED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import {
|
|
3
|
-
import { _ as slackUserIdSchema, b as slackMessageTsSchema, f as parseSlackTeamId, g as slackTeamIdSchema, h as slackChannelIdSchema, m as slackBotIdSchema, n as createSlackActor, p as parseSlackUserId, s as parseActorUserId, u as parseSlackChannelId } from "./actor-
|
|
4
|
-
import {
|
|
5
|
-
import { i as lookupSlackUserProfile, n as lookupSlackBot } from "./users-
|
|
6
|
-
import { E as withSpan } from "./logging-
|
|
7
|
-
import { i as readActorIdentity } from "./viewer-
|
|
8
|
-
import { t as runWithSlackInstallation } from "./adapter-context-
|
|
9
|
-
import { a as isMovableToSlack, i as continueConversationInSlack, n as alreadyContinuesInSlackMessage, t as BUSY } from "./continue-in-slack-
|
|
10
|
-
import {
|
|
11
|
-
import "./store-
|
|
12
|
-
import {
|
|
2
|
+
import { Bs as formatSlackLink, Is as getWorkspaceTeamId, Tt as deferConversationMove, Xa as readConversationAccessFromSql, _s as unfurlSlackLinks, ao as readLatestConversationBrief, fc as parseDashboardConversationLink, ms as postSlackEphemeralMessage, zs as escapeSlackMrkdwnText } from "./projection-jZSlEAXG.js";
|
|
3
|
+
import { _ as slackUserIdSchema, b as slackMessageTsSchema, f as parseSlackTeamId, g as slackTeamIdSchema, h as slackChannelIdSchema, m as slackBotIdSchema, n as createSlackActor, p as parseSlackUserId, s as parseActorUserId, u as parseSlackChannelId } from "./actor-BsBdxDXQ.js";
|
|
4
|
+
import { Q as createCache, a as getConversationStore, lt as getConversationIdByProviderConversation, o as getDb, s as getSqlExecutor } from "./db-CFZggNoy.js";
|
|
5
|
+
import { i as lookupSlackUserProfile, n as lookupSlackBot } from "./users-CaUAYMb3.js";
|
|
6
|
+
import { E as withSpan } from "./logging-D5gkyvnK.js";
|
|
7
|
+
import { i as readActorIdentity } from "./viewer-AHldghAD.js";
|
|
8
|
+
import { t as runWithSlackInstallation } from "./adapter-context-BhKpjpGD.js";
|
|
9
|
+
import { a as isMovableToSlack, i as continueConversationInSlack, n as alreadyContinuesInSlackMessage, t as BUSY } from "./continue-in-slack-BWVwePKD.js";
|
|
10
|
+
import { pr as checkSlackChannelReadAccess } from "./warmup-C6LOZ2d2.js";
|
|
11
|
+
import "./store-D4FQ1Nml.js";
|
|
12
|
+
import { t as mapBounded } from "./fan-out-Cod-yEHG.js";
|
|
13
|
+
import { n as botConfig } from "./config-Dkt2Le2b.js";
|
|
13
14
|
import * as z from "zod";
|
|
14
15
|
// src/chat/ingress/workspace-membership.ts
|
|
15
16
|
const MEMBER_TTL_MS = 3e5;
|
|
@@ -219,21 +220,23 @@ async function unfurlDashboardConversationLinks(args) {
|
|
|
219
220
|
const unfurls = {};
|
|
220
221
|
let canReceive;
|
|
221
222
|
const urls = [...new Set(event.links.map((link) => link.url))];
|
|
222
|
-
|
|
223
|
+
const unfurlLink = async (url) => {
|
|
223
224
|
const conversationId = parseDashboardConversationLink(url);
|
|
224
225
|
const conversation = conversationId ? await readPublicConversation(conversationId) : void 0;
|
|
225
|
-
if (!conversation)
|
|
226
|
+
if (!conversation) return;
|
|
227
|
+
const movable = isMovableToSlack(conversation) && await (canReceive ??= canReceiveConversation(teamId, channelId, threadTs));
|
|
226
228
|
unfurls[url] = { blocks: await previewBlocks({
|
|
227
229
|
conversation,
|
|
228
230
|
url,
|
|
229
|
-
...
|
|
231
|
+
...movable ? { footer: continueHereButton({
|
|
230
232
|
conversationId: conversation.conversationId,
|
|
231
233
|
messageTs: messageTs.data,
|
|
232
234
|
threadTs,
|
|
233
235
|
url
|
|
234
236
|
}) } : void 0
|
|
235
237
|
}) };
|
|
236
|
-
}
|
|
238
|
+
};
|
|
239
|
+
await mapBounded(urls.slice(0, MAX_LINKS), unfurlLink);
|
|
237
240
|
if (Object.keys(unfurls).length === 0) return;
|
|
238
241
|
await unfurlSlackLinks({
|
|
239
242
|
channelId,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import { F as actorFromRun, I as toolInvocationDestination } from "./agent-runner-
|
|
3
|
-
import { n as botConfig } from "./config-
|
|
4
|
-
import { t as readConversationLineage } from "./lineage-
|
|
5
|
-
import { _ as getConversationWorkState } from "./store-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { F as actorFromRun, I as toolInvocationDestination } from "./agent-runner-D9cvNlQl.js";
|
|
3
|
+
import { n as botConfig } from "./config-Dkt2Le2b.js";
|
|
4
|
+
import { t as readConversationLineage } from "./lineage-CsvrEFQe.js";
|
|
5
|
+
import { _ as getConversationWorkState } from "./store-D4FQ1Nml.js";
|
|
6
|
+
import { Ht as getAgentInvocation, Tn as getAgentBinding, cn as createAndEnqueueAgentInvocation, xn as AgentDepthLimitError } from "./warmup-C6LOZ2d2.js";
|
|
7
|
+
import { A as getAgentInvocationMessageId, E as getAgentInvocationId, L as getUnnamedAgentConversationId } from "./turn-user-message-9IxeEv5v.js";
|
|
8
8
|
// src/chat/agent-invocations/spawn.ts
|
|
9
9
|
var spawn_exports = /* @__PURE__ */ __exportAll({ bindSpawnAgent: () => bindSpawnAgent });
|
|
10
10
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as getChatConfig } from "./config-
|
|
2
|
-
import { h as logWarn } from "./logging-
|
|
3
|
-
import { o as getDb } from "./db-
|
|
4
|
-
import { B as juniorUsers } from "./executor-
|
|
1
|
+
import { i as getChatConfig } from "./config-Dkt2Le2b.js";
|
|
2
|
+
import { h as logWarn } from "./logging-D5gkyvnK.js";
|
|
3
|
+
import { o as getDb } from "./db-CFZggNoy.js";
|
|
4
|
+
import { B as juniorUsers } from "./executor-BPkZDx5-.js";
|
|
5
5
|
import { createCipheriv, createDecipheriv, createHash, randomBytes } from "node:crypto";
|
|
6
6
|
import { eq } from "drizzle-orm";
|
|
7
7
|
// src/chat/conversations/legacy-web-actor-id.ts
|