poe-code 3.0.197 → 3.0.198

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.
Files changed (97) hide show
  1. package/dist/cli/commands/configure.d.ts +0 -7
  2. package/dist/cli/commands/configure.js +11 -14
  3. package/dist/cli/commands/configure.js.map +1 -1
  4. package/dist/cli/commands/provider.js +8 -1
  5. package/dist/cli/commands/provider.js.map +1 -1
  6. package/dist/index.js +221 -262
  7. package/dist/index.js.map +4 -4
  8. package/dist/providers/claude-code.js +6 -20
  9. package/dist/providers/claude-code.js.map +3 -3
  10. package/dist/providers/codex.js +6 -20
  11. package/dist/providers/codex.js.map +3 -3
  12. package/dist/providers/create-provider.js +0 -2
  13. package/dist/providers/create-provider.js.map +1 -1
  14. package/dist/providers/goose.js +14 -25
  15. package/dist/providers/goose.js.map +3 -3
  16. package/dist/providers/kimi.js +6 -20
  17. package/dist/providers/kimi.js.map +3 -3
  18. package/dist/providers/opencode.js +6 -20
  19. package/dist/providers/opencode.js.map +3 -3
  20. package/dist/providers/poe-agent.js +66 -84
  21. package/dist/providers/poe-agent.js.map +4 -4
  22. package/dist/utils/command-checks.d.ts +2 -1
  23. package/dist/utils/command-checks.js +3 -1
  24. package/dist/utils/command-checks.js.map +1 -1
  25. package/package.json +4 -1
  26. package/packages/memory/dist/cache.js +1 -1
  27. package/packages/memory/dist/explain.js +1 -1
  28. package/packages/memory/dist/index.js +9 -7
  29. package/packages/memory/dist/index.js.map +3 -3
  30. package/packages/memory/dist/query.js +1 -1
  31. package/packages/memory/dist/tokens.js +1 -1
  32. package/packages/superintendent/dist/cli.d.ts +2 -0
  33. package/packages/superintendent/dist/cli.js +41 -0
  34. package/packages/superintendent/dist/commands/builder-group.d.ts +52 -0
  35. package/packages/superintendent/dist/commands/builder-group.js +73 -0
  36. package/packages/superintendent/dist/commands/complete.d.ts +19 -0
  37. package/packages/superintendent/dist/commands/complete.js +54 -0
  38. package/packages/superintendent/dist/commands/index.d.ts +4 -0
  39. package/packages/superintendent/dist/commands/index.js +4 -0
  40. package/packages/superintendent/dist/commands/inspector-group.d.ts +115 -0
  41. package/packages/superintendent/dist/commands/inspector-group.js +133 -0
  42. package/packages/superintendent/dist/commands/install.d.ts +31 -0
  43. package/packages/superintendent/dist/commands/install.js +148 -0
  44. package/packages/superintendent/dist/commands/plan-path.d.ts +9 -0
  45. package/packages/superintendent/dist/commands/plan-path.js +40 -0
  46. package/packages/superintendent/dist/commands/poe-agent-runner.d.ts +5 -0
  47. package/packages/superintendent/dist/commands/poe-agent-runner.js +27 -0
  48. package/packages/superintendent/dist/commands/run.d.ts +86 -0
  49. package/packages/superintendent/dist/commands/run.js +945 -0
  50. package/packages/superintendent/dist/commands/superintendent-group.d.ts +325 -0
  51. package/packages/superintendent/dist/commands/superintendent-group.js +238 -0
  52. package/packages/superintendent/dist/config-scope.d.ts +8 -0
  53. package/packages/superintendent/dist/config-scope.js +9 -0
  54. package/packages/superintendent/dist/direct-execution.d.ts +1 -0
  55. package/packages/superintendent/dist/direct-execution.js +20 -0
  56. package/packages/superintendent/dist/document/parse.d.ts +59 -0
  57. package/packages/superintendent/dist/document/parse.js +409 -0
  58. package/packages/superintendent/dist/document/tasks.d.ts +12 -0
  59. package/packages/superintendent/dist/document/tasks.js +96 -0
  60. package/packages/superintendent/dist/document/write.d.ts +6 -0
  61. package/packages/superintendent/dist/document/write.js +156 -0
  62. package/packages/superintendent/dist/index.d.ts +12 -0
  63. package/packages/superintendent/dist/index.js +15 -0
  64. package/packages/superintendent/dist/mcp.d.ts +24 -0
  65. package/packages/superintendent/dist/mcp.js +202 -0
  66. package/packages/superintendent/dist/runtime/agentic-tools.d.ts +33 -0
  67. package/packages/superintendent/dist/runtime/agentic-tools.js +74 -0
  68. package/packages/superintendent/dist/runtime/loop.d.ts +88 -0
  69. package/packages/superintendent/dist/runtime/loop.js +446 -0
  70. package/packages/superintendent/dist/runtime/resolve-cwd.d.ts +2 -0
  71. package/packages/superintendent/dist/runtime/resolve-cwd.js +10 -0
  72. package/packages/superintendent/dist/runtime/run-builder.d.ts +13 -0
  73. package/packages/superintendent/dist/runtime/run-builder.js +102 -0
  74. package/packages/superintendent/dist/runtime/run-inspector.d.ts +16 -0
  75. package/packages/superintendent/dist/runtime/run-inspector.js +119 -0
  76. package/packages/superintendent/dist/runtime/run-owner-review.d.ts +18 -0
  77. package/packages/superintendent/dist/runtime/run-owner-review.js +208 -0
  78. package/packages/superintendent/dist/runtime/run-superintendent.d.ts +13 -0
  79. package/packages/superintendent/dist/runtime/run-superintendent.js +208 -0
  80. package/packages/superintendent/dist/runtime/system-prompt.d.ts +17 -0
  81. package/packages/superintendent/dist/runtime/system-prompt.js +54 -0
  82. package/packages/superintendent/dist/runtime/templates.d.ts +22 -0
  83. package/packages/superintendent/dist/runtime/templates.js +23 -0
  84. package/packages/superintendent/dist/runtime/types.d.ts +4 -0
  85. package/packages/superintendent/dist/runtime/types.js +1 -0
  86. package/packages/superintendent/dist/runtime/workflow-tool.d.ts +29 -0
  87. package/packages/superintendent/dist/runtime/workflow-tool.js +83 -0
  88. package/packages/superintendent/dist/state/machine.d.ts +14 -0
  89. package/packages/superintendent/dist/state/machine.js +53 -0
  90. package/packages/superintendent/dist/templates/SKILL_superintendent.md +193 -0
  91. package/packages/superintendent/dist/testing/index.d.ts +2 -0
  92. package/packages/superintendent/dist/testing/index.js +1 -0
  93. package/packages/superintendent/dist/testing/simulation.d.ts +57 -0
  94. package/packages/superintendent/dist/testing/simulation.js +346 -0
  95. package/dist/providers/tiny-http-mcp-server.d.ts +0 -22
  96. package/dist/providers/tiny-http-mcp-server.js +0 -1471
  97. package/dist/providers/tiny-http-mcp-server.js.map +0 -7
package/dist/index.js CHANGED
@@ -3757,11 +3757,12 @@ var init_kimi2 = __esm({
3757
3757
  });
3758
3758
 
3759
3759
  // packages/agent-spawn/src/configs/goose.ts
3760
- var gooseSpawnConfig, gooseAcpSpawnConfig;
3760
+ var gooseFileSecretsEnv, gooseSpawnConfig, gooseAcpSpawnConfig;
3761
3761
  var init_goose2 = __esm({
3762
3762
  "packages/agent-spawn/src/configs/goose.ts"() {
3763
3763
  "use strict";
3764
3764
  init_mcp();
3765
+ gooseFileSecretsEnv = { GOOSE_DISABLE_KEYRING: "1" };
3765
3766
  gooseSpawnConfig = {
3766
3767
  kind: "cli",
3767
3768
  agentId: "goose",
@@ -3774,9 +3775,9 @@ var init_goose2 = __esm({
3774
3775
  mcpArgs: serializeGooseMcpArgs,
3775
3776
  mcpArgsPosition: "beforePrompt",
3776
3777
  modes: {
3777
- yolo: { env: { GOOSE_MODE: "auto" } },
3778
- edit: { env: { GOOSE_MODE: "smart_approve" } },
3779
- read: { env: { GOOSE_MODE: "chat" } }
3778
+ yolo: { env: { ...gooseFileSecretsEnv, GOOSE_MODE: "auto" } },
3779
+ edit: { env: { ...gooseFileSecretsEnv, GOOSE_MODE: "smart_approve" } },
3780
+ read: { env: { ...gooseFileSecretsEnv, GOOSE_MODE: "chat" } }
3780
3781
  },
3781
3782
  stdinMode: {
3782
3783
  omitPrompt: true,
@@ -3792,6 +3793,7 @@ var init_goose2 = __esm({
3792
3793
  kind: "acp",
3793
3794
  agentId: "goose",
3794
3795
  acpArgs: ["acp"],
3796
+ env: gooseFileSecretsEnv,
3795
3797
  skipAuth: true
3796
3798
  };
3797
3799
  }
@@ -13373,7 +13375,8 @@ function spawnAcp(options) {
13373
13375
  throw new Error(`Agent "${resolvedId}" has no binaryName.`);
13374
13376
  }
13375
13377
  const mcpEnvVars = options.mcpServers && acpConfig.mcpEnv ? acpConfig.mcpEnv(options.mcpServers) : {};
13376
- const env = Object.keys(mcpEnvVars).length > 0 ? { ...process.env, ...mcpEnvVars } : void 0;
13378
+ const envOverrides = { ...acpConfig.env ?? {}, ...mcpEnvVars };
13379
+ const env = Object.keys(envOverrides).length > 0 ? { ...process.env, ...envOverrides } : void 0;
13377
13380
  const client = new AcpClient({
13378
13381
  command: binaryName,
13379
13382
  args: acpConfig.acpArgs,
@@ -19364,7 +19367,7 @@ var init_agent_host = __esm({
19364
19367
  }
19365
19368
  });
19366
19369
 
19367
- // packages/mcp-oauth/src/resource-indicator.ts
19370
+ // packages/mcp-oauth/dist/resource-indicator.js
19368
19371
  function canonicalizeResourceIndicator(value) {
19369
19372
  let url;
19370
19373
  try {
@@ -19376,12 +19379,12 @@ function canonicalizeResourceIndicator(value) {
19376
19379
  return url.toString();
19377
19380
  }
19378
19381
  var init_resource_indicator = __esm({
19379
- "packages/mcp-oauth/src/resource-indicator.ts"() {
19382
+ "packages/mcp-oauth/dist/resource-indicator.js"() {
19380
19383
  "use strict";
19381
19384
  }
19382
19385
  });
19383
19386
 
19384
- // packages/mcp-oauth/src/client/auth-store-session-store.ts
19387
+ // packages/mcp-oauth/dist/client/auth-store-session-store.js
19385
19388
  import crypto from "node:crypto";
19386
19389
  import path16 from "node:path";
19387
19390
  function createAuthStoreSessionStore(options = {}) {
@@ -19449,32 +19452,24 @@ function createNamedSecretStore(key2, options, defaults) {
19449
19452
  return createSecretStore({ ...options, fileStore, keychainStore }).store;
19450
19453
  }
19451
19454
  function createResourceSecretStore(resource, options) {
19452
- return createNamedSecretStore(
19453
- canonicalizeResourceIndicator(resource),
19454
- options,
19455
- {
19456
- salt: DEFAULT_FILE_SALT,
19457
- directory: DEFAULT_FILE_DIRECTORY,
19458
- service: DEFAULT_KEYCHAIN_SERVICE,
19459
- accountPrefix: "provider"
19460
- }
19461
- );
19455
+ return createNamedSecretStore(canonicalizeResourceIndicator(resource), options, {
19456
+ salt: DEFAULT_FILE_SALT,
19457
+ directory: DEFAULT_FILE_DIRECTORY,
19458
+ service: DEFAULT_KEYCHAIN_SERVICE,
19459
+ accountPrefix: "provider"
19460
+ });
19462
19461
  }
19463
19462
  function createIssuerSecretStore(issuer, options) {
19464
- return createNamedSecretStore(
19465
- issuer,
19466
- options,
19467
- {
19468
- salt: DEFAULT_CLIENT_FILE_SALT,
19469
- directory: DEFAULT_CLIENT_FILE_DIRECTORY,
19470
- service: DEFAULT_CLIENT_KEYCHAIN_SERVICE,
19471
- accountPrefix: "issuer"
19472
- }
19473
- );
19463
+ return createNamedSecretStore(issuer, options, {
19464
+ salt: DEFAULT_CLIENT_FILE_SALT,
19465
+ directory: DEFAULT_CLIENT_FILE_DIRECTORY,
19466
+ service: DEFAULT_CLIENT_KEYCHAIN_SERVICE,
19467
+ accountPrefix: "issuer"
19468
+ });
19474
19469
  }
19475
19470
  var DEFAULT_FILE_SALT, DEFAULT_FILE_DIRECTORY, DEFAULT_KEYCHAIN_SERVICE, DEFAULT_CLIENT_FILE_SALT, DEFAULT_CLIENT_FILE_DIRECTORY, DEFAULT_CLIENT_KEYCHAIN_SERVICE;
19476
19471
  var init_auth_store_session_store = __esm({
19477
- "packages/mcp-oauth/src/client/auth-store-session-store.ts"() {
19472
+ "packages/mcp-oauth/dist/client/auth-store-session-store.js"() {
19478
19473
  "use strict";
19479
19474
  init_src();
19480
19475
  init_resource_indicator();
@@ -19487,7 +19482,7 @@ var init_auth_store_session_store = __esm({
19487
19482
  }
19488
19483
  });
19489
19484
 
19490
- // packages/mcp-oauth/src/client/authorization-state.ts
19485
+ // packages/mcp-oauth/dist/client/authorization-state.js
19491
19486
  import crypto2 from "node:crypto";
19492
19487
  function createAuthorizationState(input) {
19493
19488
  const payload = {
@@ -19517,12 +19512,12 @@ function parseAuthorizationState(value) {
19517
19512
  }
19518
19513
  }
19519
19514
  var init_authorization_state = __esm({
19520
- "packages/mcp-oauth/src/client/authorization-state.ts"() {
19515
+ "packages/mcp-oauth/dist/client/authorization-state.js"() {
19521
19516
  "use strict";
19522
19517
  }
19523
19518
  });
19524
19519
 
19525
- // packages/mcp-oauth/src/client/loopback-authorization.ts
19520
+ // packages/mcp-oauth/dist/client/loopback-authorization.js
19526
19521
  import http from "node:http";
19527
19522
  async function createLoopbackAuthorizationSession(options = {}) {
19528
19523
  const callbackPath = options.callbackPath ?? "/callback";
@@ -19596,10 +19591,7 @@ function waitForAuthorizationCode(server, authorizationUrl, options, callbackPat
19596
19591
  return;
19597
19592
  }
19598
19593
  try {
19599
- const code = validateAuthorizationCallbackParameters(
19600
- callbackParameters,
19601
- expectedAuthorization
19602
- );
19594
+ const code = validateAuthorizationCallbackParameters(callbackParameters, expectedAuthorization);
19603
19595
  settle(() => resolve2(code));
19604
19596
  } catch (error2) {
19605
19597
  settle(() => reject(error2 instanceof Error ? error2 : new Error(String(error2))));
@@ -19682,13 +19674,13 @@ function buildSuccessPage(landingPage) {
19682
19674
  ].join("");
19683
19675
  }
19684
19676
  var init_loopback_authorization = __esm({
19685
- "packages/mcp-oauth/src/client/loopback-authorization.ts"() {
19677
+ "packages/mcp-oauth/dist/client/loopback-authorization.js"() {
19686
19678
  "use strict";
19687
19679
  init_authorization_state();
19688
19680
  }
19689
19681
  });
19690
19682
 
19691
- // packages/mcp-oauth/src/client/pkce.ts
19683
+ // packages/mcp-oauth/dist/client/pkce.js
19692
19684
  import crypto3 from "node:crypto";
19693
19685
  function generateCodeVerifier() {
19694
19686
  return crypto3.randomBytes(32).toString("base64url");
@@ -19697,12 +19689,12 @@ function generateCodeChallenge(verifier) {
19697
19689
  return crypto3.createHash("sha256").update(verifier).digest("base64url");
19698
19690
  }
19699
19691
  var init_pkce = __esm({
19700
- "packages/mcp-oauth/src/client/pkce.ts"() {
19692
+ "packages/mcp-oauth/dist/client/pkce.js"() {
19701
19693
  "use strict";
19702
19694
  }
19703
19695
  });
19704
19696
 
19705
- // packages/mcp-oauth/src/client/token-endpoint.ts
19697
+ // packages/mcp-oauth/dist/client/token-endpoint.js
19706
19698
  function isRetryableOAuthError(error2) {
19707
19699
  return error2 instanceof OAuthError && (error2.status >= 500 || error2.error === "server_error" || error2.error === "temporarily_unavailable");
19708
19700
  }
@@ -19811,7 +19803,7 @@ function normalizeBearerTokenType(value) {
19811
19803
  }
19812
19804
  var OAuthError;
19813
19805
  var init_token_endpoint = __esm({
19814
- "packages/mcp-oauth/src/client/token-endpoint.ts"() {
19806
+ "packages/mcp-oauth/dist/client/token-endpoint.js"() {
19815
19807
  "use strict";
19816
19808
  init_resource_indicator();
19817
19809
  OAuthError = class extends Error {
@@ -19839,7 +19831,7 @@ var init_token_endpoint = __esm({
19839
19831
  }
19840
19832
  });
19841
19833
 
19842
- // packages/mcp-oauth/src/client/default-oauth-client-provider.ts
19834
+ // packages/mcp-oauth/dist/client/default-oauth-client-provider.js
19843
19835
  import { URL as URL2 } from "node:url";
19844
19836
  function createOAuthClientProvider(options) {
19845
19837
  if (isProviderOptions(options)) {
@@ -19874,16 +19866,10 @@ function createDefaultOAuthClientProvider(options) {
19874
19866
  const resource = canonicalizeResourceIndicator(input.discovery.resource);
19875
19867
  assertRequestMatchesResource(requestUrl, resource);
19876
19868
  const forceRefresh = hasCachedAccessToken(await loadSession(resource)) && input.challenge?.params.error === "invalid_token";
19877
- const session = await ensureAuthorizedSession(
19878
- resource,
19879
- {
19880
- ...input.discovery,
19881
- resource
19882
- },
19883
- input.fetch,
19884
- true,
19885
- forceRefresh
19886
- );
19869
+ const session = await ensureAuthorizedSession(resource, {
19870
+ ...input.discovery,
19871
+ resource
19872
+ }, input.fetch, true, forceRefresh);
19887
19873
  if (session?.tokens?.accessToken === void 0) {
19888
19874
  return { action: "fail" };
19889
19875
  }
@@ -19948,11 +19934,7 @@ function createDefaultOAuthClientProvider(options) {
19948
19934
  await saveSession(resource, clearedSession);
19949
19935
  return clearedSession;
19950
19936
  }
19951
- if (shouldReRegisterStoredDynamicClient(
19952
- error2,
19953
- await loadRegisteredClient(discovery.authorizationServer),
19954
- false
19955
- )) {
19937
+ if (shouldReRegisterStoredDynamicClient(error2, await loadRegisteredClient(discovery.authorizationServer), false)) {
19956
19938
  await clearRegisteredClient(discovery.authorizationServer);
19957
19939
  await clearSession(resource);
19958
19940
  return null;
@@ -20111,10 +20093,7 @@ function createDefaultOAuthClientProvider(options) {
20111
20093
  };
20112
20094
  }
20113
20095
  }
20114
- const registrationBody = buildClientRegistrationBody(
20115
- getClientMetadata(options.client),
20116
- redirectUri
20117
- );
20096
+ const registrationBody = buildClientRegistrationBody(getClientMetadata(options.client), redirectUri);
20118
20097
  const response = await fetch2(registrationEndpoint, {
20119
20098
  method: "POST",
20120
20099
  headers: {
@@ -20238,9 +20217,7 @@ function buildAuthorizationUrl(input) {
20238
20217
  }
20239
20218
  function assertS256PkceSupport(metadata) {
20240
20219
  if (!metadata.code_challenge_methods_supported.includes("S256")) {
20241
- throw new Error(
20242
- "Authorization server metadata must advertise code_challenge_methods_supported including S256"
20243
- );
20220
+ throw new Error("Authorization server metadata must advertise code_challenge_methods_supported including S256");
20244
20221
  }
20245
20222
  }
20246
20223
  function normalizeHostname(hostname3) {
@@ -20278,9 +20255,7 @@ function assertNoAccessTokenInUrl(value, label) {
20278
20255
  }
20279
20256
  function assertRequestMatchesResource(requestUrl, resource) {
20280
20257
  if (requestUrl !== resource) {
20281
- throw new Error(
20282
- `OAuth request URL ${requestUrl} does not match discovered resource ${resource}`
20283
- );
20258
+ throw new Error(`OAuth request URL ${requestUrl} does not match discovered resource ${resource}`);
20284
20259
  }
20285
20260
  }
20286
20261
  function buildClientRegistrationBody(metadata, redirectUri) {
@@ -20324,7 +20299,7 @@ function shouldReRegisterStoredDynamicClient(error2, client, alreadyAttempted) {
20324
20299
  return true;
20325
20300
  }
20326
20301
  var init_default_oauth_client_provider = __esm({
20327
- "packages/mcp-oauth/src/client/default-oauth-client-provider.ts"() {
20302
+ "packages/mcp-oauth/dist/client/default-oauth-client-provider.js"() {
20328
20303
  "use strict";
20329
20304
  init_auth_store_session_store();
20330
20305
  init_loopback_authorization();
@@ -20335,23 +20310,18 @@ var init_default_oauth_client_provider = __esm({
20335
20310
  }
20336
20311
  });
20337
20312
 
20338
- // packages/mcp-oauth/src/server/jwks-token-verifier.ts
20339
- import {
20340
- decodeProtectedHeader,
20341
- errors,
20342
- importJWK,
20343
- jwtVerify
20344
- } from "jose";
20313
+ // packages/mcp-oauth/dist/server/jwks-token-verifier.js
20314
+ import { decodeProtectedHeader, errors, importJWK, jwtVerify } from "jose";
20345
20315
  var init_jwks_token_verifier = __esm({
20346
- "packages/mcp-oauth/src/server/jwks-token-verifier.ts"() {
20316
+ "packages/mcp-oauth/dist/server/jwks-token-verifier.js"() {
20347
20317
  "use strict";
20348
20318
  init_resource_indicator();
20349
20319
  }
20350
20320
  });
20351
20321
 
20352
- // packages/mcp-oauth/src/index.ts
20353
- var init_src9 = __esm({
20354
- "packages/mcp-oauth/src/index.ts"() {
20322
+ // packages/mcp-oauth/dist/index.js
20323
+ var init_dist = __esm({
20324
+ "packages/mcp-oauth/dist/index.js"() {
20355
20325
  "use strict";
20356
20326
  init_auth_store_session_store();
20357
20327
  init_default_oauth_client_provider();
@@ -20684,7 +20654,7 @@ var OAuthMetadataDiscovery;
20684
20654
  var init_oauth_discovery = __esm({
20685
20655
  "packages/tiny-mcp-client/src/oauth-discovery.ts"() {
20686
20656
  "use strict";
20687
- init_src9();
20657
+ init_dist();
20688
20658
  OAuthMetadataDiscovery = class {
20689
20659
  fetchImpl;
20690
20660
  cache;
@@ -20943,10 +20913,10 @@ var MCP_PROTOCOL_VERSION, McpClient, ERROR_PARSE, ERROR_INVALID_REQUEST, ERROR_M
20943
20913
  var init_internal = __esm({
20944
20914
  "packages/tiny-mcp-client/src/internal.ts"() {
20945
20915
  "use strict";
20946
- init_src9();
20916
+ init_dist();
20947
20917
  init_oauth_discovery();
20948
20918
  init_oauth_discovery();
20949
- init_src9();
20919
+ init_dist();
20950
20920
  MCP_PROTOCOL_VERSION = "2025-03-26";
20951
20921
  McpClient = class {
20952
20922
  currentState = "disconnected";
@@ -22130,7 +22100,7 @@ var init_internal = __esm({
22130
22100
  });
22131
22101
 
22132
22102
  // packages/tiny-mcp-client/src/index.ts
22133
- var init_src10 = __esm({
22103
+ var init_src9 = __esm({
22134
22104
  "packages/tiny-mcp-client/src/index.ts"() {
22135
22105
  "use strict";
22136
22106
  init_internal();
@@ -22201,7 +22171,7 @@ var DEFAULT_MCP_CLIENT_INFO, PluginApiImpl;
22201
22171
  var init_plugin_api_impl = __esm({
22202
22172
  "packages/poe-agent/src/runtime/plugin-api-impl.ts"() {
22203
22173
  "use strict";
22204
- init_src10();
22174
+ init_src9();
22205
22175
  init_hooks();
22206
22176
  init_config2();
22207
22177
  init_tool_results();
@@ -23306,7 +23276,7 @@ __export(src_exports, {
23306
23276
  systemPromptPlugin: () => poe_agent_plugin_system_prompt_default,
23307
23277
  webPlugin: () => poe_agent_plugin_web_default
23308
23278
  });
23309
- var init_src11 = __esm({
23279
+ var init_src10 = __esm({
23310
23280
  "packages/poe-agent/src/index.ts"() {
23311
23281
  "use strict";
23312
23282
  init_agent();
@@ -23965,10 +23935,8 @@ var init_participant = __esm({
23965
23935
  function resolveSelectedAgent(agent2) {
23966
23936
  const specifier = parseAgentSpecifier(agent2);
23967
23937
  const resolvedAgentId = resolveAgentId(specifier.agent);
23968
- if (!resolvedAgentId) {
23969
- throw new Error(
23970
- `Unsupported agent "${agent2}". Supported agents: ${supportedAgents}`
23971
- );
23938
+ if (!resolvedAgentId || !loopAgents.some((agent3) => agent3.id === resolvedAgentId)) {
23939
+ throw new Error(`Unsupported agent "${agent2}". Supported agents: ${supportedAgents}`);
23972
23940
  }
23973
23941
  return {
23974
23942
  agent: specifier.model ? `${resolvedAgentId}:${specifier.model}` : resolvedAgentId
@@ -23992,7 +23960,7 @@ async function resolveLoopAgent(input) {
23992
23960
  }
23993
23961
  const selectedAgent = await input.select({
23994
23962
  message: input.message,
23995
- options: allAgents.map((agent2) => ({
23963
+ options: loopAgents.map((agent2) => ({
23996
23964
  value: agent2.id,
23997
23965
  label: agent2.label,
23998
23966
  hint: agent2.summary
@@ -24003,12 +23971,15 @@ async function resolveLoopAgent(input) {
24003
23971
  }
24004
23972
  return resolveSelectedAgent(selectedAgent);
24005
23973
  }
24006
- var supportedAgents;
23974
+ var loopAgents, supportedAgents;
24007
23975
  var init_select_agent = __esm({
24008
23976
  "packages/agent-harness-tools/src/select-agent.ts"() {
24009
23977
  "use strict";
24010
23978
  init_src2();
24011
- supportedAgents = allAgents.map((agent2) => agent2.id).join(", ");
23979
+ loopAgents = allAgents.filter(
23980
+ (agent2) => agent2.binaryName !== void 0 || agent2.id === "poe-agent"
23981
+ );
23982
+ supportedAgents = loopAgents.map((agent2) => agent2.id).join(", ");
24012
23983
  }
24013
23984
  });
24014
23985
 
@@ -24309,7 +24280,7 @@ var init_lock = __esm({
24309
24280
  });
24310
24281
 
24311
24282
  // packages/file-lock/src/index.ts
24312
- var init_src12 = __esm({
24283
+ var init_src11 = __esm({
24313
24284
  "packages/file-lock/src/index.ts"() {
24314
24285
  "use strict";
24315
24286
  init_lock();
@@ -24320,7 +24291,7 @@ var init_src12 = __esm({
24320
24291
  var init_lock2 = __esm({
24321
24292
  "packages/agent-harness-tools/src/lock.ts"() {
24322
24293
  "use strict";
24323
- init_src12();
24294
+ init_src11();
24324
24295
  }
24325
24296
  });
24326
24297
 
@@ -24640,7 +24611,7 @@ var init_skill_config = __esm({
24640
24611
  });
24641
24612
 
24642
24613
  // packages/agent-harness-tools/src/index.ts
24643
- var init_src13 = __esm({
24614
+ var init_src12 = __esm({
24644
24615
  "packages/agent-harness-tools/src/index.ts"() {
24645
24616
  "use strict";
24646
24617
  init_paths();
@@ -25984,7 +25955,7 @@ async function withInjectedAgentRunner(options, operation) {
25984
25955
  var init_loop = __esm({
25985
25956
  "packages/superintendent/src/runtime/loop.ts"() {
25986
25957
  "use strict";
25987
- init_src13();
25958
+ init_src12();
25988
25959
  init_src8();
25989
25960
  init_parse2();
25990
25961
  init_tasks();
@@ -26301,7 +26272,7 @@ function toJsonSchema(schema) {
26301
26272
  }
26302
26273
  }
26303
26274
  var S;
26304
- var init_src14 = __esm({
26275
+ var init_src13 = __esm({
26305
26276
  "packages/toolcraft-schema/src/index.ts"() {
26306
26277
  "use strict";
26307
26278
  init_json2();
@@ -26858,13 +26829,13 @@ function getCommandSourcePath(command) {
26858
26829
  return command[commandSourcePathSymbol];
26859
26830
  }
26860
26831
  var commandConfigSymbol, groupConfigSymbol, commandSourcePathSymbol;
26861
- var init_src15 = __esm({
26832
+ var init_src14 = __esm({
26862
26833
  "packages/toolcraft/src/index.ts"() {
26863
26834
  "use strict";
26864
26835
  init_types4();
26865
26836
  init_config3();
26866
26837
  init_user_error();
26867
- init_src14();
26838
+ init_src13();
26868
26839
  init_package_metadata();
26869
26840
  commandConfigSymbol = /* @__PURE__ */ Symbol("toolcraft.command.config");
26870
26841
  groupConfigSymbol = /* @__PURE__ */ Symbol("toolcraft.group.config");
@@ -26940,7 +26911,7 @@ var builderRunParams, builderRunCommand, builderGroup;
26940
26911
  var init_builder_group = __esm({
26941
26912
  "packages/superintendent/src/commands/builder-group.ts"() {
26942
26913
  "use strict";
26943
- init_src15();
26914
+ init_src14();
26944
26915
  init_src6();
26945
26916
  init_parse2();
26946
26917
  init_run_builder();
@@ -27185,7 +27156,7 @@ var init_apply = __esm({
27185
27156
  });
27186
27157
 
27187
27158
  // packages/agent-skill-config/src/index.ts
27188
- var init_src16 = __esm({
27159
+ var init_src15 = __esm({
27189
27160
  "packages/agent-skill-config/src/index.ts"() {
27190
27161
  "use strict";
27191
27162
  init_configs2();
@@ -27258,10 +27229,10 @@ var fs2, installParams, installCommand, skillTemplateCache;
27258
27229
  var init_install = __esm({
27259
27230
  "packages/superintendent/src/commands/install.ts"() {
27260
27231
  "use strict";
27261
- init_src15();
27232
+ init_src14();
27262
27233
  init_src5();
27263
- init_src16();
27264
- init_src13();
27234
+ init_src15();
27235
+ init_src12();
27265
27236
  fs2 = {
27266
27237
  readFile: (p, encoding) => readFile5(p, encoding),
27267
27238
  writeFile: (p, content) => writeFile2(p, content),
@@ -27440,7 +27411,7 @@ var inspectorListParams, inspectorRunParams, inspectorListCommand, inspectorRunC
27440
27411
  var init_inspector_group = __esm({
27441
27412
  "packages/superintendent/src/commands/inspector-group.ts"() {
27442
27413
  "use strict";
27443
- init_src15();
27414
+ init_src14();
27444
27415
  init_parse2();
27445
27416
  init_run_inspector();
27446
27417
  inspectorListParams = S.Object({
@@ -27514,7 +27485,7 @@ var completeParams, completeCommand;
27514
27485
  var init_complete = __esm({
27515
27486
  "packages/superintendent/src/commands/complete.ts"() {
27516
27487
  "use strict";
27517
- init_src15();
27488
+ init_src14();
27518
27489
  init_write();
27519
27490
  completeParams = S.Object({
27520
27491
  path: S.String({ description: "Path to the superintendent markdown document" }),
@@ -27570,7 +27541,7 @@ var fs3, planPathCommand;
27570
27541
  var init_plan_path = __esm({
27571
27542
  "packages/superintendent/src/commands/plan-path.ts"() {
27572
27543
  "use strict";
27573
- init_src15();
27544
+ init_src14();
27574
27545
  init_src5();
27575
27546
  fs3 = {
27576
27547
  readFile: (p, encoding) => readFile6(p, encoding),
@@ -27625,7 +27596,7 @@ var init_poe_agent_runner = __esm({
27625
27596
  "packages/superintendent/src/commands/poe-agent-runner.ts"() {
27626
27597
  "use strict";
27627
27598
  init_src2();
27628
- init_src11();
27599
+ init_src10();
27629
27600
  }
27630
27601
  });
27631
27602
 
@@ -28502,11 +28473,11 @@ var coreDefaultAgentConfigSchema, runParams, runCommand2, runMcpCommand, configF
28502
28473
  var init_run = __esm({
28503
28474
  "packages/superintendent/src/commands/run.ts"() {
28504
28475
  "use strict";
28505
- init_src13();
28476
+ init_src12();
28506
28477
  init_src8();
28507
28478
  init_src2();
28508
28479
  init_poe_agent_runner();
28509
- init_src15();
28480
+ init_src14();
28510
28481
  init_src6();
28511
28482
  init_src5();
28512
28483
  init_config_scope();
@@ -28778,7 +28749,7 @@ var validateParams, validateCommand, superintendentGroup, superintendentMcpGroup
28778
28749
  var init_superintendent_group = __esm({
28779
28750
  "packages/superintendent/src/commands/superintendent-group.ts"() {
28780
28751
  "use strict";
28781
- init_src15();
28752
+ init_src14();
28782
28753
  init_src6();
28783
28754
  init_parse2();
28784
28755
  init_tasks();
@@ -28849,7 +28820,7 @@ var init_commands = __esm({
28849
28820
  });
28850
28821
 
28851
28822
  // packages/superintendent/src/index.ts
28852
- var init_src17 = __esm({
28823
+ var init_src16 = __esm({
28853
28824
  "packages/superintendent/src/index.ts"() {
28854
28825
  "use strict";
28855
28826
  init_parse2();
@@ -29051,8 +29022,8 @@ var init_config4 = __esm({
29051
29022
  "use strict";
29052
29023
  init_src4();
29053
29024
  init_src5();
29054
- init_src11();
29055
- init_src17();
29025
+ init_src10();
29026
+ init_src16();
29056
29027
  coreConfigScope = defineScope("core", {
29057
29028
  apiKey: {
29058
29029
  type: "string",
@@ -29766,7 +29737,7 @@ var init_resolve3 = __esm({
29766
29737
  });
29767
29738
 
29768
29739
  // packages/workspace-resolver/src/index.ts
29769
- var init_src18 = __esm({
29740
+ var init_src17 = __esm({
29770
29741
  "packages/workspace-resolver/src/index.ts"() {
29771
29742
  "use strict";
29772
29743
  init_parse3();
@@ -29806,7 +29777,7 @@ async function resolveSpawnWorkspace(candidate, options) {
29806
29777
  var init_resolve_spawn_workspace = __esm({
29807
29778
  "src/workspace/resolve-spawn-workspace.ts"() {
29808
29779
  "use strict";
29809
- init_src18();
29780
+ init_src17();
29810
29781
  }
29811
29782
  });
29812
29783
 
@@ -30334,14 +30305,14 @@ var DEFAULT_AUTHORIZATION_ENDPOINT, DEFAULT_TOKEN_ENDPOINT;
30334
30305
  var init_oauth_client = __esm({
30335
30306
  "packages/poe-oauth/src/oauth-client.ts"() {
30336
30307
  "use strict";
30337
- init_src9();
30308
+ init_dist();
30338
30309
  DEFAULT_AUTHORIZATION_ENDPOINT = "https://poe.com/oauth/authorize";
30339
30310
  DEFAULT_TOKEN_ENDPOINT = "https://api.poe.com/token";
30340
30311
  }
30341
30312
  });
30342
30313
 
30343
30314
  // packages/poe-oauth/src/index.ts
30344
- var init_src19 = __esm({
30315
+ var init_src18 = __esm({
30345
30316
  "packages/poe-oauth/src/index.ts"() {
30346
30317
  "use strict";
30347
30318
  init_check_auth();
@@ -31030,6 +31001,15 @@ var init_registry3 = __esm({
31030
31001
  const auth = provider2.auth;
31031
31002
  const envApiKey = context?.envVars?.[auth.envVar];
31032
31003
  const resolvedApiKey = options.apiKey ?? (typeof envApiKey === "string" && envApiKey.trim() ? envApiKey : void 0);
31004
+ if (auth.preferredLogin && context?.resolvePreferredLogin) {
31005
+ const apiKey = await context.resolvePreferredLogin({
31006
+ provider: provider2,
31007
+ apiKey: options.apiKey,
31008
+ envValue: typeof envApiKey === "string" ? envApiKey : void 0
31009
+ });
31010
+ await store.set(apiKey);
31011
+ return;
31012
+ }
31033
31013
  await apiKeyAuthStrategy.login(
31034
31014
  provider2,
31035
31015
  { apiKey: resolvedApiKey },
@@ -31074,7 +31054,8 @@ var init_poe = __esm({
31074
31054
  kind: "api-key",
31075
31055
  envVar: "POE_API_KEY",
31076
31056
  storageKey: "provider:poe",
31077
- prompt: { title: "Poe API key" }
31057
+ prompt: { title: "Poe API key" },
31058
+ preferredLogin: "oauth"
31078
31059
  },
31079
31060
  supportsAgents: allAgents.map((a) => a.id)
31080
31061
  };
@@ -31089,7 +31070,7 @@ var init_anthropic = __esm({
31089
31070
  });
31090
31071
 
31091
31072
  // packages/providers/src/index.ts
31092
- var init_src20 = __esm({
31073
+ var init_src19 = __esm({
31093
31074
  "packages/providers/src/index.ts"() {
31094
31075
  "use strict";
31095
31076
  init_registry3();
@@ -31611,13 +31592,13 @@ var init_container = __esm({
31611
31592
  init_service_registry();
31612
31593
  init_context();
31613
31594
  init_prompts3();
31614
- init_src19();
31595
+ init_src18();
31615
31596
  init_options();
31616
31597
  init_logger2();
31617
31598
  init_error_logger();
31618
31599
  init_src8();
31619
31600
  await init_providers();
31620
- init_src20();
31601
+ init_src19();
31621
31602
  init_poe_code_command_runner();
31622
31603
  init_src();
31623
31604
  }
@@ -33310,7 +33291,7 @@ var init_pipeline = __esm({
33310
33291
  "packages/pipeline/src/run/pipeline.ts"() {
33311
33292
  "use strict";
33312
33293
  init_loader();
33313
- init_src13();
33294
+ init_src12();
33314
33295
  init_discovery();
33315
33296
  init_parser2();
33316
33297
  init_writer2();
@@ -33323,7 +33304,7 @@ var init_pipeline = __esm({
33323
33304
  });
33324
33305
 
33325
33306
  // packages/pipeline/src/index.ts
33326
- var init_src21 = __esm({
33307
+ var init_src20 = __esm({
33327
33308
  "packages/pipeline/src/index.ts"() {
33328
33309
  "use strict";
33329
33310
  init_loader();
@@ -33853,7 +33834,7 @@ async function discoverExperimentDocs(options) {
33853
33834
  var init_discovery2 = __esm({
33854
33835
  "packages/experiment-loop/src/discovery/discovery.ts"() {
33855
33836
  "use strict";
33856
- init_src13();
33837
+ init_src12();
33857
33838
  }
33858
33839
  });
33859
33840
 
@@ -34200,7 +34181,7 @@ async function runExperimentLoop(options) {
34200
34181
  var init_loop2 = __esm({
34201
34182
  "packages/experiment-loop/src/run/loop.ts"() {
34202
34183
  "use strict";
34203
- init_src13();
34184
+ init_src12();
34204
34185
  init_src3();
34205
34186
  init_frontmatter2();
34206
34187
  init_git();
@@ -34212,7 +34193,7 @@ var init_loop2 = __esm({
34212
34193
  });
34213
34194
 
34214
34195
  // packages/experiment-loop/src/index.ts
34215
- var init_src22 = __esm({
34196
+ var init_src21 = __esm({
34216
34197
  "packages/experiment-loop/src/index.ts"() {
34217
34198
  "use strict";
34218
34199
  init_types5();
@@ -34466,7 +34447,7 @@ async function discoverDocs(options) {
34466
34447
  var init_discovery3 = __esm({
34467
34448
  "packages/ralph/src/discovery/discovery.ts"() {
34468
34449
  "use strict";
34469
- init_src13();
34450
+ init_src12();
34470
34451
  }
34471
34452
  });
34472
34453
 
@@ -34841,7 +34822,7 @@ var RalphWorkflowStopError;
34841
34822
  var init_ralph = __esm({
34842
34823
  "packages/ralph/src/run/ralph.ts"() {
34843
34824
  "use strict";
34844
- init_src13();
34825
+ init_src12();
34845
34826
  init_src2();
34846
34827
  init_src3();
34847
34828
  init_frontmatter3();
@@ -34858,7 +34839,7 @@ var init_ralph = __esm({
34858
34839
  });
34859
34840
 
34860
34841
  // packages/ralph/src/index.ts
34861
- var init_src23 = __esm({
34842
+ var init_src22 = __esm({
34862
34843
  "packages/ralph/src/index.ts"() {
34863
34844
  "use strict";
34864
34845
  init_frontmatter3();
@@ -35125,9 +35106,9 @@ var FRONTMATTER_FENCE;
35125
35106
  var init_format = __esm({
35126
35107
  "packages/plan-browser/src/format.ts"() {
35127
35108
  "use strict";
35109
+ init_src20();
35128
35110
  init_src21();
35129
35111
  init_src22();
35130
- init_src23();
35131
35112
  FRONTMATTER_FENCE = "---";
35132
35113
  }
35133
35114
  });
@@ -35422,7 +35403,7 @@ var init_browser = __esm({
35422
35403
  });
35423
35404
 
35424
35405
  // packages/plan-browser/src/index.ts
35425
- var init_src24 = __esm({
35406
+ var init_src23 = __esm({
35426
35407
  "packages/plan-browser/src/index.ts"() {
35427
35408
  "use strict";
35428
35409
  init_discovery4();
@@ -35655,7 +35636,7 @@ var defaultFs;
35655
35636
  var init_document = __esm({
35656
35637
  "packages/markdown-reader/src/core/document.ts"() {
35657
35638
  "use strict";
35658
- init_src15();
35639
+ init_src14();
35659
35640
  init_src6();
35660
35641
  init_scan();
35661
35642
  defaultFs = {
@@ -35707,7 +35688,7 @@ function resolveSection(sections, id) {
35707
35688
  var init_resolve5 = __esm({
35708
35689
  "packages/markdown-reader/src/core/resolve.ts"() {
35709
35690
  "use strict";
35710
- init_src15();
35691
+ init_src14();
35711
35692
  }
35712
35693
  });
35713
35694
 
@@ -35743,8 +35724,8 @@ var readParams, readTool, readSectionParams, readSectionTool;
35743
35724
  var init_tools2 = __esm({
35744
35725
  "packages/markdown-reader/src/mcp/tools.ts"() {
35745
35726
  "use strict";
35746
- init_src15();
35747
35727
  init_src14();
35728
+ init_src13();
35748
35729
  init_read_markdown();
35749
35730
  init_read_section();
35750
35731
  readParams = S.Object({
@@ -35778,7 +35759,7 @@ var markdownGroup;
35778
35759
  var init_group = __esm({
35779
35760
  "packages/markdown-reader/src/mcp/group.ts"() {
35780
35761
  "use strict";
35781
- init_src15();
35762
+ init_src14();
35782
35763
  init_tools2();
35783
35764
  markdownGroup = defineGroup({
35784
35765
  name: "markdown-reader",
@@ -36530,7 +36511,7 @@ var init_content = __esm({
36530
36511
  });
36531
36512
 
36532
36513
  // packages/tiny-stdio-mcp-server/src/index.ts
36533
- var init_src25 = __esm({
36514
+ var init_src24 = __esm({
36534
36515
  "packages/tiny-stdio-mcp-server/src/index.ts"() {
36535
36516
  "use strict";
36536
36517
  init_server();
@@ -37243,7 +37224,7 @@ var ARCHIVE_DIRECTORY_NAME, MARKDOWN_EXTENSION, TASK_KIND, TASK_VERSION, TASK_SC
37243
37224
  var init_markdown_dir = __esm({
37244
37225
  "packages/task-list/src/backends/markdown-dir.ts"() {
37245
37226
  "use strict";
37246
- init_src12();
37227
+ init_src11();
37247
37228
  init_task_schema();
37248
37229
  init_state_machine();
37249
37230
  init_state();
@@ -37738,7 +37719,7 @@ var STORE_KIND, STORE_SCHEMA_ID, STORE_VERSION, TASK_KIND2, TASK_SCHEMA_ID2, TAS
37738
37719
  var init_yaml_file = __esm({
37739
37720
  "packages/task-list/src/backends/yaml-file.ts"() {
37740
37721
  "use strict";
37741
- init_src12();
37722
+ init_src11();
37742
37723
  init_store_schema();
37743
37724
  init_task_schema();
37744
37725
  init_state_machine();
@@ -37798,7 +37779,7 @@ var init_open = __esm({
37798
37779
  });
37799
37780
 
37800
37781
  // packages/task-list/src/index.ts
37801
- var init_src26 = __esm({
37782
+ var init_src25 = __esm({
37802
37783
  "packages/task-list/src/index.ts"() {
37803
37784
  "use strict";
37804
37785
  init_open();
@@ -37978,7 +37959,7 @@ var DEFAULT_LIST_NAME, openedTaskListsByRuntime, validatedListsByRuntime;
37978
37959
  var init_approval_tasks = __esm({
37979
37960
  "packages/toolcraft/src/human-in-loop/approval-tasks.ts"() {
37980
37961
  "use strict";
37981
- init_src26();
37962
+ init_src25();
37982
37963
  init_user_error();
37983
37964
  init_state_machine2();
37984
37965
  DEFAULT_LIST_NAME = "approvals";
@@ -38088,7 +38069,7 @@ var init_mock = __esm({
38088
38069
  });
38089
38070
 
38090
38071
  // packages/agent-human-in-loop/src/index.ts
38091
- var init_src27 = __esm({
38072
+ var init_src26 = __esm({
38092
38073
  "packages/agent-human-in-loop/src/index.ts"() {
38093
38074
  "use strict";
38094
38075
  init_request_approval();
@@ -38126,7 +38107,7 @@ var getDefaultProvider;
38126
38107
  var init_default_provider = __esm({
38127
38108
  "packages/toolcraft/src/human-in-loop/default-provider.ts"() {
38128
38109
  "use strict";
38129
- init_src27();
38110
+ init_src26();
38130
38111
  init_user_error();
38131
38112
  getDefaultProvider = createDefaultProviderFactory();
38132
38113
  }
@@ -38406,7 +38387,7 @@ async function failPendingApproval(tasks, approvalId, error2) {
38406
38387
  var init_runner3 = __esm({
38407
38388
  "packages/toolcraft/src/human-in-loop/runner.ts"() {
38408
38389
  "use strict";
38409
- init_src15();
38390
+ init_src14();
38410
38391
  init_approval_tasks();
38411
38392
  init_gate();
38412
38393
  }
@@ -38553,8 +38534,8 @@ var approvalsGroupSymbol, listScope, runScope, listParams, showParams, approvals
38553
38534
  var init_approvals_commands = __esm({
38554
38535
  "packages/toolcraft/src/human-in-loop/approvals-commands.ts"() {
38555
38536
  "use strict";
38537
+ init_src13();
38556
38538
  init_src14();
38557
- init_src15();
38558
38539
  init_approval_tasks();
38559
38540
  init_runner3();
38560
38541
  approvalsGroupSymbol = /* @__PURE__ */ Symbol("toolcraft.humanInLoop.approvalsBuiltIn");
@@ -39113,7 +39094,7 @@ function parseArrayIndex(value) {
39113
39094
  var init_json_schema_converter = __esm({
39114
39095
  "packages/toolcraft/src/json-schema-converter.ts"() {
39115
39096
  "use strict";
39116
- init_src14();
39097
+ init_src13();
39117
39098
  }
39118
39099
  });
39119
39100
 
@@ -39480,7 +39461,7 @@ var init_mcp_proxy = __esm({
39480
39461
  "packages/toolcraft/src/mcp-proxy.ts"() {
39481
39462
  "use strict";
39482
39463
  init_src6();
39483
- init_src10();
39464
+ init_src9();
39484
39465
  init_json_schema_converter();
39485
39466
  GROUP_CONFIG_SYMBOL_DESCRIPTION = "toolcraft.group.config";
39486
39467
  MCP_PROXY_SCHEMA_URL = "https://poe-platform.github.io/poe-code/schemas/toolcraft/mcp-proxy.schema.json";
@@ -39974,9 +39955,9 @@ var RESERVED_SERVICE_NAMES;
39974
39955
  var init_mcp2 = __esm({
39975
39956
  "packages/toolcraft/src/mcp.ts"() {
39976
39957
  "use strict";
39977
- init_src25();
39958
+ init_src24();
39959
+ init_src13();
39978
39960
  init_src14();
39979
- init_src15();
39980
39961
  init_approvals_commands();
39981
39962
  init_human_in_loop();
39982
39963
  init_mcp_proxy();
@@ -40038,7 +40019,7 @@ var init_run2 = __esm({
40038
40019
  });
40039
40020
 
40040
40021
  // packages/markdown-reader/src/index.ts
40041
- var init_src28 = __esm({
40022
+ var init_src27 = __esm({
40042
40023
  "packages/markdown-reader/src/index.ts"() {
40043
40024
  "use strict";
40044
40025
  init_read_markdown();
@@ -40650,9 +40631,9 @@ var init_plan = __esm({
40650
40631
  async "src/cli/commands/plan.ts"() {
40651
40632
  "use strict";
40652
40633
  init_src6();
40653
- init_src24();
40654
- init_src16();
40655
- init_src28();
40634
+ init_src23();
40635
+ init_src15();
40636
+ init_src27();
40656
40637
  init_src2();
40657
40638
  init_src5();
40658
40639
  init_errors2();
@@ -40822,7 +40803,7 @@ function isMissingDirectory3(error2) {
40822
40803
  var init_pipeline_init = __esm({
40823
40804
  async "src/cli/commands/pipeline-init.ts"() {
40824
40805
  "use strict";
40825
- init_src13();
40806
+ init_src12();
40826
40807
  await init_plan();
40827
40808
  }
40828
40809
  });
@@ -40991,11 +40972,11 @@ var PIPELINE_ACTIVITY_TIMEOUT_RETRY_COUNT;
40991
40972
  var init_pipeline2 = __esm({
40992
40973
  async "src/sdk/pipeline.ts"() {
40993
40974
  "use strict";
40994
- init_src21();
40975
+ init_src20();
40995
40976
  await init_pipeline_init();
40996
40977
  init_SKILL_plan2();
40997
40978
  await init_spawn3();
40998
- init_src21();
40979
+ init_src20();
40999
40980
  PIPELINE_ACTIVITY_TIMEOUT_RETRY_COUNT = 3;
41000
40981
  }
41001
40982
  });
@@ -41679,7 +41660,7 @@ var init_testing = __esm({
41679
41660
  });
41680
41661
 
41681
41662
  // packages/process-runner/src/index.ts
41682
- var init_src29 = __esm({
41663
+ var init_src28 = __esm({
41683
41664
  "packages/process-runner/src/index.ts"() {
41684
41665
  "use strict";
41685
41666
  init_context2();
@@ -42112,8 +42093,8 @@ function resolveReadyCheck(check, spec10) {
42112
42093
  var init_supervisor = __esm({
42113
42094
  "packages/process-launcher/src/supervisor/supervisor.ts"() {
42114
42095
  "use strict";
42115
- init_src29();
42116
- init_src18();
42096
+ init_src28();
42097
+ init_src17();
42117
42098
  init_health_check();
42118
42099
  init_log_writer();
42119
42100
  init_state_store();
@@ -42581,7 +42562,7 @@ var init_launcher = __esm({
42581
42562
  });
42582
42563
 
42583
42564
  // packages/process-launcher/src/index.ts
42584
- var init_src30 = __esm({
42565
+ var init_src29 = __esm({
42585
42566
  "packages/process-launcher/src/index.ts"() {
42586
42567
  "use strict";
42587
42568
  init_state_store();
@@ -42611,7 +42592,7 @@ async function runRalph2(options) {
42611
42592
  var init_ralph2 = __esm({
42612
42593
  async "src/sdk/ralph.ts"() {
42613
42594
  "use strict";
42614
- init_src23();
42595
+ init_src22();
42615
42596
  await init_spawn3();
42616
42597
  }
42617
42598
  });
@@ -42681,8 +42662,8 @@ async function appendExperimentJournalEntry(options) {
42681
42662
  var init_experiment = __esm({
42682
42663
  async "src/sdk/experiment.ts"() {
42683
42664
  "use strict";
42684
- init_src13();
42685
- init_src22();
42665
+ init_src12();
42666
+ init_src21();
42686
42667
  await init_spawn3();
42687
42668
  }
42688
42669
  });
@@ -43111,7 +43092,7 @@ function checkUserAllow(automation, commentAuthorAssociation) {
43111
43092
  var init_check_user_allow = __esm({
43112
43093
  "packages/github-workflows/src/exec/check-user-allow.ts"() {
43113
43094
  "use strict";
43114
- init_src15();
43095
+ init_src14();
43115
43096
  }
43116
43097
  });
43117
43098
 
@@ -43137,7 +43118,7 @@ function requireCommentPrefix(automation, commentBody) {
43137
43118
  var init_require_comment_prefix = __esm({
43138
43119
  "packages/github-workflows/src/exec/require-comment-prefix.ts"() {
43139
43120
  "use strict";
43140
- init_src15();
43121
+ init_src14();
43141
43122
  }
43142
43123
  });
43143
43124
 
@@ -43161,7 +43142,7 @@ function checkNodeVersion(version) {
43161
43142
  var init_preflight = __esm({
43162
43143
  "packages/github-workflows/src/preflight.ts"() {
43163
43144
  "use strict";
43164
- init_src15();
43145
+ init_src14();
43165
43146
  }
43166
43147
  });
43167
43148
 
@@ -43203,7 +43184,7 @@ var init_setup_agent = __esm({
43203
43184
  "packages/github-workflows/src/setup-agent.ts"() {
43204
43185
  "use strict";
43205
43186
  init_src8();
43206
- init_src15();
43187
+ init_src14();
43207
43188
  }
43208
43189
  });
43209
43190
 
@@ -43768,8 +43749,8 @@ var init_commands2 = __esm({
43768
43749
  "packages/github-workflows/src/commands.ts"() {
43769
43750
  "use strict";
43770
43751
  init_src8();
43752
+ init_src13();
43771
43753
  init_src14();
43772
- init_src15();
43773
43754
  init_src6();
43774
43755
  init_discover2();
43775
43756
  init_check_user_allow();
@@ -44131,7 +44112,7 @@ var init_commands2 = __esm({
44131
44112
  });
44132
44113
 
44133
44114
  // packages/github-workflows/src/index.ts
44134
- var init_src31 = __esm({
44115
+ var init_src30 = __esm({
44135
44116
  "packages/github-workflows/src/index.ts"() {
44136
44117
  "use strict";
44137
44118
  init_frontmatter4();
@@ -44445,9 +44426,9 @@ function resolveEngine(engine) {
44445
44426
  var init_launch = __esm({
44446
44427
  "src/sdk/launch.ts"() {
44447
44428
  "use strict";
44448
- init_src18();
44449
- init_src30();
44429
+ init_src17();
44450
44430
  init_src29();
44431
+ init_src28();
44451
44432
  init_execution_context();
44452
44433
  }
44453
44434
  });
@@ -44561,20 +44542,6 @@ var require_config_toml = __commonJS({
44561
44542
  }
44562
44543
  });
44563
44544
 
44564
- // src/templates/tiny-http-mcp-server/server.mjs.mustache
44565
- var require_server_mjs = __commonJS({
44566
- "src/templates/tiny-http-mcp-server/server.mjs.mustache"(exports, module) {
44567
- module.exports = 'import path from "node:path";\nimport { readFile } from "node:fs/promises";\nimport { fileURLToPath, pathToFileURL } from "node:url";\nimport { createHttpServer } from "tiny-http-mcp-server";\n\nfunction isWindowsAbsolutePath(value) {\n if (value.length < 3) {\n return false;\n }\n\n const drive = value.charCodeAt(0);\n const separator = value[2];\n const isLetter =\n (drive >= 65 && drive <= 90) || (drive >= 97 && drive <= 122);\n\n return isLetter && value[1] === ":" && (separator === "\\\\" || separator === "/");\n}\n\nfunction resolveModuleSpecifier(baseDir, value) {\n if (value.startsWith("file:")) {\n return value;\n }\n\n if (value.startsWith(".") || value.startsWith("/") || isWindowsAbsolutePath(value)) {\n const resolvedPath = path.isAbsolute(value)\n ? value\n : path.resolve(baseDir, value);\n return pathToFileURL(resolvedPath).href;\n }\n\n return value;\n}\n\nconst directory = path.dirname(fileURLToPath(import.meta.url));\nconst config = JSON.parse(\n await readFile(new URL("./config.json", import.meta.url), "utf8")\n);\n\nconst verifierModule = await import(\n resolveModuleSpecifier(directory, config.oauth.verifierModule)\n);\nconst verifier = verifierModule[config.oauth.verifierExport ?? "default"];\n\nif (!verifier || typeof verifier.verify !== "function") {\n throw new Error("Verifier module must export an object with a verify() method.");\n}\n\nconst server = createHttpServer({\n name: config.name,\n version: config.version,\n oauth: {\n resource: config.oauth.resource,\n authorizationServers: config.oauth.authorizationServers,\n requiredScopes: config.oauth.requiredScopes,\n scopesSupported: config.oauth.scopesSupported,\n bearerMethodsSupported: config.oauth.bearerMethodsSupported,\n verifier,\n },\n});\n\nconst handle = await server.listenHttp(config.listen);\n\nconsole.log(handle.url);\n\nconst shutdown = async () => {\n await handle.close();\n process.exit(0);\n};\n\nprocess.once("SIGINT", () => {\n void shutdown();\n});\n\nprocess.once("SIGTERM", () => {\n void shutdown();\n});\n';
44568
- }
44569
- });
44570
-
44571
- // src/templates/tiny-http-mcp-server/verify-token.mjs.mustache
44572
- var require_verify_token_mjs = __commonJS({
44573
- "src/templates/tiny-http-mcp-server/verify-token.mjs.mustache"(exports, module) {
44574
- module.exports = 'import { TokenVerificationError } from "tiny-http-mcp-server";\n\nexport default {\n async verify(_input) {\n throw new TokenVerificationError({\n error: "invalid_token",\n errorDescription: "Replace ~/.poe-code/tiny-http-mcp-server/verify-token.mjs with your token verifier.",\n });\n },\n};\n';
44575
- }
44576
- });
44577
-
44578
44545
  // src/providers/create-provider.ts
44579
44546
  async function loadTemplate2(templateId) {
44580
44547
  const loader = templateImports[templateId];
@@ -44656,9 +44623,7 @@ var init_create_provider = __esm({
44656
44623
  "py-poe-spawn/env.mustache": () => Promise.resolve().then(() => __toESM(require_env(), 1)),
44657
44624
  "py-poe-spawn/main.py.mustache": () => Promise.resolve().then(() => __toESM(require_main_py(), 1)),
44658
44625
  "py-poe-spawn/requirements.txt.mustache": () => Promise.resolve().then(() => __toESM(require_requirements_txt(), 1)),
44659
- "codex/config.toml.mustache": () => Promise.resolve().then(() => __toESM(require_config_toml(), 1)),
44660
- "tiny-http-mcp-server/server.mjs.mustache": () => Promise.resolve().then(() => __toESM(require_server_mjs(), 1)),
44661
- "tiny-http-mcp-server/verify-token.mjs.mustache": () => Promise.resolve().then(() => __toESM(require_verify_token_mjs(), 1))
44626
+ "codex/config.toml.mustache": () => Promise.resolve().then(() => __toESM(require_config_toml(), 1))
44662
44627
  };
44663
44628
  }
44664
44629
  });
@@ -45039,7 +45004,7 @@ function createInMemoryAcpTransport2(options) {
45039
45004
  }
45040
45005
  if (method === "session/new") {
45041
45006
  const request = params;
45042
- const { createAgentSession: createAgentSession2 } = await Promise.resolve().then(() => (init_src11(), src_exports));
45007
+ const { createAgentSession: createAgentSession2 } = await Promise.resolve().then(() => (init_src10(), src_exports));
45043
45008
  const session = await createAgentSession2({
45044
45009
  model: options.model,
45045
45010
  cwd: request.cwd || options.cwd,
@@ -47496,7 +47461,7 @@ var init_cli = __esm({
47496
47461
  "packages/toolcraft/src/cli.ts"() {
47497
47462
  "use strict";
47498
47463
  init_src6();
47499
- init_src15();
47464
+ init_src14();
47500
47465
  init_approvals_commands();
47501
47466
  init_human_in_loop();
47502
47467
  init_mcp_proxy();
@@ -47559,7 +47524,7 @@ function openInBrowser(url) {
47559
47524
  var init_oauth_login = __esm({
47560
47525
  "src/cli/oauth-login.ts"() {
47561
47526
  "use strict";
47562
- init_src19();
47527
+ init_src18();
47563
47528
  init_src6();
47564
47529
  }
47565
47530
  });
@@ -47682,14 +47647,14 @@ var init_container2 = __esm({
47682
47647
  init_service_registry();
47683
47648
  init_context();
47684
47649
  init_prompts3();
47685
- init_src19();
47650
+ init_src18();
47686
47651
  init_options();
47687
47652
  init_logger2();
47688
47653
  init_error_logger();
47689
47654
  init_src8();
47690
47655
  init_src6();
47691
47656
  await init_providers();
47692
- init_src20();
47657
+ init_src19();
47693
47658
  init_poe_code_command_runner();
47694
47659
  init_errors2();
47695
47660
  init_oauth_login();
@@ -47700,27 +47665,7 @@ var init_container2 = __esm({
47700
47665
  function registerConfigureCommand(program, container) {
47701
47666
  const serviceNames = listServiceNames(container.registry.list());
47702
47667
  const serviceDescription = `Tool to configure${formatServiceList(serviceNames)}`;
47703
- const configureCommand = program.command("configure").alias("c").description("Configure developer tooling for Poe API.").argument("[agent]", serviceDescription).option("-y, --yes", "Accept defaults, skip prompts").option("--api-key <key>", "Poe API key").option("--model <model>", "Model identifier").option("--reasoning-effort <level>", "Reasoning effort level").option("--provider <id>", "Provider to use for this agent").option("--oauth-resource <uri>", "OAuth protected resource URI").option(
47704
- "--oauth-authorization-server <issuer>",
47705
- "OAuth authorization server issuer URL",
47706
- collectValues,
47707
- []
47708
- ).option(
47709
- "--oauth-supported-scope <scope>",
47710
- "OAuth supported scope published in metadata",
47711
- collectValues,
47712
- []
47713
- ).option(
47714
- "--oauth-required-scope <scope>",
47715
- "OAuth scope required on MCP requests",
47716
- collectValues,
47717
- []
47718
- ).option(
47719
- "--oauth-bearer-method <method>",
47720
- "OAuth bearer transport published in metadata",
47721
- collectValues,
47722
- []
47723
- ).option("--oauth-verifier-module <path>", "OAuth verifier module path or specifier").option("--oauth-verifier-export <name>", "OAuth verifier export name").action(async (service, options) => {
47668
+ const configureCommand = program.command("configure").alias("c").description("Configure developer tooling for Poe API.").argument("[agent]", serviceDescription).option("-y, --yes", "Accept defaults, skip prompts").option("--api-key <key>", "Poe API key").option("--model <model>", "Model identifier").option("--reasoning-effort <level>", "Reasoning effort level").option("--provider <id>", "Provider to use for this agent").action(async (service, options) => {
47724
47669
  const resolved = await resolveServiceArgument(program, container, service, {
47725
47670
  action: "configure"
47726
47671
  });
@@ -47810,7 +47755,7 @@ async function resolveProvider3(agentId, options, container, flags) {
47810
47755
  }
47811
47756
  if (explicit) {
47812
47757
  if (!await container.providerRegistry.isLoggedIn(explicit)) {
47813
- await triggerProviderLogin(container, explicit, options.apiKey);
47758
+ await triggerProviderLogin(container, explicit, options.apiKey, flags);
47814
47759
  }
47815
47760
  return explicit;
47816
47761
  }
@@ -47837,7 +47782,7 @@ async function resolveProvider3(agentId, options, container, flags) {
47837
47782
  );
47838
47783
  }
47839
47784
  const chosen = candidates.length === 1 ? candidates[0].id : await promptForProviderChoice(agentId, candidates, container);
47840
- await triggerProviderLogin(container, chosen, options.apiKey);
47785
+ await triggerProviderLogin(container, chosen, options.apiKey, flags);
47841
47786
  return chosen;
47842
47787
  }
47843
47788
  function hasProviderEnvCredential(provider2, container) {
@@ -47860,13 +47805,20 @@ async function promptForProviderChoice(agentId, providers, container) {
47860
47805
  }
47861
47806
  return selected;
47862
47807
  }
47863
- async function triggerProviderLogin(container, providerId, apiKey) {
47808
+ async function triggerProviderLogin(container, providerId, apiKey, flags) {
47864
47809
  await container.providerRegistry.login(
47865
47810
  providerId,
47866
47811
  { apiKey },
47867
47812
  {
47868
47813
  envVars: container.env.variables,
47869
- promptForSecret: createSecretPrompter(container)
47814
+ promptForSecret: createSecretPrompter(container),
47815
+ resolvePreferredLogin: async (input) => container.options.resolveApiKey({
47816
+ value: input.apiKey,
47817
+ envValue: input.envValue,
47818
+ dryRun: flags.dryRun,
47819
+ assumeYes: flags.assumeYes,
47820
+ allowStored: false
47821
+ })
47870
47822
  }
47871
47823
  );
47872
47824
  }
@@ -47932,9 +47884,6 @@ async function resolveServiceArgument(program, container, provided, selectionCon
47932
47884
  }
47933
47885
  return resolved.name;
47934
47886
  }
47935
- function collectValues(value, previous) {
47936
- return [...previous, value];
47937
- }
47938
47887
  var serviceSelectionPrompt, DEFAULT_SERVICE_AGENT;
47939
47888
  var init_configure = __esm({
47940
47889
  "src/cli/commands/configure.ts"() {
@@ -47967,7 +47916,7 @@ function registerAgentCommand(program, container) {
47967
47916
  }
47968
47917
  let session;
47969
47918
  try {
47970
- const { createAgentSession: createAgentSession2 } = await Promise.resolve().then(() => (init_src11(), src_exports));
47919
+ const { createAgentSession: createAgentSession2 } = await Promise.resolve().then(() => (init_src10(), src_exports));
47971
47920
  session = await createAgentSession2({
47972
47921
  model: options.model,
47973
47922
  apiKey: options.apiKey,
@@ -48752,7 +48701,7 @@ var init_login = __esm({
48752
48701
  "src/cli/commands/login.ts"() {
48753
48702
  "use strict";
48754
48703
  init_shared();
48755
- init_src20();
48704
+ init_src19();
48756
48705
  init_errors2();
48757
48706
  init_config4();
48758
48707
  init_mutation_events();
@@ -50346,7 +50295,7 @@ var generateTextSchema, generateImageSchema, generateVideoSchema, generateAudioS
50346
50295
  var init_mcp_server = __esm({
50347
50296
  "src/cli/mcp-server.ts"() {
50348
50297
  "use strict";
50349
- init_src25();
50298
+ init_src24();
50350
50299
  init_client_instance();
50351
50300
  init_constants();
50352
50301
  generateTextSchema = defineSchema({
@@ -50818,7 +50767,7 @@ var init_apply2 = __esm({
50818
50767
  });
50819
50768
 
50820
50769
  // packages/agent-mcp-config/src/index.ts
50821
- var init_src32 = __esm({
50770
+ var init_src31 = __esm({
50822
50771
  "packages/agent-mcp-config/src/index.ts"() {
50823
50772
  "use strict";
50824
50773
  init_configs3();
@@ -51002,7 +50951,7 @@ var init_mcp3 = __esm({
51002
50951
  init_shared();
51003
50952
  init_mcp_output_format();
51004
50953
  init_command_not_found();
51005
- init_src32();
50954
+ init_src31();
51006
50955
  init_execution_context();
51007
50956
  DEFAULT_MCP_AGENT = "claude-code";
51008
50957
  }
@@ -51224,7 +51173,7 @@ var init_skill = __esm({
51224
51173
  "use strict";
51225
51174
  init_src6();
51226
51175
  init_src2();
51227
- init_src16();
51176
+ init_src15();
51228
51177
  init_shared();
51229
51178
  init_command_not_found();
51230
51179
  DEFAULT_SKILL_AGENT = "claude-code";
@@ -51896,7 +51845,7 @@ var init_models2 = __esm({
51896
51845
  var init_pipeline_loop_agent = __esm({
51897
51846
  "src/cli/commands/pipeline-loop-agent.ts"() {
51898
51847
  "use strict";
51899
- init_src13();
51848
+ init_src12();
51900
51849
  }
51901
51850
  });
51902
51851
 
@@ -52906,8 +52855,8 @@ var init_pipeline3 = __esm({
52906
52855
  init_src6();
52907
52856
  init_src2();
52908
52857
  init_src8();
52909
- init_src13();
52910
- init_src16();
52858
+ init_src12();
52859
+ init_src15();
52911
52860
  init_src5();
52912
52861
  init_config4();
52913
52862
  init_errors2();
@@ -52916,7 +52865,7 @@ var init_pipeline3 = __esm({
52916
52865
  init_pipeline_loop_agent();
52917
52866
  await init_pipeline2();
52918
52867
  await init_spawn3();
52919
- init_src21();
52868
+ init_src20();
52920
52869
  init_dashboard_loop_shared();
52921
52870
  DEFAULT_PIPELINE_AGENT = "claude-code";
52922
52871
  DEFAULT_PIPELINE_SCOPE = "local";
@@ -53489,8 +53438,8 @@ var init_ralph3 = __esm({
53489
53438
  "use strict";
53490
53439
  init_src6();
53491
53440
  init_src2();
53492
- init_src13();
53493
- init_src23();
53441
+ init_src12();
53442
+ init_src22();
53494
53443
  init_src5();
53495
53444
  init_config4();
53496
53445
  init_errors2();
@@ -54273,10 +54222,10 @@ var init_experiment2 = __esm({
54273
54222
  "use strict";
54274
54223
  init_src6();
54275
54224
  init_src2();
54225
+ init_src20();
54226
+ init_src12();
54227
+ init_src15();
54276
54228
  init_src21();
54277
- init_src13();
54278
- init_src16();
54279
- init_src22();
54280
54229
  init_errors2();
54281
54230
  init_shared();
54282
54231
  await init_experiment();
@@ -54294,7 +54243,7 @@ var init_experiment2 = __esm({
54294
54243
  import { Option as Option3 } from "commander";
54295
54244
  function registerLaunchCommand(program, container) {
54296
54245
  const launch = program.command("launch").description("Manage long-running host and Docker processes.").addHelpCommand(false);
54297
- launch.command("start").usage("<id> -- <command> [args...]").description("Start and supervise a managed process.").argument("[id]", "Managed process identifier").argument("[command...]", "Command and arguments to run after --").addOption(createChoiceOption("--restart <policy>", "Restart policy", ["never", "on-failure", "always"], "on-failure")).option("--max-restarts <n>", "Max consecutive restarts", "5").option("--ready-pattern <string>", "Log substring to wait for before reporting running").option("--ready-port <port>", "TCP port to probe for readiness").option("--cwd <dir>", "Working directory for the managed process").option("--env <entry>", "Environment variable (KEY=VALUE)", collectValues2, []).option("--image <image>", "Docker image").option("--mount <src:target[:ro]>", "Docker bind mount", collectValues2, []).option("--port <host:container>", "Docker port mapping", collectValues2, []).option("--network <name>", "Docker network").addOption(createChoiceOption("--engine <engine>", "Container engine", ["docker", "podman"])).action(async function(id, commandArgs) {
54246
+ launch.command("start").usage("<id> -- <command> [args...]").description("Start and supervise a managed process.").argument("[id]", "Managed process identifier").argument("[command...]", "Command and arguments to run after --").addOption(createChoiceOption("--restart <policy>", "Restart policy", ["never", "on-failure", "always"], "on-failure")).option("--max-restarts <n>", "Max consecutive restarts", "5").option("--ready-pattern <string>", "Log substring to wait for before reporting running").option("--ready-port <port>", "TCP port to probe for readiness").option("--cwd <dir>", "Working directory for the managed process").option("--env <entry>", "Environment variable (KEY=VALUE)", collectValues, []).option("--image <image>", "Docker image").option("--mount <src:target[:ro]>", "Docker bind mount", collectValues, []).option("--port <host:container>", "Docker port mapping", collectValues, []).option("--network <name>", "Docker network").addOption(createChoiceOption("--engine <engine>", "Container engine", ["docker", "podman"])).action(async function(id, commandArgs) {
54298
54247
  const spec10 = await resolveStartSpec({
54299
54248
  commandArgs,
54300
54249
  id,
@@ -54698,7 +54647,7 @@ function parseNonNegativeInt3(value, fieldName) {
54698
54647
  }
54699
54648
  return parsed;
54700
54649
  }
54701
- function collectValues2(value, previous) {
54650
+ function collectValues(value, previous) {
54702
54651
  return [...previous, value];
54703
54652
  }
54704
54653
  var init_launch2 = __esm({
@@ -55918,7 +55867,7 @@ async function writeCacheEntry(root, entry) {
55918
55867
  "utf8"
55919
55868
  );
55920
55869
  }
55921
- function parseCacheEntry(value, key2) {
55870
+ function parseCacheEntry(value, _key) {
55922
55871
  const object = expectRecord2(value);
55923
55872
  return {
55924
55873
  key: expectString2(object.key, "key"),
@@ -55984,7 +55933,7 @@ var init_cache_cli = __esm({
55984
55933
  }
55985
55934
  });
55986
55935
 
55987
- // packages/tokenfill/src/tokenizer.ts
55936
+ // packages/tokenfill/dist/tokenizer.js
55988
55937
  import { get_encoding } from "tiktoken";
55989
55938
  function createTokenizer(options = {}) {
55990
55939
  const encoding = options.encoding ?? DEFAULT_ENCODING;
@@ -56021,13 +55970,13 @@ function countTokens(text4) {
56021
55970
  }
56022
55971
  var DEFAULT_ENCODING, defaultTokenizer;
56023
55972
  var init_tokenizer = __esm({
56024
- "packages/tokenfill/src/tokenizer.ts"() {
55973
+ "packages/tokenfill/dist/tokenizer.js"() {
56025
55974
  "use strict";
56026
55975
  DEFAULT_ENCODING = "cl100k_base";
56027
55976
  }
56028
55977
  });
56029
55978
 
56030
- // packages/tokenfill/src/corpus.ts
55979
+ // packages/tokenfill/dist/corpus.js
56031
55980
  import { readdirSync, readFileSync as readFileSync3 } from "node:fs";
56032
55981
  import { dirname as dirname5, join as join5 } from "node:path";
56033
55982
  import { fileURLToPath as fileURLToPath12 } from "node:url";
@@ -56043,7 +55992,7 @@ function loadBuiltInCorpusArticles() {
56043
55992
  }
56044
55993
  var CORPUS_ARTICLE_SEPARATOR, corpusDirectoryPath, BUILT_IN_CORPUS_ARTICLES;
56045
55994
  var init_corpus = __esm({
56046
- "packages/tokenfill/src/corpus.ts"() {
55995
+ "packages/tokenfill/dist/corpus.js"() {
56047
55996
  "use strict";
56048
55997
  CORPUS_ARTICLE_SEPARATOR = "\n\n";
56049
55998
  corpusDirectoryPath = join5(dirname5(fileURLToPath12(import.meta.url)), "corpus");
@@ -56051,10 +56000,10 @@ var init_corpus = __esm({
56051
56000
  }
56052
56001
  });
56053
56002
 
56054
- // packages/tokenfill/src/tokenfill.ts
56003
+ // packages/tokenfill/dist/tokenfill.js
56055
56004
  var builtInCorpusText, builtInCorpusByteLength;
56056
56005
  var init_tokenfill = __esm({
56057
- "packages/tokenfill/src/tokenfill.ts"() {
56006
+ "packages/tokenfill/dist/tokenfill.js"() {
56058
56007
  "use strict";
56059
56008
  init_corpus();
56060
56009
  init_tokenizer();
@@ -56063,9 +56012,9 @@ var init_tokenfill = __esm({
56063
56012
  }
56064
56013
  });
56065
56014
 
56066
- // packages/tokenfill/src/index.ts
56067
- var init_src33 = __esm({
56068
- "packages/tokenfill/src/index.ts"() {
56015
+ // packages/tokenfill/dist/index.js
56016
+ var init_dist2 = __esm({
56017
+ "packages/tokenfill/dist/index.js"() {
56069
56018
  "use strict";
56070
56019
  init_tokenizer();
56071
56020
  init_tokenfill();
@@ -56138,7 +56087,7 @@ function isMissing4(error2) {
56138
56087
  var init_tokens2 = __esm({
56139
56088
  "packages/memory/src/tokens.ts"() {
56140
56089
  "use strict";
56141
- init_src33();
56090
+ init_dist2();
56142
56091
  init_pages();
56143
56092
  }
56144
56093
  });
@@ -56289,7 +56238,7 @@ var init_ingest = __esm({
56289
56238
  var init_mcp4 = __esm({
56290
56239
  "packages/memory/src/mcp.ts"() {
56291
56240
  "use strict";
56292
- init_src25();
56241
+ init_src24();
56293
56242
  }
56294
56243
  });
56295
56244
 
@@ -56297,8 +56246,8 @@ var init_mcp4 = __esm({
56297
56246
  var init_install3 = __esm({
56298
56247
  "packages/memory/src/install.ts"() {
56299
56248
  "use strict";
56300
- init_src16();
56301
- init_src32();
56249
+ init_src15();
56250
+ init_src31();
56302
56251
  }
56303
56252
  });
56304
56253
 
@@ -56417,7 +56366,7 @@ function inferRepoRoot2(root) {
56417
56366
  var init_query = __esm({
56418
56367
  "packages/memory/src/query.ts"() {
56419
56368
  "use strict";
56420
- init_src33();
56369
+ init_dist2();
56421
56370
  init_src8();
56422
56371
  init_src5();
56423
56372
  init_pages();
@@ -56504,7 +56453,7 @@ function inferRepoRoot3(root) {
56504
56453
  var init_explain = __esm({
56505
56454
  "packages/memory/src/explain.ts"() {
56506
56455
  "use strict";
56507
- init_src33();
56456
+ init_dist2();
56508
56457
  init_src8();
56509
56458
  init_src5();
56510
56459
  init_pages();
@@ -56569,7 +56518,7 @@ var init_handle = __esm({
56569
56518
  });
56570
56519
 
56571
56520
  // packages/memory/src/index.ts
56572
- var init_src34 = __esm({
56521
+ var init_src32 = __esm({
56573
56522
  "packages/memory/src/index.ts"() {
56574
56523
  "use strict";
56575
56524
  init_paths2();
@@ -56773,7 +56722,7 @@ var init_memory2 = __esm({
56773
56722
  "src/cli/commands/memory.ts"() {
56774
56723
  "use strict";
56775
56724
  init_src6();
56776
- init_src34();
56725
+ init_src32();
56777
56726
  init_command_not_found();
56778
56727
  init_errors2();
56779
56728
  init_shared();
@@ -56827,7 +56776,14 @@ async function executeProviderLogin(program, container, id, options) {
56827
56776
  if (!flags.dryRun) {
56828
56777
  await container.providerRegistry.login(id, { apiKey: options.apiKey }, {
56829
56778
  envVars: container.env.variables,
56830
- promptForSecret: createSecretPrompter(container)
56779
+ promptForSecret: createSecretPrompter(container),
56780
+ resolvePreferredLogin: async (input) => container.options.resolveApiKey({
56781
+ value: input.apiKey,
56782
+ envValue: input.envValue,
56783
+ dryRun: flags.dryRun,
56784
+ assumeYes: flags.assumeYes,
56785
+ allowStored: false
56786
+ })
56831
56787
  });
56832
56788
  }
56833
56789
  resources.context.complete({
@@ -56867,7 +56823,7 @@ var init_package2 = __esm({
56867
56823
  "package.json"() {
56868
56824
  package_default2 = {
56869
56825
  name: "poe-code",
56870
- version: "3.0.197",
56826
+ version: "3.0.198",
56871
56827
  description: "CLI tool to configure Poe API for developer workflows.",
56872
56828
  type: "module",
56873
56829
  main: "./dist/index.js",
@@ -56950,6 +56906,7 @@ var init_package2 = __esm({
56950
56906
  "poe-codex": "dist/bin/poe-codex.js",
56951
56907
  "poe-opencode": "dist/bin/poe-opencode.js",
56952
56908
  "poe-agent": "dist/bin/poe-agent.js",
56909
+ "poe-superintendent-mcp": "packages/superintendent/dist/mcp.js",
56953
56910
  "tiny-oauth-test-server": "packages/tiny-oauth-test-server/dist/cli.js",
56954
56911
  "tiny-stdio-mcp-test-server": "packages/tiny-stdio-mcp-test-server/dist/cli.js"
56955
56912
  },
@@ -56960,6 +56917,7 @@ var init_package2 = __esm({
56960
56917
  "packages/config-mutations/dist",
56961
56918
  "packages/design-system/dist",
56962
56919
  "packages/memory/dist",
56920
+ "packages/superintendent/dist",
56963
56921
  "packages/tiny-stdio-mcp-server/dist"
56964
56922
  ],
56965
56923
  engines: {
@@ -56993,6 +56951,7 @@ var init_package2 = __esm({
56993
56951
  "@poe-code/agent-harness-tools": "*",
56994
56952
  "@poe-code/agent-human-in-loop": "*",
56995
56953
  "@poe-code/agent-mcp-config": "*",
56954
+ "@poe-code/agent-script": "*",
56996
56955
  "@poe-code/agent-skill-config": "*",
56997
56956
  "@poe-code/agent-spawn": "*",
56998
56957
  "@poe-code/cached-resource": "*",
@@ -57423,8 +57382,8 @@ var init_program = __esm({
57423
57382
  async "src/cli/program.ts"() {
57424
57383
  "use strict";
57425
57384
  init_cli();
57426
- init_src31();
57427
- init_src17();
57385
+ init_src30();
57386
+ init_src16();
57428
57387
  await init_container2();
57429
57388
  init_src6();
57430
57389
  init_configure();
@@ -57675,7 +57634,7 @@ import { realpathSync as realpathSync2 } from "node:fs";
57675
57634
  import { pathToFileURL as pathToFileURL3 } from "node:url";
57676
57635
 
57677
57636
  // src/sdk/process-launcher.ts
57678
- init_src30();
57637
+ init_src29();
57679
57638
 
57680
57639
  // src/index.ts
57681
57640
  await init_ralph2();
@@ -57799,7 +57758,7 @@ var planDocumentSchema = {
57799
57758
  };
57800
57759
 
57801
57760
  // src/index.ts
57802
- init_src31();
57761
+ init_src30();
57803
57762
  init_launch();
57804
57763
 
57805
57764
  // src/cli/poe-agent-main.ts