@joe-broadhead/messaging 0.0.0-stage → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +220 -0
- package/LICENSE +21 -0
- package/NOTICE +12 -0
- package/README.md +36 -2
- package/dist/bin/messaging-mcp.js +26524 -0
- package/dist/bin/messaging-relay.js +19768 -0
- package/dist/bin/messaging.js +15465 -0
- package/dist/bin/messagingd.js +29449 -0
- package/dist/lib/core-testing.js +1 -0
- package/dist/lib/core.js +1 -0
- package/dist/lib/ipc-testing.js +1 -0
- package/dist/lib/ipc.js +1 -0
- package/dist/lib/modules/core/address.js +42 -0
- package/dist/lib/modules/core/agent/operations.js +595 -0
- package/dist/lib/modules/core/agent/present.js +244 -0
- package/dist/lib/modules/core/agent/text.js +79 -0
- package/dist/lib/modules/core/agent-tools.js +477 -0
- package/dist/lib/modules/core/b64u.js +20 -0
- package/dist/lib/modules/core/cards.js +55 -0
- package/dist/lib/modules/core/check.js +20 -0
- package/dist/lib/modules/core/consent.js +199 -0
- package/dist/lib/modules/core/contact-card.js +74 -0
- package/dist/lib/modules/core/conversation/context.js +80 -0
- package/dist/lib/modules/core/conversation/event.js +100 -0
- package/dist/lib/modules/core/conversation/ids.js +38 -0
- package/dist/lib/modules/core/conversation/link.js +35 -0
- package/dist/lib/modules/core/conversation/log.js +766 -0
- package/dist/lib/modules/core/conversation/ratchet.js +243 -0
- package/dist/lib/modules/core/conversation/seal.js +198 -0
- package/dist/lib/modules/core/delegation.js +174 -0
- package/dist/lib/modules/core/directory/device-log.js +258 -0
- package/dist/lib/modules/core/directory/epoch.js +103 -0
- package/dist/lib/modules/core/directory/handle.js +29 -0
- package/dist/lib/modules/core/directory/jelly-device.js +204 -0
- package/dist/lib/modules/core/directory/jelly-issuer.js +12 -0
- package/dist/lib/modules/core/directory/jelly-token.js +305 -0
- package/dist/lib/modules/core/directory/keys-statement.js +43 -0
- package/dist/lib/modules/core/directory/link.js +81 -0
- package/dist/lib/modules/core/directory/merkle-log.js +250 -0
- package/dist/lib/modules/core/directory/person-view.js +197 -0
- package/dist/lib/modules/core/directory/person.js +40 -0
- package/dist/lib/modules/core/directory/realm.js +59 -0
- package/dist/lib/modules/core/directory/smt.js +266 -0
- package/dist/lib/modules/core/envelope.js +320 -0
- package/dist/lib/modules/core/hash.js +5 -0
- package/dist/lib/modules/core/head.js +27 -0
- package/dist/lib/modules/core/identity.js +71 -0
- package/dist/lib/modules/core/index.js +53 -0
- package/dist/lib/modules/core/jcs.js +96 -0
- package/dist/lib/modules/core/jelly-host-double.js +35 -0
- package/dist/lib/modules/core/jelly-host.js +211 -0
- package/dist/lib/modules/core/keys.js +79 -0
- package/dist/lib/modules/core/peer-text.js +563 -0
- package/dist/lib/modules/core/realm.js +1 -0
- package/dist/lib/modules/core/roster.js +454 -0
- package/dist/lib/modules/core/schema/a2a.js +85 -0
- package/dist/lib/modules/core/schema/common.js +310 -0
- package/dist/lib/modules/core/schema/consent.js +120 -0
- package/dist/lib/modules/core/schema/conversation.js +292 -0
- package/dist/lib/modules/core/schema/delegation.js +58 -0
- package/dist/lib/modules/core/schema/directory-frames.js +270 -0
- package/dist/lib/modules/core/schema/directory.js +169 -0
- package/dist/lib/modules/core/schema/envelope.js +211 -0
- package/dist/lib/modules/core/schema/errors.js +104 -0
- package/dist/lib/modules/core/schema/index.js +16 -0
- package/dist/lib/modules/core/schema/ipc/consent.js +181 -0
- package/dist/lib/modules/core/schema/ipc/device.js +276 -0
- package/dist/lib/modules/core/schema/ipc/jelly.js +189 -0
- package/dist/lib/modules/core/schema/ipc/shapes.js +185 -0
- package/dist/lib/modules/core/schema/ipc/surfaces.js +223 -0
- package/dist/lib/modules/core/schema/ipc.js +451 -0
- package/dist/lib/modules/core/schema/jelly.js +122 -0
- package/dist/lib/modules/core/schema/realm.js +27 -0
- package/dist/lib/modules/core/schema/relay.js +112 -0
- package/dist/lib/modules/core/schema/roster.js +126 -0
- package/dist/lib/modules/core/sign.js +43 -0
- package/dist/lib/modules/core/task.js +37 -0
- package/dist/lib/modules/core/testing.js +21 -0
- package/dist/lib/modules/core/ulid.js +36 -0
- package/dist/lib/modules/core/version.js +6 -0
- package/dist/lib/modules/core/wire.js +255 -0
- package/dist/lib/modules/ipc/client.js +289 -0
- package/dist/lib/modules/ipc/framing.js +33 -0
- package/dist/lib/modules/ipc/index.js +6 -0
- package/dist/lib/modules/ipc/paths.js +102 -0
- package/dist/lib/modules/ipc/pipes.js +65 -0
- package/dist/lib/modules/ipc/rpc.js +8 -0
- package/dist/lib/modules/ipc/server.js +317 -0
- package/dist/lib/modules/ipc/testing.js +145 -0
- package/dist/lib/modules/ipc/trust.js +166 -0
- package/dist/lib/modules/ipc/windows-acl.js +275 -0
- package/dist/lib/modules/vendor/zod/index.js +7 -0
- package/dist/lib/modules/vendor/zod/v4/classic/checks.js +1 -0
- package/dist/lib/modules/vendor/zod/v4/classic/coerce.js +17 -0
- package/dist/lib/modules/vendor/zod/v4/classic/compat.js +31 -0
- package/dist/lib/modules/vendor/zod/v4/classic/deep-partial.js +13 -0
- package/dist/lib/modules/vendor/zod/v4/classic/errors.js +57 -0
- package/dist/lib/modules/vendor/zod/v4/classic/external.js +17 -0
- package/dist/lib/modules/vendor/zod/v4/classic/from-json-schema.js +881 -0
- package/dist/lib/modules/vendor/zod/v4/classic/in-out.js +36 -0
- package/dist/lib/modules/vendor/zod/v4/classic/iso.js +15 -0
- package/dist/lib/modules/vendor/zod/v4/classic/parse.js +16 -0
- package/dist/lib/modules/vendor/zod/v4/classic/schemas.js +1535 -0
- package/dist/lib/modules/vendor/zod/v4/core/api.js +1107 -0
- package/dist/lib/modules/vendor/zod/v4/core/checks.js +516 -0
- package/dist/lib/modules/vendor/zod/v4/core/compile.js +1866 -0
- package/dist/lib/modules/vendor/zod/v4/core/core.js +141 -0
- package/dist/lib/modules/vendor/zod/v4/core/doc.js +38 -0
- package/dist/lib/modules/vendor/zod/v4/core/errors.js +267 -0
- package/dist/lib/modules/vendor/zod/v4/core/index.js +19 -0
- package/dist/lib/modules/vendor/zod/v4/core/json-schema-generator.js +99 -0
- package/dist/lib/modules/vendor/zod/v4/core/json-schema-processors.js +843 -0
- package/dist/lib/modules/vendor/zod/v4/core/json-schema.js +1 -0
- package/dist/lib/modules/vendor/zod/v4/core/memoizer.js +311 -0
- package/dist/lib/modules/vendor/zod/v4/core/parse.js +175 -0
- package/dist/lib/modules/vendor/zod/v4/core/regexes.js +156 -0
- package/dist/lib/modules/vendor/zod/v4/core/registries.js +51 -0
- package/dist/lib/modules/vendor/zod/v4/core/schemas.js +2636 -0
- package/dist/lib/modules/vendor/zod/v4/core/to-json-schema.js +651 -0
- package/dist/lib/modules/vendor/zod/v4/core/util.js +873 -0
- package/dist/lib/modules/vendor/zod/v4/core/versions.js +5 -0
- package/dist/lib/modules/vendor/zod/v4/core/visit.js +169 -0
- package/dist/lib/modules/vendor/zod/v4/locales/ar.js +111 -0
- package/dist/lib/modules/vendor/zod/v4/locales/az.js +110 -0
- package/dist/lib/modules/vendor/zod/v4/locales/be.js +168 -0
- package/dist/lib/modules/vendor/zod/v4/locales/bg.js +125 -0
- package/dist/lib/modules/vendor/zod/v4/locales/bn.js +113 -0
- package/dist/lib/modules/vendor/zod/v4/locales/ca.js +112 -0
- package/dist/lib/modules/vendor/zod/v4/locales/ckb.js +133 -0
- package/dist/lib/modules/vendor/zod/v4/locales/cs.js +116 -0
- package/dist/lib/modules/vendor/zod/v4/locales/da.js +120 -0
- package/dist/lib/modules/vendor/zod/v4/locales/de.js +113 -0
- package/dist/lib/modules/vendor/zod/v4/locales/el.js +112 -0
- package/dist/lib/modules/vendor/zod/v4/locales/en.js +125 -0
- package/dist/lib/modules/vendor/zod/v4/locales/eo.js +114 -0
- package/dist/lib/modules/vendor/zod/v4/locales/es.js +136 -0
- package/dist/lib/modules/vendor/zod/v4/locales/fa.js +119 -0
- package/dist/lib/modules/vendor/zod/v4/locales/fi.js +117 -0
- package/dist/lib/modules/vendor/zod/v4/locales/fr-CA.js +112 -0
- package/dist/lib/modules/vendor/zod/v4/locales/fr.js +129 -0
- package/dist/lib/modules/vendor/zod/v4/locales/gu.js +113 -0
- package/dist/lib/modules/vendor/zod/v4/locales/he.js +221 -0
- package/dist/lib/modules/vendor/zod/v4/locales/hi.js +111 -0
- package/dist/lib/modules/vendor/zod/v4/locales/hr.js +126 -0
- package/dist/lib/modules/vendor/zod/v4/locales/hu.js +113 -0
- package/dist/lib/modules/vendor/zod/v4/locales/hy.js +158 -0
- package/dist/lib/modules/vendor/zod/v4/locales/id.js +111 -0
- package/dist/lib/modules/vendor/zod/v4/locales/index.js +63 -0
- package/dist/lib/modules/vendor/zod/v4/locales/is.js +114 -0
- package/dist/lib/modules/vendor/zod/v4/locales/it.js +113 -0
- package/dist/lib/modules/vendor/zod/v4/locales/ja.js +112 -0
- package/dist/lib/modules/vendor/zod/v4/locales/ka.js +117 -0
- package/dist/lib/modules/vendor/zod/v4/locales/kh.js +5 -0
- package/dist/lib/modules/vendor/zod/v4/locales/km.js +115 -0
- package/dist/lib/modules/vendor/zod/v4/locales/kn.js +116 -0
- package/dist/lib/modules/vendor/zod/v4/locales/ko.js +116 -0
- package/dist/lib/modules/vendor/zod/v4/locales/lt.js +207 -0
- package/dist/lib/modules/vendor/zod/v4/locales/mk.js +114 -0
- package/dist/lib/modules/vendor/zod/v4/locales/ms.js +112 -0
- package/dist/lib/modules/vendor/zod/v4/locales/ne.js +111 -0
- package/dist/lib/modules/vendor/zod/v4/locales/nl.js +115 -0
- package/dist/lib/modules/vendor/zod/v4/locales/nn.js +113 -0
- package/dist/lib/modules/vendor/zod/v4/locales/no.js +113 -0
- package/dist/lib/modules/vendor/zod/v4/locales/ota.js +114 -0
- package/dist/lib/modules/vendor/zod/v4/locales/pl.js +114 -0
- package/dist/lib/modules/vendor/zod/v4/locales/ps.js +119 -0
- package/dist/lib/modules/vendor/zod/v4/locales/pt-BR.js +143 -0
- package/dist/lib/modules/vendor/zod/v4/locales/pt.js +142 -0
- package/dist/lib/modules/vendor/zod/v4/locales/ro.js +122 -0
- package/dist/lib/modules/vendor/zod/v4/locales/ru.js +168 -0
- package/dist/lib/modules/vendor/zod/v4/locales/sk.js +116 -0
- package/dist/lib/modules/vendor/zod/v4/locales/sl.js +114 -0
- package/dist/lib/modules/vendor/zod/v4/locales/sv.js +115 -0
- package/dist/lib/modules/vendor/zod/v4/locales/ta.js +115 -0
- package/dist/lib/modules/vendor/zod/v4/locales/tg.js +117 -0
- package/dist/lib/modules/vendor/zod/v4/locales/th.js +115 -0
- package/dist/lib/modules/vendor/zod/v4/locales/tk.js +107 -0
- package/dist/lib/modules/vendor/zod/v4/locales/tr.js +110 -0
- package/dist/lib/modules/vendor/zod/v4/locales/ua.js +5 -0
- package/dist/lib/modules/vendor/zod/v4/locales/uk.js +113 -0
- package/dist/lib/modules/vendor/zod/v4/locales/ur.js +115 -0
- package/dist/lib/modules/vendor/zod/v4/locales/uz.js +113 -0
- package/dist/lib/modules/vendor/zod/v4/locales/vi.js +113 -0
- package/dist/lib/modules/vendor/zod/v4/locales/yo.js +112 -0
- package/dist/lib/modules/vendor/zod/v4/locales/zh-CN.js +114 -0
- package/dist/lib/modules/vendor/zod/v4/locales/zh-TW.js +112 -0
- package/dist/lib/testing-jelly-id.js +1219 -0
- package/dist/lib/zod.js +1 -0
- package/dist/spec/messaging-v1.md +3744 -0
- package/dist/third-party-notices.md +239 -0
- package/dist/third-party.json +88 -0
- package/dist/types/core/address.d.ts +16 -0
- package/dist/types/core/agent/operations.d.ts +129 -0
- package/dist/types/core/agent/present.d.ts +57 -0
- package/dist/types/core/agent/text.d.ts +62 -0
- package/dist/types/core/agent-tools.d.ts +966 -0
- package/dist/types/core/b64u.d.ts +6 -0
- package/dist/types/core/cards.d.ts +21 -0
- package/dist/types/core/check.d.ts +10 -0
- package/dist/types/core/consent.d.ts +132 -0
- package/dist/types/core/contact-card.d.ts +34 -0
- package/dist/types/core/conversation/context.d.ts +56 -0
- package/dist/types/core/conversation/event.d.ts +36 -0
- package/dist/types/core/conversation/ids.d.ts +18 -0
- package/dist/types/core/conversation/link.d.ts +16 -0
- package/dist/types/core/conversation/log.d.ts +142 -0
- package/dist/types/core/conversation/ratchet.d.ts +95 -0
- package/dist/types/core/conversation/seal.d.ts +47 -0
- package/dist/types/core/delegation.d.ts +71 -0
- package/dist/types/core/directory/device-log.d.ts +119 -0
- package/dist/types/core/directory/epoch.d.ts +53 -0
- package/dist/types/core/directory/handle.d.ts +11 -0
- package/dist/types/core/directory/jelly-device.d.ts +88 -0
- package/dist/types/core/directory/jelly-issuer.d.ts +8 -0
- package/dist/types/core/directory/jelly-token.d.ts +116 -0
- package/dist/types/core/directory/keys-statement.d.ts +22 -0
- package/dist/types/core/directory/link.d.ts +36 -0
- package/dist/types/core/directory/merkle-log.d.ts +40 -0
- package/dist/types/core/directory/person-view.d.ts +90 -0
- package/dist/types/core/directory/person.d.ts +8 -0
- package/dist/types/core/directory/realm.d.ts +23 -0
- package/dist/types/core/directory/smt.d.ts +52 -0
- package/dist/types/core/envelope.d.ts +68 -0
- package/dist/types/core/hash.d.ts +2 -0
- package/dist/types/core/head.d.ts +34 -0
- package/dist/types/core/identity.d.ts +35 -0
- package/dist/types/core/index.d.ts +45 -0
- package/dist/types/core/jcs.d.ts +12 -0
- package/dist/types/core/jelly-host-double.d.ts +21 -0
- package/dist/types/core/jelly-host.d.ts +86 -0
- package/dist/types/core/keys.d.ts +16 -0
- package/dist/types/core/peer-text.d.ts +87 -0
- package/dist/types/core/realm.d.ts +36 -0
- package/dist/types/core/roster.d.ts +146 -0
- package/dist/types/core/schema/a2a.d.ts +251 -0
- package/dist/types/core/schema/common.d.ts +328 -0
- package/dist/types/core/schema/consent.d.ts +140 -0
- package/dist/types/core/schema/conversation.d.ts +1657 -0
- package/dist/types/core/schema/delegation.d.ts +58 -0
- package/dist/types/core/schema/directory-frames.d.ts +1301 -0
- package/dist/types/core/schema/directory.d.ts +375 -0
- package/dist/types/core/schema/envelope.d.ts +756 -0
- package/dist/types/core/schema/errors.d.ts +142 -0
- package/dist/types/core/schema/index.d.ts +16 -0
- package/dist/types/core/schema/ipc/consent.d.ts +555 -0
- package/dist/types/core/schema/ipc/device.d.ts +735 -0
- package/dist/types/core/schema/ipc/jelly.d.ts +501 -0
- package/dist/types/core/schema/ipc/shapes.d.ts +414 -0
- package/dist/types/core/schema/ipc/surfaces.d.ts +680 -0
- package/dist/types/core/schema/ipc.d.ts +3146 -0
- package/dist/types/core/schema/jelly.d.ts +160 -0
- package/dist/types/core/schema/realm.d.ts +38 -0
- package/dist/types/core/schema/relay.d.ts +1134 -0
- package/dist/types/core/schema/roster.d.ts +347 -0
- package/dist/types/core/sign.d.ts +13 -0
- package/dist/types/core/task.d.ts +6 -0
- package/dist/types/core/testing.d.ts +19 -0
- package/dist/types/core/ulid.d.ts +5 -0
- package/dist/types/core/version.d.ts +6 -0
- package/dist/types/core/wire.d.ts +14 -0
- package/dist/types/ipc/client.d.ts +85 -0
- package/dist/types/ipc/framing.d.ts +12 -0
- package/dist/types/ipc/index.d.ts +6 -0
- package/dist/types/ipc/paths.d.ts +39 -0
- package/dist/types/ipc/pipes.d.ts +16 -0
- package/dist/types/ipc/rpc.d.ts +13 -0
- package/dist/types/ipc/server.d.ts +94 -0
- package/dist/types/ipc/testing.d.ts +89 -0
- package/dist/types/ipc/trust.d.ts +49 -0
- package/dist/types/ipc/windows-acl.d.ts +56 -0
- package/dist/types/testing/jelly-id.d.ts +518 -0
- package/dist/types/zod.d.ts +1 -0
- package/package.json +77 -4
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The IPC methods a Jelly host needs (spec §8.2, §8.11; design §13.6, §13.10-§13.12), served in every deployment:
|
|
3
|
+
*
|
|
4
|
+
* - Agent tier: `daemon.health`, a cheap status with no secrets and no counts.
|
|
5
|
+
* - Human tier: `agents.list` and `agents.read` (the person's view of their own agents' traffic on this device),
|
|
6
|
+
* `notice.subscribe`, `notice.list` and `notice.ack` (notices in fixed categories), and the read-only preview
|
|
7
|
+
* `device.remove.preview`.
|
|
8
|
+
*
|
|
9
|
+
* Spread into `IPC_METHODS`; `HOST_SCOPE_METHODS` (in `ipc.ts`) is what a host-scope action grant allows.
|
|
10
|
+
*/
|
|
11
|
+
import { z } from "zod";
|
|
12
|
+
/**
|
|
13
|
+
* A notice's id, stable per source: `m_<line id>` (a line), `r_<request id>` (a held request), `a_<id>` (an alert).
|
|
14
|
+
* A replay repeats the same ids, so a host rings once.
|
|
15
|
+
*/
|
|
16
|
+
export declare const NoticeId: z.ZodString;
|
|
17
|
+
export type NoticeId = z.infer<typeof NoticeId>;
|
|
18
|
+
/** Most characters of a notice's `line`. */
|
|
19
|
+
export declare const NOTICE_LINE_CHARS = 120;
|
|
20
|
+
/**
|
|
21
|
+
* An alert about another device of this person (design §2.8): the change, as `DeviceChangeView` gives it, with
|
|
22
|
+
* `device` the device the person may want to remove (for `replaced`, the successor; `replaces` is the device it
|
|
23
|
+
* replaced). `current`: whether that device is current now. `remove`: how this device removes it: `token` with a
|
|
24
|
+
* fresh Jelly token from its host (`device.remove {device, token}`), `sign-in` with a fresh sign-in through the
|
|
25
|
+
* browser (`device.login {remove: {device}}`), `team` as the roster's admin (`team.remove`); absent when it cannot
|
|
26
|
+
* (it is not current, or this device was approved by link and removes no device).
|
|
27
|
+
*/
|
|
28
|
+
export declare const NoticeDevice: z.ZodObject<{
|
|
29
|
+
change: z.ZodEnum<{
|
|
30
|
+
removed: "removed";
|
|
31
|
+
replaced: "replaced";
|
|
32
|
+
added: "added";
|
|
33
|
+
vouched: "vouched";
|
|
34
|
+
}>;
|
|
35
|
+
device: z.ZodString;
|
|
36
|
+
label: z.ZodString;
|
|
37
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
38
|
+
"jelly-host": "jelly-host";
|
|
39
|
+
laptop: "laptop";
|
|
40
|
+
server: "server";
|
|
41
|
+
other: "other";
|
|
42
|
+
}>>;
|
|
43
|
+
vouch: z.ZodEnum<{
|
|
44
|
+
admin: "admin";
|
|
45
|
+
device: "device";
|
|
46
|
+
jelly: "jelly";
|
|
47
|
+
}>;
|
|
48
|
+
via: z.ZodOptional<z.ZodEnum<{
|
|
49
|
+
host: "host";
|
|
50
|
+
browser: "browser";
|
|
51
|
+
}>>;
|
|
52
|
+
approver: z.ZodOptional<z.ZodString>;
|
|
53
|
+
at: z.ZodNumber;
|
|
54
|
+
replaces: z.ZodOptional<z.ZodObject<{
|
|
55
|
+
device: z.ZodString;
|
|
56
|
+
label: z.ZodString;
|
|
57
|
+
}, z.core.$strip>>;
|
|
58
|
+
current: z.ZodBoolean;
|
|
59
|
+
remove: z.ZodOptional<z.ZodEnum<{
|
|
60
|
+
token: "token";
|
|
61
|
+
"sign-in": "sign-in";
|
|
62
|
+
team: "team";
|
|
63
|
+
}>>;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
export type NoticeDevice = z.infer<typeof NoticeDevice>;
|
|
66
|
+
/**
|
|
67
|
+
* One notice (design §13.11). `message`: a line in a DM or a channel from another person or their agent, or an
|
|
68
|
+
* agent's line to its own person; `request`: a request held for the person; `alert`: an alarm of this device, a
|
|
69
|
+
* change of the person's other devices (with `device`), or trust the person gave that ends within 7 days (with `from`).
|
|
70
|
+
* `line` is the first line of a message, through `cleanPeerText`, only when the caller asked for lines; alerts carry
|
|
71
|
+
* fixed text. `from.name` and `from.email` are untrusted text in a hosted realm.
|
|
72
|
+
*/
|
|
73
|
+
export declare const Notice: z.ZodObject<{
|
|
74
|
+
id: z.ZodString;
|
|
75
|
+
category: z.ZodEnum<{
|
|
76
|
+
message: "message";
|
|
77
|
+
request: "request";
|
|
78
|
+
alert: "alert";
|
|
79
|
+
}>;
|
|
80
|
+
conversation: z.ZodOptional<z.ZodString>;
|
|
81
|
+
from: z.ZodOptional<z.ZodObject<{
|
|
82
|
+
name: z.ZodString;
|
|
83
|
+
email: z.ZodOptional<z.ZodString>;
|
|
84
|
+
org: z.ZodEnum<{
|
|
85
|
+
other: "other";
|
|
86
|
+
none: "none";
|
|
87
|
+
same: "same";
|
|
88
|
+
}>;
|
|
89
|
+
}, z.core.$strip>>;
|
|
90
|
+
line: z.ZodOptional<z.ZodString>;
|
|
91
|
+
device: z.ZodOptional<z.ZodObject<{
|
|
92
|
+
change: z.ZodEnum<{
|
|
93
|
+
removed: "removed";
|
|
94
|
+
replaced: "replaced";
|
|
95
|
+
added: "added";
|
|
96
|
+
vouched: "vouched";
|
|
97
|
+
}>;
|
|
98
|
+
device: z.ZodString;
|
|
99
|
+
label: z.ZodString;
|
|
100
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
101
|
+
"jelly-host": "jelly-host";
|
|
102
|
+
laptop: "laptop";
|
|
103
|
+
server: "server";
|
|
104
|
+
other: "other";
|
|
105
|
+
}>>;
|
|
106
|
+
vouch: z.ZodEnum<{
|
|
107
|
+
admin: "admin";
|
|
108
|
+
device: "device";
|
|
109
|
+
jelly: "jelly";
|
|
110
|
+
}>;
|
|
111
|
+
via: z.ZodOptional<z.ZodEnum<{
|
|
112
|
+
host: "host";
|
|
113
|
+
browser: "browser";
|
|
114
|
+
}>>;
|
|
115
|
+
approver: z.ZodOptional<z.ZodString>;
|
|
116
|
+
at: z.ZodNumber;
|
|
117
|
+
replaces: z.ZodOptional<z.ZodObject<{
|
|
118
|
+
device: z.ZodString;
|
|
119
|
+
label: z.ZodString;
|
|
120
|
+
}, z.core.$strip>>;
|
|
121
|
+
current: z.ZodBoolean;
|
|
122
|
+
remove: z.ZodOptional<z.ZodEnum<{
|
|
123
|
+
token: "token";
|
|
124
|
+
"sign-in": "sign-in";
|
|
125
|
+
team: "team";
|
|
126
|
+
}>>;
|
|
127
|
+
}, z.core.$strip>>;
|
|
128
|
+
at: z.ZodNumber;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
export type Notice = z.infer<typeof Notice>;
|
|
131
|
+
/** What the person's badges count: unread lines in their conversations, and requests held for them. */
|
|
132
|
+
export declare const NoticeCounts: z.ZodObject<{
|
|
133
|
+
unread: z.ZodNumber;
|
|
134
|
+
requests: z.ZodNumber;
|
|
135
|
+
}, z.core.$strip>;
|
|
136
|
+
/** `daemon.health` (spec §8.2): the daemon's state, with no secrets and no counts. */
|
|
137
|
+
export declare const DaemonHealth: z.ZodObject<{
|
|
138
|
+
state: z.ZodEnum<{
|
|
139
|
+
starting: "starting";
|
|
140
|
+
running: "running";
|
|
141
|
+
stopping: "stopping";
|
|
142
|
+
}>;
|
|
143
|
+
relay: z.ZodEnum<{
|
|
144
|
+
offline: "offline";
|
|
145
|
+
connected: "connected";
|
|
146
|
+
connecting: "connecting";
|
|
147
|
+
}>;
|
|
148
|
+
directory: z.ZodEnum<{
|
|
149
|
+
alarm: "alarm";
|
|
150
|
+
ok: "ok";
|
|
151
|
+
unavailable: "unavailable";
|
|
152
|
+
}>;
|
|
153
|
+
alarm: z.ZodNullable<z.ZodEnum<{
|
|
154
|
+
directory: "directory";
|
|
155
|
+
restored: "restored";
|
|
156
|
+
keys_missing: "keys_missing";
|
|
157
|
+
}>>;
|
|
158
|
+
busy: z.ZodBoolean;
|
|
159
|
+
version: z.ZodString;
|
|
160
|
+
storeSchema: z.ZodNumber;
|
|
161
|
+
}, z.core.$strip>;
|
|
162
|
+
export type DaemonHealth = z.infer<typeof DaemonHealth>;
|
|
163
|
+
/** One local agent (a registered or kept session) and its traffic on this device. */
|
|
164
|
+
export declare const AgentSummary: z.ZodObject<{
|
|
165
|
+
agent: z.ZodString;
|
|
166
|
+
conversations: z.ZodNumber;
|
|
167
|
+
unread: z.ZodNumber;
|
|
168
|
+
lastAt: z.ZodOptional<z.ZodNumber>;
|
|
169
|
+
state: z.ZodEnum<{
|
|
170
|
+
idle: "idle";
|
|
171
|
+
busy: "busy";
|
|
172
|
+
kept: "kept";
|
|
173
|
+
}>;
|
|
174
|
+
}, z.core.$strip>;
|
|
175
|
+
export declare const JELLY_METHODS: {
|
|
176
|
+
/**
|
|
177
|
+
* Agent tier. A cheap status for a host that polls: the daemon's state, the relay, the directory, an alarm, and
|
|
178
|
+
* whether it is busy. No counts: they are the person's (`notice.list`).
|
|
179
|
+
*/
|
|
180
|
+
readonly "daemon.health": {
|
|
181
|
+
readonly params: z.ZodObject<{}, z.core.$strict>;
|
|
182
|
+
readonly result: z.ZodObject<{
|
|
183
|
+
state: z.ZodEnum<{
|
|
184
|
+
starting: "starting";
|
|
185
|
+
running: "running";
|
|
186
|
+
stopping: "stopping";
|
|
187
|
+
}>;
|
|
188
|
+
relay: z.ZodEnum<{
|
|
189
|
+
offline: "offline";
|
|
190
|
+
connected: "connected";
|
|
191
|
+
connecting: "connecting";
|
|
192
|
+
}>;
|
|
193
|
+
directory: z.ZodEnum<{
|
|
194
|
+
alarm: "alarm";
|
|
195
|
+
ok: "ok";
|
|
196
|
+
unavailable: "unavailable";
|
|
197
|
+
}>;
|
|
198
|
+
alarm: z.ZodNullable<z.ZodEnum<{
|
|
199
|
+
directory: "directory";
|
|
200
|
+
restored: "restored";
|
|
201
|
+
keys_missing: "keys_missing";
|
|
202
|
+
}>>;
|
|
203
|
+
busy: z.ZodBoolean;
|
|
204
|
+
version: z.ZodString;
|
|
205
|
+
storeSchema: z.ZodNumber;
|
|
206
|
+
}, z.core.$strip>;
|
|
207
|
+
};
|
|
208
|
+
/** Human tier. This person's local agents on this device, most recent first. Read-only. */
|
|
209
|
+
readonly "agents.list": {
|
|
210
|
+
readonly params: z.ZodObject<{}, z.core.$strict>;
|
|
211
|
+
readonly result: z.ZodObject<{
|
|
212
|
+
agents: z.ZodArray<z.ZodObject<{
|
|
213
|
+
agent: z.ZodString;
|
|
214
|
+
conversations: z.ZodNumber;
|
|
215
|
+
unread: z.ZodNumber;
|
|
216
|
+
lastAt: z.ZodOptional<z.ZodNumber>;
|
|
217
|
+
state: z.ZodEnum<{
|
|
218
|
+
idle: "idle";
|
|
219
|
+
busy: "busy";
|
|
220
|
+
kept: "kept";
|
|
221
|
+
}>;
|
|
222
|
+
}, z.core.$strip>>;
|
|
223
|
+
}, z.core.$strip>;
|
|
224
|
+
};
|
|
225
|
+
/**
|
|
226
|
+
* Human tier. One local agent's traffic: without `conversation`, the other agents it has mail or tasks with, most
|
|
227
|
+
* recent first; with `conversation` (`agent:<person>/<agent>`), a page of its entries, as `conv.read` gives them to
|
|
228
|
+
* the agent, latest first unless `before` names an entry. Changes no stage and sends no receipt. Peer text is
|
|
229
|
+
* untrusted: a client cleans it for display.
|
|
230
|
+
*/
|
|
231
|
+
readonly "agents.read": {
|
|
232
|
+
readonly params: z.ZodObject<{
|
|
233
|
+
agent: z.ZodString;
|
|
234
|
+
conversation: z.ZodOptional<z.ZodString>;
|
|
235
|
+
before: z.ZodOptional<z.ZodObject<{
|
|
236
|
+
at: z.ZodNumber;
|
|
237
|
+
id: z.ZodString;
|
|
238
|
+
}, z.core.$strict>>;
|
|
239
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
240
|
+
}, z.core.$strict>;
|
|
241
|
+
readonly result: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
242
|
+
kind: z.ZodLiteral<"conversations">;
|
|
243
|
+
conversations: z.ZodArray<z.ZodObject<{
|
|
244
|
+
conversation: z.ZodString;
|
|
245
|
+
unread: z.ZodNumber;
|
|
246
|
+
lastAt: z.ZodNumber;
|
|
247
|
+
}, z.core.$strip>>;
|
|
248
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
249
|
+
kind: z.ZodLiteral<"entries">;
|
|
250
|
+
conversation: z.ZodString;
|
|
251
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
252
|
+
id: z.ZodString;
|
|
253
|
+
kind: z.ZodEnum<{
|
|
254
|
+
task: "task";
|
|
255
|
+
mail: "mail";
|
|
256
|
+
}>;
|
|
257
|
+
direction: z.ZodEnum<{
|
|
258
|
+
out: "out";
|
|
259
|
+
in: "in";
|
|
260
|
+
}>;
|
|
261
|
+
peer: z.ZodString;
|
|
262
|
+
at: z.ZodNumber;
|
|
263
|
+
text: z.ZodOptional<z.ZodString>;
|
|
264
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
265
|
+
stage: z.ZodOptional<z.ZodEnum<{
|
|
266
|
+
accepted: "accepted";
|
|
267
|
+
relayed: "relayed";
|
|
268
|
+
delivered: "delivered";
|
|
269
|
+
held: "held";
|
|
270
|
+
handed_to_agent: "handed_to_agent";
|
|
271
|
+
read: "read";
|
|
272
|
+
replied: "replied";
|
|
273
|
+
rejected: "rejected";
|
|
274
|
+
expired: "expired";
|
|
275
|
+
}>>;
|
|
276
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
277
|
+
requester: "requester";
|
|
278
|
+
executor: "executor";
|
|
279
|
+
}>>;
|
|
280
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
281
|
+
TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
|
|
282
|
+
TASK_STATE_WORKING: "TASK_STATE_WORKING";
|
|
283
|
+
TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
|
|
284
|
+
TASK_STATE_FAILED: "TASK_STATE_FAILED";
|
|
285
|
+
TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
|
|
286
|
+
TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
|
|
287
|
+
TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
|
|
288
|
+
TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
|
|
289
|
+
}>>;
|
|
290
|
+
}, z.core.$strip>>;
|
|
291
|
+
more: z.ZodBoolean;
|
|
292
|
+
}, z.core.$strip>], "kind">;
|
|
293
|
+
};
|
|
294
|
+
/**
|
|
295
|
+
* Human tier; host scope in `deployment: "jelly"`. Replays the unacknowledged notices after `after` (all of them
|
|
296
|
+
* without it), oldest first, as `notice` events on this connection, then sends each new one. With `lines`, a
|
|
297
|
+
* message carries its first line. A subscription under a host-scope grant ends when the grant expires.
|
|
298
|
+
*/
|
|
299
|
+
readonly "notice.subscribe": {
|
|
300
|
+
readonly params: z.ZodObject<{
|
|
301
|
+
after: z.ZodOptional<z.ZodString>;
|
|
302
|
+
lines: z.ZodOptional<z.ZodBoolean>;
|
|
303
|
+
}, z.core.$strict>;
|
|
304
|
+
readonly result: z.ZodObject<{
|
|
305
|
+
replayed: z.ZodNumber;
|
|
306
|
+
}, z.core.$strip>;
|
|
307
|
+
};
|
|
308
|
+
/** Human tier; host scope in `deployment: "jelly"`. The unacknowledged notices, newest first, and the badge counts. */
|
|
309
|
+
readonly "notice.list": {
|
|
310
|
+
readonly params: z.ZodObject<{
|
|
311
|
+
lines: z.ZodOptional<z.ZodBoolean>;
|
|
312
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
313
|
+
}, z.core.$strict>;
|
|
314
|
+
readonly result: z.ZodObject<{
|
|
315
|
+
notices: z.ZodArray<z.ZodObject<{
|
|
316
|
+
id: z.ZodString;
|
|
317
|
+
category: z.ZodEnum<{
|
|
318
|
+
message: "message";
|
|
319
|
+
request: "request";
|
|
320
|
+
alert: "alert";
|
|
321
|
+
}>;
|
|
322
|
+
conversation: z.ZodOptional<z.ZodString>;
|
|
323
|
+
from: z.ZodOptional<z.ZodObject<{
|
|
324
|
+
name: z.ZodString;
|
|
325
|
+
email: z.ZodOptional<z.ZodString>;
|
|
326
|
+
org: z.ZodEnum<{
|
|
327
|
+
other: "other";
|
|
328
|
+
none: "none";
|
|
329
|
+
same: "same";
|
|
330
|
+
}>;
|
|
331
|
+
}, z.core.$strip>>;
|
|
332
|
+
line: z.ZodOptional<z.ZodString>;
|
|
333
|
+
device: z.ZodOptional<z.ZodObject<{
|
|
334
|
+
change: z.ZodEnum<{
|
|
335
|
+
removed: "removed";
|
|
336
|
+
replaced: "replaced";
|
|
337
|
+
added: "added";
|
|
338
|
+
vouched: "vouched";
|
|
339
|
+
}>;
|
|
340
|
+
device: z.ZodString;
|
|
341
|
+
label: z.ZodString;
|
|
342
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
343
|
+
"jelly-host": "jelly-host";
|
|
344
|
+
laptop: "laptop";
|
|
345
|
+
server: "server";
|
|
346
|
+
other: "other";
|
|
347
|
+
}>>;
|
|
348
|
+
vouch: z.ZodEnum<{
|
|
349
|
+
admin: "admin";
|
|
350
|
+
device: "device";
|
|
351
|
+
jelly: "jelly";
|
|
352
|
+
}>;
|
|
353
|
+
via: z.ZodOptional<z.ZodEnum<{
|
|
354
|
+
host: "host";
|
|
355
|
+
browser: "browser";
|
|
356
|
+
}>>;
|
|
357
|
+
approver: z.ZodOptional<z.ZodString>;
|
|
358
|
+
at: z.ZodNumber;
|
|
359
|
+
replaces: z.ZodOptional<z.ZodObject<{
|
|
360
|
+
device: z.ZodString;
|
|
361
|
+
label: z.ZodString;
|
|
362
|
+
}, z.core.$strip>>;
|
|
363
|
+
current: z.ZodBoolean;
|
|
364
|
+
remove: z.ZodOptional<z.ZodEnum<{
|
|
365
|
+
token: "token";
|
|
366
|
+
"sign-in": "sign-in";
|
|
367
|
+
team: "team";
|
|
368
|
+
}>>;
|
|
369
|
+
}, z.core.$strip>>;
|
|
370
|
+
at: z.ZodNumber;
|
|
371
|
+
}, z.core.$strip>>;
|
|
372
|
+
counts: z.ZodObject<{
|
|
373
|
+
unread: z.ZodNumber;
|
|
374
|
+
requests: z.ZodNumber;
|
|
375
|
+
}, z.core.$strip>;
|
|
376
|
+
}, z.core.$strip>;
|
|
377
|
+
};
|
|
378
|
+
/** Human tier. Marks notices seen; unknown ids are ignored. */
|
|
379
|
+
readonly "notice.ack": {
|
|
380
|
+
readonly params: z.ZodObject<{
|
|
381
|
+
ids: z.ZodArray<z.ZodString>;
|
|
382
|
+
}, z.core.$strict>;
|
|
383
|
+
readonly result: z.ZodObject<{
|
|
384
|
+
ok: z.ZodLiteral<true>;
|
|
385
|
+
}, z.core.$strip>;
|
|
386
|
+
};
|
|
387
|
+
/**
|
|
388
|
+
* Admin tier; host scope in `deployment: "jelly"` (Jelly's M-3). The host sends it after the machine wakes from sleep:
|
|
389
|
+
* the daemon retries its relay link at once instead of at its backoff, runs its sweep, sends presence, and disarms a
|
|
390
|
+
* wake ticket it armed (`wake.disarm`), which this wake spent or no longer needs.
|
|
391
|
+
*/
|
|
392
|
+
readonly "daemon.woke": {
|
|
393
|
+
readonly params: z.ZodObject<{}, z.core.$strict>;
|
|
394
|
+
readonly result: z.ZodObject<{
|
|
395
|
+
ok: z.ZodLiteral<true>;
|
|
396
|
+
}, z.core.$strip>;
|
|
397
|
+
};
|
|
398
|
+
/**
|
|
399
|
+
* Admin tier; host scope in `deployment: "jelly"` (Jelly's M-4). Whether a window of the person is visible on this
|
|
400
|
+
* host. While it is not, under a Jelly host, this device's presence says `away` (spec §6.5), and the person's
|
|
401
|
+
* contacts see that device as away. Before the first call a Jelly host's device is away; elsewhere never.
|
|
402
|
+
*/
|
|
403
|
+
readonly "person.attached": {
|
|
404
|
+
readonly params: z.ZodObject<{
|
|
405
|
+
attached: z.ZodBoolean;
|
|
406
|
+
}, z.core.$strict>;
|
|
407
|
+
readonly result: z.ZodObject<{
|
|
408
|
+
ok: z.ZodLiteral<true>;
|
|
409
|
+
}, z.core.$strip>;
|
|
410
|
+
};
|
|
411
|
+
/**
|
|
412
|
+
* Admin tier; host scope in `deployment: "jelly"` (Jelly's A5). Before the host sleeps: the daemon hands its relay the
|
|
413
|
+
* host's wake ticket (`jelly-wake+jwt`, for `url`, Jelly ID's wake endpoint of this host), the sessions in `agents`
|
|
414
|
+
* whose own person's mail may wake the host, and the tasks those sessions await (their unfinished requests). The relay
|
|
415
|
+
* presents the ticket once, for such traffic only, while this device is offline (spec §7, "Wake tickets"). `relay`:
|
|
416
|
+
* `armed` once the relay holds it, `pending` while it is not connected (it is sent at the next connection);
|
|
417
|
+
* `awaiting`: how many task requests the relay may wake for. A directory realm only.
|
|
418
|
+
*/
|
|
419
|
+
readonly "wake.arm": {
|
|
420
|
+
readonly params: z.ZodObject<{
|
|
421
|
+
url: z.ZodString;
|
|
422
|
+
ticket: z.ZodString;
|
|
423
|
+
agents: z.ZodArray<z.ZodString>;
|
|
424
|
+
}, z.core.$strict>;
|
|
425
|
+
readonly result: z.ZodObject<{
|
|
426
|
+
relay: z.ZodEnum<{
|
|
427
|
+
pending: "pending";
|
|
428
|
+
armed: "armed";
|
|
429
|
+
}>;
|
|
430
|
+
awaiting: z.ZodNumber;
|
|
431
|
+
}, z.core.$strip>;
|
|
432
|
+
};
|
|
433
|
+
/** Admin tier; host scope in `deployment: "jelly"`. The relay forgets this device's wake ticket (`pending` until connected). */
|
|
434
|
+
readonly "wake.disarm": {
|
|
435
|
+
readonly params: z.ZodObject<{}, z.core.$strict>;
|
|
436
|
+
readonly result: z.ZodObject<{
|
|
437
|
+
relay: z.ZodEnum<{
|
|
438
|
+
pending: "pending";
|
|
439
|
+
disarmed: "disarmed";
|
|
440
|
+
}>;
|
|
441
|
+
}, z.core.$strip>;
|
|
442
|
+
};
|
|
443
|
+
/**
|
|
444
|
+
* Admin tier; host scope in `deployment: "jelly"` (Jelly's backup proposal, design §13.9). `{}` writes a consistent
|
|
445
|
+
* copy of the home while the daemon runs into `folder`, `<run>/snapshot` (the socket folder), and holds it there:
|
|
446
|
+
* the store (`messaging.db`, by SQLite `VACUUM INTO`), `config.json` and `manifest.json`. Never a private key:
|
|
447
|
+
* `identity.json` is not copied. `{done: true}` releases it (deletes the folder); a held snapshot is also released
|
|
448
|
+
* after an hour and when the daemon starts. `invalid_state` while one is held.
|
|
449
|
+
*/
|
|
450
|
+
readonly "daemon.snapshot": {
|
|
451
|
+
readonly params: z.ZodObject<{
|
|
452
|
+
done: z.ZodOptional<z.ZodLiteral<true>>;
|
|
453
|
+
}, z.core.$strict>;
|
|
454
|
+
readonly result: z.ZodUnion<readonly [z.ZodObject<{
|
|
455
|
+
folder: z.ZodString;
|
|
456
|
+
files: z.ZodArray<z.ZodObject<{
|
|
457
|
+
name: z.ZodString;
|
|
458
|
+
bytes: z.ZodNumber;
|
|
459
|
+
sha256: z.ZodString;
|
|
460
|
+
}, z.core.$strip>>;
|
|
461
|
+
storeSchema: z.ZodNumber;
|
|
462
|
+
at: z.ZodNumber;
|
|
463
|
+
until: z.ZodNumber;
|
|
464
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
465
|
+
released: z.ZodBoolean;
|
|
466
|
+
}, z.core.$strip>]>;
|
|
467
|
+
};
|
|
468
|
+
/**
|
|
469
|
+
* Human tier, read-only. What removing `device` would remove, for a confirmation: its label, kind and vouch, and
|
|
470
|
+
* whether it is current. `not_found` for a device that is not this person's.
|
|
471
|
+
*/
|
|
472
|
+
/** `device.remove`'s input (spec §8.2, "Previews"); `reason` and `token` are not used, and `token` is never logged. */
|
|
473
|
+
readonly "device.remove.preview": {
|
|
474
|
+
readonly params: z.ZodObject<{
|
|
475
|
+
device: z.ZodString;
|
|
476
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
477
|
+
self: "self";
|
|
478
|
+
removed: "removed";
|
|
479
|
+
lost: "lost";
|
|
480
|
+
}>>;
|
|
481
|
+
token: z.ZodOptional<z.ZodString>;
|
|
482
|
+
}, z.core.$strict>;
|
|
483
|
+
readonly result: z.ZodObject<{
|
|
484
|
+
label: z.ZodString;
|
|
485
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
486
|
+
"jelly-host": "jelly-host";
|
|
487
|
+
laptop: "laptop";
|
|
488
|
+
server: "server";
|
|
489
|
+
other: "other";
|
|
490
|
+
}>>;
|
|
491
|
+
vouch: z.ZodEnum<{
|
|
492
|
+
admin: "admin";
|
|
493
|
+
device: "device";
|
|
494
|
+
jelly: "jelly";
|
|
495
|
+
}>;
|
|
496
|
+
current: z.ZodBoolean;
|
|
497
|
+
self: z.ZodBoolean;
|
|
498
|
+
since: z.ZodOptional<z.ZodNumber>;
|
|
499
|
+
}, z.core.$strip>;
|
|
500
|
+
};
|
|
501
|
+
};
|