@raidiant/notifai 11.7.1-beta.2 → 12.0.0-beta.11
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 +61 -4
- package/NOTICE +16 -0
- package/THIRD_PARTY_NOTICES +725 -0
- package/bin/notifai.mjs +11420 -0
- package/data/install.ps1 +318 -0
- package/data/release.json +1 -0
- package/inventory.json +1 -0
- package/npm-adapter-files.json +52 -0
- package/package.json +14 -44
- package/README.md +0 -168
- package/dist/agent-update-notice.d.ts +0 -7
- package/dist/agent-update-notice.js +0 -77
- package/dist/agent-update-notice.js.map +0 -1
- package/dist/atomic-file.d.ts +0 -30
- package/dist/atomic-file.js +0 -148
- package/dist/atomic-file.js.map +0 -1
- package/dist/attendant-update.d.ts +0 -15
- package/dist/attendant-update.js +0 -96
- package/dist/attendant-update.js.map +0 -1
- package/dist/claude-wake.d.ts +0 -108
- package/dist/claude-wake.js +0 -369
- package/dist/claude-wake.js.map +0 -1
- package/dist/cli-bin.d.ts +0 -26
- package/dist/cli-bin.js +0 -220
- package/dist/cli-bin.js.map +0 -1
- package/dist/cli-contract.d.ts +0 -16
- package/dist/cli-contract.js +0 -27
- package/dist/cli-contract.js.map +0 -1
- package/dist/cli-release.d.ts +0 -36
- package/dist/cli-release.js +0 -85
- package/dist/cli-release.js.map +0 -1
- package/dist/client.d.ts +0 -109
- package/dist/client.js +0 -217
- package/dist/client.js.map +0 -1
- package/dist/codex-answer-control.d.ts +0 -14
- package/dist/codex-answer-control.js +0 -41
- package/dist/codex-answer-control.js.map +0 -1
- package/dist/codex-answer-presentation.d.ts +0 -18
- package/dist/codex-answer-presentation.js +0 -113
- package/dist/codex-answer-presentation.js.map +0 -1
- package/dist/codex-input-lifecycle.d.ts +0 -10
- package/dist/codex-input-lifecycle.js +0 -63
- package/dist/codex-input-lifecycle.js.map +0 -1
- package/dist/codex-native-control.d.ts +0 -13
- package/dist/codex-native-control.js +0 -120
- package/dist/codex-native-control.js.map +0 -1
- package/dist/codex-native-turn.d.ts +0 -37
- package/dist/codex-native-turn.js +0 -155
- package/dist/codex-native-turn.js.map +0 -1
- package/dist/codex-question-bindings.d.ts +0 -76
- package/dist/codex-question-bindings.js +0 -151
- package/dist/codex-question-bindings.js.map +0 -1
- package/dist/codex-queue-control.d.ts +0 -21
- package/dist/codex-queue-control.js +0 -59
- package/dist/codex-queue-control.js.map +0 -1
- package/dist/codex-tool-messages.d.ts +0 -7
- package/dist/codex-tool-messages.js +0 -126
- package/dist/codex-tool-messages.js.map +0 -1
- package/dist/codex-wake.d.ts +0 -58
- package/dist/codex-wake.js +0 -135
- package/dist/codex-wake.js.map +0 -1
- package/dist/command-session.d.ts +0 -14
- package/dist/command-session.js +0 -31
- package/dist/command-session.js.map +0 -1
- package/dist/commands-acknowledge.d.ts +0 -13
- package/dist/commands-acknowledge.js +0 -116
- package/dist/commands-acknowledge.js.map +0 -1
- package/dist/commands-agent-sessions.d.ts +0 -6
- package/dist/commands-agent-sessions.js +0 -51
- package/dist/commands-agent-sessions.js.map +0 -1
- package/dist/commands-ask.d.ts +0 -62
- package/dist/commands-ask.js +0 -503
- package/dist/commands-ask.js.map +0 -1
- package/dist/commands-auth.d.ts +0 -76
- package/dist/commands-auth.js +0 -421
- package/dist/commands-auth.js.map +0 -1
- package/dist/commands-close.d.ts +0 -6
- package/dist/commands-close.js +0 -273
- package/dist/commands-close.js.map +0 -1
- package/dist/commands-config.d.ts +0 -31
- package/dist/commands-config.js +0 -272
- package/dist/commands-config.js.map +0 -1
- package/dist/commands-core.d.ts +0 -145
- package/dist/commands-core.js +0 -190
- package/dist/commands-core.js.map +0 -1
- package/dist/commands-devices.d.ts +0 -41
- package/dist/commands-devices.js +0 -144
- package/dist/commands-devices.js.map +0 -1
- package/dist/commands-doctor.d.ts +0 -25
- package/dist/commands-doctor.js +0 -1553
- package/dist/commands-doctor.js.map +0 -1
- package/dist/commands-guidance.d.ts +0 -27
- package/dist/commands-guidance.js +0 -150
- package/dist/commands-guidance.js.map +0 -1
- package/dist/commands-harness-context.d.ts +0 -57
- package/dist/commands-harness-context.js +0 -102
- package/dist/commands-harness-context.js.map +0 -1
- package/dist/commands-hook-attend.d.ts +0 -70
- package/dist/commands-hook-attend.js +0 -655
- package/dist/commands-hook-attend.js.map +0 -1
- package/dist/commands-hook-diagnostics.d.ts +0 -37
- package/dist/commands-hook-diagnostics.js +0 -136
- package/dist/commands-hook-diagnostics.js.map +0 -1
- package/dist/commands-hook-install.d.ts +0 -26
- package/dist/commands-hook-install.js +0 -784
- package/dist/commands-hook-install.js.map +0 -1
- package/dist/commands-hook-run.d.ts +0 -29
- package/dist/commands-hook-run.js +0 -933
- package/dist/commands-hook-run.js.map +0 -1
- package/dist/commands-hook-shape.d.ts +0 -19
- package/dist/commands-hook-shape.js +0 -48
- package/dist/commands-hook-shape.js.map +0 -1
- package/dist/commands-init.d.ts +0 -42
- package/dist/commands-init.js +0 -901
- package/dist/commands-init.js.map +0 -1
- package/dist/commands-io.d.ts +0 -2
- package/dist/commands-io.js +0 -117
- package/dist/commands-io.js.map +0 -1
- package/dist/commands-logs.d.ts +0 -30
- package/dist/commands-logs.js +0 -201
- package/dist/commands-logs.js.map +0 -1
- package/dist/commands-native-acknowledge.d.ts +0 -8
- package/dist/commands-native-acknowledge.js +0 -114
- package/dist/commands-native-acknowledge.js.map +0 -1
- package/dist/commands-project.d.ts +0 -4
- package/dist/commands-project.js +0 -41
- package/dist/commands-project.js.map +0 -1
- package/dist/commands-receive.d.ts +0 -3
- package/dist/commands-receive.js +0 -59
- package/dist/commands-receive.js.map +0 -1
- package/dist/commands-send-support.d.ts +0 -59
- package/dist/commands-send-support.js +0 -258
- package/dist/commands-send-support.js.map +0 -1
- package/dist/commands-send.d.ts +0 -34
- package/dist/commands-send.js +0 -900
- package/dist/commands-send.js.map +0 -1
- package/dist/commands-setup-proof.d.ts +0 -43
- package/dist/commands-setup-proof.js +0 -134
- package/dist/commands-setup-proof.js.map +0 -1
- package/dist/commands-skill.d.ts +0 -21
- package/dist/commands-skill.js +0 -199
- package/dist/commands-skill.js.map +0 -1
- package/dist/commands-sounds.d.ts +0 -12
- package/dist/commands-sounds.js +0 -35
- package/dist/commands-sounds.js.map +0 -1
- package/dist/commands-update-check.d.ts +0 -6
- package/dist/commands-update-check.js +0 -102
- package/dist/commands-update-check.js.map +0 -1
- package/dist/commands-update-resume.d.ts +0 -7
- package/dist/commands-update-resume.js +0 -143
- package/dist/commands-update-resume.js.map +0 -1
- package/dist/commands-update-skill.d.ts +0 -5
- package/dist/commands-update-skill.js +0 -36
- package/dist/commands-update-skill.js.map +0 -1
- package/dist/commands-update.d.ts +0 -11
- package/dist/commands-update.js +0 -286
- package/dist/commands-update.js.map +0 -1
- package/dist/commands.d.ts +0 -26
- package/dist/commands.js +0 -27
- package/dist/commands.js.map +0 -1
- package/dist/config-schema.d.ts +0 -62
- package/dist/config-schema.js +0 -302
- package/dist/config-schema.js.map +0 -1
- package/dist/config.d.ts +0 -181
- package/dist/config.js +0 -357
- package/dist/config.js.map +0 -1
- package/dist/credentials.d.ts +0 -96
- package/dist/credentials.js +0 -342
- package/dist/credentials.js.map +0 -1
- package/dist/file-lock.d.ts +0 -34
- package/dist/file-lock.js +0 -367
- package/dist/file-lock.js.map +0 -1
- package/dist/generated-session-label.d.ts +0 -2
- package/dist/generated-session-label.js +0 -152
- package/dist/generated-session-label.js.map +0 -1
- package/dist/guidance-content.d.ts +0 -53
- package/dist/guidance-content.js +0 -248
- package/dist/guidance-content.js.map +0 -1
- package/dist/guidance-render.d.ts +0 -25
- package/dist/guidance-render.js +0 -47
- package/dist/guidance-render.js.map +0 -1
- package/dist/guidance.d.ts +0 -69
- package/dist/guidance.js +0 -173
- package/dist/guidance.js.map +0 -1
- package/dist/harness-session-title.d.ts +0 -22
- package/dist/harness-session-title.js +0 -74
- package/dist/harness-session-title.js.map +0 -1
- package/dist/harnesses.d.ts +0 -65
- package/dist/harnesses.js +0 -159
- package/dist/harnesses.js.map +0 -1
- package/dist/hermes-attendant.d.ts +0 -38
- package/dist/hermes-attendant.js +0 -337
- package/dist/hermes-attendant.js.map +0 -1
- package/dist/hermes-plugin.d.ts +0 -11
- package/dist/hermes-plugin.js +0 -299
- package/dist/hermes-plugin.js.map +0 -1
- package/dist/hook-acknowledgements.d.ts +0 -70
- package/dist/hook-acknowledgements.js +0 -490
- package/dist/hook-acknowledgements.js.map +0 -1
- package/dist/hook-adapter.d.ts +0 -48
- package/dist/hook-adapter.js +0 -419
- package/dist/hook-adapter.js.map +0 -1
- package/dist/hook-events.d.ts +0 -105
- package/dist/hook-events.js +0 -130
- package/dist/hook-events.js.map +0 -1
- package/dist/hook-gates.d.ts +0 -7
- package/dist/hook-gates.js +0 -20
- package/dist/hook-gates.js.map +0 -1
- package/dist/hook-input.d.ts +0 -10
- package/dist/hook-input.js +0 -64
- package/dist/hook-input.js.map +0 -1
- package/dist/hook-lifecycle.d.ts +0 -112
- package/dist/hook-lifecycle.js +0 -2031
- package/dist/hook-lifecycle.js.map +0 -1
- package/dist/hook-project-sessions.d.ts +0 -28
- package/dist/hook-project-sessions.js +0 -141
- package/dist/hook-project-sessions.js.map +0 -1
- package/dist/hook-question-lock.d.ts +0 -29
- package/dist/hook-question-lock.js +0 -217
- package/dist/hook-question-lock.js.map +0 -1
- package/dist/hook-question-retirement.d.ts +0 -74
- package/dist/hook-question-retirement.js +0 -314
- package/dist/hook-question-retirement.js.map +0 -1
- package/dist/hook-question-state.d.ts +0 -58
- package/dist/hook-question-state.js +0 -239
- package/dist/hook-question-state.js.map +0 -1
- package/dist/hook-session-state.d.ts +0 -127
- package/dist/hook-session-state.js +0 -488
- package/dist/hook-session-state.js.map +0 -1
- package/dist/hook-types.d.ts +0 -476
- package/dist/hook-types.js +0 -4
- package/dist/hook-types.js.map +0 -1
- package/dist/injection-render.d.ts +0 -36
- package/dist/injection-render.js +0 -61
- package/dist/injection-render.js.map +0 -1
- package/dist/install-hooks.d.ts +0 -470
- package/dist/install-hooks.js +0 -1622
- package/dist/install-hooks.js.map +0 -1
- package/dist/integration-health.d.ts +0 -26
- package/dist/integration-health.js +0 -133
- package/dist/integration-health.js.map +0 -1
- package/dist/interactive.d.ts +0 -22
- package/dist/interactive.js +0 -644
- package/dist/interactive.js.map +0 -1
- package/dist/invocation-context.d.ts +0 -47
- package/dist/invocation-context.js +0 -164
- package/dist/invocation-context.js.map +0 -1
- package/dist/local-path.d.ts +0 -7
- package/dist/local-path.js +0 -27
- package/dist/local-path.js.map +0 -1
- package/dist/logging.d.ts +0 -157
- package/dist/logging.js +0 -599
- package/dist/logging.js.map +0 -1
- package/dist/main-run.d.ts +0 -1
- package/dist/main-run.js +0 -42
- package/dist/main-run.js.map +0 -1
- package/dist/main.d.ts +0 -2
- package/dist/main.js +0 -12
- package/dist/main.js.map +0 -1
- package/dist/native-answer-operation.d.ts +0 -70
- package/dist/native-answer-operation.js +0 -247
- package/dist/native-answer-operation.js.map +0 -1
- package/dist/native-skills.d.ts +0 -64
- package/dist/native-skills.js +0 -167
- package/dist/native-skills.js.map +0 -1
- package/dist/node-floor.d.ts +0 -19
- package/dist/node-floor.js +0 -32
- package/dist/node-floor.js.map +0 -1
- package/dist/npm-invocation.d.ts +0 -34
- package/dist/npm-invocation.js +0 -53
- package/dist/npm-invocation.js.map +0 -1
- package/dist/openclaw-continuation-bridge.d.ts +0 -7
- package/dist/openclaw-continuation-bridge.js +0 -64
- package/dist/openclaw-continuation-bridge.js.map +0 -1
- package/dist/openclaw-gateway-readiness.d.ts +0 -1
- package/dist/openclaw-gateway-readiness.js +0 -24
- package/dist/openclaw-gateway-readiness.js.map +0 -1
- package/dist/openclaw-generation.d.ts +0 -21
- package/dist/openclaw-generation.js +0 -115
- package/dist/openclaw-generation.js.map +0 -1
- package/dist/openclaw-message-bridge.d.ts +0 -8
- package/dist/openclaw-message-bridge.js +0 -93
- package/dist/openclaw-message-bridge.js.map +0 -1
- package/dist/openclaw-pending.d.ts +0 -8
- package/dist/openclaw-pending.js +0 -47
- package/dist/openclaw-pending.js.map +0 -1
- package/dist/openclaw-plugin.d.ts +0 -75
- package/dist/openclaw-plugin.js +0 -1353
- package/dist/openclaw-plugin.js.map +0 -1
- package/dist/openclaw-session-access.d.ts +0 -12
- package/dist/openclaw-session-access.js +0 -79
- package/dist/openclaw-session-access.js.map +0 -1
- package/dist/opencode-plugin.d.ts +0 -88
- package/dist/opencode-plugin.js +0 -286
- package/dist/opencode-plugin.js.map +0 -1
- package/dist/orca-session-title.d.ts +0 -11
- package/dist/orca-session-title.js +0 -111
- package/dist/orca-session-title.js.map +0 -1
- package/dist/pack-feedback-slice.d.ts +0 -35
- package/dist/pack-feedback-slice.js +0 -126
- package/dist/pack-feedback-slice.js.map +0 -1
- package/dist/pairing-qr.d.ts +0 -5
- package/dist/pairing-qr.js +0 -24
- package/dist/pairing-qr.js.map +0 -1
- package/dist/pending-pairing.d.ts +0 -38
- package/dist/pending-pairing.js +0 -70
- package/dist/pending-pairing.js.map +0 -1
- package/dist/platform.d.ts +0 -67
- package/dist/platform.js +0 -140
- package/dist/platform.js.map +0 -1
- package/dist/process-identity.d.ts +0 -26
- package/dist/process-identity.js +0 -82
- package/dist/process-identity.js.map +0 -1
- package/dist/program.d.ts +0 -59
- package/dist/program.js +0 -691
- package/dist/program.js.map +0 -1
- package/dist/project-enablement.d.ts +0 -21
- package/dist/project-enablement.js +0 -71
- package/dist/project-enablement.js.map +0 -1
- package/dist/question-settlement-process.d.ts +0 -17
- package/dist/question-settlement-process.js +0 -35
- package/dist/question-settlement-process.js.map +0 -1
- package/dist/question-timing.d.ts +0 -46
- package/dist/question-timing.js +0 -48
- package/dist/question-timing.js.map +0 -1
- package/dist/readiness.d.ts +0 -153
- package/dist/readiness.js +0 -149
- package/dist/readiness.js.map +0 -1
- package/dist/release.d.ts +0 -31
- package/dist/release.js +0 -52
- package/dist/release.js.map +0 -1
- package/dist/send-attempts.d.ts +0 -26
- package/dist/send-attempts.js +0 -139
- package/dist/send-attempts.js.map +0 -1
- package/dist/send.d.ts +0 -115
- package/dist/send.js +0 -421
- package/dist/send.js.map +0 -1
- package/dist/session-activation.d.ts +0 -13
- package/dist/session-activation.js +0 -64
- package/dist/session-activation.js.map +0 -1
- package/dist/session-attendant-probe.d.ts +0 -85
- package/dist/session-attendant-probe.js +0 -173
- package/dist/session-attendant-probe.js.map +0 -1
- package/dist/session-attendant-state.d.ts +0 -70
- package/dist/session-attendant-state.js +0 -256
- package/dist/session-attendant-state.js.map +0 -1
- package/dist/session-attendant.d.ts +0 -143
- package/dist/session-attendant.js +0 -520
- package/dist/session-attendant.js.map +0 -1
- package/dist/session-delivery.d.ts +0 -249
- package/dist/session-delivery.js +0 -576
- package/dist/session-delivery.js.map +0 -1
- package/dist/session-handoff.d.ts +0 -98
- package/dist/session-handoff.js +0 -118
- package/dist/session-handoff.js.map +0 -1
- package/dist/session-input-wakes.d.ts +0 -78
- package/dist/session-input-wakes.js +0 -239
- package/dist/session-input-wakes.js.map +0 -1
- package/dist/session-inputs.d.ts +0 -57
- package/dist/session-inputs.js +0 -434
- package/dist/session-inputs.js.map +0 -1
- package/dist/session-labels.d.ts +0 -56
- package/dist/session-labels.js +0 -396
- package/dist/session-labels.js.map +0 -1
- package/dist/session-message-handoff.d.ts +0 -39
- package/dist/session-message-handoff.js +0 -107
- package/dist/session-message-handoff.js.map +0 -1
- package/dist/setup-destinations.d.ts +0 -23
- package/dist/setup-destinations.js +0 -44
- package/dist/setup-destinations.js.map +0 -1
- package/dist/skill-integrity.d.ts +0 -54
- package/dist/skill-integrity.js +0 -164
- package/dist/skill-integrity.js.map +0 -1
- package/dist/skill-source/manifest.json +0 -40
- package/dist/skill-source/notifai/SKILL.md +0 -350
- package/dist/skill-source/notifai/references/diagnostics.md +0 -36
- package/dist/skill-source/notifai/references/harness-setup.md +0 -384
- package/dist/skill-source/notifai/references/native-questions.md +0 -51
- package/dist/skill-source/notifai/references/notes-and-edits.md +0 -54
- package/dist/skill-source/notifai/references/send-details.md +0 -14
- package/dist/skill-source/notifai/references/updates.md +0 -116
- package/dist/skill-source/notifai/references/writing-examples.md +0 -56
- package/dist/sound-ref.d.ts +0 -23
- package/dist/sound-ref.js +0 -28
- package/dist/sound-ref.js.map +0 -1
- package/dist/ui/banner.d.ts +0 -22
- package/dist/ui/banner.js +0 -87
- package/dist/ui/banner.js.map +0 -1
- package/dist/ui/config-view.d.ts +0 -30
- package/dist/ui/config-view.js +0 -108
- package/dist/ui/config-view.js.map +0 -1
- package/dist/ui/help.d.ts +0 -44
- package/dist/ui/help.js +0 -107
- package/dist/ui/help.js.map +0 -1
- package/dist/ui/theme.d.ts +0 -90
- package/dist/ui/theme.js +0 -244
- package/dist/ui/theme.js.map +0 -1
- package/dist/update-handoff.d.ts +0 -29
- package/dist/update-handoff.js +0 -69
- package/dist/update-handoff.js.map +0 -1
- package/dist/url-policy.d.ts +0 -85
- package/dist/url-policy.js +0 -369
- package/dist/url-policy.js.map +0 -1
- package/dist/version.d.ts +0 -40
- package/dist/version.js +0 -132
- package/dist/version.js.map +0 -1
- package/dist/wake-support.d.ts +0 -40
- package/dist/wake-support.js +0 -95
- package/dist/wake-support.js.map +0 -1
package/dist/release.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* What this build is, according to the manifest npm actually shipped.
|
|
3
|
-
*
|
|
4
|
-
* Read from disk rather than compiled in, because a constant baked into
|
|
5
|
-
* `dist/` is only ever as fresh as the last build. A stale `dist/` sitting
|
|
6
|
-
* next to a newer `package.json` is a real failure mode — it produces a CLI
|
|
7
|
-
* that reports the new version perfectly while running the old code — and the
|
|
8
|
-
* only defence that survives it is refusing to carry a second copy of the
|
|
9
|
-
* number at all.
|
|
10
|
-
*
|
|
11
|
-
* The manifest sits one level above both `src/` and `dist/`, so a single
|
|
12
|
-
* relative path resolves in a source checkout and in a published install.
|
|
13
|
-
*
|
|
14
|
-
* Returns null rather than guessing: a build that cannot establish its own
|
|
15
|
-
* identity has to say so, so callers can degrade honestly instead of
|
|
16
|
-
* asserting something they do not know.
|
|
17
|
-
*/
|
|
18
|
-
export declare function packageVersion(): string | null;
|
|
19
|
-
/**
|
|
20
|
-
* Where `npx skills add` fetches the agent skill from, as printed to users.
|
|
21
|
-
*
|
|
22
|
-
* The human-readable release tag naming this exact build. The installer does
|
|
23
|
-
* not trust or fetch this ref: it installs the verified skill embedded in the
|
|
24
|
-
* npm package through a short-lived local source. Deriving the label from the
|
|
25
|
-
* version keeps release identity from drifting; it used to be maintained by
|
|
26
|
-
* hand in three places.
|
|
27
|
-
*
|
|
28
|
-
* In the skills CLI grammar `owner/repo#ref` selects a Git ref, while
|
|
29
|
-
* `owner/repo@name` selects a skill — so the `#` here is load-bearing.
|
|
30
|
-
*/
|
|
31
|
-
export declare function skillsSource(): string | null;
|
package/dist/release.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { readFileSync } from 'node:fs';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
import { fileURLToPath } from 'node:url';
|
|
4
|
-
/**
|
|
5
|
-
* What this build is, according to the manifest npm actually shipped.
|
|
6
|
-
*
|
|
7
|
-
* Read from disk rather than compiled in, because a constant baked into
|
|
8
|
-
* `dist/` is only ever as fresh as the last build. A stale `dist/` sitting
|
|
9
|
-
* next to a newer `package.json` is a real failure mode — it produces a CLI
|
|
10
|
-
* that reports the new version perfectly while running the old code — and the
|
|
11
|
-
* only defence that survives it is refusing to carry a second copy of the
|
|
12
|
-
* number at all.
|
|
13
|
-
*
|
|
14
|
-
* The manifest sits one level above both `src/` and `dist/`, so a single
|
|
15
|
-
* relative path resolves in a source checkout and in a published install.
|
|
16
|
-
*
|
|
17
|
-
* Returns null rather than guessing: a build that cannot establish its own
|
|
18
|
-
* identity has to say so, so callers can degrade honestly instead of
|
|
19
|
-
* asserting something they do not know.
|
|
20
|
-
*/
|
|
21
|
-
export function packageVersion() {
|
|
22
|
-
try {
|
|
23
|
-
const manifest = path.join(path.dirname(fileURLToPath(import.meta.url)), '..', 'package.json');
|
|
24
|
-
const parsed = JSON.parse(readFileSync(manifest, 'utf8'));
|
|
25
|
-
if (typeof parsed === 'object' && parsed !== null) {
|
|
26
|
-
const { version } = parsed;
|
|
27
|
-
if (typeof version === 'string' && version.length > 0)
|
|
28
|
-
return version;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
catch {
|
|
32
|
-
// Fall through: an unreadable manifest must not stop the CLI running.
|
|
33
|
-
}
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Where `npx skills add` fetches the agent skill from, as printed to users.
|
|
38
|
-
*
|
|
39
|
-
* The human-readable release tag naming this exact build. The installer does
|
|
40
|
-
* not trust or fetch this ref: it installs the verified skill embedded in the
|
|
41
|
-
* npm package through a short-lived local source. Deriving the label from the
|
|
42
|
-
* version keeps release identity from drifting; it used to be maintained by
|
|
43
|
-
* hand in three places.
|
|
44
|
-
*
|
|
45
|
-
* In the skills CLI grammar `owner/repo#ref` selects a Git ref, while
|
|
46
|
-
* `owner/repo@name` selects a skill — so the `#` here is load-bearing.
|
|
47
|
-
*/
|
|
48
|
-
export function skillsSource() {
|
|
49
|
-
const version = packageVersion();
|
|
50
|
-
return version === null ? null : `Raidiant-io/notifai#v${version}`;
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=release.js.map
|
package/dist/release.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"release.js","sourceRoot":"","sources":["../src/release.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,cAAc;IAC5B,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,CAAA;QAC9F,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAA;QAClE,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;YAClD,MAAM,EAAE,OAAO,EAAE,GAAG,MAA+B,CAAA;YACnD,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;gBAAE,OAAO,OAAO,CAAA;QACvE,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,sEAAsE;IACxE,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,YAAY;IAC1B,MAAM,OAAO,GAAG,cAAc,EAAE,CAAA;IAChC,OAAO,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,wBAAwB,OAAO,EAAE,CAAA;AACpE,CAAC"}
|
package/dist/send-attempts.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { NotificationDraftT } from '@raidiant/notifai-protocol';
|
|
2
|
-
import type { MachineCredential } from './credentials.js';
|
|
3
|
-
export declare const SEND_ATTEMPT_TTL_MS: number;
|
|
4
|
-
/** Stable pre-upload media identities used only inside the keyed draft digest. */
|
|
5
|
-
export declare function semanticMediaIds(images: readonly string[], cwd: string): string[];
|
|
6
|
-
/** A keyed digest proves equality without persisting notification content. */
|
|
7
|
-
export declare function sendDraftFingerprint(draft: NotificationDraftT, credential: MachineCredential): string;
|
|
8
|
-
export type BeginAttempt = {
|
|
9
|
-
ok: true;
|
|
10
|
-
attemptId: string;
|
|
11
|
-
idempotencyKey: string;
|
|
12
|
-
replay: boolean;
|
|
13
|
-
} | {
|
|
14
|
-
ok: false;
|
|
15
|
-
code: 'retry_not_found' | 'retry_ambiguous';
|
|
16
|
-
message: string;
|
|
17
|
-
};
|
|
18
|
-
export declare function beginSendAttempt(options: {
|
|
19
|
-
env: NodeJS.ProcessEnv;
|
|
20
|
-
credential: MachineCredential;
|
|
21
|
-
fingerprint: string;
|
|
22
|
-
retry: boolean;
|
|
23
|
-
idempotencyKey?: string;
|
|
24
|
-
now?: number;
|
|
25
|
-
}): BeginAttempt;
|
|
26
|
-
export declare function settleSendAttempt(env: NodeJS.ProcessEnv, attemptId: string): void;
|
package/dist/send-attempts.js
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { createHash, createHmac, randomBytes } from 'node:crypto';
|
|
2
|
-
import { closeSync, constants, existsSync, fstatSync, lstatSync, openSync, readFileSync, readdirSync, rmSync, } from 'node:fs';
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
import { atomicWriteFileSync } from './atomic-file.js';
|
|
5
|
-
import { stateDir } from './config.js';
|
|
6
|
-
export const SEND_ATTEMPT_TTL_MS = 24 * 60 * 60 * 1000;
|
|
7
|
-
/** Stable pre-upload media identities used only inside the keyed draft digest. */
|
|
8
|
-
export function semanticMediaIds(images, cwd) {
|
|
9
|
-
return images.map((image) => {
|
|
10
|
-
if (image.startsWith('med_'))
|
|
11
|
-
return image;
|
|
12
|
-
const digest = createHash('sha256');
|
|
13
|
-
if (/^https?:\/\//i.test(image))
|
|
14
|
-
digest.update(`url\0${image}`);
|
|
15
|
-
else
|
|
16
|
-
digest.update('file\0').update(readFileSync(path.resolve(cwd, image)));
|
|
17
|
-
return `med_retry_${digest.digest('base64url')}`;
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
function directory(env) {
|
|
21
|
-
return path.join(stateDir(env), 'send-attempts');
|
|
22
|
-
}
|
|
23
|
-
function credentialTag(credential) {
|
|
24
|
-
return createHmac('sha256', credential.secret)
|
|
25
|
-
.update('notifai-send-attempt-credential-v1')
|
|
26
|
-
.digest('base64url');
|
|
27
|
-
}
|
|
28
|
-
/** A keyed digest proves equality without persisting notification content. */
|
|
29
|
-
export function sendDraftFingerprint(draft, credential) {
|
|
30
|
-
return createHmac('sha256', credential.secret)
|
|
31
|
-
.update('notifai-send-draft-v1\0')
|
|
32
|
-
.update(JSON.stringify(draft))
|
|
33
|
-
.digest('base64url');
|
|
34
|
-
}
|
|
35
|
-
function parseRecord(file) {
|
|
36
|
-
let descriptor;
|
|
37
|
-
try {
|
|
38
|
-
const before = lstatSync(file);
|
|
39
|
-
const uid = typeof process.getuid === 'function' ? process.getuid() : undefined;
|
|
40
|
-
if (before.isSymbolicLink() || !before.isFile() || (uid !== undefined && before.uid !== uid)) {
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
const flags = constants.O_RDONLY | (process.platform === 'win32' ? 0 : constants.O_NOFOLLOW);
|
|
44
|
-
descriptor = openSync(file, flags);
|
|
45
|
-
const opened = fstatSync(descriptor);
|
|
46
|
-
if (!opened.isFile() || opened.dev !== before.dev || opened.ino !== before.ino)
|
|
47
|
-
return null;
|
|
48
|
-
const value = JSON.parse(readFileSync(descriptor, 'utf8'));
|
|
49
|
-
return value.version === 1 &&
|
|
50
|
-
typeof value.attempt_id === 'string' &&
|
|
51
|
-
typeof value.fingerprint === 'string' &&
|
|
52
|
-
typeof value.idempotency_key === 'string' &&
|
|
53
|
-
typeof value.credential_tag === 'string' &&
|
|
54
|
-
typeof value.machine_id === 'string' &&
|
|
55
|
-
typeof value.service === 'string' &&
|
|
56
|
-
typeof value.created_at === 'string' &&
|
|
57
|
-
typeof value.expires_at === 'string'
|
|
58
|
-
? value
|
|
59
|
-
: null;
|
|
60
|
-
}
|
|
61
|
-
catch {
|
|
62
|
-
return null;
|
|
63
|
-
}
|
|
64
|
-
finally {
|
|
65
|
-
if (descriptor !== undefined)
|
|
66
|
-
closeSync(descriptor);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
function liveRecords(env, credential, now) {
|
|
70
|
-
const dir = directory(env);
|
|
71
|
-
if (!existsSync(dir))
|
|
72
|
-
return [];
|
|
73
|
-
const directoryStat = lstatSync(dir);
|
|
74
|
-
const uid = typeof process.getuid === 'function' ? process.getuid() : undefined;
|
|
75
|
-
if (directoryStat.isSymbolicLink() ||
|
|
76
|
-
!directoryStat.isDirectory() ||
|
|
77
|
-
(uid !== undefined && directoryStat.uid !== uid))
|
|
78
|
-
return [];
|
|
79
|
-
const tag = credentialTag(credential);
|
|
80
|
-
const records = [];
|
|
81
|
-
for (const name of readdirSync(dir)) {
|
|
82
|
-
if (!name.endsWith('.json'))
|
|
83
|
-
continue;
|
|
84
|
-
const file = path.join(dir, name);
|
|
85
|
-
const record = parseRecord(file);
|
|
86
|
-
const expired = record === null || Date.parse(record.expires_at) <= now;
|
|
87
|
-
const rotated = record !== null && (record.machine_id !== credential.machineId ||
|
|
88
|
-
record.service !== credential.baseUrl ||
|
|
89
|
-
record.credential_tag !== tag);
|
|
90
|
-
if (expired || rotated) {
|
|
91
|
-
rmSync(file, { force: true });
|
|
92
|
-
continue;
|
|
93
|
-
}
|
|
94
|
-
records.push(record);
|
|
95
|
-
}
|
|
96
|
-
return records;
|
|
97
|
-
}
|
|
98
|
-
export function beginSendAttempt(options) {
|
|
99
|
-
const now = options.now ?? Date.now();
|
|
100
|
-
const live = liveRecords(options.env, options.credential, now);
|
|
101
|
-
if (options.retry) {
|
|
102
|
-
const matches = live.filter((record) => record.fingerprint === options.fingerprint);
|
|
103
|
-
if (matches.length === 0) {
|
|
104
|
-
return {
|
|
105
|
-
ok: false,
|
|
106
|
-
code: 'retry_not_found',
|
|
107
|
-
message: 'No unresolved opaque attempt matches this exact send on the current Approved Machine.',
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
if (matches.length > 1) {
|
|
111
|
-
return {
|
|
112
|
-
ok: false,
|
|
113
|
-
code: 'retry_ambiguous',
|
|
114
|
-
message: 'More than one unresolved opaque attempt matches this exact send; refusing to guess or create another notification.',
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
const match = matches[0];
|
|
118
|
-
return { ok: true, attemptId: match.attempt_id, idempotencyKey: match.idempotency_key, replay: true };
|
|
119
|
-
}
|
|
120
|
-
const attemptId = `sat_${randomBytes(12).toString('base64url')}`;
|
|
121
|
-
const idempotencyKey = options.idempotencyKey ?? `cli-${randomBytes(12).toString('base64url')}`;
|
|
122
|
-
const record = {
|
|
123
|
-
version: 1,
|
|
124
|
-
attempt_id: attemptId,
|
|
125
|
-
fingerprint: options.fingerprint,
|
|
126
|
-
idempotency_key: idempotencyKey,
|
|
127
|
-
credential_tag: credentialTag(options.credential),
|
|
128
|
-
machine_id: options.credential.machineId,
|
|
129
|
-
service: options.credential.baseUrl,
|
|
130
|
-
created_at: new Date(now).toISOString(),
|
|
131
|
-
expires_at: new Date(now + SEND_ATTEMPT_TTL_MS).toISOString(),
|
|
132
|
-
};
|
|
133
|
-
atomicWriteFileSync(path.join(directory(options.env), `${attemptId}.json`), `${JSON.stringify(record)}\n`, { mode: 0o600, directoryMode: 0o700, requireCurrentUserOwner: true });
|
|
134
|
-
return { ok: true, attemptId, idempotencyKey, replay: false };
|
|
135
|
-
}
|
|
136
|
-
export function settleSendAttempt(env, attemptId) {
|
|
137
|
-
rmSync(path.join(directory(env), `${attemptId}.json`), { force: true });
|
|
138
|
-
}
|
|
139
|
-
//# sourceMappingURL=send-attempts.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"send-attempts.js","sourceRoot":"","sources":["../src/send-attempts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACjE,OAAO,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,SAAS,EACT,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,MAAM,GACP,MAAM,SAAS,CAAA;AAChB,OAAO,IAAI,MAAM,WAAW,CAAA;AAE5B,OAAO,EAAE,mBAAmB,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IAAI,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,uBAAuB,EAAE,IAAI,EAAE,CACrE,CAAA;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,CAAA;AAC/D,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,GAAsB,EAAE,SAAiB;IACzE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,GAAG,SAAS,OAAO,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;AACzE,CAAC"}
|
package/dist/send.d.ts
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { type LifecycleT, type MediaItemT, type NotificationDraftT, type Platform, type QuestionT, type SourceContextT, type SubmissionReceipt } from '@raidiant/notifai-protocol';
|
|
2
|
-
import type { CliConfig } from './config.js';
|
|
3
|
-
export interface SendFlags {
|
|
4
|
-
title: string;
|
|
5
|
-
/** Purpose-written plain text for native banners and notification lists. */
|
|
6
|
-
summary: string;
|
|
7
|
-
/** Optional standalone focused content. Always interpreted as Markdown. */
|
|
8
|
-
body?: string;
|
|
9
|
-
/** What this notification is; absent means update. */
|
|
10
|
-
kind?: string;
|
|
11
|
-
project?: string;
|
|
12
|
-
/** Deliberately omit Project identity even when config or cwd could supply one. */
|
|
13
|
-
projectless?: boolean;
|
|
14
|
-
/** Opaque exact Agent Session override. */
|
|
15
|
-
sessionId?: string;
|
|
16
|
-
/** Human-readable Agent Session label override. */
|
|
17
|
-
sessionLabel?: string;
|
|
18
|
-
device?: string[];
|
|
19
|
-
all?: boolean;
|
|
20
|
-
ttl?: number;
|
|
21
|
-
collapseKey?: string;
|
|
22
|
-
sound?: string;
|
|
23
|
-
threadId?: string;
|
|
24
|
-
/** Apple interruption level; null is reserved for internal callers that must suppress config. */
|
|
25
|
-
level?: string | null;
|
|
26
|
-
data?: string[];
|
|
27
|
-
/** Ready media ids in author-supplied order. Commands resolve paths and URLs first. */
|
|
28
|
-
image?: string[];
|
|
29
|
-
/** Optional alt text paired with images by position. */
|
|
30
|
-
imageAlt?: string[];
|
|
31
|
-
/**
|
|
32
|
-
* Complete canonical media manifest for internal callers that already froze
|
|
33
|
-
* uploads and alt text. Mutually exclusive with the CLI's parallel inputs.
|
|
34
|
-
*/
|
|
35
|
-
media?: MediaItemT[];
|
|
36
|
-
/** Enable the inline reply action for this Notification Request. */
|
|
37
|
-
reply?: boolean;
|
|
38
|
-
/** How long the server accepts a reply after submission. */
|
|
39
|
-
replyWindow?: number;
|
|
40
|
-
/**
|
|
41
|
-
* Answer labels; turns the reply into a closed question. One flag occurrence
|
|
42
|
-
* per label, always — a label is a label, whatever characters it contains.
|
|
43
|
-
*/
|
|
44
|
-
choice?: string[];
|
|
45
|
-
/** The user may select several of the offered answers. */
|
|
46
|
-
multi?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* A full question set, overriding the single question the flags describe.
|
|
49
|
-
* Not a user-facing flag: `ask --form` and the hooks build it.
|
|
50
|
-
*/
|
|
51
|
-
questions?: QuestionT[];
|
|
52
|
-
/** Platform whose optional notification fields these flags configure. */
|
|
53
|
-
platform?: string;
|
|
54
|
-
/**
|
|
55
|
-
* Lifecycle position of this send; not a user-facing flag. Hooks set it so
|
|
56
|
-
* questions and their retirements ride the wire as what they are.
|
|
57
|
-
*/
|
|
58
|
-
lifecycle?: LifecycleT;
|
|
59
|
-
/**
|
|
60
|
-
* Allow the two-character sequence backslash-n to be sent as visible text.
|
|
61
|
-
* Without this, a likely accidental escaped newline is refused.
|
|
62
|
-
*/
|
|
63
|
-
literalBackslashN?: boolean;
|
|
64
|
-
}
|
|
65
|
-
export declare function hasAccidentalEscapedNewlines(body: string): boolean;
|
|
66
|
-
export declare function accidentalEscapedNewlineMessage(): string;
|
|
67
|
-
export declare function rejectAccidentalEscapedNewlines(body: string | undefined, allowLiteral: boolean | undefined): string | null;
|
|
68
|
-
export type DraftBuild = {
|
|
69
|
-
ok: true;
|
|
70
|
-
draft: NotificationDraftT;
|
|
71
|
-
platform: Platform;
|
|
72
|
-
} | {
|
|
73
|
-
ok: false;
|
|
74
|
-
error: string;
|
|
75
|
-
};
|
|
76
|
-
/** Invocation-derived values beneath explicit and configured author input. */
|
|
77
|
-
export interface DraftInvocation {
|
|
78
|
-
inferredProject?: string | null;
|
|
79
|
-
source?: SourceContextT;
|
|
80
|
-
}
|
|
81
|
-
/** Validate media cardinality and positional alt pairing before any upload starts. */
|
|
82
|
-
export declare function validateMediaInputs(images: readonly string[] | undefined, alts: readonly string[] | undefined): string | null;
|
|
83
|
-
/**
|
|
84
|
-
* Rewrite authorable 1-based media positions to canonical ready media ids and
|
|
85
|
-
* refuse every other shape of media reference before anything is sent.
|
|
86
|
-
*/
|
|
87
|
-
export declare function rewriteMediaReferences(body: string, mediaIds: readonly string[]): {
|
|
88
|
-
ok: true;
|
|
89
|
-
body: string;
|
|
90
|
-
} | {
|
|
91
|
-
ok: false;
|
|
92
|
-
error: string;
|
|
93
|
-
};
|
|
94
|
-
/** Merge flags over resolved config into a Notification Request draft. */
|
|
95
|
-
export declare function buildDraft(config: CliConfig, flags: SendFlags, invocation?: DraftInvocation): DraftBuild;
|
|
96
|
-
/** Human one-screen receipt summary; agents use --json instead. */
|
|
97
|
-
export declare function formatReceipt(receipt: SubmissionReceipt): string;
|
|
98
|
-
/** Stable exit codes: 0 ok/pending, 1 rejected everywhere. */
|
|
99
|
-
export declare function receiptExitCode(receipt: SubmissionReceipt): number;
|
|
100
|
-
/**
|
|
101
|
-
* One flag occurrence, one answer: `--choice Staging --choice Production` ->
|
|
102
|
-
* `[{id:'staging',label:'Staging'}, ...]`.
|
|
103
|
-
*
|
|
104
|
-
* Commas are ordinary characters. The old single-value comma split produced
|
|
105
|
-
* buttons the agent never intended ("Nothing, I'll review" became two answers)
|
|
106
|
-
* and nothing downstream could detect it, so the delimiter form is gone
|
|
107
|
-
* rather than guarded: a label is a label.
|
|
108
|
-
*/
|
|
109
|
-
export declare function parseChoices(value: string[] | undefined): {
|
|
110
|
-
id: string;
|
|
111
|
-
label: string;
|
|
112
|
-
}[] | null | 'invalid';
|
|
113
|
-
/** Message shared by every surface that accepts choice labels. */
|
|
114
|
-
export declare const CHOICE_USAGE: string;
|
|
115
|
-
export declare function slugify(label: string): string;
|