@joe-broadhead/opencode-mem 0.12.5 → 0.12.6
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/CHANGELOG.md +40 -0
- package/README.md +1 -0
- package/package.json +10 -2
- package/src/collector.js +23 -5
- package/src/plugins/source-contract/index.js +2 -2
- package/src/plugins/source-contract/vendor/PROVENANCE.json +9 -9
- package/src/plugins/source-contract/vendor/RELEASE-SHA256SUMS +3 -3
- package/src/plugins/source-contract/vendor/RELEASE.json +9 -9
- package/src/plugins/source-contract/vendor/SHA256SUMS +36 -29
- package/src/plugins/source-contract/vendor/broker-client.js +14 -14
- package/src/plugins/source-contract/vendor/chunks/{chunk-JUWIMDGF.js → chunk-6ZSJSJMV.js} +2 -2
- package/src/plugins/source-contract/vendor/chunks/{chunk-77MJETEE.js → chunk-A2KM6BYK.js} +13 -13
- package/src/plugins/source-contract/vendor/chunks/{chunk-HVBOAYBO.js → chunk-BEU3WWNO.js} +59 -6
- package/src/plugins/source-contract/vendor/chunks/{chunk-T4QM7B3S.js → chunk-CUITXC5J.js} +1 -1
- package/src/{vendor/source-contract/chunks/chunk-OZMX7VR7.js → plugins/source-contract/vendor/chunks/chunk-EOS4LD6F.js} +1 -1
- package/src/plugins/source-contract/vendor/chunks/{chunk-F4K2Y64D.js → chunk-EUDLXWG4.js} +1 -1
- package/src/plugins/source-contract/vendor/chunks/{chunk-BOUWB5UP.js → chunk-GDBKZBG7.js} +2 -2
- package/src/plugins/source-contract/vendor/chunks/{chunk-EHIOPXPL.js → chunk-HR22TL23.js} +14 -14
- package/src/plugins/source-contract/vendor/chunks/{chunk-X6XP7YK2.js → chunk-IGPRJ63D.js} +2 -2
- package/src/plugins/source-contract/vendor/chunks/{chunk-XVA6H6OO.js → chunk-IIUWLSGP.js} +2 -2
- package/src/plugins/source-contract/vendor/chunks/chunk-ITQZIF2U.js +191 -0
- package/src/plugins/source-contract/vendor/chunks/{chunk-IL565TRX.js → chunk-KXQYSM2Z.js} +1 -1
- package/src/plugins/source-contract/vendor/chunks/{chunk-YH323FAZ.js → chunk-LJL3EALP.js} +238 -12
- package/src/plugins/source-contract/vendor/chunks/{chunk-NUEROZNU.js → chunk-NUBUQFLH.js} +1 -1
- package/src/plugins/source-contract/vendor/cursor.js +3 -3
- package/src/plugins/source-contract/vendor/descriptor.js +11 -11
- package/src/plugins/source-contract/vendor/events.js +22 -4
- package/src/plugins/source-contract/vendor/hints.js +33 -0
- package/src/plugins/source-contract/vendor/index.js +3 -3
- package/src/plugins/source-contract/vendor/params.js +3 -3
- package/src/plugins/source-contract/vendor/permission.js +3 -3
- package/src/plugins/source-contract/vendor/pick.js +5 -5
- package/src/plugins/source-contract/vendor/read.js +14 -14
- package/src/plugins/source-contract/vendor/registry.js +4 -4
- package/src/plugins/source-contract/vendor/schema.js +14 -10
- package/src/plugins/source-contract/vendor/schemas/fact.commitment.json +57 -0
- package/src/plugins/source-contract/vendor/schemas/fact.meeting.attended.json +35 -0
- package/src/plugins/source-contract/vendor/schemas/fact.person.attribute.json +37 -0
- package/src/plugins/source-contract/vendor/schemas/hint.json +41 -0
- package/src/plugins/source-contract/vendor/schemas/routine.json +67 -0
- package/src/plugins/source-contract/vendor/schemas/sources.json +56 -0
- package/src/plugins/source-contract/vendor/schemas.js +16 -11
- package/src/plugins/source-contract/vendor/tools-rpc.js +4 -4
- package/src/records.js +3 -1
- package/src/vendor/source-contract/README.md +10 -8
- package/src/vendor/source-contract/VENDOR.json +48 -39
- package/src/vendor/source-contract/chunks/{chunk-JUWIMDGF.js → chunk-6ZSJSJMV.js} +2 -2
- package/src/vendor/source-contract/chunks/{chunk-T4QM7B3S.js → chunk-CUITXC5J.js} +1 -1
- package/src/{plugins/source-contract/vendor/chunks/chunk-OZMX7VR7.js → vendor/source-contract/chunks/chunk-EOS4LD6F.js} +1 -1
- package/src/vendor/source-contract/chunks/{chunk-BOUWB5UP.js → chunk-GDBKZBG7.js} +2 -2
- package/src/vendor/source-contract/chunks/{chunk-X6XP7YK2.js → chunk-IGPRJ63D.js} +2 -2
- package/src/vendor/source-contract/chunks/{chunk-YH323FAZ.js → chunk-LJL3EALP.js} +238 -12
- package/src/vendor/source-contract/chunks/{chunk-NUEROZNU.js → chunk-NUBUQFLH.js} +1 -1
- package/src/vendor/source-contract/cursor.js +3 -3
- package/src/vendor/source-contract/events.js +22 -4
- package/src/vendor/source-contract/registry.js +4 -4
- package/src/vendor/source-contract/tools-rpc.js +4 -4
- package/src/views/contracts.js +1 -3
- package/src/views/rpc.js +4 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,46 @@
|
|
|
3
3
|
The format follows Keep a Changelog 1.1.0: one `## [x.y.z] - date` section per
|
|
4
4
|
release.
|
|
5
5
|
|
|
6
|
+
## [0.12.6] - 2026-11-18
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
|
|
10
|
+
- The daily routine loses no collected item:
|
|
11
|
+
- A unit is marked read only after its items and the journal are saved; a failed write leaves it unread.
|
|
12
|
+
- A day is due when items arrive for it, by ingest time, so a late arrival, a backfill or a closed laptop is caught
|
|
13
|
+
up. The watermark is taken before the read, so an item ingested during a run is read by the next one.
|
|
14
|
+
- Past days with unread units are caught up oldest first, within half of each day's budget, so today is never
|
|
15
|
+
starved.
|
|
16
|
+
- A re-run reads only new or changed units, and merges the earlier journal, keeping its highlights and dropping a
|
|
17
|
+
line whose cited source was forgotten or removed. Cited records are read fifty at a time.
|
|
18
|
+
- The person's own and addressed threads are read first; coding sessions take at most 40% of a run, yet every run
|
|
19
|
+
reads at least one unit, and a day that cannot progress is reported, not left to block the others.
|
|
20
|
+
- A model call is charged only the tokens the provider billed. A 429 is honoured with its `Retry-After` and ends the
|
|
21
|
+
run's remaining batches; a provider or network outage trips one breaker for the whole service, not every space's.
|
|
22
|
+
- A read mark goes with the events it is about. A forget, an erasure, a source's removal and retention delete the
|
|
23
|
+
marks of the units their events were in, so the same ids collected again are read, not skipped as already read.
|
|
24
|
+
- A bind request that names an account probes that account; only a request for `default` adopts the signed-in one.
|
|
25
|
+
- A commitment control needs its `revision` again, and a stale one is refused, naming the current one.
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
|
|
29
|
+
- Memory accepts pages written to the source contract v0.3.0: actor `kind`, `identities` and `self`, `reply_to`,
|
|
30
|
+
`audience`, `domains`, `sections`, `parts` and `facts`, and a descriptor's `facts`, `hints` and `routines`. Only an
|
|
31
|
+
actor's declared `kind` is read now: a `kind` of `agent`, `bot`, `service`, `tool` or `system` keeps that actor off
|
|
32
|
+
person pages. The other fields are kept as they are for a later release. A removal, a forget and an erasure clear
|
|
33
|
+
them. `self` is stored, never trusted: Memory alone decides who the person is. The author is the first `from`, or
|
|
34
|
+
else the first `author`.
|
|
35
|
+
- Jelly's settings show the `actions` switch, **Let buttons change my memory**, so a person can see it and turn it off.
|
|
36
|
+
It is off by default, as before: a button on Memory's pages changes nothing until a host or the person turns it on.
|
|
37
|
+
|
|
38
|
+
### Deploy
|
|
39
|
+
|
|
40
|
+
The records service needs a deploy, **before** the plugin and before any source plugin writes a v0.3 field: an older
|
|
41
|
+
records build refuses an event that carries one, and the collector's cursor moves past it, so the event is lost without
|
|
42
|
+
an error. Additive: a `unit_reads` table and an `events.meta` column, with no schema version change, so an older
|
|
43
|
+
service opens the file unchanged. After a rollback, `events.meta` stays in place (see
|
|
44
|
+
[Upgrade to 0.12.6](docs/deployment.md#upgrade-to-0126-the-source-contracts-v03-fields)).
|
|
45
|
+
|
|
6
46
|
## [0.12.5] - 2026-11-18
|
|
7
47
|
|
|
8
48
|
### Fixed
|
package/README.md
CHANGED
|
@@ -326,6 +326,7 @@ not clean, without an error, and draws a monogram instead, so
|
|
|
326
326
|
| `ownService` | boolean | **Use my own Memory service.** Off by default: the service the Jelly account offers, and nothing of your own is read (no address, no key). On: the address and key below; on with no address loads and says which field to fill |
|
|
327
327
|
| `controlURL` | string | Memory address, shown and read only with `ownService` on. Empty otherwise: the Jelly account's memory origin |
|
|
328
328
|
| `capture` | boolean | On by default. Off: the tools still work and nothing is captured, the compaction checkpoint included |
|
|
329
|
+
| `actions` | boolean | **Let buttons change my memory.** Off by default: a button on Memory's pages, such as Mark done, changes nothing and says that actions are off. On: a press changes your memory, as you, under a grant your Jelly host signs |
|
|
329
330
|
| `skipAsks` | string | **Run without asking.** Empty by default. Default asks to turn off, comma-separated (see [docs/permissions.md](docs/permissions.md)); a held team write still waits in the Inbox |
|
|
330
331
|
| `token` | secret | Memory key, shown with `ownService` on (display only: a saved key is read either way). For a host without a Jelly sign-in that offers memory, and the fallback when Jelly refuses a token (not after `access_denied`). A saved key reaches the plugin at the engine's next start, and it presets Memory's `account` sign-in (`jelly.signIns`) |
|
|
331
332
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@joe-broadhead/opencode-mem",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Durable private and shared-space memory for OpenCode agents",
|
|
6
6
|
"license": "MIT",
|
|
@@ -1175,7 +1175,8 @@
|
|
|
1175
1175
|
"when",
|
|
1176
1176
|
"overdue",
|
|
1177
1177
|
"dueToday",
|
|
1178
|
-
"space"
|
|
1178
|
+
"space",
|
|
1179
|
+
"revision"
|
|
1179
1180
|
],
|
|
1180
1181
|
"properties": {
|
|
1181
1182
|
"id": {
|
|
@@ -6106,6 +6107,13 @@
|
|
|
6106
6107
|
"default": true,
|
|
6107
6108
|
"description": "On by default: finished turns are saved to your private memory. Off: the memory tools still work, and nothing is saved unless the agent is asked to remember it."
|
|
6108
6109
|
},
|
|
6110
|
+
{
|
|
6111
|
+
"key": "actions",
|
|
6112
|
+
"label": "Let buttons change my memory",
|
|
6113
|
+
"type": "boolean",
|
|
6114
|
+
"default": false,
|
|
6115
|
+
"description": "Off by default: a button on Memory's pages in Jelly, such as Mark done, changes nothing and says that actions are off. On: a press changes your memory, as you, under a grant your Jelly host signs."
|
|
6116
|
+
},
|
|
6109
6117
|
{
|
|
6110
6118
|
"key": "skipAsks",
|
|
6111
6119
|
"label": "Run without asking",
|
package/src/collector.js
CHANGED
|
@@ -1298,17 +1298,33 @@ export function createCollector({ scheduler = null, lister = null, prober = null
|
|
|
1298
1298
|
// **A declared source's probe is not told an account** (0.12.5): the
|
|
1299
1299
|
// plugin answers the account it is signed in to. Live at 00:43Z on
|
|
1300
1300
|
// 2026-11-18, Memory named `default`, and github, granola and linear
|
|
1301
|
-
// each answered ACCOUNT_MISMATCH, so none of the three could bind. A
|
|
1302
|
-
//
|
|
1303
|
-
//
|
|
1301
|
+
// each answered ACCOUNT_MISMATCH, so none of the three could bind. **A
|
|
1302
|
+
// request that names an account is that account** (0.12.6): a
|
|
1303
|
+
// multi-account plugin is probed as `work` when the person asked for
|
|
1304
|
+
// `work`, and its refusal is the answer, never a quiet rebind. A
|
|
1305
|
+
// plugin that still refuses a default request is asked once with the
|
|
1306
|
+
// account its own structured answer names, and nothing is adopted from
|
|
1307
|
+
// unparsed text.
|
|
1304
1308
|
const ask = (input) => (prober ? prober(reading.source, input, session) : Promise.reject(new Error("this host gives plugins no tools RPC, so a source cannot be probed")))
|
|
1305
1309
|
const declaredAnswer = async () => {
|
|
1310
|
+
const named = asked.account && asked.account !== DEFAULT_ACCOUNT ? asked.account : null
|
|
1311
|
+
if (named) return ask({ account: named })
|
|
1306
1312
|
try {
|
|
1307
1313
|
return await ask({})
|
|
1308
1314
|
} catch (error) {
|
|
1309
1315
|
const suggested = suggestedAccount(error)
|
|
1310
1316
|
if (!suggested) throw error
|
|
1311
|
-
|
|
1317
|
+
try {
|
|
1318
|
+
return await ask({ account: suggested })
|
|
1319
|
+
} catch (retry) {
|
|
1320
|
+
// A retry that fails keeps the first refusal's reason too: the two
|
|
1321
|
+
// say different things (the account, then why it still failed) and
|
|
1322
|
+
// the person needs both (0.12.6, the re-review's L).
|
|
1323
|
+
const both = new Error(`${oneLine(errorMessage(retry), 300)} (the first attempt said: ${oneLine(errorMessage(error), 300)})`)
|
|
1324
|
+
both.code = retry?.code ?? error?.code
|
|
1325
|
+
both.next = retry?.next ?? error?.next
|
|
1326
|
+
throw both
|
|
1327
|
+
}
|
|
1312
1328
|
}
|
|
1313
1329
|
}
|
|
1314
1330
|
const answer = reading.contract === "sources"
|
|
@@ -1342,7 +1358,9 @@ export function createCollector({ scheduler = null, lister = null, prober = null
|
|
|
1342
1358
|
body = { source: asked.source, account: asked.account, note: oneLine(errorMessage(answer?.setup || `${reading.package}'s ${reading.contract === "sources" ? "probe" : "events_list"} named no signed-in account; sign in to it in its own plugin.`), 400) }
|
|
1343
1359
|
}
|
|
1344
1360
|
} catch (error) {
|
|
1345
|
-
|
|
1361
|
+
// A refusal keeps its own words, and a failed retry keeps both reasons:
|
|
1362
|
+
// the store holds a note of 500 (0.12.6).
|
|
1363
|
+
body = { source: asked.source, account: asked.account, note: oneLine(errorMessage(error), 500) }
|
|
1346
1364
|
}
|
|
1347
1365
|
probe.note = body.note ?? null
|
|
1348
1366
|
try {
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* DESIGN-MEMORY-JOBS §8.3).
|
|
5
5
|
*
|
|
6
6
|
* The contract's package is `we-the-rebel-alliance/source-contract`. **It is
|
|
7
|
-
* vendored, not depended on** (`vendor/`, the locked v0.
|
|
8
|
-
* `
|
|
7
|
+
* vendored, not depended on** (`vendor/`, the locked v0.3.0 release at
|
|
8
|
+
* `2fd55cdc`, with `PROVENANCE.json` and `SHA256SUMS`), so an install of Memory
|
|
9
9
|
* runs no build and there is no runtime dependency. Everything the contract
|
|
10
10
|
* defines comes from it:
|
|
11
11
|
*
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "@we-the-rebel-alliance/source-contract",
|
|
3
3
|
"repo": "https://github.com/we-the-rebel-alliance/source-contract",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"commit": "
|
|
6
|
-
"tag": "v0.
|
|
7
|
-
"tagObject": "
|
|
8
|
-
"release": "https://github.com/we-the-rebel-alliance/source-contract/releases/tag/v0.
|
|
9
|
-
"commitNote": "The release's tag: annotated tag v0.
|
|
4
|
+
"version": "0.3.0",
|
|
5
|
+
"commit": "2fd55cdc0c6c1067927fefc403a88bfd18c9a971",
|
|
6
|
+
"tag": "v0.3.0",
|
|
7
|
+
"tagObject": "6e5136e274b7071d326d09d4ae5812b135228afb",
|
|
8
|
+
"release": "https://github.com/we-the-rebel-alliance/source-contract/releases/tag/v0.3.0",
|
|
9
|
+
"commitNote": "The release's tag: annotated tag v0.3.0 (6e5136e2) on 2fd55cdc, which is v0.2.0 (88bdc1e3) plus the v0.3 additions (#46): an actor's kind, identities and self, an event's reply_to, audience, domains, sections, parts and facts, and the descriptor's facts, hints and routines. Copied from the release tarball's dist/ after verifying the tarball, the conformance kit and the schemas against the release's SHA256SUMS.",
|
|
10
10
|
"path": "dist/",
|
|
11
|
-
"files":
|
|
11
|
+
"files": 48,
|
|
12
12
|
"sha256sums": "SHA256SUMS",
|
|
13
13
|
"releaseSha256sums": "RELEASE-SHA256SUMS",
|
|
14
|
-
"manifestSha256": "
|
|
15
|
-
"vendored": "2026-11-
|
|
14
|
+
"manifestSha256": "fe12db607fb1493a90f94f128b1617993cd4e5286a20e064bbc63967d3b2dfc5",
|
|
15
|
+
"vendored": "2026-11-18",
|
|
16
16
|
"note": "Memory bundles it, so an install runs no build and there is no runtime dependency. dist/*.d.ts are not vendored: Memory reads JavaScript. test/source-contract.test.js checks every file against SHA256SUMS and this manifest hash; test/contract-release.test.js checks them against the release tarball pinned in test/fixtures/contract/."
|
|
17
17
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
120cc9452302571d9674ecf108113a60390b96add0be7953bb5a1040c0a25a73 source-contract-0.3.0.tgz
|
|
2
|
+
721279b2d6a1706a992b532285647db67e72f02cc4e9dde1dadf691e3d1b2863 source-contract-conformance-0.3.0.mjs
|
|
3
|
+
fee84bb0cd88037272c2342cbcaf7b2d8b9052ba006592c1d3051408ec4fb172 source-contract-schemas-0.3.0.json
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
|
-
"tag": "v0.
|
|
3
|
-
"tagObject": "
|
|
4
|
-
"commit": "
|
|
5
|
-
"url": "https://github.com/we-the-rebel-alliance/source-contract/releases/tag/v0.
|
|
6
|
-
"published": "2026-11-
|
|
2
|
+
"tag": "v0.3.0",
|
|
3
|
+
"tagObject": "6e5136e274b7071d326d09d4ae5812b135228afb",
|
|
4
|
+
"commit": "2fd55cdc0c6c1067927fefc403a88bfd18c9a971",
|
|
5
|
+
"url": "https://github.com/we-the-rebel-alliance/source-contract/releases/tag/v0.3.0",
|
|
6
|
+
"published": "2026-11-18T00:59:15Z",
|
|
7
7
|
"sha256sums": {
|
|
8
8
|
"file": "RELEASE-SHA256SUMS",
|
|
9
|
-
"sha256": "
|
|
9
|
+
"sha256": "9deb3868d9d5c13f744f5fb87dead2d18ed987bad8d8548fe4d812bca4a4d235"
|
|
10
10
|
},
|
|
11
11
|
"assets": {
|
|
12
|
-
"source-contract-0.
|
|
13
|
-
"source-contract-conformance-0.
|
|
14
|
-
"source-contract-schemas-0.
|
|
12
|
+
"source-contract-0.3.0.tgz": "120cc9452302571d9674ecf108113a60390b96add0be7953bb5a1040c0a25a73",
|
|
13
|
+
"source-contract-conformance-0.3.0.mjs": "721279b2d6a1706a992b532285647db67e72f02cc4e9dde1dadf691e3d1b2863",
|
|
14
|
+
"source-contract-schemas-0.3.0.json": "fee84bb0cd88037272c2342cbcaf7b2d8b9052ba006592c1d3051408ec4fb172"
|
|
15
15
|
},
|
|
16
16
|
"pinnedAt": "test/fixtures/contract/"
|
|
17
17
|
}
|
|
@@ -1,30 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
7338322bbbcf2a9aa4970be52b49d64f8d9b29a4817225de817415fc5df38ce7 broker-client.js
|
|
2
|
+
f4dce407e43e69044733d1c777f8f675da019b35b61829f5427a7399c378d473 chunks/chunk-6ZSJSJMV.js
|
|
3
|
+
3b48f3dce57ce54db9cfd760b92b1e6785297a9624792e66d3a99c404f8fdbc1 chunks/chunk-A2KM6BYK.js
|
|
4
|
+
1a84c77dea7873ca5454d1e141a7abf9fbc2088cdbd2521aab0985be37e15c4b chunks/chunk-BEU3WWNO.js
|
|
5
|
+
7356ce701b8031c195cd80c607e42132327c70f5ce77d8d90136fdbf229391be chunks/chunk-CUITXC5J.js
|
|
6
|
+
284e0921f6e59c8f25b5627587388628e0e58cf836ea58a067ba059b06c34cf3 chunks/chunk-EOS4LD6F.js
|
|
7
|
+
94a7d607142cc65a444f5136115cdb52c19a8f8e6a3148d2b0f67d5757a53b3e chunks/chunk-EUDLXWG4.js
|
|
8
|
+
95bda4fd3eabc20c99415c099d3bf8f217d6875491ca9b95fd7a350480114364 chunks/chunk-GDBKZBG7.js
|
|
9
|
+
686b9fb992371b09b2410c26e4ae1434cd5537093dff500f8408df0960a48393 chunks/chunk-HR22TL23.js
|
|
10
|
+
d3760e44d7b51aeabf6a79ea6b36b8193746c91e2bdcf4af5b847e05213c1cda chunks/chunk-IGPRJ63D.js
|
|
11
|
+
5a77c6f0147828e322361180282b16ffa5ec532460047f67462dff7b3614653b chunks/chunk-IIUWLSGP.js
|
|
12
|
+
66c80befaab4e4a60030aff86536c8714c3689007eae952d9fe64e4c0bfc755d chunks/chunk-ITQZIF2U.js
|
|
13
|
+
2db8791393a51144ad625a93c32ed7b513d62b32c1e8a5aa04ef5d9367128de5 chunks/chunk-KXQYSM2Z.js
|
|
14
|
+
6e9f5bcb4ed13a1bce165a37f766d0cc6ff60f8103bcbe357061977cfb2669d8 chunks/chunk-LJL3EALP.js
|
|
15
|
+
7af09eece1414e0b0f9bb201427d662b96f29b650bb6115998362135dce303b6 chunks/chunk-NUBUQFLH.js
|
|
16
|
+
79c27dccfa5792298d15e0c5772e02af88194f3696af5063aebf43b94e0b64f0 conformance.js
|
|
17
|
+
e79fac955db3d8441c1e74e8e2c8197c6cce6046974528805771c87d46192acc cursor.js
|
|
18
|
+
024e4036fbe3a2de25253a222565901429fc05acc62babd7624aabd8763dc471 descriptor.js
|
|
19
|
+
4371c957d5b8482410a1a4b3112eb6846de3fba672cc9862d129a77780cfd040 events.js
|
|
20
|
+
46cf305d3f0a6a56e6062d0f3af98acd84466ca04ed85ccbbc487962bd843e6b hints.js
|
|
21
|
+
66079527c7f5526d0b7629cce7882c1b07edcdfe0c3493a69f630c778f60c2d0 index.js
|
|
22
|
+
3bfa29b240986be60c838c21c5f0ea16183dd965ee772987d56d28f82e03cdbb params.js
|
|
23
|
+
c4102e605cadc767603a297f158375bbbe7d36c26fa5cedf367f8574be07d03f permission.js
|
|
24
|
+
2932b5e06b55546c53a49947cdaedcca35d4e9f67265e024feb0bd23e1cfcfb3 pick.js
|
|
25
|
+
2db6b59d39209acfe0cc1c6ebf7819d3c1e44fb0f57875769524550d7692978c read.js
|
|
26
|
+
6d2b55b4fceacefd17d3fbac4d59fb270802ab55d4f99ed503f4a738f1dbf189 registry.js
|
|
27
|
+
702e50402f5c1223ddc2106d414b5af3b3758b4eeefe81276b416e8da7acc06e schema.js
|
|
28
|
+
a88ec1bbf780363580e50c3ac034a7793888cdb93a7904c0e083eaa650bcc87e schemas.js
|
|
29
|
+
6b28eb55681a16ec008f80ec50d1406ef5841b81d06142265e0d34592227294a schemas/fact.commitment.json
|
|
30
|
+
57ae58c8631b9e430acd4ad93d2f605d6edb1111c50a0dd6ed9f28bae8187f44 schemas/fact.meeting.attended.json
|
|
31
|
+
d7c146d58ba5a4331c54211ecc007fa515a04208e1685b6b73a5a17c49c23a43 schemas/fact.person.attribute.json
|
|
32
|
+
b6a74c4c70be553c84be2028186336ed8e20264a350aad60995b3ee612cb0f06 schemas/hint.json
|
|
28
33
|
afdcaa972b3294394883025d8c531ff51d4117cb8f5d2240b5f55319cf646b10 schemas/output.agenda.json
|
|
29
34
|
2bb069201056c91056b3590417918970e3b79950df39f45f1537cc59eb3b9933 schemas/output.countdown.json
|
|
30
35
|
b162cf16515ffb3eb324c4cc62d9898e6c894ba882d91af60025b60cf33129f9 schemas/output.image.json
|
|
@@ -37,5 +42,7 @@ aa806aeb1f800c179648c7d3ad2d2ee67fa3c39977087d6f03c733ad28d14dcd schemas/output
|
|
|
37
42
|
30fbb81a6f8df5d0601e428f2503eb726eca603cc350805852dc7c909a9b59a1 schemas/output.record.json
|
|
38
43
|
3d9695004dbf803576efcca0ff5bcef94af2d9475131db2fc694f974bc217dae schemas/output.table.json
|
|
39
44
|
ffaaaa5107a2a6b7b36230e2e458383591b687af77c1be2e1876194bdeb40f90 schemas/output.thread.json
|
|
40
|
-
|
|
41
|
-
|
|
45
|
+
57e741ae3ff5b5685da7f267457d55459b66339e5aad6307eefc66e3c17921e0 schemas/routine.json
|
|
46
|
+
94960ad9f02464e80cbfb27cf85ad1383f27a33e1b7760319d0a925c0ca68101 schemas/sources.json
|
|
47
|
+
1a00d3f937d6c65cd6987bbd0f0da1591d6f423bd7751aedfdc8cdd152bfa04e THIRD-PARTY-NOTICES.md
|
|
48
|
+
c29b83c40ccb62a519250ac077e8469428402b8eeec0615b11bf6ef2bd9718d3 tools-rpc.js
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
// @we-the-rebel-alliance/source-contract 0.
|
|
1
|
+
// @we-the-rebel-alliance/source-contract 0.3.0. Built by scripts/build.mjs; do not edit.
|
|
2
2
|
import {
|
|
3
3
|
acceptAnswer,
|
|
4
4
|
checkReadRequest,
|
|
5
5
|
failureFromError,
|
|
6
6
|
read
|
|
7
|
-
} from "./chunks/chunk-
|
|
8
|
-
import "./chunks/chunk-
|
|
9
|
-
import "./chunks/chunk-
|
|
10
|
-
import "./chunks/chunk-
|
|
11
|
-
import "./chunks/chunk-
|
|
12
|
-
import "./chunks/chunk-
|
|
7
|
+
} from "./chunks/chunk-A2KM6BYK.js";
|
|
8
|
+
import "./chunks/chunk-IIUWLSGP.js";
|
|
9
|
+
import "./chunks/chunk-HR22TL23.js";
|
|
10
|
+
import "./chunks/chunk-GDBKZBG7.js";
|
|
11
|
+
import "./chunks/chunk-BEU3WWNO.js";
|
|
12
|
+
import "./chunks/chunk-IGPRJ63D.js";
|
|
13
|
+
import "./chunks/chunk-KXQYSM2Z.js";
|
|
14
|
+
import "./chunks/chunk-6ZSJSJMV.js";
|
|
15
|
+
import "./chunks/chunk-LJL3EALP.js";
|
|
13
16
|
import {
|
|
14
17
|
canonicalScope
|
|
15
|
-
} from "./chunks/chunk-
|
|
16
|
-
import "./chunks/chunk-
|
|
17
|
-
import "./chunks/chunk-
|
|
18
|
-
import "./chunks/chunk-
|
|
19
|
-
import "./chunks/chunk-BOUWB5UP.js";
|
|
20
|
-
import "./chunks/chunk-JUWIMDGF.js";
|
|
21
|
-
import "./chunks/chunk-T4QM7B3S.js";
|
|
18
|
+
} from "./chunks/chunk-NUBUQFLH.js";
|
|
19
|
+
import "./chunks/chunk-EUDLXWG4.js";
|
|
20
|
+
import "./chunks/chunk-EOS4LD6F.js";
|
|
21
|
+
import "./chunks/chunk-CUITXC5J.js";
|
|
22
22
|
|
|
23
23
|
// src/broker-client.ts
|
|
24
24
|
var BROKER_CODE_ALIASES = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
// @we-the-rebel-alliance/source-contract 0.
|
|
1
|
+
// @we-the-rebel-alliance/source-contract 0.3.0. Built by scripts/build.mjs; do not edit.
|
|
2
2
|
import {
|
|
3
3
|
__export
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CUITXC5J.js";
|
|
5
5
|
|
|
6
6
|
// node_modules/zod/v4/classic/schemas.js
|
|
7
7
|
var schemas_exports2 = {};
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
// @we-the-rebel-alliance/source-contract 0.
|
|
1
|
+
// @we-the-rebel-alliance/source-contract 0.3.0. Built by scripts/build.mjs; do not edit.
|
|
2
|
+
import {
|
|
3
|
+
pick,
|
|
4
|
+
pickProblemsForOutput
|
|
5
|
+
} from "./chunk-IIUWLSGP.js";
|
|
2
6
|
import {
|
|
3
7
|
findSource,
|
|
4
8
|
maxBytesOf
|
|
5
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HR22TL23.js";
|
|
10
|
+
import {
|
|
11
|
+
checkOutput
|
|
12
|
+
} from "./chunk-GDBKZBG7.js";
|
|
6
13
|
import {
|
|
7
14
|
ERROR_CODES,
|
|
8
15
|
PAGE,
|
|
9
16
|
canonicalCode,
|
|
10
17
|
probeResultProblems,
|
|
11
18
|
resultProblems
|
|
12
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-LJL3EALP.js";
|
|
13
20
|
import {
|
|
14
21
|
canonicalScope
|
|
15
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-NUBUQFLH.js";
|
|
16
23
|
import {
|
|
17
24
|
resolveParams,
|
|
18
25
|
resolveSince
|
|
19
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-EUDLXWG4.js";
|
|
20
27
|
import {
|
|
21
28
|
detailRules,
|
|
22
29
|
grantCovers,
|
|
23
30
|
probeRules,
|
|
24
31
|
sessionRules
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import {
|
|
27
|
-
pick,
|
|
28
|
-
pickProblemsForOutput
|
|
29
|
-
} from "./chunk-XVA6H6OO.js";
|
|
30
|
-
import {
|
|
31
|
-
checkOutput
|
|
32
|
-
} from "./chunk-BOUWB5UP.js";
|
|
32
|
+
} from "./chunk-EOS4LD6F.js";
|
|
33
33
|
|
|
34
34
|
// src/internal/failure.ts
|
|
35
35
|
var FAILURE_CODES = ERROR_CODES;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
// @we-the-rebel-alliance/source-contract 0.
|
|
1
|
+
// @we-the-rebel-alliance/source-contract 0.3.0. Built by scripts/build.mjs; do not edit.
|
|
2
2
|
import {
|
|
3
3
|
isToolsRpcId
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import {
|
|
6
|
-
isEventKind
|
|
7
|
-
} from "./chunk-YH323FAZ.js";
|
|
4
|
+
} from "./chunk-IGPRJ63D.js";
|
|
8
5
|
import {
|
|
9
6
|
_enum,
|
|
10
7
|
array,
|
|
@@ -19,7 +16,14 @@ import {
|
|
|
19
16
|
string,
|
|
20
17
|
union,
|
|
21
18
|
validator
|
|
22
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-6ZSJSJMV.js";
|
|
20
|
+
import {
|
|
21
|
+
ATTENDANCE_RESPONSES,
|
|
22
|
+
COMMITMENT_STATES,
|
|
23
|
+
EVENT_LIMITS,
|
|
24
|
+
FACT_TYPES,
|
|
25
|
+
isEventKind
|
|
26
|
+
} from "./chunk-LJL3EALP.js";
|
|
23
27
|
|
|
24
28
|
// src/internal/schema/types.ts
|
|
25
29
|
var MAX_BYTES_DEFAULT = 65536;
|
|
@@ -35,6 +39,8 @@ var REGISTRY_NAME = /^[a-z][a-z0-9-]{0,31}$/;
|
|
|
35
39
|
var isOutputName = (name) => REGISTRY_NAME.test(name) || isEventKind(name);
|
|
36
40
|
var PRICE_PER = /^[a-z][a-z0-9-]{0,31}$/;
|
|
37
41
|
var HOST = /^(?:\*\.)?[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)+$/;
|
|
42
|
+
var FILE_PATH = /^[a-z0-9][a-z0-9._-]*(?:\/[a-z0-9][a-z0-9._-]*)*\.md$/;
|
|
43
|
+
var filePath = string().max(200).regex(FILE_PATH, { error: "must be a relative path in the package ending in .md, such as hints/mail.md" });
|
|
38
44
|
var price = object({
|
|
39
45
|
per: string().max(32).regex(PRICE_PER, { error: "must be a lowercase word such as post, author or call" }),
|
|
40
46
|
usd: number().min(0),
|
|
@@ -148,6 +154,11 @@ var events = object({
|
|
|
148
154
|
kind: literal("events"),
|
|
149
155
|
reads: string().max(64).refine(isEventKind, { error: "must be a core kind such as message, or x-<namespace>/<name>" }).describe("The thing it reads: a core kind, or x-<namespace>/<name>, whose namespace is the source's."),
|
|
150
156
|
details: array(detail).optional(),
|
|
157
|
+
facts: array(_enum(FACT_TYPES, { error: "must be a core fact type (commitment, person.attribute, meeting.attended)" })).min(1, "must name at least one fact type").optional().describe(
|
|
158
|
+
"The fact types this source's events carry (#45 \xA73), each a core type. An event may carry a fact of a declared type and of no other; Memory stamps the installed package's version on each fact it files."
|
|
159
|
+
),
|
|
160
|
+
hints: array(filePath).min(1, "must name at least one hint file").optional().describe("The hint files the package ships for this source (#45 \xA74): how to read one kind of item, at most 1,500 characters each."),
|
|
161
|
+
routines: array(filePath).min(1, "must name at least one routine file").optional().describe("The routine files the package ships for this source (#45 \xA75). Memory's first engine runs only its own core routines, so a plugin ships one only later."),
|
|
151
162
|
permission: permissionEvents,
|
|
152
163
|
output: never({ error: "an events source has no output: output belongs to a snapshot" }).optional(),
|
|
153
164
|
maxAgeSec: never({ error: "an events source has no maxAgeSec: a snapshot may be reused, an events page is read once" }).optional(),
|
|
@@ -159,8 +170,11 @@ var snapshot = object({
|
|
|
159
170
|
output: string().max(64).refine(isOutputName, { error: "must be a registry name such as agenda, or x-<namespace>/<name>" }).describe("A registry name, or x-<namespace>/<name>; an x- output carries its schema inline."),
|
|
160
171
|
outputSchema: union([boolean(), looseObject({})]).optional().describe("An x- output's schema, inline: JSON Schema draft 2020-12. Required for x-, absent for a registry name."),
|
|
161
172
|
params: looseObject({}).optional().describe("The parameters a consumer may pass, resolved by the library at read time."),
|
|
173
|
+
hints: array(filePath).min(1, "must name at least one hint file").optional().describe("The hint files the package ships for this source (#45 \xA74): how to read one kind of item, at most 1,500 characters each."),
|
|
174
|
+
routines: array(filePath).min(1, "must name at least one routine file").optional().describe("The routine files the package ships for this source (#45 \xA75). Memory's first engine runs only its own core routines, so a plugin ships one only later."),
|
|
162
175
|
permission: permissionTool,
|
|
163
176
|
maxAgeSec: int().min(1).optional().describe("How long a result may be reused before it is read again."),
|
|
177
|
+
facts: never({ error: "a snapshot has no facts: a fact is derived from an event's provider fields" }).optional(),
|
|
164
178
|
reads: never({ error: "a snapshot has no reads: it is state, not a feed" }).optional(),
|
|
165
179
|
details: never({ error: "a snapshot has no details: it has no events to read one of" }).optional()
|
|
166
180
|
}).strict().describe("A snapshot source: the latest state, read on demand.").superRefine((value, ctx) => {
|
|
@@ -180,11 +194,50 @@ var sourcesSchema = object({
|
|
|
180
194
|
items: array(source).min(1).describe("The plugin's sources. A source id is unique across the declaration.")
|
|
181
195
|
}).strict();
|
|
182
196
|
|
|
197
|
+
// src/internal/schema/facts.ts
|
|
198
|
+
var actorId = string().min(1).max(EVENT_LIMITS.actorId).describe("An actor id on the same event.");
|
|
199
|
+
var httpsUrl = string().max(EVENT_LIMITS.url).refine((value) => /^https:\/\/\S+$/.test(value), { error: "must be an https URL" });
|
|
200
|
+
var commitment = object({
|
|
201
|
+
type: literal("commitment"),
|
|
202
|
+
key: string().min(1).max(EVENT_LIMITS.factKey).describe("A stable id of this commitment within the source and account."),
|
|
203
|
+
title: string().min(1).max(EVENT_LIMITS.factTitle),
|
|
204
|
+
owner: actorId,
|
|
205
|
+
counterparty: actorId.optional(),
|
|
206
|
+
due: string().regex(/^\d{4}-\d{2}-\d{2}$/, { error: "must be a date such as 2026-11-30" }).optional(),
|
|
207
|
+
state: _enum(COMMITMENT_STATES),
|
|
208
|
+
url: httpsUrl.optional()
|
|
209
|
+
}).strict();
|
|
210
|
+
var personAttribute = object({
|
|
211
|
+
type: literal("person.attribute"),
|
|
212
|
+
actor: actorId,
|
|
213
|
+
org: string().min(1).max(EVENT_LIMITS.factAttribute).optional(),
|
|
214
|
+
team: string().min(1).max(EVENT_LIMITS.factAttribute).optional(),
|
|
215
|
+
role: string().min(1).max(EVENT_LIMITS.factAttribute).optional()
|
|
216
|
+
}).strict().refine((value) => value.org !== void 0 || value.team !== void 0 || value.role !== void 0, {
|
|
217
|
+
error: "must name org, team or role: a person's attribute comes from structured profile or directory data"
|
|
218
|
+
}).describe("A person's attribute, from structured profile or directory data only: at least one of org, team or role.");
|
|
219
|
+
var meetingAttended = object({
|
|
220
|
+
type: literal("meeting.attended"),
|
|
221
|
+
actor: actorId,
|
|
222
|
+
response: _enum(ATTENDANCE_RESPONSES),
|
|
223
|
+
organizer: boolean()
|
|
224
|
+
}).strict();
|
|
225
|
+
var FACT_SCHEMAS = {
|
|
226
|
+
commitment: validator("fact.commitment", commitment),
|
|
227
|
+
"person.attribute": validator("fact.person.attribute", personAttribute),
|
|
228
|
+
"meeting.attended": validator("fact.meeting.attended", meetingAttended)
|
|
229
|
+
};
|
|
230
|
+
function factSchema(type) {
|
|
231
|
+
return Object.hasOwn(FACT_SCHEMAS, type) ? FACT_SCHEMAS[type] : void 0;
|
|
232
|
+
}
|
|
233
|
+
|
|
183
234
|
// src/schema.ts
|
|
184
235
|
var SOURCES_SCHEMA = validator("sources", sourcesSchema);
|
|
185
236
|
|
|
186
237
|
export {
|
|
187
238
|
MAX_BYTES_DEFAULT,
|
|
188
239
|
MAX_BYTES_LIMIT,
|
|
240
|
+
FACT_SCHEMAS,
|
|
241
|
+
factSchema,
|
|
189
242
|
SOURCES_SCHEMA
|
|
190
243
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @we-the-rebel-alliance/source-contract 0.
|
|
1
|
+
// @we-the-rebel-alliance/source-contract 0.3.0. Built by scripts/build.mjs; do not edit.
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __export = (target, all) => {
|
|
4
4
|
for (var name in all)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @we-the-rebel-alliance/source-contract 0.
|
|
1
|
+
// @we-the-rebel-alliance/source-contract 0.3.0. Built by scripts/build.mjs; do not edit.
|
|
2
2
|
import {
|
|
3
3
|
_enum,
|
|
4
4
|
_null,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
string,
|
|
14
14
|
union,
|
|
15
15
|
validator
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-6ZSJSJMV.js";
|
|
17
17
|
|
|
18
18
|
// src/registry.ts
|
|
19
19
|
var text = (max) => string().max(max);
|
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
// @we-the-rebel-alliance/source-contract 0.
|
|
2
|
-
import {
|
|
3
|
-
SOURCES_SCHEMA
|
|
4
|
-
} from "./chunk-HVBOAYBO.js";
|
|
5
|
-
import {
|
|
6
|
-
SUPPORTED_CONTRACT_VERSIONS
|
|
7
|
-
} from "./chunk-IL565TRX.js";
|
|
8
|
-
import {
|
|
9
|
-
EVENT_KINDS,
|
|
10
|
-
MAX_BYTES,
|
|
11
|
-
isEventKind
|
|
12
|
-
} from "./chunk-YH323FAZ.js";
|
|
1
|
+
// @we-the-rebel-alliance/source-contract 0.3.0. Built by scripts/build.mjs; do not edit.
|
|
13
2
|
import {
|
|
14
3
|
OUTPUT_NAMES,
|
|
15
4
|
isExtensionOutput,
|
|
16
5
|
isOutputName
|
|
17
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GDBKZBG7.js";
|
|
7
|
+
import {
|
|
8
|
+
SOURCES_SCHEMA
|
|
9
|
+
} from "./chunk-BEU3WWNO.js";
|
|
10
|
+
import {
|
|
11
|
+
SUPPORTED_CONTRACT_VERSIONS
|
|
12
|
+
} from "./chunk-KXQYSM2Z.js";
|
|
18
13
|
import {
|
|
19
14
|
_enum,
|
|
20
15
|
array,
|
|
@@ -26,7 +21,12 @@ import {
|
|
|
26
21
|
record,
|
|
27
22
|
string,
|
|
28
23
|
unknown
|
|
29
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-6ZSJSJMV.js";
|
|
25
|
+
import {
|
|
26
|
+
EVENT_KINDS,
|
|
27
|
+
MAX_BYTES,
|
|
28
|
+
isEventKind
|
|
29
|
+
} from "./chunk-LJL3EALP.js";
|
|
30
30
|
|
|
31
31
|
// src/descriptor.ts
|
|
32
32
|
import { createHash } from "node:crypto";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
// @we-the-rebel-alliance/source-contract 0.
|
|
1
|
+
// @we-the-rebel-alliance/source-contract 0.3.0. Built by scripts/build.mjs; do not edit.
|
|
2
2
|
import {
|
|
3
3
|
ACCOUNT_PATTERN,
|
|
4
4
|
evaluate
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EOS4LD6F.js";
|
|
6
6
|
|
|
7
7
|
// src/tools-rpc.ts
|
|
8
8
|
import { randomUUID } from "node:crypto";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
// @we-the-rebel-alliance/source-contract 0.
|
|
1
|
+
// @we-the-rebel-alliance/source-contract 0.3.0. Built by scripts/build.mjs; do not edit.
|
|
2
2
|
import {
|
|
3
3
|
isExtensionOutput,
|
|
4
4
|
outputValidator
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-GDBKZBG7.js";
|
|
6
6
|
|
|
7
7
|
// src/pick.ts
|
|
8
8
|
var MAX_PICK_PATHS = 50;
|