@portel/photon 1.25.0 → 1.26.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.
@@ -6,6 +6,27 @@ main = "src/worker.ts"
6
6
  # browser build that references `window`.
7
7
  compatibility_date = "2024-09-23"
8
8
  compatibility_flags = ["nodejs_compat"]
9
+ __OBSERVABILITY__
10
+ # Workers AI binding — gives every photon access to CF's edge inference
11
+ # (embeddings, classification, small LLMs) via `(this as any).env.AI.run(...)`.
12
+ # Free tier covers thousands of calls/day; charges only kick in at scale.
13
+ # Photons that don't use it pay nothing for having the binding declared.
14
+ [ai]
15
+ binding = "AI"
16
+
17
+ # Durable Objects backing every photon class bundled into this Worker. The
18
+ # host photon is always bound to `PHOTON`; each `@photons` sibling gets
19
+ # its own `PHOTON_<NAME>` binding so `this.call('sibling.method', args)`
20
+ # can hop via env.PHOTON_<NAME>.idFromName(...). One DO per instance name
21
+ # carries that photon's `this.memory`, `this.emit` subscribers, and
22
+ # `this.schedule` alarm queue. See docs/internals/CF-DURABLE-OBJECTS.md.
23
+ __DURABLE_OBJECT_BINDINGS__
24
+
25
+ # SQLite-backed DOs share the same KV API as classic DOs but cost less
26
+ # and unlock ctx.storage.sql.exec(...) for photons that opt into queries.
27
+ [[migrations]]
28
+ tag = "v1"
29
+ new_sqlite_classes = __SQLITE_CLASSES__
9
30
 
10
31
  # Uncomment to add environment variables
11
32
  # [vars]