melchizedek-agents 1.2.0 → 1.3.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 (66) hide show
  1. package/.env.example +9 -0
  2. package/CHANGELOG.md +174 -0
  3. package/DOCUMENTATION.md +107 -10
  4. package/ONBOARDING.md +50 -11
  5. package/QUICKSTART.md +1 -1
  6. package/README.md +22 -2
  7. package/config/agents/examples/connectors.yaml +82 -0
  8. package/config/agents/syndicate.schema.json +324 -26
  9. package/dist/lib/a2a/app.js +3 -0
  10. package/dist/lib/a2a/oauthSetup.js +20 -5
  11. package/dist/lib/chatgpt/adapter.d.ts +50 -0
  12. package/dist/lib/chatgpt/adapter.js +107 -0
  13. package/dist/lib/chatgpt/cli.d.ts +23 -0
  14. package/dist/lib/chatgpt/cli.js +77 -0
  15. package/dist/lib/chatgpt/oauth.d.ts +104 -0
  16. package/dist/lib/chatgpt/oauth.js +472 -0
  17. package/dist/lib/chatgpt/state.d.ts +98 -0
  18. package/dist/lib/chatgpt/state.js +145 -0
  19. package/dist/lib/chatgpt/store.d.ts +24 -0
  20. package/dist/lib/chatgpt/store.js +94 -0
  21. package/dist/lib/compile.js +40 -25
  22. package/dist/lib/dispatch.js +6 -2
  23. package/dist/lib/doctor.d.ts +34 -3
  24. package/dist/lib/doctor.js +63 -5
  25. package/dist/lib/loadSyndicate.d.ts +6 -0
  26. package/dist/lib/mcp/server.d.ts +195 -0
  27. package/dist/lib/mcp/server.js +564 -0
  28. package/dist/lib/memory/supabaseMemoryService.js +2 -2
  29. package/dist/lib/models/adapterResolver.js +6 -1
  30. package/dist/lib/models/gateway.d.ts +1 -1
  31. package/dist/lib/models/gateway.js +4 -2
  32. package/dist/lib/models/gptAdapter.js +11 -1
  33. package/dist/lib/onboarding.d.ts +4 -3
  34. package/dist/lib/onboarding.js +48 -9
  35. package/dist/lib/runtime/syndicateTurn.js +30 -16
  36. package/dist/lib/syndicateSchema.d.ts +146 -8
  37. package/dist/lib/syndicateSchema.js +118 -11
  38. package/dist/lib/tools/credentialUses.d.ts +7 -1
  39. package/dist/lib/tools/credentialUses.js +10 -2
  40. package/dist/lib/tools/generateImageTool.js +2 -1
  41. package/dist/lib/tools/inspectImageTool.js +1 -1
  42. package/dist/lib/tools/mcpToolFactory.d.ts +29 -1
  43. package/dist/lib/tools/mcpToolFactory.js +71 -25
  44. package/dist/lib/tools/mcpTransports.d.ts +12 -0
  45. package/dist/lib/tools/mcpTransports.js +11 -0
  46. package/dist/lib/tools/oauthConsent.d.ts +18 -3
  47. package/dist/lib/tools/oauthConsent.js +49 -14
  48. package/dist/lib/tools/oauthDiscovery.d.ts +202 -0
  49. package/dist/lib/tools/oauthDiscovery.js +616 -0
  50. package/dist/lib/tools/oauthTools.d.ts +44 -12
  51. package/dist/lib/tools/oauthTools.js +79 -22
  52. package/dist/lib/tools/xApiSearchTool.js +2 -2
  53. package/dist/scripts/a2a_server.js +8 -0
  54. package/dist/scripts/assistant_worker.js +11 -1
  55. package/dist/scripts/doctor.d.ts +1 -1
  56. package/dist/scripts/doctor.js +1 -1
  57. package/dist/scripts/mcp_server.d.ts +12 -0
  58. package/dist/scripts/mcp_server.js +345 -0
  59. package/dist/scripts/setup.d.ts +2 -0
  60. package/dist/scripts/setup.js +27 -0
  61. package/dist/scripts/syndicate_chat.js +12 -3
  62. package/package.json +15 -12
  63. package/skills/README.md +2 -2
  64. package/skills/briefs/skills-readme.md +1 -1
  65. package/skills/melchizedek-onboard/SKILL.md +28 -6
  66. package/skills/melchizedek-onboard-keys/SKILL.md +17 -5
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: melchizedek-onboard-keys
3
- description: "Onboard a person to Melchizedek with provider API keys: one key (Gemini, Anthropic, OpenAI, xAI or Moonshot), several, or one Vercel AI Gateway / OpenRouter key, and answer honestly when they only have a ChatGPT / Codex, Claude.ai or Gemini CLI sign-in. Use when someone says 'I have an OpenAI key', 'I have keys for Claude and Gemini', 'I have an OpenRouter key', 'can I use my Codex login', or asks which key unlocks which syndicate."
3
+ description: "Onboard a person to Melchizedek with provider API keys: one key (Gemini, Anthropic, OpenAI, xAI or Moonshot), several, or one Vercel AI Gateway / OpenRouter key, or their ChatGPT plan on their own machine through Sign in with ChatGPT, and answer honestly when they only have a Codex, Claude.ai or Gemini CLI sign-in. Use when someone says 'I have an OpenAI key', 'I have keys for Claude and Gemini', 'I have an OpenRouter key', 'I have ChatGPT Plus', 'can I use my Codex login', or asks which key unlocks which syndicate."
4
4
  ---
5
5
 
6
6
  ## The levels
@@ -10,7 +10,8 @@ description: "Onboard a person to Melchizedek with provider API keys: one key (G
10
10
  | 2 | `one-provider` | one provider's key funds every agent on that provider |
11
11
  | 3 | `several-providers` | each key funds its own provider; a syndicate may mix them |
12
12
  | 4 | `gateway` | one gateway key serves every cloud id whose direct key is absent |
13
- | 9 | `subscription-signin` | a consumer sign-in is not a model credential; the sanctioned route instead |
13
+ | 9 | `chatgpt-signin` | Sign in with ChatGPT: OpenAI ids on the person's ChatGPT plan, on their own machine only |
14
+ | 10 | `subscription-signin` | another app's sign-in is not a model credential; the sanctioned route instead |
14
15
 
15
16
  Print the guide for the level before you start: `npx melchizedek-setup --level <id>` (in a clone, `npm run setup -- --level <id>`).
16
17
 
@@ -25,11 +26,22 @@ Print the guide for the level before you start: `npx melchizedek-setup --level <
25
26
 
26
27
  It is a fallback, never a preempt: a direct key set beside it wins for its provider. On the gateway path, native search is dropped (Gemini grounding, Anthropic and OpenAI `web_search`, xAI `x_search`), and long-term memory's embedder still needs `GOOGLE_GENAI_API_KEY` (or `MEMORY_EMBEDDING_PROVIDER=openai` or `ollama`). A model id the gateway rejects is fixed with `MODEL_GATEWAY_MODEL_MAP`, not in code.
27
28
 
28
- ## A subscription sign-in (level 9)
29
+ ## Sign in with ChatGPT (level 9, local only)
30
+
31
+ OpenAI documents a plan-usage sign-in for open-source apps that run on the user's own machine, and the engine implements it as its own app registration.
32
+
33
+ 1. The person runs `npx melchizedek-setup --chatgpt-signin` (in a clone, `npm run setup -- --chatgpt-signin`) and approves in their own browser. You never see, copy or move the stored tokens; they live outside the repository, mode 600.
34
+ 2. `OPENAI_API_KEY` must be blank for the sign-in to carry OpenAI ids; a key wins.
35
+ 3. Run `npx melchizedek-doctor`: the providers line shows `ChatGPT sign-in, local only`, and the `chatgpt` line reads `signed in · carries OpenAI ids · local only`.
36
+ 4. Point a syndicate's `model:` lines at a GPT id their ChatGPT account offers, then chat.
37
+
38
+ Tell them: it is a preview (the Responses API only, streamed, no temperature or output-token cap), their plan's usage limits apply, and it is for their machine only. `melchizedek-serve` and `melchizedek-worker` refuse to start on it; a server needs `OPENAI_API_KEY` or Azure OpenAI. Sign out with `--chatgpt-signout`.
39
+
40
+ ## A subscription sign-in (level 10)
29
41
 
30
42
  Say plainly what is and is not possible, then route:
31
43
 
32
- - A ChatGPT / Codex, Claude.ai or Gemini CLI sign-in pays for that vendor's own apps. The engine does not read, reuse or relay those tokens, and you must not wire one in.
33
- - Anthropic and Google state that third-party software may not use those sign-ins. OpenAI documents a Sign in with ChatGPT plan-usage preview for some open-source, locally hosted apps; the engine has not integrated it, and copying the Codex CLI's token is not that flow.
44
+ - A Codex CLI login, a Claude.ai or a Gemini CLI sign-in pays for that vendor's own apps. The engine does not read, reuse or relay those tokens, and you must not wire one in or read their files.
45
+ - Anthropic and Google state that third-party software may not use those sign-ins. For OpenAI, the sanctioned way to use a ChatGPT plan is level 9, the engine's own Sign in with ChatGPT; copying the Codex CLI's token is not that flow.
34
46
  - The sanctioned routes: an API key from the same vendor (level 2), or its cloud platform (Bedrock or Vertex AI for Claude, Vertex AI for Gemini, Azure OpenAI for GPT; level 5, `melchizedek-onboard-cloud`). Google AI Studio has a free tier, and local models need nothing (level 1).
35
47
  - The sign-in still has a use here: it pays for the coding agent (you) that drives this repository.