@stdiobus/workers-registry 1.4.12 → 1.5.0-beta.1

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 (129) hide show
  1. package/README.md +65 -0
  2. package/out/dist/workers-registry/acp-registry/index.js +128 -2
  3. package/out/dist/workers-registry/acp-registry/index.js.map +4 -4
  4. package/out/dist/workers-registry/acp-worker/index.js +1 -3
  5. package/out/dist/workers-registry/acp-worker/index.js.map +4 -4
  6. package/out/dist/workers-registry/index.d.ts +1 -0
  7. package/out/dist/workers-registry/index.js +6 -0
  8. package/out/dist/workers-registry/openai-agent/index.js.map +2 -2
  9. package/out/dist/workers-registry/registry-launcher/index.js +131 -0
  10. package/out/dist/workers-registry/registry-launcher/index.js.map +7 -0
  11. package/out/tsc/workers-registry/acp-worker/src/index.d.ts +0 -10
  12. package/out/tsc/workers-registry/openai-agent/src/index.d.ts +0 -10
  13. package/out/tsc/workers-registry/registry-launcher/src/auth/auth-manager.d.ts +392 -0
  14. package/out/tsc/workers-registry/registry-launcher/src/auth/cli/cli.property.test.d.ts +22 -0
  15. package/out/tsc/workers-registry/registry-launcher/src/auth/cli/index.d.ts +9 -0
  16. package/out/tsc/workers-registry/registry-launcher/src/auth/cli/login-command.d.ts +32 -0
  17. package/out/tsc/workers-registry/registry-launcher/src/auth/cli/logout-command.d.ts +25 -0
  18. package/out/tsc/workers-registry/registry-launcher/src/auth/cli/setup-command.d.ts +25 -0
  19. package/out/tsc/workers-registry/registry-launcher/src/auth/cli/status-command.d.ts +21 -0
  20. package/out/tsc/workers-registry/registry-launcher/src/auth/errors.d.ts +190 -0
  21. package/out/tsc/workers-registry/registry-launcher/src/auth/flows/agent-auth-flow.d.ts +146 -0
  22. package/out/tsc/workers-registry/registry-launcher/src/auth/flows/agent-auth-flow.test.d.ts +1 -0
  23. package/out/tsc/workers-registry/registry-launcher/src/auth/flows/callback-server.d.ts +131 -0
  24. package/out/tsc/workers-registry/registry-launcher/src/auth/flows/callback-server.property.test.d.ts +1 -0
  25. package/out/tsc/workers-registry/registry-launcher/src/auth/flows/callback-server.test.d.ts +1 -0
  26. package/out/tsc/workers-registry/registry-launcher/src/auth/flows/index.d.ts +11 -0
  27. package/out/tsc/workers-registry/registry-launcher/src/auth/flows/terminal-auth-flow.d.ts +252 -0
  28. package/out/tsc/workers-registry/registry-launcher/src/auth/flows/terminal-auth-flow.test.d.ts +1 -0
  29. package/out/tsc/workers-registry/registry-launcher/src/auth/index.d.ts +33 -0
  30. package/out/tsc/workers-registry/registry-launcher/src/auth/integration.test.d.ts +1 -0
  31. package/out/tsc/workers-registry/registry-launcher/src/auth/model-credentials/anthropic-api-key.d.ts +154 -0
  32. package/out/tsc/workers-registry/registry-launcher/src/auth/model-credentials/index.d.ts +20 -0
  33. package/out/tsc/workers-registry/registry-launcher/src/auth/model-credentials/model-credentials.test.d.ts +1 -0
  34. package/out/tsc/workers-registry/registry-launcher/src/auth/model-credentials/openai-api-key.d.ts +182 -0
  35. package/out/tsc/workers-registry/registry-launcher/src/auth/model-credentials/types.d.ts +186 -0
  36. package/out/tsc/workers-registry/registry-launcher/src/auth/pkce.d.ts +61 -0
  37. package/out/tsc/workers-registry/registry-launcher/src/auth/pkce.property.test.d.ts +1 -0
  38. package/out/tsc/workers-registry/registry-launcher/src/auth/pkce.test.d.ts +1 -0
  39. package/out/tsc/workers-registry/registry-launcher/src/auth/providers/base-provider.d.ts +138 -0
  40. package/out/tsc/workers-registry/registry-launcher/src/auth/providers/base-provider.test.d.ts +1 -0
  41. package/out/tsc/workers-registry/registry-launcher/src/auth/providers/cognito-provider.d.ts +44 -0
  42. package/out/tsc/workers-registry/registry-launcher/src/auth/providers/concrete-providers.test.d.ts +1 -0
  43. package/out/tsc/workers-registry/registry-launcher/src/auth/providers/entra-provider.d.ts +54 -0
  44. package/out/tsc/workers-registry/registry-launcher/src/auth/providers/github-provider.d.ts +19 -0
  45. package/out/tsc/workers-registry/registry-launcher/src/auth/providers/google-provider.d.ts +19 -0
  46. package/out/tsc/workers-registry/registry-launcher/src/auth/providers/index.d.ts +107 -0
  47. package/out/tsc/workers-registry/registry-launcher/src/auth/providers/index.test.d.ts +1 -0
  48. package/out/tsc/workers-registry/registry-launcher/src/auth/providers/oidc-provider.d.ts +413 -0
  49. package/out/tsc/workers-registry/registry-launcher/src/auth/providers/oidc-provider.property.test.d.ts +1 -0
  50. package/out/tsc/workers-registry/registry-launcher/src/auth/providers/oidc-provider.test.d.ts +1 -0
  51. package/out/tsc/workers-registry/registry-launcher/src/auth/providers/providers.property.test.d.ts +1 -0
  52. package/out/tsc/workers-registry/registry-launcher/src/auth/providers/types.d.ts +28 -0
  53. package/out/tsc/workers-registry/registry-launcher/src/auth/session.d.ts +251 -0
  54. package/out/tsc/workers-registry/registry-launcher/src/auth/session.property.test.d.ts +1 -0
  55. package/out/tsc/workers-registry/registry-launcher/src/auth/session.test.d.ts +1 -0
  56. package/out/tsc/workers-registry/registry-launcher/src/auth/state.d.ts +26 -0
  57. package/out/tsc/workers-registry/registry-launcher/src/auth/state.property.test.d.ts +1 -0
  58. package/out/tsc/workers-registry/registry-launcher/src/auth/state.test.d.ts +1 -0
  59. package/out/tsc/workers-registry/registry-launcher/src/auth/storage/credential-store.d.ts +98 -0
  60. package/out/tsc/workers-registry/registry-launcher/src/auth/storage/credential-store.test.d.ts +1 -0
  61. package/out/tsc/workers-registry/registry-launcher/src/auth/storage/encrypted-file-backend.d.ts +101 -0
  62. package/out/tsc/workers-registry/registry-launcher/src/auth/storage/encrypted-file-backend.test.d.ts +1 -0
  63. package/out/tsc/workers-registry/registry-launcher/src/auth/storage/index.d.ts +12 -0
  64. package/out/tsc/workers-registry/registry-launcher/src/auth/storage/keychain-backend.d.ts +80 -0
  65. package/out/tsc/workers-registry/registry-launcher/src/auth/storage/keychain-backend.test.d.ts +1 -0
  66. package/out/tsc/workers-registry/registry-launcher/src/auth/storage/memory-backend.d.ts +54 -0
  67. package/out/tsc/workers-registry/registry-launcher/src/auth/storage/storage.property.test.d.ts +1 -0
  68. package/out/tsc/workers-registry/registry-launcher/src/auth/storage/types.d.ts +44 -0
  69. package/out/tsc/workers-registry/registry-launcher/src/auth/token-manager.d.ts +171 -0
  70. package/out/tsc/workers-registry/registry-launcher/src/auth/token-manager.property.test.d.ts +1 -0
  71. package/out/tsc/workers-registry/registry-launcher/src/auth/token-manager.test.d.ts +1 -0
  72. package/out/tsc/workers-registry/registry-launcher/src/auth/types.d.ts +369 -0
  73. package/out/tsc/workers-registry/registry-launcher/src/auth/types.test.d.ts +1 -0
  74. package/out/tsc/workers-registry/registry-launcher/src/config/config.property.test.d.ts +1 -0
  75. package/out/tsc/workers-registry/registry-launcher/src/config/config.test.d.ts +1 -0
  76. package/out/tsc/workers-registry/{acp-worker/src/registry-launcher → registry-launcher/src}/registry/index.d.ts +51 -2
  77. package/out/tsc/workers-registry/registry-launcher/src/registry/index.property.test.d.ts +1 -0
  78. package/out/tsc/workers-registry/registry-launcher/src/registry/index.test.d.ts +1 -0
  79. package/out/tsc/workers-registry/{acp-worker/src/registry-launcher → registry-launcher/src}/registry/types.d.ts +40 -0
  80. package/out/tsc/workers-registry/registry-launcher/src/router/message-router.d.ts +770 -0
  81. package/out/tsc/workers-registry/registry-launcher/src/router/message-router.property.test.d.ts +1 -0
  82. package/out/tsc/workers-registry/registry-launcher/src/router/message-router.test.d.ts +1 -0
  83. package/out/tsc/workers-registry/registry-launcher/src/runtime/manager.property.test.d.ts +1 -0
  84. package/out/tsc/workers-registry/registry-launcher/src/runtime/manager.test.d.ts +1 -0
  85. package/out/tsc/workers-registry/registry-launcher/src/stream/ndjson-handler.property.test.d.ts +1 -0
  86. package/out/tsc/workers-registry/registry-launcher/src/stream/ndjson-handler.test.d.ts +1 -0
  87. package/out/tsc/workers-registry/registry-launcher/tests/e2e/auth-flow.e2e.test.d.ts +1 -0
  88. package/out/tsc/workers-registry/registry-launcher/tests/e2e/auth-required-flow.e2e.test.d.ts +1 -0
  89. package/out/tsc/workers-registry/registry-launcher/tests/e2e/helpers/api-keys.d.ts +32 -0
  90. package/out/tsc/workers-registry/registry-launcher/tests/e2e/helpers/index.d.ts +17 -0
  91. package/out/tsc/workers-registry/registry-launcher/tests/e2e/helpers/launcher-harness.d.ts +101 -0
  92. package/out/tsc/workers-registry/registry-launcher/tests/e2e/helpers/registry-server.d.ts +46 -0
  93. package/out/tsc/workers-registry/registry-launcher/tests/e2e/production-agent-auth.e2e.test.d.ts +1 -0
  94. package/out/tsc/workers-registry/registry-launcher/tests/e2e/production-api-keys.e2e.test.d.ts +1 -0
  95. package/out/tsc/workers-registry/registry-launcher/tests/e2e/production-auth-required.e2e.test.d.ts +1 -0
  96. package/out/tsc/workers-registry/registry-launcher/tests/e2e/production-cli.e2e.test.d.ts +1 -0
  97. package/out/tsc/workers-registry/registry-launcher/tests/e2e/production-concurrent.e2e.test.d.ts +1 -0
  98. package/out/tsc/workers-registry/registry-launcher/tests/e2e/production-lifecycle.e2e.test.d.ts +1 -0
  99. package/out/tsc/workers-registry/registry-launcher/tests/e2e/production-terminal-auth.e2e.test.d.ts +1 -0
  100. package/out/tsc/workers-registry/registry-launcher/tests/integration/agent-auth.integration.test.d.ts +9 -0
  101. package/out/tsc/workers-registry/registry-launcher/tests/integration/registry-launcher.test.d.ts +1 -0
  102. package/out/tsc/workers-registry/registry-launcher/tests/integration/terminal-auth.integration.test.d.ts +12 -0
  103. package/package.json +14 -10
  104. package/out/tsc/workers-registry/acp-worker/src/registry-launcher/router/message-router.d.ts +0 -187
  105. /package/out/tsc/workers-registry/{acp-worker/src/registry-launcher/config/config.property.test.d.ts → registry-launcher/src/auth/auth-manager.property.test.d.ts} +0 -0
  106. /package/out/tsc/workers-registry/{acp-worker/src/registry-launcher/config/config.test.d.ts → registry-launcher/src/auth/auth-manager.test.d.ts} +0 -0
  107. /package/out/tsc/workers-registry/{acp-worker/src/registry-launcher/registry/index.property.test.d.ts → registry-launcher/src/auth/cli/cli.test.d.ts} +0 -0
  108. /package/out/tsc/workers-registry/{acp-worker/src/registry-launcher/router/message-router.property.test.d.ts → registry-launcher/src/auth/cli/login-command.test.d.ts} +0 -0
  109. /package/out/tsc/workers-registry/{acp-worker/src/registry-launcher/runtime/manager.property.test.d.ts → registry-launcher/src/auth/cli/provider-config.test.d.ts} +0 -0
  110. /package/out/tsc/workers-registry/{acp-worker/src/registry-launcher/runtime/manager.test.d.ts → registry-launcher/src/auth/cli/setup-command.test.d.ts} +0 -0
  111. /package/out/tsc/workers-registry/{acp-worker/src/registry-launcher/stream/ndjson-handler.property.test.d.ts → registry-launcher/src/auth/cli/status-command.test.d.ts} +0 -0
  112. /package/out/tsc/workers-registry/{acp-worker/src/registry-launcher/stream/ndjson-handler.test.d.ts → registry-launcher/src/auth/errors.property.test.d.ts} +0 -0
  113. /package/out/tsc/workers-registry/{acp-worker/tests/integration/registry-launcher.test.d.ts → registry-launcher/src/auth/errors.test.d.ts} +0 -0
  114. /package/out/tsc/workers-registry/{acp-worker/src/registry-launcher → registry-launcher/src}/config/api-keys.d.ts +0 -0
  115. /package/out/tsc/workers-registry/{acp-worker/src/registry-launcher → registry-launcher/src}/config/config.d.ts +0 -0
  116. /package/out/tsc/workers-registry/{acp-worker/src/registry-launcher → registry-launcher/src}/config/index.d.ts +0 -0
  117. /package/out/tsc/workers-registry/{acp-worker/src/registry-launcher → registry-launcher/src}/config/types.d.ts +0 -0
  118. /package/out/tsc/workers-registry/{acp-worker/src/registry-launcher → registry-launcher/src}/index.d.ts +0 -0
  119. /package/out/tsc/workers-registry/{acp-worker/src/registry-launcher → registry-launcher/src}/log.d.ts +0 -0
  120. /package/out/tsc/workers-registry/{acp-worker/src/registry-launcher → registry-launcher/src}/log.test.d.ts +0 -0
  121. /package/out/tsc/workers-registry/{acp-worker/src/registry-launcher → registry-launcher/src}/registry/resolver.d.ts +0 -0
  122. /package/out/tsc/workers-registry/{acp-worker/src/registry-launcher → registry-launcher/src}/router/index.d.ts +0 -0
  123. /package/out/tsc/workers-registry/{acp-worker/src/registry-launcher → registry-launcher/src}/runtime/agent-runtime.d.ts +0 -0
  124. /package/out/tsc/workers-registry/{acp-worker/src/registry-launcher → registry-launcher/src}/runtime/index.d.ts +0 -0
  125. /package/out/tsc/workers-registry/{acp-worker/src/registry-launcher → registry-launcher/src}/runtime/manager.d.ts +0 -0
  126. /package/out/tsc/workers-registry/{acp-worker/src/registry-launcher → registry-launcher/src}/runtime/types.d.ts +0 -0
  127. /package/out/tsc/workers-registry/{acp-worker/src/registry-launcher → registry-launcher/src}/stream/index.d.ts +0 -0
  128. /package/out/tsc/workers-registry/{acp-worker/src/registry-launcher → registry-launcher/src}/stream/ndjson-handler.d.ts +0 -0
  129. /package/out/tsc/workers-registry/{acp-worker/src/registry-launcher → registry-launcher/src}/test-utils/index.d.ts +0 -0
package/README.md CHANGED
@@ -950,6 +950,71 @@ npm test
950
950
 
951
951
  ---
952
952
 
953
+ ## OAuth 2.1 Authentication
954
+
955
+ Registry Launcher supports OAuth 2.1 with PKCE for secure browser-based authentication with AI providers.
956
+
957
+ ### Supported Providers
958
+
959
+ | Provider | OAuth 2.1 | API Key | Status |
960
+ |----------|-----------|---------|--------|
961
+ | OpenAI | ✅ | ✅ | Production |
962
+ | Anthropic | ✅ | ✅ | Production |
963
+ | GitHub | ✅ | ✅ | Production |
964
+ | Google | ✅ | ✅ | Production |
965
+ | Azure AD | ✅ | ✅ | Production |
966
+ | AWS Cognito | ✅ | ✅ | Production |
967
+
968
+ ### Quick Start
969
+
970
+ ```bash
971
+ # Check current authentication status
972
+ node ./launch/index.js acp-registry --auth-status
973
+
974
+ # Login with browser OAuth (opens browser)
975
+ node ./launch/index.js acp-registry --login openai
976
+
977
+ # Interactive setup wizard
978
+ node ./launch/index.js acp-registry --setup
979
+
980
+ # Logout from all providers
981
+ node ./launch/index.js acp-registry --logout
982
+ ```
983
+
984
+ ### Backward Compatibility
985
+
986
+ Existing `api-keys.json` configuration continues to work. OAuth credentials take precedence when available, with automatic fallback to API keys.
987
+
988
+ **Feature Flag:** `AUTH_AUTO_OAUTH`
989
+ - `false` (default): Only use OAuth if explicitly logged in via `--login`
990
+ - `true`: Auto-trigger browser OAuth when agent requires it
991
+
992
+ ### Headless/CI Environments
993
+
994
+ Browser OAuth is not available in headless environments (CI, SSH, Docker). Use one of these alternatives:
995
+
996
+ ```bash
997
+ # Option 1: Use api-keys.json
998
+ echo '{"claude-acp":{"apiKey":"sk-..."}}' > api-keys.json
999
+
1000
+ # Option 2: Use environment variables
1001
+ export ANTHROPIC_API_KEY=sk-...
1002
+
1003
+ # Option 3: Interactive setup (if TTY available)
1004
+ node ./launch/index.js acp-registry --setup
1005
+ ```
1006
+
1007
+ ### Documentation
1008
+
1009
+ - [User Guide](docs/oauth/user-guide.md) - How to use OAuth authentication
1010
+ - [CLI Reference](docs/oauth/cli-reference.md) - Complete CLI command reference
1011
+ - [Configuration](docs/oauth/configuration.md) - Environment variables and settings
1012
+ - [Security](docs/oauth/security.md) - Security considerations and best practices
1013
+ - [Technical Reference](docs/oauth/technical-reference.md) - Architecture and internals
1014
+ - [Troubleshooting](docs/oauth/troubleshooting.md) - Common issues and solutions
1015
+
1016
+ ---
1017
+
953
1018
  ## Resources
954
1019
 
955
1020
  - [stdio Bus kernel](https://github.com/stdiobus/stdiobus) - Core protocol and daemon (source code)