poe-code 3.0.197 → 3.0.199

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