@agent-arc-status/emitter 0.3.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/LICENSE +21 -0
- package/README.md +40 -0
- package/dist/ArcEmitter.d.ts +60 -0
- package/dist/ArcEmitter.d.ts.map +1 -0
- package/dist/ArcEmitter.js +163 -0
- package/dist/ArcEmitter.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/transport.d.ts +13 -0
- package/dist/transport.d.ts.map +1 -0
- package/dist/transport.js +2 -0
- package/dist/transport.js.map +1 -0
- package/dist/transports/http.d.ts +19 -0
- package/dist/transports/http.d.ts.map +1 -0
- package/dist/transports/http.js +31 -0
- package/dist/transports/http.js.map +1 -0
- package/dist/transports/stdout.d.ts +8 -0
- package/dist/transports/stdout.d.ts.map +1 -0
- package/dist/transports/stdout.js +10 -0
- package/dist/transports/stdout.js.map +1 -0
- package/package.json +51 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Joe Fisher
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# @agent-arc-status/emitter
|
|
2
|
+
|
|
3
|
+
A batteries-included **producer** for the [Agent Arc Status
|
|
4
|
+
Protocol](https://github.com/joethefisher/agent-arc-status). It wraps the reference
|
|
5
|
+
`CadenceController` and makes correct emission the default:
|
|
6
|
+
|
|
7
|
+
- **`started` first, terminal last** — `run(fn)` emits `started` on entry and `done` on success or
|
|
8
|
+
terminal `blocked` on throw, so every stream it produces is `validateSequence`-clean.
|
|
9
|
+
- **Automatic silence backstop** — a timer independent of the work loop (§5.2) fires a `heartbeat`
|
|
10
|
+
when the silence window would otherwise elapse.
|
|
11
|
+
- **Best-effort transport** — a failed send goes to `onError`; status reporting never crashes the work.
|
|
12
|
+
- **Zero runtime dependencies** — Node stdlib only.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import { ArcEmitter, httpTransport } from "@agent-arc-status/emitter";
|
|
16
|
+
|
|
17
|
+
const arc = new ArcEmitter({
|
|
18
|
+
title: "nightly: refresh customer health scores",
|
|
19
|
+
arcKind: "batch",
|
|
20
|
+
transport: httpTransport({ url: process.env.ARC_STATUS_URL!, secret: process.env.ARC_STATUS_SECRET }),
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
await arc.run(async (arc) => {
|
|
24
|
+
await arc.milestone("ingested 12k account records", { step: 1, total: 4 });
|
|
25
|
+
// ... work ...
|
|
26
|
+
await arc.milestone("scored and persisted", { step: 4, total: 4 });
|
|
27
|
+
});
|
|
28
|
+
// -> started, milestone, milestone, done (all validated, heartbeats auto-filled)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## API
|
|
32
|
+
|
|
33
|
+
- `new ArcEmitter(config)` — `{ title, transport, arcId?, arcKind?, cadence?, heartbeatActivity?,
|
|
34
|
+
tickIntervalMs?, onError? }`.
|
|
35
|
+
- `start()`, `milestone(title, opts?)`, `heartbeat(title?, opts?)`, `blocked(title, opts?)`,
|
|
36
|
+
`done(title?, opts?)`, `isTerminal()`, `run(fn)`.
|
|
37
|
+
- Transports: `httpTransport({ url, secret?, headers?, fetch? })` (webhook binding §8.1, optional
|
|
38
|
+
HMAC-SHA256) and `stdoutTransport({ write? })` (JSON Lines, §8.3). Implement `Transport` for others.
|
|
39
|
+
|
|
40
|
+
Everything is injectable (`cadence.now`, `timer`, `transport`, `fetch`) for deterministic tests.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type ArcStatusEvent, type CadenceConfig } from "@agent-arc-status/reference";
|
|
2
|
+
import type { Transport } from "./transport.js";
|
|
3
|
+
/** Minimal timer surface, injectable for deterministic tests. */
|
|
4
|
+
export interface TimerLike {
|
|
5
|
+
setInterval(callback: () => void, ms: number): unknown;
|
|
6
|
+
clearInterval(handle: unknown): void;
|
|
7
|
+
}
|
|
8
|
+
export interface ArcEmitterConfig {
|
|
9
|
+
/** The arc's objective; becomes the `started` title. */
|
|
10
|
+
title: string;
|
|
11
|
+
/** Where validated events are sent. */
|
|
12
|
+
transport: Transport;
|
|
13
|
+
/** Stable arc id. Default: a fresh UUID. */
|
|
14
|
+
arcId?: string;
|
|
15
|
+
arcKind?: string;
|
|
16
|
+
/** Emitter's protocol_version. Default: the reference `PROTOCOL_VERSION`. */
|
|
17
|
+
protocolVersion?: string;
|
|
18
|
+
/** Cadence floor/window and injectable clock (shared with the emitter). */
|
|
19
|
+
cadence?: CadenceConfig;
|
|
20
|
+
/** Supplies the auto-heartbeat title. Default: "still working". */
|
|
21
|
+
heartbeatActivity?: () => string;
|
|
22
|
+
/** How often the backstop timer polls the cadence controller. Default 30s. */
|
|
23
|
+
tickIntervalMs?: number;
|
|
24
|
+
/** Injectable timer. Default: global setInterval/clearInterval (unref'd). */
|
|
25
|
+
timer?: TimerLike;
|
|
26
|
+
/** Called on a transport failure or an invalid event; never rethrows. */
|
|
27
|
+
onError?: (error: unknown, event?: ArcStatusEvent) => void;
|
|
28
|
+
}
|
|
29
|
+
export interface EmitOptions {
|
|
30
|
+
body?: string;
|
|
31
|
+
step?: number;
|
|
32
|
+
total?: number;
|
|
33
|
+
eta_minutes?: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* A batteries-included producer. It wraps the reference `CadenceController`
|
|
37
|
+
* (which stays pure and timer-free — the emitter owns the interval), guarantees
|
|
38
|
+
* a `started` leads the arc and a terminal ends it, and fires heartbeats from a
|
|
39
|
+
* timer independent of the work loop (§5.2). Transport failures are swallowed
|
|
40
|
+
* into `onError` so status reporting never crashes the workload.
|
|
41
|
+
*/
|
|
42
|
+
export declare class ArcEmitter {
|
|
43
|
+
#private;
|
|
44
|
+
readonly arcId: string;
|
|
45
|
+
constructor(config: ArcEmitterConfig);
|
|
46
|
+
/** Begin the arc and start the backstop timer. */
|
|
47
|
+
start(): Promise<void>;
|
|
48
|
+
milestone(title: string, opts?: EmitOptions): Promise<void>;
|
|
49
|
+
heartbeat(title?: string, opts?: EmitOptions): Promise<void>;
|
|
50
|
+
blocked(title: string, opts?: EmitOptions): Promise<void>;
|
|
51
|
+
done(title?: string, opts?: EmitOptions): Promise<void>;
|
|
52
|
+
isTerminal(): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Run `fn` as the arc: guarantees `started` first, `done` on success or
|
|
55
|
+
* terminal `blocked` on throw, and timer cleanup — so every produced stream is
|
|
56
|
+
* sequence-valid regardless of how `fn` exits.
|
|
57
|
+
*/
|
|
58
|
+
run<T>(fn: (arc: ArcEmitter) => Promise<T>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,MAAM,CAAC;CACtB;AAOD;;;;;;GAMG;AACH,qBAAa,UAAU;;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;gBASX,MAAM,EAAE,gBAAgB;IAQpC,kDAAkD;IAC5C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAiBtB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAK/D,SAAS,CAAC,KAAK,SAAkB,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAKzE,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAK7D,IAAI,CAAC,KAAK,SAAc,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAMtE,UAAU,IAAI,OAAO;IAIrB;;;;OAIG;IACG,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;CA+E9D"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { CadenceController, PROTOCOL_VERSION, validate, } from "@agent-arc-status/reference";
|
|
3
|
+
const defaultTimer = {
|
|
4
|
+
setInterval: (callback, ms) => setInterval(callback, ms),
|
|
5
|
+
clearInterval: (handle) => clearInterval(handle),
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* A batteries-included producer. It wraps the reference `CadenceController`
|
|
9
|
+
* (which stays pure and timer-free — the emitter owns the interval), guarantees
|
|
10
|
+
* a `started` leads the arc and a terminal ends it, and fires heartbeats from a
|
|
11
|
+
* timer independent of the work loop (§5.2). Transport failures are swallowed
|
|
12
|
+
* into `onError` so status reporting never crashes the workload.
|
|
13
|
+
*/
|
|
14
|
+
export class ArcEmitter {
|
|
15
|
+
arcId;
|
|
16
|
+
#config;
|
|
17
|
+
#controller;
|
|
18
|
+
#now;
|
|
19
|
+
#timer;
|
|
20
|
+
#handle = null;
|
|
21
|
+
#startedSent = false;
|
|
22
|
+
#terminal = false;
|
|
23
|
+
constructor(config) {
|
|
24
|
+
this.#config = config;
|
|
25
|
+
this.arcId = config.arcId ?? randomUUID();
|
|
26
|
+
this.#controller = new CadenceController(config.cadence);
|
|
27
|
+
this.#now = config.cadence?.now ?? (() => Date.now());
|
|
28
|
+
this.#timer = config.timer ?? defaultTimer;
|
|
29
|
+
}
|
|
30
|
+
/** Begin the arc and start the backstop timer. */
|
|
31
|
+
async start() {
|
|
32
|
+
const started = this.#controller.begin({
|
|
33
|
+
arc_id: this.arcId,
|
|
34
|
+
title: this.#config.title,
|
|
35
|
+
arc_kind: this.#config.arcKind,
|
|
36
|
+
protocol_version: this.#config.protocolVersion ?? PROTOCOL_VERSION,
|
|
37
|
+
});
|
|
38
|
+
if (started) {
|
|
39
|
+
this.#startedSent = true;
|
|
40
|
+
await this.#send(started);
|
|
41
|
+
}
|
|
42
|
+
this.#handle = this.#timer.setInterval(() => {
|
|
43
|
+
void this.#onTick();
|
|
44
|
+
}, this.#config.tickIntervalMs ?? 30_000);
|
|
45
|
+
this.#handle.unref?.();
|
|
46
|
+
}
|
|
47
|
+
async milestone(title, opts = {}) {
|
|
48
|
+
await this.#ensureStarted();
|
|
49
|
+
await this.#emit("milestone", title, opts);
|
|
50
|
+
}
|
|
51
|
+
async heartbeat(title = "still working", opts = {}) {
|
|
52
|
+
await this.#ensureStarted();
|
|
53
|
+
await this.#emit("heartbeat", title, opts);
|
|
54
|
+
}
|
|
55
|
+
async blocked(title, opts = {}) {
|
|
56
|
+
await this.#ensureStarted();
|
|
57
|
+
await this.#emit("blocked", title, opts);
|
|
58
|
+
}
|
|
59
|
+
async done(title = "completed", opts = {}) {
|
|
60
|
+
await this.#ensureStarted();
|
|
61
|
+
await this.#emit("done", title, opts);
|
|
62
|
+
this.#stop();
|
|
63
|
+
}
|
|
64
|
+
isTerminal() {
|
|
65
|
+
return this.#terminal;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Run `fn` as the arc: guarantees `started` first, `done` on success or
|
|
69
|
+
* terminal `blocked` on throw, and timer cleanup — so every produced stream is
|
|
70
|
+
* sequence-valid regardless of how `fn` exits.
|
|
71
|
+
*/
|
|
72
|
+
async run(fn) {
|
|
73
|
+
await this.start();
|
|
74
|
+
try {
|
|
75
|
+
const result = await fn(this);
|
|
76
|
+
if (!this.#terminal)
|
|
77
|
+
await this.done("completed");
|
|
78
|
+
return result;
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
if (!this.#terminal) {
|
|
82
|
+
await this.blocked(`failed: ${errorMessage(error)}`, { body: errorBody(error) });
|
|
83
|
+
}
|
|
84
|
+
throw error;
|
|
85
|
+
}
|
|
86
|
+
finally {
|
|
87
|
+
this.#stop();
|
|
88
|
+
if (this.#config.transport.close)
|
|
89
|
+
await this.#config.transport.close();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
async #onTick() {
|
|
93
|
+
if (this.#terminal)
|
|
94
|
+
return;
|
|
95
|
+
const event = this.#controller.tick(this.#config.heartbeatActivity?.());
|
|
96
|
+
if (event) {
|
|
97
|
+
if (event.phase === "started")
|
|
98
|
+
this.#startedSent = true;
|
|
99
|
+
await this.#send(event);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
async #ensureStarted() {
|
|
103
|
+
if (this.#startedSent || this.#terminal)
|
|
104
|
+
return;
|
|
105
|
+
const event = this.#build("started", this.#config.title);
|
|
106
|
+
this.#startedSent = true;
|
|
107
|
+
await this.#send(event);
|
|
108
|
+
this.#controller.onEmit(event);
|
|
109
|
+
}
|
|
110
|
+
async #emit(phase, title, opts) {
|
|
111
|
+
const event = this.#build(phase, title, opts);
|
|
112
|
+
if (phase === "done")
|
|
113
|
+
this.#terminal = true;
|
|
114
|
+
await this.#send(event);
|
|
115
|
+
this.#controller.onEmit(event);
|
|
116
|
+
}
|
|
117
|
+
#build(phase, title, opts = {}) {
|
|
118
|
+
const event = {
|
|
119
|
+
arc_id: this.arcId,
|
|
120
|
+
phase,
|
|
121
|
+
title,
|
|
122
|
+
sent_at: new Date(this.#now()).toISOString(),
|
|
123
|
+
protocol_version: this.#config.protocolVersion ?? PROTOCOL_VERSION,
|
|
124
|
+
};
|
|
125
|
+
if (this.#config.arcKind !== undefined)
|
|
126
|
+
event.arc_kind = this.#config.arcKind;
|
|
127
|
+
if (opts.body !== undefined)
|
|
128
|
+
event.body = opts.body;
|
|
129
|
+
if (opts.step !== undefined)
|
|
130
|
+
event.step = opts.step;
|
|
131
|
+
if (opts.total !== undefined)
|
|
132
|
+
event.total = opts.total;
|
|
133
|
+
if (opts.eta_minutes !== undefined)
|
|
134
|
+
event.eta_minutes = opts.eta_minutes;
|
|
135
|
+
return event;
|
|
136
|
+
}
|
|
137
|
+
async #send(event) {
|
|
138
|
+
const result = validate(event);
|
|
139
|
+
if (!result.ok) {
|
|
140
|
+
this.#config.onError?.(new Error(`invalid arc.status event: ${JSON.stringify(result.issues)}`), event);
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
try {
|
|
144
|
+
await this.#config.transport.send(event);
|
|
145
|
+
}
|
|
146
|
+
catch (error) {
|
|
147
|
+
this.#config.onError?.(error, event);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
#stop() {
|
|
151
|
+
if (this.#handle !== null) {
|
|
152
|
+
this.#timer.clearInterval(this.#handle);
|
|
153
|
+
this.#handle = null;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
function errorMessage(error) {
|
|
158
|
+
return error instanceof Error ? error.message : String(error);
|
|
159
|
+
}
|
|
160
|
+
function errorBody(error) {
|
|
161
|
+
return error instanceof Error && error.stack ? error.stack : undefined;
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=ArcEmit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;IAClC,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC;AAED,SAAS,SAAS,CAAC,KAAc;IAC/B,OAAO,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACzE,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @agent-arc-status/emitter — a batteries-included producer for the Agent Arc
|
|
3
|
+
* Status Protocol. Wraps the reference cadence controller, owns the backstop
|
|
4
|
+
* timer, and guarantees started-first / terminal-on-exit emission.
|
|
5
|
+
*/
|
|
6
|
+
export { ArcEmitter, type ArcEmitterConfig, type EmitOptions, type TimerLike, } from "./ArcEmitter.js";
|
|
7
|
+
export { type Transport } from "./transport.js";
|
|
8
|
+
export { httpTransport, type HttpTransportOptions } from "./transports/http.js";
|
|
9
|
+
export { stdoutTransport, type StdoutTransportOptions } from "./transports/stdout.js";
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,UAAU,EACV,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,SAAS,GACf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @agent-arc-status/emitter — a batteries-included producer for the Agent Arc
|
|
3
|
+
* Status Protocol. Wraps the reference cadence controller, owns the backstop
|
|
4
|
+
* timer, and guarantees started-first / terminal-on-exit emission.
|
|
5
|
+
*/
|
|
6
|
+
export { ArcEmitter, } from "./ArcEmitter.js";
|
|
7
|
+
export { httpTransport } from "./transports/http.js";
|
|
8
|
+
export { stdoutTransport } from "./transports/stdout.js";
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,UAAU,GAIX,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,aAAa,EAA6B,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,eAAe,EAA+B,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ArcStatusEvent } from "@agent-arc-status/reference";
|
|
2
|
+
/**
|
|
3
|
+
* A destination for validated arc.status events. Implementations own the wire
|
|
4
|
+
* (HTTP, stdout, a queue). `send` MAY reject on network failure; the emitter
|
|
5
|
+
* routes such rejections to its `onError` so status reporting never crashes the
|
|
6
|
+
* workload.
|
|
7
|
+
*/
|
|
8
|
+
export interface Transport {
|
|
9
|
+
send(event: ArcStatusEvent): Promise<void>;
|
|
10
|
+
/** Optional cleanup, awaited when an emitter's `run()` finishes. */
|
|
11
|
+
close?(): Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=transport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAElE;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,oEAAoE;IACpE,KAAK,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transport.js","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Transport } from "../transport.js";
|
|
2
|
+
export interface HttpTransportOptions {
|
|
3
|
+
/** Webhook endpoint that receives `arc.status` events. */
|
|
4
|
+
url: string;
|
|
5
|
+
/** If set, sign the body with HMAC-SHA256 (spec §8.1 / §9.1). */
|
|
6
|
+
secret?: string;
|
|
7
|
+
/** Extra headers merged onto every request. */
|
|
8
|
+
headers?: Record<string, string>;
|
|
9
|
+
/** Injectable fetch for testing. Default: global `fetch`. */
|
|
10
|
+
fetch?: typeof fetch;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* HTTP webhook transport implementing the reference binding (spec §8.1):
|
|
14
|
+
* `POST` with `X-Webhook-Event-Type: arc.status`, a per-delivery id, a
|
|
15
|
+
* timestamp, and an optional HMAC-SHA256 signature. Rejects on non-2xx so the
|
|
16
|
+
* emitter can route the failure to `onError`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function httpTransport(options: HttpTransportOptions): Transport;
|
|
19
|
+
//# sourceMappingURL=http.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/transports/http.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,WAAW,oBAAoB;IACnC,0DAA0D;IAC1D,GAAG,EAAE,MAAM,CAAC;IACZ,iEAAiE;IACjE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,6DAA6D;IAC7D,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,SAAS,CAsBtE"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { createHmac, randomUUID } from "node:crypto";
|
|
2
|
+
/**
|
|
3
|
+
* HTTP webhook transport implementing the reference binding (spec §8.1):
|
|
4
|
+
* `POST` with `X-Webhook-Event-Type: arc.status`, a per-delivery id, a
|
|
5
|
+
* timestamp, and an optional HMAC-SHA256 signature. Rejects on non-2xx so the
|
|
6
|
+
* emitter can route the failure to `onError`.
|
|
7
|
+
*/
|
|
8
|
+
export function httpTransport(options) {
|
|
9
|
+
const doFetch = options.fetch ?? fetch;
|
|
10
|
+
return {
|
|
11
|
+
async send(event) {
|
|
12
|
+
const body = JSON.stringify(event);
|
|
13
|
+
const headers = {
|
|
14
|
+
"Content-Type": "application/json",
|
|
15
|
+
"X-Webhook-Event-Type": "arc.status",
|
|
16
|
+
"X-Webhook-Delivery-Id": randomUUID(),
|
|
17
|
+
"X-Webhook-Timestamp": new Date().toISOString(),
|
|
18
|
+
...options.headers,
|
|
19
|
+
};
|
|
20
|
+
if (options.secret !== undefined) {
|
|
21
|
+
const signature = createHmac("sha256", options.secret).update(body).digest("hex");
|
|
22
|
+
headers["X-Webhook-Signature"] = `sha256=${signature}`;
|
|
23
|
+
}
|
|
24
|
+
const response = await doFetch(options.url, { method: "POST", headers, body });
|
|
25
|
+
if (!response.ok) {
|
|
26
|
+
throw new Error(`arc.status transport: HTTP ${response.status}`);
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/transports/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAerD;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,OAA6B;IACzD,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC;IACvC,OAAO;QACL,KAAK,CAAC,IAAI,CAAC,KAAqB;YAC9B,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YACnC,MAAM,OAAO,GAA2B;gBACtC,cAAc,EAAE,kBAAkB;gBAClC,sBAAsB,EAAE,YAAY;gBACpC,uBAAuB,EAAE,UAAU,EAAE;gBACrC,qBAAqB,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBAC/C,GAAG,OAAO,CAAC,OAAO;aACnB,CAAC;YACF,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;gBACjC,MAAM,SAAS,GAAG,UAAU,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBAClF,OAAO,CAAC,qBAAqB,CAAC,GAAG,UAAU,SAAS,EAAE,CAAC;YACzD,CAAC;YACD,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;YAC/E,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;gBACjB,MAAM,IAAI,KAAK,CAAC,8BAA8B,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;YACnE,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Transport } from "../transport.js";
|
|
2
|
+
export interface StdoutTransportOptions {
|
|
3
|
+
/** Sink for each JSON line. Default: `process.stdout.write`. */
|
|
4
|
+
write?: (line: string) => void;
|
|
5
|
+
}
|
|
6
|
+
/** A JSON Lines transport (spec §8.3): one event per line to stdout. */
|
|
7
|
+
export declare function stdoutTransport(options?: StdoutTransportOptions): Transport;
|
|
8
|
+
//# sourceMappingURL=stdout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdout.d.ts","sourceRoot":"","sources":["../../src/transports/stdout.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,WAAW,sBAAsB;IACrC,gEAAgE;IAChE,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC;AAED,wEAAwE;AACxE,wBAAgB,eAAe,CAAC,OAAO,GAAE,sBAA2B,GAAG,SAAS,CAO/E"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** A JSON Lines transport (spec §8.3): one event per line to stdout. */
|
|
2
|
+
export function stdoutTransport(options = {}) {
|
|
3
|
+
const write = options.write ?? ((line) => void process.stdout.write(line));
|
|
4
|
+
return {
|
|
5
|
+
async send(event) {
|
|
6
|
+
write(JSON.stringify(event) + "\n");
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=stdout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdout.js","sourceRoot":"","sources":["../../src/transports/stdout.ts"],"names":[],"mappings":"AAQA,wEAAwE;AACxE,MAAM,UAAU,eAAe,CAAC,UAAkC,EAAE;IAClE,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IACnF,OAAO;QACL,KAAK,CAAC,IAAI,CAAC,KAAqB;YAC9B,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;QACtC,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@agent-arc-status/emitter",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Batteries-included producer for the Agent Arc Status Protocol: guarantees started-first, done/blocked-on-exit, and an automatic silence backstop. Zero runtime dependencies.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Joe Fisher",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/joethefisher/agent-arc-status.git",
|
|
10
|
+
"directory": "packages/emitter"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/joethefisher/agent-arc-status#readme",
|
|
13
|
+
"bugs": "https://github.com/joethefisher/agent-arc-status/issues",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"agent",
|
|
16
|
+
"agents",
|
|
17
|
+
"ai",
|
|
18
|
+
"llm",
|
|
19
|
+
"observability",
|
|
20
|
+
"progress",
|
|
21
|
+
"arc-status"
|
|
22
|
+
],
|
|
23
|
+
"type": "module",
|
|
24
|
+
"main": "./dist/index.js",
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"import": "./dist/index.js"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist",
|
|
34
|
+
"README.md",
|
|
35
|
+
"LICENSE"
|
|
36
|
+
],
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public",
|
|
39
|
+
"provenance": true
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "tsc",
|
|
43
|
+
"typecheck": "tsc --noEmit"
|
|
44
|
+
},
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=20"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@agent-arc-status/reference": "^0.3.0"
|
|
50
|
+
}
|
|
51
|
+
}
|