@fungi.computer/bird-dog 0.3.0 → 0.3.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/README.md CHANGED
@@ -74,6 +74,7 @@ const room = await BirdDog.make({
74
74
 
75
75
  // 1. Turn accepted work into a Watchdog job. Hand this to Watchdog's ingest.
76
76
  const job = BirdDog.agentJob({
77
+ delivery: "followUp",
77
78
  work: {
78
79
  jobId: "job-1",
79
80
  sessionId: child.sessionId,
@@ -114,14 +115,14 @@ are 1 to 256 characters. There is no special kind for subagents.
114
115
  must identify the request across retries. BirdDog derives every reply key from
115
116
  it.
116
117
 
117
- **Agent jobs.** `BirdDog.agentJob({ work, mail? })` validates the input and
118
- returns a queued Watchdog job. The job's `queue` is the target `sessionId`, its
119
- lane is `default`, its priority is `0`, and its payload carries the `sessionId`,
120
- the `commandFactId` and the optional mail. `work.recovery` passes straight
121
- through to Watchdog's recovery policy. Because it is synchronous, you can call
122
- it inside an owner transaction and pass the result to Watchdog's
123
- `transactional.enqueueAcceptedJob`. `BirdDog.decodeAgentJob(job)` parses the
124
- payload back on the executor side. Watchdog never reads it.
118
+ **Agent jobs.** `BirdDog.agentJob({ work, delivery, mail? })` validates the
119
+ input and returns a queued Watchdog job. The job's `queue` is the target
120
+ `sessionId`, its lane is `default`, its priority is `0`, and its payload carries
121
+ the `sessionId`, the `commandFactId` and the optional mail. `work.recovery`
122
+ passes straight through to Watchdog's recovery policy. Because it is
123
+ synchronous, you can call it inside an owner transaction and pass the result to
124
+ Watchdog's `transactional.enqueueAcceptedJob`. `BirdDog.decodeAgentJob(job)`
125
+ parses the payload back on the executor side. Watchdog never reads it.
125
126
 
126
127
  **Fan-out.** `fanOut({ job, content, diagnostic? })` takes a settled job, the
127
128
  content owed to correspondents and the Session's terminal diagnostic. It writes
package/dist/effect.d.ts CHANGED
@@ -239,6 +239,7 @@ export declare const BirdDogAgentJobInputSchema: Schema.Struct<{
239
239
  readonly maxRecoveries: Schema.Int;
240
240
  }>>;
241
241
  }>;
242
+ readonly delivery: Schema.Literals<readonly ["steer", "followUp"]>;
242
243
  readonly mail: Schema.optional<Schema.Union<readonly [Schema.Struct<{
243
244
  readonly from: Schema.Struct<{
244
245
  readonly kind: Schema.Literal<"agent">;
package/dist/effect.js CHANGED
@@ -160,6 +160,7 @@ export const BirdDogAgentJobPayloadSchema = Schema.Struct({
160
160
  /** Parser for accepted work entering BirdDog's transactional projection. */
161
161
  export const BirdDogAgentJobInputSchema = Schema.Struct({
162
162
  work: BirdDogAgentWorkSchema,
163
+ delivery: Schema.Literals(["steer", "followUp"]),
163
164
  mail: Schema.optional(BirdDogMailSchema),
164
165
  });
165
166
  /** BirdDog could not complete one owned store or transport operation. */
@@ -183,7 +184,7 @@ export const agentJobFromInput = (input) => {
183
184
  jobId: accepted.work.jobId,
184
185
  queue: accepted.work.sessionId,
185
186
  lane: "default",
186
- priority: 0,
187
+ priority: accepted.delivery === "steer" ? 1 : 0,
187
188
  payload,
188
189
  state: "queued",
189
190
  };
package/dist/index.d.ts CHANGED
@@ -100,6 +100,7 @@ export type BirdDogAgentJobPayload = Readonly<{
100
100
  /** Input for projecting accepted agent work into Watchdog's generic grammar. */
101
101
  export type BirdDogAgentJobInput = Readonly<{
102
102
  work: BirdDogAgentWork;
103
+ delivery: "steer" | "followUp";
103
104
  mail?: BirdDogMail | undefined;
104
105
  }>;
105
106
  /** String-backed durable outbox owned by the BirdDog host. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fungi.computer/bird-dog",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "author": "Levi <levi@technomancy.dev>",
5
5
  "description": "Durable addressed agent mail over generic Watchdog work",
6
6
  "type": "module",