@raidiant/notifai 11.7.1 → 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 +53 -0
- 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
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# Writing examples
|
|
2
|
-
|
|
3
|
-
Examples for the shipped `titles`, `content`, and `acknowledgements` guidance.
|
|
4
|
-
The effective guidance printed by `notifai guidance` always wins over them.
|
|
5
|
-
|
|
6
|
-
## Titles
|
|
7
|
-
|
|
8
|
-
Good:
|
|
9
|
-
|
|
10
|
-
- `Users can now create accounts` — the capability, not the process behind it
|
|
11
|
-
- `Password reset emails aren't sending` — the failure as the user experiences it
|
|
12
|
-
- `Refund rollout awaits provider recovery` — what is stuck, not machinery
|
|
13
|
-
- `Found why checkout was flaky` — the finding they were waiting on
|
|
14
|
-
- `3 orders didn't import and need review` — a count that earns its place
|
|
15
|
-
because acting on it is theirs to do
|
|
16
|
-
|
|
17
|
-
Bad:
|
|
18
|
-
|
|
19
|
-
- `All 42 tests passed` — machinery; say what work is done
|
|
20
|
-
- `Adversarial review found 3 issues` — process report; say what it means for
|
|
21
|
-
what ships
|
|
22
|
-
- `Migration 0007 failed` — internal identifier; say what the user lost
|
|
23
|
-
- `Task complete` / `Build failed` / `Need input` — no substance, and the
|
|
24
|
-
kind restated
|
|
25
|
-
- `Exit code 1` — mechanics, not meaning
|
|
26
|
-
|
|
27
|
-
## Content
|
|
28
|
-
|
|
29
|
-
Work finished:
|
|
30
|
-
|
|
31
|
-
> Account creation works end to end now: sign-up, email verification, and
|
|
32
|
-
> login are live on staging.
|
|
33
|
-
>
|
|
34
|
-
> Next I'll start on password reset unless you want something else first.
|
|
35
|
-
|
|
36
|
-
Work failed:
|
|
37
|
-
|
|
38
|
-
> The new pricing page isn't live. The deploy failed and I rolled it back, so
|
|
39
|
-
> the site still shows the old page — nothing is broken for users.
|
|
40
|
-
>
|
|
41
|
-
> The blocker is on my side and I'm fixing it; I'll retry and confirm when the
|
|
42
|
-
> page is up. Nothing needed from you.
|
|
43
|
-
|
|
44
|
-
Blocked:
|
|
45
|
-
|
|
46
|
-
> The refund flow is built, but the production rollout is waiting for the
|
|
47
|
-
> payment provider to recover. I am monitoring it and will resume automatically.
|
|
48
|
-
>
|
|
49
|
-
> There is nothing for you to answer; I will confirm when it is live.
|
|
50
|
-
|
|
51
|
-
## Acknowledgements
|
|
52
|
-
|
|
53
|
-
- A note: `Switching the migration to staging; I'll rerun it there.`
|
|
54
|
-
- An edit after irreversible work: `The email already went out with Monday;
|
|
55
|
-
sending a correction for Friday now.` — say what already happened; never
|
|
56
|
-
imply it was undone.
|
package/dist/sound-ref.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* What `--sound` and the saved `sound` key accept: shipped semantic names,
|
|
3
|
-
* the CLI silent spelling, an Account custom sound id, or a custom display name.
|
|
4
|
-
*/
|
|
5
|
-
export declare function isCliSoundRef(value: string): boolean;
|
|
6
|
-
export declare function unknownSoundMessage(sound: string): string;
|
|
7
|
-
/** Shipped names plus the CLI silent spelling, with User-facing labels. */
|
|
8
|
-
export declare const SHIPPED_SOUND_LISTING: readonly [{
|
|
9
|
-
readonly ref: "default";
|
|
10
|
-
readonly name: "Device default";
|
|
11
|
-
}, {
|
|
12
|
-
readonly ref: "done";
|
|
13
|
-
readonly name: "completion chime";
|
|
14
|
-
}, {
|
|
15
|
-
readonly ref: "attention";
|
|
16
|
-
readonly name: "attention tone";
|
|
17
|
-
}, {
|
|
18
|
-
readonly ref: "alert";
|
|
19
|
-
readonly name: "most insistent tone";
|
|
20
|
-
}, {
|
|
21
|
-
readonly ref: "none";
|
|
22
|
-
readonly name: "silent";
|
|
23
|
-
}];
|
package/dist/sound-ref.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { CLI_SOUNDS, SOUND_NAME_MAX_LENGTH, SOUND_REF_MAX_LENGTH, isCustomSoundId, } from '@raidiant/notifai-protocol';
|
|
2
|
-
/**
|
|
3
|
-
* What `--sound` and the saved `sound` key accept: shipped semantic names,
|
|
4
|
-
* the CLI silent spelling, an Account custom sound id, or a custom display name.
|
|
5
|
-
*/
|
|
6
|
-
export function isCliSoundRef(value) {
|
|
7
|
-
if (CLI_SOUNDS.includes(value))
|
|
8
|
-
return true;
|
|
9
|
-
if (value.length < 1 || value.length > SOUND_REF_MAX_LENGTH)
|
|
10
|
-
return false;
|
|
11
|
-
if (isCustomSoundId(value))
|
|
12
|
-
return true;
|
|
13
|
-
const trimmed = value.trim();
|
|
14
|
-
return trimmed.length >= 1 && trimmed.length <= SOUND_NAME_MAX_LENGTH;
|
|
15
|
-
}
|
|
16
|
-
export function unknownSoundMessage(sound) {
|
|
17
|
-
return (`Unknown sound "${sound}" — use a shipped name (${CLI_SOUNDS.join(', ')}), ` +
|
|
18
|
-
'a custom sound id, or a custom sound name. Run `notifai sounds` to list what this Account can play.');
|
|
19
|
-
}
|
|
20
|
-
/** Shipped names plus the CLI silent spelling, with User-facing labels. */
|
|
21
|
-
export const SHIPPED_SOUND_LISTING = [
|
|
22
|
-
{ ref: 'default', name: 'Device default' },
|
|
23
|
-
{ ref: 'done', name: 'completion chime' },
|
|
24
|
-
{ ref: 'attention', name: 'attention tone' },
|
|
25
|
-
{ ref: 'alert', name: 'most insistent tone' },
|
|
26
|
-
{ ref: 'none', name: 'silent' },
|
|
27
|
-
];
|
|
28
|
-
//# sourceMappingURL=sound-ref.js.map
|
package/dist/sound-ref.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sound-ref.js","sourceRoot":"","sources":["../src/sound-ref.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,GAChB,MAAM,4BAA4B,CAAA;AAEnC;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,IAAK,UAAgC,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA;IAClE,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,oBAAoB;QAAE,OAAO,KAAK,CAAA;IACzE,IAAI,eAAe,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA;IACvC,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAA;IAC5B,OAAO,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,OAAO,CAAC,MAAM,IAAI,qBAAqB,CAAA;AACvE,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,KAAa;IAC/C,OAAO,CACL,kBAAkB,KAAK,2BAA2B,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK;QAC5E,qGAAqG,CACtG,CAAA;AACH,CAAC;AAED,2EAA2E;AAC3E,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,gBAAgB,EAAE;IAC1C,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE;IACzC,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,gBAAgB,EAAE;IAC5C,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,qBAAqB,EAAE;IAC7C,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;CACvB,CAAA"}
|
package/dist/ui/banner.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export type BannerSize = 'block' | 'ascii' | 'word';
|
|
2
|
-
export declare function bannerSize(columns?: number): BannerSize;
|
|
3
|
-
/** The wordmark as rendered lines, gradient included. */
|
|
4
|
-
export declare function bannerLines(columns?: number): string[];
|
|
5
|
-
/**
|
|
6
|
-
* Reveal the wordmark one row at a time.
|
|
7
|
-
*
|
|
8
|
-
* Deliberately brief and deliberately skippable: this runs before someone can
|
|
9
|
-
* do anything, so it may not become a wait. It is skipped entirely when output
|
|
10
|
-
* is not a TTY, when `NOTIFAI_NO_ANIMATION` is set, and under `CI`.
|
|
11
|
-
*/
|
|
12
|
-
export declare function printBanner(options?: {
|
|
13
|
-
animate?: boolean;
|
|
14
|
-
env?: NodeJS.ProcessEnv;
|
|
15
|
-
write?: (line: string) => void;
|
|
16
|
-
}): Promise<void>;
|
|
17
|
-
/**
|
|
18
|
-
* One line of orientation under the wordmark — and it must stay one line.
|
|
19
|
-
* Wrapped onto two it stops reading as a subtitle and starts reading as the
|
|
20
|
-
* first paragraph of something, so a narrow terminal gets the version alone.
|
|
21
|
-
*/
|
|
22
|
-
export declare function tagline(version: string, columns?: number): string;
|
package/dist/ui/banner.js
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The wordmark shown when a human opens the interactive app.
|
|
3
|
-
*
|
|
4
|
-
* Three tiers, chosen by what the terminal can actually render rather than by
|
|
5
|
-
* what looks best in a screenshot: box-drawing blocks when the terminal is wide
|
|
6
|
-
* and Unicode-capable, a pure-ASCII form that survives anywhere, and a plain
|
|
7
|
-
* word when neither fits. A banner that wraps is worse than no banner, so the
|
|
8
|
-
* width check is not optional.
|
|
9
|
-
*
|
|
10
|
-
* The art is embedded rather than rendered at run time. It is one fixed word
|
|
11
|
-
* that will never change, and shipping a font engine to redraw a constant on
|
|
12
|
-
* every launch would cost every install — including the agents that never see
|
|
13
|
-
* it — for no benefit.
|
|
14
|
-
*/
|
|
15
|
-
import { gradientBlock, style, terminalWidth, unicode } from './theme.js';
|
|
16
|
-
/** ANSI Shadow. 50 columns, 6 rows. */
|
|
17
|
-
const BLOCK = [
|
|
18
|
-
'███╗ ██╗ ██████╗ ████████╗██╗███████╗ █████╗ ██╗',
|
|
19
|
-
'████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔══██╗██║',
|
|
20
|
-
'██╔██╗ ██║██║ ██║ ██║ ██║█████╗ ███████║██║',
|
|
21
|
-
'██║╚██╗██║██║ ██║ ██║ ██║██╔══╝ ██╔══██║██║',
|
|
22
|
-
'██║ ╚████║╚██████╔╝ ██║ ██║██║ ██║ ██║██║',
|
|
23
|
-
'╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝╚═╝',
|
|
24
|
-
];
|
|
25
|
-
/** Pure ASCII. 34 columns, 4 rows — safe on any terminal, any code page. */
|
|
26
|
-
const ASCII = [
|
|
27
|
-
' _ _ ___ _____ ___ ___ _ ___ ',
|
|
28
|
-
' | \\| |/ _ \\_ _|_ _| __/_\\ |_ _|',
|
|
29
|
-
' | .` | (_) || | | || _/ _ \\ | | ',
|
|
30
|
-
' |_|\\_|\\___/ |_| |___|_/_/ \\_\\___|',
|
|
31
|
-
];
|
|
32
|
-
export function bannerSize(columns = terminalWidth()) {
|
|
33
|
-
if (unicode && columns >= 54)
|
|
34
|
-
return 'block';
|
|
35
|
-
if (columns >= 38)
|
|
36
|
-
return 'ascii';
|
|
37
|
-
return 'word';
|
|
38
|
-
}
|
|
39
|
-
/** The wordmark as rendered lines, gradient included. */
|
|
40
|
-
export function bannerLines(columns = terminalWidth()) {
|
|
41
|
-
switch (bannerSize(columns)) {
|
|
42
|
-
case 'block':
|
|
43
|
-
return gradientBlock(BLOCK);
|
|
44
|
-
case 'ascii':
|
|
45
|
-
return gradientBlock(ASCII);
|
|
46
|
-
case 'word':
|
|
47
|
-
return gradientBlock(['N O T I F A I']);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Reveal the wordmark one row at a time.
|
|
52
|
-
*
|
|
53
|
-
* Deliberately brief and deliberately skippable: this runs before someone can
|
|
54
|
-
* do anything, so it may not become a wait. It is skipped entirely when output
|
|
55
|
-
* is not a TTY, when `NOTIFAI_NO_ANIMATION` is set, and under `CI`.
|
|
56
|
-
*/
|
|
57
|
-
export async function printBanner(options = {}) {
|
|
58
|
-
const env = options.env ?? process.env;
|
|
59
|
-
const write = options.write ?? ((line) => process.stdout.write(`${line}\n`));
|
|
60
|
-
const lines = bannerLines();
|
|
61
|
-
const animate = options.animate !== false &&
|
|
62
|
-
process.stdout.isTTY === true &&
|
|
63
|
-
(env['NOTIFAI_NO_ANIMATION'] ?? '') === '' &&
|
|
64
|
-
(env['CI'] ?? '') === '';
|
|
65
|
-
write('');
|
|
66
|
-
for (const line of lines) {
|
|
67
|
-
// Two columns, matching the tagline and the status card beneath it. Flush
|
|
68
|
-
// left, the wordmark reads as a separate thing sitting above the app.
|
|
69
|
-
write(` ${line}`);
|
|
70
|
-
if (animate)
|
|
71
|
-
await new Promise((resolve) => setTimeout(resolve, 26));
|
|
72
|
-
}
|
|
73
|
-
write('');
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* One line of orientation under the wordmark — and it must stay one line.
|
|
77
|
-
* Wrapped onto two it stops reading as a subtitle and starts reading as the
|
|
78
|
-
* first paragraph of something, so a narrow terminal gets the version alone.
|
|
79
|
-
*/
|
|
80
|
-
export function tagline(version, columns = terminalWidth()) {
|
|
81
|
-
const full = 'Native notifications for agents and local programs';
|
|
82
|
-
// Two leading columns of indent, two trailing for the version.
|
|
83
|
-
return columns >= full.length + 12
|
|
84
|
-
? `${style.dim(full)} ${style.dim(`v${version}`)}`
|
|
85
|
-
: style.dim(`v${version}`);
|
|
86
|
-
}
|
|
87
|
-
//# sourceMappingURL=banner.js.map
|
package/dist/ui/banner.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"banner.js","sourceRoot":"","sources":["../../src/ui/banner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEzE,uCAAuC;AACvC,MAAM,KAAK,GAAG;IACZ,oDAAoD;IACpD,oDAAoD;IACpD,oDAAoD;IACpD,oDAAoD;IACpD,oDAAoD;IACpD,oDAAoD;CACrD,CAAA;AAED,4EAA4E;AAC5E,MAAM,KAAK,GAAG;IACZ,oCAAoC;IACpC,uCAAuC;IACvC,qCAAqC;IACrC,wCAAwC;CACzC,CAAA;AAID,MAAM,UAAU,UAAU,CAAC,OAAO,GAAG,aAAa,EAAE;IAClD,IAAI,OAAO,IAAI,OAAO,IAAI,EAAE;QAAE,OAAO,OAAO,CAAA;IAC5C,IAAI,OAAO,IAAI,EAAE;QAAE,OAAO,OAAO,CAAA;IACjC,OAAO,MAAM,CAAA;AACf,CAAC;AAED,yDAAyD;AACzD,MAAM,UAAU,WAAW,CAAC,OAAO,GAAG,aAAa,EAAE;IACnD,QAAQ,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QAC5B,KAAK,OAAO;YACV,OAAO,aAAa,CAAC,KAAK,CAAC,CAAA;QAC7B,KAAK,OAAO;YACV,OAAO,aAAa,CAAC,KAAK,CAAC,CAAA;QAC7B,KAAK,MAAM;YACT,OAAO,aAAa,CAAC,CAAC,eAAe,CAAC,CAAC,CAAA;IAC3C,CAAC;AACH,CAAC;AA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AC,EAAE;QACnD,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,OAAO,EAAE,CAAC,CAAA;AAC9B,CAAC"}
|
package/dist/ui/config-view.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Rendering for the configuration surfaces a person reads.
|
|
3
|
-
*
|
|
4
|
-
* The agent-facing shapes are untouched and live elsewhere: `--json` is the
|
|
5
|
-
* contract, and the flat `key = value` form stays exactly as it was for
|
|
6
|
-
* anything that is not a terminal. What is new is only what a human sees.
|
|
7
|
-
*/
|
|
8
|
-
import { type CliConfig, type ConfigKey } from '../config.js';
|
|
9
|
-
/**
|
|
10
|
-
* The full settings listing, grouped and explained.
|
|
11
|
-
*
|
|
12
|
-
* Each key gets its name (what you type), its value (what is in force), where
|
|
13
|
-
* that value came from, and one line on what it does. The name leads rather
|
|
14
|
-
* than the friendly label because the next thing a reader does with it is type
|
|
15
|
-
* it into `config set`.
|
|
16
|
-
*/
|
|
17
|
-
export declare function renderConfigList(config: CliConfig, options?: {
|
|
18
|
-
showAdvanced?: boolean;
|
|
19
|
-
}): string[];
|
|
20
|
-
/**
|
|
21
|
-
* Everything about one key, for someone who has asked about it specifically.
|
|
22
|
-
*
|
|
23
|
-
* This is the payoff of the listing above staying terse: the reader arrives
|
|
24
|
-
* here already knowing which key they care about, so the full paragraph, the
|
|
25
|
-
* legal values, and the layer the current value came from can all be spent on
|
|
26
|
-
* that one key.
|
|
27
|
-
*/
|
|
28
|
-
export declare function renderConfigExplain(key: ConfigKey, config: CliConfig): string[];
|
|
29
|
-
/** The flat form, unchanged, for anything that is not a person at a terminal. */
|
|
30
|
-
export declare function renderConfigPlain(config: CliConfig, explain: boolean): string[];
|
package/dist/ui/config-view.js
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Rendering for the configuration surfaces a person reads.
|
|
3
|
-
*
|
|
4
|
-
* The agent-facing shapes are untouched and live elsewhere: `--json` is the
|
|
5
|
-
* contract, and the flat `key = value` form stays exactly as it was for
|
|
6
|
-
* anything that is not a terminal. What is new is only what a human sees.
|
|
7
|
-
*/
|
|
8
|
-
import { CONFIG_KEYS } from '../config.js';
|
|
9
|
-
import { CONFIG_GROUPS, acceptedValues, configInfo, configKeysByGroup, describeSource, formatValue, } from '../config-schema.js';
|
|
10
|
-
import { glyph, pad, style, terminalWidth, wrap } from './theme.js';
|
|
11
|
-
/**
|
|
12
|
-
* The full settings listing, grouped and explained.
|
|
13
|
-
*
|
|
14
|
-
* Each key gets its name (what you type), its value (what is in force), where
|
|
15
|
-
* that value came from, and one line on what it does. The name leads rather
|
|
16
|
-
* than the friendly label because the next thing a reader does with it is type
|
|
17
|
-
* it into `config set`.
|
|
18
|
-
*/
|
|
19
|
-
export function renderConfigList(config, options = {}) {
|
|
20
|
-
const columns = terminalWidth();
|
|
21
|
-
const lines = [];
|
|
22
|
-
const nameWidth = Math.max(...CONFIG_KEYS.map((key) => key.length));
|
|
23
|
-
const SUMMARY_INDENT = ' ';
|
|
24
|
-
for (const group of CONFIG_GROUPS) {
|
|
25
|
-
const keys = configKeysByGroup(group.id).filter((info) => options.showAdvanced === true || info.advanced !== true);
|
|
26
|
-
if (keys.length === 0)
|
|
27
|
-
continue;
|
|
28
|
-
lines.push('');
|
|
29
|
-
lines.push(style.heading(group.title));
|
|
30
|
-
for (const line of wrap(group.blurb, columns - 2))
|
|
31
|
-
lines.push(style.dim(` ${line}`));
|
|
32
|
-
lines.push('');
|
|
33
|
-
for (const info of keys) {
|
|
34
|
-
const entry = config[info.key];
|
|
35
|
-
const source = describeSource(entry.source);
|
|
36
|
-
const value = formatValue(info.key, entry.value);
|
|
37
|
-
const isSet = source.label !== 'default';
|
|
38
|
-
// The provenance mark is only drawn when there is provenance to show;
|
|
39
|
-
// an empty dim segment still emits escape codes, so a `trimEnd` on the
|
|
40
|
-
// finished string cannot remove it.
|
|
41
|
-
const provenance = isSet ? ` ${style.dim(`${glyph.bullet} ${source.label}`)}` : '';
|
|
42
|
-
lines.push(` ${style.code(pad(info.key, nameWidth))} ` +
|
|
43
|
-
`${isSet ? style.value(value) : style.unset(value)}${provenance}`);
|
|
44
|
-
for (const line of wrap(info.summary, columns - SUMMARY_INDENT.length)) {
|
|
45
|
-
lines.push(style.dim(`${SUMMARY_INDENT}${line}`));
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
lines.push('');
|
|
50
|
-
const command = 'notifai config explain <key>';
|
|
51
|
-
const help = `${glyph.arrow} ${command} for what one of these means and how to change it.`;
|
|
52
|
-
for (const line of wrap(help, columns)) {
|
|
53
|
-
lines.push(style.dim(line.replace(command, style.code(command))));
|
|
54
|
-
}
|
|
55
|
-
return lines;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Everything about one key, for someone who has asked about it specifically.
|
|
59
|
-
*
|
|
60
|
-
* This is the payoff of the listing above staying terse: the reader arrives
|
|
61
|
-
* here already knowing which key they care about, so the full paragraph, the
|
|
62
|
-
* legal values, and the layer the current value came from can all be spent on
|
|
63
|
-
* that one key.
|
|
64
|
-
*/
|
|
65
|
-
export function renderConfigExplain(key, config) {
|
|
66
|
-
const info = configInfo(key);
|
|
67
|
-
const entry = config[key];
|
|
68
|
-
const source = describeSource(entry.source);
|
|
69
|
-
const columns = terminalWidth();
|
|
70
|
-
const lines = [];
|
|
71
|
-
lines.push('');
|
|
72
|
-
lines.push(`${style.code(key)} ${style.dim(glyph.bullet)} ${style.heading(info.label)}`);
|
|
73
|
-
lines.push('');
|
|
74
|
-
for (const paragraph of info.detail.split('\n\n')) {
|
|
75
|
-
for (const line of wrap(paragraph, columns - 2))
|
|
76
|
-
lines.push(` ${line}`);
|
|
77
|
-
lines.push('');
|
|
78
|
-
}
|
|
79
|
-
const valueLabel = formatValue(key, entry.value);
|
|
80
|
-
lines.push(` ${style.dim(pad('Now', 10))}${style.value(valueLabel)} ${style.dim(`${glyph.bullet} ${source.label}`)}`);
|
|
81
|
-
if (source.path !== null)
|
|
82
|
-
lines.push(` ${style.dim(pad('', 10))}${style.dim(source.path)}`);
|
|
83
|
-
lines.push(` ${style.dim(pad('Accepts', 10))}${acceptedValues(key)}`);
|
|
84
|
-
if (info.choices !== undefined && info.choiceHints !== undefined) {
|
|
85
|
-
lines.push('');
|
|
86
|
-
for (const choice of info.choices) {
|
|
87
|
-
const hint = info.choiceHints[choice];
|
|
88
|
-
lines.push(` ${style.dim(pad('', 10))}${style.code(pad(choice, 14))}${style.dim(hint ?? '')}`.trimEnd());
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
lines.push('');
|
|
92
|
-
const example = info.example ?? (info.choices?.[0] ?? 'value');
|
|
93
|
-
lines.push(` ${style.dim('Change it')} ${style.code(`notifai config set ${key} ${example}`)}`);
|
|
94
|
-
if (entry.source !== 'default' && entry.source !== 'flag') {
|
|
95
|
-
lines.push(` ${style.dim('Inherit it')} ${style.code(`notifai config unset ${key}`)}`);
|
|
96
|
-
}
|
|
97
|
-
lines.push('');
|
|
98
|
-
return lines;
|
|
99
|
-
}
|
|
100
|
-
/** The flat form, unchanged, for anything that is not a person at a terminal. */
|
|
101
|
-
export function renderConfigPlain(config, explain) {
|
|
102
|
-
return CONFIG_KEYS.map((key) => {
|
|
103
|
-
const entry = config[key];
|
|
104
|
-
const provenance = explain ? ` [${entry.source}]` : '';
|
|
105
|
-
return `${key} = ${JSON.stringify(entry.value)}${provenance}`;
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
//# sourceMappingURL=config-view.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-view.js","sourceRoot":"","sources":["../../src/ui/config-view.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,WAAW,EAAkC,MAAM,cAAc,CAAA;AAC1E,OAAO,EACL,aAAa,EACb,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,WAAW,GACZ,MAAM,qBAA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I,OAAO,CAAC,CAAA;IAC9D,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,sBAAsB,GAAG,IAAI,OAAO,EAAE,CAAC,EAAE,CAAC,CAAA;IAC/F,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;QAC1D,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,wBAAwB,GAAG,EAAE,CAAC,EAAE,CAAC,CAAA;IACzF,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IACd,OAAO,KAAK,CAAA;AACd,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,iBAAiB,CAAC,MAAiB,EAAE,OAAgB;IACnE,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;QAC7B,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;QACzB,MAAM,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,CAAA;QACvD,OAAO,GAAG,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,UAAU,EAAE,CAAA;IAC/D,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
package/dist/ui/help.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Help that answers "what can I do here", not "what strings does argv accept".
|
|
3
|
-
*
|
|
4
|
-
* The old help listed seventeen commands in one flat column, with the one a new
|
|
5
|
-
* user needs (`init`) sitting between a platform capability dump and
|
|
6
|
-
* an entry point marked "Internal:". Everything was equally prominent, which is
|
|
7
|
-
* the same as nothing being prominent.
|
|
8
|
-
*
|
|
9
|
-
* Grouping and colour are Commander's own (`commandsGroup`, `optionsGroup`, and
|
|
10
|
-
* the `styleX` hooks it calls when the output has colours); this module only
|
|
11
|
-
* supplies the palette and the group vocabulary. Commander turns its styling
|
|
12
|
-
* off by itself when the output is not a terminal, so piped help stays plain
|
|
13
|
-
* without a second code path.
|
|
14
|
-
*/
|
|
15
|
-
import { type HelpConfiguration } from 'commander';
|
|
16
|
-
/**
|
|
17
|
-
* Group headings, in the order a reader meets them.
|
|
18
|
-
*
|
|
19
|
-
* Ordering is by who needs it and when: first run, then daily use, then the
|
|
20
|
-
* commands agents drive, then the things touched once or never. Commander
|
|
21
|
-
* renders groups in first-use order, so these constants are also the layout.
|
|
22
|
-
*/
|
|
23
|
-
export declare const GROUP: {
|
|
24
|
-
readonly start: "Getting started:";
|
|
25
|
-
readonly daily: "Everyday:";
|
|
26
|
-
readonly agent: "For agents and scripts:";
|
|
27
|
-
readonly advanced: "Account and wiring:";
|
|
28
|
-
};
|
|
29
|
-
/** Option groups for `send`, which carries thirty flags. */
|
|
30
|
-
export declare const SEND_GROUP: {
|
|
31
|
-
readonly content: "What it says:";
|
|
32
|
-
readonly routing: "Where it goes:";
|
|
33
|
-
readonly presentation: "How it arrives:";
|
|
34
|
-
readonly reply: "Asking for an answer:";
|
|
35
|
-
readonly advanced: "Advanced:";
|
|
36
|
-
};
|
|
37
|
-
export declare const helpConfiguration: HelpConfiguration;
|
|
38
|
-
/**
|
|
39
|
-
* Footer for the root help.
|
|
40
|
-
*
|
|
41
|
-
* First-run is `notifai init`. The interactive app is what a human opens
|
|
42
|
-
* later, once setup is no longer the thing in the way.
|
|
43
|
-
*/
|
|
44
|
-
export declare function rootHelpFooter(): string;
|
package/dist/ui/help.js
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Help that answers "what can I do here", not "what strings does argv accept".
|
|
3
|
-
*
|
|
4
|
-
* The old help listed seventeen commands in one flat column, with the one a new
|
|
5
|
-
* user needs (`init`) sitting between a platform capability dump and
|
|
6
|
-
* an entry point marked "Internal:". Everything was equally prominent, which is
|
|
7
|
-
* the same as nothing being prominent.
|
|
8
|
-
*
|
|
9
|
-
* Grouping and colour are Commander's own (`commandsGroup`, `optionsGroup`, and
|
|
10
|
-
* the `styleX` hooks it calls when the output has colours); this module only
|
|
11
|
-
* supplies the palette and the group vocabulary. Commander turns its styling
|
|
12
|
-
* off by itself when the output is not a terminal, so piped help stays plain
|
|
13
|
-
* without a second code path.
|
|
14
|
-
*/
|
|
15
|
-
import { Help } from 'commander';
|
|
16
|
-
import { glyph, style } from './theme.js';
|
|
17
|
-
/**
|
|
18
|
-
* Group headings, in the order a reader meets them.
|
|
19
|
-
*
|
|
20
|
-
* Ordering is by who needs it and when: first run, then daily use, then the
|
|
21
|
-
* commands agents drive, then the things touched once or never. Commander
|
|
22
|
-
* renders groups in first-use order, so these constants are also the layout.
|
|
23
|
-
*/
|
|
24
|
-
export const GROUP = {
|
|
25
|
-
start: 'Getting started:',
|
|
26
|
-
daily: 'Everyday:',
|
|
27
|
-
agent: 'For agents and scripts:',
|
|
28
|
-
advanced: 'Account and wiring:',
|
|
29
|
-
};
|
|
30
|
-
/** Option groups for `send`, which carries thirty flags. */
|
|
31
|
-
export const SEND_GROUP = {
|
|
32
|
-
content: 'What it says:',
|
|
33
|
-
routing: 'Where it goes:',
|
|
34
|
-
presentation: 'How it arrives:',
|
|
35
|
-
reply: 'Asking for an answer:',
|
|
36
|
-
advanced: 'Advanced:',
|
|
37
|
-
};
|
|
38
|
-
/** Group order, independent of the order commands happen to be registered in. */
|
|
39
|
-
const GROUP_ORDER = [
|
|
40
|
-
GROUP.start,
|
|
41
|
-
GROUP.daily,
|
|
42
|
-
GROUP.agent,
|
|
43
|
-
GROUP.advanced,
|
|
44
|
-
];
|
|
45
|
-
function groupRank(heading) {
|
|
46
|
-
const index = GROUP_ORDER.indexOf(heading);
|
|
47
|
-
// Anything not named above keeps its position relative to its peers, because
|
|
48
|
-
// the sort is stable — which is what lets the same override run over option
|
|
49
|
-
// groups without needing to know their headings.
|
|
50
|
-
return index === -1 ? GROUP_ORDER.length : index;
|
|
51
|
-
}
|
|
52
|
-
export const helpConfiguration = {
|
|
53
|
-
// Groups already carry the intended order; alphabetising would scatter the
|
|
54
|
-
// dependency between `login` and everything that needs a credential.
|
|
55
|
-
sortSubcommands: false,
|
|
56
|
-
sortOptions: false,
|
|
57
|
-
showGlobalOptions: false,
|
|
58
|
-
/**
|
|
59
|
-
* Commander seeds group order from the raw registration order, which ties
|
|
60
|
-
* how the help reads to where a `program.command(…)` block happens to sit in
|
|
61
|
-
* the file — move one and the help silently reorders. Sorting the finished
|
|
62
|
-
* grouping makes `GROUP_ORDER` the single place that decision is made.
|
|
63
|
-
*
|
|
64
|
-
* The same override runs over option groups, whose headings are not in
|
|
65
|
-
* `GROUP_ORDER` at all. They all rank equal, and `sort` is stable, so they
|
|
66
|
-
* keep the order they were declared in.
|
|
67
|
-
*/
|
|
68
|
-
groupItems(unsortedItems, visibleItems, getGroup) {
|
|
69
|
-
// `.call` cannot carry the method's own generic through, so the signature
|
|
70
|
-
// is restated once here instead of widening every caller to
|
|
71
|
-
// `Command | Option`.
|
|
72
|
-
const base = Help.prototype.groupItems;
|
|
73
|
-
const grouped = base.call(this, unsortedItems, visibleItems, getGroup);
|
|
74
|
-
return new Map([...grouped.entries()].sort((a, b) => groupRank(a[0]) - groupRank(b[0])));
|
|
75
|
-
},
|
|
76
|
-
styleTitle: (title) => style.heading(title),
|
|
77
|
-
styleCommandText: (text) => style.accent(text),
|
|
78
|
-
styleSubcommandTerm: (text) => style.code(text),
|
|
79
|
-
styleOptionTerm: (text) => style.code(text),
|
|
80
|
-
styleArgumentTerm: (text) => style.code(text),
|
|
81
|
-
styleDescriptionText: (text) => text,
|
|
82
|
-
styleUsage: (text) => text,
|
|
83
|
-
};
|
|
84
|
-
/**
|
|
85
|
-
* Footer for the root help.
|
|
86
|
-
*
|
|
87
|
-
* First-run is `notifai init`. The interactive app is what a human opens
|
|
88
|
-
* later, once setup is no longer the thing in the way.
|
|
89
|
-
*/
|
|
90
|
-
export function rootHelpFooter() {
|
|
91
|
-
const lines = [
|
|
92
|
-
'',
|
|
93
|
-
style.heading('Start here'),
|
|
94
|
-
` ${style.code('notifai init')} ${style.dim(`${glyph.arrow} set this project up, step by step`)}`,
|
|
95
|
-
` ${style.code('notifai')} ${style.dim(`${glyph.arrow} after setup: status, settings, devices, test sends`)}`,
|
|
96
|
-
'',
|
|
97
|
-
style.heading('First call, for an agent'),
|
|
98
|
-
` ${style.code('notifai send --kind done --title "All 42 tests passed" --body "Finished in 3m 10s. Next: review the release candidate."')}`,
|
|
99
|
-
` ${style.code('notifai ask "Deploy migration 0007 to production?" --choice Deploy --choice Hold')}`,
|
|
100
|
-
` ${style.dim(`${glyph.arrow} ${style.code('ask')} needs question routing installed; ${style.code('notifai doctor --json')} says whether it is.`)}`,
|
|
101
|
-
'',
|
|
102
|
-
style.dim(`Every command takes ${style.code('--help')}. Where a command has machine-readable output it takes ${style.code('--json')}.`),
|
|
103
|
-
style.dim(`Settings are explained by ${style.code('notifai config show')} and ${style.code('notifai config explain <key>')}.`),
|
|
104
|
-
];
|
|
105
|
-
return lines.join('\n');
|
|
106
|
-
}
|
|
107
|
-
//# sourceMappingURL=help.js.map
|
package/dist/ui/help.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/ui/help.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,IAAI,EAAqD,MAAM,WAAW,CAAA;AACnF,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAEzC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,KAAK,EAAE,kBAAkB;IACzB,KAAK,EAAE,WAAW;IAClB,KAAK,EAAE,yBAAyB;IAChC,QAAQ,EAAE,qBAAqB;CAC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KAAK,CAAC,sCAAsC,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC,sBAAsB,CAAC,EAAE;QACpJ,EAAE;QACF,KAAK,CAAC,GAAG,CACP,uBAAuB,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,0DAA0D,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAC7H;QACD,KAAK,CAAC,GAAG,CAAC,6BAA6B,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC,QAAQ,KAAK,CAAC,IAAI,CAAC,8BAA8B,CAAC,GAAG,CAAC;KAC/H,CAAA;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACzB,CAAC"}
|
package/dist/ui/theme.d.ts
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/** True when the terminal can render the box-drawing and status glyphs below. */
|
|
2
|
-
export declare const unicode: boolean;
|
|
3
|
-
/**
|
|
4
|
-
* Brand ramp, shared with the companion app icon: pink → coral → rose →
|
|
5
|
-
* magenta. Used for the wordmark and for accenting the surfaces a human sees.
|
|
6
|
-
*/
|
|
7
|
-
export declare const BRAND_RAMP: readonly ["#FF9EC0", "#FF816B", "#EC5A73", "#B84E93"];
|
|
8
|
-
/**
|
|
9
|
-
* Paint each line of a block so the gradient runs left-to-right across the
|
|
10
|
-
* whole block rather than restarting per line. The wordmark is one image, and
|
|
11
|
-
* per-line gradients make it read as several.
|
|
12
|
-
*/
|
|
13
|
-
export declare function gradientBlock(lines: readonly string[], ramp?: readonly string[]): string[];
|
|
14
|
-
export declare const style: {
|
|
15
|
-
/** A heading that opens a section. */
|
|
16
|
-
readonly heading: (text: string) => string;
|
|
17
|
-
/** The brand voice — command names, the product name, the selected thing. */
|
|
18
|
-
readonly accent: (text: string) => string;
|
|
19
|
-
/** Secondary text: hints, provenance, units, defaults. */
|
|
20
|
-
readonly dim: (text: string) => string;
|
|
21
|
-
/** Something the reader can type. */
|
|
22
|
-
readonly code: (text: string) => string;
|
|
23
|
-
readonly ok: (text: string) => string;
|
|
24
|
-
readonly warn: (text: string) => string;
|
|
25
|
-
readonly bad: (text: string) => string;
|
|
26
|
-
/** A value as it currently stands. */
|
|
27
|
-
readonly value: (text: string) => string;
|
|
28
|
-
/** A value that is not set, or is inherited rather than chosen. */
|
|
29
|
-
readonly unset: (text: string) => string;
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* Status marks. The glyph and the colour say the same thing twice on purpose;
|
|
33
|
-
* either alone is enough to read the line.
|
|
34
|
-
*/
|
|
35
|
-
export declare const glyph: {
|
|
36
|
-
readonly ok: "*" | "●";
|
|
37
|
-
readonly warn: "!" | "▲";
|
|
38
|
-
readonly bad: "✕" | "x";
|
|
39
|
-
readonly pending: "○" | "o";
|
|
40
|
-
readonly bullet: "-" | "•";
|
|
41
|
-
readonly arrow: "→" | "->";
|
|
42
|
-
readonly chevron: "›" | ">";
|
|
43
|
-
readonly bar: "|" | "│";
|
|
44
|
-
};
|
|
45
|
-
export type Tone = 'ok' | 'warn' | 'bad' | 'pending';
|
|
46
|
-
/** A coloured glyph for a tone; the caller supplies the words. */
|
|
47
|
-
export declare function mark(tone: Tone): string;
|
|
48
|
-
/** Visible width, ignoring ANSI escapes, for alignment maths. */
|
|
49
|
-
export declare function width(text: string): number;
|
|
50
|
-
/** Pad to `size` using visible width, so colour never breaks a column. */
|
|
51
|
-
export declare function pad(text: string, size: number): string;
|
|
52
|
-
/**
|
|
53
|
-
* Usable terminal width: the real one, capped so paragraphs do not run to 200
|
|
54
|
-
* characters on a maximised window.
|
|
55
|
-
*
|
|
56
|
-
* No lower clamp. Raising a narrow terminal to a comfortable minimum sounds
|
|
57
|
-
* harmless and is not — every box drawn to that invented width overflows the
|
|
58
|
-
* real one and wraps, which looks far worse than a cramped box that fits.
|
|
59
|
-
*/
|
|
60
|
-
export declare function terminalWidth(fallback?: number): number;
|
|
61
|
-
/**
|
|
62
|
-
* A titled box around `rows`.
|
|
63
|
-
*
|
|
64
|
-
* Hand-drawn rather than delegated, because the obvious library call sizes
|
|
65
|
-
* itself from `process.stdout.columns` and divides by it — a pty that reports
|
|
66
|
-
* zero columns (some CI runners, some `script` invocations) makes the padding
|
|
67
|
-
* negative and throws, taking the whole screen down with it. A status card is
|
|
68
|
-
* decoration; it may degrade, but it must never be what crashes the app.
|
|
69
|
-
*
|
|
70
|
-
* Rows are measured with `width`, so colour inside them does not skew the
|
|
71
|
-
* border, and anything too wide for the terminal is clipped rather than
|
|
72
|
-
* wrapped — a status line that wraps stops being a status line.
|
|
73
|
-
*/
|
|
74
|
-
export declare function card(title: string, rows: readonly string[], columns?: number): string[];
|
|
75
|
-
/**
|
|
76
|
-
* Truncate to a visible width, carrying escape sequences through untouched.
|
|
77
|
-
*
|
|
78
|
-
* Counting only printable characters is the whole point: slicing a coloured
|
|
79
|
-
* string by `String.length` cuts through an escape sequence and spills raw
|
|
80
|
-
* `[38;2` into the terminal.
|
|
81
|
-
*/
|
|
82
|
-
export declare function clip(text: string, limit: number): string;
|
|
83
|
-
/**
|
|
84
|
-
* Wrap `text` to `columns`, returning bare lines.
|
|
85
|
-
*
|
|
86
|
-
* Indentation is the caller's, deliberately: an earlier version indented
|
|
87
|
-
* continuation lines itself, callers indented every line as well, and each
|
|
88
|
-
* wrapped paragraph stepped further right down the page.
|
|
89
|
-
*/
|
|
90
|
-
export declare function wrap(text: string, columns: number): string[];
|