kojee-mcp 0.5.4 → 0.5.7
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/README.md +24 -5
- package/dist/{chunk-36L3GCU3.js → chunk-3XDJOHMZ.js} +12 -2
- package/dist/chunk-6SK6ITFE.js +142 -0
- package/dist/{chunk-62KH6VNQ.js → chunk-GATXJ6UT.js} +122 -190
- package/dist/{control-token-TYDAL477.js → chunk-GI2CKKBL.js} +13 -2
- package/dist/{resubscribe-SLZNA76S.js → chunk-OT2GILXC.js} +1 -0
- package/dist/{chunk-YVUXQ4Z2.js → chunk-UEGQGXPY.js} +53 -8
- package/dist/{chunk-OSKHA5DS.js → chunk-V5VZPYMZ.js} +2 -2
- package/dist/cli.js +19 -24
- package/dist/control-token-4BUCTYQB.js +13 -0
- package/dist/{doctor-TXWMMSRC.js → doctor-QCQDFLEH.js} +29 -16
- package/dist/{doctor-codex-3A7KYOVX.js → doctor-codex-NZ53ROQA.js} +3 -3
- package/dist/ensure-join-7AEDJMPE.js +96 -0
- package/dist/gateway-client-93P1E0CZ.d.ts +92 -0
- package/dist/{hook-server-NDJSV22J.js → hook-server-37E2LUKJ.js} +6 -0
- package/dist/index.d.ts +18 -15
- package/dist/index.js +7 -4
- package/dist/lib.d.ts +427 -0
- package/dist/lib.js +44 -0
- package/dist/parent-watchdog-RZLHYP7T.js +65 -0
- package/dist/reconnect-scheduler-ARV6JIWK.js +36 -0
- package/dist/resubscribe-G5OGDZJD.js +6 -0
- package/dist/{send-cli-7QJ36YY7.js → send-cli-C2F4WTBN.js} +1 -1
- package/dist/{stop-hook-GO363SMD.js → stop-hook-46BJD55B.js} +15 -7
- package/dist/{tail-stream-U436QL2X.js → tail-stream-VUZBYKXS.js} +4 -4
- package/dist/{user-prompt-submit-hook-ARPEO6FF.js → user-prompt-submit-hook-ZD2XKN7U.js} +7 -1
- package/dist/{webhook-config-UKUSI2FE.js → webhook-config-O4WMQ532.js} +1 -1
- package/dist/{webhook-sink-GCLL2S6S.js → webhook-sink-NWGCUDGY.js} +17 -3
- package/dist/{wizard-Z5JA3YPV.js → wizard-UOXQYJLP.js} +7 -7
- package/package.json +11 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WEBHOOK_DEFAULT_SIGNATURE_HEADER,
|
|
3
3
|
WEBHOOK_DEFAULT_SIGNATURE_PREFIX
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-V5VZPYMZ.js";
|
|
5
5
|
|
|
6
6
|
// src/tandem/webhook-sink.ts
|
|
7
7
|
import crypto from "crypto";
|
|
@@ -39,6 +39,7 @@ function createWebhookSink(config, options = {}) {
|
|
|
39
39
|
let draining = false;
|
|
40
40
|
const stats = {
|
|
41
41
|
delivered: 0,
|
|
42
|
+
deliveredUnconfirmed: 0,
|
|
42
43
|
dropped: 0,
|
|
43
44
|
overflowDropped: 0,
|
|
44
45
|
queueDepth: 0,
|
|
@@ -64,7 +65,11 @@ function createWebhookSink(config, options = {}) {
|
|
|
64
65
|
}
|
|
65
66
|
async function attempt(item) {
|
|
66
67
|
const controller = new AbortController();
|
|
67
|
-
|
|
68
|
+
let timedOut = false;
|
|
69
|
+
const timer = setTimeout(() => {
|
|
70
|
+
timedOut = true;
|
|
71
|
+
controller.abort();
|
|
72
|
+
}, config.timeoutMs);
|
|
68
73
|
try {
|
|
69
74
|
const res = await fetchImpl(config.url, {
|
|
70
75
|
method: "POST",
|
|
@@ -81,7 +86,7 @@ function createWebhookSink(config, options = {}) {
|
|
|
81
86
|
});
|
|
82
87
|
return classifyStatus(res.status);
|
|
83
88
|
} catch {
|
|
84
|
-
return "retry";
|
|
89
|
+
return timedOut ? "timeout" : "retry";
|
|
85
90
|
} finally {
|
|
86
91
|
clearTimeout(timer);
|
|
87
92
|
}
|
|
@@ -96,6 +101,15 @@ function createWebhookSink(config, options = {}) {
|
|
|
96
101
|
stats.lastAttemptAt = Date.now();
|
|
97
102
|
return;
|
|
98
103
|
}
|
|
104
|
+
if (outcome === "timeout") {
|
|
105
|
+
stats.deliveredUnconfirmed += 1;
|
|
106
|
+
stats.lastOutcome = "delivered-unconfirmed";
|
|
107
|
+
stats.lastAttemptAt = Date.now();
|
|
108
|
+
log(
|
|
109
|
+
`delivery=${item.deliveryId} delivered-unconfirmed (receiver slow: no response within ${config.timeoutMs}ms) \u2014 not retrying, a re-POST could duplicate the receiver's side effects`
|
|
110
|
+
);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
99
113
|
if (outcome === "permanent") {
|
|
100
114
|
stats.dropped += 1;
|
|
101
115
|
stats.lastOutcome = "dropped";
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
WIZARD_RUNTIMES,
|
|
3
|
+
isWizardRuntime
|
|
4
|
+
} from "./chunk-LVL25VLO.js";
|
|
1
5
|
import {
|
|
2
6
|
clearRuntimeRecord,
|
|
3
7
|
readRecordedRuntime,
|
|
@@ -13,9 +17,9 @@ import {
|
|
|
13
17
|
kojeeHomeDir
|
|
14
18
|
} from "./chunk-SQL56SEB.js";
|
|
15
19
|
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} from "./chunk-
|
|
20
|
+
resolveSignatureEmission,
|
|
21
|
+
resolveWebhookConfig
|
|
22
|
+
} from "./chunk-V5VZPYMZ.js";
|
|
19
23
|
import {
|
|
20
24
|
CODEX_LISTEN_CAP_MS,
|
|
21
25
|
buildWebhookReceiverNote
|
|
@@ -23,10 +27,6 @@ import {
|
|
|
23
27
|
import {
|
|
24
28
|
secureFile
|
|
25
29
|
} from "./chunk-BLEGIR35.js";
|
|
26
|
-
import {
|
|
27
|
-
resolveSignatureEmission,
|
|
28
|
-
resolveWebhookConfig
|
|
29
|
-
} from "./chunk-OSKHA5DS.js";
|
|
30
30
|
|
|
31
31
|
// src/wizard/wizard.ts
|
|
32
32
|
import crypto from "crypto";
|
package/package.json
CHANGED
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kojee-mcp",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./dist/index.js",
|
|
8
|
+
"./lib": {
|
|
9
|
+
"types": "./dist/lib.d.ts",
|
|
10
|
+
"default": "./dist/lib.js"
|
|
11
|
+
},
|
|
12
|
+
"./package.json": "./package.json"
|
|
13
|
+
},
|
|
6
14
|
"bin": {
|
|
7
15
|
"kojee-mcp": "dist/cli.js"
|
|
8
16
|
},
|
|
9
17
|
"_buildNote": "src/version.ts resolves package.json via '../package.json' from import.meta.url; this assumes dist output stays flat one level under the package root (tsup default outDir=dist, no nesting). If the build adds outDir nesting or a deeper entry, update version.ts's relative path.",
|
|
10
18
|
"scripts": {
|
|
11
|
-
"build": "tsup src/cli.ts src/index.ts --format esm --dts --clean",
|
|
19
|
+
"build": "tsup src/cli.ts src/index.ts src/lib.ts --format esm --dts --clean",
|
|
20
|
+
"prepublishOnly": "npm run build && node scripts/verify-tarball.mjs",
|
|
12
21
|
"dev": "tsup src/cli.ts --format esm --watch",
|
|
13
22
|
"typecheck": "tsc --noEmit",
|
|
14
23
|
"test": "vitest run",
|