@sanoma-ai/workflows 0.10.0 → 0.10.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.
Files changed (89) hide show
  1. package/README.md +33 -7
  2. package/SECRET-SUPPORT.md +33 -0
  3. package/dist/apps.d.ts +6 -0
  4. package/dist/apps.js +18 -1
  5. package/dist/apps.js.map +1 -1
  6. package/dist/authentication.d.ts +30 -0
  7. package/dist/authentication.js +71 -1
  8. package/dist/authentication.js.map +1 -1
  9. package/dist/call.js +7 -5
  10. package/dist/call.js.map +1 -1
  11. package/dist/client.d.ts +54 -6
  12. package/dist/client.js +177 -5
  13. package/dist/client.js.map +1 -1
  14. package/dist/config.d.ts +7 -4
  15. package/dist/config.js +44 -12
  16. package/dist/config.js.map +1 -1
  17. package/dist/connection.d.ts +223 -2
  18. package/dist/connection.js +334 -4
  19. package/dist/connection.js.map +1 -1
  20. package/dist/db.js +15 -2
  21. package/dist/db.js.map +1 -1
  22. package/dist/describe.d.ts +8 -0
  23. package/dist/describe.js +51 -1
  24. package/dist/describe.js.map +1 -1
  25. package/dist/direct.js +4 -0
  26. package/dist/direct.js.map +1 -1
  27. package/dist/fake.d.ts +13 -1
  28. package/dist/fake.js +70 -0
  29. package/dist/fake.js.map +1 -1
  30. package/dist/index.d.ts +4 -4
  31. package/dist/index.js +2 -2
  32. package/dist/index.js.map +1 -1
  33. package/dist/lint.js +1 -1
  34. package/dist/lint.js.map +1 -1
  35. package/dist/load.d.ts +11 -0
  36. package/dist/load.js +42 -8
  37. package/dist/load.js.map +1 -1
  38. package/dist/op.d.ts +14 -6
  39. package/dist/op.js +20 -2
  40. package/dist/op.js.map +1 -1
  41. package/dist/outline.d.ts +5 -0
  42. package/dist/outline.js +33 -1
  43. package/dist/outline.js.map +1 -1
  44. package/dist/paths.d.ts +2 -4
  45. package/dist/paths.js +2 -8
  46. package/dist/paths.js.map +1 -1
  47. package/dist/run.d.ts +3 -1
  48. package/dist/run.js.map +1 -1
  49. package/dist/sandbox.d.ts +4 -1
  50. package/dist/sandbox.js +51 -5
  51. package/dist/sandbox.js.map +1 -1
  52. package/dist/scenario.d.ts +5 -0
  53. package/dist/scenario.js +3 -2
  54. package/dist/scenario.js.map +1 -1
  55. package/dist/secret.d.ts +2 -0
  56. package/dist/secret.js +32 -0
  57. package/dist/secret.js.map +1 -1
  58. package/dist/shared.d.ts +4 -0
  59. package/dist/shared.js +7 -0
  60. package/dist/shared.js.map +1 -1
  61. package/dist/sites.js +18 -3
  62. package/dist/sites.js.map +1 -1
  63. package/dist/steps.d.ts +3 -0
  64. package/dist/steps.js.map +1 -1
  65. package/oxlint.json +1 -0
  66. package/package.json +2 -1
  67. package/src/apps.ts +17 -1
  68. package/src/authentication.ts +119 -2
  69. package/src/call.ts +4 -5
  70. package/src/client.ts +240 -6
  71. package/src/config.ts +45 -11
  72. package/src/connection.ts +472 -6
  73. package/src/db.ts +15 -2
  74. package/src/describe.ts +52 -1
  75. package/src/direct.ts +4 -0
  76. package/src/fake.ts +71 -0
  77. package/src/index.ts +12 -1
  78. package/src/lint.ts +1 -1
  79. package/src/load.ts +36 -7
  80. package/src/op.ts +33 -8
  81. package/src/outline.ts +35 -2
  82. package/src/paths.ts +2 -9
  83. package/src/run.ts +3 -1
  84. package/src/sandbox.ts +55 -5
  85. package/src/scenario.ts +24 -6
  86. package/src/secret.ts +29 -0
  87. package/src/shared.ts +9 -0
  88. package/src/sites.ts +19 -3
  89. package/src/steps.ts +3 -2
package/README.md CHANGED
@@ -122,7 +122,7 @@ What an app's folder declares is named with the folder, from where its file is (
122
122
 
123
123
  The people are the company's: an app's data files declare none (`readPeople` refuses one, naming its file). A workflow may import the root's `resources/data.ts` and any app's. A relative import from one app's files into another's folder is a warning (`crossAppImports(root, apps)`, from `@sanoma-ai/workflows/describe`, which `sanoma check` prints), since a company may take one app without the other: reach the other through `ctx` or `api` instead. A collection or site at the root named as an app is a problem: `api.data.<app>` and `/sites/<app>/` are the app's.
124
124
 
125
- Taking an app is a git merge into a draft of the company's `Source` (the `sanoma` package's `localGitSource`). `draft.take({ url, ref?, folder?, author })` fetches the source repository, a public company repo holding one `apps/<folder>/` (`folder` names it when it holds more), by https alone, and merges it with its history as one merge commit. `draft.update({ folder, author })` merges the new commits of the default branch of the URL the app's `app.ts` names, and `source.behind(folder)` counts them, fetched now (both refuse a source that shares no history with the checkout). An update reads the source from `main`'s `app.ts`, never the draft's, since a draft's files are never loaded: an app only in a draft is refused until its take is published. Either merge takes `apps/<folder>/` (a take, the source's folder whole) and `package.json` (its connectors, both sides kept); every other file stays the company's, as does a file one side deleted, since the source's root is the starter's. Both return an `AppMerge` (`{ folder, revision, merged, conflicts }`): a line both sides changed is committed with git's markers (diff3: ours, the base, theirs) and its file named in `conflicts`, so the draft's checks fail until the agent resolves it. An update needs the take's merge commit in the history: a draft that takes an app is merged into `main` as a merge, not squashed.
125
+ Taking an app is a git merge into a draft of the company's `Source` (the `sanoma` package's `localGitSource`). `draft.take({ url, ref?, folder?, author })` fetches the source repository, a public company repo holding one `apps/<folder>/` (`folder` names it when it holds more), by https alone, and merges it with its history as one merge commit. `draft.update({ folder, author })` merges the new commits of the default branch of the URL the app's `app.ts` names (`appSourceOf`: an `app.ts` that throws, or is not `defineApp({ source })`, is refused with its problem, and one that names no source as the company's own), and `source.behind(folder)` counts them, fetched now (both refuse a source that shares no history with the checkout). An update reads the source from `main`'s `app.ts`, never the draft's, since a draft's files are never loaded: an app only in a draft is refused until its take is published. Either merge takes `apps/<folder>/` (a take, the source's folder whole) and `package.json` (its connectors, both sides kept); every other file stays the company's, as does a file one side deleted, since the source's root is the starter's. Both return an `AppMerge` (`{ folder, revision, merged, conflicts }`): a line both sides changed is committed with git's markers (diff3: ours, the base, theirs) and its file named in `conflicts`, so the draft's checks fail until the agent resolves it. An update needs the take's merge commit in the history: a draft that takes an app is merged into `main` as a merge, not squashed.
126
126
 
127
127
  ### People
128
128
 
@@ -271,7 +271,7 @@ export default defineConfig({ connectors: [], secrets });
271
271
 
272
272
  Without `store`, the runtime uses its encrypted Postgres adapter. Without `namespace`, it uses `default`. An unbound name resolves to the same path in that namespace, managed by Sanoma. A `{ path, management: "external" }` binding is read-only to Sanoma even when its store can write. An `{ env }` binding reads that exact variable, is read-only, and does not fall back when absent. A `{ bootstrap }` binding explicitly exposes one deployment key to trusted host-secret resolution; it reads the corresponding environment or mounted-file input and never stores the key in Postgres. Bootstrap keys and recovery are described [below](#bootstrap-keys).
273
273
 
274
- An external adapter is a `SecretStore` instance supplied as `secrets.store`. It authenticates to one deployment's authorized storage before Sanoma can read values. Prefer a scoped workload identity where the adapter supports it; otherwise deliver its bootstrap credential through the host. Do not make that credential depend on reading the same store it unlocks. AWS Secrets Manager, Supabase Vault, HashiCorp Vault, Cloudflare Secrets Store, managed KMS storage and transfer tooling are not shipped by this foundation.
274
+ An external adapter is a `SecretStore` instance supplied as `secrets.store`. It authenticates to one deployment's authorized storage before Sanoma can read values. Prefer a scoped workload identity where the adapter supports it; otherwise deliver its bootstrap credential through the host. Do not make that credential depend on reading the same store it unlocks. The [Supabase Vault adapter](../../connectors/supabase/README.md#supabase-vault-as-the-secret-store) provides this boundary for BYOC. See the [support and release-readiness matrix](https://github.com/Sanoma-AI/sanoma/blob/main/packages/workflows/SECRET-SUPPORT.md) for merged capabilities, connector coverage, publication status and remaining providers/lifecycle work.
275
275
 
276
276
  Keep deployment composition in config code, outside workflows. For example, given an adapter instance already authenticated as `liveStore`:
277
277
 
@@ -298,7 +298,7 @@ Pass exactly the selected configuration to `defineConfig`. A namespace is a rout
298
298
 
299
299
  The adapter contract uses `read({ namespace, path })`, `write(address, value, { expectedVersion, by })`, `delete(address, { expectedVersion, by })` and `validate(namespace)`. A read returns an opaque version beside the value; `expectedVersion: null` creates only when absent, and a version replaces or deletes only that version. `ensure` uses create-if-absent and reads the winner of a concurrent creation. Providers advertise writable access, a byte limit, conditional-write guarantees (`atomic`, `coordinated` or `none`), deletion behavior and change detection. `coordinated` covers cooperating Sanoma writers only; it cannot promise safety against external writers. Unsupported conditional writes are refused, not emulated with an unsafe read followed by a write.
300
300
 
301
- The built-in adapter stores one encrypted value or credential bundle per namespace/path, with a fresh version on each write. AES-256-GCM authenticates the complete namespace/path identity. It rejects plaintext rows and ciphertext moved to another address. `SecretStoreError` returns fixed codes without provider responses or secret values. Connector authentication declares its own versioned schema with `defineAuthentication`: `api-key`, `fields`, `oauth2` or `signed`, with storage requirements; `workload-identity` needs no persisted credential bundle. Connector authors use `checkAuthenticationStore`, `encodeCredentials` and `decodeCredentials` inside trusted code. These contracts do not implement OAuth consent, refresh or vendor account verification.
301
+ The built-in adapter stores one encrypted value or credential bundle per namespace/path, with a fresh version on each write. AES-256-GCM authenticates the complete namespace/path identity. It rejects plaintext rows and ciphertext moved to another address. `SecretStoreError` returns fixed codes without provider responses or secret values. Connector authentication declares its own versioned schema with `defineAuthentication`: `api-key`, `fields`, `oauth2` or `signed`, with storage requirements; `workload-identity` needs no persisted credential bundle. Connector authors use `checkAuthenticationStore`, `encodeCredentials` and `decodeCredentials` inside trusted code. OAuth consent and refresh remain separate lifecycle work.
302
302
 
303
303
  Adapter authors can run `checkSecretStore(store, disposableNamespace)` from `@sanoma-ai/workflows`. It checks missing values, ownership, contention, stale versions, namespace separation, size limits and the advertised deletion behavior. It mutates test records; use a scoped test identity and clean up retained versions according to the provider. `memorySecretStore()` is the in-process reference implementation, not persistent deployment storage.
304
304
 
@@ -342,10 +342,14 @@ export default defineConfig({
342
342
 
343
343
  Connection creation rules accept principal IDs or `{ group: "visitors" }` for authenticated customer sign-ups. The runtime uses admitted groups and owns each dynamic connection by the initiating principal. Disconnect invalidates the account revision and blocks new selection; vendor revocation and credential retirement are separate lifecycle work. Visitors also need a Cedar permit for the relevant operation; a creation rule does not bypass policy.
344
344
 
345
- `sanoma.connection.bind` is a policy-controlled access operation. Its input contains a declared reference, the granted account and scopes, and `expectedRevision` (`null` for an initial binding). It persists metadata and a new revision, never credential values. `sanoma.connection.create` takes a declared rule ID, account and scopes; the actor must be in `createBy`. It creates an owner-scoped dynamic ID without a repository commit. Trusted code can make a typed reference with `connectionRef(rule, id)`, but the runtime still verifies the stored owner and declaration on use. These metadata operations are not proof of vendor consent; connector intake must verify the account before binding it.
345
+ `sanoma.connection.bind` is a policy-controlled access operation. Its input contains a declared reference, the granted account and scopes, and `expectedRevision` (`null` for an initial binding). It persists metadata and a new revision, never credential values. `sanoma.connection.create` takes a declared rule ID, account and scopes; the actor must be in `createBy`. It creates an owner-scoped dynamic ID without a repository commit. Trusted code can make a typed reference with `connectionRef(rule, id)`, but the runtime still verifies the stored owner and declaration on use. These low-level metadata operations are not a credential-entry interface or proof of vendor consent. Use the secure intake APIs below for user-entered values; each named invocation also verifies the current bundle.
346
346
 
347
347
  A durable call pins its account revision before policy evaluation. A held direct call carries the same pin into its durable continuation. The runtime checks that the binding and definition still match before execution; rebinding or changing requirements requires a fresh call and authorization. Policy approvals cannot silently authorize a different account. The ledger records connection metadata, not its credential bundle. This changes the durable step layout; old runs are not replayed against the new layout.
348
348
 
349
+ Named drivers explicitly opt into methods with `defineDriver(connector, implementation, { authentication: ["apiKey"] })`. Each method supplies `verify(credentials)`, which checks the provider and returns `{ account, scopes, expiresAt? }`; expiry is Unix milliseconds. Workload identity verifies the deployment identity without a stored bundle. A missing verifier or unsupported driver is refused. After policy allows the operation, the runtime reads only the selected bundle, validates its schema, verifies that its account and grants still match the authorized metadata, and rechecks the binding after verification. Changed grants or expired credentials require reconnection. Verifier exceptions expose no SDK messages or causes.
350
+
351
+ The driver reads `authenticationCredentials("apiKey", definition, call)` inside its operation and creates a client for that invocation. `defineDriver` also accepts a factory `(call) => implementation`, invoked inside that boundary, for operations sharing one SDK client during a call. `call.authentication.credentialVersion` identifies the version read. The runtime keeps no credential or SDK cache: replacement affects the next invocation, while a call already executing retains its original bundle. Never put this material in an operation result. Named calls' `call.secrets` can resolve only auxiliary secret markers in their authorized input, and `ensure` additionally requires a marker with `generate: true`. An operation may declare generated destinations with `createsSecrets(input)`, such as a database connector storing a URL under the authorized resource export's name; these are exact logical names, not wildcard store access. Driver failures retain retryability and HTTP status, with a fixed message and no provider cause. Direct calls and durable calls use the same driver boundary.
352
+
349
353
  Resource declarations use the same identity as an option, loaded with the rest of the data file:
350
354
 
351
355
  ```ts
@@ -354,7 +358,29 @@ import { mail } from "@acme/mail/resources";
354
358
  export const inbox = mail.inbox({ name: "support" }, { connection: { vendor: "mail", $connection: "mail/support" } });
355
359
  ```
356
360
 
357
- The resource type must belong to that connector. Apply and drift pin the selected revision when they read declarations, then carry it through imports, plans and effects. The resource lockfile records the connection alongside the vendor object ID. Changing the account of a bound resource requires an explicit unbind/rebind; a default change or a same-name account replacement cannot redirect a later apply. Named sandbox account state and the connection-management UI remain follow-up work.
361
+ The resource type must belong to that connector. Apply and drift pin the selected revision when they read declarations, then carry it through imports, plans and effects. The resource lockfile records the connection alongside the vendor object ID. Changing the account of a bound resource requires an explicit unbind/rebind; a default change or a same-name account replacement cannot redirect a later apply. The app exposes these declarations through its [connection management](../app/README.md#connection-management) forms.
362
+
363
+ Sandbox runs use synthetic identities for declared static connections, with separate fake state, faults and remembered replies for each account and run. They never read production connection records, invoke authentication verifiers or read production credentials. A production revision or an undeclared dynamic account is refused. Scenario steps can select an account in their returned seed, such as `{ op: mail.message.create, input: { title }, connection: support }`; absent a selector, only an explicitly declared default is used. Fault seeds accept the same `connection` field. Standalone driver tests can use `connectionFakes(makeFake)` from `@sanoma-ai/workflows/fake`: its `driver` requires `call.connection`, `account(ref)` exposes just that account's fake for seeding and fault injection, and `calls` is the combined log with connection IDs. Rebinding a reference to a different vendor account starts fresh fake state.
364
+
365
+ #### Connecting and managing accounts
366
+
367
+ Use `SanomaClient.previewConnection(target, credentials, { actor, id })` and `connectConnection(review, credentials, { actor })` for secure account intake. These are trusted server APIs, not workflow operations: credential values must never be passed to `client.call`, workflow arguments or an approval. `target` is either `{ connection: ref }` for a declared account or `{ rule: "vendor/rule" }` for an authorized dynamic account. Keep the same request ID while completing one review; a new account or a changed review starts a new request.
368
+
369
+ Preview runs the metadata-only `sanoma.connection.prepare` access gate before reading a store or verifying submitted credentials. The connector verifies the account and granted scopes against the code's requirements. The returned `ConnectionReview` contains metadata only: the verified account and scopes, destination, existing account/destination when present, expected revisions and the authorization fingerprint. It never returns credentials. An externally managed or read-only binding accepts no pasted replacement; preview reads its existing bundle. Workload identity verifies the deployment without a stored bundle.
370
+
371
+ Save rechecks the review, policy and destination, verifies the credentials again, then calls `sanoma.connection.configure` to reserve a `pending` account revision. It writes a managed bundle directly through the selected store with the reviewed expected version, outside durable execution. An opaque stored-version receipt records a successful write so resuming the same approved setup does not blindly repeat it. `sanoma.connection.activate` is a separate access gate: it verifies the saved bundle before making that revision usable. These gates, Test and Disconnect use ordinary policy decisions and ledger records containing metadata only. When a gate asks for approval, return to the secure form and retry after the decision; an approval never stores the form's credential values for later replay.
372
+
373
+ `pending` and `uncertain` accounts cannot run operations. An ambiguous store write or a failure after writing can leave `uncertain`; it must be inspected and reverified rather than treated as a successful connection or blindly written again. A policy, account, scope, destination or binding revision change invalidates the relevant review and requires fresh verification. Changing a destination does not copy or delete the previous value: the review identifies both locations, and a store migration remains an explicit separate action.
374
+
375
+ The read APIs are scoped to the admitted actor:
376
+
377
+ - `client.connections({ actor })` returns `ConnectionCard` metadata for company declarations and that actor's dynamic accounts, including requirements, account, scopes, ownership, current/bound storage location, change attribution and last-tested health. Listing cards does not read credentials or contact a vendor.
378
+ - `client.connectionRules({ actor })` returns creation choices permitted by the current code's `createBy` person IDs or `{ group }` entries. Creating under a rule still passes policy and ownership checks.
379
+ - `client.secretStoreStatus({ actor })` validates the selected store's bootstrap access and reports its ID, namespace, capabilities and a sanitized readiness problem. It neither enumerates nor reads credential values.
380
+
381
+ Call `sanoma.connection.test` with `{ connection }` to verify the current bundle under policy. Its health result is a timestamped observation, not a live guarantee or background monitor: it can report expired, revoked, wrong-account, changed-scope, invalid, unavailable or store-denied states. An external bundle whose opaque version differs from the prior test is marked externally renewed. A later vendor or store change is detected on the next Test or authorized invocation.
382
+
383
+ `sanoma.connection.disconnect` takes `{ connection, expectedRevision }` and makes the binding unusable under a new revision. It does not delete any stored value or revoke the token at the vendor; externally managed values remain with their owner. Deletion, vendor revocation, OAuth consent/refresh and provider-store migration require their own lifecycle support. The app's [connection forms](../app/README.md#connection-management) implement this secure intake and show these states; they do not add a second configuration source.
358
384
 
359
385
  #### Bootstrap keys
360
386
 
@@ -470,7 +496,7 @@ Another data file names `website` by importing it: `import { website } from "./g
470
496
 
471
497
  A data file is TypeScript like any other: it may compute a value, spread a shared object or import a helper of its own. Each exported value that a resource type's constructor made (`<vendor>.<type>({ … })`, the vendor's constructors imported from its connector's `<info.package>/resources` entry, the people's from `sanoma/resources`) is one declaration, `<file>#<export>`, in the file that made it (another file re-exporting it declares nothing), under its non-default name when the file also exports it as `default`; anything else the file exports, such as the list `export default [a, b]` that Sanoma writes, declares nothing. A field the type's `fields.references` allows a resource in is given the declared value itself, and names the declaration that exports that very object. A field the type's `fields.writeOnly` lists takes `secret("NAME")` or `secret("NAME", { generate: true })`, imported from `sanoma/resources` (or `@sanoma-ai/workflows/resources`; see [Secrets](#secrets)). `resources/data.ts` is the exception: it holds the [collections](#collections) and nothing else.
472
498
 
473
- The loader (`loadModules`) loads synchronously, since `describeConfig` and `readPeople` are: `require` of an ES module, Node's type stripping and `module.registerHooks`, so a data file may not use top-level `await`. It serves the modules a company file imports from the runtime itself, from its own objects: each connector's `<package>/resources` with the config's constructors, `sanoma/resources`, `sanoma/data` (`collection`), `sanoma/site` (`defineSite`) and, to an app's `app.ts`, `sanoma` (`defineApp`); so a data file never needs the package installed, and each value they make records where it was made. Each load is a generation: a file is loaded again, with what it imports, once it, a company file it imports or a directory they are in has changed (by size and modification time), so an edit is read without a restart; every other call answers from the generation, at the cost of a `stat` per file. A superseded generation's modules stay in Node's cache, a copy of the files per edit.
499
+ The loader (`loadModules`) loads synchronously, since `describeConfig` and `readPeople` are: `require` of an ES module, Node's type stripping and `module.registerHooks`, so a data file may not use top-level `await`. It serves the modules a company file imports from the runtime itself, from its own objects: each connector's `<package>/resources` with the config's constructors, `sanoma/resources`, `sanoma/data` (`collection`), `sanoma/site` (`defineSite`) and, to an app's `app.ts`, `sanoma` (`defineApp`); so a data file never needs the package installed, and each value they make records where it was made. Each load is a generation: a file is loaded again, with what it imports, once it, a company file it imports or a directory they are in has changed (by size and modification time), so an edit is read without a restart; every other call answers from the generation, at the cost of a `stat` per file. `liveDescription(config)` (`@sanoma-ai/workflows/describe`) keeps a `describeConfig` and makes it again only once a file a load read (`stampsOf`), the lockfile, or a folder a new data file, app or site would appear in has changed: the app reads its description through it, so a saved field shows on the next page without a restart. A superseded generation's modules stay in Node's cache, a copy of the files per edit.
474
500
 
475
501
  The data files are found from the config's root: `defineConfig` records the file it is called from as the config's `file`, and `resolveConfig` gives its directory as `root`. A config bundled into one file sets `root` itself. A config with neither has no data files, and says so, rather than guess the working directory.
476
502
 
@@ -749,7 +775,7 @@ A sandbox run does not survive a worker restart: its fakes keep their state in t
749
775
  `@sanoma-ai/app` is one UI over a config; another (a Slack bot, an internal tool) can be built on the same pieces, which the package exports for that:
750
776
 
751
777
  - `describeConfig(config)` and its types (`ConfigDescription`, `WorkflowEntry`, `OpEntry`, `VendorEntry`, `ResourceTypeEntry`, `DeclaredResource`, `ResourceProblem`), and `loadDataFiles(root, connectors)` and `readResources(config)`, from `@sanoma-ai/workflows/describe`: what to render, as plain JSON, with each workflow's outline. Its shape is `ConfigDescriptionSchema`, from `@sanoma-ai/workflows/description` (zod and nothing of Node, so a browser may import it): each entry type is inferred from its schema, and the schema refuses a key it does not name. Beside what the sections above say, a resource type carries its `capabilities` (`host`, `database` and `wakeup` from its spec, `source` for a type a host type's `source` field names, such as `github.repository`), a vendor its `credentials` (each variable its driver's `env` declares: its name, description and whether it is optional, never a value or a status), and the policy its `files` (each `.cedar` file's path and text, the root's then each app's). It is a separate entry so the worker never loads the parser the outline uses, and the lint refuses it in workflow files. `resolveConfig(config)` returns the checked config as a `ResolvedConfig`, with the operations and drivers by id, the resource types by `<vendor>.<type>` (`types`), the workflows by name (the built-ins `drift`, `apply` and `call` among them), its `root` and each vendor's `credentials` (`CredentialStatus`); `isOp(x)` tells an operation from a built-in in a workflow's `uses`.
752
- - `readSites(root, description, connectors, policies?)`, from `@sanoma-ai/workflows/describe`, which `describeConfig` returns as `sites`: what each site calls, read from its source with oxc and never run (its pages are browser code: what they call is the site's outline), for a workflow's **Used by**; its `site.ts` is loaded. A site is a folder of `sites/` with a `routes/`, named as a URL segment; its `routes/**` and `components/**` (`.ts`, `.tsx`, less tests) are read for each `<RunForm workflow="…" />` and each use of `api`, both imported from `sanoma/site`, called or passed on (`queryFn: api.data.leads.list`): `api.<name>` and `api.<name>.<method>` are the workflow whose `apiNameOf` is `<name>`, `api.data.<collection>.<op>` a collection, `api.<vendor>.<resource>.<op>` the operation of that id. Each is a `SiteCall` (`kind`, `target`, `method`, what it calls of a workflow or collection as written (`start`, `latest`, `list`), `via`, `file`, `line`, `column`, and `page`, the page's path from its `createFileRoute` or `createLazyFileRoute` id, in a page's file); a `SiteEntry` holds a site's `name`, its `title` (`defineSite({ title })` in `site.ts`, the file's default export, which a zod schema checks: a key it does not name, a `login` naming no login half, or `locales` that are no language tags or not on a public site without a login, is a problem), its `pages` (each `SitePage` a `path` from a route file's id, one per path, a layout and its index being one; and on a path with one parameter, such as `/sites/www/blog/$slug`, `content`, the one kind its file reads an entry of by that parameter, `content.<kind>.get(params.slug)` (or `slug`, destructured) with `content` from `sanoma/site`, for the app's sitemap and its pages' languages, which `siteContentPages(root)` gives the app's build alone, path to kind), its `calls`, its `warnings` (on a public site, each page with one parameter whose file reads content but not by that parameter, so the sitemap lists none of its pages: a warning `sanoma check` prints and does not fail on) and its `problems`: each call to a workflow, collection or operation the config does not have (`calls workflow "<name>", which does not exist`), or to an operation a page may not call directly, and, given the policies (`describeConfig` passes them unless they have problems), on a public site each start (`api.<name>(…)`, `.start(…)`, a `RunForm`) and direct call that no company `permit` could let a visitor make, its `when` and `unless` aside (one naming `anonymous`; on a site with a `login`, `anonymous` or the group `visitors`), whose message ends with the permit to add, and, whatever the policies, its call of a built-in workflow or read of a workflow's runs but `.result` (`.latest`, `.runs`, `.approvals`, `.ledger`), which the app refuses a visitor; which `sanoma check` fails on. A name not written out (a variable, a template with holes, a computed member) is skipped, as is a call through a namespace import or a destructured `api`.
778
+ - `readSites(root, description, connectors, policies?)`, from `@sanoma-ai/workflows/describe`, which `describeConfig` returns as `sites`: what each site calls, read from its source with oxc and never run (its pages are browser code: what they call is the site's outline), for a workflow's **Used by**; its `site.ts` is loaded. A site is a folder of `sites/` with a `routes/`, named as a URL segment; its `routes/**` and `components/**` (`.ts`, `.tsx`, less tests) are read for each `<RunForm workflow="…" />` and each use of `api`, both imported from `sanoma/site`, called or passed on (`queryFn: api.data.leads.list`): `api.<name>` and `api.<name>.<method>` are the workflow whose `apiNameOf` is `<name>`, `api.data.<collection>.<op>` a collection, `api.<vendor>.<resource>.<op>` the operation of that id. Each is a `SiteCall` (`kind`, `target`, `method`, what it calls of a workflow or collection as written (`start`, `latest`, `list`), `via`, `file`, `line`, `column`, and `page`, the page's path from its `createFileRoute` or `createLazyFileRoute` id, in a page's file); a `SiteEntry` holds a site's `name`, its `title` (`defineSite({ title })` in `site.ts`, the file's default export, which a zod schema checks: a key it does not name or a field of the wrong type (a number for `icon`) is a problem and that field is left out, the rest still read, so a bad `icon` keeps a site public, though a wrong `public`, `login` or `locales` leaves out all three; a `login` naming no login half, or `locales` that are no language tags or not on a public site without a login, is a problem too), its `pages` (each `SitePage` a `path` from a route file's id, one per path, a layout and its index being one; and on a path with one parameter, such as `/sites/www/blog/$slug`, `content`, the one kind its file reads an entry of by that parameter, `content.<kind>.get(params.slug)` (or `slug`, destructured) with `content` from `sanoma/site`, for the app's sitemap and its pages' languages, which `siteContentPages(root)` gives the app's build alone, path to kind), its `calls`, its `warnings` (on a public site, each page with one parameter whose file reads content but not by that parameter, so the sitemap lists none of its pages: a warning `sanoma check` prints and does not fail on) and its `problems`: each call to a workflow, collection or operation the config does not have (`calls workflow "<name>", which does not exist`), or to an operation a page may not call directly, and, given the policies (`describeConfig` passes them unless they have problems), on a public site each start (`api.<name>(…)`, `.start(…)`, a `RunForm`) and direct call that no company `permit` could let a visitor make, its `when` and `unless` aside (one naming `anonymous`; on a site with a `login`, `anonymous` or the group `visitors`), whose message ends with the permit to add, and, whatever the policies, its call of a built-in workflow or read of a workflow's runs but `.result` (`.latest`, `.runs`, `.approvals`, `.ledger`), which the app refuses a visitor; which `sanoma check` fails on. A name not written out (a variable, a template with holes, a computed member) is skipped, as is a call through a namespace import or a destructured `api`.
753
779
  - `generateApi(description)` and `writeApi(root, description)`, from `@sanoma-ai/workflows/describe`: a site's typed `api`, `.sanoma/api.ts` (`API_FILE`), from a `ConfigDescription`, types and JSDoc only and the same text for the same description. It holds a record type per collection and `CompanyApi`: `<apiNameOf(workflow)>: WorkflowFn<input>` per workflow, built-ins too; `<vendor>: { <resource>: { <op>: OpFn<input> } }` for the operations `direct` marks; `data: { <collection>: CollectionApi<record> }`; each member documented from its title or description. Then it augments `sanoma/site`'s `Register`. Inputs are typed from their JSON Schema for the kinds a start form draws, constants, and unions of them (`null` among them); anything else, and every output, is `unknown`. A workflow with `describeConfig`'s api-name problem is left out (`problems`). `writeApi` writes only when the text differs (`wrote`).
754
780
  - `SanomaClient`: call an operation directly (`call`, see [Direct calls](#direct-calls)), start runs, list them (`runs({ limit, status, workflow })`) or read a workflow's last result (`latest`), read a run's ledger and approvals, decide approvals, with the checks described above, and start a drift check or an apply and read its report (`drift`, `driftReport`, `apply`, `applyReport`, see [Drift](#drift) and [Apply](#apply)). `client.chats` keeps the operator agent's chats in the config's database: `open({ id, person, engine, title })` (the id the browser gave the new chat), `attach(id, draftId)`, `upsert(id, messages)` (the AI SDK's UI messages, each by its id, a new one after the last), `load(id)`, `get(id)` and `list(person)` (the newest first, `Chat`).
755
781
  - `APPROVALS_EVENT` and `decisionEventOf(approvalId)`: the DBOS events a run publishes its approvals and each decision on, for a UI that reads DBOS directly. `ApprovalMessage` is the zod schema of a decision as a run reads it. `RunArgs` is what a run receives: its input, `startedBy` and, for a sandbox run, its scenario as `sandbox`.
@@ -0,0 +1,33 @@
1
+ # Secret storage and named-account support
2
+
3
+ Release checkpoint: `sanoma`, `@sanoma-ai/workflows` and `@sanoma-ai/app` **0.10.1**, `@sanoma-ai/connector-supabase` **0.4.9**, `@sanoma-ai/bridge` **0.5** with its matching platform packages, and `@sanoma-ai/connector-neon` **0.2**. Publication and consumer verification remain pending in [#471](https://github.com/Sanoma-AI/sanoma/issues/471); check installed versions before relying on these capabilities. The client pins [provider-bridge v0.2.0](https://github.com/Sanoma-AI/provider-bridge/releases/tag/v0.2.0); the Go binary release alone does not update installed npm packages. GCP provisioning and D1 runtime identity are separate work, outside this 0.10.1 checkpoint.
4
+
5
+ ## Support matrix
6
+
7
+ | Surface | Merged support | Boundary |
8
+ | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
9
+ | Built-in secret store | Encrypted Postgres values/bundles, logical names, explicit bindings, ownership and atomic version-checked writes/deletes. | Requires `SANOMA_SECRETS_KEY` outside the database. `SANOMA_SIGNING_KEY` is separate. This is not managed KMS storage. |
10
+ | Supabase Vault for BYOC | Server-only `@sanoma-ai/connector-supabase/vault` adapter, private SQL gateway, deployment-scoped database login, managed values and read-only mappings to existing secrets. | Requires gateway installation/grants and bootstrap database authentication. No `SANOMA_SECRETS_KEY` for Vault. Project-wide locks serialize Vault writes; project administrators remain trusted. |
11
+ | Named accounts | Static declarations, code-defined dynamic creation rules, explicit defaults, account/revision selection through policy and execution, and isolated sandbox accounts. | The connector must declare and verify its authentication method, and its driver must explicitly support that method. Declaring an account alone does not add driver support. |
12
+ | Connection management | Secure Verify/Review/Save intake, metadata-only prepare/configure/activate gates, ownership-aware controls, Test/Disconnect, storage review and workflow dependency labels. | Health is last-tested. Pending/uncertain connections cannot execute. Disconnect neither deletes stored credentials nor revokes a vendor token. |
13
+ | Neon | Named `apiKey` connections, verified organization identity, and a new SDK client per authorized invocation. | The verifier requires exactly one organization. It does not attest granular permissions or expiry; Neon enforces permissions on each request. |
14
+ | Provider bridge | UUID session and fresh provider process per operation, protocol-1 negotiation, process-bound plan tokens, shared release/schema caches and session cleanup. | At most 64 active/configuring sessions. No implicit mutation replay. Vendor-specific named authentication still needs an explicit adapter opt-in. |
15
+
16
+ Configuration and lifecycle contracts remain in [Credentials](README.md#credentials). Follow the [Supabase Vault setup and recovery instructions](../../connectors/supabase/README.md#supabase-vault-as-the-secret-store), [connection UI documentation](../app/README.md#connection-management) and [bridge session contract](../bridge/README.md).
17
+
18
+ ## Connector coverage
19
+
20
+ **Neon is the only connector in this checkout declaring a named authentication method.** Its [authentication documentation](../../connectors/neon/README.md#authentication) describes the supported bundle and provider verification.
21
+
22
+ GitHub, Stripe, Supabase and Docker resource drivers use the session-capable bridge, but do not yet opt into named authentication. Supabase Vault is a storage adapter; it does not migrate the Supabase Management API/resource driver. Other connectors retain their existing authentication paths. Login, model and remote halves are also distinct from named operation accounts. This release does not promise multiple named accounts for every connector, nor Gmail, LinkedIn, Reddit or Instagram OAuth connections.
23
+
24
+ For a new named account, the connector's authentication definition, live verifier, supported driver methods and per-call credential use must all be present. Bridge session isolation supplies the provider-process boundary; it does not supply those vendor-specific pieces.
25
+
26
+ ## Remaining delivery and verification
27
+
28
+ - Run the release's affected-package and repository checks against its final commit, verify packed installation and the pinned bridge binary, then publish the coordinated npm packages. Source merge and the Go release alone do not complete these steps.
29
+ - Supabase Vault has an actual-extension proof using standard non-superuser administrator permissions in `supabase/postgres:17.6.1.136`. That is not proof of every hosted project's grants/version; validate the target deployment's gateway and scoped login. The [verification procedure](../../connectors/supabase/README.md#verification) uses a disposable database, not production.
30
+ - Managed Cloud GCP KMS storage remains separate work in [#470](https://github.com/Sanoma-AI/sanoma/issues/470). This release does not establish a deployed Cloud identity route, tenant IAM isolation or the required live deployment evidence.
31
+ - OAuth consent, token refresh, OAuth app ownership and reauthorization remain lifecycle work. Declaring an `oauth2` credential shape does not implement those flows.
32
+ - Cross-store migration remains [#468](https://github.com/Sanoma-AI/sanoma/issues/468). Changing a binding or namespace does not transfer credentials or remove the old copy; automated encryption-key rotation is also absent.
33
+ - AWS Secrets Manager [#462](https://github.com/Sanoma-AI/sanoma/issues/462) and HashiCorp Vault [#464](https://github.com/Sanoma-AI/sanoma/issues/464) are deferred. Cloudflare host bootstrap-secret delivery is distinct from its optional account-wide secret-store adapter; this matrix does not claim that adapter is implemented.
package/dist/apps.d.ts CHANGED
@@ -17,6 +17,12 @@ export declare function appsAt(root: string | undefined): {
17
17
  apps: AppEntry[];
18
18
  problems: AppProblem[];
19
19
  };
20
+ /**
21
+ * The source URL the app `folder` under `root` is taken from, as its `app.ts` names it; an error
22
+ * saying why there is none: no such app, its `app.ts` does not load or is not `defineApp({ source })`
23
+ * (what is wrong, where), or it names none (the company's own app).
24
+ */
25
+ export declare function appSourceOf(root: string, folder: string): string;
20
26
  /**
21
27
  * Each import, from a file under one app's folder, of a file under another's, at its place: a
22
28
  * warning, since a company may take one app without the other. Static imports, re-exports and
package/dist/apps.js CHANGED
@@ -5,7 +5,7 @@ import { childrenOf, readSource } from "./ast.js";
5
5
  import { exportsOf, loadModules } from "./load.js";
6
6
  import { stringValue } from "./outline.js";
7
7
  import { APPS_DIR, filesUnder, inside, isDirectory, RELATIVE, relPath } from "./paths.js";
8
- import { APP_NAME } from "./shared.js";
8
+ import { APP_NAME, problemLine } from "./shared.js";
9
9
  /** The apps under `root` (`appsAt`), without what is wrong with them. */
10
10
  export const readApps = (root) => appsAt(root).apps;
11
11
  /**
@@ -52,6 +52,23 @@ export function appsAt(root) {
52
52
  problems.sort((a, b) => a.file.localeCompare(b.file));
53
53
  return { apps, problems };
54
54
  }
55
+ /**
56
+ * The source URL the app `folder` under `root` is taken from, as its `app.ts` names it; an error
57
+ * saying why there is none: no such app, its `app.ts` does not load or is not `defineApp({ source })`
58
+ * (what is wrong, where), or it names none (the company's own app).
59
+ */
60
+ export function appSourceOf(root, folder) {
61
+ if (!APP_NAME.test(folder) || !isDirectory(join(root, APPS_DIR, folder)))
62
+ throw new Error(`There is no app ${APPS_DIR}/${folder}/`);
63
+ const file = `${APPS_DIR}/${folder}/app.ts`;
64
+ const path = join(root, file);
65
+ const read = existsSync(path) ? appDefinitionOf(file, loadModules(root, [path], [])) : { problems: [] };
66
+ if (read.problems.length)
67
+ throw new Error(read.problems.map(problemLine).join("; "));
68
+ if (read.source === undefined)
69
+ throw new Error(`${file} names no source: the app is the company's own`);
70
+ return read.source;
71
+ }
55
72
  /** What `app.ts`'s default export, `defineApp({ … })`, may say. */
56
73
  const AppDefinitionSchema = z.strictObject({ source: z.string().optional() });
57
74
  /** `app.ts`'s `source`, as loading it gave, and what is wrong there; nothing for no file. */
package/dist/apps.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"apps.js","sourceRoot":"","sources":["../src/apps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAa,UAAU,EAAE,MAAM,UAAU,CAAC;AAE7D,OAAO,EAAE,SAAS,EAAe,WAAW,EAAE,MAAM,WAAW,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1F,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAYvC,yEAAyE;AACzE,MAAM,CAAC,M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,CAAC,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;oBAC/E,IAAI,KAAK,EAAE,CAAC;wBACV,QAAQ,CAAC,IAAI,CAAC;4BACZ,IAAI,EAAE,GAAG;4BACT,GAAG,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC;4BACtB,OAAO,EAAE,YAAY,SAAS,kBAAkB,KAAK,CAAC,IAAI,wBAAwB,GAAG,CAAC,IAAI,qDAAqD;yBAChJ,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;gBACD,KAAK,MAAM,KAAK,IAAI,UAAU,CAAC,IAAI,CAAC;oBAAE,KAAK,CAAC,KAAK,CAAC,CAAC;YACrD,CAAC,CAAC;YACF,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -1,5 +1,31 @@
1
1
  import type { z } from "zod";
2
+ import type { CallContext } from "./op.ts";
2
3
  import { type SecretStoreCapabilities } from "./secret-store.ts";
4
+ /** Facts verified with the provider, not account claims supplied by the caller. */
5
+ export interface AuthenticationIdentity {
6
+ account: string;
7
+ scopes: readonly string[];
8
+ /** Unix time in milliseconds. Missing means the provider gives no expiry. */
9
+ expiresAt?: number;
10
+ }
11
+ export type AuthenticationProblem = "missing" | "expired" | "revoked" | "rejected" | "wrong_account" | "scope_changed" | "uncertain" | "unavailable" | "unsupported";
12
+ /** Safe lifecycle information only: never a provider response, cause or credential. */
13
+ export declare class AuthenticationError extends Error {
14
+ readonly code = "authentication_failed";
15
+ readonly retryable: boolean;
16
+ readonly problem: AuthenticationProblem;
17
+ constructor(problem: AuthenticationProblem);
18
+ }
19
+ export declare function authenticationProblem(error: unknown): AuthenticationProblem | undefined;
20
+ /** Shared by credential intake and execution; unknown provider failures never imply revocation. */
21
+ export declare function verifyAuthentication(method: Authentication, credentials?: unknown): Promise<AuthenticationIdentity>;
22
+ /** Ephemeral material for one authorized driver invocation; never checkpoint this object. */
23
+ export interface CallAuthentication {
24
+ method: string;
25
+ kind: Authentication["kind"];
26
+ credentialVersion?: string;
27
+ credentials?: unknown;
28
+ }
3
29
  /** Credential schemas and lifecycle are owned by authentication, never by the store provider. */
4
30
  export type Authentication<S extends z.ZodType = z.ZodType> = {
5
31
  kind: "api-key" | "fields" | "oauth2" | "signed";
@@ -10,13 +36,17 @@ export type Authentication<S extends z.ZodType = z.ZodType> = {
10
36
  maxBytes: number;
11
37
  conditionalWrites: boolean;
12
38
  };
39
+ verify?(credentials: z.output<S>): Promise<AuthenticationIdentity>;
13
40
  } | {
14
41
  kind: "workload-identity";
15
42
  storage?: never;
16
43
  version?: never;
17
44
  schema?: never;
45
+ verify?(): Promise<AuthenticationIdentity>;
18
46
  };
19
47
  export declare function defineAuthentication<S extends z.ZodType>(definition: Authentication<S>): Authentication<S>;
48
+ /** Typed access inside a driver. A missing or different method never falls back to the environment. */
49
+ export declare function authenticationCredentials<S extends z.ZodType>(method: string, definition: Authentication<S>, call: CallContext): z.output<S>;
20
50
  /** Compatibility check before consent, including externally renewed (read-only) OAuth bundles. */
21
51
  export declare function checkAuthenticationStore(auth: Authentication, store: SecretStoreCapabilities, management: "sanoma" | "external"): void;
22
52
  /** Serialized only at the trusted store boundary, never returned by an operation to a workflow. */
@@ -1,9 +1,66 @@
1
1
  import { SecretStoreError } from "./secret-store.js";
2
+ /** Safe lifecycle information only: never a provider response, cause or credential. */
3
+ export class AuthenticationError extends Error {
4
+ code = "authentication_failed";
5
+ retryable;
6
+ problem;
7
+ constructor(problem) {
8
+ super(`Authentication: ${problem}`);
9
+ this.problem = problem;
10
+ this.name = "AuthenticationError";
11
+ this.retryable = problem === "unavailable";
12
+ }
13
+ }
14
+ const authenticationProblems = new Set([
15
+ "missing",
16
+ "expired",
17
+ "revoked",
18
+ "rejected",
19
+ "wrong_account",
20
+ "scope_changed",
21
+ "uncertain",
22
+ "unavailable",
23
+ "unsupported",
24
+ ]);
25
+ export function authenticationProblem(error) {
26
+ const failure = error;
27
+ return failure?.name === "AuthenticationError" && authenticationProblems.has(failure.problem)
28
+ ? failure.problem
29
+ : undefined;
30
+ }
31
+ /** Shared by credential intake and execution; unknown provider failures never imply revocation. */
32
+ export async function verifyAuthentication(method, credentials) {
33
+ if (!method.verify)
34
+ throw new AuthenticationError("unsupported");
35
+ try {
36
+ const identity = await method.verify(credentials);
37
+ if (typeof identity?.account !== "string" ||
38
+ !identity.account.trim() ||
39
+ !Array.isArray(identity.scopes) ||
40
+ identity.scopes.some((scope) => typeof scope !== "string") ||
41
+ (identity.expiresAt !== undefined && !Number.isFinite(identity.expiresAt)))
42
+ throw new AuthenticationError("unavailable");
43
+ if (identity.expiresAt !== undefined && identity.expiresAt <= Date.now())
44
+ throw new AuthenticationError("expired");
45
+ return {
46
+ account: identity.account,
47
+ scopes: [...new Set(identity.scopes)].toSorted(),
48
+ ...(identity.expiresAt !== undefined && { expiresAt: identity.expiresAt }),
49
+ };
50
+ }
51
+ catch (error) {
52
+ // Structural recognition works across installed copies. Rebuild even recognized errors so
53
+ // an SDK message, stack or cause attached by a verifier cannot cross this boundary.
54
+ throw new AuthenticationError(authenticationProblem(error) ?? "unavailable");
55
+ }
56
+ }
2
57
  export function defineAuthentication(definition) {
58
+ if (definition.verify !== undefined && typeof definition.verify !== "function")
59
+ throw new SecretStoreError("invalid_configuration");
3
60
  if (definition.kind === "workload-identity") {
4
61
  if (definition.storage !== undefined || definition.schema !== undefined || definition.version !== undefined)
5
62
  throw new SecretStoreError("invalid_configuration");
6
- return Object.freeze({ kind: "workload-identity" });
63
+ return Object.freeze({ ...definition });
7
64
  }
8
65
  if (!["api-key", "fields", "oauth2", "signed"].includes(definition.kind) ||
9
66
  !Number.isSafeInteger(definition.version) ||
@@ -18,6 +75,19 @@ export function defineAuthentication(definition) {
18
75
  }
19
76
  return Object.freeze({ ...definition, storage: Object.freeze({ ...definition.storage }) });
20
77
  }
78
+ /** Typed access inside a driver. A missing or different method never falls back to the environment. */
79
+ export function authenticationCredentials(method, definition, call) {
80
+ if (definition.kind === "workload-identity" ||
81
+ call.authentication?.method !== method ||
82
+ call.authentication.kind !== definition.kind)
83
+ throw new SecretStoreError("unsupported");
84
+ try {
85
+ return definition.schema.parse(call.authentication.credentials);
86
+ }
87
+ catch {
88
+ throw new SecretStoreError("invalid_value");
89
+ }
90
+ }
21
91
  /** Compatibility check before consent, including externally renewed (read-only) OAuth bundles. */
22
92
  export function checkAuthenticationStore(auth, store, management) {
23
93
  if (auth.kind === "workload-identity")
@@ -1 +1 @@
1
- {"version":3,"file":"authentication.js","sourceRoot":"","sources":["../src/authentication.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAgC,MAAM,mBAAmB,CAAC;AAYnF,MAAM,UAAU,oBAAoB,CAAsB,UAA6B;IACrF,IAAI,UAAU,CAAC,IAAI,KAAK,mBAAmB,EAAE,CAAC;QAC5C,IAAI,UAAU,CAAC,OAAO,KAAK,SAAS,IAAI,UAAU,CAAC,MAAM,KAAK,SAAS,IAAI,UAAU,CAAC,OAAO,KAAK,SAAS;YACzG,MAAM,IAAI,gBAAgB,CAAC,uBAAuB,CAAC,CAAC;QACtD,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAC,CAAC;IACtD,CAAC;IACD,IACE,CAAC,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC;QACpE,CAAC,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,OAAO,CAAC;QACzC,UAAU,CAAC,OAAO,GAAG,CAAC;QACtB,OAAO,UAAU,CAAC,MAAM,EAAE,SAAS,KAAK,UAAU;QAClD,CAAC,UAAU,CAAC,OAAO;QACnB,CAAC,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC;QAClD,UAAU,CAAC,OAAO,CAAC,QAAQ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,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAC9C,CAAC;AACH,CAAC"}
package/dist/call.js CHANGED
@@ -339,14 +339,15 @@ async function callOp(run, id, input, place, ref) {
339
339
  // before the step is recorded asks again.
340
340
  const connection = await DBOS.runStep(async () => {
341
341
  if (run.sandbox !== undefined) {
342
- if (ref)
343
- throw new SanomaError("invalid_input", "Named sandbox connections require explicit fake account state");
344
- return undefined;
342
+ if (!run.fakeConnection)
343
+ throw new SanomaError("invalid_input", "Sandbox account state is unavailable");
344
+ return run.fakeConnection(op.vendor, ref);
345
345
  }
346
346
  return run.state.connections?.select(op.vendor, ref, run.actor.id);
347
347
  }, { name: `connection:${op.id}` });
348
348
  const decideStep = () => DBOS.runStep(async () => {
349
- await run.state.connections?.assertCurrent(connection, run.actor.id);
349
+ if (run.sandbox === undefined)
350
+ await run.state.connections?.assertCurrent(connection, run.actor.id);
350
351
  return decide(run, op, parsed, connection);
351
352
  }, { name: `policy:${op.id}` });
352
353
  let decision = await decideStep();
@@ -401,7 +402,8 @@ async function callOp(run, id, input, place, ref) {
401
402
  result = await DBOS.runStep(async () => {
402
403
  const at = Date.now();
403
404
  attempt = DBOS.stepStatus?.currentAttempt ?? 1;
404
- await run.state.connections?.assertCurrent(connection, run.actor.id);
405
+ if (run.sandbox === undefined)
406
+ await run.state.connections?.assertCurrent(connection, run.actor.id);
405
407
  const secrets = secretsOf(run);
406
408
  const context = {
407
409
  idempotencyKey: `${run.id}:${seq}`,
package/dist/call.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"call.js","sourceRoot":"","sources":["../src/call.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,yBAAyB,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAwB,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EACL,UAAU,EAIV,qBAAq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