@elizaos/plugin-elizacloud 2.0.0-alpha.4 → 2.0.0-alpha.537

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 (73) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +185 -0
  3. package/dist/actions/check-credits.d.ts.map +1 -1
  4. package/dist/actions/confirmation.d.ts +7 -0
  5. package/dist/actions/confirmation.d.ts.map +1 -0
  6. package/dist/actions/freeze-agent.d.ts.map +1 -1
  7. package/dist/actions/provision-agent.d.ts.map +1 -1
  8. package/dist/actions/resume-agent.d.ts.map +1 -1
  9. package/dist/browser/index.browser.js +22 -19
  10. package/dist/browser/index.browser.js.map +36 -27
  11. package/dist/cjs/index.node.cjs +1710 -406
  12. package/dist/cjs/index.node.js.map +36 -27
  13. package/dist/cloud-providers/credit-balance.d.ts +1 -3
  14. package/dist/cloud-providers/credit-balance.d.ts.map +1 -1
  15. package/dist/cloud-providers/model-registry.d.ts +4 -0
  16. package/dist/cloud-providers/model-registry.d.ts.map +1 -0
  17. package/dist/index.browser.d.ts +2 -1
  18. package/dist/index.browser.d.ts.map +1 -1
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.node.d.ts +2 -1
  21. package/dist/index.node.d.ts.map +1 -1
  22. package/dist/init.d.ts.map +1 -1
  23. package/dist/models/embeddings.d.ts.map +1 -1
  24. package/dist/models/image.d.ts.map +1 -1
  25. package/dist/models/index.d.ts +2 -1
  26. package/dist/models/index.d.ts.map +1 -1
  27. package/dist/models/object.d.ts.map +1 -1
  28. package/dist/models/research.d.ts +4 -0
  29. package/dist/models/research.d.ts.map +1 -0
  30. package/dist/models/speech.d.ts.map +1 -1
  31. package/dist/models/text.d.ts +5 -0
  32. package/dist/models/text.d.ts.map +1 -1
  33. package/dist/models/transcription.d.ts.map +1 -1
  34. package/dist/node/index.node.js +1710 -396
  35. package/dist/node/index.node.js.map +36 -27
  36. package/dist/providers/openai.d.ts.map +1 -1
  37. package/dist/services/cloud-auth.d.ts +140 -4
  38. package/dist/services/cloud-auth.d.ts.map +1 -1
  39. package/dist/services/cloud-bootstrap.d.ts +38 -0
  40. package/dist/services/cloud-bootstrap.d.ts.map +1 -0
  41. package/dist/services/cloud-bridge.d.ts +1 -1
  42. package/dist/services/cloud-managed-gateway-relay.d.ts +38 -0
  43. package/dist/services/cloud-managed-gateway-relay.d.ts.map +1 -0
  44. package/dist/services/cloud-model-registry.d.ts +28 -0
  45. package/dist/services/cloud-model-registry.d.ts.map +1 -0
  46. package/dist/types/cloud.d.ts +41 -19
  47. package/dist/types/cloud.d.ts.map +1 -1
  48. package/dist/types/index.d.ts +1 -1
  49. package/dist/types/index.d.ts.map +1 -1
  50. package/dist/utils/cloud-api.d.ts +2 -27
  51. package/dist/utils/cloud-api.d.ts.map +1 -1
  52. package/dist/utils/config.d.ts +9 -1
  53. package/dist/utils/config.d.ts.map +1 -1
  54. package/dist/utils/events.d.ts.map +1 -1
  55. package/dist/utils/forwarded-settings.d.ts +1 -1
  56. package/dist/utils/forwarded-settings.d.ts.map +1 -1
  57. package/dist/utils/responses-output.d.ts +6 -0
  58. package/dist/utils/responses-output.d.ts.map +1 -0
  59. package/dist/utils/sdk-client.d.ts +5 -0
  60. package/dist/utils/sdk-client.d.ts.map +1 -0
  61. package/package.json +84 -16
  62. package/types/cloud.ts +54 -41
  63. package/types/index.ts +6 -0
  64. package/dist/actions/index.d.ts +0 -5
  65. package/dist/actions/index.d.ts.map +0 -1
  66. package/dist/build.d.ts +0 -3
  67. package/dist/build.d.ts.map +0 -1
  68. package/dist/cloud-providers/index.d.ts +0 -4
  69. package/dist/cloud-providers/index.d.ts.map +0 -1
  70. package/dist/generated/specs/specs.d.ts +0 -55
  71. package/dist/generated/specs/specs.d.ts.map +0 -1
  72. package/dist/services/index.d.ts +0 -5
  73. package/dist/services/index.d.ts.map +0 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Shaw Walters and elizaOS Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,185 @@
1
+ # @elizaos/plugin-elizacloud
2
+
3
+ Eliza Cloud plugin for elizaOS agents. The TypeScript package is backed by
4
+ `@elizaos/cloud-sdk`, so runtime Cloud API calls, auth helpers, route wrappers,
5
+ TTS, STT, image generation, containers, and gateway relay code use the same SDK
6
+ surface as other Eliza Cloud clients.
7
+
8
+ ## Installation
9
+
10
+ ```bash
11
+ npm install @elizaos/plugin-elizacloud
12
+ # or
13
+ bun add @elizaos/plugin-elizacloud
14
+ ```
15
+
16
+ Register the plugin with your agent runtime:
17
+
18
+ ```typescript
19
+ import { elizaOSCloudPlugin } from "@elizaos/plugin-elizacloud";
20
+
21
+ const agent = new Agent({
22
+ plugins: [elizaOSCloudPlugin],
23
+ });
24
+ ```
25
+
26
+ ## SDK Contract
27
+
28
+ The TypeScript package has a hard dependency on `@elizaos/cloud-sdk`.
29
+ Development checkouts resolve it with `workspace:*`; published packages are
30
+ expected to consume the npm-published SDK version.
31
+
32
+ Runtime code must not build direct Eliza Cloud HTTP calls by hand. Use the SDK
33
+ helpers in `typescript/utils/sdk-client.ts`:
34
+
35
+ | Helper | Use |
36
+ | --- | --- |
37
+ | `createCloudApiClient(runtime)` | API-base requests such as `/responses`, `/embeddings`, `/models`, auth validation, containers, and relay JSON endpoints |
38
+ | `createCloudApiClient(runtime, true)` | Embedding requests that may use `ELIZAOS_CLOUD_EMBEDDING_URL` / `ELIZAOS_CLOUD_EMBEDDING_API_KEY` |
39
+ | `createElizaCloudClient(runtime)` | High-level SDK helpers and generated `client.routes.*` wrappers |
40
+ | `typescript/utils/cloud-api.ts` | Backwards-compatible re-export of SDK classes and types |
41
+
42
+ `ELIZAOS_CLOUD_BASE_URL` remains the API base URL and defaults to
43
+ `https://www.elizacloud.ai/api/v1`. `createElizaCloudClient` derives the site
44
+ root from that API URL when generated SDK route wrappers need `/api/v1/...`
45
+ paths.
46
+
47
+ `typescript/providers/openai.ts` is the one intentional transport adapter that
48
+ passes the configured base URL to the Vercel AI SDK's OpenAI-compatible client.
49
+ It is not a hand-rolled Cloud API fetch path.
50
+
51
+ ## Runtime Coverage
52
+
53
+ | Plugin capability | SDK path |
54
+ | --- | --- |
55
+ | Text generation (`TEXT_NANO`, `TEXT_SMALL`, `TEXT_MEDIUM`, `TEXT_LARGE`, `TEXT_MEGA`, response handler, planner) | `CloudApiClient.requestRaw("POST", "/responses", ...)` |
56
+ | Structured object generation | `CloudApiClient.requestRaw("POST", "/responses", ...)` |
57
+ | Research generation | `CloudApiClient.requestRaw("POST", "/responses", ...)` |
58
+ | Text embeddings | `CloudApiClient.requestRaw("POST", "/embeddings", ...)` |
59
+ | Image generation | `ElizaCloudClient.generateImage(...)` |
60
+ | Image description | generated SDK route `client.routes.postApiV1ChatCompletionsRaw(...)` |
61
+ | Text-to-speech | generated SDK route `client.routes.postApiV1VoiceTts(...)` |
62
+ | Audio transcription | generated SDK route `client.routes.postApiV1VoiceSttRaw(...)` |
63
+ | Model registry and credit status | `CloudApiClient` |
64
+ | Device auth and API-key validation | `CloudApiClient` |
65
+ | Cloud containers | `CloudApiClient` supplied by `CloudAuthService` |
66
+ | Managed gateway relay | `CloudApiClient` |
67
+
68
+ The only remaining runtime-adjacent `fetch()` usage is in the plugin test block
69
+ for downloading a public audio fixture. It is not an Eliza Cloud API call.
70
+
71
+ ## Configuration
72
+
73
+ Get an API key from
74
+ [https://www.elizacloud.ai/dashboard/api-keys](https://www.elizacloud.ai/dashboard/api-keys).
75
+
76
+ | Setting | Description | Default |
77
+ | --- | --- | --- |
78
+ | `ELIZAOS_CLOUD_API_KEY` | API key used for authenticated Cloud requests | Required |
79
+ | `ELIZAOS_CLOUD_BASE_URL` | Eliza Cloud API base URL | `https://www.elizacloud.ai/api/v1` |
80
+ | `ELIZAOS_CLOUD_ENABLED` | Enables container provisioning, device auth, bridge, and backup services | `false` |
81
+ | `ELIZAOS_CLOUD_NANO_MODEL` | Nano/cheapest model override | `NANO_MODEL` or `openai/gpt-5.4-nano` |
82
+ | `ELIZAOS_CLOUD_SMALL_MODEL` | Small/fast model override | `SMALL_MODEL` or `gpt-5.4-mini` |
83
+ | `ELIZAOS_CLOUD_MEDIUM_MODEL` | Medium planning model override | `MEDIUM_MODEL` or `claude-sonnet-4.6` |
84
+ | `ELIZAOS_CLOUD_LARGE_MODEL` | Large model override | `LARGE_MODEL` or `claude-sonnet-4.6` |
85
+ | `ELIZAOS_CLOUD_MEGA_MODEL` | Mega model override | `MEGA_MODEL` or large model |
86
+ | `ELIZAOS_CLOUD_RESPONSE_HANDLER_MODEL` | Response handler model override | nano model |
87
+ | `ELIZAOS_CLOUD_ACTION_PLANNER_MODEL` | Action planner model override | medium model |
88
+ | `ELIZAOS_CLOUD_RESEARCH_MODEL` | Research model override | large model |
89
+ | `ELIZAOS_CLOUD_EMBEDDING_MODEL` | Embedding model | `text-embedding-3-small` |
90
+ | `ELIZAOS_CLOUD_EMBEDDING_URL` | Optional custom embedding API base URL | unset |
91
+ | `ELIZAOS_CLOUD_EMBEDDING_API_KEY` | Optional custom embedding API key | `ELIZAOS_CLOUD_API_KEY` |
92
+ | `ELIZAOS_CLOUD_EMBEDDING_DIMENSIONS` | Embedding vector size | `1536` |
93
+ | `ELIZAOS_CLOUD_IMAGE_DESCRIPTION_MODEL` | Vision model used for image descriptions | `gpt-5.4-mini` |
94
+ | `ELIZAOS_CLOUD_IMAGE_DESCRIPTION_MAX_TOKENS` | Max image-description response tokens | `8192` |
95
+ | `ELIZAOS_CLOUD_IMAGE_GENERATION_MODEL` | Image generation model override | service default |
96
+ | `ELIZAOS_CLOUD_TTS_MODEL` | Text-to-speech model | `gpt-5-mini-tts` |
97
+ | `ELIZAOS_CLOUD_TTS_VOICE` | Text-to-speech voice | `nova` |
98
+ | `ELIZAOS_CLOUD_TTS_INSTRUCTIONS` | Optional TTS style instructions | unset |
99
+ | `ELIZAOS_CLOUD_TRANSCRIPTION_MODEL` | Audio transcription model | service default |
100
+ | `ELIZAOS_CLOUD_EXPERIMENTAL_TELEMETRY` | Enables experimental telemetry metadata | `false` |
101
+
102
+ Browser builds must not receive secrets directly. Use
103
+ `ELIZAOS_CLOUD_BROWSER_BASE_URL` and `ELIZAOS_CLOUD_BROWSER_EMBEDDING_URL` for
104
+ browser-only proxy endpoints.
105
+
106
+ ## Usage Examples
107
+
108
+ ```typescript
109
+ import { ModelType } from "@elizaos/core";
110
+
111
+ const text = await runtime.useModel(ModelType.TEXT_LARGE, {
112
+ prompt: "Summarize the current agent state.",
113
+ });
114
+
115
+ const object = await runtime.useModel(ModelType.OBJECT_LARGE, {
116
+ prompt: "Return a JSON user profile with name and role.",
117
+ });
118
+
119
+ const embedding = await runtime.useModel(ModelType.TEXT_EMBEDDING, {
120
+ text: "Hello, world!",
121
+ });
122
+
123
+ const speech = await runtime.useModel(ModelType.TEXT_TO_SPEECH, {
124
+ text: "Cloud text to speech is active.",
125
+ });
126
+ ```
127
+
128
+ ## Adding Cloud Calls
129
+
130
+ 1. Prefer an existing high-level SDK method when one exists.
131
+ 2. Otherwise use a generated `createElizaCloudClient(runtime).routes.*` wrapper.
132
+ 3. Use `createCloudApiClient(runtime)` for raw API-base endpoints that do not
133
+ yet have a generated wrapper.
134
+ 4. Keep all Eliza Cloud API auth/header/base-URL behavior inside the SDK helper
135
+ layer.
136
+ 5. Do not add direct `fetch()` calls for Eliza Cloud API routes in runtime code.
137
+
138
+ When the Cloud API adds or changes public routes, update the SDK first:
139
+
140
+ ```bash
141
+ cd ../../cloud/packages/sdk
142
+ bun run generate:routes
143
+ bun run check:routes
144
+ bun run test:e2e
145
+ ```
146
+
147
+ Then update this plugin to consume the new SDK route or helper.
148
+
149
+ ## Development
150
+
151
+ From the TypeScript package:
152
+
153
+ ```bash
154
+ cd typescript
155
+ bun run typecheck
156
+ bun run test
157
+ bun run build
158
+ npm pack --dry-run
159
+ ```
160
+
161
+ From the SDK package:
162
+
163
+ ```bash
164
+ cd ../../cloud/packages/sdk
165
+ bun run check:routes
166
+ bun run test:e2e
167
+ ```
168
+
169
+ `bun run test:e2e` in the SDK runs public real API checks by default and skips
170
+ credentialed or destructive cases unless the required credentials and opt-in
171
+ environment flags are present.
172
+
173
+ ## Publishing
174
+
175
+ The TypeScript package is published to npm as `@elizaos/plugin-elizacloud`.
176
+ Publishing must include a compatible `@elizaos/cloud-sdk` release because the
177
+ plugin depends on it directly.
178
+
179
+ The repository also contains legacy Python and Rust package directories. The
180
+ Eliza runtime integration and npm package are the TypeScript implementation
181
+ documented above.
182
+
183
+ ## License
184
+
185
+ MIT
@@ -1 +1 @@
1
- {"version":3,"file":"check-credits.d.ts","sourceRoot":"","sources":["../../actions/check-credits.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,MAAM,EAMP,MAAM,eAAe,CAAC;AAOvB,eAAO,MAAM,uBAAuB,EAAE,MA4ErC,CAAC"}
1
+ {"version":3,"file":"check-credits.d.ts","sourceRoot":"","sources":["../../actions/check-credits.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,MAAM,EAOP,MAAM,eAAe,CAAC;AAOvB,eAAO,MAAM,uBAAuB,EAAE,MAiHrC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { ActionResult, HandlerOptions } from "@elizaos/core";
2
+ type OptionsRecord = Record<string, unknown>;
3
+ export declare function mergedOptions(options?: HandlerOptions): OptionsRecord;
4
+ export declare function isConfirmed(options?: HandlerOptions): boolean;
5
+ export declare function confirmationRequired(preview: string, data: OptionsRecord): ActionResult;
6
+ export {};
7
+ //# sourceMappingURL=confirmation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirmation.d.ts","sourceRoot":"","sources":["../../actions/confirmation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAElE,KAAK,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE7C,wBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,aAAa,CAOrE;AAED,wBAAgB,WAAW,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAG7D;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,GAAG,YAAY,CAMvF"}
@@ -1 +1 @@
1
- {"version":3,"file":"freeze-agent.d.ts","sourceRoot":"","sources":["../../actions/freeze-agent.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,MAAM,EAMP,MAAM,eAAe,CAAC;AAcvB,eAAO,MAAM,sBAAsB,EAAE,MAmEpC,CAAC"}
1
+ {"version":3,"file":"freeze-agent.d.ts","sourceRoot":"","sources":["../../actions/freeze-agent.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,MAAM,EAOP,MAAM,eAAe,CAAC;AAgBvB,eAAO,MAAM,sBAAsB,EAAE,MA4HpC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"provision-agent.d.ts","sourceRoot":"","sources":["../../actions/provision-agent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,MAAM,EAMP,MAAM,eAAe,CAAC;AAwBvB,eAAO,MAAM,yBAAyB,EAAE,MAmIvC,CAAC"}
1
+ {"version":3,"file":"provision-agent.d.ts","sourceRoot":"","sources":["../../actions/provision-agent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,MAAM,EAOP,MAAM,eAAe,CAAC;AAuBvB,eAAO,MAAM,yBAAyB,EAAE,MA4LvC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"resume-agent.d.ts","sourceRoot":"","sources":["../../actions/resume-agent.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,MAAM,EAMP,MAAM,eAAe,CAAC;AAiCvB,eAAO,MAAM,sBAAsB,EAAE,MA2HpC,CAAC"}
1
+ {"version":3,"file":"resume-agent.d.ts","sourceRoot":"","sources":["../../actions/resume-agent.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,MAAM,EAOP,MAAM,eAAe,CAAC;AAgCvB,eAAO,MAAM,sBAAsB,EAAE,MAyLpC,CAAC"}