@minca/core 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/identity/abilities.d.ts +3 -3
- package/dist/identity/abilities.d.ts.map +1 -1
- package/dist/identity/abilities.js +9 -11
- package/dist/identity/abilities.js.map +1 -1
- package/dist/identity/contact-key.d.ts +15 -15
- package/dist/identity/contact-key.d.ts.map +1 -1
- package/dist/identity/contact-key.js +21 -28
- package/dist/identity/contact-key.js.map +1 -1
- package/dist/identity/root-signer.d.ts +0 -5
- package/dist/identity/root-signer.d.ts.map +1 -1
- package/dist/identity/root-signer.js +0 -1
- package/dist/identity/root-signer.js.map +1 -1
- package/dist/inbox/inbox.d.ts +140 -0
- package/dist/inbox/inbox.d.ts.map +1 -0
- package/dist/inbox/inbox.js +212 -0
- package/dist/inbox/inbox.js.map +1 -0
- package/dist/inbox/index.d.ts +9 -0
- package/dist/inbox/index.d.ts.map +1 -0
- package/dist/inbox/index.js +7 -0
- package/dist/inbox/index.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/network/mailbox.d.ts +4 -4
- package/dist/network/mailbox.d.ts.map +1 -1
- package/dist/network/mailbox.js +5 -5
- package/dist/network/mailbox.js.map +1 -1
- package/dist/node/actions.d.ts.map +1 -1
- package/dist/node/actions.js +28 -18
- package/dist/node/actions.js.map +1 -1
- package/dist/node/api.d.ts +11 -10
- package/dist/node/api.d.ts.map +1 -1
- package/dist/node/api.js +11 -10
- package/dist/node/api.js.map +1 -1
- package/dist/node/carrier.d.ts +11 -5
- package/dist/node/carrier.d.ts.map +1 -1
- package/dist/node/carrier.js +42 -1
- package/dist/node/carrier.js.map +1 -1
- package/dist/node/copy.d.ts +1 -1
- package/dist/node/copy.d.ts.map +1 -1
- package/dist/node/copy.js +10 -4
- package/dist/node/copy.js.map +1 -1
- package/dist/node/host.d.ts +2 -0
- package/dist/node/host.d.ts.map +1 -1
- package/dist/node/host.js +2 -0
- package/dist/node/host.js.map +1 -1
- package/dist/node/index.d.ts +1 -1
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/node.d.ts.map +1 -1
- package/dist/node/node.js +720 -542
- package/dist/node/node.js.map +1 -1
- package/dist/node/remote.d.ts +6 -5
- package/dist/node/remote.d.ts.map +1 -1
- package/dist/node/remote.js +140 -195
- package/dist/node/remote.js.map +1 -1
- package/dist/node/space-runtime.d.ts +2 -1
- package/dist/node/space-runtime.d.ts.map +1 -1
- package/dist/node/space-runtime.js +71 -84
- package/dist/node/space-runtime.js.map +1 -1
- package/dist/node/types.d.ts +84 -47
- package/dist/node/types.d.ts.map +1 -1
- package/dist/node/worker.d.ts +1 -1
- package/dist/node/worker.d.ts.map +1 -1
- package/dist/node/worker.js +10 -6
- package/dist/node/worker.js.map +1 -1
- package/dist/react/use-invite-link.d.ts +1 -1
- package/dist/react/use-invite-link.d.ts.map +1 -1
- package/dist/react/use-invite-link.js +18 -11
- package/dist/react/use-invite-link.js.map +1 -1
- package/dist/records/loose.d.ts +52 -0
- package/dist/records/loose.d.ts.map +1 -0
- package/dist/records/loose.js +86 -0
- package/dist/records/loose.js.map +1 -0
- package/dist/schema/version.d.ts +2 -0
- package/dist/schema/version.d.ts.map +1 -1
- package/dist/schema/version.js +2 -1
- package/dist/schema/version.js.map +1 -1
- package/dist/schemas/choosing.d.ts +19 -0
- package/dist/schemas/choosing.d.ts.map +1 -0
- package/dist/schemas/choosing.js +69 -0
- package/dist/schemas/choosing.js.map +1 -0
- package/dist/schemas/contacts.d.ts +34 -87
- package/dist/schemas/contacts.d.ts.map +1 -1
- package/dist/schemas/contacts.js +32 -76
- package/dist/schemas/contacts.js.map +1 -1
- package/dist/schemas/index.d.ts +2 -2
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +1 -1
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/library/annotations.d.ts +17 -285
- package/dist/schemas/library/annotations.d.ts.map +1 -1
- package/dist/schemas/library/annotations.js +9 -65
- package/dist/schemas/library/annotations.js.map +1 -1
- package/dist/schemas/library/community.d.ts +9 -17
- package/dist/schemas/library/community.d.ts.map +1 -1
- package/dist/schemas/library/community.js +5 -5
- package/dist/schemas/library/community.js.map +1 -1
- package/dist/schemas/library/life.d.ts +3 -3
- package/dist/schemas/library/life.d.ts.map +1 -1
- package/dist/schemas/library/life.js +2 -2
- package/dist/schemas/library/life.js.map +1 -1
- package/dist/schemas/library/media.d.ts +148 -541
- package/dist/schemas/library/media.d.ts.map +1 -1
- package/dist/schemas/library/media.js +28 -64
- package/dist/schemas/library/media.js.map +1 -1
- package/dist/schemas/library/money.d.ts +8 -8
- package/dist/schemas/library/money.d.ts.map +1 -1
- package/dist/schemas/library/money.js +4 -4
- package/dist/schemas/library/money.js.map +1 -1
- package/dist/schemas/library/planning.d.ts +23 -87
- package/dist/schemas/library/planning.d.ts.map +1 -1
- package/dist/schemas/library/planning.js +10 -26
- package/dist/schemas/library/planning.js.map +1 -1
- package/dist/schemas/library/publishing.d.ts +14 -14
- package/dist/schemas/library/publishing.d.ts.map +1 -1
- package/dist/schemas/library/publishing.js +7 -7
- package/dist/schemas/library/publishing.js.map +1 -1
- package/dist/schemas/library/social.d.ts +2 -2
- package/dist/schemas/library/social.d.ts.map +1 -1
- package/dist/schemas/library/social.js +1 -1
- package/dist/schemas/library/social.js.map +1 -1
- package/dist/schemas/standard.d.ts +1 -1
- package/dist/schemas/standard.d.ts.map +1 -1
- package/dist/schemas/standard.js +3 -3
- package/dist/schemas/standard.js.map +1 -1
- package/dist/session/auth.d.ts +20 -0
- package/dist/session/auth.d.ts.map +1 -1
- package/dist/session/auth.js +81 -64
- package/dist/session/auth.js.map +1 -1
- package/dist/session/connect.d.ts +50 -8
- package/dist/session/connect.d.ts.map +1 -1
- package/dist/session/connect.js +91 -27
- package/dist/session/connect.js.map +1 -1
- package/dist/session/connection.d.ts +39 -6
- package/dist/session/connection.d.ts.map +1 -1
- package/dist/session/connection.js +107 -38
- package/dist/session/connection.js.map +1 -1
- package/dist/session/hosting.d.ts +15 -0
- package/dist/session/hosting.d.ts.map +1 -1
- package/dist/session/hosting.js +55 -4
- package/dist/session/hosting.js.map +1 -1
- package/dist/session/index.d.ts +5 -5
- package/dist/session/index.d.ts.map +1 -1
- package/dist/session/index.js +2 -2
- package/dist/session/index.js.map +1 -1
- package/dist/space/account-registry.d.ts +36 -4
- package/dist/space/account-registry.d.ts.map +1 -1
- package/dist/space/account-registry.js +30 -3
- package/dist/space/account-registry.js.map +1 -1
- package/dist/space/invitation.d.ts +61 -0
- package/dist/space/invitation.d.ts.map +1 -0
- package/dist/space/invitation.js +84 -0
- package/dist/space/invitation.js.map +1 -0
- package/dist/space/invite-link.d.ts +64 -0
- package/dist/space/invite-link.d.ts.map +1 -0
- package/dist/space/invite-link.js +212 -0
- package/dist/space/invite-link.js.map +1 -0
- package/dist/space/roles.d.ts +59 -140
- package/dist/space/roles.d.ts.map +1 -1
- package/dist/space/roles.js +328 -427
- package/dist/space/roles.js.map +1 -1
- package/dist/space/space-manager.d.ts +21 -6
- package/dist/space/space-manager.d.ts.map +1 -1
- package/dist/space/space-manager.js +40 -23
- package/dist/space/space-manager.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/docs/README.md +2 -2
- package/docs/actions.md +40 -40
- package/docs/agents.md +2 -2
- package/docs/automations.md +2 -2
- package/docs/blueprints-and-guides.md +61 -1
- package/docs/bots.md +1 -1
- package/docs/building-an-app.md +2 -2
- package/docs/contacts.md +48 -69
- package/docs/inbox.md +145 -0
- package/docs/node.md +135 -76
- package/docs/query-format.md +1 -1
- package/docs/sign-in.md +16 -9
- package/docs/spaces.md +33 -5
- package/docs/standard-library.md +111 -86
- package/docs/storage.md +1 -1
- package/package.json +5 -5
- package/dist/doors/doors.d.ts +0 -140
- package/dist/doors/doors.d.ts.map +0 -1
- package/dist/doors/doors.js +0 -226
- package/dist/doors/doors.js.map +0 -1
- package/dist/doors/index.d.ts +0 -9
- package/dist/doors/index.d.ts.map +0 -1
- package/dist/doors/index.js +0 -7
- package/dist/doors/index.js.map +0 -1
- package/docs/doors.md +0 -151
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loose versions (spec 02 §3.5): signed versions that belong to no space.
|
|
3
|
+
*
|
|
4
|
+
* A loose version is a version of 02 §3 with no `space`, `log` or `seen`, at
|
|
5
|
+
* `seq` 0. It is never stored in a space or synced: it is handed over, in a
|
|
6
|
+
* link, a QR code, a mailbox or sealed inside a record. Its collection says
|
|
7
|
+
* what it is (`sys.invitation`, `sys.inbox`, `sys.knock`), so a new kind is a
|
|
8
|
+
* new collection name and is checked the same way.
|
|
9
|
+
*
|
|
10
|
+
* It is checked as any version is, its shape, id and signature, and its
|
|
11
|
+
* `proof` against its `createdAt`. What a valid one counts as is its
|
|
12
|
+
* collection's business; no space's history or rules are consulted.
|
|
13
|
+
*/
|
|
14
|
+
import type { CryptoProvider, Version } from '../types.js';
|
|
15
|
+
import { type Delegation } from '../identity/ucan.js';
|
|
16
|
+
/** Who signs a loose version: a key, and the note that lets it act for its account (none when the account signs) */
|
|
17
|
+
export interface LooseSigner {
|
|
18
|
+
readonly did: string;
|
|
19
|
+
readonly key: CryptoKey;
|
|
20
|
+
readonly proof?: Delegation;
|
|
21
|
+
}
|
|
22
|
+
/** A loose version that checked out */
|
|
23
|
+
export interface CheckedLoose<T = unknown> {
|
|
24
|
+
readonly version: Version<T> & {
|
|
25
|
+
readonly body: T;
|
|
26
|
+
};
|
|
27
|
+
/** The account it speaks for: the note's issuer, or the author when there is none */
|
|
28
|
+
readonly root: string;
|
|
29
|
+
/** The note, when one was carried */
|
|
30
|
+
readonly note: Delegation | null;
|
|
31
|
+
/** `createdAt`, ms */
|
|
32
|
+
readonly at: number;
|
|
33
|
+
}
|
|
34
|
+
/** Signs a loose version */
|
|
35
|
+
export declare function signLoose<T>(signer: LooseSigner, collection: string, body: T, provider: CryptoProvider, options?: {
|
|
36
|
+
readonly to?: string;
|
|
37
|
+
readonly createdAt?: string;
|
|
38
|
+
}): Promise<Version<T> & {
|
|
39
|
+
readonly body: T;
|
|
40
|
+
}>;
|
|
41
|
+
/**
|
|
42
|
+
* Checks a loose version through: its shape, id, body and signature, and the
|
|
43
|
+
* note it carries, valid at its `createdAt` and made out to its author.
|
|
44
|
+
* @param collection The collection it must be in
|
|
45
|
+
* @returns It, with the account it speaks for, or null when it is anything less
|
|
46
|
+
*/
|
|
47
|
+
export declare function checkLoose(value: unknown, collection: string, provider: CryptoProvider): Promise<CheckedLoose | null>;
|
|
48
|
+
/** A loose version as text: base64url of its canonical JSON */
|
|
49
|
+
export declare function encodeLoose(version: Version): string;
|
|
50
|
+
/** Reads what `encodeLoose` wrote, or null when it isn't JSON in base64url */
|
|
51
|
+
export declare function decodeLoose(text: string): unknown;
|
|
52
|
+
//# sourceMappingURL=loose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loose.d.ts","sourceRoot":"","sources":["../../src/records/loose.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAK3D,OAAO,EAAuC,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAI3F,oHAAoH;AACpH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;CAC7B;AAED,uCAAuC;AACvC,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,OAAO;IACvC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG;QAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;KAAE,CAAC;IACpD,qFAAqF;IACrF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,qCAAqC;IACrC,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;IACjC,sBAAsB;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAKD,4BAA4B;AAC5B,wBAAsB,SAAS,CAAC,CAAC,EAC/B,MAAM,EAAE,WAAW,EACnB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,CAAC,EACP,QAAQ,EAAE,cAAc,EACxB,OAAO,GAAE;IAAE,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO,GAClE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;CAAE,CAAC,CAU5C;AAoBD;;;;;GAKG;AACH,wBAAsB,UAAU,CAC9B,KAAK,EAAE,OAAO,EACd,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAgB9B;AAED,+DAA+D;AAC/D,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAEpD;AAED,8EAA8E;AAC9E,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAMjD"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { createVersion, canonicalize } from '../schema/version.js';
|
|
2
|
+
import { createSigner } from '../schema/signer.js';
|
|
3
|
+
import { checkVersionShape } from './version.js';
|
|
4
|
+
import { didToPublicKey } from '../identity/did.js';
|
|
5
|
+
import { verifyNote, UCAN_CLOCK_SKEW_SECONDS } from '../identity/ucan.js';
|
|
6
|
+
import { base64UrlDecode, base64UrlEncode, utf8Decode, utf8Encode } from '../utils/encoding.js';
|
|
7
|
+
import { isRecord } from '../utils/guards.js';
|
|
8
|
+
/** Members a loose version never has */
|
|
9
|
+
const IN_A_SPACE = ['space', 'log', 'seen', 'prev', 'genesis', 'deleted', 'retain', 'links', 'tags'];
|
|
10
|
+
/** Signs a loose version */
|
|
11
|
+
export async function signLoose(signer, collection, body, provider, options = {}) {
|
|
12
|
+
const unsigned = createVersion({
|
|
13
|
+
author: signer.did,
|
|
14
|
+
collection,
|
|
15
|
+
body,
|
|
16
|
+
...(options.to ? { to: options.to } : {}),
|
|
17
|
+
...(options.createdAt ? { createdAt: options.createdAt } : {}),
|
|
18
|
+
...(signer.proof ? { proof: signer.proof } : {}),
|
|
19
|
+
});
|
|
20
|
+
return createSigner(provider).sign(unsigned, signer.key);
|
|
21
|
+
}
|
|
22
|
+
/** Why a value is not shaped as a loose version, or null */
|
|
23
|
+
function looseShapeProblem(value) {
|
|
24
|
+
if (!isRecord(value))
|
|
25
|
+
return 'It is not a version';
|
|
26
|
+
for (const member of IN_A_SPACE)
|
|
27
|
+
if (member in value)
|
|
28
|
+
return `A loose version has no ${member}`;
|
|
29
|
+
if (value.seq !== 0)
|
|
30
|
+
return 'A loose version is a first version';
|
|
31
|
+
if (typeof value.collection !== 'string' || value.collection.length === 0 || value.collection.length > 128)
|
|
32
|
+
return 'It names no collection';
|
|
33
|
+
if (typeof value.author !== 'string' || typeof value.signature !== 'string' || typeof value.id !== 'string')
|
|
34
|
+
return 'It is not signed';
|
|
35
|
+
if (typeof value.createdAt !== 'string' || !Number.isFinite(Date.parse(value.createdAt)))
|
|
36
|
+
return 'It has no time';
|
|
37
|
+
if (value.to !== undefined && (typeof value.to !== 'string' || value.to.length > 128))
|
|
38
|
+
return 'Its to is not a key';
|
|
39
|
+
if (!('body' in value))
|
|
40
|
+
return 'It has no body';
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- its members are checked one by one by checkVersionShape
|
|
42
|
+
return checkVersionShape(value);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Checks a loose version through: its shape, id, body and signature, and the
|
|
46
|
+
* note it carries, valid at its `createdAt` and made out to its author.
|
|
47
|
+
* @param collection The collection it must be in
|
|
48
|
+
* @returns It, with the account it speaks for, or null when it is anything less
|
|
49
|
+
*/
|
|
50
|
+
export async function checkLoose(value, collection, provider) {
|
|
51
|
+
if (looseShapeProblem(value) !== null || !isRecord(value) || value.collection !== collection)
|
|
52
|
+
return null;
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- shaped as one above; the signature decides the rest
|
|
54
|
+
const version = value;
|
|
55
|
+
const at = Date.parse(version.createdAt);
|
|
56
|
+
if (at > Date.now() + UCAN_CLOCK_SKEW_SECONDS * 1000)
|
|
57
|
+
return null;
|
|
58
|
+
try {
|
|
59
|
+
const key = await provider.importPublicKey(didToPublicKey(version.author).publicKeyBytes);
|
|
60
|
+
if (!(await createSigner(provider).verify(version, key)))
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
if (version.proof === undefined)
|
|
67
|
+
return Object.freeze({ version, root: version.author, note: null, at });
|
|
68
|
+
const checked = await verifyNote(version.proof, provider, { at: Math.floor(at / 1000) }).catch(() => null);
|
|
69
|
+
if (!checked?.valid || checked.audience !== version.author)
|
|
70
|
+
return null;
|
|
71
|
+
return Object.freeze({ version, root: checked.root, note: checked.note, at });
|
|
72
|
+
}
|
|
73
|
+
/** A loose version as text: base64url of its canonical JSON */
|
|
74
|
+
export function encodeLoose(version) {
|
|
75
|
+
return base64UrlEncode(utf8Encode(canonicalize(version)));
|
|
76
|
+
}
|
|
77
|
+
/** Reads what `encodeLoose` wrote, or null when it isn't JSON in base64url */
|
|
78
|
+
export function decodeLoose(text) {
|
|
79
|
+
try {
|
|
80
|
+
return JSON.parse(utf8Decode(base64UrlDecode(text.trim())));
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
return null;
|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IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IAC3G,IAAI,CAAC,OAAO,EAAE,KAAK,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IACxE,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;AAChF,CAAC;AAED,+DAA+D;AAC/D,MAAM,UAAU,WAAW,CAAC,OAAgB;IAC1C,OAAO,eAAe,CAAC,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAC5D,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC9D,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
package/dist/schema/version.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export interface CreateVersionParams<T> {
|
|
|
8
8
|
readonly createdAt?: string;
|
|
9
9
|
/** Space this version belongs to */
|
|
10
10
|
readonly space?: string;
|
|
11
|
+
/** A loose version's recipient key (02 §3.5) */
|
|
12
|
+
readonly to?: string;
|
|
11
13
|
/** The note authorizing this author, when signing with a delegated key */
|
|
12
14
|
readonly proof?: Delegation;
|
|
13
15
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/schema/version.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,aAA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1E;AAED,6EAA6E;AAC7E,wBAAsB,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAEtE"}
|
package/dist/schema/version.js
CHANGED
|
@@ -32,8 +32,9 @@ export function createVersion(params) {
|
|
|
32
32
|
author: params.author,
|
|
33
33
|
collection: params.collection,
|
|
34
34
|
body: params.body,
|
|
35
|
-
createdAt: params.createdAt ?? new Date().toISOString(),
|
|
35
|
+
createdAt: params.createdAt ?? new Date(Date.now()).toISOString(),
|
|
36
36
|
...(params.space ? { space: params.space } : {}),
|
|
37
|
+
...(params.to ? { to: params.to } : {}),
|
|
37
38
|
...(params.proof ? { proof: params.proof } : {}),
|
|
38
39
|
key: params.version?.key ?? base32Encode(globalThis.crypto.getRandomValues(new Uint8Array(16))),
|
|
39
40
|
seq: params.version?.seq ?? 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/schema/version.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/schema/version.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAwC9C;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,GAAY;IACvC,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACvB,OAAO,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,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1D,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which standard collection holds what: the short map an agent reads before
|
|
3
|
+
* the library (`collections_standard`), and the look-alikes it is warned of
|
|
4
|
+
* when it proposes a collection of its own that the library already has
|
|
5
|
+
* (`collections_propose`). Apps read each other's records only when they
|
|
6
|
+
* reach for the same collection, so the cheapest moment to steer is the one
|
|
7
|
+
* where a twin is about to be made. See "How the library is shaped" in
|
|
8
|
+
* `packages/core/docs/standard-library.md`.
|
|
9
|
+
*/
|
|
10
|
+
import type { DefineCollection } from '../node/types.js';
|
|
11
|
+
/** What to use for what, one line each */
|
|
12
|
+
export declare const CHOOSING: ReadonlyArray<string>;
|
|
13
|
+
/**
|
|
14
|
+
* What in a collection of an app's own looks like one the library already
|
|
15
|
+
* has, each as a sentence to show the agent proposing it. Not a refusal: an
|
|
16
|
+
* app may have its reasons, and the person applying the blueprint decides.
|
|
17
|
+
*/
|
|
18
|
+
export declare function lookalikes(definition: DefineCollection): string[];
|
|
19
|
+
//# sourceMappingURL=choosing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"choosing.d.ts","sourceRoot":"","sources":["../../src/schemas/choosing.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAGzD,0CAA0C;AAC1C,eAAO,MAAM,QAAQ,EAAE,aAAa,CAAC,MAAM,CAWzC,CAAC;AAgCH;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,UAAU,EAAE,gBAAgB,GAAG,MAAM,EAAE,CAuBjE"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { isRecord } from '../utils/guards.js';
|
|
2
|
+
/** What to use for what, one line each */
|
|
3
|
+
export const CHOOSING = Object.freeze([
|
|
4
|
+
'Any file (a photo, video, recording, PDF): std.file. On a record, link it "about" that record.',
|
|
5
|
+
'A group that exists while empty (a folder, album, playlist, category, checklist): std.list, with a std.list-item "in" it, "about" each member.',
|
|
6
|
+
'A loose label on a record (#urgent): std.tag.',
|
|
7
|
+
'Something to do: std.task, "in" a std.column on a board.',
|
|
8
|
+
'Something happening at a time: std.event; answers to it: std.rsvp.',
|
|
9
|
+
'Chat, in order: std.message, "in" a std.channel when there are several. A remark on a record: std.comment. A feed: std.post.',
|
|
10
|
+
'A quick question: std.poll and std.vote. A decision: std.proposal, std.ballot and std.decision.',
|
|
11
|
+
'Taking something on, first come (a task, a slot to book, an item to bring): std.claim.',
|
|
12
|
+
'More fields on a standard record: a collection of your own with an "about" link to it and onePer ["link:about"]. Never a copy of the standard one.',
|
|
13
|
+
'Where a record sits (a channel, column, list, calendar): the link role "in".',
|
|
14
|
+
]);
|
|
15
|
+
/** A definition's fields, when its schema is JSON Schema; a validator's (Zod and the like) say none */
|
|
16
|
+
const propertiesOf = (definition) => {
|
|
17
|
+
const { schema } = definition;
|
|
18
|
+
return isRecord(schema) && isRecord(schema.properties) ? schema.properties : {};
|
|
19
|
+
};
|
|
20
|
+
/** Whether a field holds a file, as `records.addFile` gives one */
|
|
21
|
+
const holdsFile = (definition) => Object.values(propertiesOf(definition)).some((field) => isRecord(field) &&
|
|
22
|
+
isRecord(field.properties) &&
|
|
23
|
+
'hash' in field.properties &&
|
|
24
|
+
'mime' in field.properties);
|
|
25
|
+
/** Link roles that say where a record sits, which the library calls `in` */
|
|
26
|
+
const PLACES = [
|
|
27
|
+
'folder',
|
|
28
|
+
'album',
|
|
29
|
+
'playlist',
|
|
30
|
+
'category',
|
|
31
|
+
'channel',
|
|
32
|
+
'column',
|
|
33
|
+
'board',
|
|
34
|
+
'project',
|
|
35
|
+
'calendar',
|
|
36
|
+
'list',
|
|
37
|
+
];
|
|
38
|
+
/**
|
|
39
|
+
* What in a collection of an app's own looks like one the library already
|
|
40
|
+
* has, each as a sentence to show the agent proposing it. Not a refusal: an
|
|
41
|
+
* app may have its reasons, and the person applying the blueprint decides.
|
|
42
|
+
*/
|
|
43
|
+
export function lookalikes(definition) {
|
|
44
|
+
if (definition.name.startsWith('std.'))
|
|
45
|
+
return [];
|
|
46
|
+
const fields = new Set(Object.keys(propertiesOf(definition)));
|
|
47
|
+
const has = (...names) => names.some((name) => fields.has(name));
|
|
48
|
+
const said = [];
|
|
49
|
+
const twin = (std, why) => said.push(`${definition.name} ${why}, like ${std}. Use ${std} so other apps read these records; ` +
|
|
50
|
+
`for fields of your own, keep a collection about each ${std} record instead.`);
|
|
51
|
+
if (holdsFile(definition) && !has('title', 'question', 'price'))
|
|
52
|
+
twin('std.file', 'keeps a file');
|
|
53
|
+
else if (has('start', 'startsAt') && has('title', 'name'))
|
|
54
|
+
twin('std.event', 'is something at a time');
|
|
55
|
+
else if (has('title') && has('done', 'due', 'assignees', 'status'))
|
|
56
|
+
twin('std.task', 'is something to do');
|
|
57
|
+
else if (has('question') && has('options'))
|
|
58
|
+
twin('std.poll', 'asks a question with options');
|
|
59
|
+
else if (has('emoji') && fields.size <= 2)
|
|
60
|
+
twin('std.reaction', 'is a reaction');
|
|
61
|
+
else if (has('label', 'tag') && fields.size <= 2)
|
|
62
|
+
twin('std.tag', 'is a label');
|
|
63
|
+
for (const role of Object.keys(definition.links ?? {}))
|
|
64
|
+
if (PLACES.includes(role))
|
|
65
|
+
said.push(`${definition.name} says where a record sits with "${role}": the library calls that link "in", ` +
|
|
66
|
+
'so other apps follow it.');
|
|
67
|
+
return said;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=choosing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"choosing.js","sourceRoot":"","sources":["../../src/schemas/choosing.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,0CAA0C;AAC1C,MAAM,CAAC,MAAM,QAAQ,GAA0B,MAAM,CAAC,MAAM,CAAC;IAC3D,gGAAgG;IAChG,gJAAgJ;IAChJ,+CAA+C;IAC/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AQ,CAAC,IAAI,CAAC;YACvB,IAAI,CAAC,IAAI,CACP,GAAG,UAAU,CAAC,IAAI,mCAAmC,IAAI,uCAAuC;gBAC9F,0BAA0B,CAC7B,CAAC;IACN,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -28,12 +28,7 @@ export declare const contact: {
|
|
|
28
28
|
};
|
|
29
29
|
readonly blocked: {
|
|
30
30
|
readonly type: "boolean";
|
|
31
|
-
readonly description: "Their
|
|
32
|
-
};
|
|
33
|
-
readonly door: {
|
|
34
|
-
readonly type: "string";
|
|
35
|
-
readonly maxLength: 64;
|
|
36
|
-
readonly description: "The door they knocked on, while your answer is still to be written in your space for two";
|
|
31
|
+
readonly description: "Their knocks are hidden, in every space and in your inbox";
|
|
37
32
|
};
|
|
38
33
|
};
|
|
39
34
|
readonly required: readonly ["did", "name"];
|
|
@@ -47,26 +42,25 @@ export declare const contact: {
|
|
|
47
42
|
readonly space?: string | undefined;
|
|
48
43
|
readonly note?: string | undefined;
|
|
49
44
|
readonly blocked?: boolean | undefined;
|
|
50
|
-
readonly door?: string | undefined;
|
|
51
45
|
}>;
|
|
52
46
|
export type Contact = BodyOf<typeof contact>;
|
|
53
|
-
/**
|
|
47
|
+
/** A knock left in a space both belong to: sealed to their contact key, so only they open it. */
|
|
54
48
|
export declare const contactRequest: {
|
|
55
49
|
readonly name: "std.contact-request";
|
|
56
50
|
readonly title: "Contact request";
|
|
57
|
-
readonly description: "
|
|
51
|
+
readonly description: "A knock left for someone in a space you share, sealed so only they can open it.";
|
|
58
52
|
readonly schema: {
|
|
59
53
|
readonly type: "object";
|
|
60
54
|
readonly properties: {
|
|
61
55
|
readonly to: {
|
|
62
56
|
readonly type: "string";
|
|
63
|
-
readonly maxLength:
|
|
64
|
-
readonly description: "
|
|
57
|
+
readonly maxLength: 64;
|
|
58
|
+
readonly description: "Their contact key, as on their profile here";
|
|
65
59
|
};
|
|
66
60
|
readonly sealed: {
|
|
67
61
|
readonly type: "string";
|
|
68
62
|
readonly maxLength: 16000;
|
|
69
|
-
readonly description: "The
|
|
63
|
+
readonly description: "The knock, sealed to it (spec 07 §6)";
|
|
70
64
|
};
|
|
71
65
|
};
|
|
72
66
|
readonly required: readonly ["to", "sealed"];
|
|
@@ -77,35 +71,23 @@ export declare const contactRequest: {
|
|
|
77
71
|
}>;
|
|
78
72
|
export type ContactRequestRecord = BodyOf<typeof contactRequest>;
|
|
79
73
|
/**
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* is deleting the record.
|
|
74
|
+
* Your inbox (`node.inbox`): which one it is and where its knocks wait. Its
|
|
75
|
+
* keys are derived from the contact key and `gen`; a new `gen` is a new inbox,
|
|
76
|
+
* and codes for the old one stop working. The newest record is the inbox.
|
|
84
77
|
*/
|
|
85
|
-
export declare const
|
|
86
|
-
readonly name: "std.
|
|
87
|
-
readonly title: "
|
|
88
|
-
readonly description: "
|
|
78
|
+
export declare const inbox: {
|
|
79
|
+
readonly name: "std.inbox";
|
|
80
|
+
readonly title: "Inbox";
|
|
81
|
+
readonly description: "Where people you share no space with can ask to become your contact.";
|
|
89
82
|
readonly schema: {
|
|
90
83
|
readonly type: "object";
|
|
91
84
|
readonly properties: {
|
|
92
|
-
readonly
|
|
93
|
-
readonly type: "
|
|
94
|
-
readonly
|
|
95
|
-
readonly
|
|
96
|
-
readonly description: "Random; the door key is derived from it";
|
|
97
|
-
};
|
|
98
|
-
readonly label: {
|
|
99
|
-
readonly type: "string";
|
|
100
|
-
readonly maxLength: 64;
|
|
101
|
-
readonly description: "What you call this door — only you see it";
|
|
85
|
+
readonly gen: {
|
|
86
|
+
readonly type: "integer";
|
|
87
|
+
readonly minimum: 0;
|
|
88
|
+
readonly description: "Which inbox: its keys are derived from it";
|
|
102
89
|
};
|
|
103
|
-
readonly
|
|
104
|
-
readonly type: "string";
|
|
105
|
-
readonly maxLength: 64;
|
|
106
|
-
readonly description: "The name its code gives, shown to whoever knocks";
|
|
107
|
-
};
|
|
108
|
-
readonly relays: {
|
|
90
|
+
readonly places: {
|
|
109
91
|
readonly type: "array";
|
|
110
92
|
readonly items: {
|
|
111
93
|
readonly type: "string";
|
|
@@ -115,28 +97,29 @@ export declare const door: {
|
|
|
115
97
|
readonly maxItems: 3;
|
|
116
98
|
readonly description: "Whose mailboxes hold its knocks";
|
|
117
99
|
};
|
|
100
|
+
readonly name: {
|
|
101
|
+
readonly type: "string";
|
|
102
|
+
readonly maxLength: 64;
|
|
103
|
+
readonly description: "The name its code gives, shown to whoever knocks";
|
|
104
|
+
};
|
|
118
105
|
};
|
|
119
|
-
readonly required: readonly ["
|
|
120
|
-
};
|
|
121
|
-
readonly rules: {
|
|
122
|
-
readonly onePer: readonly ["id"];
|
|
106
|
+
readonly required: readonly ["gen", "places"];
|
|
123
107
|
};
|
|
124
108
|
} & import("../index.js").Typed<{
|
|
125
|
-
readonly
|
|
126
|
-
readonly
|
|
109
|
+
readonly gen: number;
|
|
110
|
+
readonly places: readonly string[];
|
|
127
111
|
readonly name?: string | undefined;
|
|
128
|
-
readonly relays: readonly string[];
|
|
129
112
|
}>;
|
|
130
|
-
export type
|
|
113
|
+
export type Inbox = BodyOf<typeof inbox>;
|
|
131
114
|
/**
|
|
132
|
-
* A knock you left on someone's
|
|
133
|
-
* know who they are until they
|
|
115
|
+
* A knock you left on someone's inbox, waiting for them to join the space for
|
|
116
|
+
* two. You don't know who they are until they do; then it becomes a
|
|
134
117
|
* `std.contact`, and this goes.
|
|
135
118
|
*/
|
|
136
119
|
export declare const knock: {
|
|
137
120
|
readonly name: "std.knock";
|
|
138
121
|
readonly title: "Knock";
|
|
139
|
-
readonly description: "A knock left on
|
|
122
|
+
readonly description: "A knock left on an inbox, waiting for them to join.";
|
|
140
123
|
readonly schema: {
|
|
141
124
|
readonly type: "object";
|
|
142
125
|
readonly properties: {
|
|
@@ -148,25 +131,15 @@ export declare const knock: {
|
|
|
148
131
|
readonly name: {
|
|
149
132
|
readonly type: "string";
|
|
150
133
|
readonly maxLength: 64;
|
|
151
|
-
readonly description: "The name their
|
|
152
|
-
};
|
|
153
|
-
readonly door: {
|
|
154
|
-
readonly type: "string";
|
|
155
|
-
readonly maxLength: 64;
|
|
156
|
-
readonly description: "The door key knocked on";
|
|
157
|
-
};
|
|
158
|
-
readonly sign: {
|
|
159
|
-
readonly type: "string";
|
|
160
|
-
readonly maxLength: 64;
|
|
161
|
-
readonly description: "The door's signing key, which their answer must be signed with";
|
|
134
|
+
readonly description: "The name their inbox code gave";
|
|
162
135
|
};
|
|
163
136
|
readonly invite: {
|
|
164
137
|
readonly type: "string";
|
|
165
|
-
readonly maxLength:
|
|
166
|
-
readonly description: "The invite sent, to close once they
|
|
138
|
+
readonly maxLength: 12000;
|
|
139
|
+
readonly description: "The invite sent, to close once they join";
|
|
167
140
|
};
|
|
168
141
|
};
|
|
169
|
-
readonly required: readonly ["space", "name", "
|
|
142
|
+
readonly required: readonly ["space", "name", "invite"];
|
|
170
143
|
};
|
|
171
144
|
readonly rules: {
|
|
172
145
|
readonly onePer: readonly ["space"];
|
|
@@ -174,33 +147,7 @@ export declare const knock: {
|
|
|
174
147
|
} & import("../index.js").Typed<{
|
|
175
148
|
readonly space: string;
|
|
176
149
|
readonly name: string;
|
|
177
|
-
readonly door: string;
|
|
178
|
-
readonly sign: string;
|
|
179
150
|
readonly invite: string;
|
|
180
151
|
}>;
|
|
181
152
|
export type Knock = BodyOf<typeof knock>;
|
|
182
|
-
/**
|
|
183
|
-
* The answer to a knock, in the space for two: the door's owner, signing with
|
|
184
|
-
* the door's signing key that the account writing this is theirs. It is how
|
|
185
|
-
* the knocker tells the person behind the door from anyone the invite reached.
|
|
186
|
-
*/
|
|
187
|
-
export declare const knockAnswer: {
|
|
188
|
-
readonly name: "std.knock-answer";
|
|
189
|
-
readonly title: "Knock answer";
|
|
190
|
-
readonly description: "Proof that the account which joined is the one behind the door knocked on.";
|
|
191
|
-
readonly schema: {
|
|
192
|
-
readonly type: "object";
|
|
193
|
-
readonly properties: {
|
|
194
|
-
readonly sig: {
|
|
195
|
-
readonly type: "string";
|
|
196
|
-
readonly maxLength: 200;
|
|
197
|
-
readonly description: "The door signing key over \"minca/knock-answer/v1|<space>|<account>\"";
|
|
198
|
-
};
|
|
199
|
-
};
|
|
200
|
-
readonly required: readonly ["sig"];
|
|
201
|
-
};
|
|
202
|
-
} & import("../index.js").Typed<{
|
|
203
|
-
readonly sig: string;
|
|
204
|
-
}>;
|
|
205
|
-
export type KnockAnswer = BodyOf<typeof knockAnswer>;
|
|
206
153
|
//# sourceMappingURL=contacts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contacts.d.ts","sourceRoot":"","sources":["../../src/schemas/contacts.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,gFAAgF;AAChF,eAAO,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"contacts.d.ts","sourceRoot":"","sources":["../../src/schemas/contacts.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,gFAAgF;AAChF,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBlB,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,OAAO,CAAC,CAAC;AAE7C,iGAAiG;AACjG,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;EAYzB,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC;AAEjE;;;;GAIG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBhB,CAAC;AACH,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,KAAK,CAAC,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAchB,CAAC;AACH,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,KAAK,CAAC,CAAC"}
|