@oddington/sdk 0.1.63 → 0.1.65

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
@@ -19,21 +19,24 @@ Inbox File previews and downloads use package-root `files.read(fileId)` with
19
19
  current workspace access. Item visibility does not grant File access. The SDK
20
20
  exposes no raw-credential API.
21
21
 
22
- Hosted apps use `inbox.questions.list({ routines })` for `AnswerableQuestion[]`.
23
- Derive `routines` from the existing app declaration with
24
- `[...new Set(Object.values(appDeclaration.routines).map(binding => binding.routine))]`.
25
- These inner canonical names narrow relevance only; they grant no answer or
22
+ Apps use `inbox.questions.list({ routines })` for `QuestionWork[]`.
23
+ Derive `routines` from `(await app.listRoutines()).map(({ id }) => id)`.
24
+ These canonical names narrow relevance only; they grant no answer or
26
25
  Record-search authority. The ordinary authenticated Inbox context needs no app
27
26
  identity or declaration provisioning. The filter is required; `[]` returns no
28
27
  Questions after authentication. The SDK validates and privately snapshots the
29
- filter across pagination. Local apps use `inbox.questions.list()` instead, bound
30
- to their trusted host's declaration; any supplied filter is invalid locally.
28
+ filter across pagination. Local apps supply the same explicit filter; their
29
+ trusted host rejects undeclared IDs. Each Question names its `responsible`
30
+ person, explicit `answerable` permission and server-calculated `situation`.
31
+ Accepted Actions stay visible while waiting, working, unable to start or needing
32
+ review; completed Actions and accepted handlerless Questions leave the list.
31
33
  Both use the same answer and Record-search methods, without a filter or prior list.
32
34
  `InboxItem` remains the complete first-party Inbox value. Record refs are placement
33
35
  hints only: match them against independently authorized Data, and omit ambiguous
34
36
  detail placement. Keep drafts on failed or uncertain acceptance, prevent duplicate
35
- interaction while submitting, and dismiss a Question only after acknowledged
36
- acceptance. Refresh after a conflict; later effects remain Inbox work. These
37
+ interaction while submitting, and show “Answer recorded” after acknowledged
38
+ acceptance. Refresh to show the shared situation. Detailed Activity and evidence
39
+ remain Inbox work. Refresh after a conflict. These
37
40
  interaction duties belong to the consuming app's interface.
38
41
 
39
42
  ```sh
@@ -433,6 +436,21 @@ the existing bounded session recovery before a new read or write can proceed.
433
436
  Snapshot initialization requires a hosted browser app; Node, routines and local
434
437
  app contexts receive `DataOperationError` with `context_unavailable`.
435
438
 
439
+ When the named snapshot selects history, `accounting.history.records({ collection,
440
+ at: '2026-10-01T00:00:00Z' })` returns `{ commit, records }`, with ref-sorted
441
+ Records shaped as `{ $ref, values }` containing only the selected historical
442
+ fields. It includes Records later deleted. The timestamp chooses the first
443
+ eligible commit walking backward from the snapshot tip, then replays that
444
+ first-parent ancestry prefix; equal or backward clocks never reorder history.
445
+ Before the collection's first event it returns `commit: null` and no Records.
446
+ `accounting.history.changes({ collection, ref?, field? })` returns matching commit
447
+ groups in ancestry order. A ref matches the event's visible ref, including the
448
+ new ref on a rename; a field selects only its field-update events. Missing slots
449
+ and explicit null remain distinct. Both reads are local and return detached
450
+ values. Unselected history collections or fields reject with `invalid_query`.
451
+ Newer published Changes and local mutations do not enter Git history; only a
452
+ snapshot replacement advances its current Records and history together.
453
+
436
454
  `transact` captures a synchronous callback describing create, update, link,
437
455
  unlink and delete operations across selected collections. Record methods chain;
438
456
  create followed by edits folds into creation on the host. Generated schema