@ontrails/cloudflare 1.0.0-beta.42 → 1.0.0-beta.45

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/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @ontrails/cloudflare
2
2
 
3
+ ## 1.0.0-beta.45
4
+
5
+ ## 1.0.0-beta.44
6
+
7
+ ### Patch Changes
8
+
9
+ - [`b1fbe57`](https://github.com/outfitter-dev/trails/commit/b1fbe574e6f44d1fecb5e3a000270955c0a77b7b): Publish Bun-validated package tarballs through an npm trusted-publishing adapter
10
+ binding, add exact repository metadata for each public workspace package, and
11
+ correct the native Bun release descriptor to its pack-only runtime boundary.
12
+
13
+ ## 1.0.0-beta.43
14
+
15
+ ### Minor Changes
16
+
17
+ - [`88a6a62`](https://github.com/outfitter-dev/trails/commit/88a6a62a9e9e230ca6d368fa78dc3ece6c816204): Complete the v1 classification-first cutover from projection/project vocabulary
18
+ to derive/derived for contract-owned fact production and render/rendered for
19
+ surface presentation. Public type, helper, rule, relation, and report names move
20
+ without compatibility aliases; ordinary repository/project nouns remain
21
+ explicit preserves or structured review inventory.
22
+
3
23
  ## 1.0.0-beta.42
4
24
 
5
25
  ## 1.0.0-beta.41
package/README.md CHANGED
@@ -14,7 +14,7 @@ Adapter composition doctrine applies throughout: subpaths take primitive-authore
14
14
 
15
15
  ## `/workers` — the Worker materializer
16
16
 
17
- `createWorkersHandler(graph, options)` produces the Worker export for Cloudflare runtime entrypoints. Its `fetch(request, env, ctx)` member delegates to the shared HTTP fetch kernel from `@ontrails/http` — the same kernel behind the Bun and Hono surfaces, so routes, validation, error projection, and webhook handling behave identically. Its `queue(batch, env, ctx)` member dispatches first-class core `queue()` activation sources through the `/queues` materializer.
17
+ `createWorkersHandler(graph, options)` produces the Worker export for Cloudflare runtime entrypoints. Its `fetch(request, env, ctx)` member delegates to the shared HTTP fetch kernel from `@ontrails/http` — the same kernel behind the Bun and Hono surfaces, so routes, validation, error rendering, and webhook handling behave identically. Its `queue(batch, env, ctx)` member dispatches first-class core `queue()` activation sources through the `/queues` materializer.
18
18
 
19
19
  ```ts
20
20
  // src/worker.ts
@@ -182,7 +182,7 @@ binding = "ASSETS"
182
182
  bucket_name = "my-assets"
183
183
  ```
184
184
 
185
- The resource surface follows the R2 Worker binding structurally. A real R2 bucket binding passes through unchanged, including Cloudflare's conditional operation behavior where `get()` can return metadata without a body and `put()` can return `null` when a precondition fails. `r2ObjectToBlobRef(object)` is the small bridge from a fetched R2 object body to core's `BlobRef` binary-output contract; the HTTP and MCP surfaces already know how to project `blobRefSchema`.
185
+ The resource surface follows the R2 Worker binding structurally. A real R2 bucket binding passes through unchanged, including Cloudflare's conditional operation behavior where `get()` can return metadata without a body and `put()` can return `null` when a precondition fails. `r2ObjectToBlobRef(object)` is the small bridge from a fetched R2 object body to core's `BlobRef` binary-output contract; the HTTP and MCP surfaces already know how to render `blobRefSchema`.
186
186
 
187
187
  Capability boundaries are explicit:
188
188
 
package/package.json CHANGED
@@ -1,6 +1,11 @@
1
1
  {
2
2
  "name": "@ontrails/cloudflare",
3
- "version": "1.0.0-beta.42",
3
+ "version": "1.0.0-beta.45",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "git+https://github.com/outfitter-dev/trails.git",
7
+ "directory": "adapters/cloudflare"
8
+ },
4
9
  "files": [
5
10
  "src/**/*.ts",
6
11
  "!src/**/__tests__/**",
@@ -27,16 +32,16 @@
27
32
  "clean": "rm -rf dist *.tsbuildinfo"
28
33
  },
29
34
  "dependencies": {
30
- "@ontrails/core": "^1.0.0-beta.42"
35
+ "@ontrails/core": "^1.0.0-beta.45"
31
36
  },
32
37
  "devDependencies": {
33
- "@ontrails/adapter-kit": "^1.0.0-beta.42",
34
- "@ontrails/testing": "^1.0.0-beta.42",
38
+ "@ontrails/adapter-kit": "^1.0.0-beta.45",
39
+ "@ontrails/testing": "^1.0.0-beta.45",
35
40
  "miniflare": "^4.20250617.4"
36
41
  },
37
42
  "peerDependencies": {
38
- "@ontrails/http": "^1.0.0-beta.42",
39
- "@ontrails/store": "^1.0.0-beta.42",
43
+ "@ontrails/http": "^1.0.0-beta.45",
44
+ "@ontrails/store": "^1.0.0-beta.45",
40
45
  "zod": "^4.3.5"
41
46
  },
42
47
  "trails": {
package/src/facts.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Cloudflare lock facts.
3
3
  *
4
- * The adapter's `trails.lock` overlay overlay: `derive` projects the
4
+ * The adapter's `trails.lock` overlay overlay: `derive` derives the
5
5
  * topo's env-bound resources (resources with a registered
6
6
  * {@link EnvBindingSpec | env binding}, such as every `cloudflareKv`
7
7
  * definition) into `overlays.cloudflare`, listing the wrangler binding name
@@ -18,7 +18,7 @@ import {
18
18
  getTraceSink,
19
19
  isTrailsError,
20
20
  matchesTrailPattern,
21
- projectActivationSourceDeclaration,
21
+ deriveActivationSourceFacts,
22
22
  resource,
23
23
  run,
24
24
  traceContextFromRecord,
@@ -402,7 +402,7 @@ const collectQueueConsumers = (
402
402
 
403
403
  const queueInputContractSignature = (source: QueueSource): string =>
404
404
  JSON.stringify(
405
- projectActivationSourceDeclaration(source)['parseOutputSchema'] ?? null
405
+ deriveActivationSourceFacts(source)['parseOutputSchema'] ?? null
406
406
  );
407
407
 
408
408
  const assertQueueSourceCompatibility = (
package/src/r2/index.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * `cloudflareR2` authors an ordinary resource definition for an R2 bucket
5
5
  * binding. Trails can store and fetch object bytes through the standard
6
6
  * resource accessor, then return `BlobRef` values when HTTP/MCP surfaces should
7
- * project the fetched object as binary output.
7
+ * render the fetched object as binary output.
8
8
  */
9
9
 
10
10
  import {
@@ -13,8 +13,8 @@
13
13
  */
14
14
 
15
15
  import {
16
- projectErrorDiagnostics,
17
- projectPublicSurfaceError,
16
+ renderErrorDiagnostics,
17
+ renderPublicSurfaceError,
18
18
  } from '@ontrails/core';
19
19
  import type {
20
20
  BaseSurfaceOptions,
@@ -104,7 +104,7 @@ export interface CloudflareWorker {
104
104
 
105
105
  /**
106
106
  * Map a materialization failure (route derivation, env bridge resolution) to
107
- * a projected HTTP error response. Route execution errors never reach this
107
+ * a rendered HTTP error response. Route execution errors never reach this
108
108
  * path — the fetch kernel maps those itself.
109
109
  */
110
110
  const mapCaughtError = (error: unknown): Response => {
@@ -113,18 +113,18 @@ const mapCaughtError = (error: unknown): Response => {
113
113
  // diagnostics to the Worker log while the response stays redacted.
114
114
  console.error(
115
115
  '[ontrails:cloudflare/workers] Failed to materialize request handler',
116
- projectErrorDiagnostics(err)
116
+ renderErrorDiagnostics(err)
117
117
  );
118
- const projection = projectPublicSurfaceError('http', err);
118
+ const rendering = renderPublicSurfaceError('http', err);
119
119
  return Response.json(
120
120
  {
121
121
  error: {
122
- category: projection.category,
123
- code: projection.name,
124
- message: projection.message,
122
+ category: rendering.category,
123
+ code: rendering.name,
124
+ message: rendering.message,
125
125
  },
126
126
  },
127
- { status: projection.code }
127
+ { status: rendering.code }
128
128
  );
129
129
  };
130
130
 
@@ -135,7 +135,7 @@ const mapCaughtQueueError = (
135
135
  const err = error instanceof Error ? error : new Error(String(error));
136
136
  console.error(
137
137
  '[ontrails:cloudflare/workers] Failed to materialize queue handler',
138
- projectErrorDiagnostics(err)
138
+ renderErrorDiagnostics(err)
139
139
  );
140
140
  batch.retryAll();
141
141
  };