@joe-broadhead/opencode-mem 0.12.1 → 0.12.3
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 +45 -0
- package/package.json +1 -1
- package/src/collector-service.js +1 -1
- package/src/collector.js +75 -21
- package/src/plugins/locate.js +15 -4
- 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/sources.js +44 -0
- package/src/tools/spaces.js +54 -18
- 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
|
@@ -1,20 +1,20 @@
|
|
|
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 "./chunk-
|
|
4
|
+
} from "./chunk-HVBOAYBO.js";
|
|
5
5
|
import {
|
|
6
6
|
SUPPORTED_CONTRACT_VERSIONS
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IL565TRX.js";
|
|
8
8
|
import {
|
|
9
9
|
EVENT_KINDS,
|
|
10
10
|
MAX_BYTES,
|
|
11
11
|
isEventKind
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YH323FAZ.js";
|
|
13
13
|
import {
|
|
14
14
|
OUTPUT_NAMES,
|
|
15
15
|
isExtensionOutput,
|
|
16
16
|
isOutputName
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-BOUWB5UP.js";
|
|
18
18
|
import {
|
|
19
19
|
_enum,
|
|
20
20
|
array,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
record,
|
|
27
27
|
string,
|
|
28
28
|
unknown
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-JUWIMDGF.js";
|
|
30
30
|
|
|
31
31
|
// src/descriptor.ts
|
|
32
32
|
import { createHash } from "node:crypto";
|
|
@@ -52,7 +52,7 @@ var item = looseObject({
|
|
|
52
52
|
reads: string().refine(isEventKind, `must be an event kind: ${EVENT_KINDS.join(", ")}, or x-<plugin>/<kind>`).optional(),
|
|
53
53
|
output: string().optional(),
|
|
54
54
|
params: record(string(), looseObject({ relative: boolean().optional(), me: boolean().optional() })).optional(),
|
|
55
|
-
accounts: looseObject({ named: boolean().optional() }).optional(),
|
|
55
|
+
accounts: looseObject({ named: boolean().optional(), server: string().max(64).optional() }).optional(),
|
|
56
56
|
scope: looseObject({ keys: array(string().regex(/^[a-z][a-zA-Z0-9_-]{0,39}$/)).min(1), describe: string().max(200).optional() }).optional(),
|
|
57
57
|
details: array(
|
|
58
58
|
looseObject({
|
|
@@ -67,7 +67,8 @@ var item = looseObject({
|
|
|
67
67
|
operations: array(operation).min(1, "must name at least one operation: grants and off switches key on them").optional(),
|
|
68
68
|
// A provider whose resources are method-and-path (GitHub's `github_api` on `GET /user`) states its grants
|
|
69
69
|
// verbatim; `operationRule` derives from `operations` for every other provider (#4, from the github plugin).
|
|
70
|
-
rules: array(object({ action, resource: string().min(1).max(200) })).min(1).optional()
|
|
70
|
+
rules: array(object({ action, resource: string().min(1).max(200) })).min(1).optional(),
|
|
71
|
+
identityRules: array(object({ action, resource: string().min(1).max(200) })).optional()
|
|
71
72
|
}),
|
|
72
73
|
private: boolean().optional(),
|
|
73
74
|
cost: looseObject({ class: _enum(["free", "metered", "billed"]), units: array(price).optional(), probe: price.optional() }),
|
|
@@ -1,10 +1,10 @@
|
|
|
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
|
isToolsRpcId
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-X6XP7YK2.js";
|
|
5
5
|
import {
|
|
6
6
|
isEventKind
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YH323FAZ.js";
|
|
8
8
|
import {
|
|
9
9
|
_enum,
|
|
10
10
|
array,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
string,
|
|
20
20
|
union,
|
|
21
21
|
validator
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-JUWIMDGF.js";
|
|
23
23
|
|
|
24
24
|
// src/internal/schema/types.ts
|
|
25
25
|
var MAX_BYTES_DEFAULT = 65536;
|
|
@@ -37,8 +37,14 @@ var PRICE_PER = /^[a-z][a-z0-9-]{0,31}$/;
|
|
|
37
37
|
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])?)+$/;
|
|
38
38
|
var price = object({
|
|
39
39
|
per: string().max(32).regex(PRICE_PER, { error: "must be a lowercase word such as post, author or call" }),
|
|
40
|
-
usd: number().min(0)
|
|
41
|
-
|
|
40
|
+
usd: number().min(0),
|
|
41
|
+
conditions: string().min(1).max(200).optional().describe("The short sentence shown at consent when this price applies, such as X app owners only."),
|
|
42
|
+
min: number().min(0).optional().describe("The lowest rate that may apply, in US dollars: at most usd.")
|
|
43
|
+
}).strict().describe("One price unit, in US dollars, from the plugin's own price table.").superRefine((value, ctx) => {
|
|
44
|
+
if (value.min !== void 0 && value.min > value.usd) {
|
|
45
|
+
ctx.addIssue({ code: "custom", path: ["min"], message: "must not exceed usd, the price the source declares" });
|
|
46
|
+
}
|
|
47
|
+
});
|
|
42
48
|
var units = array(price).min(1);
|
|
43
49
|
var freeCost = object({
|
|
44
50
|
class: literal("free"),
|
|
@@ -48,7 +54,13 @@ var freeCost = object({
|
|
|
48
54
|
var meteredCost = object({ class: literal("metered"), units, probe: price.optional() }).strict();
|
|
49
55
|
var billedCost = object({ class: literal("billed"), units, probe: price }).strict();
|
|
50
56
|
var cost = discriminatedUnion("class", [freeCost, meteredCost, billedCost], { error: "must be free, metered or billed" }).describe("What one read costs, including a probe call, which reads no content.");
|
|
51
|
-
var
|
|
57
|
+
var ACCOUNT_SERVER = /^[a-z][a-z0-9_-]*\{account\}[a-z0-9_-]*$/;
|
|
58
|
+
var accounts = object({
|
|
59
|
+
named: boolean().describe("True when the source reads more than one account, so a read names one."),
|
|
60
|
+
server: string().max(64).regex(ACCOUNT_SERVER, { error: "must be lowercase words holding {account} once, such as plaud-{account}" }).optional().describe(
|
|
61
|
+
"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
|
+
)
|
|
63
|
+
}).strict().describe("Which signed-in accounts a source reads.");
|
|
52
64
|
var scope = object({
|
|
53
65
|
keys: array(string().max(32).regex(SCOPE_KEY, { error: "must be a lowercase scope key such as channels" })).describe("The scope keys a person confirms: labels, channels, repositories. Empty when there is nothing to choose."),
|
|
54
66
|
describe: string().max(200).describe("The sentence shown at consent, such as Which labels."),
|
|
@@ -65,16 +77,38 @@ var detail = object({
|
|
|
65
77
|
from: array(_enum(["external_id", "kind", "occurred_at", "url", "thread", "actors", "labels", "hash"])).min(1).describe("The event fields the detail's input comes from. Identifiers only: an event's title and text are never an input.")
|
|
66
78
|
}).strict().describe("One read of an event's detail: the tool, and the event fields its input comes from.");
|
|
67
79
|
var permissionBase = {
|
|
68
|
-
identity: array(string().max(200).regex(OPERATION, { error: "must be a provider operation or an MCP tool name" })).
|
|
80
|
+
identity: array(string().max(200).regex(OPERATION, { error: "must be a provider operation or an MCP tool name" })).optional().describe(
|
|
81
|
+
"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."
|
|
82
|
+
),
|
|
83
|
+
/**
|
|
84
|
+
* True when the source's content reads legitimately assert an identity operation, such as reading mentions needing
|
|
85
|
+
* the signed-in user's id. Each identity operation is still declared in `permission.identity` and among
|
|
86
|
+
* `permission.operations`. Absent means content reads never assert one.
|
|
87
|
+
*/
|
|
88
|
+
readsIdentity: boolean().optional().describe("True when the source's content reads assert an identity operation (#30, item 4); every identity operation is still declared."),
|
|
69
89
|
operations: array(string().max(200).regex(OPERATION, { error: "must be a provider operation or an MCP tool name" })).min(1).optional().describe("Every operation the source's reads assert, and nothing else. Absent when `rules` states them."),
|
|
70
90
|
rules: array(
|
|
71
91
|
object({
|
|
72
92
|
action: string().max(80).regex(ACTION, { error: "must be a permission action such as github_api" }),
|
|
73
93
|
resource: string().max(200).describe("The resource the action is asserted on, such as GET /user.")
|
|
74
94
|
}).strict()
|
|
75
|
-
).min(1).optional().describe("The grants verbatim, for a provider whose resources are not <account>:<operation> (GitHub's github_api on GET /user).")
|
|
95
|
+
).min(1).optional().describe("The grants verbatim, for a provider whose resources are not <account>:<operation> (GitHub's github_api on GET /user)."),
|
|
96
|
+
identityRules: array(
|
|
97
|
+
object({
|
|
98
|
+
action: string().max(80).regex(ACTION, { error: "must be a permission action such as github_api" }),
|
|
99
|
+
resource: string().max(200).describe("The resource the action is asserted on, such as GET /user.")
|
|
100
|
+
}).strict()
|
|
101
|
+
).optional().describe(
|
|
102
|
+
"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."
|
|
103
|
+
)
|
|
76
104
|
};
|
|
77
105
|
var permissionEither = (value, ctx) => {
|
|
106
|
+
if (value.identityRules !== void 0 && value.rules === void 0) {
|
|
107
|
+
ctx.addIssue({ code: "custom", path: ["identityRules"], message: "identityRules is for a source that states its rules verbatim; a source with operations declares identity" });
|
|
108
|
+
}
|
|
109
|
+
if (value.identity !== void 0 && value.rules !== void 0) {
|
|
110
|
+
ctx.addIssue({ code: "custom", path: ["identity"], message: "a source that states its rules verbatim declares its probe's grants as identityRules, not identity" });
|
|
111
|
+
}
|
|
78
112
|
if (value.operations === void 0 && value.rules === void 0) {
|
|
79
113
|
ctx.addIssue({ code: "custom", message: "a permission states its operations, or its rules verbatim" });
|
|
80
114
|
}
|
|
@@ -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)
|
|
@@ -1,8 +1,8 @@
|
|
|
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
|
ACCOUNT_PATTERN,
|
|
4
4
|
evaluate
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OZMX7VR7.js";
|
|
6
6
|
|
|
7
7
|
// src/tools-rpc.ts
|
|
8
8
|
import { randomUUID } from "node:crypto";
|
|
@@ -191,6 +191,12 @@ async function registerToolsRpc(ctx, options) {
|
|
|
191
191
|
if (!CLASSES.includes(method.class)) throw new Error(`registerToolsRpc: ${method.name} has the class "${String(method.class)}"; use one of ${CLASSES.join(", ")}`);
|
|
192
192
|
if (method.kind === "plugin" && (typeof method.run !== "function" || method.action === "")) throw new Error(`registerToolsRpc: the plugin method ${method.name} needs a run function and an action`);
|
|
193
193
|
if (method.kind === "plugin" && method.resource !== void 0 && typeof method.resource !== "function") throw new Error(`registerToolsRpc: the plugin method ${method.name}'s resource must be a function of its input`);
|
|
194
|
+
if (method.kind === "plugin" && method.resourceKind !== void 0 && method.resourceKind !== "read" && method.resourceKind !== "any") {
|
|
195
|
+
throw new Error(`registerToolsRpc: the plugin method ${method.name}'s resourceKind must be "read" or "any"`);
|
|
196
|
+
}
|
|
197
|
+
if (method.kind === "plugin" && method.resourceKind !== void 0 && method.resource === void 0) {
|
|
198
|
+
throw new Error(`registerToolsRpc: the plugin method ${method.name} sets resourceKind but has no resource resolver`);
|
|
199
|
+
}
|
|
194
200
|
if (method.kind === "mcp" && "resource" in method) throw new Error(`registerToolsRpc: the MCP method ${method.name} cannot have a resource resolver; only a plugin method can`);
|
|
195
201
|
}
|
|
196
202
|
const fail = (code, what) => {
|
|
@@ -212,14 +218,16 @@ async function registerToolsRpc(ctx, options) {
|
|
|
212
218
|
let resource;
|
|
213
219
|
try {
|
|
214
220
|
resource = method.resource(envelope2.input);
|
|
215
|
-
} catch {
|
|
221
|
+
} catch (error) {
|
|
222
|
+
const coded = codedRefusal(error);
|
|
223
|
+
if (coded) throw new ScriptError(coded);
|
|
216
224
|
resource = null;
|
|
217
225
|
}
|
|
218
226
|
const unresolved = (what) => new ScriptError({ code: "RESOURCE_UNRESOLVED", what, next: NEXT_STEPS.RESOURCE_UNRESOLVED ?? RESOURCE_NEXT });
|
|
219
227
|
if (resource === null || resource === void 0) throw unresolved(`${method.name}'s input names no account and operation for ${method.action} to be resolved on`);
|
|
220
228
|
if (typeof resource !== "string" || !RESOURCE_PATTERN.test(resource)) throw unresolved(`${method.name}'s input resolves to a resource that is not <account>:<operation>`);
|
|
221
229
|
const operation = resource.slice(resource.indexOf(":") + 1);
|
|
222
|
-
if (method.class === "read" && !readOperation(operation)) {
|
|
230
|
+
if (method.class === "read" && method.resourceKind !== "any" && !readOperation(operation)) {
|
|
223
231
|
throw new ScriptError({
|
|
224
232
|
code: "PERMISSION_DENIED",
|
|
225
233
|
what: `${method.name} is a read, and ${operation} is not a read operation`,
|
|
@@ -228,6 +236,18 @@ async function registerToolsRpc(ctx, options) {
|
|
|
228
236
|
}
|
|
229
237
|
return resource;
|
|
230
238
|
};
|
|
239
|
+
const codedRefusal = (error) => {
|
|
240
|
+
const own = pluginError(error);
|
|
241
|
+
if (own) return own;
|
|
242
|
+
if (!record(error)) return void 0;
|
|
243
|
+
const code = error["code"];
|
|
244
|
+
const next = error["next"];
|
|
245
|
+
if (typeof code !== "string" || !/^[A-Z][A-Z0-9_]*$/.test(code) || typeof next !== "string" || next.trim() === "") return void 0;
|
|
246
|
+
const message = typeof error["message"] === "string" ? error["message"].split(/\r?\n/, 1)[0] : "";
|
|
247
|
+
const what = typeof error["what"] === "string" && error["what"].trim() !== "" ? error["what"] : message.replace(new RegExp(`^${code}:\\s*`), "").replace(/\s*Next step:.*$/, "");
|
|
248
|
+
if (what.trim() === "") return void 0;
|
|
249
|
+
return { code, what: upstreamText(what), next };
|
|
250
|
+
};
|
|
231
251
|
const session = async (sessionID) => {
|
|
232
252
|
let info;
|
|
233
253
|
try {
|
|
@@ -1,8 +1,8 @@
|
|
|
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
|
isExtensionOutput,
|
|
4
4
|
outputValidator
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-BOUWB5UP.js";
|
|
6
6
|
|
|
7
7
|
// src/pick.ts
|
|
8
8
|
var MAX_PICK_PATHS = 50;
|
|
@@ -1,8 +1,8 @@
|
|
|
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
|
MAX_CURSOR_LENGTH,
|
|
4
4
|
canonicalScope
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NUEROZNU.js";
|
|
6
6
|
|
|
7
7
|
// src/internal/secrets.ts
|
|
8
8
|
var PRIVATE_KEY_BLOCK = /-----BEGIN (?:[A-Z0-9]+ )*PRIVATE KEY(?: BLOCK)?-----[\s\S]*?(?:-----END (?:[A-Z0-9]+ )*PRIVATE KEY(?: BLOCK)?-----|$)/g;
|
|
@@ -159,7 +159,15 @@ var MAX_PAGE_BYTES = 65536;
|
|
|
159
159
|
var MAX_BYTES = { default: 65536, max: 1048576 };
|
|
160
160
|
var FIRST_RUN_HOURS = 24;
|
|
161
161
|
var TRUST = "untrusted";
|
|
162
|
+
function ownerShapeProblems(owner, what) {
|
|
163
|
+
if (!plainObject(owner) || !line(owner["id"], EVENT_LIMITS.ownerId) || !line(owner["label"], EVENT_LIMITS.ownerLabel) || Object.keys(owner).some((key) => key !== "id" && key !== "label" && key !== "verified")) {
|
|
164
|
+
return [`${what} must be { id, label }, two non-empty lines`];
|
|
165
|
+
}
|
|
166
|
+
if (owner["verified"] !== void 0 && owner["verified"] !== false) return [`${what}.verified must be false, or left out for an owner the provider named`];
|
|
167
|
+
return [];
|
|
168
|
+
}
|
|
162
169
|
var REFUSAL_REASONS = ["instruction", "secret", "owner"];
|
|
170
|
+
var REMOVAL_REASONS = ["deleted", "withheld", "expired"];
|
|
163
171
|
var GAP_REASONS = ["expired", "window-truncated"];
|
|
164
172
|
var ERROR_CODES = [
|
|
165
173
|
"NEEDS_SIGN_IN",
|
|
@@ -178,7 +186,7 @@ var ERROR_CODES = [
|
|
|
178
186
|
"SOURCE_UNKNOWN"
|
|
179
187
|
];
|
|
180
188
|
var PROPOSED_CODES = [];
|
|
181
|
-
var ERROR_ALIASES = { AUTH_REQUIRED: "NEEDS_SIGN_IN" };
|
|
189
|
+
var ERROR_ALIASES = { AUTH_REQUIRED: "NEEDS_SIGN_IN", ACCOUNT_UNKNOWN: "ACCOUNT_MISMATCH" };
|
|
182
190
|
var CONTRACT1_CODES = {
|
|
183
191
|
EVENTS_INVALID_INPUT: "INPUT_INVALID",
|
|
184
192
|
EVENTS_CURSOR_INVALID: "CURSOR_INVALID",
|
|
@@ -397,7 +405,7 @@ function probeResult(identity, extras = {}) {
|
|
|
397
405
|
return {
|
|
398
406
|
source: identity.source,
|
|
399
407
|
account: identity.account,
|
|
400
|
-
owner: { id: identity.owner.id, label: identity.owner.label },
|
|
408
|
+
owner: { id: identity.owner.id, label: identity.owner.label, ...identity.owner.verified === void 0 ? {} : { verified: identity.owner.verified } },
|
|
401
409
|
...extras.scopes === void 0 ? {} : { scopes: [...new Set(extras.scopes)] },
|
|
402
410
|
...extras.cost === void 0 ? {} : { cost: extras.cost },
|
|
403
411
|
trust: TRUST
|
|
@@ -413,8 +421,11 @@ function probeResultProblems(result, expected = {}) {
|
|
|
413
421
|
if (!line(result["account"], EVENT_LIMITS.account)) problems.push(`the probe answer's account must be a non-empty name of at most ${EVENT_LIMITS.account} characters`);
|
|
414
422
|
else if (expected.account !== void 0 && result["account"] !== expected.account) problems.push("the probe answer names another account than the one asked for");
|
|
415
423
|
const owner = result["owner"];
|
|
416
|
-
|
|
417
|
-
|
|
424
|
+
const ownerShape = ownerShapeProblems(owner, "the probe answer's owner");
|
|
425
|
+
if (ownerShape.length > 0) {
|
|
426
|
+
problems.push(...ownerShape);
|
|
427
|
+
} else if (!SCHEMED.test(owner["id"])) {
|
|
428
|
+
problems.push("the probe answer's owner.id must be a scheme-qualified id such as mailto:someone@example.com or slack:U0123");
|
|
418
429
|
}
|
|
419
430
|
const scopes = result["scopes"];
|
|
420
431
|
if (scopes !== void 0 && (!Array.isArray(scopes) || scopes.length > PROBE_LIMITS.scopes || scopes.some((scope) => !line(scope, PROBE_LIMITS.scope)) || new Set(scopes).size !== scopes.length)) {
|
|
@@ -436,6 +447,7 @@ function eventsListResult(identity, events, cursor, more, extras = {}) {
|
|
|
436
447
|
...extras.scope === void 0 ? {} : { scope: canonicalScope(extras.scope) },
|
|
437
448
|
...extras.refused && extras.refused.length > 0 ? { refused: [...extras.refused] } : {},
|
|
438
449
|
...extras.failed && extras.failed.length > 0 ? { failed: [...extras.failed] } : {},
|
|
450
|
+
...extras.removals && extras.removals.length > 0 ? { removals: [...extras.removals] } : {},
|
|
439
451
|
...extras.gap === void 0 ? {} : { gap: extras.gap },
|
|
440
452
|
...extras.cost === void 0 ? {} : { cost: extras.cost },
|
|
441
453
|
...extras.plugin === void 0 ? {} : { plugin: extras.plugin },
|
|
@@ -496,7 +508,35 @@ function eventProblems(event, where = "event") {
|
|
|
496
508
|
return problems;
|
|
497
509
|
}
|
|
498
510
|
var RESULT_KEYS = ["source", "account", "owner", "events", "cursor", "more", "trust"];
|
|
499
|
-
var EXTRA_KEYS = ["scope", "refused", "failed", "gap", "cost", "plugin", "asOf"];
|
|
511
|
+
var EXTRA_KEYS = ["scope", "refused", "failed", "removals", "gap", "cost", "plugin", "asOf"];
|
|
512
|
+
function removalProblems(result) {
|
|
513
|
+
if (!plainObject(result) || result["removals"] === void 0) return [];
|
|
514
|
+
const list = result["removals"];
|
|
515
|
+
if (!Array.isArray(list) || list.length > EVENT_LIMITS.refused) return [`the result's removals must be a list of at most ${EVENT_LIMITS.refused}`];
|
|
516
|
+
const problems = [];
|
|
517
|
+
const asOf = isoUtc(result["asOf"]) ? Date.parse(result["asOf"]) : void 0;
|
|
518
|
+
const seen = /* @__PURE__ */ new Set();
|
|
519
|
+
for (const [index, entry] of list.entries()) {
|
|
520
|
+
const at = `removals[${index}]`;
|
|
521
|
+
if (!plainObject(entry)) {
|
|
522
|
+
problems.push(`${at} is not an object`);
|
|
523
|
+
continue;
|
|
524
|
+
}
|
|
525
|
+
for (const key of Object.keys(entry)) if (!["external_id", "at", "reason"].includes(key)) problems.push(`${at} has the field "${key}", which the contract does not define`);
|
|
526
|
+
const id = entry["external_id"];
|
|
527
|
+
if (!line(id, EVENT_LIMITS.externalId)) problems.push(`${at}.external_id must be a non-empty id of at most ${EVENT_LIMITS.externalId} characters`);
|
|
528
|
+
else if (seen.has(id)) problems.push("the result's removals lists one event twice");
|
|
529
|
+
else seen.add(id);
|
|
530
|
+
if (!isoUtc(entry["at"])) problems.push(`${at}.at must be a UTC ISO date-time ending in Z`);
|
|
531
|
+
else if (asOf !== void 0 && Date.parse(entry["at"]) > asOf) problems.push(`${at}.at is later than the page's asOf`);
|
|
532
|
+
if (!REMOVAL_REASONS.includes(entry["reason"])) problems.push(`${at}.reason must be one of ${REMOVAL_REASONS.join(", ")}`);
|
|
533
|
+
}
|
|
534
|
+
const failed = result["failed"];
|
|
535
|
+
if (Array.isArray(failed) && failed.some((entry) => plainObject(entry) && typeof entry["external_id"] === "string" && seen.has(entry["external_id"]))) {
|
|
536
|
+
problems.push("an event is both removed and failed: a removal is final, so nothing is retried");
|
|
537
|
+
}
|
|
538
|
+
return problems;
|
|
539
|
+
}
|
|
500
540
|
function extraProblems(result, ids) {
|
|
501
541
|
const problems = [];
|
|
502
542
|
if (result["scope"] !== void 0) {
|
|
@@ -548,6 +588,7 @@ function extraProblems(result, ids) {
|
|
|
548
588
|
const refused = new Set(result["refused"].map((entry) => plainObject(entry) ? entry["external_id"] : void 0));
|
|
549
589
|
if (result["failed"].some((entry) => plainObject(entry) && refused.has(entry["external_id"]))) problems.push("an event is both refused and failed");
|
|
550
590
|
}
|
|
591
|
+
problems.push(...removalProblems(result));
|
|
551
592
|
if (result["gap"] !== void 0) {
|
|
552
593
|
const gap = result["gap"];
|
|
553
594
|
if (!plainObject(gap) || Object.keys(gap).some((key) => key !== "reason" && key !== "since") || !GAP_REASONS.includes(gap["reason"]) || !isoUtc(gap["since"])) {
|
|
@@ -577,9 +618,7 @@ function resultProblems(result, limit = PAGE.max, maxBytes = MAX_PAGE_BYTES) {
|
|
|
577
618
|
if (!named) problems.push("the result's source must be a lowercase name such as gmail");
|
|
578
619
|
if (!line(account, EVENT_LIMITS.account)) problems.push(`the result's account must be a non-empty name of at most ${EVENT_LIMITS.account} characters`);
|
|
579
620
|
const owner = result["owner"];
|
|
580
|
-
|
|
581
|
-
problems.push("the result's owner must be { id, label }, two non-empty lines");
|
|
582
|
-
}
|
|
621
|
+
problems.push(...ownerShapeProblems(owner, "the result's owner"));
|
|
583
622
|
const cursor = result["cursor"];
|
|
584
623
|
if (typeof cursor !== "string" || cursor.length === 0 || cursor.length > EVENT_LIMITS.cursor) problems.push(`the result's cursor must be a non-empty string of at most ${EVENT_LIMITS.cursor} characters`);
|
|
585
624
|
if (typeof result["more"] !== "boolean") problems.push("the result's more must be true or false");
|
|
@@ -621,6 +660,7 @@ export {
|
|
|
621
660
|
FIRST_RUN_HOURS,
|
|
622
661
|
TRUST,
|
|
623
662
|
REFUSAL_REASONS,
|
|
663
|
+
REMOVAL_REASONS,
|
|
624
664
|
GAP_REASONS,
|
|
625
665
|
ERROR_CODES,
|
|
626
666
|
PROPOSED_CODES,
|
|
@@ -649,5 +689,6 @@ export {
|
|
|
649
689
|
probeResultProblems,
|
|
650
690
|
eventsListResult,
|
|
651
691
|
eventProblems,
|
|
692
|
+
removalProblems,
|
|
652
693
|
resultProblems
|
|
653
694
|
};
|
|
@@ -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
|
CURSOR_V1,
|
|
4
4
|
CURSOR_V2,
|
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
decodeCursor,
|
|
11
11
|
encodeBoundCursor,
|
|
12
12
|
encodeCursor
|
|
13
|
-
} from "./chunks/chunk-
|
|
14
|
-
import "./chunks/chunk-
|
|
13
|
+
} from "./chunks/chunk-NUEROZNU.js";
|
|
14
|
+
import "./chunks/chunk-T4QM7B3S.js";
|
|
15
15
|
export {
|
|
16
16
|
CURSOR_V1,
|
|
17
17
|
CURSOR_V2,
|
|
@@ -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
|
DEFAULT_MAX_BYTES,
|
|
4
4
|
DETAIL_FIELDS,
|
|
@@ -10,16 +10,16 @@ import {
|
|
|
10
10
|
findSource,
|
|
11
11
|
maxBytesOf,
|
|
12
12
|
readInstalledDescriptor
|
|
13
|
-
} from "./chunks/chunk-
|
|
14
|
-
import "./chunks/chunk-
|
|
15
|
-
import "./chunks/chunk-
|
|
16
|
-
import "./chunks/chunk-
|
|
17
|
-
import "./chunks/chunk-
|
|
18
|
-
import "./chunks/chunk-
|
|
19
|
-
import "./chunks/chunk-
|
|
20
|
-
import "./chunks/chunk-
|
|
21
|
-
import "./chunks/chunk-
|
|
22
|
-
import "./chunks/chunk-
|
|
13
|
+
} from "./chunks/chunk-EHIOPXPL.js";
|
|
14
|
+
import "./chunks/chunk-HVBOAYBO.js";
|
|
15
|
+
import "./chunks/chunk-X6XP7YK2.js";
|
|
16
|
+
import "./chunks/chunk-IL565TRX.js";
|
|
17
|
+
import "./chunks/chunk-YH323FAZ.js";
|
|
18
|
+
import "./chunks/chunk-NUEROZNU.js";
|
|
19
|
+
import "./chunks/chunk-OZMX7VR7.js";
|
|
20
|
+
import "./chunks/chunk-BOUWB5UP.js";
|
|
21
|
+
import "./chunks/chunk-JUWIMDGF.js";
|
|
22
|
+
import "./chunks/chunk-T4QM7B3S.js";
|
|
23
23
|
export {
|
|
24
24
|
DEFAULT_MAX_BYTES,
|
|
25
25
|
DETAIL_FIELDS,
|
|
@@ -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
|
CONTRACT1_CODES,
|
|
4
4
|
ERROR_ALIASES,
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
PROBE_LIMITS,
|
|
19
19
|
PROPOSED_CODES,
|
|
20
20
|
REFUSAL_REASONS,
|
|
21
|
+
REMOVAL_REASONS,
|
|
21
22
|
SCOPE_KEY_PATTERN,
|
|
22
23
|
SINCE_PATTERN,
|
|
23
24
|
SOURCE_PATTERN,
|
|
@@ -40,6 +41,7 @@ import {
|
|
|
40
41
|
parseSourceError,
|
|
41
42
|
probeResult,
|
|
42
43
|
probeResultProblems,
|
|
44
|
+
removalProblems,
|
|
43
45
|
resultProblems,
|
|
44
46
|
scopeProblems,
|
|
45
47
|
screenEvents,
|
|
@@ -47,14 +49,14 @@ import {
|
|
|
47
49
|
sinceTime,
|
|
48
50
|
sourceNamespace,
|
|
49
51
|
startTime
|
|
50
|
-
} from "./chunks/chunk-
|
|
52
|
+
} from "./chunks/chunk-YH323FAZ.js";
|
|
51
53
|
import {
|
|
52
54
|
decodeBoundCursor,
|
|
53
55
|
decodeCursor,
|
|
54
56
|
encodeBoundCursor,
|
|
55
57
|
encodeCursor
|
|
56
|
-
} from "./chunks/chunk-
|
|
57
|
-
import "./chunks/chunk-
|
|
58
|
+
} from "./chunks/chunk-NUEROZNU.js";
|
|
59
|
+
import "./chunks/chunk-T4QM7B3S.js";
|
|
58
60
|
|
|
59
61
|
// src/internal/events-conformance.ts
|
|
60
62
|
var describeError = (error) => error instanceof Error ? error.message.split("\n", 1)[0] : String(error);
|
|
@@ -97,7 +99,7 @@ async function eventsListConformance(list, fixtures) {
|
|
|
97
99
|
if (fixtures.account !== void 0 && result.account !== fixtures.account) problems.push(`${what}: the result names the account ${result.account}, not ${fixtures.account}`);
|
|
98
100
|
accounts.add(result.account);
|
|
99
101
|
owners.add(JSON.stringify(result.owner));
|
|
100
|
-
if (fixtures.owner && JSON.stringify(result.owner) !== JSON.stringify({ id: fixtures.owner.id, label: fixtures.owner.label })) problems.push(`${what}: the owner is not the fixture's owner`);
|
|
102
|
+
if (fixtures.owner && JSON.stringify(result.owner) !== JSON.stringify({ id: fixtures.owner.id, label: fixtures.owner.label, ...fixtures.owner.verified === void 0 ? {} : { verified: fixtures.owner.verified } })) problems.push(`${what}: the owner is not the fixture's owner`);
|
|
101
103
|
if (fixtures.scopeEcho && fixtures.scope !== void 0) {
|
|
102
104
|
if (result.scope === void 0) problems.push(`${what}: the result does not echo the scope`);
|
|
103
105
|
else if (JSON.stringify(result.scope) !== JSON.stringify(sortedScope(fixtures.scope))) problems.push(`${what}: the result's scope is not the call's scope`);
|
|
@@ -221,6 +223,7 @@ export {
|
|
|
221
223
|
PROBE_LIMITS,
|
|
222
224
|
PROPOSED_CODES,
|
|
223
225
|
REFUSAL_REASONS,
|
|
226
|
+
REMOVAL_REASONS,
|
|
224
227
|
SCOPE_KEY_PATTERN,
|
|
225
228
|
SINCE_PATTERN,
|
|
226
229
|
SOURCE_PATTERN,
|
|
@@ -247,6 +250,7 @@ export {
|
|
|
247
250
|
parseSourceError,
|
|
248
251
|
probeResult,
|
|
249
252
|
probeResultProblems,
|
|
253
|
+
removalProblems,
|
|
250
254
|
resultProblems,
|
|
251
255
|
scopeProblems,
|
|
252
256
|
screenEvents,
|
|
@@ -1,9 +1,9 @@
|
|
|
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
|
CONTRACT_VERSION,
|
|
4
4
|
SUPPORTED_CONTRACT_VERSIONS
|
|
5
|
-
} from "./chunks/chunk-
|
|
6
|
-
import "./chunks/chunk-
|
|
5
|
+
} from "./chunks/chunk-IL565TRX.js";
|
|
6
|
+
import "./chunks/chunk-T4QM7B3S.js";
|
|
7
7
|
export {
|
|
8
8
|
CONTRACT_VERSION,
|
|
9
9
|
SUPPORTED_CONTRACT_VERSIONS
|
|
@@ -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
|
MAX_RELATIVE_DAYS,
|
|
4
4
|
ME,
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
resolveRelativeTime,
|
|
9
9
|
resolveSince,
|
|
10
10
|
resolveWindow
|
|
11
|
-
} from "./chunks/chunk-
|
|
12
|
-
import "./chunks/chunk-
|
|
11
|
+
} from "./chunks/chunk-F4K2Y64D.js";
|
|
12
|
+
import "./chunks/chunk-T4QM7B3S.js";
|
|
13
13
|
export {
|
|
14
14
|
MAX_RELATIVE_DAYS,
|
|
15
15
|
ME,
|
|
@@ -1,7 +1,9 @@
|
|
|
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
|
ACCOUNT_PATTERN,
|
|
4
|
+
DEFAULT_ACCOUNT,
|
|
4
5
|
DENY_ALL,
|
|
6
|
+
SERVER_ACCOUNT_PATTERN,
|
|
5
7
|
accountProblem,
|
|
6
8
|
detailRules,
|
|
7
9
|
evaluate,
|
|
@@ -10,12 +12,15 @@ import {
|
|
|
10
12
|
namespaceOf,
|
|
11
13
|
operationRule,
|
|
12
14
|
probeRules,
|
|
15
|
+
serverOf,
|
|
13
16
|
sessionRules
|
|
14
|
-
} from "./chunks/chunk-
|
|
15
|
-
import "./chunks/chunk-
|
|
17
|
+
} from "./chunks/chunk-OZMX7VR7.js";
|
|
18
|
+
import "./chunks/chunk-T4QM7B3S.js";
|
|
16
19
|
export {
|
|
17
20
|
ACCOUNT_PATTERN,
|
|
21
|
+
DEFAULT_ACCOUNT,
|
|
18
22
|
DENY_ALL,
|
|
23
|
+
SERVER_ACCOUNT_PATTERN,
|
|
19
24
|
accountProblem,
|
|
20
25
|
detailRules,
|
|
21
26
|
evaluate,
|
|
@@ -24,5 +29,6 @@ export {
|
|
|
24
29
|
namespaceOf,
|
|
25
30
|
operationRule,
|
|
26
31
|
probeRules,
|
|
32
|
+
serverOf,
|
|
27
33
|
sessionRules
|
|
28
34
|
};
|