@raidiant/notifai 2.0.2 → 4.0.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 +48 -0
- package/README.md +7 -4
- package/dist/client.d.ts +2 -1
- package/dist/client.js +7 -0
- package/dist/client.js.map +1 -1
- package/dist/commands.d.ts +17 -9
- package/dist/commands.js +261 -100
- package/dist/commands.js.map +1 -1
- package/dist/config-schema.js +9 -9
- package/dist/config-schema.js.map +1 -1
- package/dist/config.js +1 -1
- package/dist/config.js.map +1 -1
- package/dist/hooks.d.ts +12 -7
- package/dist/hooks.js +26 -46
- package/dist/hooks.js.map +1 -1
- package/dist/invocation-context.d.ts +42 -0
- package/dist/invocation-context.js +130 -0
- package/dist/invocation-context.js.map +1 -0
- package/dist/main.js +46 -38
- package/dist/main.js.map +1 -1
- package/dist/send.d.ts +32 -7
- package/dist/send.js +77 -32
- package/dist/send.js.map +1 -1
- package/package.json +2 -2
- package/src/client.test.ts +46 -0
- package/src/client.ts +13 -0
- package/src/commands.test.ts +333 -37
- package/src/commands.ts +354 -136
- package/src/config-schema.test.ts +1 -1
- package/src/config-schema.ts +9 -9
- package/src/config.test.ts +144 -16
- package/src/config.ts +1 -1
- package/src/hooks.test.ts +144 -38
- package/src/hooks.ts +67 -73
- package/src/invocation-context.test.ts +253 -0
- package/src/invocation-context.ts +176 -0
- package/src/main.ts +72 -41
- package/src/send.ts +116 -38
- package/src/skill.test.ts +31 -7
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,54 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
8
8
|
This project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
|
|
9
9
|
and [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).
|
|
10
10
|
|
|
11
|
+
## [4.0.0](https://github.com/Raidiant-io/notifai/compare/v3.0.1...v4.0.0) (2026-08-15)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### ⚠ BREAKING CHANGES
|
|
15
|
+
|
|
16
|
+
* **cli:** `--detail` and `--detail-file` are removed; the one canonical Markdown body is `--body` / `--body-file`. `--session` is removed, replaced by `--session-id` and `--session-label`. `--image` is now a repeatable ordered collection (max 8) with `--image-alt` for alt text.
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* add unified notification content and source context ([3e6479a](https://github.com/Raidiant-io/notifai/commit/3e6479ae22c64c6886c1e919ba3183486e408596))
|
|
21
|
+
* add unified notification content and source context ([2473ed5](https://github.com/Raidiant-io/notifai/commit/2473ed51df42b56652435c611a57f3751fa484f5))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* attribute the unified-content break and propagate workspace dependency bumps ([cb438ce](https://github.com/Raidiant-io/notifai/commit/cb438cec76de9b393d7673554dc440a764887f76))
|
|
27
|
+
* **cli:** document replacements for the removed send flags ([44af905](https://github.com/Raidiant-io/notifai/commit/44af90536a1e6fa5af2ec6b58a19ea68f2d76b96))
|
|
28
|
+
* print server rejection details on command failures ([884fc78](https://github.com/Raidiant-io/notifai/commit/884fc78b62382ad23a49e1c5b92772dd1b8d574b))
|
|
29
|
+
* print server rejection details on command failures ([c9ec4e4](https://github.com/Raidiant-io/notifai/commit/c9ec4e45130784fff7b8ab4da560899eaddffcc5))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Dependencies
|
|
33
|
+
|
|
34
|
+
* The following workspace dependencies were updated
|
|
35
|
+
* dependencies
|
|
36
|
+
* @raidiant/notifai-protocol bumped from 0.6.0 to 1.0.0
|
|
37
|
+
|
|
38
|
+
## [3.0.1](https://github.com/Raidiant-io/notifai/compare/v3.0.0...v3.0.1) (2026-08-14)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Bug Fixes
|
|
42
|
+
|
|
43
|
+
* **cli:** require protocol 0.6.0 ([fc0f956](https://github.com/Raidiant-io/notifai/commit/fc0f9565d5dff4d98829cfc4b468eb272e15ede1))
|
|
44
|
+
* **cli:** require protocol 0.6.0 ([afc60f1](https://github.com/Raidiant-io/notifai/commit/afc60f1b4f825fd12d24cc12a33abb002d8dc978))
|
|
45
|
+
|
|
46
|
+
## [3.0.0](https://github.com/Raidiant-io/notifai/compare/v2.0.2...v3.0.0) (2026-08-14)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### ⚠ BREAKING CHANGES
|
|
50
|
+
|
|
51
|
+
* **cli:** finalize media uploads before use
|
|
52
|
+
|
|
53
|
+
### Features
|
|
54
|
+
|
|
55
|
+
* **cli:** finalize media uploads before use ([6b6d334](https://github.com/Raidiant-io/notifai/commit/6b6d3344c9e997f0b66fb78274fab87692d9d92b))
|
|
56
|
+
* **protocol:** add billing error statuses ([f7cbca2](https://github.com/Raidiant-io/notifai/commit/f7cbca2663469776d079787fa3b608bcecd40f45))
|
|
57
|
+
* require authoritative media upload finalization ([1150ffe](https://github.com/Raidiant-io/notifai/commit/1150ffe18d004da4f9809be08f3b5875b31d3a21))
|
|
58
|
+
|
|
11
59
|
## [2.0.2](https://github.com/Raidiant-io/notifai/compare/v2.0.1...v2.0.2) (2026-08-14)
|
|
12
60
|
|
|
13
61
|
|
package/README.md
CHANGED
|
@@ -32,10 +32,13 @@ project or the machine. An unattended caller must select one explicitly:
|
|
|
32
32
|
notifai send --title "Deploy finished" --body "staging, 2m14s" --kind done
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
Write
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
Write a brief title whose substance is immediately understandable; type lives
|
|
36
|
+
in `--kind`, and Project identity is inferred from the invocation directory.
|
|
37
|
+
The one body is always Markdown. Native banners show a bounded readable
|
|
38
|
+
plain-text excerpt from it, while Companion Apps render the complete body. Use
|
|
39
|
+
`--body-file <path|->` for long content. Repeat `--image` for an ordered image
|
|
40
|
+
collection (up to eight), pair each with `--image-alt` for alt text, and use
|
|
41
|
+
`media:1`, `media:2`, and so on for inline references.
|
|
39
42
|
|
|
40
43
|
## Asking you a question
|
|
41
44
|
|
package/dist/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AccountAccessResponse, BeginPairingResponse, CapabilityDocument, CreateMediaUploadRequestT, CreateMediaUploadResponse, EvidenceSnapshot, GetAgentAcknowledgementResponse, ListDevicesResponse, ListRepliesResponse, Platform, PollPairingResponse, PutAgentAcknowledgementRequestT, PutAgentAcknowledgementResponse, SubmissionReceipt, SubmitNotificationRequestT } from '@raidiant/notifai-protocol';
|
|
1
|
+
import type { AccountAccessResponse, BeginPairingResponse, CapabilityDocument, CreateMediaUploadRequestT, CreateMediaUploadResponse, FinalizeMediaUploadResponse, EvidenceSnapshot, GetAgentAcknowledgementResponse, ListDevicesResponse, ListRepliesResponse, Platform, PollPairingResponse, PutAgentAcknowledgementRequestT, PutAgentAcknowledgementResponse, SubmissionReceipt, SubmitNotificationRequestT } from '@raidiant/notifai-protocol';
|
|
2
2
|
import type { Logger } from './logging.js';
|
|
3
3
|
export declare class ApiCallError extends Error {
|
|
4
4
|
status: number;
|
|
@@ -39,6 +39,7 @@ export interface ApiClient {
|
|
|
39
39
|
waitSeconds: number;
|
|
40
40
|
}): Promise<GetAgentAcknowledgementResponse>;
|
|
41
41
|
createMediaUpload(body: CreateMediaUploadRequestT): Promise<CreateMediaUploadResponse>;
|
|
42
|
+
finalizeMediaUpload(mediaId: string): Promise<FinalizeMediaUploadResponse>;
|
|
42
43
|
uploadMedia(grant: CreateMediaUploadResponse, bytes: Uint8Array): Promise<void>;
|
|
43
44
|
health(): Promise<boolean>;
|
|
44
45
|
}
|
package/dist/client.js
CHANGED
|
@@ -132,6 +132,9 @@ export function createClient(baseUrl, bearer, options = {}) {
|
|
|
132
132
|
putAgentAcknowledgement: (requestId, body) => call('PUT', `/api/v1/notifications/${encodeURIComponent(requestId)}/agent-acknowledgement`, body),
|
|
133
133
|
agentAcknowledgement: (requestId, { waitSeconds }) => call('GET', `/api/v1/notifications/${encodeURIComponent(requestId)}/agent-acknowledgement?wait_seconds=${waitSeconds}`, undefined, waitSeconds),
|
|
134
134
|
createMediaUpload: (body) => call('POST', '/api/v1/media', body),
|
|
135
|
+
// Storage-observed bytes become authoritative before a send can reference
|
|
136
|
+
// the upload; the caller's declared size is only a request.
|
|
137
|
+
finalizeMediaUpload: (mediaId) => call('POST', `/api/v1/media/${encodeURIComponent(mediaId)}/finalize`),
|
|
135
138
|
uploadMedia: async (grant, bytes) => {
|
|
136
139
|
let response;
|
|
137
140
|
try {
|
|
@@ -150,6 +153,10 @@ export function createClient(baseUrl, bearer, options = {}) {
|
|
|
150
153
|
if (!response.ok) {
|
|
151
154
|
throw new NetworkError(`Upload rejected with status ${response.status}`);
|
|
152
155
|
}
|
|
156
|
+
// A successful storage PUT is not authorization to reference the media.
|
|
157
|
+
// The idempotent finalize call makes the server inspect provider metadata
|
|
158
|
+
// and commit authoritative quota before the command can use media_id.
|
|
159
|
+
await call('POST', `/api/v1/media/${encodeURIComponent(grant.media_id)}/finalize`);
|
|
153
160
|
},
|
|
154
161
|
health: async () => {
|
|
155
162
|
try {
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAqBA,MAAM,OAAO,YAAa,SAAQ,KAAK;IAE5B;IACA;IAEA;IACA;IALT,YACS,MAAc,EACd,IAAY,EACnB,OAAe,EACR,aAA4B,IAAI,EAChC,UAAmB,IAAI;QAE9B,KAAK,CAAC,OAAO,CAAC,CAAA;QANP,WAAM,GAAN,MAAM,CAAQ;QACd,SAAI,GAAJ,IAAI,CAAQ;QAEZ,eAAU,GAAV,UAAU,CAAsB;QAChC,YAAO,GAAP,OAAO,CAAgB;IAGhC,CAAC;CACF;AAED,MAAM,OAAO,YAAa,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AAC,cAAc;oBAC7B,IAAI,EAAE,KAAK;oBACX,qEAAqE;oBACrE,+CAA+C;oBAC/C,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;iBACxD,CAAC,CAAA;YACJ,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,MAAM,IAAI,YAAY,CAAC,kBAAkB,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;YACzD,CAAC;YACD,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;gBACjB,MAAM,IAAI,YAAY,CAAC,+BAA+B,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;YAC1E,CAAC;YACD,wEAAwE;YACxE,0EAA0E;YAC1E,sEAAsE;YACtE,MAAM,IAAI,CACR,MAAM,EACN,iBAAiB,kBAAkB,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,CAC/D,CAAA;QACH,CAAC;QACD,MAAM,EAAE,KAAK,IAAI,EAAE;YACjB,IAAI,CAAC;gBACH,MAAM,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,CAAA;gBAC7B,OAAO,IAAI,CAAA;YACb,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,KAAK,CAAA;YACd,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
|
package/dist/commands.d.ts
CHANGED
|
@@ -205,21 +205,29 @@ export interface AskFlags {
|
|
|
205
205
|
choice?: string[];
|
|
206
206
|
/** The single question is multi-select: several answers may be chosen. */
|
|
207
207
|
multi?: boolean;
|
|
208
|
-
/**
|
|
209
|
-
|
|
208
|
+
/** Optional Markdown context appended after the question block. */
|
|
209
|
+
body?: string;
|
|
210
210
|
/** Raw JSON for a multi-question form; replaces the positional question. */
|
|
211
211
|
form?: string;
|
|
212
|
-
|
|
212
|
+
image?: string[];
|
|
213
|
+
imageAlt?: string[];
|
|
214
|
+
project?: string;
|
|
215
|
+
sessionId?: string;
|
|
216
|
+
sessionLabel?: string;
|
|
217
|
+
}
|
|
218
|
+
export interface BuiltQuestions {
|
|
219
|
+
questions: QuestionT[];
|
|
220
|
+
/** Canonical Markdown body: question block first, optional context second. */
|
|
221
|
+
body: string;
|
|
213
222
|
}
|
|
214
223
|
/**
|
|
215
|
-
* Turn ask input into
|
|
216
|
-
* validated
|
|
217
|
-
* where a rejection becomes a stderr note the agent never reads.
|
|
224
|
+
* Turn ask input into questions plus their canonical body. Everything is
|
|
225
|
+
* validated at registration because a later hook failure is easy to miss.
|
|
218
226
|
*/
|
|
219
227
|
export declare function buildQuestions(flags: AskFlags, question: string | undefined): {
|
|
220
228
|
ok: true;
|
|
221
229
|
questions: QuestionT[];
|
|
222
|
-
|
|
230
|
+
body: string;
|
|
223
231
|
} | {
|
|
224
232
|
ok: false;
|
|
225
233
|
error: string;
|
|
@@ -229,7 +237,7 @@ export declare function buildQuestions(flags: AskFlags, question: string | undef
|
|
|
229
237
|
* can ask in prose and end its turn; the terminal keeps the question to itself
|
|
230
238
|
* for `ask_grace_seconds` before it reaches any device.
|
|
231
239
|
*/
|
|
232
|
-
export declare function askCommand(deps: CommandDeps, question: string | undefined, flags: AskFlags): number
|
|
240
|
+
export declare function askCommand(deps: CommandDeps, question: string | undefined, flags: AskFlags): number | Promise<number>;
|
|
233
241
|
/** Record the one Agent Acknowledgement associated with a replied-to request. */
|
|
234
242
|
export declare function acknowledgeCommand(deps: CommandDeps, requestId: string, flags: {
|
|
235
243
|
text?: string;
|
|
@@ -314,7 +322,7 @@ export declare function logsCommand(deps: CommandDeps, flags: LogsFlags): number
|
|
|
314
322
|
* Null when the build cannot establish its version; see `./release.js`.
|
|
315
323
|
*/
|
|
316
324
|
export declare const SKILLS_SOURCE: string | null;
|
|
317
|
-
/** Derive a contract-valid project slug
|
|
325
|
+
/** Derive a contract-valid project slug; init alone needs a non-empty fallback. */
|
|
318
326
|
export declare function projectSlugFrom(name: string): string;
|
|
319
327
|
export interface InitFlags {
|
|
320
328
|
projectId?: string;
|