@fungi.computer/bird-dog 0.0.0-stage → 0.0.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.
@@ -0,0 +1,205 @@
1
+ <!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
2
+
3
+ [**@fungi.computer/bird-dog**](README.md)
4
+
5
+ ---
6
+
7
+ [@fungi.computer/bird-dog](README.md) / index
8
+
9
+ # index
10
+
11
+ ## Type Aliases
12
+
13
+ ### BirdDogAgentReference
14
+
15
+ ```ts
16
+ type BirdDogAgentReference = Readonly<{
17
+ kind: "agent";
18
+ agentId: string;
19
+ sessionId: string;
20
+ }>;
21
+ ```
22
+
23
+ An ordinary agent Session address. Relationships between agents live elsewhere.
24
+
25
+ ---
26
+
27
+ ### BirdDogMail
28
+
29
+ ```ts
30
+ type BirdDogMail = Readonly<{
31
+ key: string;
32
+ to: BirdDogAgentReference;
33
+ from: BirdDogAgentReference;
34
+ replyTo: readonly BirdDogAgentReference[];
35
+ content: string;
36
+ createdAt: number;
37
+ meta?: BirdDogMeta;
38
+ reply?: BirdDogReply;
39
+ }>;
40
+ ```
41
+
42
+ Addressed agent correspondence carried with durable work when a reply is owed.
43
+
44
+ ---
45
+
46
+ ### BirdDogReply
47
+
48
+ ```ts
49
+ type BirdDogReply = Readonly<{
50
+ commandId: string;
51
+ outcome:
52
+ "completed" | "failed" | "interrupted" | "cancelled" | "outcome_unknown";
53
+ diagnostic?: string;
54
+ }>;
55
+ ```
56
+
57
+ What a reply reports about the settled work beside its content. The recipient's
58
+ host trusts these facts only after it authenticates the reply against the mail
59
+ it sent.
60
+
61
+ ---
62
+
63
+ ### BirdDogMeta
64
+
65
+ ```ts
66
+ type BirdDogMeta = typeof Schema.Json.Type;
67
+ ```
68
+
69
+ Opaque JSON a host attached to the work; BirdDog only carries it.
70
+
71
+ ---
72
+
73
+ ### BirdDogAgentWork
74
+
75
+ ```ts
76
+ type BirdDogAgentWork = Readonly<{
77
+ jobId: string;
78
+ sessionId: string;
79
+ commandFactId: string;
80
+ recovery?: Readonly<{
81
+ maxRecoveries: number;
82
+ }>;
83
+ }>;
84
+ ```
85
+
86
+ The accepted Session work BirdDog points at from an opaque Watchdog job.
87
+
88
+ ---
89
+
90
+ ### BirdDogAgentJobPayload
91
+
92
+ ```ts
93
+ type BirdDogAgentJobPayload = Readonly<{
94
+ work: Readonly<{
95
+ sessionId: string;
96
+ commandFactId: string;
97
+ }>;
98
+ mail?: BirdDogMail;
99
+ }>;
100
+ ```
101
+
102
+ Typed payload whose meaning belongs to BirdDog, never Watchdog.
103
+
104
+ ---
105
+
106
+ ### BirdDogAgentJobInput
107
+
108
+ ```ts
109
+ type BirdDogAgentJobInput = Readonly<{
110
+ work: BirdDogAgentWork;
111
+ mail?: BirdDogMail;
112
+ }>;
113
+ ```
114
+
115
+ Input for projecting accepted agent work into Watchdog's generic grammar.
116
+
117
+ ---
118
+
119
+ ### BirdDogOutbox
120
+
121
+ ```ts
122
+ type BirdDogOutbox = Readonly<{
123
+ put: (key, value) => Promise<void>;
124
+ read: (key) => Promise<string | undefined>;
125
+ list: (
126
+ limit,
127
+ afterKey?,
128
+ ) => Promise<
129
+ readonly Readonly<{
130
+ key: string;
131
+ value: string;
132
+ }>[]
133
+ >;
134
+ delete: (key) => Promise<void>;
135
+ }>;
136
+ ```
137
+
138
+ String-backed durable outbox owned by the BirdDog host.
139
+
140
+ ---
141
+
142
+ ### BirdDogOptions
143
+
144
+ ```ts
145
+ type BirdDogOptions = Readonly<{
146
+ outbox: BirdDogOutbox;
147
+ post: (mail) => Promise<boolean>;
148
+ scheduleWake: (at) => Promise<void>;
149
+ now: () => number;
150
+ }>;
151
+ ```
152
+
153
+ Host ports for BirdDog's durable mail delivery.
154
+
155
+ ---
156
+
157
+ ### BirdDogSettlement
158
+
159
+ ```ts
160
+ type BirdDogSettlement = Readonly<{
161
+ job: WatchdogSettledJob;
162
+ content: string;
163
+ diagnostic?: string;
164
+ meta?: BirdDogMeta;
165
+ }>;
166
+ ```
167
+
168
+ Completed generic work plus the content owed to its correspondents.
169
+
170
+ ---
171
+
172
+ ### BirdDogRuntime
173
+
174
+ ```ts
175
+ type BirdDogRuntime = Readonly<{
176
+ fanOut: (settlement) => Promise<void>;
177
+ drainOutbox: () => Promise<void>;
178
+ }>;
179
+ ```
180
+
181
+ Durable reply delivery behind the mail-room interface.
182
+
183
+ ---
184
+
185
+ ### BirdDogApi
186
+
187
+ ```ts
188
+ type BirdDogApi = Readonly<{
189
+ agentJob: (input) => WatchdogQueuedJob;
190
+ decodeAgentJob: (job) => BirdDogAgentJobPayload;
191
+ make: (options) => Promise<BirdDogRuntime>;
192
+ }>;
193
+ ```
194
+
195
+ BirdDog's small synchronous translation interface for owner transactions.
196
+
197
+ ## Variables
198
+
199
+ ### BirdDog
200
+
201
+ ```ts
202
+ const BirdDog: BirdDogApi;
203
+ ```
204
+
205
+ Agent-aware mail translation over Watchdog's payload-blind job grammar.
package/package.json CHANGED
@@ -1,6 +1,67 @@
1
1
  {
2
2
  "name": "@fungi.computer/bird-dog",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.0.1",
4
+ "author": "Levi <levi@technomancy.dev>",
5
+ "description": "Durable addressed agent mail over generic Watchdog work",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ },
14
+ "./effect": {
15
+ "types": "./dist/effect.d.ts",
16
+ "import": "./dist/effect.js"
17
+ }
18
+ },
19
+ "files": [
20
+ "dist",
21
+ "docs/api",
22
+ "README.md",
23
+ "LICENSE"
24
+ ],
25
+ "dependencies": {
26
+ "@fungi.computer/carrier": "0.0.1",
27
+ "@fungi.computer/watchdog": "0.0.1",
28
+ "effect": "4.0.2"
29
+ },
30
+ "devDependencies": {
31
+ "@types/node": "24.13.3",
32
+ "typescript": "5.9.3",
33
+ "vitest": "4.1.11"
34
+ },
35
+ "botanical": {
36
+ "role": "package",
37
+ "operations": {
38
+ "lint": "required",
39
+ "typecheck": "required",
40
+ "build": "required",
41
+ "test": "required",
42
+ "docs": "required",
43
+ "pack": "required",
44
+ "smoke": "required",
45
+ "stranger": "required"
46
+ }
47
+ },
48
+ "license": "MIT",
49
+ "repository": {
50
+ "type": "git",
51
+ "url": "git+https://github.com/fungi-computer/bird-dog.git"
52
+ },
53
+ "scripts": {
54
+ "lint": "eslint src test --max-warnings=0 && ../../node_modules/.bin/oxlint --config ../../oxlint.config.ts --deny-warnings src test",
55
+ "typecheck": "tsc -p tsconfig.json --noEmit",
56
+ "build": "pnpm run clean && tsc -p tsconfig.build.json",
57
+ "clean": "node --input-type=module --eval \"import { rm } from 'node:fs/promises'; await rm('dist', { recursive: true, force: true });\"",
58
+ "test": "vitest run",
59
+ "docs": "tsx ../../tooling/repository/src/docs/cli.ts check --root ../..",
60
+ "docs:write": "tsx ../../tooling/repository/src/docs/cli.ts write --root ../..",
61
+ "pack": "mkdir -p ../../.botanical/bird-dog-pack && pnpm pack --pack-destination ../../.botanical/bird-dog-pack",
62
+ "smoke": "node --input-type=module -e \"import('./dist/index.js').then(({BirdDog}) => { if (!BirdDog) process.exit(1); })\"",
63
+ "stranger": "tsx ../../tooling/repository/src/artifacts/cli.ts --repo-root ../.. .",
64
+ "format:check": "node ../../tooling/repository/scripts/format-package-check.mjs",
65
+ "lint:anti-slop": "node ../../tooling/repository/scripts/lint-package-anti-slop.mjs"
66
+ }
6
67
  }