@oddington/sdk 0.1.34 → 0.1.36

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 CHANGED
@@ -79,6 +79,21 @@ declared `review` handler crosses the Inbox publication seam as `review`; Inbox
79
79
  retains the canonical `invoice-import` routine identity separately, without
80
80
  deploying or executing that handler.
81
81
 
82
+ With `access: { ai: true }`, `os.ai.generateText` returns non-empty `{ text }`.
83
+ `os.ai.generateObject` returns `{ object }` validated against the requested
84
+ `schema`, with its inferred type. An invalid answer throws `RoutineAIError`
85
+ with code `invalid_output`, a clear bounded `detail`, and the original final
86
+ answer as optional `text` for routine-owned recovery. The text is bounded at
87
+ 256 KiB and excluded from the error message and ordinary JSON serialization.
88
+ The routine can inspect it explicitly, apply its own recovery rules, report
89
+ an item failure and continue; it must not cast a rejected answer to the promised
90
+ type. OS does not coerce, drop fields, repair or retry automatically.
91
+
92
+ An AI call failure can be caught and handled without automatically failing the
93
+ Run. Uncaught routine or step exceptions still fail execution, and outstanding
94
+ AI calls drain before completion. The host retains authority, isolation,
95
+ cancellation and byte limits. Local and remote Runs use the same API.
96
+
82
97
  The bounded grammar supports closed objects with required properties, arrays with
83
98
  an explicit `maxItems` from 1 to 64, booleans, strings (at most 4096 code points),
84
99
  finite numbers and safe integers with optional inclusive bounds, and Files.
@@ -413,7 +428,12 @@ across processes or fresh routine runs. Caller inputs remain owned by the caller
413
428
  Each request resolves current authority; hosted routine Files calls use the
414
429
  selected workspace's HTTPS OS host, and managed calls use the authenticated
415
430
  private parent transport. `FileOperationError` exposes a bounded code,
416
- status and retryability without server details. Reads return the successful Web
431
+ status and retryability. Input validation can also include a safe `detail` reason
432
+ and numeric byte counts; its message explains the rejected field or expected
433
+ versus received size. Streaming rejection marks partial received counts with
434
+ `receivedAtLeast: true`. These facts survive local Run summaries and saved
435
+ failure evidence without raw names, keys, file content or provider text. Older
436
+ errors without `detail` remain valid. Reads return the successful Web
417
437
  Response without consuming its body. Local transfer is bounded and buffered
418
438
  before constructing that Response. Creation grants private creator access;
419
439
  workspace membership alone never grants another creator's File.
@@ -775,12 +795,11 @@ Checkout-backed app children retain immediate publication.
775
795
 
776
796
  Retain evidence with `inbox.files.add({ path: 'evidence.txt' })`. Paths stay within
777
797
  the invocation's working root and uploaded bytes are verified against the retained
778
- file. Use `inbox.repository.readRecords`, `writeRecords`, `updateRecords` and
779
- `deleteRecords` for shared Records capabilities. Writes require a trusted routine
780
- launch and installed write grant. Carry the returned `receipt.commit` into a
781
- subsequent `readRecords({ repository, refs, atCommit: receipt.commit })` to capture
782
- the prepared version for review. Retrying writes or publication uses the same
783
- request key and exact input; server boundaries own validation, effects and receipts.
798
+ file. Use `data.repository(name)` for Record reads and `changes()` for guarded
799
+ creates, updates and deletions. Local Runs read their own successive proposals
800
+ and leave ordinary uncommitted files for review. `os routine publish` sends the
801
+ retained logical changes explicitly. Inbox publication has no Record methods;
802
+ managed Response handlers retain their separately injected repository capability.
784
803
 
785
804
  Hosts publishing as a member supply the existing `request` option:
786
805