poe-code 3.0.196 → 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 +263 -269
  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 +18 -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();
@@ -33494,6 +33475,8 @@ var init_journal = __esm({
33494
33475
  this.journalPath = journalPath;
33495
33476
  this.fs = fs19;
33496
33477
  }
33478
+ journalPath;
33479
+ fs;
33497
33480
  async init() {
33498
33481
  await this.fs.mkdir(dirname2(this.journalPath), { recursive: true });
33499
33482
  try {
@@ -33851,7 +33834,7 @@ async function discoverExperimentDocs(options) {
33851
33834
  var init_discovery2 = __esm({
33852
33835
  "packages/experiment-loop/src/discovery/discovery.ts"() {
33853
33836
  "use strict";
33854
- init_src13();
33837
+ init_src12();
33855
33838
  }
33856
33839
  });
33857
33840
 
@@ -34198,7 +34181,7 @@ async function runExperimentLoop(options) {
34198
34181
  var init_loop2 = __esm({
34199
34182
  "packages/experiment-loop/src/run/loop.ts"() {
34200
34183
  "use strict";
34201
- init_src13();
34184
+ init_src12();
34202
34185
  init_src3();
34203
34186
  init_frontmatter2();
34204
34187
  init_git();
@@ -34210,7 +34193,7 @@ var init_loop2 = __esm({
34210
34193
  });
34211
34194
 
34212
34195
  // packages/experiment-loop/src/index.ts
34213
- var init_src22 = __esm({
34196
+ var init_src21 = __esm({
34214
34197
  "packages/experiment-loop/src/index.ts"() {
34215
34198
  "use strict";
34216
34199
  init_types5();
@@ -34464,7 +34447,7 @@ async function discoverDocs(options) {
34464
34447
  var init_discovery3 = __esm({
34465
34448
  "packages/ralph/src/discovery/discovery.ts"() {
34466
34449
  "use strict";
34467
- init_src13();
34450
+ init_src12();
34468
34451
  }
34469
34452
  });
34470
34453
 
@@ -34839,7 +34822,7 @@ var RalphWorkflowStopError;
34839
34822
  var init_ralph = __esm({
34840
34823
  "packages/ralph/src/run/ralph.ts"() {
34841
34824
  "use strict";
34842
- init_src13();
34825
+ init_src12();
34843
34826
  init_src2();
34844
34827
  init_src3();
34845
34828
  init_frontmatter3();
@@ -34850,12 +34833,13 @@ var init_ralph = __esm({
34850
34833
  this.kind = kind;
34851
34834
  this.name = "RalphWorkflowStopError";
34852
34835
  }
34836
+ kind;
34853
34837
  };
34854
34838
  }
34855
34839
  });
34856
34840
 
34857
34841
  // packages/ralph/src/index.ts
34858
- var init_src23 = __esm({
34842
+ var init_src22 = __esm({
34859
34843
  "packages/ralph/src/index.ts"() {
34860
34844
  "use strict";
34861
34845
  init_frontmatter3();
@@ -35122,9 +35106,9 @@ var FRONTMATTER_FENCE;
35122
35106
  var init_format = __esm({
35123
35107
  "packages/plan-browser/src/format.ts"() {
35124
35108
  "use strict";
35109
+ init_src20();
35125
35110
  init_src21();
35126
35111
  init_src22();
35127
- init_src23();
35128
35112
  FRONTMATTER_FENCE = "---";
35129
35113
  }
35130
35114
  });
@@ -35419,7 +35403,7 @@ var init_browser = __esm({
35419
35403
  });
35420
35404
 
35421
35405
  // packages/plan-browser/src/index.ts
35422
- var init_src24 = __esm({
35406
+ var init_src23 = __esm({
35423
35407
  "packages/plan-browser/src/index.ts"() {
35424
35408
  "use strict";
35425
35409
  init_discovery4();
@@ -35652,7 +35636,7 @@ var defaultFs;
35652
35636
  var init_document = __esm({
35653
35637
  "packages/markdown-reader/src/core/document.ts"() {
35654
35638
  "use strict";
35655
- init_src15();
35639
+ init_src14();
35656
35640
  init_src6();
35657
35641
  init_scan();
35658
35642
  defaultFs = {
@@ -35704,7 +35688,7 @@ function resolveSection(sections, id) {
35704
35688
  var init_resolve5 = __esm({
35705
35689
  "packages/markdown-reader/src/core/resolve.ts"() {
35706
35690
  "use strict";
35707
- init_src15();
35691
+ init_src14();
35708
35692
  }
35709
35693
  });
35710
35694
 
@@ -35740,8 +35724,8 @@ var readParams, readTool, readSectionParams, readSectionTool;
35740
35724
  var init_tools2 = __esm({
35741
35725
  "packages/markdown-reader/src/mcp/tools.ts"() {
35742
35726
  "use strict";
35743
- init_src15();
35744
35727
  init_src14();
35728
+ init_src13();
35745
35729
  init_read_markdown();
35746
35730
  init_read_section();
35747
35731
  readParams = S.Object({
@@ -35775,7 +35759,7 @@ var markdownGroup;
35775
35759
  var init_group = __esm({
35776
35760
  "packages/markdown-reader/src/mcp/group.ts"() {
35777
35761
  "use strict";
35778
- init_src15();
35762
+ init_src14();
35779
35763
  init_tools2();
35780
35764
  markdownGroup = defineGroup({
35781
35765
  name: "markdown-reader",
@@ -35804,6 +35788,7 @@ var init_types6 = __esm({
35804
35788
  this.code = code;
35805
35789
  this.name = "ToolError";
35806
35790
  }
35791
+ code;
35807
35792
  };
35808
35793
  }
35809
35794
  });
@@ -35979,6 +35964,8 @@ var init_image = __esm({
35979
35964
  this.base64Data = base64Data;
35980
35965
  this.mimeType = mimeType;
35981
35966
  }
35967
+ base64Data;
35968
+ mimeType;
35982
35969
  static async fromUrl(url) {
35983
35970
  const response = await fetch(url);
35984
35971
  if (!response.ok) {
@@ -36053,6 +36040,8 @@ var init_audio = __esm({
36053
36040
  this.base64Data = base64Data;
36054
36041
  this.mimeType = mimeType;
36055
36042
  }
36043
+ base64Data;
36044
+ mimeType;
36056
36045
  static async fromUrl(url) {
36057
36046
  const response = await fetch(url);
36058
36047
  if (!response.ok) {
@@ -36123,6 +36112,10 @@ var init_file = __esm({
36123
36112
  this.isText = isText;
36124
36113
  this.name = name;
36125
36114
  }
36115
+ data;
36116
+ mimeType;
36117
+ isText;
36118
+ name;
36126
36119
  static async fromUrl(url) {
36127
36120
  const response = await fetch(url);
36128
36121
  if (!response.ok) {
@@ -36518,7 +36511,7 @@ var init_content = __esm({
36518
36511
  });
36519
36512
 
36520
36513
  // packages/tiny-stdio-mcp-server/src/index.ts
36521
- var init_src25 = __esm({
36514
+ var init_src24 = __esm({
36522
36515
  "packages/tiny-stdio-mcp-server/src/index.ts"() {
36523
36516
  "use strict";
36524
36517
  init_server();
@@ -37231,7 +37224,7 @@ var ARCHIVE_DIRECTORY_NAME, MARKDOWN_EXTENSION, TASK_KIND, TASK_VERSION, TASK_SC
37231
37224
  var init_markdown_dir = __esm({
37232
37225
  "packages/task-list/src/backends/markdown-dir.ts"() {
37233
37226
  "use strict";
37234
- init_src12();
37227
+ init_src11();
37235
37228
  init_task_schema();
37236
37229
  init_state_machine();
37237
37230
  init_state();
@@ -37726,7 +37719,7 @@ var STORE_KIND, STORE_SCHEMA_ID, STORE_VERSION, TASK_KIND2, TASK_SCHEMA_ID2, TAS
37726
37719
  var init_yaml_file = __esm({
37727
37720
  "packages/task-list/src/backends/yaml-file.ts"() {
37728
37721
  "use strict";
37729
- init_src12();
37722
+ init_src11();
37730
37723
  init_store_schema();
37731
37724
  init_task_schema();
37732
37725
  init_state_machine();
@@ -37786,7 +37779,7 @@ var init_open = __esm({
37786
37779
  });
37787
37780
 
37788
37781
  // packages/task-list/src/index.ts
37789
- var init_src26 = __esm({
37782
+ var init_src25 = __esm({
37790
37783
  "packages/task-list/src/index.ts"() {
37791
37784
  "use strict";
37792
37785
  init_open();
@@ -37966,7 +37959,7 @@ var DEFAULT_LIST_NAME, openedTaskListsByRuntime, validatedListsByRuntime;
37966
37959
  var init_approval_tasks = __esm({
37967
37960
  "packages/toolcraft/src/human-in-loop/approval-tasks.ts"() {
37968
37961
  "use strict";
37969
- init_src26();
37962
+ init_src25();
37970
37963
  init_user_error();
37971
37964
  init_state_machine2();
37972
37965
  DEFAULT_LIST_NAME = "approvals";
@@ -38076,7 +38069,7 @@ var init_mock = __esm({
38076
38069
  });
38077
38070
 
38078
38071
  // packages/agent-human-in-loop/src/index.ts
38079
- var init_src27 = __esm({
38072
+ var init_src26 = __esm({
38080
38073
  "packages/agent-human-in-loop/src/index.ts"() {
38081
38074
  "use strict";
38082
38075
  init_request_approval();
@@ -38114,7 +38107,7 @@ var getDefaultProvider;
38114
38107
  var init_default_provider = __esm({
38115
38108
  "packages/toolcraft/src/human-in-loop/default-provider.ts"() {
38116
38109
  "use strict";
38117
- init_src27();
38110
+ init_src26();
38118
38111
  init_user_error();
38119
38112
  getDefaultProvider = createDefaultProviderFactory();
38120
38113
  }
@@ -38394,7 +38387,7 @@ async function failPendingApproval(tasks, approvalId, error2) {
38394
38387
  var init_runner3 = __esm({
38395
38388
  "packages/toolcraft/src/human-in-loop/runner.ts"() {
38396
38389
  "use strict";
38397
- init_src15();
38390
+ init_src14();
38398
38391
  init_approval_tasks();
38399
38392
  init_gate();
38400
38393
  }
@@ -38541,8 +38534,8 @@ var approvalsGroupSymbol, listScope, runScope, listParams, showParams, approvals
38541
38534
  var init_approvals_commands = __esm({
38542
38535
  "packages/toolcraft/src/human-in-loop/approvals-commands.ts"() {
38543
38536
  "use strict";
38537
+ init_src13();
38544
38538
  init_src14();
38545
- init_src15();
38546
38539
  init_approval_tasks();
38547
38540
  init_runner3();
38548
38541
  approvalsGroupSymbol = /* @__PURE__ */ Symbol("toolcraft.humanInLoop.approvalsBuiltIn");
@@ -39101,7 +39094,7 @@ function parseArrayIndex(value) {
39101
39094
  var init_json_schema_converter = __esm({
39102
39095
  "packages/toolcraft/src/json-schema-converter.ts"() {
39103
39096
  "use strict";
39104
- init_src14();
39097
+ init_src13();
39105
39098
  }
39106
39099
  });
39107
39100
 
@@ -39468,7 +39461,7 @@ var init_mcp_proxy = __esm({
39468
39461
  "packages/toolcraft/src/mcp-proxy.ts"() {
39469
39462
  "use strict";
39470
39463
  init_src6();
39471
- init_src10();
39464
+ init_src9();
39472
39465
  init_json_schema_converter();
39473
39466
  GROUP_CONFIG_SYMBOL_DESCRIPTION = "toolcraft.group.config";
39474
39467
  MCP_PROXY_SCHEMA_URL = "https://poe-platform.github.io/poe-code/schemas/toolcraft/mcp-proxy.schema.json";
@@ -39962,9 +39955,9 @@ var RESERVED_SERVICE_NAMES;
39962
39955
  var init_mcp2 = __esm({
39963
39956
  "packages/toolcraft/src/mcp.ts"() {
39964
39957
  "use strict";
39965
- init_src25();
39958
+ init_src24();
39959
+ init_src13();
39966
39960
  init_src14();
39967
- init_src15();
39968
39961
  init_approvals_commands();
39969
39962
  init_human_in_loop();
39970
39963
  init_mcp_proxy();
@@ -40026,7 +40019,7 @@ var init_run2 = __esm({
40026
40019
  });
40027
40020
 
40028
40021
  // packages/markdown-reader/src/index.ts
40029
- var init_src28 = __esm({
40022
+ var init_src27 = __esm({
40030
40023
  "packages/markdown-reader/src/index.ts"() {
40031
40024
  "use strict";
40032
40025
  init_read_markdown();
@@ -40638,9 +40631,9 @@ var init_plan = __esm({
40638
40631
  async "src/cli/commands/plan.ts"() {
40639
40632
  "use strict";
40640
40633
  init_src6();
40641
- init_src24();
40642
- init_src16();
40643
- init_src28();
40634
+ init_src23();
40635
+ init_src15();
40636
+ init_src27();
40644
40637
  init_src2();
40645
40638
  init_src5();
40646
40639
  init_errors2();
@@ -40810,7 +40803,7 @@ function isMissingDirectory3(error2) {
40810
40803
  var init_pipeline_init = __esm({
40811
40804
  async "src/cli/commands/pipeline-init.ts"() {
40812
40805
  "use strict";
40813
- init_src13();
40806
+ init_src12();
40814
40807
  await init_plan();
40815
40808
  }
40816
40809
  });
@@ -40979,11 +40972,11 @@ var PIPELINE_ACTIVITY_TIMEOUT_RETRY_COUNT;
40979
40972
  var init_pipeline2 = __esm({
40980
40973
  async "src/sdk/pipeline.ts"() {
40981
40974
  "use strict";
40982
- init_src21();
40975
+ init_src20();
40983
40976
  await init_pipeline_init();
40984
40977
  init_SKILL_plan2();
40985
40978
  await init_spawn3();
40986
- init_src21();
40979
+ init_src20();
40987
40980
  PIPELINE_ACTIVITY_TIMEOUT_RETRY_COUNT = 3;
40988
40981
  }
40989
40982
  });
@@ -41667,7 +41660,7 @@ var init_testing = __esm({
41667
41660
  });
41668
41661
 
41669
41662
  // packages/process-runner/src/index.ts
41670
- var init_src29 = __esm({
41663
+ var init_src28 = __esm({
41671
41664
  "packages/process-runner/src/index.ts"() {
41672
41665
  "use strict";
41673
41666
  init_context2();
@@ -42100,8 +42093,8 @@ function resolveReadyCheck(check, spec10) {
42100
42093
  var init_supervisor = __esm({
42101
42094
  "packages/process-launcher/src/supervisor/supervisor.ts"() {
42102
42095
  "use strict";
42103
- init_src29();
42104
- init_src18();
42096
+ init_src28();
42097
+ init_src17();
42105
42098
  init_health_check();
42106
42099
  init_log_writer();
42107
42100
  init_state_store();
@@ -42569,7 +42562,7 @@ var init_launcher = __esm({
42569
42562
  });
42570
42563
 
42571
42564
  // packages/process-launcher/src/index.ts
42572
- var init_src30 = __esm({
42565
+ var init_src29 = __esm({
42573
42566
  "packages/process-launcher/src/index.ts"() {
42574
42567
  "use strict";
42575
42568
  init_state_store();
@@ -42599,7 +42592,7 @@ async function runRalph2(options) {
42599
42592
  var init_ralph2 = __esm({
42600
42593
  async "src/sdk/ralph.ts"() {
42601
42594
  "use strict";
42602
- init_src23();
42595
+ init_src22();
42603
42596
  await init_spawn3();
42604
42597
  }
42605
42598
  });
@@ -42669,8 +42662,8 @@ async function appendExperimentJournalEntry(options) {
42669
42662
  var init_experiment = __esm({
42670
42663
  async "src/sdk/experiment.ts"() {
42671
42664
  "use strict";
42672
- init_src13();
42673
- init_src22();
42665
+ init_src12();
42666
+ init_src21();
42674
42667
  await init_spawn3();
42675
42668
  }
42676
42669
  });
@@ -43099,7 +43092,7 @@ function checkUserAllow(automation, commentAuthorAssociation) {
43099
43092
  var init_check_user_allow = __esm({
43100
43093
  "packages/github-workflows/src/exec/check-user-allow.ts"() {
43101
43094
  "use strict";
43102
- init_src15();
43095
+ init_src14();
43103
43096
  }
43104
43097
  });
43105
43098
 
@@ -43125,7 +43118,7 @@ function requireCommentPrefix(automation, commentBody) {
43125
43118
  var init_require_comment_prefix = __esm({
43126
43119
  "packages/github-workflows/src/exec/require-comment-prefix.ts"() {
43127
43120
  "use strict";
43128
- init_src15();
43121
+ init_src14();
43129
43122
  }
43130
43123
  });
43131
43124
 
@@ -43149,7 +43142,7 @@ function checkNodeVersion(version) {
43149
43142
  var init_preflight = __esm({
43150
43143
  "packages/github-workflows/src/preflight.ts"() {
43151
43144
  "use strict";
43152
- init_src15();
43145
+ init_src14();
43153
43146
  }
43154
43147
  });
43155
43148
 
@@ -43191,7 +43184,7 @@ var init_setup_agent = __esm({
43191
43184
  "packages/github-workflows/src/setup-agent.ts"() {
43192
43185
  "use strict";
43193
43186
  init_src8();
43194
- init_src15();
43187
+ init_src14();
43195
43188
  }
43196
43189
  });
43197
43190
 
@@ -43756,8 +43749,8 @@ var init_commands2 = __esm({
43756
43749
  "packages/github-workflows/src/commands.ts"() {
43757
43750
  "use strict";
43758
43751
  init_src8();
43752
+ init_src13();
43759
43753
  init_src14();
43760
- init_src15();
43761
43754
  init_src6();
43762
43755
  init_discover2();
43763
43756
  init_check_user_allow();
@@ -44119,7 +44112,7 @@ var init_commands2 = __esm({
44119
44112
  });
44120
44113
 
44121
44114
  // packages/github-workflows/src/index.ts
44122
- var init_src31 = __esm({
44115
+ var init_src30 = __esm({
44123
44116
  "packages/github-workflows/src/index.ts"() {
44124
44117
  "use strict";
44125
44118
  init_frontmatter4();
@@ -44433,9 +44426,9 @@ function resolveEngine(engine) {
44433
44426
  var init_launch = __esm({
44434
44427
  "src/sdk/launch.ts"() {
44435
44428
  "use strict";
44436
- init_src18();
44437
- init_src30();
44429
+ init_src17();
44438
44430
  init_src29();
44431
+ init_src28();
44439
44432
  init_execution_context();
44440
44433
  }
44441
44434
  });
@@ -44549,20 +44542,6 @@ var require_config_toml = __commonJS({
44549
44542
  }
44550
44543
  });
44551
44544
 
44552
- // src/templates/tiny-http-mcp-server/server.mjs.mustache
44553
- var require_server_mjs = __commonJS({
44554
- "src/templates/tiny-http-mcp-server/server.mjs.mustache"(exports, module) {
44555
- 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';
44556
- }
44557
- });
44558
-
44559
- // src/templates/tiny-http-mcp-server/verify-token.mjs.mustache
44560
- var require_verify_token_mjs = __commonJS({
44561
- "src/templates/tiny-http-mcp-server/verify-token.mjs.mustache"(exports, module) {
44562
- 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';
44563
- }
44564
- });
44565
-
44566
44545
  // src/providers/create-provider.ts
44567
44546
  async function loadTemplate2(templateId) {
44568
44547
  const loader = templateImports[templateId];
@@ -44644,9 +44623,7 @@ var init_create_provider = __esm({
44644
44623
  "py-poe-spawn/env.mustache": () => Promise.resolve().then(() => __toESM(require_env(), 1)),
44645
44624
  "py-poe-spawn/main.py.mustache": () => Promise.resolve().then(() => __toESM(require_main_py(), 1)),
44646
44625
  "py-poe-spawn/requirements.txt.mustache": () => Promise.resolve().then(() => __toESM(require_requirements_txt(), 1)),
44647
- "codex/config.toml.mustache": () => Promise.resolve().then(() => __toESM(require_config_toml(), 1)),
44648
- "tiny-http-mcp-server/server.mjs.mustache": () => Promise.resolve().then(() => __toESM(require_server_mjs(), 1)),
44649
- "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))
44650
44627
  };
44651
44628
  }
44652
44629
  });
@@ -45027,7 +45004,7 @@ function createInMemoryAcpTransport2(options) {
45027
45004
  }
45028
45005
  if (method === "session/new") {
45029
45006
  const request = params;
45030
- const { createAgentSession: createAgentSession2 } = await Promise.resolve().then(() => (init_src11(), src_exports));
45007
+ const { createAgentSession: createAgentSession2 } = await Promise.resolve().then(() => (init_src10(), src_exports));
45031
45008
  const session = await createAgentSession2({
45032
45009
  model: options.model,
45033
45010
  cwd: request.cwd || options.cwd,
@@ -46097,20 +46074,41 @@ function formatSecretDescription(secret) {
46097
46074
  }
46098
46075
  return secret.optional === true ? "Optional secret" : "Required secret";
46099
46076
  }
46100
- function formatCommandRowName(node, depth) {
46101
- const name = node.aliases.length === 0 ? node.name : `${node.name} (${node.aliases.join(", ")})`;
46077
+ function wrapOptionalCommandParameterToken(token, optional) {
46078
+ return optional ? `[${token}]` : token;
46079
+ }
46080
+ function formatCommandDynamicParameterTokens(field, casing) {
46081
+ const optional = field.optional || field.hasDefault;
46082
+ return formatDynamicHelpFields(field, casing).map(
46083
+ (row) => wrapOptionalCommandParameterToken(row.flags, optional)
46084
+ );
46085
+ }
46086
+ function formatCommandParameterTokens(command, casing, globalLongOptionFlags) {
46087
+ const collected = collectFields(command.params, casing, globalLongOptionFlags);
46088
+ const fields = assignPositionals(collected.fields, command.positional);
46089
+ return fields.map(
46090
+ (field) => wrapOptionalCommandParameterToken(
46091
+ formatHelpFieldFlags(field, globalLongOptionFlags),
46092
+ field.positionalIndex === void 0 && (field.optional || field.hasDefault)
46093
+ )
46094
+ ).concat(collected.dynamicFields.flatMap((field) => formatCommandDynamicParameterTokens(field, casing)));
46095
+ }
46096
+ function formatCommandRowName(node, depth, casing, globalLongOptionFlags) {
46097
+ const baseName = node.aliases.length === 0 ? node.name : `${node.name} (${node.aliases.join(", ")})`;
46098
+ const parameterTokens = node.kind === "command" ? formatCommandParameterTokens(node, casing, globalLongOptionFlags) : [];
46099
+ const name = parameterTokens.length === 0 ? baseName : `${baseName} ${parameterTokens.join(" ")}`;
46102
46100
  return `${" ".repeat(depth)}${name}`;
46103
46101
  }
46104
- function formatCommandRows(group, scope, depth = 0) {
46102
+ function formatCommandRows(group, scope, casing, globalLongOptionFlags, depth = 0) {
46105
46103
  return getVisibleChildren(group, scope).flatMap((child) => {
46106
46104
  const row = {
46107
- name: formatCommandRowName(child, depth),
46105
+ name: formatCommandRowName(child, depth, casing, globalLongOptionFlags),
46108
46106
  description: child.description ?? ""
46109
46107
  };
46110
46108
  if (child.kind === "command") {
46111
46109
  return [row];
46112
46110
  }
46113
- return [row, ...formatCommandRows(child, scope, depth + 1)];
46111
+ return [row, ...formatCommandRows(child, scope, casing, globalLongOptionFlags, depth + 1)];
46114
46112
  });
46115
46113
  }
46116
46114
  function formatGlobalOptionRows(showVersion, presetsEnabled) {
@@ -46153,9 +46151,10 @@ function buildUsageLine(breadcrumb, rootUsageName, suffix) {
46153
46151
  const subPath = breadcrumb.slice(1).join(" ");
46154
46152
  return subPath ? `${rootUsageName} ${subPath} ${suffix}` : `${rootUsageName} ${suffix}`;
46155
46153
  }
46156
- function renderGroupHelp(group, breadcrumb, scope, showVersion, presetsEnabled, rootUsageName) {
46154
+ function renderGroupHelp(group, breadcrumb, scope, casing, showVersion, presetsEnabled, rootUsageName) {
46157
46155
  const sections = [];
46158
- const commandRows = formatCommandRows(group, scope);
46156
+ const globalLongOptionFlags = getGlobalLongOptionFlags(presetsEnabled);
46157
+ const commandRows = formatCommandRows(group, scope, casing, globalLongOptionFlags);
46159
46158
  if (commandRows.length > 0) {
46160
46159
  sections.push(`${text.section("Commands:")}
46161
46160
  ${formatCommandList(commandRows)}`);
@@ -46227,6 +46226,7 @@ async function renderGeneratedHelp(root, argv, options) {
46227
46226
  target.node,
46228
46227
  target.breadcrumb,
46229
46228
  "cli",
46229
+ casing,
46230
46230
  options.version !== void 0,
46231
46231
  options.presets === true,
46232
46232
  options.rootUsageName
@@ -47461,7 +47461,7 @@ var init_cli = __esm({
47461
47461
  "packages/toolcraft/src/cli.ts"() {
47462
47462
  "use strict";
47463
47463
  init_src6();
47464
- init_src15();
47464
+ init_src14();
47465
47465
  init_approvals_commands();
47466
47466
  init_human_in_loop();
47467
47467
  init_mcp_proxy();
@@ -47524,7 +47524,7 @@ function openInBrowser(url) {
47524
47524
  var init_oauth_login = __esm({
47525
47525
  "src/cli/oauth-login.ts"() {
47526
47526
  "use strict";
47527
- init_src19();
47527
+ init_src18();
47528
47528
  init_src6();
47529
47529
  }
47530
47530
  });
@@ -47647,14 +47647,14 @@ var init_container2 = __esm({
47647
47647
  init_service_registry();
47648
47648
  init_context();
47649
47649
  init_prompts3();
47650
- init_src19();
47650
+ init_src18();
47651
47651
  init_options();
47652
47652
  init_logger2();
47653
47653
  init_error_logger();
47654
47654
  init_src8();
47655
47655
  init_src6();
47656
47656
  await init_providers();
47657
- init_src20();
47657
+ init_src19();
47658
47658
  init_poe_code_command_runner();
47659
47659
  init_errors2();
47660
47660
  init_oauth_login();
@@ -47665,27 +47665,7 @@ var init_container2 = __esm({
47665
47665
  function registerConfigureCommand(program, container) {
47666
47666
  const serviceNames = listServiceNames(container.registry.list());
47667
47667
  const serviceDescription = `Tool to configure${formatServiceList(serviceNames)}`;
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").option("--oauth-resource <uri>", "OAuth protected resource URI").option(
47669
- "--oauth-authorization-server <issuer>",
47670
- "OAuth authorization server issuer URL",
47671
- collectValues,
47672
- []
47673
- ).option(
47674
- "--oauth-supported-scope <scope>",
47675
- "OAuth supported scope published in metadata",
47676
- collectValues,
47677
- []
47678
- ).option(
47679
- "--oauth-required-scope <scope>",
47680
- "OAuth scope required on MCP requests",
47681
- collectValues,
47682
- []
47683
- ).option(
47684
- "--oauth-bearer-method <method>",
47685
- "OAuth bearer transport published in metadata",
47686
- collectValues,
47687
- []
47688
- ).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) => {
47689
47669
  const resolved = await resolveServiceArgument(program, container, service, {
47690
47670
  action: "configure"
47691
47671
  });
@@ -47775,7 +47755,7 @@ async function resolveProvider3(agentId, options, container, flags) {
47775
47755
  }
47776
47756
  if (explicit) {
47777
47757
  if (!await container.providerRegistry.isLoggedIn(explicit)) {
47778
- await triggerProviderLogin(container, explicit, options.apiKey);
47758
+ await triggerProviderLogin(container, explicit, options.apiKey, flags);
47779
47759
  }
47780
47760
  return explicit;
47781
47761
  }
@@ -47802,7 +47782,7 @@ async function resolveProvider3(agentId, options, container, flags) {
47802
47782
  );
47803
47783
  }
47804
47784
  const chosen = candidates.length === 1 ? candidates[0].id : await promptForProviderChoice(agentId, candidates, container);
47805
- await triggerProviderLogin(container, chosen, options.apiKey);
47785
+ await triggerProviderLogin(container, chosen, options.apiKey, flags);
47806
47786
  return chosen;
47807
47787
  }
47808
47788
  function hasProviderEnvCredential(provider2, container) {
@@ -47825,13 +47805,20 @@ async function promptForProviderChoice(agentId, providers, container) {
47825
47805
  }
47826
47806
  return selected;
47827
47807
  }
47828
- async function triggerProviderLogin(container, providerId, apiKey) {
47808
+ async function triggerProviderLogin(container, providerId, apiKey, flags) {
47829
47809
  await container.providerRegistry.login(
47830
47810
  providerId,
47831
47811
  { apiKey },
47832
47812
  {
47833
47813
  envVars: container.env.variables,
47834
- 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
+ })
47835
47822
  }
47836
47823
  );
47837
47824
  }
@@ -47897,9 +47884,6 @@ async function resolveServiceArgument(program, container, provided, selectionCon
47897
47884
  }
47898
47885
  return resolved.name;
47899
47886
  }
47900
- function collectValues(value, previous) {
47901
- return [...previous, value];
47902
- }
47903
47887
  var serviceSelectionPrompt, DEFAULT_SERVICE_AGENT;
47904
47888
  var init_configure = __esm({
47905
47889
  "src/cli/commands/configure.ts"() {
@@ -47932,7 +47916,7 @@ function registerAgentCommand(program, container) {
47932
47916
  }
47933
47917
  let session;
47934
47918
  try {
47935
- const { createAgentSession: createAgentSession2 } = await Promise.resolve().then(() => (init_src11(), src_exports));
47919
+ const { createAgentSession: createAgentSession2 } = await Promise.resolve().then(() => (init_src10(), src_exports));
47936
47920
  session = await createAgentSession2({
47937
47921
  model: options.model,
47938
47922
  apiKey: options.apiKey,
@@ -48717,7 +48701,7 @@ var init_login = __esm({
48717
48701
  "src/cli/commands/login.ts"() {
48718
48702
  "use strict";
48719
48703
  init_shared();
48720
- init_src20();
48704
+ init_src19();
48721
48705
  init_errors2();
48722
48706
  init_config4();
48723
48707
  init_mutation_events();
@@ -50311,7 +50295,7 @@ var generateTextSchema, generateImageSchema, generateVideoSchema, generateAudioS
50311
50295
  var init_mcp_server = __esm({
50312
50296
  "src/cli/mcp-server.ts"() {
50313
50297
  "use strict";
50314
- init_src25();
50298
+ init_src24();
50315
50299
  init_client_instance();
50316
50300
  init_constants();
50317
50301
  generateTextSchema = defineSchema({
@@ -50783,7 +50767,7 @@ var init_apply2 = __esm({
50783
50767
  });
50784
50768
 
50785
50769
  // packages/agent-mcp-config/src/index.ts
50786
- var init_src32 = __esm({
50770
+ var init_src31 = __esm({
50787
50771
  "packages/agent-mcp-config/src/index.ts"() {
50788
50772
  "use strict";
50789
50773
  init_configs3();
@@ -50967,7 +50951,7 @@ var init_mcp3 = __esm({
50967
50951
  init_shared();
50968
50952
  init_mcp_output_format();
50969
50953
  init_command_not_found();
50970
- init_src32();
50954
+ init_src31();
50971
50955
  init_execution_context();
50972
50956
  DEFAULT_MCP_AGENT = "claude-code";
50973
50957
  }
@@ -51189,7 +51173,7 @@ var init_skill = __esm({
51189
51173
  "use strict";
51190
51174
  init_src6();
51191
51175
  init_src2();
51192
- init_src16();
51176
+ init_src15();
51193
51177
  init_shared();
51194
51178
  init_command_not_found();
51195
51179
  DEFAULT_SKILL_AGENT = "claude-code";
@@ -51861,7 +51845,7 @@ var init_models2 = __esm({
51861
51845
  var init_pipeline_loop_agent = __esm({
51862
51846
  "src/cli/commands/pipeline-loop-agent.ts"() {
51863
51847
  "use strict";
51864
- init_src13();
51848
+ init_src12();
51865
51849
  }
51866
51850
  });
51867
51851
 
@@ -52871,8 +52855,8 @@ var init_pipeline3 = __esm({
52871
52855
  init_src6();
52872
52856
  init_src2();
52873
52857
  init_src8();
52874
- init_src13();
52875
- init_src16();
52858
+ init_src12();
52859
+ init_src15();
52876
52860
  init_src5();
52877
52861
  init_config4();
52878
52862
  init_errors2();
@@ -52881,7 +52865,7 @@ var init_pipeline3 = __esm({
52881
52865
  init_pipeline_loop_agent();
52882
52866
  await init_pipeline2();
52883
52867
  await init_spawn3();
52884
- init_src21();
52868
+ init_src20();
52885
52869
  init_dashboard_loop_shared();
52886
52870
  DEFAULT_PIPELINE_AGENT = "claude-code";
52887
52871
  DEFAULT_PIPELINE_SCOPE = "local";
@@ -53454,8 +53438,8 @@ var init_ralph3 = __esm({
53454
53438
  "use strict";
53455
53439
  init_src6();
53456
53440
  init_src2();
53457
- init_src13();
53458
- init_src23();
53441
+ init_src12();
53442
+ init_src22();
53459
53443
  init_src5();
53460
53444
  init_config4();
53461
53445
  init_errors2();
@@ -54238,10 +54222,10 @@ var init_experiment2 = __esm({
54238
54222
  "use strict";
54239
54223
  init_src6();
54240
54224
  init_src2();
54225
+ init_src20();
54226
+ init_src12();
54227
+ init_src15();
54241
54228
  init_src21();
54242
- init_src13();
54243
- init_src16();
54244
- init_src22();
54245
54229
  init_errors2();
54246
54230
  init_shared();
54247
54231
  await init_experiment();
@@ -54259,7 +54243,7 @@ var init_experiment2 = __esm({
54259
54243
  import { Option as Option3 } from "commander";
54260
54244
  function registerLaunchCommand(program, container) {
54261
54245
  const launch = program.command("launch").description("Manage long-running host and Docker processes.").addHelpCommand(false);
54262
- 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) {
54263
54247
  const spec10 = await resolveStartSpec({
54264
54248
  commandArgs,
54265
54249
  id,
@@ -54663,7 +54647,7 @@ function parseNonNegativeInt3(value, fieldName) {
54663
54647
  }
54664
54648
  return parsed;
54665
54649
  }
54666
- function collectValues2(value, previous) {
54650
+ function collectValues(value, previous) {
54667
54651
  return [...previous, value];
54668
54652
  }
54669
54653
  var init_launch2 = __esm({
@@ -55883,7 +55867,7 @@ async function writeCacheEntry(root, entry) {
55883
55867
  "utf8"
55884
55868
  );
55885
55869
  }
55886
- function parseCacheEntry(value, key2) {
55870
+ function parseCacheEntry(value, _key) {
55887
55871
  const object = expectRecord2(value);
55888
55872
  return {
55889
55873
  key: expectString2(object.key, "key"),
@@ -55949,7 +55933,7 @@ var init_cache_cli = __esm({
55949
55933
  }
55950
55934
  });
55951
55935
 
55952
- // packages/tokenfill/src/tokenizer.ts
55936
+ // packages/tokenfill/dist/tokenizer.js
55953
55937
  import { get_encoding } from "tiktoken";
55954
55938
  function createTokenizer(options = {}) {
55955
55939
  const encoding = options.encoding ?? DEFAULT_ENCODING;
@@ -55986,13 +55970,13 @@ function countTokens(text4) {
55986
55970
  }
55987
55971
  var DEFAULT_ENCODING, defaultTokenizer;
55988
55972
  var init_tokenizer = __esm({
55989
- "packages/tokenfill/src/tokenizer.ts"() {
55973
+ "packages/tokenfill/dist/tokenizer.js"() {
55990
55974
  "use strict";
55991
55975
  DEFAULT_ENCODING = "cl100k_base";
55992
55976
  }
55993
55977
  });
55994
55978
 
55995
- // packages/tokenfill/src/corpus.ts
55979
+ // packages/tokenfill/dist/corpus.js
55996
55980
  import { readdirSync, readFileSync as readFileSync3 } from "node:fs";
55997
55981
  import { dirname as dirname5, join as join5 } from "node:path";
55998
55982
  import { fileURLToPath as fileURLToPath12 } from "node:url";
@@ -56008,7 +55992,7 @@ function loadBuiltInCorpusArticles() {
56008
55992
  }
56009
55993
  var CORPUS_ARTICLE_SEPARATOR, corpusDirectoryPath, BUILT_IN_CORPUS_ARTICLES;
56010
55994
  var init_corpus = __esm({
56011
- "packages/tokenfill/src/corpus.ts"() {
55995
+ "packages/tokenfill/dist/corpus.js"() {
56012
55996
  "use strict";
56013
55997
  CORPUS_ARTICLE_SEPARATOR = "\n\n";
56014
55998
  corpusDirectoryPath = join5(dirname5(fileURLToPath12(import.meta.url)), "corpus");
@@ -56016,10 +56000,10 @@ var init_corpus = __esm({
56016
56000
  }
56017
56001
  });
56018
56002
 
56019
- // packages/tokenfill/src/tokenfill.ts
56003
+ // packages/tokenfill/dist/tokenfill.js
56020
56004
  var builtInCorpusText, builtInCorpusByteLength;
56021
56005
  var init_tokenfill = __esm({
56022
- "packages/tokenfill/src/tokenfill.ts"() {
56006
+ "packages/tokenfill/dist/tokenfill.js"() {
56023
56007
  "use strict";
56024
56008
  init_corpus();
56025
56009
  init_tokenizer();
@@ -56028,9 +56012,9 @@ var init_tokenfill = __esm({
56028
56012
  }
56029
56013
  });
56030
56014
 
56031
- // packages/tokenfill/src/index.ts
56032
- var init_src33 = __esm({
56033
- "packages/tokenfill/src/index.ts"() {
56015
+ // packages/tokenfill/dist/index.js
56016
+ var init_dist2 = __esm({
56017
+ "packages/tokenfill/dist/index.js"() {
56034
56018
  "use strict";
56035
56019
  init_tokenizer();
56036
56020
  init_tokenfill();
@@ -56103,7 +56087,7 @@ function isMissing4(error2) {
56103
56087
  var init_tokens2 = __esm({
56104
56088
  "packages/memory/src/tokens.ts"() {
56105
56089
  "use strict";
56106
- init_src33();
56090
+ init_dist2();
56107
56091
  init_pages();
56108
56092
  }
56109
56093
  });
@@ -56254,7 +56238,7 @@ var init_ingest = __esm({
56254
56238
  var init_mcp4 = __esm({
56255
56239
  "packages/memory/src/mcp.ts"() {
56256
56240
  "use strict";
56257
- init_src25();
56241
+ init_src24();
56258
56242
  }
56259
56243
  });
56260
56244
 
@@ -56262,8 +56246,8 @@ var init_mcp4 = __esm({
56262
56246
  var init_install3 = __esm({
56263
56247
  "packages/memory/src/install.ts"() {
56264
56248
  "use strict";
56265
- init_src16();
56266
- init_src32();
56249
+ init_src15();
56250
+ init_src31();
56267
56251
  }
56268
56252
  });
56269
56253
 
@@ -56382,7 +56366,7 @@ function inferRepoRoot2(root) {
56382
56366
  var init_query = __esm({
56383
56367
  "packages/memory/src/query.ts"() {
56384
56368
  "use strict";
56385
- init_src33();
56369
+ init_dist2();
56386
56370
  init_src8();
56387
56371
  init_src5();
56388
56372
  init_pages();
@@ -56469,7 +56453,7 @@ function inferRepoRoot3(root) {
56469
56453
  var init_explain = __esm({
56470
56454
  "packages/memory/src/explain.ts"() {
56471
56455
  "use strict";
56472
- init_src33();
56456
+ init_dist2();
56473
56457
  init_src8();
56474
56458
  init_src5();
56475
56459
  init_pages();
@@ -56534,7 +56518,7 @@ var init_handle = __esm({
56534
56518
  });
56535
56519
 
56536
56520
  // packages/memory/src/index.ts
56537
- var init_src34 = __esm({
56521
+ var init_src32 = __esm({
56538
56522
  "packages/memory/src/index.ts"() {
56539
56523
  "use strict";
56540
56524
  init_paths2();
@@ -56738,7 +56722,7 @@ var init_memory2 = __esm({
56738
56722
  "src/cli/commands/memory.ts"() {
56739
56723
  "use strict";
56740
56724
  init_src6();
56741
- init_src34();
56725
+ init_src32();
56742
56726
  init_command_not_found();
56743
56727
  init_errors2();
56744
56728
  init_shared();
@@ -56792,7 +56776,14 @@ async function executeProviderLogin(program, container, id, options) {
56792
56776
  if (!flags.dryRun) {
56793
56777
  await container.providerRegistry.login(id, { apiKey: options.apiKey }, {
56794
56778
  envVars: container.env.variables,
56795
- 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
+ })
56796
56787
  });
56797
56788
  }
56798
56789
  resources.context.complete({
@@ -56832,7 +56823,7 @@ var init_package2 = __esm({
56832
56823
  "package.json"() {
56833
56824
  package_default2 = {
56834
56825
  name: "poe-code",
56835
- version: "3.0.196",
56826
+ version: "3.0.198",
56836
56827
  description: "CLI tool to configure Poe API for developer workflows.",
56837
56828
  type: "module",
56838
56829
  main: "./dist/index.js",
@@ -56915,6 +56906,7 @@ var init_package2 = __esm({
56915
56906
  "poe-codex": "dist/bin/poe-codex.js",
56916
56907
  "poe-opencode": "dist/bin/poe-opencode.js",
56917
56908
  "poe-agent": "dist/bin/poe-agent.js",
56909
+ "poe-superintendent-mcp": "packages/superintendent/dist/mcp.js",
56918
56910
  "tiny-oauth-test-server": "packages/tiny-oauth-test-server/dist/cli.js",
56919
56911
  "tiny-stdio-mcp-test-server": "packages/tiny-stdio-mcp-test-server/dist/cli.js"
56920
56912
  },
@@ -56925,6 +56917,7 @@ var init_package2 = __esm({
56925
56917
  "packages/config-mutations/dist",
56926
56918
  "packages/design-system/dist",
56927
56919
  "packages/memory/dist",
56920
+ "packages/superintendent/dist",
56928
56921
  "packages/tiny-stdio-mcp-server/dist"
56929
56922
  ],
56930
56923
  engines: {
@@ -56958,6 +56951,7 @@ var init_package2 = __esm({
56958
56951
  "@poe-code/agent-harness-tools": "*",
56959
56952
  "@poe-code/agent-human-in-loop": "*",
56960
56953
  "@poe-code/agent-mcp-config": "*",
56954
+ "@poe-code/agent-script": "*",
56961
56955
  "@poe-code/agent-skill-config": "*",
56962
56956
  "@poe-code/agent-spawn": "*",
56963
56957
  "@poe-code/cached-resource": "*",
@@ -57388,8 +57382,8 @@ var init_program = __esm({
57388
57382
  async "src/cli/program.ts"() {
57389
57383
  "use strict";
57390
57384
  init_cli();
57391
- init_src31();
57392
- init_src17();
57385
+ init_src30();
57386
+ init_src16();
57393
57387
  await init_container2();
57394
57388
  init_src6();
57395
57389
  init_configure();
@@ -57640,7 +57634,7 @@ import { realpathSync as realpathSync2 } from "node:fs";
57640
57634
  import { pathToFileURL as pathToFileURL3 } from "node:url";
57641
57635
 
57642
57636
  // src/sdk/process-launcher.ts
57643
- init_src30();
57637
+ init_src29();
57644
57638
 
57645
57639
  // src/index.ts
57646
57640
  await init_ralph2();
@@ -57764,7 +57758,7 @@ var planDocumentSchema = {
57764
57758
  };
57765
57759
 
57766
57760
  // src/index.ts
57767
- init_src31();
57761
+ init_src30();
57768
57762
  init_launch();
57769
57763
 
57770
57764
  // src/cli/poe-agent-main.ts