@substrat-run/connector-scrive 0.1.8 → 0.1.10

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.
Files changed (2) hide show
  1. package/README.md +14 -5
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -45,9 +45,13 @@ await host.admin.grantToConnection(actor, {
45
45
  connectionId: id, permission: 'protocol:record-signature', node, grantedBy: actor,
46
46
  });
47
47
 
48
- // 3. Schedule the poll — YOUR deployment calls the sweep on a timer.
48
+ // 3. Schedule the poll — YOUR deployment calls the sweep on a timer. Both triggers ship:
49
49
  // Node: startPlatformSweeper(host, { sweepers: { scrive: sweepScriveReconciliations }, intervalMs })
50
- // Cloudflare: a scheduled() Cron / DO alarm calling runPlatformSweep(host, { sweepers: { scrive: … } })
50
+ // Cloudflare: definePlatformSweeperDO (@substrat-run/adapter-cloudflare) a self-re-arming
51
+ // Durable Object alarm whose pass calls runPlatformSweep(host, { sweepers: { scrive: … } }).
52
+ // An alarm rather than a cron because a vertical pushed into a Workers-for-Platforms
53
+ // dispatch namespace gets no `triggers.crons`; where a cron IS available, point
54
+ // scheduled() at the DO's ensureArmed() as a safety net.
51
55
  ```
52
56
 
53
57
  The credential is Scrive's OAuth1 "personal access credentials" — four parts that combine into a
@@ -59,9 +63,14 @@ instead. The host needs a `SecretBox` configured to seal the credential at rest.
59
63
  ## Caveats worth knowing
60
64
 
61
65
  1. **Your deployment must schedule the poll** (step 3). The connector provides the driver; it
62
- cannot hold a timer — that is a deployment concern (a cron, a Durable Object alarm, or
63
- `startPlatformSweeper`'s interval). Without one, dispatch works but signatures are never
64
- recorded back.
66
+ cannot hold a timer — that is a deployment concern. Both triggers now exist off the shelf:
67
+ `startPlatformSweeper` (node, a self-rescheduling interval) and `definePlatformSweeperDO`
68
+ (`@substrat-run/adapter-cloudflare`, a self-re-arming Durable Object alarm — works in a
69
+ Workers-for-Platforms dispatch namespace, where crons do not). Without one wired, dispatch
70
+ works but signatures are never recorded back. Note the sweep enumerates connections through
71
+ `host.admin.listConnections`, so the deployment that runs it must hold the connection
72
+ directory — a control-plane-less vertical worker (scope-local-permissions.md Phase 3) cannot
73
+ sweep until its connections are reachable from its runtime.
65
74
 
66
75
  2. **The live BankID signing round-trip is unverified.** The outbound lifecycle is checked against
67
76
  `api-testbed.scrive.com`, but `se_bankid`-to-sign is **disabled on the testbed account**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@substrat-run/connector-scrive",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "Substrat connector: Scrive eSign (Swedish BankID). Turns a protocol.signatures-requested event into a Scrive signing flow (create → set file → parties → start) and records the completed signature back into the scope through the #97 authority seam. Host code — registered on a ScopeHost, never module code.",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {
@@ -26,14 +26,14 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "zod": "^4.4.3",
29
- "@substrat-run/kernel": "^0.18.0",
30
- "@substrat-run/contracts": "^0.18.0"
29
+ "@substrat-run/contracts": "^0.20.0",
30
+ "@substrat-run/kernel": "^0.20.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "typescript": "^7.0.0",
34
34
  "vitest": "^3.0.0",
35
- "@substrat-run/adapter-sqlite": "^0.18.0",
36
- "@substrat-run/engine-protocol": "^0.4.10"
35
+ "@substrat-run/adapter-sqlite": "^0.20.0",
36
+ "@substrat-run/engine-protocol": "^0.4.12"
37
37
  },
38
38
  "scripts": {
39
39
  "build": "tsc -p tsconfig.json",