@sanoma-ai/workflows 0.7.0 → 0.7.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.
- package/README.md +9 -5
- package/dist/config.d.ts +31 -6
- package/dist/config.js +36 -10
- package/dist/config.js.map +1 -1
- package/dist/constructors.d.ts +37 -1
- package/dist/constructors.js +6 -2
- package/dist/constructors.js.map +1 -1
- package/dist/db.d.ts +9 -21
- package/dist/db.js +16 -54
- package/dist/db.js.map +1 -1
- package/dist/deadlines.d.ts +13 -10
- package/dist/deadlines.js +18 -24
- package/dist/deadlines.js.map +1 -1
- package/dist/fake.d.ts +26 -0
- package/dist/fake.js +123 -0
- package/dist/fake.js.map +1 -1
- package/dist/host.d.ts +2 -3
- package/dist/host.js +1 -1
- package/dist/host.js.map +1 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.js +2 -4
- package/dist/index.js.map +1 -1
- package/dist/lint.js +1 -1
- package/dist/lint.js.map +1 -1
- package/dist/op.d.ts +8 -1
- package/dist/op.js.map +1 -1
- package/dist/person.d.ts +5 -0
- package/dist/person.js +3 -1
- package/dist/person.js.map +1 -1
- package/dist/resources.js +5 -3
- package/dist/resources.js.map +1 -1
- package/dist/source.d.ts +124 -0
- package/dist/source.js +9 -0
- package/dist/source.js.map +1 -1
- package/dist/supervisor.d.ts +5 -4
- package/dist/supervisor.js +2 -11
- package/dist/supervisor.js.map +1 -1
- package/dist/wakeup-driver.d.ts +128 -0
- package/dist/wakeup-driver.js +216 -0
- package/dist/wakeup-driver.js.map +1 -0
- package/dist/wakeup-service.d.ts +4 -4
- package/dist/wakeup-service.js +19 -25
- package/dist/wakeup-service.js.map +1 -1
- package/dist/wakeup-type.d.ts +43 -0
- package/dist/wakeup-type.js +80 -0
- package/dist/wakeup-type.js.map +1 -0
- package/dist/wakeup.d.ts +1 -8
- package/dist/wakeup.js +2 -11
- package/dist/wakeup.js.map +1 -1
- package/dist/worker.d.ts +2 -2
- package/dist/worker.js +1 -5
- package/dist/worker.js.map +1 -1
- package/oxlint.json +1 -0
- package/package.json +3 -1
- package/src/config.ts +45 -14
- package/src/constructors.ts +8 -2
- package/src/db.ts +16 -66
- package/src/deadlines.ts +22 -28
- package/src/fake.ts +137 -0
- package/src/host.ts +3 -4
- package/src/index.ts +8 -3
- package/src/lint.ts +1 -1
- package/src/op.ts +8 -1
- package/src/person.ts +4 -1
- package/src/resources.ts +5 -3
- package/src/source.ts +118 -0
- package/src/supervisor.ts +7 -12
- package/src/wakeup-driver.ts +270 -0
- package/src/wakeup-service.ts +21 -28
- package/src/wakeup-type.ts +90 -0
- package/src/wakeup.ts +6 -17
- package/src/worker.ts +3 -7
package/README.md
CHANGED
|
@@ -57,6 +57,8 @@ A connector that signs visitors in to a public site attaches a login half too, a
|
|
|
57
57
|
|
|
58
58
|
A model connector attaches a model half, as `model`: `withSetup(connector, { model: (context) => provider })`, an AI SDK provider (`ProviderV4` from `@ai-sdk/provider`) with the vendor's adapter as the transport. The app makes it for its model registry, once per resolved config and client (again after one that throws), where its models are `<vendor>/<model-id>`; it answers `languageModel("default")` with the connector's own default. Its `ModelContext` gives it the secrets as a login's does (the environment's, then the stored credentials), which it reads when a model is called, so a key set on the connector page is used without a restart (unless the environment sets one, which wins); its driver declares the key in `env`, with no operations if it needs none. One vendor's connectors attach one `model`. [`@sanoma-ai/connector-anthropic`](https://www.npmjs.com/package/@sanoma-ai/connector-anthropic) is one.
|
|
59
59
|
|
|
60
|
+
A git host's connector attaches a remote half, as `remote`: `withSetup(connector, { remote: () => half })`, a `RemoteHalf` made once per resolved config and kept in `ResolvedConfig.remotes` by vendor; `remoteFor(remotes, url)` finds the one whose `matches` reads a clone URL, with the repository. `open(repo, { secrets })` gives a `SourceHost`: the repository's pull requests (find, open, squash-merge at a head, close), the `sanoma` commit status, and `enforcement(base)`, whether the host refuses a change to the branch that is not a merge (`HostEnforcement`); its `token(prefer)` is what a push signs in with. `webhook(request, { secrets })` verifies a delivery and says what happened (`RemoteEvent`: a branch pushed, a pull request closed). It reads its tokens through `secrets` when called, as a model half does. One vendor's connectors attach one `remote`. [`@sanoma-ai/connector-github`](https://www.npmjs.com/package/@sanoma-ai/connector-github#remote-half) is one.
|
|
61
|
+
|
|
60
62
|
A config names the workflows and the connectors:
|
|
61
63
|
|
|
62
64
|
```ts
|
|
@@ -407,19 +409,21 @@ This package knows nothing of OpenTofu. Resource types from an OpenTofu provider
|
|
|
407
409
|
|
|
408
410
|
### Hosts
|
|
409
411
|
|
|
410
|
-
A host is a resource type that runs the company (a container, a Render service, a Fly app): `defineResource({ …, writable: true, host })`, where `host` (`HostSpec`) says where the type takes the runtime's inputs, by dotted path into its fields (`inputs: { source, ref, secrets, port, domains? }`, `secrets` a write-only field; `domains`, when the type takes it, a public site's domain by site name, which the host hands the app as `SANOMA_DOMAINS` and `describeConfig` reports a problem for, at the declaration, when it names a site that is not public or gives one domain two sites: `sanoma.example is the domain of both www and docs`), which field apply fills with the commit (`revision`, which a data file may not declare: it names a branch, never a commit), what it can do (`capabilities: { lifetime, publicUrl, buildsFromGit, staticEgress }`, `lifetime` `long-lived
|
|
412
|
+
A host is a resource type that runs the company (a container, a Render service, a Fly app): `defineResource({ …, writable: true, host })`, where `host` (`HostSpec`) says where the type takes the runtime's inputs, by dotted path into its fields (`inputs: { source, ref, secrets, port, domains? }`, `secrets` a write-only field; `domains`, when the type takes it, a public site's domain by site name, which the host hands the app as `SANOMA_DOMAINS` and `describeConfig` reports a problem for, at the declaration, when it names a site that is not public or gives one domain two sites: `sanoma.example is the domain of both www and docs`), which field apply fills with the commit (`revision`, which a data file may not declare: it names a branch, never a commit), what it can do (`capabilities: { lifetime, publicUrl, buildsFromGit, staticEgress }`, `lifetime` `long-lived` or `stops-when-quiet`, `HostLifetime`), and how its state reads (`outputs(state) → { url, revision?, healthy }`). `defineResource` refuses a `host` that names no field, or whose `secrets` is not write-only. A write-only field may be a map of secrets (`secrets: { SANOMA_DATABASE_URL: secret("DATABASE_URL") }`): its markers are kept as one at the field is. A host type is `stateless` (a `ResourceSpec` field, default true for a host): its objects keep no data, so replacing or recreating one is routine. `source` is a clone URL, or a reference to a declared repository with a `by` field holding one.
|
|
411
413
|
|
|
412
414
|
A config whose connectors declare a host type has the built-in operation `sanoma.source.resolve` (`SOURCE_RESOLVE`, effect `read`): `{ url, ref } → { revision }`, by `git ls-remote` on this machine (a branch, then a tag, peeled; a full commit id is itself). Apply calls it for each host it plans, and gives the host the commit as its `revision` and the clone URL as its `source` (a referenced repository's, from its `by` field); a host whose ref does not resolve, or whose repository has no clone URL yet (apply the repository first), is a problem of the plan. The drift run calls it for every host it reads. A host's `secrets` map may name sanoma's own secrets (`SANOMA_…`), and no other field of any type may. `resolveRevision(url, ref)` is the same, outside a run.
|
|
413
415
|
|
|
414
|
-
A wakeup is a resource type that starts a stopped instance at a time, for what is due while its host is stopped: `defineResource({ …, writable: true, wakeup })`, where `wakeup` (`WakeupSpec`) names the field that references the host (`inputs.host`), the type's own operation the runtime registers each deadline through (`register`, called with `{ at
|
|
416
|
+
A wakeup is a resource type that starts a stopped instance at a time, for what is due while its host is stopped: `defineResource({ …, writable: true, wakeup })`, where `wakeup` (`WakeupSpec`) names the field that references the host (`inputs.host`), the type's own operation the runtime registers each deadline through (`register`, called with `{ at }`, which replaces whatever the wakeup held) and how its state reads (`outputs(state) → { healthy }`); `defineResource` and `resolveConfig` refuse one that does not meet it. Declaring one in a data file is the switch, with no mode flag: `declaredWakeup(config)` reads it, and several are a problem of the data files. A wake is `GET {url}/wake`, with no query: resume if stopped. A config with `wakeup: true` runs the wakeup service itself and must not stop, so `startWorker` refuses it beside a declared wakeup.
|
|
417
|
+
|
|
418
|
+
A config whose connectors declare a host type also has the runtime's own wakeup, `sanoma.wakeup({ host })` (`import { sanoma } from "sanoma/resources"` in a data file), no connector named: an instance of a [wakeup service](#the-wakeup-service) for a `cloudflare.container`, `docker.container` or `testhost.app`, the fallback for a host with no clock of its own (a host's own vendor's wakeup comes first). Its driver creates, reads and deletes the instance at `SANOMA_WAKEUP_URL` with the account's `SANOMA_WAKEUP_ACCOUNT_TOKEN`, registering the instance's own `SANOMA_WAKEUP_TOKEN`, and `sanoma.wakeup.register` sends `PUT {url}/wakeup/wake { at }` with that token; `fakeSanomaWakeup()` from `@sanoma-ai/workflows/fake` is the service in memory, which sends `GET {host}/wake` at `at`.
|
|
415
419
|
|
|
416
|
-
A worker whose data files declare a wakeup, started with `onStopped` (whoever starts the next one; without it the worker never stops), stops itself when nothing it would run can run soon. Every 15 s (`stopCheckMs`) it asks `worker.idle()`: no run is executing or replaying; none of its version is queued, on its queue or on DBOS's own, where recovery puts runs; every unfinished run of its version is blocked in a `ctx.sleep` or a `ctx.approval`; and the next deadline (the earliest sleep's end, or a source added with `worker.deadlines.addSource`, such as a schedule's next fire) is more than `idleHorizonMs` away (60 s), so short waits never stop it. An approval has no deadline: its decision comes from a request, which starts the worker. Runs of another version or queue are not this worker's and never keep it up. The worker
|
|
420
|
+
A worker whose data files declare a wakeup, started with `onStopped` (whoever starts the next one; without it the worker never stops), stops itself when nothing it would run can run soon. Every 15 s (`stopCheckMs`) it asks `worker.idle()`: no run is executing or replaying; none of its version is queued, on its queue or on DBOS's own, where recovery puts runs; every unfinished run of its version is blocked in a `ctx.sleep` or a `ctx.approval`; and the next deadline (the earliest sleep's end, or a source added with `worker.deadlines.addSource`, such as a schedule's next fire) is more than `idleHorizonMs` away (60 s), so short waits never stop it. An approval has no deadline: its decision comes from a request, which starts the worker. Runs of another version or queue are not this worker's and never keep it up. The worker registers the next deadline through the wakeup type's `register` (`{ at }` as the agent `wakeup`, idempotency key `wakeup:<binding or declaration id>:<uuid>`, fresh per registration so a repeated `at` re-arms, no ledger record), replacing what the wakeup held, records `at` and `stopped_at` on the `sanoma_wakeup` row, stops, and calls `onStopped({ at })`; with no deadline at all it registers nothing. A failed registration is recorded as `last_error` and logged, and the worker keeps running and tries again at the next check.
|
|
417
421
|
|
|
418
|
-
A stopped worker cannot launch again in its process, so whoever supervises it starts a fresh `startWorker(config)` on the next request, or when the wakeup calls
|
|
422
|
+
A stopped worker cannot launch again in its process, so whoever supervises it starts a fresh `startWorker(config)` on the next request, or when the wakeup calls `GET /wake`. A wake is resume if stopped: one that arrives for a registration replaced since starts at most a worker with nothing to do soon, which stops again. `superviseWorker(config, options)` is that supervisor, as `sanoma serve` runs it: one worker at a time, started with `onStopped` (its own `onStopped` hears each stop; `selfStop: false` gives none, so the worker never stops itself), and a fresh one on `resume()` (a write that needs one) or `wake()` once the last stopped itself, a no-op while one starts or runs; a write heard while one starts or runs may land after its last idle check, so a worker that stops after one starts again at once. `SanomaClient.connect(config, { onWrite })` calls `onWrite` right before each change a worker must run (a start, drift, apply and a held call among them, and a decision), never for a read: the app passes it, to resume its process's worker. Apply gives a declared wakeup its host's URL: its `inputs.host` field holds what the host's `outputs(state).url` says, from the host's state found in the run or made by it, where any other reference resolved `by` holds the binding id. The row holds `at`, the deadline last registered (null until one is), `stopped_at` and `last_error`. Every start costs each unfinished run of its version one of DBOS's recovery attempts, so the runtime raises them from DBOS's 100 to 100,000; and a `ctx.sleep` for a duration takes its start from DBOS's clock, so a recovered run keeps the deadline it registered.
|
|
419
423
|
|
|
420
424
|
#### The wakeup service
|
|
421
425
|
|
|
422
|
-
`startWakeupService({ databaseUrl, now?, fetch?, log? })` from `@sanoma-ai/workflows/wakeup-service` (server-side only, refused in workflow files like `/scenario`) is the service a wakeup type registers with: `sanoma wakeup` runs it, and `sanoma serve` does with `wakeup: true` ([the sanoma package](../sanoma/README.md#the-wakeup-service) says how an instance registers). It makes its two tables in `databaseUrl` (and the database, when missing) and returns `{ routes, mintAccount(label), revokeAccount(id), stop() }`: `routes` is one route answering everything under `/wakeup` (a body over 64 KiB is a 413), the shape of the app's `IngressRoute` with `prefix`, for `startApp`'s `ingress` or a server of your own; `mintAccount` returns `{ id, token }`, the token shown that once; `revokeAccount` refuses the account's token and its instances' and wakes them no more. One loop sleeps until the next registered `at` (at most 60 s, or until a `PUT` takes a registration), takes each due instance for 30 s (so two services on one database never call it twice), calls its `GET {url}/wake
|
|
426
|
+
`startWakeupService({ databaseUrl, now?, fetch?, log? })` from `@sanoma-ai/workflows/wakeup-service` (server-side only, refused in workflow files like `/scenario`) is the service a wakeup type registers with: `sanoma wakeup` runs it, and `sanoma serve` does with `wakeup: true` ([the sanoma package](../sanoma/README.md#the-wakeup-service) says how an instance registers). It makes its two tables in `databaseUrl` (and the database, when missing) and returns `{ routes, mintAccount(label), revokeAccount(id), stop() }`: `routes` is one route answering everything under `/wakeup` (a body over 64 KiB is a 413), the shape of the app's `IngressRoute` with `prefix`, for `startApp`'s `ingress` or a server of your own; `mintAccount` returns `{ id, token }`, the token shown that once; `revokeAccount` refuses the account's token and its instances' and wakes them no more. One loop sleeps until the next registered `at` (at most 60 s, or until a `PUT` takes a registration), takes each due instance for 30 s (so two services on one database never call it twice), calls its `GET {url}/wake` with a 10 s timeout, eight at a time, and on anything but a 2xx (a redirect, which it never follows, among them) tries again after `min(2^attempts s, 5 min)`, never giving up. Each `PUT` replaces what the instance registered before, and a registration replaced during its call is called again. `stop` ends the loop, abandoning the calls in flight (called again once their 30 s lapse), and closes its pool. `mintWakeupAccount(databaseUrl, label)` mints an account without starting the service, for `sanoma wakeup account`. The service never mints an instance's token: `mintInstanceToken()` makes one (`swi_…`) for the company to keep, which it registers with `POST /wakeup/instances { url, token }`. `now` and `fetch` are for tests; `log` takes an `info` line per call and a `warn` per failure (the runtime's logger by default).
|
|
423
427
|
|
|
424
428
|
### Databases
|
|
425
429
|
|
package/dist/config.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { type Collection } from "./collection.ts";
|
|
2
2
|
import { type LazyPool } from "./db.ts";
|
|
3
3
|
import { type WorkflowDefinition } from "./define.ts";
|
|
4
|
-
import type
|
|
4
|
+
import { type Fake } from "./fake.ts";
|
|
5
5
|
import type { LedgerStore } from "./ledger.ts";
|
|
6
6
|
import { type Connector, type ConnectorSetup, type Driver, type DriverFn, type Op } from "./op.ts";
|
|
7
7
|
import { type CedarPolicySource } from "./cedar.ts";
|
|
8
8
|
import type { Policy } from "./policy.ts";
|
|
9
9
|
import { type Resource } from "./resource.ts";
|
|
10
|
+
import { type RemoteHalf } from "./source.ts";
|
|
10
11
|
import type { Steps } from "./steps.ts";
|
|
11
12
|
import { type DeclaredWakeup } from "./wakeup.ts";
|
|
12
13
|
/**
|
|
@@ -82,8 +83,8 @@ export interface ResolvedConfig {
|
|
|
82
83
|
queueName: string;
|
|
83
84
|
/**
|
|
84
85
|
* The operations the connectors declare, by id, the built-in `sanoma.change.*` (`changeOps`, in
|
|
85
|
-
* every config), `sanoma.source.resolve` when one declares a host type,
|
|
86
|
-
* (`data.<name>.<op>`).
|
|
86
|
+
* every config), `sanoma.source.resolve` and `sanoma.wakeup`'s when one declares a host type,
|
|
87
|
+
* and the collections' (`data.<name>.<op>`).
|
|
87
88
|
*/
|
|
88
89
|
ops: Map<string, Op>;
|
|
89
90
|
/** The drivers' functions, by operation id, each guarded by its driver's `env` (`indexDrivers`). */
|
|
@@ -109,9 +110,11 @@ export interface ResolvedConfig {
|
|
|
109
110
|
logins: ReadonlyMap<string, NonNullable<ConnectorSetup["login"]>>;
|
|
110
111
|
/** The makers of the model halves the connectors attach, by vendor id in `connectors` order: the app makes each once for its model registry. */
|
|
111
112
|
models: ReadonlyMap<string, NonNullable<ConnectorSetup["model"]>>;
|
|
113
|
+
/** The remote halves the connectors attach, made once for this resolution, by vendor id in `connectors` order: `remoteFor` finds a URL's. */
|
|
114
|
+
remotes: ReadonlyMap<string, RemoteHalf>;
|
|
112
115
|
/** `scenarios/` in `root`, as a `file:` URL, when that directory exists. */
|
|
113
116
|
scenarios?: URL;
|
|
114
|
-
/** The resource types the connectors declare, by `<vendor>.<type>`: what the drift workflow checks and scenarios seed. */
|
|
117
|
+
/** The resource types the connectors declare (and `sanoma.wakeup`, beside a host type), by `<vendor>.<type>`: what the drift workflow checks and scenarios seed. */
|
|
115
118
|
types: ReadonlyMap<string, Resource>;
|
|
116
119
|
/** The steps scenarios can use besides the generic ones: each connector's (`withSetup`), once each, then the config's own. */
|
|
117
120
|
steps: readonly Steps[];
|
|
@@ -184,13 +187,35 @@ export interface ResolveOptions {
|
|
|
184
187
|
* `startApp`, the `sanoma` bin when it loads the config.
|
|
185
188
|
*/
|
|
186
189
|
export declare function resolveConfig(config: SanomaConfig, options?: ResolveOptions): ResolvedConfig;
|
|
187
|
-
/**
|
|
190
|
+
/**
|
|
191
|
+
* `sanoma.wakeup`, the runtime's own: the type's operations and `sanoma.wakeup.register` (effect
|
|
192
|
+
* `write`), which the worker registers each deadline through before it stops, with its live
|
|
193
|
+
* driver (`sanomaWakeupDriver`), its fake (`fakeSanomaWakeup`) and its step. `withBuiltIns`
|
|
194
|
+
* merges it into every config with a host type.
|
|
195
|
+
*/
|
|
196
|
+
export declare const sanomaWakeup: Connector<"sanoma", {
|
|
197
|
+
wakeup: (typeof import("./wakeup-type.ts").wakeup)["ops"] & {
|
|
198
|
+
register: {
|
|
199
|
+
effect: "write";
|
|
200
|
+
idempotent: true;
|
|
201
|
+
description: string;
|
|
202
|
+
input: import("zod").ZodObject<{
|
|
203
|
+
at: import("zod").ZodISODateTime;
|
|
204
|
+
}, import("zod/v4/core").$strip>;
|
|
205
|
+
output: import("zod").ZodObject<{}, import("zod/v4/core").$strip>;
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
}>;
|
|
209
|
+
/**
|
|
210
|
+
* The config's connectors (with `sanoma.wakeup` when they declare a host type) and the runtime's
|
|
211
|
+
* people types' (`peopleConnector`): what its data files are read against.
|
|
212
|
+
*/
|
|
188
213
|
export declare const connectorsOf: (config: Pick<SanomaConfig, "connectors">) => Connector<any, any>[];
|
|
189
214
|
/**
|
|
190
215
|
* The one wakeup the config's data files declare, or undefined: with none, and with one the reader
|
|
191
216
|
* leaves out for a problem (its declaration's or its host's; several wakeups are each one).
|
|
192
217
|
* Undefined means the instance has no wakeup, so it must not stop. Server-side: it reads the data
|
|
193
|
-
* files and the lockfile, only when
|
|
218
|
+
* files and the lockfile, only when the config has a wakeup type (`sanoma.wakeup` beside any host type).
|
|
194
219
|
*/
|
|
195
220
|
export declare function declaredWakeup(config: SanomaConfig): Promise<DeclaredWakeup | undefined>;
|
|
196
221
|
/**
|
package/dist/config.js
CHANGED
|
@@ -11,8 +11,9 @@ import { lazyPool } from "./db.js";
|
|
|
11
11
|
import { callerFile } from "./define.js";
|
|
12
12
|
import { DRIFT_WORKFLOW, driftWorkflow } from "./drift.js";
|
|
13
13
|
import { statusesOf, unconfigured } from "./env.js";
|
|
14
|
+
import { fakeSanomaWakeup } from "./fake.js";
|
|
14
15
|
import { peopleConnector } from "./person.js";
|
|
15
|
-
import { DriverError, isOp, checkConnector, setupOf, VENDOR, } from "./op.js";
|
|
16
|
+
import { DriverError, isOp, checkConnector, setupOf, VENDOR, withSetup, } from "./op.js";
|
|
16
17
|
import { policyAt } from "./cedar.js";
|
|
17
18
|
import { resourceTypesOf, withoutWriteOnly } from "./resource.js";
|
|
18
19
|
import { APPLY_WORKFLOW, BUILT_IN_WORKFLOWS, CALL_WORKFLOW, DATA_VENDOR } from "./shared.js";
|
|
@@ -20,6 +21,8 @@ import { sourceDriver, sourceOps } from "./source.js";
|
|
|
20
21
|
import { checkSchedule } from "./schedules.js";
|
|
21
22
|
import { computeVersion } from "./version.js";
|
|
22
23
|
import { checkWakeupOps } from "./wakeup.js";
|
|
24
|
+
import { sanomaWakeupDriver, wakeupSteps } from "./wakeup-driver.js";
|
|
25
|
+
import { wakeupOps } from "./wakeup-type.js";
|
|
23
26
|
import { checkDatabaseOps } from "./database.js";
|
|
24
27
|
/**
|
|
25
28
|
* The database when neither the config nor `SANOMA_DATABASE_URL` names one: the dev Postgres
|
|
@@ -86,7 +89,9 @@ export function resolveConfig(config, options = {}) {
|
|
|
86
89
|
const root = rootOf(config);
|
|
87
90
|
const appName = appNameAt(root);
|
|
88
91
|
const scenarios = scenariosAt(root);
|
|
89
|
-
|
|
92
|
+
// With the built-in `sanoma.wakeup` when they declare a host type.
|
|
93
|
+
const running = withBuiltIns(config.connectors);
|
|
94
|
+
const types = resourceTypesOf(running);
|
|
90
95
|
// Built-in: `sanoma.source.resolve`, which apply and drift call for a host's revision.
|
|
91
96
|
const hosts = [...types.values()].some((type) => type.host);
|
|
92
97
|
// Built-in: the collections' operations, `data.<name>.<op>`, on the config's database.
|
|
@@ -95,18 +100,18 @@ export function resolveConfig(config, options = {}) {
|
|
|
95
100
|
const dataStore = declared.length ? lazyPool(databaseUrl, "data") : undefined;
|
|
96
101
|
// Built-in, in every config: a change's operations, which the template's policy names (`sanoma.change.merge`).
|
|
97
102
|
const ops = indexConnectors([
|
|
98
|
-
...
|
|
103
|
+
...running,
|
|
99
104
|
changeOps,
|
|
100
105
|
...(hosts ? [sourceOps] : []),
|
|
101
106
|
...(dataStore ? [collectionsConnector(declared)] : []),
|
|
102
107
|
]);
|
|
103
108
|
checkWakeupOps(types, ops);
|
|
104
109
|
checkDatabaseOps(types, ops);
|
|
105
|
-
const fakes = makersOf(
|
|
106
|
-
const instanceFakes = options.fakes === "instance" ? instanceFakesOf(
|
|
110
|
+
const fakes = makersOf(running, "fake");
|
|
111
|
+
const instanceFakes = options.fakes === "instance" ? instanceFakesOf(running, fakes) : undefined;
|
|
107
112
|
const driversByVendor = instanceFakes
|
|
108
113
|
? new Map([...instanceFakes].map(([vendor, fake]) => [vendor, fake.driver]))
|
|
109
|
-
: new Map([...makersOf(
|
|
114
|
+
: new Map([...makersOf(running, "driver")].map(([vendor, make]) => [vendor, make()]));
|
|
110
115
|
const drivers = indexDrivers([
|
|
111
116
|
...driversByVendor.values(),
|
|
112
117
|
changeDriver(),
|
|
@@ -155,9 +160,10 @@ export function resolveConfig(config, options = {}) {
|
|
|
155
160
|
...(instanceFakes && { instanceFakes }),
|
|
156
161
|
logins: makersOf(config.connectors, "login"),
|
|
157
162
|
models: makersOf(config.connectors, "model"),
|
|
163
|
+
remotes: new Map([...makersOf(config.connectors, "remote")].map(([vendor, make]) => [vendor, make()])),
|
|
158
164
|
...(scenarios && { scenarios }),
|
|
159
165
|
types,
|
|
160
|
-
steps: [...new Set([...
|
|
166
|
+
steps: [...new Set([...running.flatMap((c) => setupOf(c).steps ?? []), ...(config.steps ?? [])])],
|
|
161
167
|
collections,
|
|
162
168
|
...(dataStore && { dataStore }),
|
|
163
169
|
workflows: names,
|
|
@@ -191,9 +197,29 @@ function collectionsOf(config) {
|
|
|
191
197
|
}
|
|
192
198
|
return collections;
|
|
193
199
|
}
|
|
194
|
-
/**
|
|
200
|
+
/**
|
|
201
|
+
* `sanoma.wakeup`, the runtime's own: the type's operations and `sanoma.wakeup.register` (effect
|
|
202
|
+
* `write`), which the worker registers each deadline through before it stops, with its live
|
|
203
|
+
* driver (`sanomaWakeupDriver`), its fake (`fakeSanomaWakeup`) and its step. `withBuiltIns`
|
|
204
|
+
* merges it into every config with a host type.
|
|
205
|
+
*/
|
|
206
|
+
export const sanomaWakeup = withSetup(wakeupOps, {
|
|
207
|
+
driver: sanomaWakeupDriver,
|
|
208
|
+
fake: fakeSanomaWakeup,
|
|
209
|
+
steps: wakeupSteps,
|
|
210
|
+
});
|
|
211
|
+
/**
|
|
212
|
+
* The connectors and, when they declare a host type, the runtime's own wakeup (`sanoma.wakeup`),
|
|
213
|
+
* the fallback for a host with no clock of its own: what a config runs on. The same array when
|
|
214
|
+
* they declare none.
|
|
215
|
+
*/
|
|
216
|
+
const withBuiltIns = (connectors) => [...resourceTypesOf(connectors).values()].some((type) => type.host) ? [...connectors, sanomaWakeup] : connectors;
|
|
217
|
+
/**
|
|
218
|
+
* The config's connectors (with `sanoma.wakeup` when they declare a host type) and the runtime's
|
|
219
|
+
* people types' (`peopleConnector`): what its data files are read against.
|
|
220
|
+
*/
|
|
195
221
|
export const connectorsOf = (config) => [
|
|
196
|
-
...config.connectors,
|
|
222
|
+
...withBuiltIns(config.connectors),
|
|
197
223
|
peopleConnector,
|
|
198
224
|
];
|
|
199
225
|
/**
|
|
@@ -259,7 +285,7 @@ function scenariosAt(root) {
|
|
|
259
285
|
* The one wakeup the config's data files declare, or undefined: with none, and with one the reader
|
|
260
286
|
* leaves out for a problem (its declaration's or its host's; several wakeups are each one).
|
|
261
287
|
* Undefined means the instance has no wakeup, so it must not stop. Server-side: it reads the data
|
|
262
|
-
* files and the lockfile, only when
|
|
288
|
+
* files and the lockfile, only when the config has a wakeup type (`sanoma.wakeup` beside any host type).
|
|
263
289
|
*/
|
|
264
290
|
export async function declaredWakeup(config) {
|
|
265
291
|
const connectors = connectorsOf(config);
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAsB,aAAa,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EAEL,oBAAoB,EACpB,iBAAiB,EACjB,eAAe,EACf,YAAY,GACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAiB,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,UAAU,EAAqC,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,Y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,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,yDAAyD,CAAC,CAAC;QACrF,CAAC;IACH,CAAC;IACD,IAAI,QAAQ,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,aAAa,EAAE,CAAC,IAAI,MAAM,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxF,CAAC"}
|
package/dist/constructors.d.ts
CHANGED
|
@@ -1,2 +1,38 @@
|
|
|
1
1
|
export { secret, type Secret } from "./secret.ts";
|
|
2
|
-
|
|
2
|
+
/** The runtime's own constructors: the people types' and the wakeup's. */
|
|
3
|
+
export declare const sanoma: {
|
|
4
|
+
person: import("./resource.ts").Resource<import("zod").ZodObject<{
|
|
5
|
+
id: import("zod").ZodString;
|
|
6
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
7
|
+
email: import("zod").ZodOptional<import("zod").ZodEmail>;
|
|
8
|
+
github: import("zod").ZodOptional<import("zod").ZodString>;
|
|
9
|
+
}, import("zod/v4/core").$strip>, "sanoma.person", {}, false>;
|
|
10
|
+
agent: import("./resource.ts").Resource<import("zod").ZodObject<{
|
|
11
|
+
id: import("zod").ZodString;
|
|
12
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
13
|
+
onBehalfOf: import("zod").ZodOptional<import("zod").ZodString>;
|
|
14
|
+
}, import("zod/v4/core").$strip>, "sanoma.agent", {
|
|
15
|
+
readonly onBehalfOf: {
|
|
16
|
+
readonly type: "sanoma.person";
|
|
17
|
+
};
|
|
18
|
+
}, false>;
|
|
19
|
+
group: import("./resource.ts").Resource<import("zod").ZodObject<{
|
|
20
|
+
name: import("zod").ZodString;
|
|
21
|
+
members: import("zod").ZodArray<import("zod").ZodString>;
|
|
22
|
+
}, import("zod/v4/core").$strip>, "sanoma.group", {
|
|
23
|
+
readonly members: {
|
|
24
|
+
readonly type: readonly ["sanoma.person", "sanoma.agent"];
|
|
25
|
+
};
|
|
26
|
+
}, false>;
|
|
27
|
+
wakeup: import("./resource.ts").Resource<import("zod").ZodObject<{
|
|
28
|
+
host: import("zod").ZodString;
|
|
29
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
30
|
+
at: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
31
|
+
lastError: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
32
|
+
}, import("zod/v4/core").$strip>, "sanoma.wakeup", {
|
|
33
|
+
readonly host: {
|
|
34
|
+
readonly type: readonly ["cloudflare.container", "docker.container", "testhost.app"];
|
|
35
|
+
readonly by: readonly ["url"];
|
|
36
|
+
};
|
|
37
|
+
}, true>;
|
|
38
|
+
};
|
package/dist/constructors.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { sanoma as people } from "./person.js";
|
|
2
|
+
import { wakeup } from "./wakeup-type.js";
|
|
1
3
|
// `@sanoma-ai/workflows/resources`: what a data file imports from the runtime: `secret`, which
|
|
2
|
-
// names a stored secret, and `sanoma`, the constructors of its people types (`sanoma.person`, …)
|
|
4
|
+
// names a stored secret, and `sanoma`, the constructors of its people types (`sanoma.person`, …)
|
|
5
|
+
// and of its wakeup, `sanoma.wakeup({ host })`.
|
|
3
6
|
export { secret } from "./secret.js";
|
|
4
|
-
|
|
7
|
+
/** The runtime's own constructors: the people types' and the wakeup's. */
|
|
8
|
+
export const sanoma = { ...people, wakeup };
|
|
5
9
|
//# sourceMappingURL=constructors.js.map
|
package/dist/constructors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constructors.js","sourceRoot":"","sources":["../src/constructors.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,
|
|
1
|
+
{"version":3,"file":"constructors.js","sourceRoot":"","sources":["../src/constructors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,+FAA+F;AAC/F,iGAAiG;AACjG,gDAAgD;AAChD,OAAO,EAAE,MAAM,EAAe,MAAM,aAAa,CAAC;AAElD,0EAA0E;AAC1E,MAAM,CAAC,MAAM,MAAM,GAAG,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC"}
|
package/dist/db.d.ts
CHANGED
|
@@ -9,10 +9,9 @@ export declare const LEDGER_TABLE = "sanoma_ledger";
|
|
|
9
9
|
/** Where the collections keep their records (`collection.ts`): one row per collection and key, the record as JSON. */
|
|
10
10
|
export declare const DATA_TABLE = "sanoma_data";
|
|
11
11
|
/**
|
|
12
|
-
* The instance's side of its wakeup: one row, made with the table. `
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* the last registration failed.
|
|
12
|
+
* The instance's side of its wakeup: one row, made with the table. `at` is the deadline last
|
|
13
|
+
* registered, `stopped_at` when the worker last stopped itself (the schedules backfill from it),
|
|
14
|
+
* `last_error` why the last registration failed.
|
|
16
15
|
*/
|
|
17
16
|
export declare const WAKEUP_TABLE = "sanoma_wakeup";
|
|
18
17
|
/** The operator agent's chats (`chats.ts`): who each is for, its engine and its draft. */
|
|
@@ -71,20 +70,9 @@ export declare function connectMaking(databaseUrl: string): Promise<Client>;
|
|
|
71
70
|
* the same table both succeed; any other failure names the `what` table, with its cause.
|
|
72
71
|
*/
|
|
73
72
|
export declare function createTable(db: Db, ddl: string, what: string): Promise<void>;
|
|
74
|
-
/**
|
|
75
|
-
export declare function
|
|
76
|
-
/**
|
|
77
|
-
export declare function
|
|
78
|
-
/** Records that the
|
|
79
|
-
export declare function
|
|
80
|
-
/** Records why registering `generation` failed. */
|
|
81
|
-
export declare function recordWakeupError(db: Db, owner: string, generation: number, error: string): Promise<void>;
|
|
82
|
-
/** Records that the worker stops now, with `generation` registered. */
|
|
83
|
-
export declare function recordWakeupStop(db: Db, owner: string, generation: number): Promise<void>;
|
|
84
|
-
/**
|
|
85
|
-
* True when `generation` is the wakeup row's and the worker stopped with it: the wake
|
|
86
|
-
* `/wake?generation=N` asks for is the one the worker last registered before it stopped, not
|
|
87
|
-
* one a later stop replaced, nor one registered by a worker that then kept running. For the
|
|
88
|
-
* route's supervisor, which decides on its own what a wake means when no wakeup is declared.
|
|
89
|
-
*/
|
|
90
|
-
export declare function shouldWake(databaseUrl: string, generation: number): Promise<boolean>;
|
|
73
|
+
/** Records that the wakeup took `at`. */
|
|
74
|
+
export declare function recordWakeupRegistration(db: Db, at: string): Promise<void>;
|
|
75
|
+
/** Records why the last registration failed. */
|
|
76
|
+
export declare function recordWakeupError(db: Db, error: string): Promise<void>;
|
|
77
|
+
/** Records that the worker stops itself now. */
|
|
78
|
+
export declare function recordWakeupStop(db: Db): Promise<void>;
|
package/dist/db.js
CHANGED
|
@@ -10,10 +10,9 @@ export const LEDGER_TABLE = "sanoma_ledger";
|
|
|
10
10
|
/** Where the collections keep their records (`collection.ts`): one row per collection and key, the record as JSON. */
|
|
11
11
|
export const DATA_TABLE = "sanoma_data";
|
|
12
12
|
/**
|
|
13
|
-
* The instance's side of its wakeup: one row, made with the table. `
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* the last registration failed.
|
|
13
|
+
* The instance's side of its wakeup: one row, made with the table. `at` is the deadline last
|
|
14
|
+
* registered, `stopped_at` when the worker last stopped itself (the schedules backfill from it),
|
|
15
|
+
* `last_error` why the last registration failed.
|
|
17
16
|
*/
|
|
18
17
|
export const WAKEUP_TABLE = "sanoma_wakeup";
|
|
19
18
|
/** The operator agent's chats (`chats.ts`): who each is for, its engine and its draft. */
|
|
@@ -42,9 +41,8 @@ const TABLES = [
|
|
|
42
41
|
],
|
|
43
42
|
[
|
|
44
43
|
"wakeup",
|
|
45
|
-
`CREATE TABLE IF NOT EXISTS ${WAKEUP_TABLE} (id integer PRIMARY KEY CHECK (id = 1),
|
|
46
|
-
|
|
47
|
-
`last_error text); INSERT INTO ${WAKEUP_TABLE} (id) VALUES (1) ON CONFLICT (id) DO NOTHING`,
|
|
44
|
+
`CREATE TABLE IF NOT EXISTS ${WAKEUP_TABLE} (id integer PRIMARY KEY CHECK (id = 1), at timestamptz, ` +
|
|
45
|
+
`stopped_at timestamptz, last_error text); INSERT INTO ${WAKEUP_TABLE} (id) VALUES (1) ON CONFLICT (id) DO NOTHING`,
|
|
48
46
|
],
|
|
49
47
|
[
|
|
50
48
|
"chats",
|
|
@@ -275,54 +273,18 @@ export async function createTable(db, ddl, what) {
|
|
|
275
273
|
throw new Error(`could not prepare the ${what} table: ${errorMessage(err)}`, { cause: err });
|
|
276
274
|
}
|
|
277
275
|
}
|
|
278
|
-
// The wakeup row's
|
|
279
|
-
//
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
export async function claimWakeup(db, owner) {
|
|
284
|
-
await db.query(`UPDATE ${WAKEUP_TABLE} SET owner = $1, generation = generation + 1, at = NULL WHERE id = 1`, [owner]);
|
|
276
|
+
// The wakeup row's writes: one worker registers per instance (the supervisor runs one at a time,
|
|
277
|
+
// and a deploy stops the old container before the new one starts), so none names a worker.
|
|
278
|
+
/** Records that the wakeup took `at`. */
|
|
279
|
+
export async function recordWakeupRegistration(db, at) {
|
|
280
|
+
await db.query(`UPDATE ${WAKEUP_TABLE} SET at = $1, last_error = NULL WHERE id = 1`, [at]);
|
|
285
281
|
}
|
|
286
|
-
/**
|
|
287
|
-
export async function
|
|
288
|
-
|
|
289
|
-
return rows[0] && Number(rows[0].generation);
|
|
282
|
+
/** Records why the last registration failed. */
|
|
283
|
+
export async function recordWakeupError(db, error) {
|
|
284
|
+
await db.query(`UPDATE ${WAKEUP_TABLE} SET last_error = $1 WHERE id = 1`, [error]);
|
|
290
285
|
}
|
|
291
|
-
/** Records that the
|
|
292
|
-
export async function
|
|
293
|
-
await db.query(`UPDATE ${WAKEUP_TABLE} SET
|
|
294
|
-
}
|
|
295
|
-
/** Records why registering `generation` failed. */
|
|
296
|
-
export async function recordWakeupError(db, owner, generation, error) {
|
|
297
|
-
await db.query(`UPDATE ${WAKEUP_TABLE} SET last_error = $3 WHERE id = 1 AND owner = $1 AND generation = $2`, [
|
|
298
|
-
owner,
|
|
299
|
-
generation,
|
|
300
|
-
error,
|
|
301
|
-
]);
|
|
302
|
-
}
|
|
303
|
-
/** Records that the worker stops now, with `generation` registered. */
|
|
304
|
-
export async function recordWakeupStop(db, owner, generation) {
|
|
305
|
-
await db.query(`UPDATE ${WAKEUP_TABLE} SET stopped_at = now() WHERE id = 1 AND owner = $1 AND generation = $2`, [
|
|
306
|
-
owner,
|
|
307
|
-
generation,
|
|
308
|
-
]);
|
|
309
|
-
}
|
|
310
|
-
/**
|
|
311
|
-
* True when `generation` is the wakeup row's and the worker stopped with it: the wake
|
|
312
|
-
* `/wake?generation=N` asks for is the one the worker last registered before it stopped, not
|
|
313
|
-
* one a later stop replaced, nor one registered by a worker that then kept running. For the
|
|
314
|
-
* route's supervisor, which decides on its own what a wake means when no wakeup is declared.
|
|
315
|
-
*/
|
|
316
|
-
export async function shouldWake(databaseUrl, generation) {
|
|
317
|
-
await prepareDatabase(databaseUrl);
|
|
318
|
-
const conn = await connect(databaseUrl);
|
|
319
|
-
try {
|
|
320
|
-
const { rows } = await conn.query(`SELECT generation = $1 AND at IS NOT NULL AND stopped_at >= registered_at ` +
|
|
321
|
-
`AS current FROM ${WAKEUP_TABLE} WHERE id = 1`, [generation]);
|
|
322
|
-
return rows[0]?.current === true;
|
|
323
|
-
}
|
|
324
|
-
finally {
|
|
325
|
-
await conn.end().catch(() => undefined);
|
|
326
|
-
}
|
|
286
|
+
/** Records that the worker stops itself now. */
|
|
287
|
+
export async function recordWakeupStop(db) {
|
|
288
|
+
await db.query(`UPDATE ${WAKEUP_TABLE} SET stopped_at = now() WHERE id = 1`);
|
|
327
289
|
}
|
|
328
290
|
//# sourceMappingURL=db.js.map
|
package/dist/db.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db.js","sourceRoot":"","sources":["../src/db.ts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