@joe-broadhead/messaging 0.0.0-stage → 0.7.0
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 +175 -0
- package/LICENSE +21 -0
- package/NOTICE +12 -0
- package/README.md +36 -2
- package/dist/bin/messaging-mcp.js +25887 -0
- package/dist/bin/messaging-relay.js +19014 -0
- package/dist/bin/messaging.js +14732 -0
- package/dist/bin/messagingd.js +28682 -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 +458 -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/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 +44 -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 +254 -0
- package/dist/lib/modules/core/schema/consent.js +120 -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 +65 -0
- package/dist/lib/modules/core/schema/index.js +15 -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 +20 -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 +3426 -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 +948 -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/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 +38 -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 +272 -0
- package/dist/types/core/schema/consent.d.ts +140 -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 +750 -0
- package/dist/types/core/schema/errors.d.ts +104 -0
- package/dist/types/core/schema/index.d.ts +15 -0
- package/dist/types/core/schema/ipc/consent.d.ts +555 -0
- package/dist/types/core/schema/ipc/device.d.ts +729 -0
- package/dist/types/core/schema/ipc/jelly.d.ts +501 -0
- package/dist/types/core/schema/ipc/shapes.d.ts +411 -0
- package/dist/types/core/schema/ipc/surfaces.d.ts +674 -0
- package/dist/types/core/schema/ipc.d.ts +3131 -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 +1122 -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 +18 -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,411 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shapes the local API's methods share (spec §8.2): session keys, inbox items, task records, send
|
|
3
|
+
* results, directory entries, conversation entries and chat lines. Each lane's method file under
|
|
4
|
+
* `schema/ipc/` imports them from here, and `schema/ipc.ts` re-exports them, so no method file
|
|
5
|
+
* imports `ipc.ts` (which spreads their tables).
|
|
6
|
+
*/
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
/** Opaque, client-chosen session key, stable for the life of a client session, e.g. "opencode:<sessionID>". */
|
|
9
|
+
export declare const SessionKey: z.ZodString;
|
|
10
|
+
export type SessionKey = z.infer<typeof SessionKey>;
|
|
11
|
+
/**
|
|
12
|
+
* When the recipient will likely see a message (spec §8.2): a hint from its machine's last presence
|
|
13
|
+
* at send time, never a promise.
|
|
14
|
+
* - `next_turn`: a live push session that is busy; its client shows the message after its next tool call or at its next turn.
|
|
15
|
+
* - `wake`: an idle push session, or a kept one its host can load again, whose machine acts on wake hints; the
|
|
16
|
+
* client may start a turn for it, within its own budget.
|
|
17
|
+
* - `next_prompt`: a live push session that is idle and will not be woken; it sees the message when next prompted.
|
|
18
|
+
* - `on_read`: a pull session; its agent sees the message when it checks its inbox.
|
|
19
|
+
* - `kept`: no client holds the session; the message waits for one to register it again.
|
|
20
|
+
* - `offline`: the recipient machine is not connected; the relay holds the envelope until it connects or it expires.
|
|
21
|
+
*/
|
|
22
|
+
export declare const SendExpect: z.ZodEnum<{
|
|
23
|
+
kept: "kept";
|
|
24
|
+
next_turn: "next_turn";
|
|
25
|
+
wake: "wake";
|
|
26
|
+
next_prompt: "next_prompt";
|
|
27
|
+
on_read: "on_read";
|
|
28
|
+
offline: "offline";
|
|
29
|
+
}>;
|
|
30
|
+
export type SendExpect = z.infer<typeof SendExpect>;
|
|
31
|
+
/** One agent session of a person, as this device knows it: `agent` is its name, `client` its client kind. */
|
|
32
|
+
export declare const DirectoryEntry: z.ZodObject<{
|
|
33
|
+
address: z.ZodString;
|
|
34
|
+
person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
35
|
+
agent: z.ZodString;
|
|
36
|
+
device: z.ZodString;
|
|
37
|
+
label: z.ZodString;
|
|
38
|
+
client: z.ZodString;
|
|
39
|
+
repo: z.ZodOptional<z.ZodString>;
|
|
40
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
41
|
+
state: z.ZodEnum<{
|
|
42
|
+
idle: "idle";
|
|
43
|
+
busy: "busy";
|
|
44
|
+
}>;
|
|
45
|
+
doing: z.ZodOptional<z.ZodString>;
|
|
46
|
+
tier: z.ZodEnum<{
|
|
47
|
+
push: "push";
|
|
48
|
+
pull: "pull";
|
|
49
|
+
}>;
|
|
50
|
+
online: z.ZodBoolean;
|
|
51
|
+
lastSeen: z.ZodNumber;
|
|
52
|
+
self: z.ZodBoolean;
|
|
53
|
+
expect: z.ZodOptional<z.ZodEnum<{
|
|
54
|
+
kept: "kept";
|
|
55
|
+
next_turn: "next_turn";
|
|
56
|
+
wake: "wake";
|
|
57
|
+
next_prompt: "next_prompt";
|
|
58
|
+
on_read: "on_read";
|
|
59
|
+
offline: "offline";
|
|
60
|
+
}>>;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
export type DirectoryEntry = z.infer<typeof DirectoryEntry>;
|
|
63
|
+
/** Chat text, at most `LIMITS.chatChars` UTF-16 code units (`max` would count code points). */
|
|
64
|
+
export declare const ChatText: z.ZodString;
|
|
65
|
+
/**
|
|
66
|
+
* A position in this machine's chat order (spec §6.8): every filed line and every chat change takes
|
|
67
|
+
* the next one. Local: another machine numbers the same line differently. 0 is before the first.
|
|
68
|
+
*/
|
|
69
|
+
export declare const ChatSeq: z.ZodNumber;
|
|
70
|
+
export type ChatSeq = z.infer<typeof ChatSeq>;
|
|
71
|
+
/** One transcript line (spec §6.8). `id` is the line's `messageId`, the same on every machine. */
|
|
72
|
+
export declare const ChatLine: z.ZodObject<{
|
|
73
|
+
id: z.ZodString;
|
|
74
|
+
seq: z.ZodNumber;
|
|
75
|
+
at: z.ZodNumber;
|
|
76
|
+
person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
77
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
78
|
+
direction: z.ZodEnum<{
|
|
79
|
+
out: "out";
|
|
80
|
+
in: "in";
|
|
81
|
+
}>;
|
|
82
|
+
body: z.ZodString;
|
|
83
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
84
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
85
|
+
delivered: "delivered";
|
|
86
|
+
held: "held";
|
|
87
|
+
refused: "refused";
|
|
88
|
+
sent: "sent";
|
|
89
|
+
}>>;
|
|
90
|
+
refused: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>>;
|
|
91
|
+
notice: z.ZodOptional<z.ZodLiteral<true>>;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
export type ChatLine = z.infer<typeof ChatLine>;
|
|
94
|
+
/** The other end of an item or a task: a person's device and, when an agent wrote it, the agent. */
|
|
95
|
+
export declare const PeerRef: z.ZodObject<{
|
|
96
|
+
address: z.ZodString;
|
|
97
|
+
person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
98
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
99
|
+
device: z.ZodString;
|
|
100
|
+
label: z.ZodString;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
export type PeerRef = z.infer<typeof PeerRef>;
|
|
103
|
+
export declare const InboxItem: z.ZodObject<{
|
|
104
|
+
id: z.ZodString;
|
|
105
|
+
key: z.ZodString;
|
|
106
|
+
from: z.ZodObject<{
|
|
107
|
+
address: z.ZodString;
|
|
108
|
+
person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
109
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
110
|
+
device: z.ZodString;
|
|
111
|
+
label: z.ZodString;
|
|
112
|
+
}, z.core.$strip>;
|
|
113
|
+
kind: z.ZodEnum<{
|
|
114
|
+
message: "message";
|
|
115
|
+
task: "task";
|
|
116
|
+
}>;
|
|
117
|
+
messageId: z.ZodString;
|
|
118
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
119
|
+
contextId: z.ZodOptional<z.ZodString>;
|
|
120
|
+
replyTo: z.ZodOptional<z.ZodString>;
|
|
121
|
+
receivedAt: z.ZodNumber;
|
|
122
|
+
stage: z.ZodEnum<{
|
|
123
|
+
delivered: "delivered";
|
|
124
|
+
handed_to_agent: "handed_to_agent";
|
|
125
|
+
read: "read";
|
|
126
|
+
}>;
|
|
127
|
+
bytes: z.ZodNumber;
|
|
128
|
+
preview: z.ZodString;
|
|
129
|
+
wake: z.ZodBoolean;
|
|
130
|
+
chain: z.ZodOptional<z.ZodObject<{
|
|
131
|
+
addresses: z.ZodArray<z.ZodString>;
|
|
132
|
+
depth: z.ZodNumber;
|
|
133
|
+
maxDepth: z.ZodNumber;
|
|
134
|
+
scope: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
135
|
+
exp: z.ZodNumber;
|
|
136
|
+
}, z.core.$strip>>;
|
|
137
|
+
consent: z.ZodOptional<z.ZodEnum<{
|
|
138
|
+
self: "self";
|
|
139
|
+
guarded: "guarded";
|
|
140
|
+
trusted: "trusted";
|
|
141
|
+
}>>;
|
|
142
|
+
}, z.core.$strip>;
|
|
143
|
+
export type InboxItem = z.infer<typeof InboxItem>;
|
|
144
|
+
/**
|
|
145
|
+
* A message this side sent to continue a task it requested (`msg.send` with `kind: "message"`
|
|
146
|
+
* and the `taskId`), and how far it got, from this daemon's own delivery records (spec §6.3).
|
|
147
|
+
*/
|
|
148
|
+
export declare const TaskFollowUp: z.ZodObject<{
|
|
149
|
+
envelopeId: z.ZodString;
|
|
150
|
+
messageId: z.ZodString;
|
|
151
|
+
sentAt: z.ZodNumber;
|
|
152
|
+
stage: z.ZodEnum<{
|
|
153
|
+
accepted: "accepted";
|
|
154
|
+
relayed: "relayed";
|
|
155
|
+
delivered: "delivered";
|
|
156
|
+
held: "held";
|
|
157
|
+
handed_to_agent: "handed_to_agent";
|
|
158
|
+
read: "read";
|
|
159
|
+
replied: "replied";
|
|
160
|
+
rejected: "rejected";
|
|
161
|
+
expired: "expired";
|
|
162
|
+
}>;
|
|
163
|
+
at: z.ZodNumber;
|
|
164
|
+
}, z.core.$strip>;
|
|
165
|
+
export type TaskFollowUp = z.infer<typeof TaskFollowUp>;
|
|
166
|
+
export declare const TaskRecord: z.ZodObject<{
|
|
167
|
+
task: z.ZodObject<{
|
|
168
|
+
contextId: z.ZodOptional<z.ZodString>;
|
|
169
|
+
status: z.ZodObject<{
|
|
170
|
+
state: z.ZodEnum<{
|
|
171
|
+
TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
|
|
172
|
+
TASK_STATE_WORKING: "TASK_STATE_WORKING";
|
|
173
|
+
TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
|
|
174
|
+
TASK_STATE_FAILED: "TASK_STATE_FAILED";
|
|
175
|
+
TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
|
|
176
|
+
TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
|
|
177
|
+
TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
|
|
178
|
+
TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
|
|
179
|
+
}>;
|
|
180
|
+
message: z.ZodOptional<z.ZodObject<{
|
|
181
|
+
messageId: z.ZodString;
|
|
182
|
+
contextId: z.ZodOptional<z.ZodString>;
|
|
183
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
184
|
+
role: z.ZodEnum<{
|
|
185
|
+
ROLE_USER: "ROLE_USER";
|
|
186
|
+
ROLE_AGENT: "ROLE_AGENT";
|
|
187
|
+
}>;
|
|
188
|
+
parts: z.ZodArray<z.ZodObject<{
|
|
189
|
+
text: z.ZodOptional<z.ZodString>;
|
|
190
|
+
raw: z.ZodOptional<z.ZodString>;
|
|
191
|
+
url: z.ZodOptional<z.ZodString>;
|
|
192
|
+
data: z.ZodOptional<z.ZodUnknown>;
|
|
193
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
194
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
195
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
196
|
+
}, z.core.$strip>>;
|
|
197
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
198
|
+
extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
199
|
+
referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
200
|
+
}, z.core.$strip>>;
|
|
201
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
202
|
+
}, z.core.$strip>;
|
|
203
|
+
artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
204
|
+
artifactId: z.ZodString;
|
|
205
|
+
name: z.ZodOptional<z.ZodString>;
|
|
206
|
+
description: z.ZodOptional<z.ZodString>;
|
|
207
|
+
parts: z.ZodArray<z.ZodObject<{
|
|
208
|
+
text: z.ZodOptional<z.ZodString>;
|
|
209
|
+
raw: z.ZodOptional<z.ZodString>;
|
|
210
|
+
url: z.ZodOptional<z.ZodString>;
|
|
211
|
+
data: z.ZodOptional<z.ZodUnknown>;
|
|
212
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
213
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
214
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
215
|
+
}, z.core.$strip>>;
|
|
216
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
217
|
+
extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
218
|
+
}, z.core.$strip>>>;
|
|
219
|
+
history: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
220
|
+
messageId: z.ZodString;
|
|
221
|
+
contextId: z.ZodOptional<z.ZodString>;
|
|
222
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
223
|
+
role: z.ZodEnum<{
|
|
224
|
+
ROLE_USER: "ROLE_USER";
|
|
225
|
+
ROLE_AGENT: "ROLE_AGENT";
|
|
226
|
+
}>;
|
|
227
|
+
parts: z.ZodArray<z.ZodObject<{
|
|
228
|
+
text: z.ZodOptional<z.ZodString>;
|
|
229
|
+
raw: z.ZodOptional<z.ZodString>;
|
|
230
|
+
url: z.ZodOptional<z.ZodString>;
|
|
231
|
+
data: z.ZodOptional<z.ZodUnknown>;
|
|
232
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
233
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
234
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
235
|
+
}, z.core.$strip>>;
|
|
236
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
237
|
+
extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
238
|
+
referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
239
|
+
}, z.core.$strip>>>;
|
|
240
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
241
|
+
id: z.ZodString;
|
|
242
|
+
}, z.core.$strip>;
|
|
243
|
+
role: z.ZodEnum<{
|
|
244
|
+
requester: "requester";
|
|
245
|
+
executor: "executor";
|
|
246
|
+
}>;
|
|
247
|
+
key: z.ZodString;
|
|
248
|
+
peer: z.ZodObject<{
|
|
249
|
+
address: z.ZodString;
|
|
250
|
+
person: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
251
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
252
|
+
device: z.ZodString;
|
|
253
|
+
label: z.ZodString;
|
|
254
|
+
}, z.core.$strip>;
|
|
255
|
+
createdAt: z.ZodNumber;
|
|
256
|
+
updatedAt: z.ZodNumber;
|
|
257
|
+
chain: z.ZodOptional<z.ZodObject<{
|
|
258
|
+
addresses: z.ZodArray<z.ZodString>;
|
|
259
|
+
depth: z.ZodNumber;
|
|
260
|
+
maxDepth: z.ZodNumber;
|
|
261
|
+
scope: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
262
|
+
exp: z.ZodNumber;
|
|
263
|
+
}, z.core.$strip>>;
|
|
264
|
+
followUps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
265
|
+
envelopeId: z.ZodString;
|
|
266
|
+
messageId: z.ZodString;
|
|
267
|
+
sentAt: z.ZodNumber;
|
|
268
|
+
stage: z.ZodEnum<{
|
|
269
|
+
accepted: "accepted";
|
|
270
|
+
relayed: "relayed";
|
|
271
|
+
delivered: "delivered";
|
|
272
|
+
held: "held";
|
|
273
|
+
handed_to_agent: "handed_to_agent";
|
|
274
|
+
read: "read";
|
|
275
|
+
replied: "replied";
|
|
276
|
+
rejected: "rejected";
|
|
277
|
+
expired: "expired";
|
|
278
|
+
}>;
|
|
279
|
+
at: z.ZodNumber;
|
|
280
|
+
}, z.core.$strip>>>;
|
|
281
|
+
}, z.core.$strip>;
|
|
282
|
+
export type TaskRecord = z.infer<typeof TaskRecord>;
|
|
283
|
+
/**
|
|
284
|
+
* Where a send went (`msg.send`, spec §8.2): an agent session `person/agent@label`, a person (a line
|
|
285
|
+
* from an agent to them) or `#<channel>` (a post).
|
|
286
|
+
*/
|
|
287
|
+
export declare const SendTarget: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>;
|
|
288
|
+
export type SendTarget = z.infer<typeof SendTarget>;
|
|
289
|
+
export declare const SendResult: z.ZodObject<{
|
|
290
|
+
to: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodString]>, z.ZodString]>;
|
|
291
|
+
envelopeId: z.ZodString;
|
|
292
|
+
messageId: z.ZodString;
|
|
293
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
294
|
+
contextId: z.ZodString;
|
|
295
|
+
stage: z.ZodEnum<{
|
|
296
|
+
accepted: "accepted";
|
|
297
|
+
relayed: "relayed";
|
|
298
|
+
delivered: "delivered";
|
|
299
|
+
held: "held";
|
|
300
|
+
handed_to_agent: "handed_to_agent";
|
|
301
|
+
read: "read";
|
|
302
|
+
replied: "replied";
|
|
303
|
+
rejected: "rejected";
|
|
304
|
+
expired: "expired";
|
|
305
|
+
}>;
|
|
306
|
+
code: z.ZodOptional<z.ZodEnum<{
|
|
307
|
+
expired: "expired";
|
|
308
|
+
invalid_request: "invalid_request";
|
|
309
|
+
not_member: "not_member";
|
|
310
|
+
bad_signature: "bad_signature";
|
|
311
|
+
unknown_session: "unknown_session";
|
|
312
|
+
ambiguous_address: "ambiguous_address";
|
|
313
|
+
no_recipients: "no_recipients";
|
|
314
|
+
unknown_address: "unknown_address";
|
|
315
|
+
refused: "refused";
|
|
316
|
+
declined: "declined";
|
|
317
|
+
request_required: "request_required";
|
|
318
|
+
rate_limited: "rate_limited";
|
|
319
|
+
loop_guard: "loop_guard";
|
|
320
|
+
too_large: "too_large";
|
|
321
|
+
secret_refused: "secret_refused";
|
|
322
|
+
duplicate: "duplicate";
|
|
323
|
+
relay_unavailable: "relay_unavailable";
|
|
324
|
+
not_found: "not_found";
|
|
325
|
+
invalid_state: "invalid_state";
|
|
326
|
+
forbidden: "forbidden";
|
|
327
|
+
guarded_turn: "guarded_turn";
|
|
328
|
+
roster_conflict: "roster_conflict";
|
|
329
|
+
invite_invalid: "invite_invalid";
|
|
330
|
+
no_identity: "no_identity";
|
|
331
|
+
binding_invalid: "binding_invalid";
|
|
332
|
+
jelly_unavailable: "jelly_unavailable";
|
|
333
|
+
log_conflict: "log_conflict";
|
|
334
|
+
device_limit: "device_limit";
|
|
335
|
+
admission_required: "admission_required";
|
|
336
|
+
admission_invalid: "admission_invalid";
|
|
337
|
+
directory_inconsistent: "directory_inconsistent";
|
|
338
|
+
unknown_device: "unknown_device";
|
|
339
|
+
directory_unavailable: "directory_unavailable";
|
|
340
|
+
login_unsupported: "login_unsupported";
|
|
341
|
+
login_denied: "login_denied";
|
|
342
|
+
grant_required: "grant_required";
|
|
343
|
+
grant_invalid: "grant_invalid";
|
|
344
|
+
ticket_required: "ticket_required";
|
|
345
|
+
ticket_invalid: "ticket_invalid";
|
|
346
|
+
daemon_unavailable: "daemon_unavailable";
|
|
347
|
+
daemon_mismatch: "daemon_mismatch";
|
|
348
|
+
internal: "internal";
|
|
349
|
+
}>>;
|
|
350
|
+
expect: z.ZodOptional<z.ZodEnum<{
|
|
351
|
+
kept: "kept";
|
|
352
|
+
next_turn: "next_turn";
|
|
353
|
+
wake: "wake";
|
|
354
|
+
next_prompt: "next_prompt";
|
|
355
|
+
on_read: "on_read";
|
|
356
|
+
offline: "offline";
|
|
357
|
+
}>>;
|
|
358
|
+
}, z.core.$strip>;
|
|
359
|
+
export type SendResult = z.infer<typeof SendResult>;
|
|
360
|
+
/** A place in a conversation page (`conv.read`): an entry's time and id. */
|
|
361
|
+
export declare const ConvCursor: z.ZodObject<{
|
|
362
|
+
at: z.ZodNumber;
|
|
363
|
+
id: z.ZodString;
|
|
364
|
+
}, z.core.$strict>;
|
|
365
|
+
export type ConvCursor = z.infer<typeof ConvCursor>;
|
|
366
|
+
/**
|
|
367
|
+
* One entry of a conversation between a local session and one other session (spec §8.2
|
|
368
|
+
* `conv.read`): mail either way, or a task either way. `text` is untrusted peer text for incoming
|
|
369
|
+
* mail and for a task the other side asked for; clients frame it as data.
|
|
370
|
+
*/
|
|
371
|
+
export declare const ConvEntry: z.ZodObject<{
|
|
372
|
+
id: z.ZodString;
|
|
373
|
+
kind: z.ZodEnum<{
|
|
374
|
+
task: "task";
|
|
375
|
+
mail: "mail";
|
|
376
|
+
}>;
|
|
377
|
+
direction: z.ZodEnum<{
|
|
378
|
+
out: "out";
|
|
379
|
+
in: "in";
|
|
380
|
+
}>;
|
|
381
|
+
peer: z.ZodString;
|
|
382
|
+
at: z.ZodNumber;
|
|
383
|
+
text: z.ZodOptional<z.ZodString>;
|
|
384
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
385
|
+
stage: z.ZodOptional<z.ZodEnum<{
|
|
386
|
+
accepted: "accepted";
|
|
387
|
+
relayed: "relayed";
|
|
388
|
+
delivered: "delivered";
|
|
389
|
+
held: "held";
|
|
390
|
+
handed_to_agent: "handed_to_agent";
|
|
391
|
+
read: "read";
|
|
392
|
+
replied: "replied";
|
|
393
|
+
rejected: "rejected";
|
|
394
|
+
expired: "expired";
|
|
395
|
+
}>>;
|
|
396
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
397
|
+
requester: "requester";
|
|
398
|
+
executor: "executor";
|
|
399
|
+
}>>;
|
|
400
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
401
|
+
TASK_STATE_SUBMITTED: "TASK_STATE_SUBMITTED";
|
|
402
|
+
TASK_STATE_WORKING: "TASK_STATE_WORKING";
|
|
403
|
+
TASK_STATE_COMPLETED: "TASK_STATE_COMPLETED";
|
|
404
|
+
TASK_STATE_FAILED: "TASK_STATE_FAILED";
|
|
405
|
+
TASK_STATE_CANCELED: "TASK_STATE_CANCELED";
|
|
406
|
+
TASK_STATE_INPUT_REQUIRED: "TASK_STATE_INPUT_REQUIRED";
|
|
407
|
+
TASK_STATE_REJECTED: "TASK_STATE_REJECTED";
|
|
408
|
+
TASK_STATE_AUTH_REQUIRED: "TASK_STATE_AUTH_REQUIRED";
|
|
409
|
+
}>>;
|
|
410
|
+
}, z.core.$strip>;
|
|
411
|
+
export type ConvEntry = z.infer<typeof ConvEntry>;
|