@sentry/junior 0.117.0 → 0.119.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-5IK4LPLP.js → agent-hooks-NZSV4QQR.js} +9 -11
- package/dist/api/conversations/detail.d.ts +17 -0
- package/dist/api/conversations/event-list.d.ts +17 -0
- package/dist/api/schema/conversation.d.ts +68 -0
- package/dist/api/schema/stats.d.ts +22 -0
- package/dist/api/schema.d.ts +2 -0
- package/dist/api/schema.js +7 -3
- package/dist/api/stats.d.ts +16 -0
- package/dist/api/user-pages/routes.d.ts +4 -0
- package/dist/api.js +223 -20
- package/dist/app.js +43 -38
- package/dist/{catalog-runtime-MTUYW3AA.js → catalog-runtime-TAOYIZIZ.js} +5 -5
- package/dist/chat/agent/prompt.d.ts +4 -2
- package/dist/chat/plugins/user-pages.d.ts +15 -0
- package/dist/chat/plugins/viewer-actors.d.ts +6 -0
- package/dist/chat/prompt.d.ts +1 -2
- package/dist/chat/sandbox/paths.d.ts +2 -0
- package/dist/chat/sandbox/sandbox.d.ts +3 -1
- package/dist/chat/sandbox/workspace.d.ts +1 -0
- package/dist/chat/skills.d.ts +1 -2
- package/dist/chat/slack/tools/canvas/api.d.ts +2 -9
- package/dist/chat/slack/tools/canvas/markdown.d.ts +9 -0
- package/dist/chat/tools/index.d.ts +4 -1
- package/dist/chat/tools/sandbox/file-utils.d.ts +11 -0
- package/dist/chat/tools/sandbox/find-files.d.ts +2 -1
- package/dist/chat/tools/sandbox/grep.d.ts +2 -1
- package/dist/{chunk-6G45D3YG.js → chunk-4UIUDOOV.js} +16 -233
- package/dist/{chunk-LUMEBOWC.js → chunk-6ZR455DC.js} +2 -2
- package/dist/{chunk-STUI6NIL.js → chunk-BLQZACHV.js} +511 -14
- package/dist/{chunk-27KWTFP6.js → chunk-BNJEPYTC.js} +5 -14
- package/dist/{chunk-ZRQUQJUV.js → chunk-D3N4BPSL.js} +3 -3
- package/dist/{chunk-WKU7TY22.js → chunk-FIANEE7Z.js} +3 -1
- package/dist/{chunk-RXRQJF7Y.js → chunk-GCGJGSQL.js} +21 -0
- package/dist/{chunk-FAWBONPC.js → chunk-GKFDU3ZI.js} +5 -7
- package/dist/{chunk-FXOYURO4.js → chunk-HDFGNU5E.js} +1 -0
- package/dist/{chunk-3GE3F4LT.js → chunk-JLJLZS2N.js} +1 -1
- package/dist/{chunk-CU7HTGNI.js → chunk-JSTGI7TX.js} +1 -1
- package/dist/chunk-JXRAOOXQ.js +37 -0
- package/dist/{chunk-WUNPRM76.js → chunk-NUENIPQL.js} +1 -1
- package/dist/{chunk-BFIRIZPH.js → chunk-O2ULQJWR.js} +101 -2
- package/dist/{chunk-AKG4TZNH.js → chunk-QZ7XRJDB.js} +30 -9
- package/dist/{chunk-5O3JDQDG.js → chunk-R53UT2OI.js} +1 -1
- package/dist/{chunk-W5JEQQEA.js → chunk-TAGV4Z3J.js} +1 -1
- package/dist/{chunk-NHZEUHKH.js → chunk-TGIQN7QW.js} +388 -113
- package/dist/{chunk-KU6ALEJC.js → chunk-VJTWKJWQ.js} +30 -2
- package/dist/{chunk-DS27ZBSP.js → chunk-VLTWQQKH.js} +2 -2
- package/dist/{chunk-WEK3V5RI.js → chunk-YLYJIQRX.js} +226 -21
- package/dist/{chunk-LN765Y4N.js → chunk-ZFX4M743.js} +15 -9
- package/dist/{chunk-72Z3HNTQ.js → chunk-ZJ6IVZVO.js} +1 -1
- package/dist/cli/chat.js +24 -25
- package/dist/cli/check.js +6 -6
- package/dist/cli/init.js +2 -2
- package/dist/cli/plugins.js +13 -15
- package/dist/cli/snapshot-create.js +9 -10
- package/dist/cli/upgrade.js +8 -8
- package/dist/db/schema/stats.d.ts +93 -0
- package/dist/db/schema.d.ts +94 -1
- package/dist/{db-J2ITKS63.js → db-FWGP5CKY.js} +7 -7
- package/dist/instrumentation.js +3 -3
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-NQYKBT24.js → oauth-callback-server-PM3QNXJQ.js} +16 -18
- package/dist/{plugins-IUJA4VBU.js → plugins-HW4VWW6G.js} +1 -1
- package/dist/{runner-53V5GIQM.js → runner-DV55N6ZB.js} +11 -13
- package/dist/{skills-BU3ZMLVB.js → skills-MANV5ZK6.js} +6 -6
- package/dist/stats.d.ts +18 -0
- package/dist/{validation-74EIKKE6.js → validation-QGB4INTI.js} +6 -6
- package/dist/version.js +1 -1
- package/migrations/0011_sour_golden_guardian.sql +8 -0
- package/migrations/meta/0011_snapshot.json +1195 -0
- package/migrations/meta/_journal.json +8 -1
- package/package.json +5 -5
- package/dist/chunk-4ZNGQH7C.js +0 -25
- package/dist/chunk-YRWJ3KEU.js +0 -517
|
@@ -1,41 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getInterruptionMarker
|
|
3
|
-
} from "./chunk-27KWTFP6.js";
|
|
4
|
-
import {
|
|
5
|
-
createPluginLogger,
|
|
6
|
-
getPlugins
|
|
7
|
-
} from "./chunk-STUI6NIL.js";
|
|
8
|
-
import {
|
|
9
|
-
acquireActiveLock,
|
|
10
|
-
getStateAdapter
|
|
11
|
-
} from "./chunk-KU6ALEJC.js";
|
|
12
1
|
import {
|
|
13
2
|
SlackActionError,
|
|
3
|
+
createPluginLogger,
|
|
4
|
+
getPlugins,
|
|
14
5
|
getSlackClient,
|
|
15
6
|
isDmChannel,
|
|
16
7
|
normalizeSlackConversationId,
|
|
17
8
|
withSlackRetries
|
|
18
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BLQZACHV.js";
|
|
19
10
|
import {
|
|
20
11
|
getDb,
|
|
21
12
|
parseDestination
|
|
22
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-D3N4BPSL.js";
|
|
23
14
|
import {
|
|
15
|
+
acquireActiveLock,
|
|
16
|
+
getStateAdapter,
|
|
24
17
|
sleep
|
|
25
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-VJTWKJWQ.js";
|
|
26
19
|
import {
|
|
27
20
|
normalizeSlackEmojiName
|
|
28
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-VLTWQQKH.js";
|
|
29
22
|
import {
|
|
30
23
|
pluginCatalogRuntime
|
|
31
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-JSTGI7TX.js";
|
|
32
25
|
import {
|
|
33
26
|
fetchWithBoundedOAuthErrorBodies
|
|
34
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-R53UT2OI.js";
|
|
35
28
|
import {
|
|
36
29
|
logInfo,
|
|
37
30
|
logWarn
|
|
38
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-ZJ6IVZVO.js";
|
|
39
32
|
import {
|
|
40
33
|
isRecord
|
|
41
34
|
} from "./chunk-OB42YVAE.js";
|
|
@@ -1718,227 +1711,12 @@ async function issuePluginCredential(input) {
|
|
|
1718
1711
|
return parseCredentialResult(result, plugin.manifest.name);
|
|
1719
1712
|
}
|
|
1720
1713
|
|
|
1721
|
-
// src/chat/slack/output.ts
|
|
1722
|
-
var MAX_INLINE_CHARS = 2200;
|
|
1723
|
-
var MAX_INLINE_LINES = 45;
|
|
1724
|
-
var CONTINUED_MARKER = "\n\n[Continued below]";
|
|
1725
|
-
function countSlackLines(text) {
|
|
1726
|
-
if (!text) {
|
|
1727
|
-
return 0;
|
|
1728
|
-
}
|
|
1729
|
-
return text.split("\n").length;
|
|
1730
|
-
}
|
|
1731
|
-
function fitsInlineBudget(text, maxChars = MAX_INLINE_CHARS, maxLines = MAX_INLINE_LINES) {
|
|
1732
|
-
return text.length <= maxChars && countSlackLines(text) <= maxLines;
|
|
1733
|
-
}
|
|
1734
|
-
function findSplitIndex(text, maxChars) {
|
|
1735
|
-
if (text.length <= maxChars) {
|
|
1736
|
-
return text.length;
|
|
1737
|
-
}
|
|
1738
|
-
const bounded = text.slice(0, maxChars);
|
|
1739
|
-
const newlineIndex = bounded.lastIndexOf("\n");
|
|
1740
|
-
if (newlineIndex > 0) {
|
|
1741
|
-
return newlineIndex;
|
|
1742
|
-
}
|
|
1743
|
-
const spaceIndex = bounded.lastIndexOf(" ");
|
|
1744
|
-
if (spaceIndex > 0) {
|
|
1745
|
-
return spaceIndex;
|
|
1746
|
-
}
|
|
1747
|
-
return maxChars;
|
|
1748
|
-
}
|
|
1749
|
-
function splitByLineBudget(text, maxLines) {
|
|
1750
|
-
if (maxLines <= 0) {
|
|
1751
|
-
return "";
|
|
1752
|
-
}
|
|
1753
|
-
const lines = text.split("\n");
|
|
1754
|
-
if (lines.length <= maxLines) {
|
|
1755
|
-
return text;
|
|
1756
|
-
}
|
|
1757
|
-
return lines.slice(0, maxLines).join("\n");
|
|
1758
|
-
}
|
|
1759
|
-
function reserveInlineBudgetForSuffix(suffix, maxChars = MAX_INLINE_CHARS, maxLines = MAX_INLINE_LINES) {
|
|
1760
|
-
return {
|
|
1761
|
-
maxChars: Math.max(1, maxChars - suffix.length),
|
|
1762
|
-
maxLines: Math.max(1, maxLines - Math.max(0, countSlackLines(suffix) - 1))
|
|
1763
|
-
};
|
|
1764
|
-
}
|
|
1765
|
-
function forceSplitBudget(text, budget) {
|
|
1766
|
-
const lineCount = countSlackLines(text);
|
|
1767
|
-
return {
|
|
1768
|
-
maxChars: text.length <= budget.maxChars ? Math.max(1, text.length - 1) : budget.maxChars,
|
|
1769
|
-
maxLines: lineCount <= budget.maxLines ? Math.max(1, lineCount - 1) : budget.maxLines
|
|
1770
|
-
};
|
|
1771
|
-
}
|
|
1772
|
-
function getFenceContinuation(text) {
|
|
1773
|
-
let open;
|
|
1774
|
-
for (const line of text.split("\n")) {
|
|
1775
|
-
const trimmed = line.trimStart();
|
|
1776
|
-
const openerMatch = trimmed.match(/^(`{3,}|~{3,})(.*)$/);
|
|
1777
|
-
if (!openerMatch) {
|
|
1778
|
-
continue;
|
|
1779
|
-
}
|
|
1780
|
-
if (!open) {
|
|
1781
|
-
open = {
|
|
1782
|
-
fence: openerMatch[1],
|
|
1783
|
-
openerLine: trimmed
|
|
1784
|
-
};
|
|
1785
|
-
continue;
|
|
1786
|
-
}
|
|
1787
|
-
if (new RegExp(`^${open.fence}\\s*$`).test(trimmed)) {
|
|
1788
|
-
open = void 0;
|
|
1789
|
-
}
|
|
1790
|
-
}
|
|
1791
|
-
if (!open) {
|
|
1792
|
-
return null;
|
|
1793
|
-
}
|
|
1794
|
-
return {
|
|
1795
|
-
closeSuffix: text.endsWith("\n") ? open.fence : `
|
|
1796
|
-
${open.fence}`,
|
|
1797
|
-
reopenPrefix: `${open.openerLine}
|
|
1798
|
-
`
|
|
1799
|
-
};
|
|
1800
|
-
}
|
|
1801
|
-
function appendSlackSuffix(text, marker) {
|
|
1802
|
-
const carryover = getFenceContinuation(text);
|
|
1803
|
-
return `${text}${carryover?.closeSuffix ?? ""}${marker}`;
|
|
1804
|
-
}
|
|
1805
|
-
function stripTrailingContinuationMarker(text) {
|
|
1806
|
-
return text.endsWith(CONTINUED_MARKER) ? text.slice(0, -CONTINUED_MARKER.length) : text;
|
|
1807
|
-
}
|
|
1808
|
-
function takeSlackContinuationChunk(text, budget) {
|
|
1809
|
-
let { prefix, rest } = takeSlackInlinePrefix(text, budget);
|
|
1810
|
-
if (!rest) {
|
|
1811
|
-
({ prefix, rest } = takeSlackInlinePrefix(
|
|
1812
|
-
text,
|
|
1813
|
-
forceSplitBudget(text, budget)
|
|
1814
|
-
));
|
|
1815
|
-
}
|
|
1816
|
-
let carryover = rest ? getFenceContinuation(prefix) : null;
|
|
1817
|
-
if (!carryover) {
|
|
1818
|
-
return { prefix, rest };
|
|
1819
|
-
}
|
|
1820
|
-
const carryoverBudget = reserveInlineBudgetForSuffix(
|
|
1821
|
-
`${carryover.closeSuffix}${CONTINUED_MARKER}`
|
|
1822
|
-
);
|
|
1823
|
-
({ prefix, rest } = takeSlackInlinePrefix(text, carryoverBudget));
|
|
1824
|
-
if (!rest) {
|
|
1825
|
-
({ prefix, rest } = takeSlackInlinePrefix(
|
|
1826
|
-
text,
|
|
1827
|
-
forceSplitBudget(text, carryoverBudget)
|
|
1828
|
-
));
|
|
1829
|
-
}
|
|
1830
|
-
carryover = rest ? getFenceContinuation(prefix) : null;
|
|
1831
|
-
if (!carryover) {
|
|
1832
|
-
return { prefix, rest };
|
|
1833
|
-
}
|
|
1834
|
-
return {
|
|
1835
|
-
prefix,
|
|
1836
|
-
rest: `${carryover.reopenPrefix}${rest}`
|
|
1837
|
-
};
|
|
1838
|
-
}
|
|
1839
|
-
function takeSlackContinuationPrefix(text, options) {
|
|
1840
|
-
const budget = {
|
|
1841
|
-
maxChars: options?.maxChars ?? getSlackContinuationBudget().maxChars,
|
|
1842
|
-
maxLines: options?.maxLines ?? getSlackContinuationBudget().maxLines
|
|
1843
|
-
};
|
|
1844
|
-
const { prefix, rest } = (() => {
|
|
1845
|
-
if (options?.forceSplit) {
|
|
1846
|
-
return takeSlackContinuationChunk(text, budget);
|
|
1847
|
-
}
|
|
1848
|
-
const initial = takeSlackInlinePrefix(text, budget);
|
|
1849
|
-
return initial.rest ? takeSlackContinuationChunk(text, budget) : initial;
|
|
1850
|
-
})();
|
|
1851
|
-
return {
|
|
1852
|
-
prefix,
|
|
1853
|
-
renderedPrefix: rest ? appendSlackSuffix(prefix, CONTINUED_MARKER) : prefix,
|
|
1854
|
-
rest
|
|
1855
|
-
};
|
|
1856
|
-
}
|
|
1857
|
-
function takeSlackInlinePrefix(text, options) {
|
|
1858
|
-
const maxChars = options?.maxChars ?? MAX_INLINE_CHARS;
|
|
1859
|
-
const maxLines = options?.maxLines ?? MAX_INLINE_LINES;
|
|
1860
|
-
const normalized = text.replace(/\r\n?/g, "\n");
|
|
1861
|
-
if (!normalized) {
|
|
1862
|
-
return { prefix: "", rest: "" };
|
|
1863
|
-
}
|
|
1864
|
-
if (fitsInlineBudget(normalized, maxChars, maxLines)) {
|
|
1865
|
-
return { prefix: normalized, rest: "" };
|
|
1866
|
-
}
|
|
1867
|
-
const lineBounded = splitByLineBudget(normalized, maxLines);
|
|
1868
|
-
const cutIndex = findSplitIndex(lineBounded, maxChars);
|
|
1869
|
-
const prefix = lineBounded.slice(0, cutIndex).trimEnd();
|
|
1870
|
-
if (prefix) {
|
|
1871
|
-
return {
|
|
1872
|
-
prefix,
|
|
1873
|
-
rest: normalized.slice(prefix.length).trimStart()
|
|
1874
|
-
};
|
|
1875
|
-
}
|
|
1876
|
-
const hardPrefix = normalized.slice(0, Math.max(1, maxChars)).trimEnd();
|
|
1877
|
-
return {
|
|
1878
|
-
prefix: hardPrefix || normalized.slice(0, Math.max(1, maxChars)),
|
|
1879
|
-
rest: normalized.slice(hardPrefix.length || Math.max(1, maxChars)).trimStart()
|
|
1880
|
-
};
|
|
1881
|
-
}
|
|
1882
|
-
function splitSlackReplyText(text, options) {
|
|
1883
|
-
const normalized = normalizeSlackReplyMarkdown(text);
|
|
1884
|
-
if (!normalized) {
|
|
1885
|
-
return [];
|
|
1886
|
-
}
|
|
1887
|
-
const chunks = [];
|
|
1888
|
-
const continuationBudget = reserveInlineBudgetForSuffix(CONTINUED_MARKER);
|
|
1889
|
-
let remaining = normalized;
|
|
1890
|
-
while (remaining) {
|
|
1891
|
-
const fitsFinalChunk = options?.interrupted ? fitsInlineBudget(appendSlackSuffix(remaining, getInterruptionMarker())) : fitsInlineBudget(remaining);
|
|
1892
|
-
if (fitsFinalChunk) {
|
|
1893
|
-
chunks.push(
|
|
1894
|
-
options?.interrupted ? appendSlackSuffix(remaining, getInterruptionMarker()) : remaining
|
|
1895
|
-
);
|
|
1896
|
-
break;
|
|
1897
|
-
}
|
|
1898
|
-
const { renderedPrefix, rest } = takeSlackContinuationPrefix(remaining, {
|
|
1899
|
-
...continuationBudget,
|
|
1900
|
-
forceSplit: true
|
|
1901
|
-
});
|
|
1902
|
-
chunks.push(renderedPrefix);
|
|
1903
|
-
remaining = rest;
|
|
1904
|
-
}
|
|
1905
|
-
if (chunks.length === 2) {
|
|
1906
|
-
chunks[0] = stripTrailingContinuationMarker(chunks[0] ?? "");
|
|
1907
|
-
}
|
|
1908
|
-
return chunks;
|
|
1909
|
-
}
|
|
1910
|
-
function getSlackContinuationBudget() {
|
|
1911
|
-
return reserveInlineBudgetForSuffix(CONTINUED_MARKER);
|
|
1912
|
-
}
|
|
1913
|
-
function buildSlackOutputMessage(text) {
|
|
1914
|
-
const normalized = normalizeSlackReplyMarkdown(text);
|
|
1915
|
-
if (!normalized) {
|
|
1916
|
-
throw new Error(
|
|
1917
|
-
`Slack output normalized to empty content: original_length=${text.length} parsed_length=${normalized.length}`
|
|
1918
|
-
);
|
|
1919
|
-
}
|
|
1920
|
-
return {
|
|
1921
|
-
markdown: normalized
|
|
1922
|
-
};
|
|
1923
|
-
}
|
|
1924
|
-
var slackOutputPolicy = {
|
|
1925
|
-
maxInlineChars: MAX_INLINE_CHARS,
|
|
1926
|
-
maxInlineLines: MAX_INLINE_LINES
|
|
1927
|
-
};
|
|
1928
|
-
|
|
1929
1714
|
export {
|
|
1930
1715
|
RetryableDeliveryError,
|
|
1931
1716
|
actorFromRouting,
|
|
1932
1717
|
assertRunRoutingConsistency,
|
|
1933
1718
|
toolInvocationDestination,
|
|
1934
1719
|
surfaceFromRouting,
|
|
1935
|
-
truncateStatusText,
|
|
1936
|
-
escapeSlackMrkdwnText,
|
|
1937
|
-
formatSlackLink,
|
|
1938
|
-
normalizeSlackStatusText,
|
|
1939
|
-
splitSlackReplyText,
|
|
1940
|
-
buildSlackOutputMessage,
|
|
1941
|
-
slackOutputPolicy,
|
|
1942
1720
|
createUserTokenStore,
|
|
1943
1721
|
issueProviderCredentialLease,
|
|
1944
1722
|
getSlackMessagePermalink,
|
|
@@ -1946,6 +1724,11 @@ export {
|
|
|
1946
1724
|
uploadFilesToConversation,
|
|
1947
1725
|
addReactionToMessage,
|
|
1948
1726
|
removeReactionFromMessage,
|
|
1727
|
+
truncateStatusText,
|
|
1728
|
+
escapeSlackMrkdwnText,
|
|
1729
|
+
formatSlackLink,
|
|
1730
|
+
normalizeSlackReplyMarkdown,
|
|
1731
|
+
normalizeSlackStatusText,
|
|
1949
1732
|
parseOAuthStatePayload,
|
|
1950
1733
|
formatProviderLabel,
|
|
1951
1734
|
resolveBaseUrl,
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-PE44LDDQ.js";
|
|
4
4
|
import {
|
|
5
5
|
normalizeSlackConversationId
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BLQZACHV.js";
|
|
7
7
|
import {
|
|
8
8
|
parseSlackThreadId
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HDFGNU5E.js";
|
|
10
10
|
|
|
11
11
|
// src/handlers/health.ts
|
|
12
12
|
function readHealthReport() {
|