@productbrain/mcp 0.0.1-beta.12332 → 0.0.1-beta.12342
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/{chunk-MAMOO7UB.js → chunk-C4TYYBLL.js} +2 -28
- package/dist/chunk-C4TYYBLL.js.map +1 -0
- package/dist/{chunk-2IAKR6T4.js → chunk-QXBKHFWZ.js} +21 -19
- package/dist/{chunk-2IAKR6T4.js.map → chunk-QXBKHFWZ.js.map} +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/http.js +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/{setup-HG2UANX5.js → setup-RMEYY262.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-MAMOO7UB.js.map +0 -1
- /package/dist/{setup-HG2UANX5.js.map → setup-RMEYY262.js.map} +0 -0
|
@@ -27,7 +27,6 @@ function newKeyState() {
|
|
|
27
27
|
apiKeyId: null,
|
|
28
28
|
apiKeyScope: "readwrite",
|
|
29
29
|
sessionOriented: false,
|
|
30
|
-
sessionClosed: false,
|
|
31
30
|
lastAccess: Date.now(),
|
|
32
31
|
deploymentUrl: null
|
|
33
32
|
};
|
|
@@ -1017,12 +1016,6 @@ var GATE_PATTERNS = [
|
|
|
1017
1016
|
recovery: PASS_SESSION_ID,
|
|
1018
1017
|
action: { tool: "session", description: "Start session", parameters: { action: "start" } }
|
|
1019
1018
|
},
|
|
1020
|
-
{
|
|
1021
|
-
pattern: /session.*closed/i,
|
|
1022
|
-
code: "SESSION_CLOSED",
|
|
1023
|
-
recovery: "Start a new session.",
|
|
1024
|
-
action: { tool: "session", description: "Start new session", parameters: { action: "start" } }
|
|
1025
|
-
},
|
|
1026
1019
|
{
|
|
1027
1020
|
pattern: /orientation required|call.*orient/i,
|
|
1028
1021
|
code: "ORIENTATION_REQUIRED",
|
|
@@ -1290,7 +1283,6 @@ var _stdioState = {
|
|
|
1290
1283
|
apiKeyId: null,
|
|
1291
1284
|
apiKeyScope: "readwrite",
|
|
1292
1285
|
sessionOriented: false,
|
|
1293
|
-
sessionClosed: false,
|
|
1294
1286
|
lastAccess: 0,
|
|
1295
1287
|
deploymentUrl: null
|
|
1296
1288
|
};
|
|
@@ -1325,7 +1317,7 @@ function sessionLifecycle() {
|
|
|
1325
1317
|
const oldest = _sessionLifecycleByStream.keys().next().value;
|
|
1326
1318
|
if (oldest !== void 0) _sessionLifecycleByStream.delete(oldest);
|
|
1327
1319
|
}
|
|
1328
|
-
lc = { agentSessionId: null, sessionOriented: false
|
|
1320
|
+
lc = { agentSessionId: null, sessionOriented: false };
|
|
1329
1321
|
_sessionLifecycleByStream.set(key, lc);
|
|
1330
1322
|
}
|
|
1331
1323
|
return lc;
|
|
@@ -1367,7 +1359,6 @@ async function startAgentSession(role, team) {
|
|
|
1367
1359
|
lc.agentSessionId = result.sessionId;
|
|
1368
1360
|
s.apiKeyScope = result.toolsScope;
|
|
1369
1361
|
lc.sessionOriented = false;
|
|
1370
|
-
lc.sessionClosed = false;
|
|
1371
1362
|
resetTouchThrottle(result.sessionId);
|
|
1372
1363
|
return result;
|
|
1373
1364
|
}
|
|
@@ -1382,7 +1373,6 @@ async function closeAgentSession() {
|
|
|
1382
1373
|
});
|
|
1383
1374
|
} finally {
|
|
1384
1375
|
resetTouchThrottle(sessionId);
|
|
1385
|
-
lc.sessionClosed = true;
|
|
1386
1376
|
lc.agentSessionId = null;
|
|
1387
1377
|
lc.sessionOriented = false;
|
|
1388
1378
|
}
|
|
@@ -1647,11 +1637,6 @@ function requireActiveSession() {
|
|
|
1647
1637
|
"Active session required (SOS-iszqu7). Call `session action=start` then `orient` first."
|
|
1648
1638
|
);
|
|
1649
1639
|
}
|
|
1650
|
-
if (lc.sessionClosed) {
|
|
1651
|
-
throw new Error(
|
|
1652
|
-
"Session has been closed (SOS-iszqu7). Start a new session with `session action=start`."
|
|
1653
|
-
);
|
|
1654
|
-
}
|
|
1655
1640
|
}
|
|
1656
1641
|
function requireWriteAccess() {
|
|
1657
1642
|
const lc = sessionLifecycle();
|
|
@@ -1659,11 +1644,6 @@ function requireWriteAccess() {
|
|
|
1659
1644
|
if (!lc.agentSessionId) {
|
|
1660
1645
|
throw new Error(`Agent session required for write operations. ${PASS_SESSION_ID}`);
|
|
1661
1646
|
}
|
|
1662
|
-
if (lc.sessionClosed) {
|
|
1663
|
-
throw new Error(
|
|
1664
|
-
"Agent session has been closed. Write tools are no longer available."
|
|
1665
|
-
);
|
|
1666
|
-
}
|
|
1667
1647
|
if (s.apiKeyScope === "read") {
|
|
1668
1648
|
throw new Error(
|
|
1669
1649
|
"This API key has read-only scope. Write tools are not available."
|
|
@@ -1678,11 +1658,6 @@ function requireVendorTriageAccess() {
|
|
|
1678
1658
|
"Agent session required for feedback triage. Call `session action=start` first."
|
|
1679
1659
|
);
|
|
1680
1660
|
}
|
|
1681
|
-
if (lc.sessionClosed) {
|
|
1682
|
-
throw new Error(
|
|
1683
|
-
"Agent session has been closed. Feedback triage is no longer available."
|
|
1684
|
-
);
|
|
1685
|
-
}
|
|
1686
1661
|
if (s.apiKeyScope === "read") {
|
|
1687
1662
|
throw new Error(
|
|
1688
1663
|
"This API key has read-only scope. Feedback triage is not available."
|
|
@@ -1705,7 +1680,6 @@ async function recoverSessionState() {
|
|
|
1705
1680
|
lc.agentSessionId = session._id;
|
|
1706
1681
|
lc.sessionOriented = session.oriented;
|
|
1707
1682
|
s.apiKeyScope = session.toolsScope;
|
|
1708
|
-
lc.sessionClosed = false;
|
|
1709
1683
|
}
|
|
1710
1684
|
} catch {
|
|
1711
1685
|
}
|
|
@@ -1792,4 +1766,4 @@ export {
|
|
|
1792
1766
|
appUrl,
|
|
1793
1767
|
apiKeysUrl
|
|
1794
1768
|
};
|
|
1795
|
-
//# sourceMappingURL=chunk-
|
|
1769
|
+
//# sourceMappingURL=chunk-C4TYYBLL.js.map
|