@joenandez/tldr 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/bin/tldr-agent +11 -0
  4. package/hooks/tldr-agent-capture-session-identity.sh +3 -2
  5. package/install/tldr-agent-bootstrap.sh +7 -0
  6. package/package.json +10 -6
  7. package/release/activation-manifest.json +6 -6
  8. package/release/payloads/arm64/TldrAgentAegis.pkg +0 -0
  9. package/release/payloads/arm64/tldr-agent.tar.gz +0 -0
  10. package/release/starport-release.json +14 -9
  11. package/skills/tldr/SKILL.md +43 -31
  12. package/src/lib/aegis_native_distribution.mjs +1 -1
  13. package/src/lib/aegis_protocol.mjs +1 -1
  14. package/src/lib/starport_aegis_package.mjs +53 -6
  15. package/src/lib/starport_onboarding.mjs +303 -6
  16. package/src/lib/starport_orchestrator.mjs +21 -20
  17. package/src/lib/starport_release_contract.mjs +48 -10
  18. package/src/lib/starport_runtime.mjs +131 -13
  19. package/src/lib/tightbeam_channel.mjs +83 -123
  20. package/src/lib/tightbeam_channel_runtime.mjs +131 -33
  21. package/src/lib/tightbeam_email_adapter.mjs +10 -0
  22. package/src/lib/tightbeam_email_delivery_channel.mjs +107 -133
  23. package/src/lib/tightbeam_email_provider_map.mjs +337 -0
  24. package/src/lib/tightbeam_inbound_publish.mjs +84 -0
  25. package/src/lib/tightbeam_welcome_dispatch.mjs +129 -33
  26. package/src/lib/tldr_agent_daemon_health.mjs +2 -1
  27. package/src/lib/tldr_agent_daemon_phase_timeouts.mjs +3 -5
  28. package/src/lib/tldr_agent_diagnostic_schema.mjs +1 -0
  29. package/src/lib/tldr_agent_launchd_definition.mjs +2 -0
  30. package/src/lib/tldr_agent_launchd_lifecycle.mjs +41 -10
  31. package/src/lib/tldr_agent_runtime_identity.mjs +14 -2
  32. package/src/lib/tldr_agent_source_lifecycle.mjs +18 -4
  33. package/src/lib/transports/email/render/email.mjs +66 -180
  34. package/src/lib/transports/email/render/html.mjs +37 -80
  35. package/src/lib/transports/email/render/text.mjs +2 -2
  36. package/src/lib/transports/email/render/tldr.mjs +10 -88
  37. package/src/lib/transports/email/render/tokens.mjs +56 -75
  38. package/src/lib/transports/email/templates.mjs +38 -27
  39. package/src/lib/transports/email.mjs +21 -1
  40. package/src/starport.mjs +12 -0
  41. package/src/lib/transports/email/render/glyphs.mjs +0 -66
@@ -12,7 +12,7 @@
12
12
  "source": {
13
13
  "source": "npm",
14
14
  "package": "@joenandez/tldr",
15
- "version": "1.0.0"
15
+ "version": "1.1.0"
16
16
  },
17
17
  "category": "productivity",
18
18
  "homepage": "https://github.com/joenandez/tldr#readme"
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
3
3
  "name": "tldr",
4
4
  "displayName": "tldr;",
5
- "version": "1.0.0",
5
+ "version": "1.1.0",
6
6
  "description": "Set up private owner email for Claude Code and continue the same session when the owner replies.",
7
7
  "author": {
8
8
  "name": "Codename, Inc."
package/bin/tldr-agent CHANGED
@@ -26,6 +26,17 @@ operation=${1:-$(tldr_default_operation)}
26
26
  case "$operation" in
27
27
  setup|status|configure|repair|uninstall)
28
28
  if [ "$#" -gt 0 ]; then shift; fi
29
+ if [ -f "${plugin_root}/LOCAL-SNAPSHOT-MANIFEST.json" ]; then
30
+ tldr_agent_home=${TLDR_AGENT_HOME:-${HOME}/.tldr-agent}
31
+ runtime_node="${tldr_agent_home}/install/runtime/bin/node"
32
+ if [ ! -x "${runtime_node}" ]; then
33
+ exec "${plugin_root}/install/tldr-agent-bootstrap.sh" \
34
+ --package-root "${plugin_root}" \
35
+ --operation "${operation}" "$@"
36
+ fi
37
+ exec "${runtime_node}" "${plugin_root}/src/lib/local_snapshot_front_door.mjs" \
38
+ "${operation}" "$@"
39
+ fi
29
40
  exec "${plugin_root}/install/tldr-agent-bootstrap.sh" \
30
41
  --package-root "${plugin_root}" \
31
42
  --operation "${operation}" "$@"
@@ -129,8 +129,9 @@ fi
129
129
  /usr/bin/plutil -insert launch_source -string "${LAUNCH_SOURCE}" "${IDENTITY_TMP}"
130
130
  /usr/bin/plutil -insert session_started_at -string "${NOW}" "${IDENTITY_TMP}"
131
131
  PLUGIN_RELEASE=${CLAUDE_PLUGIN_VERSION:-unknown}
132
- if [ -n "${CLAUDE_PLUGIN_ROOT:-}" ] && [ -f "${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json" ]; then
133
- PLUGIN_RELEASE=$(/usr/bin/plutil -extract version raw -o - "${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json" 2>/dev/null || printf '%s' "${PLUGIN_RELEASE}")
132
+ PLUGIN_INSTALL_ROOT=${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-}}
133
+ if [ -n "${PLUGIN_INSTALL_ROOT}" ] && [ -f "${PLUGIN_INSTALL_ROOT}/.claude-plugin/plugin.json" ]; then
134
+ PLUGIN_RELEASE=$(/usr/bin/plutil -extract version raw -o - "${PLUGIN_INSTALL_ROOT}/.claude-plugin/plugin.json" 2>/dev/null || printf '%s' "${PLUGIN_RELEASE}")
134
135
  fi
135
136
  /usr/bin/plutil -insert plugin_release -string "${PLUGIN_RELEASE}" "${IDENTITY_TMP}"
136
137
  /usr/bin/plutil -remove _tldr_agent_identity "${IDENTITY_TMP}"
@@ -41,6 +41,13 @@ installed_manifest="${install_root}/activation-manifest.json"
41
41
  run_installed() {
42
42
  PATH="${install_root}/runtime/bin:/usr/bin:/bin"
43
43
  export PATH TLDR_AGENT_HOME
44
+ if [ -f "${package_root}/LOCAL-SNAPSHOT-MANIFEST.json" ]; then
45
+ TLDR_AGENT_PLUGIN_ROOT=${package_root}
46
+ export TLDR_AGENT_PLUGIN_ROOT
47
+ exec "$runtime_node" \
48
+ "${package_root}/src/lib/local_snapshot_front_door.mjs" \
49
+ "$operation" "$@"
50
+ fi
44
51
  exec "$runtime_node" "$entrypoint" "$operation" "$@"
45
52
  }
46
53
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joenandez/tldr",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "os": [
5
5
  "darwin"
6
6
  ],
@@ -143,6 +143,8 @@
143
143
  "src/lib/tightbeam_channel_runtime.mjs",
144
144
  "src/lib/tightbeam_email_adapter.mjs",
145
145
  "src/lib/tightbeam_email_delivery_channel.mjs",
146
+ "src/lib/tightbeam_email_provider_map.mjs",
147
+ "src/lib/tightbeam_inbound_publish.mjs",
146
148
  "src/lib/tightbeam_welcome_dispatch.mjs",
147
149
  "src/lib/starport_native_lifecycle.mjs",
148
150
  "src/lib/store.mjs",
@@ -163,7 +165,6 @@
163
165
  "src/lib/transports/email/inbound_body.mjs",
164
166
  "src/lib/transports/email/inbound_dead_letter.mjs",
165
167
  "src/lib/transports/email/render/email.mjs",
166
- "src/lib/transports/email/render/glyphs.mjs",
167
168
  "src/lib/transports/email/render/html.mjs",
168
169
  "src/lib/transports/email/render/markdown.mjs",
169
170
  "src/lib/transports/email/render/markdown_inline.mjs",
@@ -180,14 +181,14 @@
180
181
  "scripts": {
181
182
  "pretest": "NODE_OPTIONS=--conditions=tldr-agent-test node --test tests/test_provenance_manifest.mjs",
182
183
  "test": "npm run test:starport && npm run test:product",
183
- "test:starport": "NODE_OPTIONS=--conditions=tldr-agent-test node --test tests/test_starport_plugin_contract.mjs tests/test_starport_activation.mjs tests/test_starport_native_lifecycle.mjs tests/test_starport_orchestrator.mjs tests/test_starport_onboarding.mjs tests/test_starport_front_door.mjs tests/test_starport_uninstall.mjs tests/test_starport_release_closure.mjs tests/test_tldr_tightbeam_packed_cross_product.mjs tests/test_tightbeam_channel_real_daemon.mjs tests/test_tightbeam_email_inbound_bridge.mjs tests/test_tightbeam_email_inbound_real_daemon.mjs tests/test_tightbeam_email_outbound_adapter.mjs tests/test_tightbeam_email_outbound_real_daemon.mjs",
184
+ "test:starport": "NODE_OPTIONS=--conditions=tldr-agent-test node --test tests/test_starport_plugin_contract.mjs tests/test_starport_activation.mjs tests/test_starport_native_lifecycle.mjs tests/test_starport_orchestrator.mjs tests/test_starport_daemon_activation_order.mjs tests/test_starport_onboarding.mjs tests/test_starport_front_door.mjs tests/test_starport_uninstall.mjs tests/test_starport_release_closure.mjs tests/test_tldr_tightbeam_packed_cross_product.mjs tests/test_tldr_tightbeam_packed_welcome.mjs tests/test_tightbeam_channel_real_daemon.mjs tests/test_tightbeam_identity_reregistration.mjs tests/test_tightbeam_email_inbound_bridge.mjs tests/test_tightbeam_email_inbound_real_daemon.mjs tests/test_tightbeam_email_outbound_adapter.mjs tests/test_tightbeam_email_outbound_real_daemon.mjs",
184
185
  "test:release": "node --test tests/test_public_release_export.mjs tests/test_release_skill.mjs",
185
- "test:product": "NODE_OPTIONS=--conditions=tldr-agent-test node --test --test-concurrency=1 tests/test_tldr_agent_tightbeam_retirement.mjs tests/test_aegis_setup_registration_ux.mjs tests/test_aegis_protocol.mjs tests/test_tldr_agent_agentmail_transport.mjs tests/test_tldr_agent_daemon_polling.mjs tests/test_tightbeam_email_outbound_adapter.mjs tests/test_tldr_agent_attachment_behavior.mjs",
186
- "test:tightbeam-cross-product": "TIGHTBEAM_CROSS_PRODUCT_REQUIRED=1 NODE_OPTIONS=--conditions=tldr-agent-test node --test tests/test_tldr_tightbeam_packed_cross_product.mjs",
186
+ "test:product": "NODE_OPTIONS=--conditions=tldr-agent-test node --test --test-concurrency=1 tests/test_tldr_agent_tightbeam_retirement.mjs tests/test_aegis_setup_registration_ux.mjs tests/test_aegis_protocol.mjs tests/test_tldr_agent_agentmail_transport.mjs tests/test_tldr_agent_daemon_polling.mjs tests/test_tightbeam_email_outbound_adapter.mjs tests/test_tldr_agent_attachment_behavior.mjs tests/test_aegis_setup_theme.mjs",
187
+ "test:tightbeam-cross-product": "TIGHTBEAM_CROSS_PRODUCT_REQUIRED=1 NODE_OPTIONS=--conditions=tldr-agent-test node --test tests/test_tldr_tightbeam_packed_cross_product.mjs tests/test_tldr_tightbeam_packed_welcome.mjs",
187
188
  "test:packed-acceptance": "node --test tests/test_tldr_agent_packed_acceptance.mjs",
188
189
  "test:tldr-agent-contracts": "NODE_OPTIONS=--conditions=tldr-agent-test node --test --test-reporter=tap tests/contracts/test_tldr_agent_exclusions.mjs",
189
190
  "test:aegis-outbound": "NODE_OPTIONS=--conditions=tldr-agent-test node --test tests/test_aegis_phase4_outbound.mjs tests/test_aegis_phase8_artifact_verifier.mjs tests/test_aegis_phase8_evidence.mjs",
190
- "test:aegis-integration": "NODE_OPTIONS=--conditions=tldr-agent-test node --test tests/test_aegis_full_uninstall.mjs tests/test_aegis_package_daemon_activation.mjs tests/test_aegis_setup_registration_ux.mjs tests/test_aegis_three_inbox_live_harness.mjs",
191
+ "test:aegis-integration": "NODE_OPTIONS=--conditions=tldr-agent-test node --test tests/test_aegis_full_uninstall.mjs tests/test_aegis_package_daemon_activation.mjs tests/test_aegis_setup_registration_ux.mjs tests/test_aegis_three_inbox_live_harness.mjs tests/test_aegis_setup_theme.mjs",
191
192
  "test:tldr-agent-wave-contracts": "NODE_OPTIONS=--conditions=tldr-agent-test node --test --test-reporter=tap tests/contracts/test_tldr_agent_email_only_exclusions.mjs tests/contracts/test_tldr_agent_private_resume_prune.mjs tests/contracts/test_tldr_agent_minimum_runtime_closure.mjs",
192
193
  "test:tldr-agent-minimum-runtime": "NODE_OPTIONS=--conditions=tldr-agent-test node --test tests/contracts/test_tldr_agent_minimum_runtime_closure.mjs",
193
194
  "test:tldr-agent-contracts:red": "NODE_OPTIONS=--conditions=tldr-agent-test node scripts/verify-tldr-agent-contract-red.mjs",
@@ -200,6 +201,9 @@
200
201
  "release:public:export": "node scripts/export-public-release.mjs",
201
202
  "release:source-archive": "node scripts/build-starport-source-archive.mjs",
202
203
  "qa:aegis:candidate": "node scripts/prepare-aegis-qa-candidate.mjs",
204
+ "local:update": "node scripts/local-update.mjs",
205
+ "local:rollback": "node scripts/local-rollback.mjs",
206
+ "test:local-update": "node --test tests/test_local_update.mjs",
203
207
  "preflight": "scripts/preflight.sh"
204
208
  },
205
209
  "devDependencies": {
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "schema_version": 1,
3
- "release": "1.0.0",
3
+ "release": "1.1.0",
4
4
  "plugin_manifest": {
5
5
  "path": ".claude-plugin/plugin.json",
6
6
  "bytes": 618,
7
- "sha256": "ba58f90334018e3543e53805f4d925887f2b819e93e996db8d640225edf1e68d"
7
+ "sha256": "e139bb495f723af5ce5f5ea19afa0c3d40b7dd4ccc59ce68c7e6f1134b5a1544"
8
8
  },
9
9
  "hook_manifest": {
10
10
  "path": "hooks/hooks.json",
@@ -25,13 +25,13 @@
25
25
  },
26
26
  "tldr_agent": {
27
27
  "path": "release/payloads/arm64/tldr-agent.tar.gz",
28
- "bytes": 367350,
29
- "sha256": "e1e6ccd8a694682fc750d6ee89d1f2897b769124fea237d204005cc137cbee8a"
28
+ "bytes": 371077,
29
+ "sha256": "3f5505944fcea137e520d446a3a76e9cf06e7f9badffff8def716c16be9d8f45"
30
30
  },
31
31
  "aegis": {
32
32
  "path": "release/payloads/arm64/TldrAgentAegis.pkg",
33
- "bytes": 291376,
34
- "sha256": "c5a6be015c87f2b71ace1c41d8f6eb1b2f2a2db7afbe97b945872b80ba729c87"
33
+ "bytes": 307609,
34
+ "sha256": "7aba314597caa3636f03cb6aee4a7626e93b88119e8628b56273c983f736c51b"
35
35
  }
36
36
  }
37
37
  }
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "schema_version": 1,
3
3
  "phase": "source",
4
- "release": "1.0.0",
4
+ "release": "1.1.0",
5
5
  "source_commit": null,
6
6
  "npm": {
7
7
  "package": "@joenandez/tldr",
8
- "version": "1.0.0",
8
+ "version": "1.1.0",
9
9
  "publication": {
10
10
  "status": "pending",
11
11
  "dist_integrity": null,
@@ -45,14 +45,19 @@
45
45
  "source_commit": null
46
46
  },
47
47
  "tightbeam": {
48
- "package": "tightbeam",
49
- "version": "0.2.0",
50
- "protocol": {
51
- "min": "1.0",
52
- "max": "1"
48
+ "compatibility": {
49
+ "protocol": {
50
+ "min": "1.0",
51
+ "max": "1"
52
+ },
53
+ "requiredCapabilities": ["channels.v1"]
53
54
  },
54
- "state_schema_version": 14,
55
- "required_capability": "channels.v1"
55
+ "qualification": {
56
+ "version": "0.2.0",
57
+ "sourceCommit": "70ef86da746e59d650d8b02109715fb32b438d5e",
58
+ "treeDigest": "sha256:b7d2bddbd4f2b9c8bcc449b79cf062ee653b7e0c64d5a8d50ebf9830d79d3474",
59
+ "tarballSha256": "18390c9a25ed95e2aac206a15168c5e27d6308e6bcc6c39ed9f356596d807675"
60
+ }
56
61
  },
57
62
  "dependencies": {
58
63
  "yaml": "2.8.3",
@@ -1,52 +1,64 @@
1
1
  ---
2
2
  name: tldr
3
- description: "Use tldr; to set up, check, configure, repair, or uninstall the Claude plugin. It handles signed Aegis enrollment and Tightbeam email-channel registration without exposing private identity settings."
3
+ description: "Use tldr; to set up, check, configure, repair, or uninstall the installed plugin."
4
4
  version: 3
5
5
  ---
6
6
 
7
7
  # tldr;
8
8
 
9
- tldr; is a lifecycle-only plugin. It owns signed Aegis enrollment, verified-owner
10
- security, rendering, polling, AgentMail integration, and the provider-thread
11
- mapping used by its Tightbeam email channel. Tightbeam is the sole routine
12
- message and delivery authority.
9
+ tldr; is a lifecycle concierge for setup and safe product management. It guides the user through one current lifecycle action at a time; it is not a general messaging interface.
13
10
 
14
11
  ## Lifecycle front door
15
12
 
16
- Run only the bundled plugin launcher:
13
+ Run only the bundled launcher. Use the command block for the current host:
17
14
 
18
15
  ```bash
16
+ # Claude Code
19
17
  "${CLAUDE_PLUGIN_ROOT}/bin/tldr-agent" setup --json
20
18
  "${CLAUDE_PLUGIN_ROOT}/bin/tldr-agent" status --json
21
19
  "${CLAUDE_PLUGIN_ROOT}/bin/tldr-agent" configure --json
22
20
  "${CLAUDE_PLUGIN_ROOT}/bin/tldr-agent" repair --json
23
21
  "${CLAUDE_PLUGIN_ROOT}/bin/tldr-agent" uninstall --json
22
+
23
+ # Codex
24
+ "${PLUGIN_ROOT}/bin/tldr-agent" setup --json
25
+ "${PLUGIN_ROOT}/bin/tldr-agent" status --json
26
+ "${PLUGIN_ROOT}/bin/tldr-agent" configure --json
27
+ "${PLUGIN_ROOT}/bin/tldr-agent" repair --json
28
+ "${PLUGIN_ROOT}/bin/tldr-agent" uninstall --json
24
29
  ```
25
30
 
26
- Map `set up` and `Continue setting up tldr;` to `setup`; `check` and “is
27
- tldr; ready?” to `status`; owner or provider changes to `configure`; broken,
28
- unavailable, or explicit repair requests to `repair`; and removal to
29
- `uninstall`. Report the returned safe state and its single remediation. Do not
30
- probe private files, invent a second recovery path, or invoke a globally
31
- installed executable.
32
-
33
- Setup acquires and verifies the app-owned runtime, then hands private enrollment
34
- to the signed Aegis app. Tell the user before Aegis opens. Email and AgentMail
35
- credentials belong only in that native surface; never ask for them in chat,
36
- arguments, environment variables, or files. When an AgentMail account or key is
37
- needed, direct the user to <https://console.agentmail.to/> and resume only after
38
- they return from Aegis.
39
-
40
- Use these state meanings:
41
-
42
- - `secure-setup-required`: announce the signed Aegis handoff and run setup.
43
- - `confirmation-required`: normal human waiting, not failure. Give only
44
- `Continue setting up tldr;`.
45
- - `ready-unverified`: setup is ready and its Tightbeam email route is registered.
46
- - `onboarding-verified`: setup is complete; repeated setup must not reinstall
47
- components or reopen enrollment.
31
+ Map `set up` and `Continue setting up tldr;` to `setup`; `check` and “is tldr; ready?” to `status`; owner or provider changes to `configure`; broken, unavailable, or explicit repair requests to `repair`; and removal to `uninstall`. Report the returned safe state and its single returned remediation. Do not probe private files, invent another recovery path, or use a globally installed executable. If the host cannot resolve its plugin root, explain that the bundled launcher context is unavailable and stop.
32
+
33
+ ## Guided setup
34
+
35
+ Use this predetermined guidance for a first-time setup. Keep sensitive input in the native tldr; app and never ask for an API key or verification code in chat, command arguments, environment variables, or files.
36
+
37
+ 1. **Introduction:** “Let’s set up tldr;. It takes a few minutes. I’ll open the tldr; app, where you’ll connect AgentMail and verify your email. Your email address, API key, and verification code stay in the app and are never included in this chat.”
38
+ 2. **App handoff:** Start setup, then tell the user to continue in the tldr; app. Wait for its next safe state rather than interpreting private details.
39
+ 3. **Background access:** “macOS needs you to allow tldr; to run in the background so email replies can reach your agent sessions. In the tldr; app, choose **Open Login Items**, turn on **tldr;**, then choose **Continue**.”
40
+ 4. **AgentMail key:** “tldr; needs an AgentMail API key. If you don’t have one, sign in to AgentMail, open **API Keys**, choose **Create New API Key**, name it ‘tldr; on this Mac,’ and copy it. Paste the key only into the tldr; app.”
41
+ 5. **Verification:** “AgentMail is connected. Check your email for the verification code and enter it in the tldr; app. I can’t see or submit that code.”
42
+ 6. **Finalizing:** Tell the user that tldr; finalizes the existing connection and health checks without exposing internal details.
43
+ 7. **Success:** “tldr; is ready. I sent a welcome email from this agent session. Reply with anything—‘hello’ is enough—and this same session will answer to confirm that replies work. Replying is optional; setup is complete.” Then offer these use cases:
44
+ - “Email me a summary when you finish.”
45
+ - “Email me if you need input before continuing.”
46
+ - “Send me the decision and anything still blocked.”
47
+
48
+ ## Returning, repair, and removal
49
+
50
+ - **Returning/ready:** For `status`, give the concise ready result without replaying first-time guidance. An already ready installation stays ready and does not repeat setup or the welcome message. Use `configure` only for the existing product settings.
51
+ - **Repair:** If health says attention is required, say “tldr; needs attention” and give only the returned repair action. Correctable setup input errors stay in the app; do not turn them into a general repair workflow.
52
+ - **Uninstall:** Before `uninstall`, say: “Uninstalling tldr; removes its protected owner and AgentMail key, background service, product-owned agent hooks, and app files from this Mac. I’m opening the tldr; app so you can review and confirm the removal.” Never claim removal completed until `status` confirms it. After confirmed removal, present the exact plugin-removal command returned by tldr;.
53
+
54
+ ## Safe-state guidance
55
+
56
+ - `secure-setup-required`: give the introduction and start setup.
57
+ - `confirmation-required`: normal human waiting, not failure. Give only `Continue setting up tldr;`.
58
+ - `ready-unverified`: setup is ready; continue the current setup guidance.
59
+ - `onboarding-verified`: setup is complete. Repeated setup must not reinstall components, reopen enrollment, or repeat the welcome message.
60
+ - `onboarding-reconciling`: tldr; is ready, but do not claim the welcome message was delivered. Explain that the welcome message needs confirmation and give only the returned remediation; an ambiguous welcome is reconciled before retry.
61
+ - `welcome-delivery-failed`: tldr; is ready. Explain that a definitely failed welcome message can use the single returned remediation without reopening setup.
48
62
  - `repair-required` or `unavailable`: give the returned repair action only.
49
63
 
50
- For configure and uninstall, explain the impact before opening signed Aegis.
51
- After protected uninstall succeeds, present the exact plugin-removal command
52
- returned by tldr;. Never claim cleanup completed until status confirms it.
64
+ If any lifecycle command fails, follow its single remediation when present. Otherwise report the stable error code without probing private state.
@@ -15,7 +15,7 @@ import {
15
15
  requestAegisStatusSafe,
16
16
  } from "./aegis_client.mjs";
17
17
  import { sanitizeInstallerEnvironment } from "./aegis_installer_environment.mjs";
18
- const PACKAGE_RELEASE = "1.0.0";
18
+ const PACKAGE_RELEASE = "1.1.0";
19
19
  const RELEASE_MANIFEST_SCHEMA = 2;
20
20
  const BROKER_PROTOCOL_VERSION = 2;
21
21
  const SETUP_STATE_SCHEMA_VERSION = 2;
@@ -3,7 +3,6 @@ export const PROTOCOL_VERSION = 2;
3
3
  * beside the 32 KiB text body, and JSON escaping expands the markup. Mirrors
4
4
  * native/aegis-core/src/protocol.rs. */
5
5
  export const MAX_FRAME_BYTES = 524_288;
6
-
7
6
  const TRUSTED_TRANSACTION = [
8
7
  ["authorization", "string", 4096, true],
9
8
  ["transaction_id", "string", 256, true],
@@ -89,6 +88,7 @@ const SAFE_ERRORS = new Map([
89
88
  ["INVALID_REQUEST", "The broker request is invalid."],
90
89
  ["UNKNOWN_OPERATION", "The broker operation is not available."],
91
90
  ["UNAUTHORIZED", "The broker operation is not authorized."],
91
+ ["REPLY_PARENT_UNAUTHORIZED", "The reply parent is not authorized."],
92
92
  ["BROKER_UNAVAILABLE", "The protected broker is unavailable."],
93
93
  ["INVALID_TRANSITION", "The broker state transition is invalid."],
94
94
  ["POLICY_CORRUPT", "Protected broker policy is unavailable."],
@@ -19,18 +19,48 @@ function lifecycleError(code, message, cause) {
19
19
  }
20
20
 
21
21
  function inspectInstalledAegis({ artifact }) {
22
- if (!existsSync(FIXED_AEGIS_APP)) return false;
22
+ const appVisible = existsSync(FIXED_AEGIS_APP);
23
23
  const receipt = spawnSync(
24
24
  "/usr/sbin/pkgutil",
25
25
  ["--pkg-info", artifact.package_identifier],
26
26
  { stdio: "ignore", timeout: 5_000 },
27
27
  );
28
- if (receipt.status !== 0) return false;
29
28
  const service = spawnSync("/bin/launchctl", ["print", BROKER_LABEL], {
30
29
  stdio: "ignore",
31
30
  timeout: 5_000,
32
31
  });
33
- return service.status === 0;
32
+ return Object.freeze({
33
+ app_visible: appVisible,
34
+ receipt_present: receipt.status === 0,
35
+ broker_ready: service.status === 0,
36
+ });
37
+ }
38
+
39
+ function installationSignals(value) {
40
+ if (value && typeof value === "object") {
41
+ return Object.freeze({
42
+ app_visible: value.app_visible === true,
43
+ receipt_present: value.receipt_present === true,
44
+ broker_ready: value.broker_ready === true,
45
+ });
46
+ }
47
+ const healthy = value === true;
48
+ return Object.freeze({
49
+ app_visible: healthy,
50
+ receipt_present: healthy,
51
+ broker_ready: healthy,
52
+ });
53
+ }
54
+
55
+ function logInstallationVisibility(signals) {
56
+ const fields = Object.entries(signals)
57
+ .map(([name, value]) => `${name}=${value}`)
58
+ .join(" ");
59
+ spawnSync(
60
+ "/usr/bin/logger",
61
+ ["-t", "TldrAgentAegis", `[🪳 TEMP AEGIS_INSTALL_VISIBILITY] ${fields}`],
62
+ { stdio: "ignore", timeout: 5_000 },
63
+ );
34
64
  }
35
65
 
36
66
  export async function installVerifiedLocalAegisPackage({
@@ -39,6 +69,7 @@ export async function installVerifiedLocalAegisPackage({
39
69
  verifyPackage = verifyPackageWithMacOS,
40
70
  installPackage = openInstallerAndWait,
41
71
  inspectInstallation = inspectInstalledAegis,
72
+ logInstallation = logInstallationVisibility,
42
73
  } = {}) {
43
74
  if (
44
75
  typeof packagePath !== "string" ||
@@ -66,12 +97,11 @@ export async function installVerifiedLocalAegisPackage({
66
97
  error,
67
98
  );
68
99
  }
100
+ let signals;
69
101
  try {
70
102
  requireGuiSession();
71
103
  await installPackage(packagePath, artifact);
72
- if (!(await inspectInstallation({ artifact }))) {
73
- throw new Error("Aegis installer closed without a healthy installation");
74
- }
104
+ signals = installationSignals(await inspectInstallation({ artifact }));
75
105
  } catch (error) {
76
106
  throw lifecycleError(
77
107
  "STARPORT_INSTALLATION_INCOMPLETE",
@@ -79,6 +109,23 @@ export async function installVerifiedLocalAegisPackage({
79
109
  error,
80
110
  );
81
111
  }
112
+ try {
113
+ logInstallation(signals);
114
+ } catch {
115
+ // Diagnostics must never alter the verified installation result.
116
+ }
117
+ if (!signals.app_visible && signals.receipt_present && signals.broker_ready) {
118
+ throw lifecycleError(
119
+ "STARPORT_INSTALLATION_INACCESSIBLE",
120
+ "tldr; secure setup is installed but unavailable.",
121
+ );
122
+ }
123
+ if (!Object.values(signals).every(Boolean)) {
124
+ throw lifecycleError(
125
+ "STARPORT_INSTALLATION_INCOMPLETE",
126
+ "tldr; installation did not complete.",
127
+ );
128
+ }
82
129
  return Object.freeze({
83
130
  ok: true,
84
131
  architecture: artifact.architecture,