@sentry/junior 0.76.1 → 0.78.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-ZOE7RIED.js → agent-hooks-OFDNZJB2.js} +6 -4
- package/dist/api-reference.d.ts +2 -2
- package/dist/app.d.ts +27 -0
- package/dist/app.js +264 -21
- package/dist/build/copy-build-content.d.ts +2 -0
- package/dist/build/virtual-config.d.ts +3 -0
- package/dist/chat/conversations/store.d.ts +1 -1
- package/dist/chat/plugins/agent-hooks.d.ts +7 -1
- package/dist/chat/slack/dashboard-link.d.ts +9 -0
- package/dist/chat/state/adapter.d.ts +0 -1
- package/dist/chat/state/locks.d.ts +7 -0
- package/dist/chat/task-execution/state.d.ts +21 -1
- package/dist/{chunk-NYKJ3KON.js → chunk-237T7XAN.js} +3 -3
- package/dist/{chunk-FFGXUXMD.js → chunk-2MSW5BZY.js} +10 -10
- package/dist/{chunk-ZQB37HUX.js → chunk-C2YBH4S6.js} +1 -1
- package/dist/{chunk-XBBC6W45.js → chunk-KIDP757T.js} +1 -1
- package/dist/{chunk-R6Z5XWY3.js → chunk-LUNMJQ7D.js} +49 -3
- package/dist/{chunk-Y5OFBCBZ.js → chunk-LXTPBU4K.js} +14 -10
- package/dist/{chunk-JBASI5VV.js → chunk-PNGAJ75P.js} +2 -2
- package/dist/{chunk-KOIMO7S3.js → chunk-QDQVOMBA.js} +21 -2
- package/dist/{chunk-56TBVRJG.js → chunk-RARSKPVT.js} +1 -1
- package/dist/{chunk-NFTMTIP3.js → chunk-SSWBYEFH.js} +26 -2
- package/dist/{chunk-4SCWV7TJ.js → chunk-Y3EG7S7P.js} +1 -1
- package/dist/{chunk-ZLMBNBUG.js → chunk-YLVJRYTD.js} +9 -1
- package/dist/cli/chat.js +6 -6
- package/dist/cli/check.js +2 -2
- package/dist/cli/plugins.js +6 -6
- package/dist/cli/snapshot-warmup.js +3 -3
- package/dist/cli/upgrade.js +7 -7
- package/dist/{db-7A7PFRGL.js → db-NGQ3JCMF.js} +1 -1
- package/dist/nitro.d.ts +4 -0
- package/dist/nitro.js +59 -3
- package/dist/{registry-OIPAJU2O.js → registry-RRIDPJBT.js} +1 -1
- package/dist/reporting.js +13 -24
- package/dist/{runner-7Z4D6AKV.js → runner-WW4GJFUB.js} +9 -9
- package/dist/{validation-SLA6IGF7.js → validation-MDMYBRFB.js} +2 -2
- package/package.json +5 -5
|
@@ -449,7 +449,7 @@ function destinationUpsertFromDestination(args) {
|
|
|
449
449
|
};
|
|
450
450
|
}
|
|
451
451
|
function executionStatusFromValue(value) {
|
|
452
|
-
if (value === "awaiting_resume" || value === "idle" || value === "pending" || value === "running") {
|
|
452
|
+
if (value === "awaiting_resume" || value === "failed" || value === "idle" || value === "pending" || value === "running") {
|
|
453
453
|
return value;
|
|
454
454
|
}
|
|
455
455
|
throw new Error("Conversation record execution status is invalid");
|
|
@@ -727,8 +727,8 @@ var SqlStore = class {
|
|
|
727
727
|
executionUpdatedAt: sql2`case when ${incomingExecutionIsFresh} then excluded.execution_updated_at else ${juniorConversations.executionUpdatedAt} end`,
|
|
728
728
|
executionStatus: sql2`case when ${incomingExecutionIsFresh} then excluded.execution_status else ${juniorConversations.executionStatus} end`,
|
|
729
729
|
runId: sql2`case when ${incomingExecutionIsFresh} then excluded.run_id else ${juniorConversations.runId} end`,
|
|
730
|
-
lastCheckpointAt: sql2`case when ${incomingExecutionIsFresh} then excluded.last_checkpoint_at else ${juniorConversations.lastCheckpointAt} end`,
|
|
731
|
-
lastEnqueuedAt: sql2`case when ${incomingExecutionIsFresh} then excluded.last_enqueued_at else ${juniorConversations.lastEnqueuedAt} end`
|
|
730
|
+
lastCheckpointAt: sql2`case when ${incomingExecutionIsFresh} then coalesce(excluded.last_checkpoint_at, ${juniorConversations.lastCheckpointAt}) else ${juniorConversations.lastCheckpointAt} end`,
|
|
731
|
+
lastEnqueuedAt: sql2`case when ${incomingExecutionIsFresh} then coalesce(excluded.last_enqueued_at, ${juniorConversations.lastEnqueuedAt}) else ${juniorConversations.lastEnqueuedAt} end`
|
|
732
732
|
}
|
|
733
733
|
});
|
|
734
734
|
}
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
isSnapshotMissingError,
|
|
11
11
|
resolveRuntimeDependencySnapshot,
|
|
12
12
|
runNonInteractiveCommand
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-PNGAJ75P.js";
|
|
14
14
|
import {
|
|
15
15
|
pluginTaskId,
|
|
16
16
|
pluginTaskParamsSchema,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
recordAuthorizationRequested,
|
|
29
29
|
recordMcpProviderConnected,
|
|
30
30
|
upsertAgentTurnSessionRecord
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-QDQVOMBA.js";
|
|
32
32
|
import {
|
|
33
33
|
createPluginEmbedder,
|
|
34
34
|
createPluginHookRunner,
|
|
@@ -39,14 +39,14 @@ import {
|
|
|
39
39
|
getPlugins,
|
|
40
40
|
getSlackToolContext,
|
|
41
41
|
resolveChannelCapabilities
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-SSWBYEFH.js";
|
|
43
43
|
import {
|
|
44
44
|
createPluginLogger,
|
|
45
45
|
createPluginState
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-RARSKPVT.js";
|
|
47
47
|
import {
|
|
48
48
|
getDb
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-237T7XAN.js";
|
|
50
50
|
import {
|
|
51
51
|
SANDBOX_DATA_ROOT,
|
|
52
52
|
SANDBOX_SKILLS_ROOT,
|
|
@@ -55,8 +55,9 @@ import {
|
|
|
55
55
|
sandboxSkillFile
|
|
56
56
|
} from "./chunk-G3E7SCME.js";
|
|
57
57
|
import {
|
|
58
|
+
acquireActiveLock,
|
|
58
59
|
getStateAdapter
|
|
59
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-LXTPBU4K.js";
|
|
60
61
|
import {
|
|
61
62
|
SlackActionError,
|
|
62
63
|
downloadPrivateSlackFile,
|
|
@@ -113,7 +114,7 @@ import {
|
|
|
113
114
|
findSkillByName,
|
|
114
115
|
loadSkillsByName,
|
|
115
116
|
parseSkillInvocation
|
|
116
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-Y3EG7S7P.js";
|
|
117
118
|
import {
|
|
118
119
|
createPluginBroker,
|
|
119
120
|
credentialContextSchema,
|
|
@@ -127,7 +128,7 @@ import {
|
|
|
127
128
|
isPluginConfigKey,
|
|
128
129
|
resolveAuthTokenPlaceholder,
|
|
129
130
|
resolvePluginCommandEnv
|
|
130
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-YLVJRYTD.js";
|
|
131
132
|
import {
|
|
132
133
|
createRequester,
|
|
133
134
|
parseActorUserId
|
|
@@ -752,7 +753,6 @@ var storedTokensSchema = pluginStoredTokensSchema;
|
|
|
752
753
|
var KEY_PREFIX = "oauth-token";
|
|
753
754
|
var BUFFER_MS = 24 * 60 * 60 * 1e3;
|
|
754
755
|
var LONG_LIVED_TTL_MS = 365 * 24 * 60 * 60 * 1e3;
|
|
755
|
-
var REFRESH_LOCK_TTL_MS = 3e4;
|
|
756
756
|
var REFRESH_LOCK_WAIT_MS = 3e4;
|
|
757
757
|
var REFRESH_LOCK_RETRY_MS = 100;
|
|
758
758
|
function tokenKey(userId, provider) {
|
|
@@ -787,7 +787,7 @@ var StateAdapterTokenStore = class {
|
|
|
787
787
|
const lockKey = refreshLockKey(userId, provider);
|
|
788
788
|
const deadline = Date.now() + REFRESH_LOCK_WAIT_MS;
|
|
789
789
|
while (true) {
|
|
790
|
-
const lock = await this.state
|
|
790
|
+
const lock = await acquireActiveLock(this.state, lockKey);
|
|
791
791
|
if (lock) {
|
|
792
792
|
try {
|
|
793
793
|
return await callback();
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
getDefaultRedisStateAdapterFor,
|
|
6
6
|
getStateAdapter
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LXTPBU4K.js";
|
|
8
8
|
import {
|
|
9
9
|
parseDestination,
|
|
10
10
|
sameDestination
|
|
@@ -74,7 +74,7 @@ function normalizeSource(value) {
|
|
|
74
74
|
return void 0;
|
|
75
75
|
}
|
|
76
76
|
function normalizeExecutionStatus(value) {
|
|
77
|
-
if (value === "awaiting_resume" || value === "idle" || value === "pending" || value === "running") {
|
|
77
|
+
if (value === "awaiting_resume" || value === "failed" || value === "idle" || value === "pending" || value === "running") {
|
|
78
78
|
return value;
|
|
79
79
|
}
|
|
80
80
|
return void 0;
|
|
@@ -231,8 +231,11 @@ function isLeaseActive(lease, nowMs) {
|
|
|
231
231
|
function pendingMessages(conversation) {
|
|
232
232
|
return [...conversation.execution.pendingMessages].sort(compareMessages);
|
|
233
233
|
}
|
|
234
|
+
function isRunnableStatus(status) {
|
|
235
|
+
return status !== "failed" && status !== "idle";
|
|
236
|
+
}
|
|
234
237
|
function hasRunnableWork(conversation) {
|
|
235
|
-
return conversation.execution.status
|
|
238
|
+
return isRunnableStatus(conversation.execution.status) || pendingMessages(conversation).length > 0;
|
|
236
239
|
}
|
|
237
240
|
function executionWithPendingMessages(execution, pending) {
|
|
238
241
|
const pendingMessages2 = [...pending].sort(compareMessages);
|
|
@@ -736,6 +739,48 @@ async function recordConversationActivity(args) {
|
|
|
736
739
|
});
|
|
737
740
|
});
|
|
738
741
|
}
|
|
742
|
+
async function recordConversationExecution(args) {
|
|
743
|
+
const nowMs = args.updatedAtMs;
|
|
744
|
+
await withConversationMutation(args, async (state) => {
|
|
745
|
+
const existing = await readConversation(state, args.conversationId);
|
|
746
|
+
if (existing && args.destination) {
|
|
747
|
+
assertSameConversationDestination({
|
|
748
|
+
conversationId: args.conversationId,
|
|
749
|
+
current: existing.destination,
|
|
750
|
+
next: args.destination
|
|
751
|
+
});
|
|
752
|
+
}
|
|
753
|
+
const current = existing ?? emptyConversation({
|
|
754
|
+
conversationId: args.conversationId,
|
|
755
|
+
destination: args.destination,
|
|
756
|
+
nowMs,
|
|
757
|
+
source: args.source
|
|
758
|
+
});
|
|
759
|
+
await writeConversation(
|
|
760
|
+
state,
|
|
761
|
+
withExecutionUpdate(
|
|
762
|
+
{
|
|
763
|
+
...current,
|
|
764
|
+
...current.destination ?? args.destination ? { destination: current.destination ?? args.destination } : {},
|
|
765
|
+
...current.source ?? args.source ? { source: current.source ?? args.source } : {},
|
|
766
|
+
...current.channelName ?? args.channelName ? { channelName: current.channelName ?? args.channelName } : {},
|
|
767
|
+
...current.requester ?? args.requester ? { requester: current.requester ?? args.requester } : {},
|
|
768
|
+
...current.title ?? args.title ? { title: current.title ?? args.title } : {},
|
|
769
|
+
createdAtMs: Math.min(current.createdAtMs, args.createdAtMs),
|
|
770
|
+
lastActivityAtMs: Math.max(
|
|
771
|
+
current.lastActivityAtMs,
|
|
772
|
+
args.lastActivityAtMs
|
|
773
|
+
)
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
...current.execution,
|
|
777
|
+
...args.execution
|
|
778
|
+
},
|
|
779
|
+
nowMs
|
|
780
|
+
)
|
|
781
|
+
);
|
|
782
|
+
});
|
|
783
|
+
}
|
|
739
784
|
async function markConversationWorkEnqueued(args) {
|
|
740
785
|
const nowMs = args.nowMs ?? now();
|
|
741
786
|
await withConversationMutation(args, async (state) => {
|
|
@@ -1061,6 +1106,7 @@ export {
|
|
|
1061
1106
|
appendInboundMessage,
|
|
1062
1107
|
requestConversationWork,
|
|
1063
1108
|
recordConversationActivity,
|
|
1109
|
+
recordConversationExecution,
|
|
1064
1110
|
markConversationWorkEnqueued,
|
|
1065
1111
|
startConversationWork,
|
|
1066
1112
|
checkInConversationWork,
|
|
@@ -5,7 +5,14 @@ import {
|
|
|
5
5
|
// src/chat/state/adapter.ts
|
|
6
6
|
import { createMemoryState } from "@chat-adapter/state-memory";
|
|
7
7
|
import { createRedisState } from "@chat-adapter/state-redis";
|
|
8
|
+
|
|
9
|
+
// src/chat/state/locks.ts
|
|
8
10
|
var ACTIVE_LOCK_TTL_MS = 9e4;
|
|
11
|
+
async function acquireActiveLock(state, threadId) {
|
|
12
|
+
return await state.acquireLock(threadId, ACTIVE_LOCK_TTL_MS);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// src/chat/state/adapter.ts
|
|
9
16
|
var ACTIVE_LOCK_HEARTBEAT_MS = 3e4;
|
|
10
17
|
var stateAdapter;
|
|
11
18
|
var redisStateAdapter;
|
|
@@ -53,8 +60,7 @@ function createPrefixedStateAdapter(base, prefix) {
|
|
|
53
60
|
}
|
|
54
61
|
function createQueuedStateAdapter(base, options) {
|
|
55
62
|
const heartbeats = /* @__PURE__ */ new Map();
|
|
56
|
-
const
|
|
57
|
-
const shouldHeartbeatLock = (ttlMs) => ttlMs <= ACTIVE_LOCK_TTL_MS;
|
|
63
|
+
const shouldHeartbeatLock = (ttlMs) => ttlMs === ACTIVE_LOCK_TTL_MS;
|
|
58
64
|
const heartbeatKey = (lock) => `${lock.threadId}:${lock.token}`;
|
|
59
65
|
const stopHeartbeatByKey = (key) => {
|
|
60
66
|
const heartbeat = heartbeats.get(key);
|
|
@@ -124,10 +130,9 @@ function createQueuedStateAdapter(base, options) {
|
|
|
124
130
|
});
|
|
125
131
|
};
|
|
126
132
|
const acquireLock = async (threadId, ttlMs) => {
|
|
127
|
-
const
|
|
128
|
-
const lock = await base.acquireLock(threadId, effectiveTtlMs);
|
|
133
|
+
const lock = await base.acquireLock(threadId, ttlMs);
|
|
129
134
|
if (lock && shouldHeartbeatLock(ttlMs)) {
|
|
130
|
-
startOrUpdateHeartbeat(lock,
|
|
135
|
+
startOrUpdateHeartbeat(lock, ttlMs);
|
|
131
136
|
}
|
|
132
137
|
return lock;
|
|
133
138
|
};
|
|
@@ -147,12 +152,11 @@ function createQueuedStateAdapter(base, options) {
|
|
|
147
152
|
await base.releaseLock(lock);
|
|
148
153
|
},
|
|
149
154
|
extendLock: async (lock, ttlMs) => {
|
|
150
|
-
const
|
|
151
|
-
const extended = await base.extendLock(lock, effectiveTtlMs);
|
|
155
|
+
const extended = await base.extendLock(lock, ttlMs);
|
|
152
156
|
if (extended) {
|
|
153
|
-
lock.expiresAt = Date.now() +
|
|
157
|
+
lock.expiresAt = Date.now() + ttlMs;
|
|
154
158
|
if (shouldHeartbeatLock(ttlMs)) {
|
|
155
|
-
startOrUpdateHeartbeat(lock,
|
|
159
|
+
startOrUpdateHeartbeat(lock, ttlMs);
|
|
156
160
|
} else {
|
|
157
161
|
stopHeartbeat(lock);
|
|
158
162
|
}
|
|
@@ -238,7 +242,7 @@ async function disconnectStateAdapter() {
|
|
|
238
242
|
}
|
|
239
243
|
|
|
240
244
|
export {
|
|
241
|
-
|
|
245
|
+
acquireActiveLock,
|
|
242
246
|
getConnectedStateContext,
|
|
243
247
|
getDefaultRedisStateAdapterFor,
|
|
244
248
|
getStateAdapter,
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "./chunk-G3E7SCME.js";
|
|
4
4
|
import {
|
|
5
5
|
getStateAdapter
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LXTPBU4K.js";
|
|
7
7
|
import {
|
|
8
8
|
toOptionalTrimmed
|
|
9
9
|
} from "./chunk-T77LUIX3.js";
|
|
10
10
|
import {
|
|
11
11
|
getPluginRuntimeDependencies,
|
|
12
12
|
getPluginRuntimePostinstall
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YLVJRYTD.js";
|
|
14
14
|
import {
|
|
15
15
|
withSpan
|
|
16
16
|
} from "./chunk-EJN6G5A2.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getConversationStore
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-237T7XAN.js";
|
|
4
4
|
import {
|
|
5
5
|
SANDBOX_DATA_ROOT,
|
|
6
6
|
SANDBOX_WORKSPACE_ROOT,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
getConnectedStateContext,
|
|
11
11
|
getStateAdapter
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LXTPBU4K.js";
|
|
13
13
|
import {
|
|
14
14
|
parseDestination
|
|
15
15
|
} from "./chunk-Q6XFTRV5.js";
|
|
@@ -1567,6 +1567,14 @@ function parseAgentTurnSessionStatus(parsed) {
|
|
|
1567
1567
|
function parseAgentTurnSurface(value) {
|
|
1568
1568
|
return value === "slack" || value === "api" || value === "scheduler" || value === "internal" ? value : void 0;
|
|
1569
1569
|
}
|
|
1570
|
+
function conversationExecutionFromSummary(summary) {
|
|
1571
|
+
const status = summary.state === "completed" || summary.state === "abandoned" ? "idle" : summary.state;
|
|
1572
|
+
return {
|
|
1573
|
+
status,
|
|
1574
|
+
runId: summary.sessionId,
|
|
1575
|
+
updatedAtMs: summary.updatedAtMs
|
|
1576
|
+
};
|
|
1577
|
+
}
|
|
1570
1578
|
function parseSource(value) {
|
|
1571
1579
|
const result = sourceSchema.safeParse(value);
|
|
1572
1580
|
return result.success ? result.data : void 0;
|
|
@@ -1690,6 +1698,17 @@ async function recordConversationActivityMetadata(args) {
|
|
|
1690
1698
|
requester: sessionLogRequester(args.summary.requester),
|
|
1691
1699
|
source
|
|
1692
1700
|
});
|
|
1701
|
+
await conversationStore.recordExecution({
|
|
1702
|
+
channelName: args.summary.channelName,
|
|
1703
|
+
conversationId: args.summary.conversationId,
|
|
1704
|
+
createdAtMs: args.summary.startedAtMs,
|
|
1705
|
+
destination: args.summary.destination,
|
|
1706
|
+
execution: conversationExecutionFromSummary(args.summary),
|
|
1707
|
+
lastActivityAtMs: args.summary.updatedAtMs,
|
|
1708
|
+
requester: sessionLogRequester(args.summary.requester),
|
|
1709
|
+
source,
|
|
1710
|
+
updatedAtMs: args.nowMs
|
|
1711
|
+
});
|
|
1693
1712
|
} catch (error) {
|
|
1694
1713
|
logWarn(
|
|
1695
1714
|
"conversation_activity_metadata_update_failed",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createPluginLogger,
|
|
3
3
|
createPluginState
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RARSKPVT.js";
|
|
5
5
|
import {
|
|
6
6
|
getDb
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-237T7XAN.js";
|
|
8
8
|
import {
|
|
9
9
|
SANDBOX_WORKSPACE_ROOT
|
|
10
10
|
} from "./chunk-G3E7SCME.js";
|
|
@@ -606,6 +606,29 @@ function getPluginRoutes() {
|
|
|
606
606
|
}
|
|
607
607
|
return routes;
|
|
608
608
|
}
|
|
609
|
+
function getPluginDashboardRoutes() {
|
|
610
|
+
const routes = [];
|
|
611
|
+
for (const plugin of getPlugins()) {
|
|
612
|
+
const pluginName = plugin.manifest.name;
|
|
613
|
+
const hook = plugin.hooks?.dashboardRoutes;
|
|
614
|
+
if (!hook) {
|
|
615
|
+
continue;
|
|
616
|
+
}
|
|
617
|
+
const app = hook({
|
|
618
|
+
...basePluginContext(plugin)
|
|
619
|
+
});
|
|
620
|
+
if (app === void 0) {
|
|
621
|
+
continue;
|
|
622
|
+
}
|
|
623
|
+
if (!isRecord(app) || typeof app.fetch !== "function") {
|
|
624
|
+
throw new Error(
|
|
625
|
+
`Plugin dashboardRoutes hook from plugin "${pluginName}" must return a fetch-compatible app`
|
|
626
|
+
);
|
|
627
|
+
}
|
|
628
|
+
routes.push({ app, pluginName });
|
|
629
|
+
}
|
|
630
|
+
return routes;
|
|
631
|
+
}
|
|
609
632
|
function trustedSlackConversationUrl(pluginName, link) {
|
|
610
633
|
const url = typeof link?.url === "string" ? link.url.trim() : "";
|
|
611
634
|
if (!url) {
|
|
@@ -958,6 +981,7 @@ export {
|
|
|
958
981
|
getPluginUserPromptContributions,
|
|
959
982
|
getPluginTools,
|
|
960
983
|
getPluginRoutes,
|
|
984
|
+
getPluginDashboardRoutes,
|
|
961
985
|
getPluginSlackConversationLink,
|
|
962
986
|
getPluginOperationalReports,
|
|
963
987
|
createPluginHookRunner
|
|
@@ -1638,11 +1638,19 @@ function registerPluginManifest(state, manifest, pluginDir, skillsDir, migration
|
|
|
1638
1638
|
}
|
|
1639
1639
|
function registerYamlPluginManifest(state, raw, pluginDir) {
|
|
1640
1640
|
const manifest = parsePluginManifest(raw, pluginDir, pluginConfig);
|
|
1641
|
+
const candidateSkillsDir = path.join(pluginDir, "skills");
|
|
1642
|
+
const hasSkillsDir = (() => {
|
|
1643
|
+
try {
|
|
1644
|
+
return statSync(candidateSkillsDir).isDirectory();
|
|
1645
|
+
} catch {
|
|
1646
|
+
return false;
|
|
1647
|
+
}
|
|
1648
|
+
})();
|
|
1641
1649
|
registerPluginManifest(
|
|
1642
1650
|
state,
|
|
1643
1651
|
manifest,
|
|
1644
1652
|
pluginDir,
|
|
1645
|
-
|
|
1653
|
+
hasSkillsDir ? candidateSkillsDir : void 0
|
|
1646
1654
|
);
|
|
1647
1655
|
}
|
|
1648
1656
|
function normalizePluginRoots(roots) {
|
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("../registry-
|
|
135
|
-
import("../validation-
|
|
136
|
-
import("../db-
|
|
133
|
+
import("../agent-hooks-OFDNZJB2.js"),
|
|
134
|
+
import("../registry-RRIDPJBT.js"),
|
|
135
|
+
import("../validation-MDMYBRFB.js"),
|
|
136
|
+
import("../db-NGQ3JCMF.js")
|
|
137
137
|
]);
|
|
138
138
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
139
139
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -193,7 +193,7 @@ async function runPrompt(options, io, pluginSet) {
|
|
|
193
193
|
defaultStateAdapterForLocalChat();
|
|
194
194
|
await configureLocalChatPlugins(pluginSet);
|
|
195
195
|
const conversationId = newRunConversationId();
|
|
196
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
196
|
+
const { runLocalAgentTurn } = await import("../runner-WW4GJFUB.js");
|
|
197
197
|
const result = await runLocalAgentTurn(
|
|
198
198
|
{
|
|
199
199
|
conversationId,
|
|
@@ -217,7 +217,7 @@ async function runInteractive(io, pluginSet) {
|
|
|
217
217
|
defaultStateAdapterForLocalChat();
|
|
218
218
|
await configureLocalChatPlugins(pluginSet);
|
|
219
219
|
const conversationId = newRunConversationId();
|
|
220
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
220
|
+
const { runLocalAgentTurn } = await import("../runner-WW4GJFUB.js");
|
|
221
221
|
const rl = readline.createInterface({
|
|
222
222
|
input: io.input,
|
|
223
223
|
output: io.output,
|
package/dist/cli/check.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseSkillFile
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-Y3EG7S7P.js";
|
|
4
4
|
import {
|
|
5
5
|
parseInlinePluginManifest,
|
|
6
6
|
parsePluginManifest
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-YLVJRYTD.js";
|
|
8
8
|
import "../chunk-VALUBQ7R.js";
|
|
9
9
|
import "../chunk-Q3XNY442.js";
|
|
10
10
|
import "../chunk-EJN6G5A2.js";
|
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-KIDP757T.js";
|
|
5
5
|
import {
|
|
6
6
|
pluginCatalogConfigFromPluginSet,
|
|
7
7
|
pluginCliRegistrationsFromPluginSet,
|
|
@@ -10,15 +10,15 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
setPlugins,
|
|
12
12
|
validatePlugins
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-SSWBYEFH.js";
|
|
14
14
|
import {
|
|
15
15
|
createPluginLogger
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-RARSKPVT.js";
|
|
17
17
|
import {
|
|
18
18
|
getDb
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-237T7XAN.js";
|
|
20
20
|
import "../chunk-G3E7SCME.js";
|
|
21
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-LXTPBU4K.js";
|
|
22
22
|
import "../chunk-Q6XFTRV5.js";
|
|
23
23
|
import "../chunk-T77LUIX3.js";
|
|
24
24
|
import {
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
} from "../chunk-Y2CM7HXH.js";
|
|
27
27
|
import {
|
|
28
28
|
setPluginCatalogConfig
|
|
29
|
-
} from "../chunk-
|
|
29
|
+
} from "../chunk-YLVJRYTD.js";
|
|
30
30
|
import "../chunk-VALUBQ7R.js";
|
|
31
31
|
import "../chunk-Q3XNY442.js";
|
|
32
32
|
import "../chunk-EJN6G5A2.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveRuntimeDependencySnapshot
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-PNGAJ75P.js";
|
|
4
4
|
import "../chunk-G3E7SCME.js";
|
|
5
5
|
import {
|
|
6
6
|
disconnectStateAdapter
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-LXTPBU4K.js";
|
|
8
8
|
import "../chunk-T77LUIX3.js";
|
|
9
9
|
import {
|
|
10
10
|
getPluginProviders,
|
|
11
11
|
getPluginRuntimeDependencies,
|
|
12
12
|
getPluginRuntimePostinstall
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-YLVJRYTD.js";
|
|
14
14
|
import "../chunk-VALUBQ7R.js";
|
|
15
15
|
import "../chunk-Q3XNY442.js";
|
|
16
16
|
import "../chunk-EJN6G5A2.js";
|
package/dist/cli/upgrade.js
CHANGED
|
@@ -2,8 +2,9 @@ import {
|
|
|
2
2
|
getConversation,
|
|
3
3
|
listConversationsByActivity,
|
|
4
4
|
recordConversationActivity,
|
|
5
|
+
recordConversationExecution,
|
|
5
6
|
requestConversationWork
|
|
6
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-LUNMJQ7D.js";
|
|
7
8
|
import {
|
|
8
9
|
JUNIOR_THREAD_STATE_TTL_MS,
|
|
9
10
|
coerceThreadConversationState
|
|
@@ -17,16 +18,16 @@ import {
|
|
|
17
18
|
import {
|
|
18
19
|
createPluginLogger,
|
|
19
20
|
createPluginState
|
|
20
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-RARSKPVT.js";
|
|
21
22
|
import {
|
|
22
23
|
createJuniorSqlExecutor,
|
|
23
24
|
createSqlStore,
|
|
24
25
|
getDb
|
|
25
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-237T7XAN.js";
|
|
26
27
|
import {
|
|
27
28
|
disconnectStateAdapter,
|
|
28
29
|
getConnectedStateContext
|
|
29
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-LXTPBU4K.js";
|
|
30
31
|
import {
|
|
31
32
|
parseDestination,
|
|
32
33
|
sameDestination
|
|
@@ -40,7 +41,7 @@ import {
|
|
|
40
41
|
import {
|
|
41
42
|
getPluginMigrationRoots,
|
|
42
43
|
setPluginCatalogConfig
|
|
43
|
-
} from "../chunk-
|
|
44
|
+
} from "../chunk-YLVJRYTD.js";
|
|
44
45
|
import "../chunk-VALUBQ7R.js";
|
|
45
46
|
import "../chunk-Q3XNY442.js";
|
|
46
47
|
import {
|
|
@@ -75,8 +76,7 @@ function createStateConversationStore(state) {
|
|
|
75
76
|
return {
|
|
76
77
|
get: (args) => getConversation({ ...args, state }),
|
|
77
78
|
recordActivity: (args) => recordConversationActivity({ ...args, state }),
|
|
78
|
-
recordExecution:
|
|
79
|
-
},
|
|
79
|
+
recordExecution: (args) => recordConversationExecution({ ...args, state }),
|
|
80
80
|
listByActivity: (args) => listConversationsByActivity({ ...args, state })
|
|
81
81
|
};
|
|
82
82
|
}
|
package/dist/nitro.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type JuniorPluginSet } from "./plugins";
|
|
2
|
+
import type { JuniorDashboardOptions } from "./app";
|
|
3
|
+
export type JuniorNitroDashboardOptions = Omit<JuniorDashboardOptions, "reporting">;
|
|
2
4
|
export interface JuniorPluginModuleReference {
|
|
3
5
|
/** Runtime-safe module that exports a `defineJuniorPlugins(...)` set. */
|
|
4
6
|
module: string;
|
|
@@ -8,6 +10,8 @@ export interface JuniorPluginModuleReference {
|
|
|
8
10
|
export type JuniorNitroPluginSource = JuniorPluginModuleReference | JuniorPluginSet | string;
|
|
9
11
|
export interface JuniorNitroOptions {
|
|
10
12
|
cwd?: string;
|
|
13
|
+
/** Authenticated dashboard configuration injected for createApp(). */
|
|
14
|
+
dashboard?: JuniorNitroDashboardOptions;
|
|
11
15
|
maxDuration?: number;
|
|
12
16
|
/** Vercel Queue topic for durable conversation work. Must match the runtime queue producer topic. */
|
|
13
17
|
conversationWorkQueueTopic?: string;
|