@moldea.ai/adapter-cloudflare-agents 2.0.1 → 3.0.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.
- package/README.md +4 -2
- package/docs/evidence-and-diagnostics.md +13 -0
- package/docs/index.md +13 -0
- package/docs/limitations.md +21 -0
- package/docs/verified-targets.md +21 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -8,10 +8,10 @@ The package implements the official `cloudflare-agents` runtime adapter for `@mo
|
|
|
8
8
|
|
|
9
9
|
## Supported targets
|
|
10
10
|
|
|
11
|
-
Version `
|
|
11
|
+
Version `3.0.1` supports:
|
|
12
12
|
|
|
13
13
|
- Repository Format version `1`
|
|
14
|
-
- `@moldea.ai/core ^
|
|
14
|
+
- `@moldea.ai/core ^4.0.0`
|
|
15
15
|
- TypeScript ESM `.ts`, `.tsx`, and `.mts` source
|
|
16
16
|
- `@cloudflare/think >=0.16.0`, `agents >=0.21.0`, and `ai >=7.0.0`
|
|
17
17
|
- `@cloudflare/ai-chat >=0.10.2`, `agents >=0.21.0`, and `ai >=7.0.0`
|
|
@@ -71,6 +71,8 @@ Evidence is source-grounded, references existing repository files, and contains
|
|
|
71
71
|
|
|
72
72
|
## Documentation
|
|
73
73
|
|
|
74
|
+
These guides are included in the installed package. Open only the page relevant to your task.
|
|
75
|
+
|
|
74
76
|
- [Adapter contract](docs/index.md)
|
|
75
77
|
- [Verified targets](docs/verified-targets.md)
|
|
76
78
|
- [Evidence and diagnostics](docs/evidence-and-diagnostics.md)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Evidence and diagnostics
|
|
3
|
+
description: Source-grounded observations and stable Cloudflare adapter failures.
|
|
4
|
+
order: 20
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Evidence and diagnostics
|
|
8
|
+
|
|
9
|
+
Package evidence records exact dependency declarations and whether each declaration is supported or ambiguous for the selected target. Unsupported disjoint ranges produce `CLOUDFLARE_AGENTS_RUNTIME_VERSION_UNSUPPORTED` and suppress target-derived evidence.
|
|
10
|
+
|
|
11
|
+
`agent-definition` identifies a supported exported class. `runtime-pattern` identifies direct AI SDK generation in `AIChatAgent`; Think does not emit it. `instruction-loader`, `schema`, and `tool-registration` require exact manifest binding identity. `handoff-registration` requires an active `agentTool` in a closed tools map, a unique registered target class, and an exact routing-description match against the target agent's handoff description or description fallback.
|
|
12
|
+
|
|
13
|
+
The package README is the canonical package diagnostic catalog. Dynamic or unsupported forms yield partial or no evidence rather than guessed relationships. Unsupported class initialization preserves package and language observations but suppresses all class method-derived results.
|
package/docs/index.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Cloudflare Agents adapter
|
|
3
|
+
description: Package contract, integration model, and public surface.
|
|
4
|
+
order: 0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Cloudflare Agents adapter
|
|
8
|
+
|
|
9
|
+
`@moldea.ai/adapter-cloudflare-agents` is the official source-neutral adapter for the `cloudflare-agents` runtime id. It implements `IRuntimeAdapter`, supports Repository Format version `1`, and exposes only `cloudflareAgentsAdapter`.
|
|
10
|
+
|
|
11
|
+
The adapter inspects TypeScript source through the repository reader supplied by Core. It does not execute source, load Cloudflare packages, inspect `node_modules`, use credentials, or make network requests. Runtime applications register the singleton with `createCore({ adapters: [cloudflareAgentsAdapter] })`; the local CLI registers active official adapters automatically.
|
|
12
|
+
|
|
13
|
+
The [Runtime Compatibility Matrix](https://packages.moldea.ai/compatibility/) is authoritative. This documentation explains the package behavior but does not expand the verified target boundary.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Boundaries and limitations
|
|
3
|
+
description: Unsupported Cloudflare surfaces, source forms, and the adapter security boundary.
|
|
4
|
+
order: 30
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Boundaries and limitations
|
|
8
|
+
|
|
9
|
+
The current verified targets do not claim support for:
|
|
10
|
+
|
|
11
|
+
- JavaScript, Python, CommonJS, default imports, namespace imports, or source outside TypeScript ESM
|
|
12
|
+
- the bare `Agent` class, custom harnesses, factories, indirect subclasses, re-export graphs, or decorators
|
|
13
|
+
- executable class fields, static blocks, computed member names, generator methods, or non-pass-through constructors
|
|
14
|
+
- dynamic session builders, `onCompaction`, mutable definitions, open tools maps, or channel-provided tool replacement
|
|
15
|
+
- nested generation calls, request variables, `prepareStep` instruction interpretation, or generation APIs other than `generateText` and `streamText`
|
|
16
|
+
- output variants other than `Output.object({ schema })` or any agent input schema
|
|
17
|
+
- dynamic, provider, MCP-generated, or inline tools as manifest registration identities
|
|
18
|
+
- arbitrary compiler resolution, `tsconfig` path aliases, directory indexes, package exports, or general re-export graphs
|
|
19
|
+
- runtime-generated strings, schema-content validation, provider compatibility, model behavior, or actual tool execution
|
|
20
|
+
|
|
21
|
+
Package detection uses nearest manifests, not lockfiles or installed `node_modules`. Each invocation sees one declared agent, exact same-runtime binding resolution, and only the bounded operations Core supplies through `IRuntimeAdapterRepository`. It receives no complete agent collection, project body index, host path, credential, environment variable, network client, or runtime process.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Verified targets
|
|
3
|
+
description: Exact Cloudflare package ranges and statically supported integration patterns.
|
|
4
|
+
order: 10
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Verified targets
|
|
8
|
+
|
|
9
|
+
## Think 0.16 with AI SDK 7
|
|
10
|
+
|
|
11
|
+
The `typescript-think-0-16-ai-sdk-7` target requires `@cloudflare/think >=0.16.0`, `agents >=0.21.0`, and `ai >=7.0.0`.
|
|
12
|
+
|
|
13
|
+
The runtime agent must be a directly exported class extending an exact named `Think` import. Instructions may come from a direct loader call returned by `getSystemPrompt` or from the supported closed `configureSession` chain. Function tools and handoffs must be active in a closed `getTools` map. This target emits no `runtime-pattern` evidence and supports no agent input or output schema binding.
|
|
14
|
+
|
|
15
|
+
## AIChatAgent 0.10 with AI SDK 7
|
|
16
|
+
|
|
17
|
+
The `typescript-ai-chat-agent-0-10-ai-sdk-7` target requires `@cloudflare/ai-chat >=0.10.2`, `agents >=0.21.0`, and `ai >=7.0.0`.
|
|
18
|
+
|
|
19
|
+
The runtime agent must be a directly exported class extending an exact named `AIChatAgent` import. Its supported `onChatMessage(onFinish, options?)` method contains direct `generateText({ ... })` or `streamText({ ... })` calls in its own lexical body. `instructions` takes precedence over `system`; `prepareStep` makes instructions unresolved. Agent output schemas use `Output.object({ schema })`.
|
|
20
|
+
|
|
21
|
+
Both targets require closed class initialization, named ESM imports, normalized `.ts`, `.tsx`, or `.mts` text, and exact relative ESM binding resolution.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moldea.ai/adapter-cloudflare-agents",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "Deterministic runtime evidence and diagnostics for Cloudflare Agents integrations.",
|
|
5
5
|
"homepage": "https://github.com/moldea-ai/packages/tree/main/projects/adapter-cloudflare-agents#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"files": [
|
|
19
19
|
"cover.png",
|
|
20
20
|
"dist",
|
|
21
|
+
"docs",
|
|
21
22
|
"LICENSE",
|
|
22
23
|
"README.md"
|
|
23
24
|
],
|
|
@@ -33,7 +34,7 @@
|
|
|
33
34
|
"node": ">=22.11.0"
|
|
34
35
|
},
|
|
35
36
|
"dependencies": {
|
|
36
|
-
"@moldea.ai/core": "^
|
|
37
|
+
"@moldea.ai/core": "^4.0.0",
|
|
37
38
|
"@moldea.ai/repository": "^2.0.0",
|
|
38
39
|
"semver": "7.8.5",
|
|
39
40
|
"typescript": "6.0.3"
|