poe-code 17.0.38 → 17.0.40
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 +1 -1
- package/dist/agent.js +0 -3
- package/dist/{chunk-SGMFFL57.js → chunk-2GGWYM5C.js} +5 -5
- package/dist/{chunk-NBD2QUZU.js → chunk-4DP4GOVF.js} +9 -1
- package/dist/{chunk-MP2ZN45M.js → chunk-4ZBE6ANW.js} +6 -6
- package/dist/{chunk-ESDPNFK7.js → chunk-7T6WKXT5.js} +6 -6
- package/dist/{chunk-5LEKGHKB.js → chunk-BN5KYLDI.js} +3 -3
- package/dist/{chunk-UKB4PH3Q.js → chunk-HKQ7ZHZA.js} +2 -2
- package/dist/{chunk-7LYL6372.js → chunk-IDRDSIOP.js} +3 -3
- package/dist/{chunk-JRZIA6G4.js → chunk-JVMHBAZW.js} +2 -2
- package/dist/{chunk-ROLXI55L.js → chunk-K4MLQWL6.js} +3 -3
- package/dist/{chunk-OIIB3M4A.js → chunk-NT4FTHR4.js} +3 -3
- package/dist/{chunk-AARUTDF3.js → chunk-OY52WCN2.js} +19 -18
- package/dist/{chunk-CKB7K5UU.js → chunk-QVJA76GB.js} +2 -2
- package/dist/{chunk-Q5UFHZBH.js → chunk-VNSPEKB3.js} +4 -4
- package/dist/{chunk-C5DKZUMH.js → chunk-WGSSARPT.js} +5 -5
- package/dist/{chunk-VPER5WBJ.js → chunk-Z2WKAT24.js} +4 -4
- package/dist/cli-entry.js +1 -1
- package/dist/{core-E763OJ6K.js → core-IC47O6D5.js} +5 -5
- package/dist/{ensure-isolated-config-XXVV7SPC.js → ensure-isolated-config-DP3OWAO5.js} +5 -5
- package/dist/{gh-TBXFLS7Q.js → gh-4NV3GGL7.js} +2 -2
- package/dist/index.js +8 -8
- package/dist/metafile.json +1 -1
- package/dist/{node-PE54ZYII.js → node-KLOI6VAC.js} +4 -4
- package/dist/{poe-agent-VQTC5F2H.js → poe-agent-3TNLVOGW.js} +4 -4
- package/dist/{program-7KSXQLUA.js → program-FEKNPTII.js} +11 -11
- package/dist/providers/poe-agent.js +28 -19
- package/dist/safe-bash-worker-entry.js +3 -3
- package/dist/safe-bash.js +6 -6
- package/dist/{search-DRUQQER6.js → search-QRQVPOLJ.js} +3 -3
- package/dist/shared/safe-js/chunks/{chunk-T76YLX4V.js → chunk-CATT3NXL.js} +2 -2
- package/dist/shared/safe-js/chunks/{chunk-IMBIHHDW.js → chunk-L3QK6FH4.js} +19 -18
- package/dist/shared/safe-js/chunks/{cli-runtime-7QFSS3VJ.js → cli-runtime-UGTDRU7A.js} +3 -3
- package/dist/shared/safe-js/chunks/{mcp-Q7KNMDFG.js → mcp-MZNG3TYT.js} +3 -3
- package/dist/shared/safe-js/cli.js +2 -2
- package/dist/shared/safe-js/index.js +2 -2
- package/dist/{spawn-ESHW36HT.js → spawn-JVTZA4J2.js} +5 -5
- package/dist/{src-U6FPUTZY.js → src-KFIZ3ZHC.js} +7 -7
- package/dist/{src-O7RLS5KL.js → src-SMC2KSW6.js} +3 -3
- package/package.json +1 -1
- package/packages/mcp-oauth/dist/client/authorization-error.js +16 -0
- package/packages/mcp-oauth/dist/client/loopback-authorization.js +2 -16
- package/packages/mcp-oauth/dist/index.browser.js +18 -0
- package/packages/safe-bash/dist/chunks/{chunk-FVAPSB7V.js → chunk-6YWMJV24.js} +9 -1
- package/packages/safe-bash/dist/chunks/{chunk-QCD3LTEK.js → chunk-BK5SQPI2.js} +2 -2
- package/packages/safe-bash/dist/chunks/{chunk-5OOPK32K.js → chunk-MH6MCUVD.js} +2 -2
- package/packages/safe-bash/dist/chunks/{chunk-N2T46LIN.js → chunk-TJVZY5W4.js} +2 -2
- package/packages/safe-bash/dist/chunks/{gh-VURXZAIJ.js → gh-JPPD7RUG.js} +3 -3
- package/packages/safe-bash/dist/commands/xml/index.browser.js +2 -2
- package/packages/safe-bash/dist/commands/yq/index.browser.js +3 -3
- package/packages/safe-bash/dist/core.browser.js +5 -5
- package/packages/safe-bash/dist/playwright/capability-events.js +12 -2
- package/packages/safe-bash/dist/playwright/controller.js +38 -30
- package/packages/superintendent/dist/mcp.js +31 -22
- package/packages/tiny-mcp-client/dist/index.browser.js +6689 -0
- package/packages/tiny-mcp-client/dist/index.js +18 -17
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Shell
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QVJA76GB.js";
|
|
4
4
|
import "./chunk-IK3EFB2F.js";
|
|
5
5
|
import "./chunk-EKKIZII7.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-HKQ7ZHZA.js";
|
|
7
7
|
import "./chunk-SGBTWSJI.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-4DP4GOVF.js";
|
|
9
9
|
import "./chunk-ZRTXOGMR.js";
|
|
10
10
|
import "./chunk-BJFELBZS.js";
|
|
11
11
|
import "./chunk-YEPD65CG.js";
|
|
@@ -18,4 +18,4 @@ import "./chunk-EF3O5H2F.js";
|
|
|
18
18
|
export {
|
|
19
19
|
Shell
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=node-
|
|
21
|
+
//# sourceMappingURL=node-KLOI6VAC.js.map
|
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
poeAgentService,
|
|
3
3
|
provider,
|
|
4
4
|
spawnPoeAgentWithAcp
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-WGSSARPT.js";
|
|
6
|
+
import "./chunk-NT4FTHR4.js";
|
|
7
|
+
import "./chunk-OY52WCN2.js";
|
|
8
8
|
import "./chunk-YBCIRQCC.js";
|
|
9
9
|
import "./chunk-EVMLCUGX.js";
|
|
10
10
|
import "./chunk-EF3O5H2F.js";
|
|
@@ -13,4 +13,4 @@ export {
|
|
|
13
13
|
provider,
|
|
14
14
|
spawnPoeAgentWithAcp
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=poe-agent-
|
|
16
|
+
//# sourceMappingURL=poe-agent-3TNLVOGW.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
spawnPoeAgentWithAcp
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WGSSARPT.js";
|
|
4
4
|
import {
|
|
5
5
|
combineMutationObservers,
|
|
6
6
|
createConfigurePayload,
|
|
7
7
|
createMutationReporter
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BN5KYLDI.js";
|
|
9
9
|
import {
|
|
10
10
|
GASLIGHT_CONFIG_EXAMPLE,
|
|
11
11
|
appendExperimentJournalEntry,
|
|
@@ -78,7 +78,7 @@ import {
|
|
|
78
78
|
traceReaders,
|
|
79
79
|
validateResolvedPromptVars,
|
|
80
80
|
writeFrontmatter
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-7T6WKXT5.js";
|
|
82
82
|
import {
|
|
83
83
|
checkAuth,
|
|
84
84
|
createCliEnvironment,
|
|
@@ -100,7 +100,7 @@ import {
|
|
|
100
100
|
spawn as spawn2,
|
|
101
101
|
spawnAutonomous,
|
|
102
102
|
usesLegacyPoeCredentialMirror
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-2GGWYM5C.js";
|
|
104
104
|
import {
|
|
105
105
|
announceAssumedScope,
|
|
106
106
|
apiKeyFlagDescription,
|
|
@@ -133,7 +133,7 @@ import {
|
|
|
133
133
|
resolveSpawnTarget,
|
|
134
134
|
shlexQuote,
|
|
135
135
|
warnApiKeyFlag
|
|
136
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-IDRDSIOP.js";
|
|
137
137
|
import {
|
|
138
138
|
ApprovalDeclinedError,
|
|
139
139
|
LOG_LEVELS,
|
|
@@ -179,7 +179,7 @@ import {
|
|
|
179
179
|
throwValidationErrors,
|
|
180
180
|
validateServices,
|
|
181
181
|
writeErrorReport
|
|
182
|
-
} from "./chunk-
|
|
182
|
+
} from "./chunk-NT4FTHR4.js";
|
|
183
183
|
import {
|
|
184
184
|
ErrorLogger
|
|
185
185
|
} from "./chunk-NO7WNABG.js";
|
|
@@ -290,7 +290,7 @@ import {
|
|
|
290
290
|
validate,
|
|
291
291
|
verifyGhProject,
|
|
292
292
|
writeScope
|
|
293
|
-
} from "./chunk-
|
|
293
|
+
} from "./chunk-OY52WCN2.js";
|
|
294
294
|
import {
|
|
295
295
|
UserError as UserError2,
|
|
296
296
|
isUserError as isUserError2
|
|
@@ -7636,7 +7636,7 @@ function registerAgentCommand(program, container) {
|
|
|
7636
7636
|
}
|
|
7637
7637
|
const requestedModel = model;
|
|
7638
7638
|
await assertModelIsInCatalog(container, requestedModel, apiKey);
|
|
7639
|
-
const { createAgentSession } = await import("./src-
|
|
7639
|
+
const { createAgentSession } = await import("./src-SMC2KSW6.js");
|
|
7640
7640
|
session = await createAgentSession({
|
|
7641
7641
|
model: requestedModel,
|
|
7642
7642
|
apiKey,
|
|
@@ -7760,7 +7760,7 @@ function registerBashCommand(program) {
|
|
|
7760
7760
|
});
|
|
7761
7761
|
try {
|
|
7762
7762
|
if (ui) await once(ui, "open");
|
|
7763
|
-
const { MemoryFileSystem, RealFileSystem } = await import("./src-
|
|
7763
|
+
const { MemoryFileSystem, RealFileSystem } = await import("./src-KFIZ3ZHC.js");
|
|
7764
7764
|
const totals = { upload: 0, download: 0 };
|
|
7765
7765
|
const result = await runBash({
|
|
7766
7766
|
...dryRun ? { dryRun: true } : {},
|
|
@@ -10069,7 +10069,7 @@ async function executeTest(program, container, service, options = {}) {
|
|
|
10069
10069
|
return runtimeEnvPromise;
|
|
10070
10070
|
} : void 0;
|
|
10071
10071
|
if (useIsolated) {
|
|
10072
|
-
const { ensureIsolatedConfigForService } = await import("./ensure-isolated-config-
|
|
10072
|
+
const { ensureIsolatedConfigForService } = await import("./ensure-isolated-config-DP3OWAO5.js");
|
|
10073
10073
|
await ensureIsolatedConfigForService({
|
|
10074
10074
|
container,
|
|
10075
10075
|
adapter,
|
|
@@ -24070,4 +24070,4 @@ function suppressCommanderOutput(command) {
|
|
|
24070
24070
|
export {
|
|
24071
24071
|
createProgram
|
|
24072
24072
|
};
|
|
24073
|
-
//# sourceMappingURL=program-
|
|
24073
|
+
//# sourceMappingURL=program-FEKNPTII.js.map
|
|
@@ -220703,6 +220703,30 @@ var init_authorization_state = __esm({
|
|
|
220703
220703
|
}
|
|
220704
220704
|
});
|
|
220705
220705
|
|
|
220706
|
+
// packages/mcp-oauth/src/client/authorization-error.ts
|
|
220707
|
+
var authorizationErrorBrand, OAuthAuthorizationError;
|
|
220708
|
+
var init_authorization_error = __esm({
|
|
220709
|
+
"packages/mcp-oauth/src/client/authorization-error.ts"() {
|
|
220710
|
+
"use strict";
|
|
220711
|
+
authorizationErrorBrand = /* @__PURE__ */ Symbol.for("poe-platform.mcp-oauth.OAuthAuthorizationError");
|
|
220712
|
+
OAuthAuthorizationError = class extends Error {
|
|
220713
|
+
constructor(error2, errorDescription) {
|
|
220714
|
+
super(`OAuth authorization failed: ${error2} \u2014 ${errorDescription}`);
|
|
220715
|
+
this.error = error2;
|
|
220716
|
+
this.errorDescription = errorDescription;
|
|
220717
|
+
this.name = "OAuthAuthorizationError";
|
|
220718
|
+
Object.defineProperty(this, authorizationErrorBrand, { value: true });
|
|
220719
|
+
}
|
|
220720
|
+
error;
|
|
220721
|
+
errorDescription;
|
|
220722
|
+
/** Recognize errors from separately bundled copies of this package. */
|
|
220723
|
+
static is(value2) {
|
|
220724
|
+
return value2 instanceof Error && Object.getOwnPropertyDescriptor(value2, authorizationErrorBrand)?.value === true;
|
|
220725
|
+
}
|
|
220726
|
+
};
|
|
220727
|
+
}
|
|
220728
|
+
});
|
|
220729
|
+
|
|
220706
220730
|
// packages/mcp-oauth/src/client/loopback-authorization.ts
|
|
220707
220731
|
import http from "node:http";
|
|
220708
220732
|
function snapshotLoopbackAuthorizationOptions(options3) {
|
|
@@ -220968,28 +220992,14 @@ function buildSuccessPage(landingPage) {
|
|
|
220968
220992
|
"</div></body></html>"
|
|
220969
220993
|
].join("");
|
|
220970
220994
|
}
|
|
220971
|
-
var
|
|
220995
|
+
var oauthCallbackParameters;
|
|
220972
220996
|
var init_loopback_authorization = __esm({
|
|
220973
220997
|
"packages/mcp-oauth/src/client/loopback-authorization.ts"() {
|
|
220974
220998
|
"use strict";
|
|
220975
220999
|
init_authorization_state();
|
|
220976
|
-
|
|
221000
|
+
init_authorization_error();
|
|
221001
|
+
init_authorization_error();
|
|
220977
221002
|
oauthCallbackParameters = ["code", "state", "iss", "error", "error_description", "error_uri"];
|
|
220978
|
-
OAuthAuthorizationError = class extends Error {
|
|
220979
|
-
constructor(error2, errorDescription) {
|
|
220980
|
-
super(`OAuth authorization failed: ${error2} \u2014 ${errorDescription}`);
|
|
220981
|
-
this.error = error2;
|
|
220982
|
-
this.errorDescription = errorDescription;
|
|
220983
|
-
this.name = "OAuthAuthorizationError";
|
|
220984
|
-
Object.defineProperty(this, authorizationErrorBrand, { value: true });
|
|
220985
|
-
}
|
|
220986
|
-
error;
|
|
220987
|
-
errorDescription;
|
|
220988
|
-
/** Recognize errors from separately bundled copies of this package. */
|
|
220989
|
-
static is(value2) {
|
|
220990
|
-
return value2 instanceof Error && Object.getOwnPropertyDescriptor(value2, authorizationErrorBrand)?.value === true;
|
|
220991
|
-
}
|
|
220992
|
-
};
|
|
220993
221003
|
}
|
|
220994
221004
|
});
|
|
220995
221005
|
|
|
@@ -222949,7 +222959,6 @@ var init_headers = __esm({
|
|
|
222949
222959
|
});
|
|
222950
222960
|
|
|
222951
222961
|
// packages/tiny-mcp-client/src/oauth-discovery.ts
|
|
222952
|
-
import { isIP as isIP3 } from "node:net";
|
|
222953
222962
|
function defaultOAuthMetadataFetch(input2, init) {
|
|
222954
222963
|
return fetch(input2, init);
|
|
222955
222964
|
}
|
|
@@ -222964,7 +222973,7 @@ function normalizeHostname2(hostname2) {
|
|
|
222964
222973
|
}
|
|
222965
222974
|
function isLoopbackHostname2(hostname2) {
|
|
222966
222975
|
const normalizedHostname = normalizeHostname2(hostname2);
|
|
222967
|
-
return normalizedHostname === "localhost" || normalizedHostname === "::1" || normalizedHostname === "[::1]" ||
|
|
222976
|
+
return normalizedHostname === "localhost" || normalizedHostname === "::1" || normalizedHostname === "[::1]" || normalizedHostname.startsWith("127.") && normalizedHostname.split(".").length === 4 && normalizedHostname.split(".").every((part) => part.length > 0 && [...part].every((char) => char >= "0" && char <= "9") && Number(part) <= 255);
|
|
222968
222977
|
}
|
|
222969
222978
|
function assertSecureUrl2(url, label) {
|
|
222970
222979
|
if (url.username !== "" || url.password !== "" || url.href.includes("#")) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAgentCommands
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VNSPEKB3.js";
|
|
4
4
|
import {
|
|
5
5
|
filesystemOptionsIndex
|
|
6
6
|
} from "./chunk-IK3EFB2F.js";
|
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
Shell,
|
|
10
10
|
portableTrapExtension,
|
|
11
11
|
value_exports
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HKQ7ZHZA.js";
|
|
13
13
|
import "./chunk-SGBTWSJI.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-4DP4GOVF.js";
|
|
15
15
|
import {
|
|
16
16
|
command_exports,
|
|
17
17
|
contracts_exports
|
package/dist/safe-bash.js
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
nodeCommands,
|
|
20
20
|
nodeLimits,
|
|
21
21
|
src_exports
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-4ZBE6ANW.js";
|
|
23
23
|
import {
|
|
24
24
|
CurlError,
|
|
25
25
|
MountFileSystem,
|
|
@@ -190,10 +190,10 @@ import {
|
|
|
190
190
|
validatePath,
|
|
191
191
|
wkhtmltopdfCommands,
|
|
192
192
|
xzCommands
|
|
193
|
-
} from "./chunk-
|
|
193
|
+
} from "./chunk-Z2WKAT24.js";
|
|
194
194
|
import {
|
|
195
195
|
Shell
|
|
196
|
-
} from "./chunk-
|
|
196
|
+
} from "./chunk-QVJA76GB.js";
|
|
197
197
|
import "./chunk-2GUQP2P5.js";
|
|
198
198
|
import "./chunk-AQYHOUEH.js";
|
|
199
199
|
import {
|
|
@@ -258,7 +258,7 @@ import {
|
|
|
258
258
|
tsortCommands,
|
|
259
259
|
xxdCommands,
|
|
260
260
|
yesCommands
|
|
261
|
-
} from "./chunk-
|
|
261
|
+
} from "./chunk-VNSPEKB3.js";
|
|
262
262
|
import "./chunk-IK3EFB2F.js";
|
|
263
263
|
import "./chunk-EKKIZII7.js";
|
|
264
264
|
import {
|
|
@@ -443,11 +443,11 @@ import {
|
|
|
443
443
|
xmlCommands,
|
|
444
444
|
xmllintCommands,
|
|
445
445
|
yqCommands
|
|
446
|
-
} from "./chunk-
|
|
446
|
+
} from "./chunk-HKQ7ZHZA.js";
|
|
447
447
|
import "./chunk-SGBTWSJI.js";
|
|
448
448
|
import {
|
|
449
449
|
defaultJqLimits
|
|
450
|
-
} from "./chunk-
|
|
450
|
+
} from "./chunk-4DP4GOVF.js";
|
|
451
451
|
import "./chunk-ZRTXOGMR.js";
|
|
452
452
|
import "./chunk-BJFELBZS.js";
|
|
453
453
|
import "./chunk-YEPD65CG.js";
|
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
Shell,
|
|
3
3
|
createBoundedRegexProvider,
|
|
4
4
|
createSearchCommands
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HKQ7ZHZA.js";
|
|
6
6
|
import "./chunk-SGBTWSJI.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-4DP4GOVF.js";
|
|
8
8
|
import "./chunk-ZRTXOGMR.js";
|
|
9
9
|
import "./chunk-BJFELBZS.js";
|
|
10
10
|
import "./chunk-YEPD65CG.js";
|
|
@@ -18,4 +18,4 @@ export {
|
|
|
18
18
|
createBoundedRegexProvider,
|
|
19
19
|
createSearchCommands
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=search-
|
|
21
|
+
//# sourceMappingURL=search-QRQVPOLJ.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
McpError,
|
|
3
3
|
connectMcpTransport,
|
|
4
4
|
normalizeMcpOptions
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-L3QK6FH4.js";
|
|
6
6
|
import {
|
|
7
7
|
declareHostOperation,
|
|
8
8
|
runResources
|
|
@@ -402,4 +402,4 @@ function isPlainObjectRecord(value) {
|
|
|
402
402
|
export {
|
|
403
403
|
makeMcpModule
|
|
404
404
|
};
|
|
405
|
-
//# sourceMappingURL=chunk-
|
|
405
|
+
//# sourceMappingURL=chunk-CATT3NXL.js.map
|
|
@@ -3728,22 +3728,8 @@ function getOwnEntry(record2, key2) {
|
|
|
3728
3728
|
return Object.prototype.hasOwnProperty.call(record2, key2) ? record2[key2] : void 0;
|
|
3729
3729
|
}
|
|
3730
3730
|
|
|
3731
|
-
// packages/mcp-oauth/src/client/
|
|
3731
|
+
// packages/mcp-oauth/src/client/authorization-error.ts
|
|
3732
3732
|
var authorizationErrorBrand = /* @__PURE__ */ Symbol.for("poe-platform.mcp-oauth.OAuthAuthorizationError");
|
|
3733
|
-
var oauthCallbackParameters = ["code", "state", "iss", "error", "error_description", "error_uri"];
|
|
3734
|
-
function snapshotLoopbackAuthorizationOptions(options) {
|
|
3735
|
-
return {
|
|
3736
|
-
...options,
|
|
3737
|
-
openBrowser: options.openBrowser?.bind(options),
|
|
3738
|
-
readLine: options.readLine?.bind(options),
|
|
3739
|
-
createServer: options.createServer?.bind(options),
|
|
3740
|
-
callbackPath: options.callbackPath,
|
|
3741
|
-
redirectUri: options.redirectUri,
|
|
3742
|
-
signal: options.signal,
|
|
3743
|
-
timeoutMs: options.timeoutMs,
|
|
3744
|
-
landingPage: options.landingPage === void 0 ? void 0 : { ...options.landingPage, title: options.landingPage.title, body: options.landingPage.body }
|
|
3745
|
-
};
|
|
3746
|
-
}
|
|
3747
3733
|
var OAuthAuthorizationError = class extends Error {
|
|
3748
3734
|
constructor(error, errorDescription) {
|
|
3749
3735
|
super(`OAuth authorization failed: ${error} \u2014 ${errorDescription}`);
|
|
@@ -3759,6 +3745,22 @@ var OAuthAuthorizationError = class extends Error {
|
|
|
3759
3745
|
return value instanceof Error && Object.getOwnPropertyDescriptor(value, authorizationErrorBrand)?.value === true;
|
|
3760
3746
|
}
|
|
3761
3747
|
};
|
|
3748
|
+
|
|
3749
|
+
// packages/mcp-oauth/src/client/loopback-authorization.ts
|
|
3750
|
+
var oauthCallbackParameters = ["code", "state", "iss", "error", "error_description", "error_uri"];
|
|
3751
|
+
function snapshotLoopbackAuthorizationOptions(options) {
|
|
3752
|
+
return {
|
|
3753
|
+
...options,
|
|
3754
|
+
openBrowser: options.openBrowser?.bind(options),
|
|
3755
|
+
readLine: options.readLine?.bind(options),
|
|
3756
|
+
createServer: options.createServer?.bind(options),
|
|
3757
|
+
callbackPath: options.callbackPath,
|
|
3758
|
+
redirectUri: options.redirectUri,
|
|
3759
|
+
signal: options.signal,
|
|
3760
|
+
timeoutMs: options.timeoutMs,
|
|
3761
|
+
landingPage: options.landingPage === void 0 ? void 0 : { ...options.landingPage, title: options.landingPage.title, body: options.landingPage.body }
|
|
3762
|
+
};
|
|
3763
|
+
}
|
|
3762
3764
|
async function createLoopbackAuthorizationSession(options = {}) {
|
|
3763
3765
|
options = snapshotLoopbackAuthorizationOptions(options);
|
|
3764
3766
|
options.signal?.throwIfAborted();
|
|
@@ -6465,7 +6467,6 @@ function createParameterHeaders(definitions, argumentsValue) {
|
|
|
6465
6467
|
}
|
|
6466
6468
|
|
|
6467
6469
|
// packages/tiny-mcp-client/src/oauth-discovery.ts
|
|
6468
|
-
import { isIP as isIP2 } from "node:net";
|
|
6469
6470
|
var metadataErrorBrand = /* @__PURE__ */ Symbol.for("poe-platform.tiny-mcp-client.OAuthMetadataError");
|
|
6470
6471
|
var OAuthMetadataError = class extends Error {
|
|
6471
6472
|
constructor(phase, message, status) {
|
|
@@ -6495,7 +6496,7 @@ function normalizeHostname2(hostname2) {
|
|
|
6495
6496
|
}
|
|
6496
6497
|
function isLoopbackHostname2(hostname2) {
|
|
6497
6498
|
const normalizedHostname = normalizeHostname2(hostname2);
|
|
6498
|
-
return normalizedHostname === "localhost" || normalizedHostname === "::1" || normalizedHostname === "[::1]" ||
|
|
6499
|
+
return normalizedHostname === "localhost" || normalizedHostname === "::1" || normalizedHostname === "[::1]" || normalizedHostname.startsWith("127.") && normalizedHostname.split(".").length === 4 && normalizedHostname.split(".").every((part) => part.length > 0 && [...part].every((char) => char >= "0" && char <= "9") && Number(part) <= 255);
|
|
6499
6500
|
}
|
|
6500
6501
|
function assertSecureUrl2(url, label) {
|
|
6501
6502
|
if (url.username !== "" || url.password !== "" || url.href.includes("#")) {
|
|
@@ -9835,4 +9836,4 @@ CC-BY-4.0. See https://creativecommons.org/licenses/by/4.0/legalcode for
|
|
|
9835
9836
|
the full license text.
|
|
9836
9837
|
|
|
9837
9838
|
*/
|
|
9838
|
-
//# sourceMappingURL=chunk-
|
|
9839
|
+
//# sourceMappingURL=chunk-L3QK6FH4.js.map
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-H3BR7NX5.js";
|
|
16
16
|
import {
|
|
17
17
|
parseMcpConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-L3QK6FH4.js";
|
|
19
19
|
import {
|
|
20
20
|
lint
|
|
21
21
|
} from "./chunk-DWPZ5JJ6.js";
|
|
@@ -303,7 +303,7 @@ async function runScriptFile(filepath, parsed, options) {
|
|
|
303
303
|
import("./dump-4UZZPTQQ.js"),
|
|
304
304
|
import("./runtime-modules-AN5YUL5L.js"),
|
|
305
305
|
import("./fs-OOT33KEV.js"),
|
|
306
|
-
import("./mcp-
|
|
306
|
+
import("./mcp-MZNG3TYT.js")
|
|
307
307
|
]);
|
|
308
308
|
const loaded = loadExecutableSource(filepath, await options.readFile(filepath, "utf8"));
|
|
309
309
|
const meta = {
|
|
@@ -732,4 +732,4 @@ export {
|
|
|
732
732
|
exitCodeForError,
|
|
733
733
|
runCli
|
|
734
734
|
};
|
|
735
|
-
//# sourceMappingURL=cli-runtime-
|
|
735
|
+
//# sourceMappingURL=cli-runtime-UGTDRU7A.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
makeMcpModule
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-CATT3NXL.js";
|
|
4
|
+
import "./chunk-L3QK6FH4.js";
|
|
5
5
|
import "./chunk-WRXXCOTK.js";
|
|
6
6
|
import "./chunk-C4SONX4C.js";
|
|
7
7
|
import "./chunk-CLHORQQR.js";
|
|
@@ -9,4 +9,4 @@ import "./chunk-4YIDX44G.js";
|
|
|
9
9
|
export {
|
|
10
10
|
makeMcpModule
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=mcp-
|
|
12
|
+
//# sourceMappingURL=mcp-MZNG3TYT.js.map
|
|
@@ -13,7 +13,7 @@ import path from "node:path";
|
|
|
13
13
|
import { fileURLToPath } from "node:url";
|
|
14
14
|
async function runCli(argv, options = {}) {
|
|
15
15
|
if (!argv.includes("--help") && !argv.includes("-h")) {
|
|
16
|
-
const runtime = await import("./chunks/cli-runtime-
|
|
16
|
+
const runtime = await import("./chunks/cli-runtime-UGTDRU7A.js");
|
|
17
17
|
return runtime.runCli(argv, options, createUsage());
|
|
18
18
|
}
|
|
19
19
|
const brokenPipe = createBrokenPipeState();
|
|
@@ -32,7 +32,7 @@ async function runCli(argv, options = {}) {
|
|
|
32
32
|
stderr.write(`${error instanceof Error ? error.message : String(error)}
|
|
33
33
|
`);
|
|
34
34
|
if (brokenPipe.closed) return 0;
|
|
35
|
-
const { exitCodeForError } = await import("./chunks/cli-runtime-
|
|
35
|
+
const { exitCodeForError } = await import("./chunks/cli-runtime-UGTDRU7A.js");
|
|
36
36
|
return exitCodeForError(error);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
makeMcpModule
|
|
3
|
-
} from "./chunks/chunk-
|
|
3
|
+
} from "./chunks/chunk-CATT3NXL.js";
|
|
4
4
|
import {
|
|
5
5
|
AgentSpawnError,
|
|
6
6
|
EnvAccessError,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "./chunks/chunk-H3BR7NX5.js";
|
|
25
25
|
import {
|
|
26
26
|
parseMcpConfig
|
|
27
|
-
} from "./chunks/chunk-
|
|
27
|
+
} from "./chunks/chunk-L3QK6FH4.js";
|
|
28
28
|
import {
|
|
29
29
|
inspectSnapshotMigration,
|
|
30
30
|
migrateSnapshot,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
spawn
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-2GGWYM5C.js";
|
|
4
|
+
import "./chunk-IDRDSIOP.js";
|
|
5
|
+
import "./chunk-NT4FTHR4.js";
|
|
6
6
|
import "./chunk-NO7WNABG.js";
|
|
7
7
|
import "./chunk-OADWN624.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-OY52WCN2.js";
|
|
9
9
|
import "./chunk-YBCIRQCC.js";
|
|
10
10
|
import "./chunk-EVMLCUGX.js";
|
|
11
11
|
import "./chunk-EF3O5H2F.js";
|
|
12
12
|
export {
|
|
13
13
|
spawn
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=spawn-
|
|
15
|
+
//# sourceMappingURL=spawn-JVTZA4J2.js.map
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
encodeCopySource,
|
|
19
19
|
nodeCommands,
|
|
20
20
|
nodeLimits
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-4ZBE6ANW.js";
|
|
22
22
|
import {
|
|
23
23
|
CurlError,
|
|
24
24
|
MountFileSystem,
|
|
@@ -189,10 +189,10 @@ import {
|
|
|
189
189
|
validatePath,
|
|
190
190
|
wkhtmltopdfCommands,
|
|
191
191
|
xzCommands
|
|
192
|
-
} from "./chunk-
|
|
192
|
+
} from "./chunk-Z2WKAT24.js";
|
|
193
193
|
import {
|
|
194
194
|
Shell
|
|
195
|
-
} from "./chunk-
|
|
195
|
+
} from "./chunk-QVJA76GB.js";
|
|
196
196
|
import "./chunk-2GUQP2P5.js";
|
|
197
197
|
import "./chunk-AQYHOUEH.js";
|
|
198
198
|
import {
|
|
@@ -257,7 +257,7 @@ import {
|
|
|
257
257
|
tsortCommands,
|
|
258
258
|
xxdCommands,
|
|
259
259
|
yesCommands
|
|
260
|
-
} from "./chunk-
|
|
260
|
+
} from "./chunk-VNSPEKB3.js";
|
|
261
261
|
import "./chunk-IK3EFB2F.js";
|
|
262
262
|
import "./chunk-EKKIZII7.js";
|
|
263
263
|
import {
|
|
@@ -442,11 +442,11 @@ import {
|
|
|
442
442
|
xmlCommands,
|
|
443
443
|
xmllintCommands,
|
|
444
444
|
yqCommands
|
|
445
|
-
} from "./chunk-
|
|
445
|
+
} from "./chunk-HKQ7ZHZA.js";
|
|
446
446
|
import "./chunk-SGBTWSJI.js";
|
|
447
447
|
import {
|
|
448
448
|
defaultJqLimits
|
|
449
|
-
} from "./chunk-
|
|
449
|
+
} from "./chunk-4DP4GOVF.js";
|
|
450
450
|
import "./chunk-ZRTXOGMR.js";
|
|
451
451
|
import "./chunk-BJFELBZS.js";
|
|
452
452
|
import "./chunk-YEPD65CG.js";
|
|
@@ -892,4 +892,4 @@ export {
|
|
|
892
892
|
yesCommands,
|
|
893
893
|
yqCommands
|
|
894
894
|
};
|
|
895
|
-
//# sourceMappingURL=src-
|
|
895
|
+
//# sourceMappingURL=src-KFIZ3ZHC.js.map
|
|
@@ -33,13 +33,13 @@ import {
|
|
|
33
33
|
resolvePluginsFromConfig,
|
|
34
34
|
resolveProvider,
|
|
35
35
|
searchFileSystem
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-K4MLQWL6.js";
|
|
37
37
|
import {
|
|
38
38
|
PluginConfigError,
|
|
39
39
|
parseNullablePluginConfigEntries,
|
|
40
40
|
parsePluginConfigEntries,
|
|
41
41
|
parsePluginConfigEntry
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-OY52WCN2.js";
|
|
43
43
|
import "./chunk-YBCIRQCC.js";
|
|
44
44
|
import "./chunk-EVMLCUGX.js";
|
|
45
45
|
import "./chunk-EF3O5H2F.js";
|
|
@@ -83,4 +83,4 @@ export {
|
|
|
83
83
|
poe_agent_plugin_system_prompt_default as systemPromptPlugin,
|
|
84
84
|
poe_agent_plugin_web_default as webPlugin
|
|
85
85
|
};
|
|
86
|
-
//# sourceMappingURL=src-
|
|
86
|
+
//# sourceMappingURL=src-SMC2KSW6.js.map
|
package/package.json
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const authorizationErrorBrand = Symbol.for("poe-platform.mcp-oauth.OAuthAuthorizationError");
|
|
2
|
+
export class OAuthAuthorizationError extends Error {
|
|
3
|
+
error;
|
|
4
|
+
errorDescription;
|
|
5
|
+
/** Recognize errors from separately bundled copies of this package. */
|
|
6
|
+
static is(value) {
|
|
7
|
+
return value instanceof Error && Object.getOwnPropertyDescriptor(value, authorizationErrorBrand)?.value === true;
|
|
8
|
+
}
|
|
9
|
+
constructor(error, errorDescription) {
|
|
10
|
+
super(`OAuth authorization failed: ${error} — ${errorDescription}`);
|
|
11
|
+
this.error = error;
|
|
12
|
+
this.errorDescription = errorDescription;
|
|
13
|
+
this.name = "OAuthAuthorizationError";
|
|
14
|
+
Object.defineProperty(this, authorizationErrorBrand, { value: true });
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import http from "node:http";
|
|
2
2
|
import { parseAuthorizationState } from "./authorization-state.js";
|
|
3
|
-
|
|
3
|
+
import { OAuthAuthorizationError } from "./authorization-error.js";
|
|
4
|
+
export { OAuthAuthorizationError } from "./authorization-error.js";
|
|
4
5
|
const oauthCallbackParameters = ["code", "state", "iss", "error", "error_description", "error_uri"];
|
|
5
6
|
/** Capture declared configuration regardless of property enumerability. */
|
|
6
7
|
export function snapshotLoopbackAuthorizationOptions(options) {
|
|
@@ -9,21 +10,6 @@ export function snapshotLoopbackAuthorizationOptions(options) {
|
|
|
9
10
|
landingPage: options.landingPage === undefined ? undefined : { ...options.landingPage, title: options.landingPage.title, body: options.landingPage.body } };
|
|
10
11
|
}
|
|
11
12
|
/** Authorization callback denial, retaining the provider diagnostic for host observers. */
|
|
12
|
-
export class OAuthAuthorizationError extends Error {
|
|
13
|
-
error;
|
|
14
|
-
errorDescription;
|
|
15
|
-
/** Recognize errors from separately bundled copies of this package. */
|
|
16
|
-
static is(value) {
|
|
17
|
-
return value instanceof Error && Object.getOwnPropertyDescriptor(value, authorizationErrorBrand)?.value === true;
|
|
18
|
-
}
|
|
19
|
-
constructor(error, errorDescription) {
|
|
20
|
-
super(`OAuth authorization failed: ${error} — ${errorDescription}`);
|
|
21
|
-
this.error = error;
|
|
22
|
-
this.errorDescription = errorDescription;
|
|
23
|
-
this.name = "OAuthAuthorizationError";
|
|
24
|
-
Object.defineProperty(this, authorizationErrorBrand, { value: true });
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
13
|
export async function createLoopbackAuthorizationSession(options = {}) {
|
|
28
14
|
options = snapshotLoopbackAuthorizationOptions(options);
|
|
29
15
|
options.signal?.throwIfAborted();
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { snapshotOAuthPersistenceOptions } from "./client/persistence-options.js";
|
|
2
|
+
export { OAuthAuthorizationError } from "./client/authorization-error.js";
|
|
3
|
+
export { OAuthError } from "./client/token-endpoint.js";
|
|
4
|
+
export { canonicalizeResourceIndicator } from "./resource-indicator.js";
|
|
5
|
+
export { readBoundedResponseText } from "./http-response.js";
|
|
6
|
+
export { fetchMcpResponse } from "./http-fetch.js";
|
|
7
|
+
/** Remote hosts own credentials and authorization; desktop defaults are unavailable. */
|
|
8
|
+
export function createOAuthClientProvider(options) {
|
|
9
|
+
if ("provider" in options && options.provider !== undefined)
|
|
10
|
+
return options.provider;
|
|
11
|
+
throw new Error("Worker MCP requires a host-owned OAuth provider or authenticated fetch; desktop OAuth is unavailable");
|
|
12
|
+
}
|
|
13
|
+
export function createDefaultOAuthClientProvider() {
|
|
14
|
+
throw new Error("Desktop OAuth is unavailable in Worker MCP");
|
|
15
|
+
}
|
|
16
|
+
export function createAuthStoreSessionStore() {
|
|
17
|
+
throw new Error("Desktop OAuth persistence is unavailable in Worker MCP");
|
|
18
|
+
}
|
|
@@ -704,6 +704,10 @@ async function* readChunks(source, budget) {
|
|
|
704
704
|
const _p = budget.tickSync();
|
|
705
705
|
if (_p) await _p;
|
|
706
706
|
}
|
|
707
|
+
if (chunk.byteLength === 0) {
|
|
708
|
+
const pending = budget.ensureFreshWindow();
|
|
709
|
+
if (pending) await pending;
|
|
710
|
+
}
|
|
707
711
|
budget.inputBytes += chunk.byteLength;
|
|
708
712
|
if (budget.inputBytes > budget.limits.maxInputBytes) throw new JqLimitError("maxInputBytes");
|
|
709
713
|
let offset = 0;
|
|
@@ -1055,6 +1059,10 @@ async function* jsonValues(source, budget, options = {}) {
|
|
|
1055
1059
|
break;
|
|
1056
1060
|
}
|
|
1057
1061
|
const rawChunk = res.value;
|
|
1062
|
+
if (rawChunk.byteLength === 0) {
|
|
1063
|
+
const pending = budget.ensureFreshWindow();
|
|
1064
|
+
if (pending) await pending;
|
|
1065
|
+
}
|
|
1058
1066
|
const pt = budget.tickSync();
|
|
1059
1067
|
if (pt) await pt;
|
|
1060
1068
|
budget.inputBytes += rawChunk.byteLength;
|
|
@@ -5138,4 +5146,4 @@ export {
|
|
|
5138
5146
|
moduleProgram,
|
|
5139
5147
|
parse
|
|
5140
5148
|
};
|
|
5141
|
-
//# sourceMappingURL=chunk-
|
|
5149
|
+
//# sourceMappingURL=chunk-6YWMJV24.js.map
|