@joe-broadhead/opencode-mem 0.12.0 → 0.12.2
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 +44 -0
- package/docs/agent-protocol.md +1 -1
- package/package.json +1 -1
- package/src/collector.js +11 -1
- package/src/plugins/source-contract/index.js +2 -2
- package/src/plugins/source-contract/policy.js +3 -7
- package/src/plugins/source-contract/vendor/PROVENANCE.json +8 -8
- 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 +28 -28
- package/src/plugins/source-contract/vendor/broker-client.js +14 -14
- package/src/plugins/source-contract/vendor/chunks/{chunk-Q3RQA5J2.js → chunk-77MJETEE.js} +9 -9
- package/src/plugins/source-contract/vendor/chunks/{chunk-6HDIB2SA.js → chunk-BOUWB5UP.js} +2 -2
- package/src/plugins/source-contract/vendor/chunks/{chunk-KYWBTAF4.js → chunk-EHIOPXPL.js} +9 -8
- package/src/plugins/source-contract/vendor/chunks/{chunk-RYNKNCPP.js → chunk-F4K2Y64D.js} +1 -1
- package/src/plugins/source-contract/vendor/chunks/{chunk-RRUAIQ4I.js → chunk-HVBOAYBO.js} +43 -9
- package/src/plugins/source-contract/vendor/chunks/{chunk-ELPJD3ND.js → chunk-IL565TRX.js} +1 -1
- package/src/plugins/source-contract/vendor/chunks/{chunk-W5SHR7DQ.js → chunk-JUWIMDGF.js} +2 -2
- package/src/{vendor/source-contract/chunks/chunk-I2RXJJJM.js → plugins/source-contract/vendor/chunks/chunk-NUEROZNU.js} +1 -1
- package/src/plugins/source-contract/vendor/chunks/{chunk-3M5PAKSS.js → chunk-OZMX7VR7.js} +22 -2
- package/src/plugins/source-contract/vendor/chunks/{chunk-HLVAKAYG.js → chunk-T4QM7B3S.js} +1 -1
- package/src/plugins/source-contract/vendor/chunks/{chunk-KWEWSZ4V.js → chunk-X6XP7YK2.js} +24 -4
- package/src/plugins/source-contract/vendor/chunks/{chunk-4ERCA4TK.js → chunk-XVA6H6OO.js} +2 -2
- package/src/plugins/source-contract/vendor/chunks/{chunk-ZUKF7P6U.js → chunk-YH323FAZ.js} +51 -10
- 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 +9 -5
- 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 +9 -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 +8 -8
- package/src/plugins/source-contract/vendor/schemas/sources.json +158 -4
- package/src/plugins/source-contract/vendor/schemas.js +9 -9
- package/src/plugins/source-contract/vendor/tools-rpc.js +4 -4
- package/src/tools/share.js +1 -1
- package/src/vendor/source-contract/README.md +6 -5
- package/src/vendor/source-contract/VENDOR.json +46 -46
- package/src/vendor/source-contract/chunks/{chunk-6HDIB2SA.js → chunk-BOUWB5UP.js} +2 -2
- package/src/vendor/source-contract/chunks/{chunk-W5SHR7DQ.js → chunk-JUWIMDGF.js} +2 -2
- package/src/{plugins/source-contract/vendor/chunks/chunk-I2RXJJJM.js → vendor/source-contract/chunks/chunk-NUEROZNU.js} +1 -1
- package/src/vendor/source-contract/chunks/{chunk-3M5PAKSS.js → chunk-OZMX7VR7.js} +22 -2
- package/src/vendor/source-contract/chunks/{chunk-HLVAKAYG.js → chunk-T4QM7B3S.js} +1 -1
- package/src/vendor/source-contract/chunks/{chunk-KWEWSZ4V.js → chunk-X6XP7YK2.js} +24 -4
- package/src/vendor/source-contract/chunks/{chunk-ZUKF7P6U.js → chunk-YH323FAZ.js} +51 -10
- package/src/vendor/source-contract/cursor.js +3 -3
- package/src/vendor/source-contract/events.js +9 -5
- package/src/vendor/source-contract/registry.js +4 -4
- package/src/vendor/source-contract/tools-rpc.js +4 -4
|
@@ -56,6 +56,12 @@
|
|
|
56
56
|
"named": {
|
|
57
57
|
"type": "boolean",
|
|
58
58
|
"description": "True when the source reads more than one account, so a read names one."
|
|
59
|
+
},
|
|
60
|
+
"server": {
|
|
61
|
+
"description": "For a plugin with one MCP server per account (#30, item 9): the server a named account's MCP tools live on, with {account} for the account, such as plaud-{account}. A bare operation is then <server>_<operation> for an account other than default; the default account keeps the namespace.",
|
|
62
|
+
"type": "string",
|
|
63
|
+
"maxLength": 64,
|
|
64
|
+
"pattern": "^[a-z][a-z0-9_-]*\\{account\\}[a-z0-9_-]*$"
|
|
59
65
|
}
|
|
60
66
|
},
|
|
61
67
|
"required": [
|
|
@@ -160,6 +166,17 @@
|
|
|
160
166
|
"usd": {
|
|
161
167
|
"type": "number",
|
|
162
168
|
"minimum": 0
|
|
169
|
+
},
|
|
170
|
+
"conditions": {
|
|
171
|
+
"description": "The short sentence shown at consent when this price applies, such as X app owners only.",
|
|
172
|
+
"type": "string",
|
|
173
|
+
"minLength": 1,
|
|
174
|
+
"maxLength": 200
|
|
175
|
+
},
|
|
176
|
+
"min": {
|
|
177
|
+
"description": "The lowest rate that may apply, in US dollars: at most usd.",
|
|
178
|
+
"type": "number",
|
|
179
|
+
"minimum": 0
|
|
163
180
|
}
|
|
164
181
|
},
|
|
165
182
|
"required": [
|
|
@@ -181,6 +198,17 @@
|
|
|
181
198
|
"usd": {
|
|
182
199
|
"type": "number",
|
|
183
200
|
"minimum": 0
|
|
201
|
+
},
|
|
202
|
+
"conditions": {
|
|
203
|
+
"description": "The short sentence shown at consent when this price applies, such as X app owners only.",
|
|
204
|
+
"type": "string",
|
|
205
|
+
"minLength": 1,
|
|
206
|
+
"maxLength": 200
|
|
207
|
+
},
|
|
208
|
+
"min": {
|
|
209
|
+
"description": "The lowest rate that may apply, in US dollars: at most usd.",
|
|
210
|
+
"type": "number",
|
|
211
|
+
"minimum": 0
|
|
184
212
|
}
|
|
185
213
|
},
|
|
186
214
|
"required": [
|
|
@@ -218,6 +246,17 @@
|
|
|
218
246
|
"usd": {
|
|
219
247
|
"type": "number",
|
|
220
248
|
"minimum": 0
|
|
249
|
+
},
|
|
250
|
+
"conditions": {
|
|
251
|
+
"description": "The short sentence shown at consent when this price applies, such as X app owners only.",
|
|
252
|
+
"type": "string",
|
|
253
|
+
"minLength": 1,
|
|
254
|
+
"maxLength": 200
|
|
255
|
+
},
|
|
256
|
+
"min": {
|
|
257
|
+
"description": "The lowest rate that may apply, in US dollars: at most usd.",
|
|
258
|
+
"type": "number",
|
|
259
|
+
"minimum": 0
|
|
221
260
|
}
|
|
222
261
|
},
|
|
223
262
|
"required": [
|
|
@@ -239,6 +278,17 @@
|
|
|
239
278
|
"usd": {
|
|
240
279
|
"type": "number",
|
|
241
280
|
"minimum": 0
|
|
281
|
+
},
|
|
282
|
+
"conditions": {
|
|
283
|
+
"description": "The short sentence shown at consent when this price applies, such as X app owners only.",
|
|
284
|
+
"type": "string",
|
|
285
|
+
"minLength": 1,
|
|
286
|
+
"maxLength": 200
|
|
287
|
+
},
|
|
288
|
+
"min": {
|
|
289
|
+
"description": "The lowest rate that may apply, in US dollars: at most usd.",
|
|
290
|
+
"type": "number",
|
|
291
|
+
"minimum": 0
|
|
242
292
|
}
|
|
243
293
|
},
|
|
244
294
|
"required": [
|
|
@@ -357,8 +407,7 @@
|
|
|
357
407
|
"not": {}
|
|
358
408
|
},
|
|
359
409
|
"identity": {
|
|
360
|
-
"description": "The identity operations probe asserts for this source (#4, #8); each is among permission.operations, and no content read asserts it.",
|
|
361
|
-
"minItems": 1,
|
|
410
|
+
"description": "The identity operations probe asserts for this source (#4, #8); each is among permission.operations, and no content read asserts it. Empty when the probe asserts only sources.probe.action; absent when the source does not declare it, so a consumer uses its fallback.",
|
|
362
411
|
"type": "array",
|
|
363
412
|
"items": {
|
|
364
413
|
"type": "string",
|
|
@@ -366,6 +415,10 @@
|
|
|
366
415
|
"pattern": "^[A-Za-z][A-Za-z0-9._-]{0,199}$"
|
|
367
416
|
}
|
|
368
417
|
},
|
|
418
|
+
"readsIdentity": {
|
|
419
|
+
"description": "True when the source's content reads assert an identity operation (#30, item 4); every identity operation is still declared.",
|
|
420
|
+
"type": "boolean"
|
|
421
|
+
},
|
|
369
422
|
"operations": {
|
|
370
423
|
"description": "Every operation the source's reads assert, and nothing else. Absent when `rules` states them.",
|
|
371
424
|
"minItems": 1,
|
|
@@ -400,6 +453,30 @@
|
|
|
400
453
|
],
|
|
401
454
|
"additionalProperties": false
|
|
402
455
|
}
|
|
456
|
+
},
|
|
457
|
+
"identityRules": {
|
|
458
|
+
"description": "For a rules source: the grants probe asserts for this source, verbatim, each among permission.rules (#30, item 10). Empty when the probe asserts only sources.probe.action; absent when undeclared. A rules source's equivalent of identity.",
|
|
459
|
+
"type": "array",
|
|
460
|
+
"items": {
|
|
461
|
+
"type": "object",
|
|
462
|
+
"properties": {
|
|
463
|
+
"action": {
|
|
464
|
+
"type": "string",
|
|
465
|
+
"maxLength": 80,
|
|
466
|
+
"pattern": "^(?:[a-z][a-z0-9_]*\\.[a-z][a-z0-9_]*|[a-z][a-z0-9]*_[a-z][a-z0-9_]*)$"
|
|
467
|
+
},
|
|
468
|
+
"resource": {
|
|
469
|
+
"type": "string",
|
|
470
|
+
"maxLength": 200,
|
|
471
|
+
"description": "The resource the action is asserted on, such as GET /user."
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
"required": [
|
|
475
|
+
"action",
|
|
476
|
+
"resource"
|
|
477
|
+
],
|
|
478
|
+
"additionalProperties": false
|
|
479
|
+
}
|
|
403
480
|
}
|
|
404
481
|
},
|
|
405
482
|
"required": [
|
|
@@ -454,6 +531,12 @@
|
|
|
454
531
|
"named": {
|
|
455
532
|
"type": "boolean",
|
|
456
533
|
"description": "True when the source reads more than one account, so a read names one."
|
|
534
|
+
},
|
|
535
|
+
"server": {
|
|
536
|
+
"description": "For a plugin with one MCP server per account (#30, item 9): the server a named account's MCP tools live on, with {account} for the account, such as plaud-{account}. A bare operation is then <server>_<operation> for an account other than default; the default account keeps the namespace.",
|
|
537
|
+
"type": "string",
|
|
538
|
+
"maxLength": 64,
|
|
539
|
+
"pattern": "^[a-z][a-z0-9_-]*\\{account\\}[a-z0-9_-]*$"
|
|
457
540
|
}
|
|
458
541
|
},
|
|
459
542
|
"required": [
|
|
@@ -558,6 +641,17 @@
|
|
|
558
641
|
"usd": {
|
|
559
642
|
"type": "number",
|
|
560
643
|
"minimum": 0
|
|
644
|
+
},
|
|
645
|
+
"conditions": {
|
|
646
|
+
"description": "The short sentence shown at consent when this price applies, such as X app owners only.",
|
|
647
|
+
"type": "string",
|
|
648
|
+
"minLength": 1,
|
|
649
|
+
"maxLength": 200
|
|
650
|
+
},
|
|
651
|
+
"min": {
|
|
652
|
+
"description": "The lowest rate that may apply, in US dollars: at most usd.",
|
|
653
|
+
"type": "number",
|
|
654
|
+
"minimum": 0
|
|
561
655
|
}
|
|
562
656
|
},
|
|
563
657
|
"required": [
|
|
@@ -579,6 +673,17 @@
|
|
|
579
673
|
"usd": {
|
|
580
674
|
"type": "number",
|
|
581
675
|
"minimum": 0
|
|
676
|
+
},
|
|
677
|
+
"conditions": {
|
|
678
|
+
"description": "The short sentence shown at consent when this price applies, such as X app owners only.",
|
|
679
|
+
"type": "string",
|
|
680
|
+
"minLength": 1,
|
|
681
|
+
"maxLength": 200
|
|
682
|
+
},
|
|
683
|
+
"min": {
|
|
684
|
+
"description": "The lowest rate that may apply, in US dollars: at most usd.",
|
|
685
|
+
"type": "number",
|
|
686
|
+
"minimum": 0
|
|
582
687
|
}
|
|
583
688
|
},
|
|
584
689
|
"required": [
|
|
@@ -616,6 +721,17 @@
|
|
|
616
721
|
"usd": {
|
|
617
722
|
"type": "number",
|
|
618
723
|
"minimum": 0
|
|
724
|
+
},
|
|
725
|
+
"conditions": {
|
|
726
|
+
"description": "The short sentence shown at consent when this price applies, such as X app owners only.",
|
|
727
|
+
"type": "string",
|
|
728
|
+
"minLength": 1,
|
|
729
|
+
"maxLength": 200
|
|
730
|
+
},
|
|
731
|
+
"min": {
|
|
732
|
+
"description": "The lowest rate that may apply, in US dollars: at most usd.",
|
|
733
|
+
"type": "number",
|
|
734
|
+
"minimum": 0
|
|
619
735
|
}
|
|
620
736
|
},
|
|
621
737
|
"required": [
|
|
@@ -637,6 +753,17 @@
|
|
|
637
753
|
"usd": {
|
|
638
754
|
"type": "number",
|
|
639
755
|
"minimum": 0
|
|
756
|
+
},
|
|
757
|
+
"conditions": {
|
|
758
|
+
"description": "The short sentence shown at consent when this price applies, such as X app owners only.",
|
|
759
|
+
"type": "string",
|
|
760
|
+
"minLength": 1,
|
|
761
|
+
"maxLength": 200
|
|
762
|
+
},
|
|
763
|
+
"min": {
|
|
764
|
+
"description": "The lowest rate that may apply, in US dollars: at most usd.",
|
|
765
|
+
"type": "number",
|
|
766
|
+
"minimum": 0
|
|
640
767
|
}
|
|
641
768
|
},
|
|
642
769
|
"required": [
|
|
@@ -731,8 +858,7 @@
|
|
|
731
858
|
"not": {}
|
|
732
859
|
},
|
|
733
860
|
"identity": {
|
|
734
|
-
"description": "The identity operations probe asserts for this source (#4, #8); each is among permission.operations, and no content read asserts it.",
|
|
735
|
-
"minItems": 1,
|
|
861
|
+
"description": "The identity operations probe asserts for this source (#4, #8); each is among permission.operations, and no content read asserts it. Empty when the probe asserts only sources.probe.action; absent when the source does not declare it, so a consumer uses its fallback.",
|
|
736
862
|
"type": "array",
|
|
737
863
|
"items": {
|
|
738
864
|
"type": "string",
|
|
@@ -740,6 +866,10 @@
|
|
|
740
866
|
"pattern": "^[A-Za-z][A-Za-z0-9._-]{0,199}$"
|
|
741
867
|
}
|
|
742
868
|
},
|
|
869
|
+
"readsIdentity": {
|
|
870
|
+
"description": "True when the source's content reads assert an identity operation (#30, item 4); every identity operation is still declared.",
|
|
871
|
+
"type": "boolean"
|
|
872
|
+
},
|
|
743
873
|
"operations": {
|
|
744
874
|
"description": "Every operation the source's reads assert, and nothing else. Absent when `rules` states them.",
|
|
745
875
|
"minItems": 1,
|
|
@@ -774,6 +904,30 @@
|
|
|
774
904
|
],
|
|
775
905
|
"additionalProperties": false
|
|
776
906
|
}
|
|
907
|
+
},
|
|
908
|
+
"identityRules": {
|
|
909
|
+
"description": "For a rules source: the grants probe asserts for this source, verbatim, each among permission.rules (#30, item 10). Empty when the probe asserts only sources.probe.action; absent when undeclared. A rules source's equivalent of identity.",
|
|
910
|
+
"type": "array",
|
|
911
|
+
"items": {
|
|
912
|
+
"type": "object",
|
|
913
|
+
"properties": {
|
|
914
|
+
"action": {
|
|
915
|
+
"type": "string",
|
|
916
|
+
"maxLength": 80,
|
|
917
|
+
"pattern": "^(?:[a-z][a-z0-9_]*\\.[a-z][a-z0-9_]*|[a-z][a-z0-9]*_[a-z][a-z0-9_]*)$"
|
|
918
|
+
},
|
|
919
|
+
"resource": {
|
|
920
|
+
"type": "string",
|
|
921
|
+
"maxLength": 200,
|
|
922
|
+
"description": "The resource the action is asserted on, such as GET /user."
|
|
923
|
+
}
|
|
924
|
+
},
|
|
925
|
+
"required": [
|
|
926
|
+
"action",
|
|
927
|
+
"resource"
|
|
928
|
+
],
|
|
929
|
+
"additionalProperties": false
|
|
930
|
+
}
|
|
777
931
|
}
|
|
778
932
|
},
|
|
779
933
|
"required": [
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
// @we-the-rebel-alliance/source-contract 0.
|
|
1
|
+
// @we-the-rebel-alliance/source-contract 0.2.0. Built by scripts/build.mjs; do not edit.
|
|
2
2
|
import {
|
|
3
3
|
SOURCES_SCHEMA
|
|
4
|
-
} from "./chunks/chunk-
|
|
5
|
-
import "./chunks/chunk-
|
|
6
|
-
import "./chunks/chunk-
|
|
7
|
-
import "./chunks/chunk-
|
|
8
|
-
import "./chunks/chunk-
|
|
4
|
+
} from "./chunks/chunk-HVBOAYBO.js";
|
|
5
|
+
import "./chunks/chunk-X6XP7YK2.js";
|
|
6
|
+
import "./chunks/chunk-YH323FAZ.js";
|
|
7
|
+
import "./chunks/chunk-NUEROZNU.js";
|
|
8
|
+
import "./chunks/chunk-OZMX7VR7.js";
|
|
9
9
|
import {
|
|
10
10
|
OUTPUTS
|
|
11
|
-
} from "./chunks/chunk-
|
|
12
|
-
import "./chunks/chunk-
|
|
13
|
-
import "./chunks/chunk-
|
|
11
|
+
} from "./chunks/chunk-BOUWB5UP.js";
|
|
12
|
+
import "./chunks/chunk-JUWIMDGF.js";
|
|
13
|
+
import "./chunks/chunk-T4QM7B3S.js";
|
|
14
14
|
|
|
15
15
|
// src/schemas.ts
|
|
16
16
|
var SCHEMAS = [SOURCES_SCHEMA, ...Object.values(OUTPUTS)];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @we-the-rebel-alliance/source-contract 0.
|
|
1
|
+
// @we-the-rebel-alliance/source-contract 0.2.0. Built by scripts/build.mjs; do not edit.
|
|
2
2
|
import {
|
|
3
3
|
CLASSES,
|
|
4
4
|
LOCATION_HEADER,
|
|
@@ -16,11 +16,11 @@ import {
|
|
|
16
16
|
toolsRpcId,
|
|
17
17
|
toolsRpcIdProblems,
|
|
18
18
|
upstreamText
|
|
19
|
-
} from "./chunks/chunk-
|
|
19
|
+
} from "./chunks/chunk-X6XP7YK2.js";
|
|
20
20
|
import {
|
|
21
21
|
evaluate
|
|
22
|
-
} from "./chunks/chunk-
|
|
23
|
-
import "./chunks/chunk-
|
|
22
|
+
} from "./chunks/chunk-OZMX7VR7.js";
|
|
23
|
+
import "./chunks/chunk-T4QM7B3S.js";
|
|
24
24
|
export {
|
|
25
25
|
CLASSES,
|
|
26
26
|
LOCATION_HEADER,
|
package/src/tools/share.js
CHANGED
|
@@ -183,7 +183,7 @@ export function registerShare(editor, toolkit) {
|
|
|
183
183
|
editor.add({
|
|
184
184
|
name: "share",
|
|
185
185
|
description:
|
|
186
|
-
"
|
|
186
|
+
"Grant or revoke a page or folder in a space, only when the person asks: revoke takes grant_id from list. Before deciding whether sharing is allowed, recall the relevant recorded rule; do not decide from a default. grant: give a user (email or id), group (group:<id>) or org role (org_role:<id>) viewer or editor access to a page or folder (a path ending in \"/\"), with an optional expiry; the page stays where it is, and a folder grant covers pages added later. copy: copy private memories (rec_ ids) into a shared space as new records that name their source; later edits to the originals do not reach the copies. revoke: a grant_id; copies' ids; or a path and to, which takes back only their grants (to: \"everyone\" unshares it, only if the person says everyone); then reads back, and cannot take back what someone already read. transfer: give a page or folder to another person (they must already be able to edit it). move: move memories or commitments (ids) or a page or folder (path) from space to the space in to, either way, shared to personal included; each copy names its source (moved_from) and is read back before the original is deleted, and nothing is fingerprinted as forgotten; keep: true copies instead. list: the space's shared pages and folders, and who each is shared with; with \"to\": \"me\", the pages and folders others shared with you, in every space, each with the space to read it in. Every change asks the person first; each answer gives the grant or copy ids and the call to revoke. Never share anything the person has not seen and approved. Sharing needs the records service on the Memory server: without it the answer says so and nothing changes.",
|
|
187
187
|
input: {
|
|
188
188
|
type: "object",
|
|
189
189
|
properties: {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
# Vendored `@we-the-rebel-alliance/source-contract`
|
|
2
2
|
|
|
3
|
-
**The locked v0.
|
|
4
|
-
`
|
|
5
|
-
|
|
6
|
-
`0.
|
|
7
|
-
|
|
3
|
+
**The locked v0.2.0 release.** This is the package's `dist/` at
|
|
4
|
+
`88bdc1e3` — `v0.1.0` plus #29–#41 (the keys a page and a declaration may now
|
|
5
|
+
carry, the probe's scheme-qualified owner, and the checks a rules source and the
|
|
6
|
+
kit now make), `package.json` version `0.2.0`. The `v0.2.0` tag is annotated
|
|
7
|
+
(`6c2eaac8`), and `VENDOR.json` names the commit and the SHA-256 of every file
|
|
8
|
+
here.
|
|
8
9
|
|
|
9
10
|
- **Runtime:** `tools-rpc.js`, `events.js`, `cursor.js` and `registry.js` are what
|
|
10
11
|
Memory's sources carry the protocol with, so the copy ships inside the plugin (the
|
|
@@ -1,59 +1,67 @@
|
|
|
1
1
|
{
|
|
2
|
-
"commit": "
|
|
2
|
+
"commit": "88bdc1e32af83098e06e6fb234ae267d91a4320e",
|
|
3
|
+
"package": "@we-the-rebel-alliance/source-contract",
|
|
4
|
+
"repository": "https://github.com/we-the-rebel-alliance/source-contract",
|
|
5
|
+
"tag": "v0.2.0",
|
|
6
|
+
"tagObject": "6c2eaac8d3cc83886b4916e96f79fe1fd7d6199a",
|
|
7
|
+
"release": "https://github.com/we-the-rebel-alliance/source-contract/releases/tag/v0.2.0",
|
|
8
|
+
"vendoredAt": "2026-11-17",
|
|
9
|
+
"version": "0.2.0",
|
|
10
|
+
"why": "v0.2.0's tagged release (tag v0.2.0 on 88bdc1e), copied from the release tarball's dist/ after verifying it against the release's SHA256SUMS. tools-rpc, events, cursor and registry are what the sources' protocol uses at runtime; the kit and the schema are read by Memory's tests.",
|
|
3
11
|
"files": {
|
|
4
12
|
"THIRD-PARTY-NOTICES.md": "1a00d3f937d6c65cd6987bbd0f0da1591d6f423bd7751aedfdc8cdd152bfa04e",
|
|
5
13
|
"broker-client.d.ts": "cf65170b6e960ae4b3501f91913fb4ddbf95d600239ef6bdeac12f872c8b9801",
|
|
6
|
-
"broker-client.js": "
|
|
7
|
-
"chunks/chunk-
|
|
8
|
-
"chunks/chunk-
|
|
9
|
-
"chunks/chunk-
|
|
10
|
-
"chunks/chunk-
|
|
11
|
-
"chunks/chunk-
|
|
12
|
-
"chunks/chunk-
|
|
13
|
-
"chunks/chunk-
|
|
14
|
-
"chunks/chunk-
|
|
15
|
-
"chunks/chunk-
|
|
16
|
-
"chunks/chunk-
|
|
17
|
-
"chunks/chunk-
|
|
18
|
-
"chunks/chunk-
|
|
19
|
-
"chunks/chunk-
|
|
14
|
+
"broker-client.js": "32b2940e7c9bbe6b9cbdd777f5eb0dfd8ae6177ec3c76360992a39d0161460ff",
|
|
15
|
+
"chunks/chunk-77MJETEE.js": "92f2543c72ad90e59357ffd904c6ab92eba6e062b7acb7dbb54c3ed08bb92620",
|
|
16
|
+
"chunks/chunk-BOUWB5UP.js": "c1576a886f7d67c8bb5afeb40f9282893e276012861a21f5952fc6a2b17051a4",
|
|
17
|
+
"chunks/chunk-EHIOPXPL.js": "cf4c37cdf92c51a182e5c91f540fcd41dc798a8e90c6c4a9911a0dac4ac54a6c",
|
|
18
|
+
"chunks/chunk-F4K2Y64D.js": "3f460580a07cf2011b3971d00af8306598cd73b59d43844b7610b38917c93bb5",
|
|
19
|
+
"chunks/chunk-HVBOAYBO.js": "8d4d5b011223794170623f008e3d62a1e397af5bf74ee5ced268399d776177da",
|
|
20
|
+
"chunks/chunk-IL565TRX.js": "ce20e775c75c7f13ff4c0608510819a57e134b885f33934933fd4a29b79df1e0",
|
|
21
|
+
"chunks/chunk-JUWIMDGF.js": "58a2f8598a2120c567ae89f9c2302083164d5271d5de2dcbf9949fb53eecc471",
|
|
22
|
+
"chunks/chunk-NUEROZNU.js": "a9b21faf6e418d1f484749908123fab5db2843f4eac68978edd01f28e651330e",
|
|
23
|
+
"chunks/chunk-OZMX7VR7.js": "02119d5b15c6dc03306a1f5fcfd0ede841a252a94137a47ad18c438d7fe46782",
|
|
24
|
+
"chunks/chunk-T4QM7B3S.js": "847c456d855db47ca014344b0a7d38af2050675d3bd3e22cdfa02254985417d2",
|
|
25
|
+
"chunks/chunk-X6XP7YK2.js": "1edd6b1242779f4d604ed9010dfc35a05fd112eab1186b218e06c2d45096ede7",
|
|
26
|
+
"chunks/chunk-XVA6H6OO.js": "a73cbef67fd6b6d9b40e77d88038ca74e1398990614732d0b3b714a76fc94071",
|
|
27
|
+
"chunks/chunk-YH323FAZ.js": "7fc90ad68ef25be1633cc86a0f59f08cab04f27fed562eac43ac5532772acc5d",
|
|
20
28
|
"conformance.d.ts": "e7bff576b2085cde07b9fc82244b1b41475175f28c6fd5d26eac383306ecb01e",
|
|
21
|
-
"conformance.js": "
|
|
29
|
+
"conformance.js": "f64e742976a4c3a9442305eb735532716c86bb049de0a7ef90dcf53518c5c88d",
|
|
22
30
|
"cursor.d.ts": "b6bd52b4f5267fba84fc6ac4c46f06aeddc8f77d216980929aaed8577f8caa32",
|
|
23
|
-
"cursor.js": "
|
|
24
|
-
"descriptor.d.ts": "
|
|
25
|
-
"descriptor.js": "
|
|
31
|
+
"cursor.js": "fd1cfd69b0d5765ccdcd0b451d51f7a422c5c87f89465f73da24e938339665e1",
|
|
32
|
+
"descriptor.d.ts": "da9eeaf84362a3954e53ad695d86ef37c0721f6ef61667054a81b5a5c968345d",
|
|
33
|
+
"descriptor.js": "1c182a6594c02af158b2104c967e76eb09acb3342157326ac71204ffa6fe2e77",
|
|
26
34
|
"events.d.ts": "cee2042a1a8216ceabd1ea22a997f6fb1754516ce4d3fa241ab135904e5d33db",
|
|
27
|
-
"events.js": "
|
|
35
|
+
"events.js": "40829989df80afa24b5c4313b66dc9dfd22dcd6296ae23da3b7d747329d4f65a",
|
|
28
36
|
"index.d.ts": "04416e21fe8ff873f320ddc2e55b4c061760fc5c3a908d9636119135dc4272d2",
|
|
29
|
-
"index.js": "
|
|
37
|
+
"index.js": "7b690aa81cb7967ace45c9fb6fe319540387b06ad7366e69170955abb24f1ecc",
|
|
30
38
|
"internal/checked.d.ts": "b139039477b76f14aa42683729f059607218a059180e638620c98c70ac4a8d09",
|
|
31
39
|
"internal/conformance/details.d.ts": "abc4d34f01b11ac668510030a10646d306919f176de72d245454a8fbe1c8061c",
|
|
32
|
-
"internal/conformance/kit.d.ts": "
|
|
40
|
+
"internal/conformance/kit.d.ts": "69d4c478ee0cd94046d38c4ab0d3e39e7bb762c884f00f0d4967dfc3528732a2",
|
|
33
41
|
"internal/conformance/page.d.ts": "839e4b9768d60d5d0b89da9f40a1b33a91c5497059a3167f1123493962604773",
|
|
34
|
-
"internal/conformance/permission.d.ts": "
|
|
42
|
+
"internal/conformance/permission.d.ts": "e7b64e4de90c2a44982c73451bd5a04779433b2a9c45afc9c7910a2fa609d34c",
|
|
35
43
|
"internal/conformance/probe.d.ts": "76fca0d07bb8de25931c0520a4a928b0957e852679d410f044a1fe1e8e305c6a",
|
|
36
44
|
"internal/conformance/rules.d.ts": "b5566a7b8c68d67ad017114bb49b18d77b1720f6352aa2f5d2517e55a95802ca",
|
|
37
45
|
"internal/conformance/suggest.d.ts": "fc75a1f0a495afe4d2289aa597fcb3d862b9d9326060f897b085a4772744674a",
|
|
38
46
|
"internal/events-conformance.d.ts": "4ba72ddf14447b064f5e9e775b57bf182c8d504fd9076a1b8cd55a0a1d329c95",
|
|
39
|
-
"internal/events.d.ts": "
|
|
47
|
+
"internal/events.d.ts": "d6e7539333d6253550e26b87243bbeeefa8bdb4aec23bb173ab782bf279018fe",
|
|
40
48
|
"internal/failure.d.ts": "8a97c06868c3004afce0c17ad3f34a456be7e263e4f6437c2ec5f463f988275b",
|
|
41
|
-
"internal/schema/types.d.ts": "
|
|
49
|
+
"internal/schema/types.d.ts": "e03754e83dd8f79f0fa23e2bf3d77622f1e3060474c8a0f11416af2e71176e1b",
|
|
42
50
|
"internal/secrets.d.ts": "8e294e3b5c0c84eedd90bc60af8476e2bbcfc5f9f775963f07a9ec180a5e3b13",
|
|
43
51
|
"params.d.ts": "454d5aa201c4f80be08502de442e835fa2619a923440f7b25969def6436676d3",
|
|
44
|
-
"params.js": "
|
|
45
|
-
"permission.d.ts": "
|
|
46
|
-
"permission.js": "
|
|
52
|
+
"params.js": "624ff0a0afbb2359491f5e808365232a0c49852acb3f95de64cbf0f126f54aa4",
|
|
53
|
+
"permission.d.ts": "70c5a80e43971e8b81920ae053e0c7de36ecbfb09414cf91080e75ece09bdd96",
|
|
54
|
+
"permission.js": "0d1cedeec5d097753dcb50a40de7e0e0fccd102f96a3688785dfa2550cccd778",
|
|
47
55
|
"pick.d.ts": "e41f48be4cbde48049ad1a34dbd844b532a0b0d37f6490b4de60e24252591d8a",
|
|
48
|
-
"pick.js": "
|
|
49
|
-
"read.d.ts": "
|
|
50
|
-
"read.js": "
|
|
56
|
+
"pick.js": "66fb3d6b18732cca8ce5d8470b3b2dc9310cc5a29c98f7d76c5c8bbdccadad27",
|
|
57
|
+
"read.d.ts": "1cdc2123f9094c8aaaffd10dfbd7c89f58269b774f9e6e3cf4ab875a2f5bab08",
|
|
58
|
+
"read.js": "f5f4cb67818fa346f45199356a0ab7ff6e1eb2c859a7cdfc0a65141b41a072f8",
|
|
51
59
|
"registry.d.ts": "d28922618fa5e6b6601ff5c1cf250545a86fe9cc342712115bd57716d0637760",
|
|
52
|
-
"registry.js": "
|
|
60
|
+
"registry.js": "89b6e892ed4f36774e5e455220305d29f9a0bcd8ca3ad38fab0855d1458f4b91",
|
|
53
61
|
"schema.d.ts": "e7322f2604e2dac1cca02fc8d2201de5e369cecf817accea3b28c2760a7a44e3",
|
|
54
|
-
"schema.js": "
|
|
62
|
+
"schema.js": "4ad50a25cd4cb4561d983b94d169e4a453d76be35b013d73b79f48e9a1e26b4c",
|
|
55
63
|
"schemas.d.ts": "5893b16f86f605ac68d37496e0a79c825fa412acb804977e28c3e44f2c90ede9",
|
|
56
|
-
"schemas.js": "
|
|
64
|
+
"schemas.js": "49c63338b4bcd3de82f1702d4a79c16f9ecd57bdee8d72cd7650b4dee7836c62",
|
|
57
65
|
"schemas/output.agenda.json": "afdcaa972b3294394883025d8c531ff51d4117cb8f5d2240b5f55319cf646b10",
|
|
58
66
|
"schemas/output.countdown.json": "2bb069201056c91056b3590417918970e3b79950df39f45f1537cc59eb3b9933",
|
|
59
67
|
"schemas/output.image.json": "b162cf16515ffb3eb324c4cc62d9898e6c894ba882d91af60025b60cf33129f9",
|
|
@@ -66,16 +74,8 @@
|
|
|
66
74
|
"schemas/output.record.json": "30fbb81a6f8df5d0601e428f2503eb726eca603cc350805852dc7c909a9b59a1",
|
|
67
75
|
"schemas/output.table.json": "3d9695004dbf803576efcca0ff5bcef94af2d9475131db2fc694f974bc217dae",
|
|
68
76
|
"schemas/output.thread.json": "ffaaaa5107a2a6b7b36230e2e458383591b687af77c1be2e1876194bdeb40f90",
|
|
69
|
-
"schemas/sources.json": "
|
|
70
|
-
"tools-rpc.d.ts": "
|
|
71
|
-
"tools-rpc.js": "
|
|
72
|
-
}
|
|
73
|
-
"package": "@we-the-rebel-alliance/source-contract",
|
|
74
|
-
"repository": "https://github.com/we-the-rebel-alliance/source-contract",
|
|
75
|
-
"tag": "v0.1.0",
|
|
76
|
-
"tagObject": "1bf9466b3d3745900bad4abb1c83f922956887de",
|
|
77
|
-
"release": "https://github.com/we-the-rebel-alliance/source-contract/releases/tag/v0.1.0",
|
|
78
|
-
"vendoredAt": "2026-11-14",
|
|
79
|
-
"version": "0.1.0",
|
|
80
|
-
"why": "v0.1.0's tagged release (tag v0.1.0 on 8ace21db), copied from the release tarball's dist/ after verifying it against the release's SHA256SUMS. tools-rpc, events, cursor and registry are what the sources' protocol uses at runtime; the kit and the schema are read by Memory's tests."
|
|
77
|
+
"schemas/sources.json": "b94a3e678154aafd9fa206d46fb1dfa93e6cdbd2f6eb27ef7391f99c95dce9d2",
|
|
78
|
+
"tools-rpc.d.ts": "f54924d710ff8f75fc9607bec13db2b74ae74753ff6d640dbfdd809d9aa13bbd",
|
|
79
|
+
"tools-rpc.js": "2a27cbb7910bab01fe52f128141202a7ca26cc45fa2b6ae55dc28377e92e1fd1"
|
|
80
|
+
}
|
|
81
81
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @we-the-rebel-alliance/source-contract 0.
|
|
1
|
+
// @we-the-rebel-alliance/source-contract 0.2.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-JUWIMDGF.js";
|
|
17
17
|
|
|
18
18
|
// src/registry.ts
|
|
19
19
|
var text = (max) => string().max(max);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
// @we-the-rebel-alliance/source-contract 0.
|
|
1
|
+
// @we-the-rebel-alliance/source-contract 0.2.0. Built by scripts/build.mjs; do not edit.
|
|
2
2
|
import {
|
|
3
3
|
__export
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-T4QM7B3S.js";
|
|
5
5
|
|
|
6
6
|
// node_modules/zod/v4/classic/schemas.js
|
|
7
7
|
var schemas_exports2 = {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @we-the-rebel-alliance/source-contract 0.
|
|
1
|
+
// @we-the-rebel-alliance/source-contract 0.2.0. Built by scripts/build.mjs; do not edit.
|
|
2
2
|
|
|
3
3
|
// src/permission.ts
|
|
4
4
|
var DENY_ALL = { action: "*", resource: "*", effect: "deny" };
|
|
@@ -16,7 +16,18 @@ function namespaceOf(source) {
|
|
|
16
16
|
}
|
|
17
17
|
function operationRule(source, operation, account) {
|
|
18
18
|
const namespace = namespaceOf(source);
|
|
19
|
-
return operation.includes(".") ? allow(`${namespace}.read`, `${account}:${operation}`) : allow(`${
|
|
19
|
+
return operation.includes(".") ? allow(`${namespace}.read`, `${account}:${operation}`) : allow(`${serverOf(source, account)}_${operation}`, "*");
|
|
20
|
+
}
|
|
21
|
+
var DEFAULT_ACCOUNT = "default";
|
|
22
|
+
var SERVER_ACCOUNT_PATTERN = /^[A-Za-z0-9_-]{1,64}$/;
|
|
23
|
+
function serverOf(source, account) {
|
|
24
|
+
const template = source.accounts?.server;
|
|
25
|
+
if (template === void 0 || account === DEFAULT_ACCOUNT) return namespaceOf(source);
|
|
26
|
+
return template.replace("{account}", account);
|
|
27
|
+
}
|
|
28
|
+
function serverAccountProblem(source, account) {
|
|
29
|
+
if (source.accounts?.server === void 0 || account === DEFAULT_ACCOUNT || SERVER_ACCOUNT_PATTERN.test(account)) return void 0;
|
|
30
|
+
return `the account must be letters, digits, _ or - (at most 64), since it names the MCP server ${source.accounts.server}`;
|
|
20
31
|
}
|
|
21
32
|
function fenced(rules) {
|
|
22
33
|
const loose = rules.find((rule) => WILDCARD.test(rule.action) || rule.resource !== "*" && WILDCARD.test(rule.resource));
|
|
@@ -43,6 +54,8 @@ function sessionRules(source, grant) {
|
|
|
43
54
|
if (declared !== void 0) return fenced([allow(method, "*"), ...declared.map((rule) => allow(rule.action, rule.resource))]);
|
|
44
55
|
const operations = source.permission.operations ?? [];
|
|
45
56
|
if (operations.length === 0) return { ok: false, problems: [`${source.id} declares neither operations nor rules`] };
|
|
57
|
+
const server = serverAccountProblem(source, grant.account);
|
|
58
|
+
if (server) return { ok: false, problems: [server] };
|
|
46
59
|
return fenced([allow(method, "*"), ...operations.map((operation) => operationRule(source, operation, grant.account))]);
|
|
47
60
|
}
|
|
48
61
|
function detailRules(source, detailId, grant) {
|
|
@@ -54,6 +67,10 @@ function probeRules(source, account, identityOperations, probeAction) {
|
|
|
54
67
|
if (problem) return { ok: false, problems: [problem] };
|
|
55
68
|
const method = probeAction ?? methodAction(source);
|
|
56
69
|
if (method === void 0) return { ok: false, problems: [`${source.id} names no action for its method`] };
|
|
70
|
+
const server = serverAccountProblem(source, account);
|
|
71
|
+
if (server) return { ok: false, problems: [server] };
|
|
72
|
+
const verbatim = source.permission.identityRules;
|
|
73
|
+
if (verbatim !== void 0) return fenced([allow(method, "*"), ...verbatim.map((rule) => allow(rule.action, rule.resource))]);
|
|
57
74
|
return fenced([allow(method, "*"), ...identityOperations.map((operation) => operationRule(source, operation, account))]);
|
|
58
75
|
}
|
|
59
76
|
function evaluate(rules, action, resource = "*") {
|
|
@@ -75,6 +92,9 @@ export {
|
|
|
75
92
|
accountProblem,
|
|
76
93
|
namespaceOf,
|
|
77
94
|
operationRule,
|
|
95
|
+
DEFAULT_ACCOUNT,
|
|
96
|
+
SERVER_ACCOUNT_PATTERN,
|
|
97
|
+
serverOf,
|
|
78
98
|
methodAction,
|
|
79
99
|
sessionRules,
|
|
80
100
|
detailRules,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @we-the-rebel-alliance/source-contract 0.
|
|
1
|
+
// @we-the-rebel-alliance/source-contract 0.2.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)
|