### Install dependencies, generate local keys, and start dev server Source: https://github.com/adamallcock/tibotattle/blob/main/apps/worker/README.md Run these commands from the apps/worker directory or via root npm --prefix scripts. Installs dependencies, creates ignored development-only values, and starts the local Worker. Never reuse the generated keys for remote environments or commit .dev.vars. ```bash npm ci npm run keys:local npm run dev ``` -------------------------------- ### Local marketplace and plugin install Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/codex-plugin.md Commands to add the repository as a local marketplace and install the plugin as tibotattle@tibotattle-local. ```shell codex plugins marketplace add local .agents/plugins/marketplace.json codex plugins install tibotattle@tibotattle-local ``` -------------------------------- ### Run live preview check Source: https://github.com/adamallcock/tibotattle/blob/main/apps/macos/README.md Runs the live check against the published preview feed. It GETs the configured public health, readiness, and appcast URLs with a five-second bound, does not follow redirects, and never starts, downloads, or installs an update. Exits non-zero if no qualifying appcast entry exists. ```bash npm run product:macos:preview:remote:live ``` ```bash node ./scripts/verify-macos-preview-remote.js \ --app "/Applications/TiboTattle Preview.app" \ --channel preview_distribution \ --live ``` -------------------------------- ### Start public-site preview Source: https://github.com/adamallcock/tibotattle/blob/main/docs/runbooks/2026-08-17-public-site-local-preview.md Starts a local preview of the public site from the repository root. Prints a http://127.0.0.1:/ URL; press Ctrl+C to stop and remove temporary output. Default port 0 avoids collisions. ```sh npm run product:release-site:preview ``` -------------------------------- ### Start local dashboard server Source: https://github.com/adamallcock/tibotattle/blob/main/apps/local/README.md Starts the local dashboard server on port 8791. Open http://127.0.0.1:8791/ after starting. ```bash USAGE_MONITOR_PORT=8791 node ./apps/local/server.js ``` -------------------------------- ### Install preview build with guarded replacement Source: https://github.com/adamallcock/tibotattle/blob/main/apps/macos/README.md Installs the staged preview only through this guarded replacement command. It accepts only the preview Applications target, refuses stable locations, validates before and after copying, and requires the explicit --replace flag. ```bash npm run product:macos:preview:install ``` -------------------------------- ### Install root and worker dependencies Source: https://github.com/adamallcock/tibotattle/blob/main/CONTRIBUTING.md Installs all dependencies for the pnpm-based root workspace and the Worker's npm lockfile. Run from the repository root. ```bash pnpm install npm --prefix apps/worker ci ``` -------------------------------- ### GET /api/local/onboarding Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/2026-08-26-api-surface-reference.md Onboarding endpoint for the local companion API. ```APIDOC ## GET /api/local/onboarding ### Description Local installation and evidence-source readiness. ### Method GET ### Endpoint /api/local/onboarding ### Response #### Success Response (200) - Local installation and evidence-source readiness. ``` -------------------------------- ### Install TiboTattle with Homebrew Source: https://github.com/adamallcock/tibotattle/blob/main/apps/web/public/docs.html Installs the signed TiboTattle release for macOS via Homebrew. Requires macOS 14 or later on Apple silicon or Intel. ```bash brew install --cask adamallcock/tap/tibotattle ``` -------------------------------- ### Run the inference timing experiment with Node Source: https://github.com/adamallcock/tibotattle/blob/main/docs/plans/2026-09-09-local-inference-timing.md Executes the runner script with a root directory, start date, output path, and file/byte/time budgets. Requires Node 22.13+ and the repository's normal dependency installation. Use a canonical absolute output path without symlink components. Repeat the same command to refresh; add --baseline for the bounded reader-only comparison. ```sh node tools/reports/inference-timing/run.mjs \ --root "$HOME/.codex/sessions/2026/09" --since 2026-09-07 \ --output "$PWD/.usage-monitor/inference-timing" \ --max-files 200 --max-bytes 4294967296 --max-seconds 60 ``` -------------------------------- ### GET /api/local/onboarding Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/api-surface.md Projects source readiness without exposing filesystem paths. Used by the dashboard. ```APIDOC ## GET /api/local/onboarding ### Description Projects source readiness without exposing filesystem paths. ### Method GET ### Endpoint /api/local/onboarding ### Caller Dashboard ### Authority Loopback read ### Storage or network effect Projects source readiness without exposing filesystem paths. ``` -------------------------------- ### Windows installer or MSIX verification commands Source: https://github.com/adamallcock/tibotattle/blob/main/docs/verify-release.md Verify the installer hash, Authenticode signature, and timestamp in PowerShell. The signature must cover the final installer/package bytes and include a trusted SHA-256 timestamp. SmartScreen reputation is separate from signature validity. ```powershell Get-FileHash .\TiboTattle-Setup.exe -Algorithm SHA256 Get-AuthenticodeSignature .\TiboTattle-Setup.exe | Format-List Status,SignerCertificate,TimeStamperCertificate signtool verify /pa /all /v .\TiboTattle-Setup.exe ``` -------------------------------- ### GET /api/local/overview Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/2026-08-26-api-surface-reference.md Overview endpoint for the local companion API. ```APIDOC ## GET /api/local/overview ### Description Personal dashboard headline and evidence coverage. ### Method GET ### Endpoint /api/local/overview ### Response #### Success Response (200) - Personal dashboard headline and evidence coverage. ``` -------------------------------- ### Build and deploy production release site Source: https://github.com/adamallcock/tibotattle/blob/main/docs/runbooks/macos-stable-release-runbook.md Builds the release site with the release-site script and deploys it with the production:deploy npm script. Requires absolute paths for installer, manifest, and social image; the social image must stay outside the output directory. The site exposes only installer availability and digest. ```bash npm run product:release-site -- \ --output "$PWD/.release-build/public-release-site" --replace \ --site-url "https://tibotattle.com/" \ --installer-path "$PWD/.release-build/macos-release/TiboTattle-X.Y.Z-macOS-arm64.dmg" \ --installer-release-manifest "$PWD/.release-build/macos-release/release-manifest.json" \ --installer-url "https://github.com/adamallcock/tibotattle/releases/download/vX.Y.Z/TiboTattle-X.Y.Z-macOS-arm64.dmg" \ --installer-version X.Y.Z \ --installer-sha256 "" \ --minimum-macos 14.0 --architectures arm64 \ --release-notes-url "https://tibotattle.com/docs.html" \ --privacy-url "https://tibotattle.com/privacy.html" \ --security-url "https://tibotattle.com/docs.html" \ --support-url "https://tibotattle.com/docs.html" \ --social-image "$ABSOLUTE_1200X630_PNG_PATH" npm --prefix apps/worker run production:deploy -- --confirm DEPLOY_PRODUCTION ``` -------------------------------- ### Start local dashboard with central origin Source: https://github.com/adamallcock/tibotattle/blob/main/apps/local/README.md Starts the local dashboard server with the central origin set to a development loopback address. The central origin is fixed at startup and must be either an explicit development loopback or a non-loopback HTTPS origin. ```bash USAGE_MONITOR_PORT=8791 \ USAGE_MONITOR_CENTRAL_ORIGIN=http://127.0.0.1:8792 \ node ./apps/local/server.js ``` -------------------------------- ### POST /api/v1/identity/apple/start Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/2026-08-26-api-surface-reference.md Starts the hosted Apple sign-in flow. This endpoint is session-exempt by design. ```APIDOC ## POST /api/v1/identity/apple/start ### Description Starts the hosted Apple sign-in flow. This endpoint is session-exempt by design. ### Method POST ### Endpoint /api/v1/identity/apple/start ### Response #### Success Response (200) - **redirectUrl** (string) - URL to redirect the user to for Apple sign-in #### Response Example { "redirectUrl": "https://appleid.apple.com/..." } ``` -------------------------------- ### POST /api/v1/identity/google/start Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/2026-08-26-api-surface-reference.md Starts the hosted Google sign-in flow. This endpoint is session-exempt by design. ```APIDOC ## POST /api/v1/identity/google/start ### Description Starts the hosted Google sign-in flow. This endpoint is session-exempt by design. ### Method POST ### Endpoint /api/v1/identity/google/start ### Response #### Success Response (200) - **redirectUrl** (string) - URL to redirect the user to for Google sign-in #### Response Example { "redirectUrl": "https://accounts.google.com/..." } ``` -------------------------------- ### GET /api/v1/device/sync-capabilities-v1.2 Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/api-surface.md Read independent successor lifecycle, exact consent and server-issued activation instant; never grant authority. ```APIDOC ## GET /api/v1/device/sync-capabilities-v1.2 ### Description Read independent successor lifecycle, exact consent and server-issued activation instant; never grant authority. ### Method GET ### Endpoint /api/v1/device/sync-capabilities-v1.2 ### Authentication Device ### Audience Contribution client ### Purpose Contribution telemetry ``` -------------------------------- ### GET /api/v1/device/sync/manifest Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/2026-08-26-api-surface-reference.md Reads the bounded manifest for `fromDay` and `toDay` ISO-day bounds. ```APIDOC ## GET /api/v1/device/sync/manifest ### Description Reads the bounded manifest for `fromDay` and `toDay` ISO-day bounds. ### Method GET ### Endpoint /api/v1/device/sync/manifest ### Access Level Device ### Query Parameters - **fromDay** (string) - Required - ISO-day start bound. - **toDay** (string) - Required - ISO-day end bound. ``` -------------------------------- ### GET /api/ready Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/api-surface.md Deployment probe endpoint that reads lifecycle, retention, reconciliation, and rebuild readiness. It performs no mutation. ```APIDOC ## GET /api/ready ### Description Deployment probe endpoint that reads lifecycle, retention, reconciliation, and rebuild readiness. It performs no mutation. ### Method GET ### Endpoint /api/ready ### Caller Deployment probes ### Authority Public ### Storage or network effect Reads lifecycle, retention, reconciliation, and rebuild readiness; no mutation. ``` -------------------------------- ### GET /api/ready Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/2026-08-26-api-surface-reference.md Public endpoint that reports readiness of D1, lifecycle, reconciliation, rebuild, and upload-budget components. ```APIDOC ## GET /api/ready ### Description Public endpoint that reports readiness of D1, lifecycle, reconciliation, rebuild, and upload-budget components. ### Method GET ### Endpoint /api/ready ### Authority Public ### Purpose D1, lifecycle, reconciliation, rebuild, and upload-budget readiness ``` -------------------------------- ### POST /api/v1/identity/google/start Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/2026-08-26-api-surface-reference.md Creates state, binding, PKCE material, and a Google authorization URL for the handoff flow. ```APIDOC ## POST /api/v1/identity/google/start ### Description Creates state, binding, PKCE material, and a Google authorization URL for the handoff flow. ### Method POST ### Endpoint /api/v1/identity/google/start ### Authority Handoff ### Purpose Create state, binding, PKCE material, and a Google authorization URL ``` -------------------------------- ### Create development identity and launch server Source: https://github.com/adamallcock/tibotattle/blob/main/apps/local/README.md Creates a temporary 0700 directory and 0600 identity file, then launches the server with the development identity override enabled. The command never prints the secret. The launcher rejects relative paths, symlinks, non-regular files, files not owned by the current user, modes other than 0600, missing opt-in, or simultaneous APP_USAGEMONITOR_EXPORT_SECRET. ```bash development_identity_dir="$(mktemp -d "${TMPDIR:-/tmp}/usage-monitor-identity.XXXXXX")" chmod 700 "$development_identity_dir" development_identity_file="$development_identity_dir/export-identity" node --input-type=module -e ' const { loadOrCreateParticipantSecret } = await import("./src/export-identity.js"); await loadOrCreateParticipantSecret({ environmentSecret: null, secretFile: process.argv[1], legacySecretFile: null }); ' "$development_identity_file" USAGE_MONITOR_ENABLE_DEVELOPMENT_IDENTITY=1 \ USAGE_MONITOR_DEVELOPMENT_EXPORT_SECRET_FILE="$development_identity_file" \ USAGE_MONITOR_PORT=8791 \ node ./apps/local/server.js ``` -------------------------------- ### Create draft release and upload assets Source: https://github.com/adamallcock/tibotattle/blob/main/docs/runbooks/macos-stable-release-runbook.md Creates a draft GitHub release with the given tag and notes, then uploads the required evidence assets. Two upload variants are shown: the baseline for native/checksum-only manifests (null evidence) and the attested v1 profile/path with additional SBOM and attestation files. ```bash TAG="vX.Y.Z" REPO="adamallcock/tibotattle" DMG="$RELEASE_DIR/TiboTattle-X.Y.Z-macOS-arm64.dmg" ARTIFACT_NAME="$(basename "$DMG")" SPDX="$RELEASE_DIR/TiboTattle-X.Y.Z-macOS-arm64.spdx.json" SPDX_NAME="$(basename "$SPDX")" PROVENANCE="$RELEASE_DIR/$ARTIFACT_NAME.provenance.bundle.json" PROVENANCE_NAME="$(basename "$PROVENANCE")" SBOM_ATTESTATION="$RELEASE_DIR/$ARTIFACT_NAME.sbom.bundle.json" SBOM_ATTESTATION_NAME="$(basename "$SBOM_ATTESTATION")" VERIFY_GUIDE="$PWD/docs/verify-release.md" NOTES_FILE="./release-notes/X.Y.Z.md" test -s "$NOTES_FILE" gh release create "$TAG" --repo "$REPO" --verify-tag --draft \ --title "TiboTattle X.Y.Z" --notes-file "$NOTES_FILE" # Use this baseline upload for a native/checksum-only manifest (null evidence): gh release upload "$TAG" --repo "$REPO" \ "$DMG" "$RELEASE_MANIFEST" "$SHA256SUMS" "$VERIFY_GUIDE" \ "$RELEASE_DIR/appcast.xml" # For the attested v1 profile/path, use this command instead: gh release upload "$TAG" --repo "$REPO" \ "$DMG" "$SPDX" "$PROVENANCE" "$SBOM_ATTESTATION" \ "$RELEASE_MANIFEST" "$SHA256SUMS" "$VERIFY_GUIDE" \ "$RELEASE_DIR/appcast.xml" ``` -------------------------------- ### Prepare stable release candidate with release-macos-app Source: https://github.com/adamallcock/tibotattle/blob/main/docs/runbooks/macos-stable-release-runbook.md Sets up the release environment and invokes the release preparation script. Requires a clean .release-build/macos-production directory and the exact Developer ID, notary profile, bundle version, Sparkle framework, appcast URL, and public Ed key. The command prepares the stable candidate and validates against the previous stable manifest. ```bash rm -rf .release-build/macos-production export USAGE_MONITOR_DEVELOPER_ID_APPLICATION="Developer ID Application: … (…)" export USAGE_MONITOR_NOTARY_PROFILE="…" export USAGE_MONITOR_BUNDLE_VERSION="1026" export USAGE_MONITOR_SPARKLE_FRAMEWORK=".release-deps/Sparkle.framework" export USAGE_MONITOR_SPARKLE_APPCAST_URL="https://updates.tibotattle.com/appcast.xml" export USAGE_MONITOR_SPARKLE_PUBLIC_ED_KEY="jhgPwmvWLMr7TGURJUoi6sXias7YP1F+hejZawKVTGw=" node scripts/release-macos-app.js \ --app ".release-build/macos-production/TiboTattle.app" \ --channel stable \ --prepare-candidate \ --previous-stable-manifest "" ``` -------------------------------- ### Documentation gate Source: https://github.com/adamallcock/tibotattle/blob/main/apps/worker/README.md Run this command after changing routes, bindings, storage, commands, or this README to verify the source-derived documentation. ```bash npm run docs:check ``` -------------------------------- ### Start the accountless status QA fixture Source: https://github.com/adamallcock/tibotattle/blob/main/docs/qa/2026-09-05-accountless-status-qa.md Starts the fixture in a terminal when a disposable graphical surface is available. The fixture emits a loopback URL that is used by the capture helper. ```sh node /private/tmp/accountless-status-qa-fixture.mjs ``` -------------------------------- ### GET, POST /api/local/refresh Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/api-surface.md GET reads refresh state; POST explicitly advances retained history and recalculates generation-bound detailed accounting before full publication. A 409 returns the in-flight receipt. ```APIDOC ## GET, POST /api/local/refresh ### Description GET reads refresh state, closed `mode` (`null`, `quick`, `detailed`) and actual `startedAt`; POST explicitly advances retained history and recalculates generation-bound detailed accounting before full publication. A 409 returns the in-flight receipt. ### Method GET, POST ### Endpoint /api/local/refresh ### Caller Dashboard/native shell ### Authority Loopback mutation ### Storage or network effect GET reads refresh state, closed `mode` (`null`, `quick`, `detailed`) and actual `startedAt`; POST explicitly advances retained history and recalculates generation-bound detailed accounting before full publication. A 409 returns the in-flight receipt. ``` -------------------------------- ### Prepare placed migration package with d1-storage-migration-package.mjs Source: https://github.com/adamallcock/tibotattle/blob/main/docs/runbooks/2026-09-11-d1-storage-operator.md Run this command to prepare a private placed migration package. It requires a reviewed contract and topology JSON with exact hashes, a deadline within 24 hours, and an output directory. The command pins source commit, role input, bundle/config hashes, and topology; it does not discover or create resources. ```sh node scripts/d1-storage-migration-package.mjs --worker-root "$PWD" \ --contract /absolute/private/restore-contract.json \ --contract-sha256 \ --placed-topology /absolute/private/topology.json \ --placed-topology-sha256 \ --expires-at \ --directory /absolute/new/private/placed-migration ``` -------------------------------- ### POST /api/local/refresh Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/2026-08-26-api-surface-reference.md Start a refresh. ```APIDOC ## POST /api/local/refresh ### Description Explicitly start one bounded retained-history and detailed-accounting refresh. ### Method POST ### Endpoint /api/local/refresh ### Response #### Success Response (200) - Confirmation of refresh start. ``` -------------------------------- ### Prepare web release with existing installer evidence Source: https://github.com/adamallcock/tibotattle/blob/main/docs/runbooks/2026-08-17-web-only-release.md Reuse the already-published DMG and its signed release manifest to prepare the web release without rebuilding or re-signing the macOS app. The command writes the generated site and local receipt but makes no network mutation; keep both until post-deployment verification is complete. The candidate must remain clean and at the same commit between preparation and deployment. ```bash DEPLOYED_SOURCE_COMMIT="" RELEASED_DMG_PATH="/absolute/path/to/TiboTattle-X.Y.Z-macOS-arm64.dmg" RELEASED_RELEASE_MANIFEST_PATH="${RELEASED_DMG_PATH}.release.json" SOCIAL_IMAGE_PATH="/absolute/path/to/approved-1200x630.png" npm run product:web-release:prepare -- \ --base "$DEPLOYED_SOURCE_COMMIT" \ --receipt "$PWD/.release-build/web-release-receipt.json" \ --replace-receipt -- \ --output "$PWD/.release-build/public-release-site" --replace \ --site-url "https://tibotattle.com/" \ --installer-path "$RELEASED_DMG_PATH" \ --installer-release-manifest "$RELEASED_RELEASE_MANIFEST_PATH" \ --installer-url "https://github.com/adamallcock/tibotattle/releases/download/vX.Y.Z/TiboTattle-X.Y.Z-macOS-arm64.dmg" \ --installer-version X.Y.Z \ --installer-sha256 "" \ --minimum-macos 14.0 --architectures arm64 \ --release-notes-url "https://tibotattle.com/docs.html" \ --privacy-url "https://tibotattle.com/privacy.html" \ --security-url "https://tibotattle.com/docs.html" \ --support-url "https://tibotattle.com/docs.html" \ --social-image "$SOCIAL_IMAGE_PATH" ``` -------------------------------- ### GET /api/health Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/api-surface.md Public central relay endpoint. The loopback companion can relay only this exact public GET route to the configured central origin. It does not forward cookies, credentials, arbitrary headers, arbitrary methods, or arbitrary paths. ```APIDOC ## GET /api/health ### Description Public central relay endpoint. The loopback companion can relay only this exact public GET route to the configured central origin. It does not forward cookies, credentials, arbitrary headers, arbitrary methods, or arbitrary paths. ### Method GET ### Endpoint /api/health ### Response #### Success Response (200) Health check response ``` -------------------------------- ### GET /api/local/refresh Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/2026-08-26-api-surface-reference.md Inspect refresh state. ```APIDOC ## GET /api/local/refresh ### Description Inspect refresh state. ### Method GET ### Endpoint /api/local/refresh ### Response #### Success Response (200) - Refresh state. ``` -------------------------------- ### POST /api/v1/identity/apple/start Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/api-surface.md Creates a nonce-bound D1 handoff and returns the Apple authorization URL. ```APIDOC ## POST /api/v1/identity/apple/start ### Description Creates a nonce-bound D1 handoff and returns the Apple authorization URL. ### Method POST ### Endpoint /api/v1/identity/apple/start ### Caller Website or loopback relay ### Authority Handoff ### Storage or network effect Creates a nonce-bound D1 handoff and returns the Apple authorization URL. ``` -------------------------------- ### Run local placed proof with d1-storage-restore.mjs Source: https://github.com/adamallcock/tibotattle/blob/main/docs/runbooks/2026-09-11-d1-storage-operator.md Use this command for local populated proof with actual restoration APIs and native Queue/Service bindings. It retains 1,600 v1.1 usage records and executes restored-runtime credential/replay/catch-up/withdrawal/erasure proof. It does not claim mixed-stream or v1 workload coverage. ```sh node scripts/d1-storage-restore.mjs --worker-root "$PWD" --rehearse \ --transport placed --records 1600 --directory /absolute/new/private/placed-proof ``` -------------------------------- ### Prepare candidate without replacing live index Source: https://github.com/adamallcock/tibotattle/blob/main/docs/runbooks/2026-08-27-local-unified-index-recovery.md Run without --dry-run to prepare a candidate without replacing the live index. The command read-validates rollback-journal state and the live device salt without modifying either, then reserves the private directory, writes an exact owner-only device-salt.copy, makes a consistent SQLite backup, proves source and salt identities did not change, rebuilds only against the private salt copy, and validates quick_check, foreign-key integrity, schema, compatibility, generation, completion, and row counts. It requires rollback-journal mode with no live -wal, -shm, or -journal sidecar; WAL mode stops before the recovery directory is created. On failure, keep the live index and any created recovery directory for diagnosis. ```bash node scripts/rebuild-local-unified-index.mjs \ --index "/absolute/path/to/Usage Monitor/local-unified-index-v1.sqlite" \ --recovery-dir "/absolute/path/to/Usage Monitor/recovery-YYYYMMDD-HHMMSS" ``` -------------------------------- ### Prepare and admit release migrations without mutations Source: https://github.com/adamallcock/tibotattle/blob/main/docs/runbooks/release-migration-rehearsal.md Run sequentially from apps/worker in the exact reviewed checkout. Creates a new owner-only evidence directory, enables shell no-clobber, and records the checkout commit, pinned Wrangler version, SQL hashes, and preflight D1 state. Requires configured/live production UUID agreement and separation from staging; any drift stops preparation for a revised exact operation. ```sh umask 077 set -C OP_DIR=$(mktemp -d /private/tmp/tibotattle-production-atomic-XXXXXX) git rev-parse HEAD > "$OP_DIR/source-commit.txt" ./node_modules/.bin/wrangler --version > "$OP_DIR/wrangler-version.txt" shasum -a 256 migrations/0057_accountless_enrollment_ledger.sql migrations/0058_accountless_upload_ownership.sql migrations/0059_accountless_upload_renewal.sql > "$OP_DIR/pending-sha256.txt" node scripts/rehearse-release-migrations.mjs observe-prefix --environment production > "$OP_DIR/prefix-before.json" ./node_modules/.bin/wrangler d1 info USAGE_MONITOR_DB --env production --json > "$OP_DIR/primary-info.json" ./node_modules/.bin/wrangler d1 info DELETION_LEDGER --env production --json > "$OP_DIR/ledger-info.json" ./node_modules/.bin/wrangler d1 execute USAGE_MONITOR_DB --env production --remote --command "SELECT schema_version,control_state,revision,enrollment_enabled,upload_registration_enabled,processing_enabled,publication_enabled,reason_code FROM collection_controls WHERE singleton=1; SELECT type,name,tbl_name,sql FROM sqlite_master WHERE name NOT LIKE 'sqlite_%' ORDER BY type,name;" --json > "$OP_DIR/preflight-schema-controls.json" ``` -------------------------------- ### Record installed binary evidence with npm run codex:contract:record-installed Source: https://github.com/adamallcock/tibotattle/blob/main/docs/design/2026-08-26-codex-plan-display-names.md Records the exact installed binary evidence after a clean semantic review. This command is part of the workflow for reviewing a future change and should only be run after the semantic review is clean. ```sh npm run codex:contract:record-installed ``` -------------------------------- ### GET /api/local/contribution/sync-status Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/2026-08-26-api-surface-reference.md Contribution sync status endpoint. ```APIDOC ## GET /api/local/contribution/sync-status ### Description Inspect the replay-safe contribution queue and pause state. ### Method GET ### Endpoint /api/local/contribution/sync-status ### Response #### Success Response (200) - Contribution queue and pause state. ``` -------------------------------- ### Run first page without cursor Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/usage-explainer-agent-protocol.md Invokes `usage-monitor explain-usage` with a plan, period, and limit to get the first page of results. The response contains at most 25 items and 16 KiB. For pageable plans, `page` reports the zero-based offset, requested limit, returned item count, and total item count. Each item has a global one-based `rank`. ```text usage-monitor explain-usage --plan top_work --period 7d --limit 10 ``` -------------------------------- ### GET /api/v1/admin/metrics/history Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/api-surface.md Reads bounded operational history. ```APIDOC ## GET /api/v1/admin/metrics/history ### Description Reads bounded operational history. ### Method GET ### Endpoint /api/v1/admin/metrics/history ### Caller Admin application ### Authority Admin ### Storage or network effect Reads bounded operational history. ``` -------------------------------- ### GET /api/v1/admin/metrics/history Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/2026-08-26-api-surface-reference.md Reads cached owner metrics history. ```APIDOC ## GET /api/v1/admin/metrics/history ### Description Reads cached owner metrics history. ### Method GET ### Endpoint /api/v1/admin/metrics/history ### Access Level Admin ``` -------------------------------- ### GET /api/local/quality Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/2026-08-26-api-surface-reference.md Quality endpoint for the local companion API. ```APIDOC ## GET /api/local/quality ### Description Monitoring-quality report data. ### Method GET ### Endpoint /api/local/quality ### Response #### Success Response (200) - Monitoring-quality report data. ``` -------------------------------- ### Prepare Sparkle updater framework Source: https://github.com/adamallcock/tibotattle/blob/main/apps/macos/README.md Downloads only the official Sparkle 2.9.3 release archive, checks its pinned SHA-256, extracts the framework with required symlinks, validates the framework-tree digest and link targets, and checks the license notice. ```bash npm run product:macos:updater:prepare ``` -------------------------------- ### GET /api/local/weekly Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/2026-08-26-api-surface-reference.md Weekly endpoint for the local companion API. ```APIDOC ## GET /api/local/weekly ### Description Weekly calibration report data. ### Method GET ### Endpoint /api/local/weekly ### Response #### Success Response (200) - Weekly calibration report data. ``` -------------------------------- ### POST /api/v1/identity/google/start Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/api-surface.md Creates a short-lived D1 handoff and returns the Google authorization URL. ```APIDOC ## POST /api/v1/identity/google/start ### Description Creates a short-lived D1 handoff and returns the Google authorization URL. ### Method POST ### Endpoint /api/v1/identity/google/start ### Caller Website or loopback relay ### Authority Handoff ### Storage or network effect Creates a short-lived D1 handoff and returns the Google authorization URL. ``` -------------------------------- ### Run product check with npm run product:check Source: https://github.com/adamallcock/tibotattle/blob/main/README.md Runs the product check gate. The source indicates this is part of the preparation evidence and is referenced by the current status matrix. ```bash npm run product:check ``` -------------------------------- ### GET /api/local/gradient Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/2026-08-26-api-surface-reference.md Gradient endpoint for the local companion API. ```APIDOC ## GET /api/local/gradient ### Description Quota-versus-cost gradient report data. ### Method GET ### Endpoint /api/local/gradient ### Response #### Success Response (200) - Quota-versus-cost gradient report data. ``` -------------------------------- ### Prepare and build current and next source candidates Source: https://github.com/adamallcock/tibotattle/blob/main/docs/runbooks/2026-09-07-macos-native-to-electron-handover.md For a clean, frozen checkout, prepare the two source candidates with the same ordered pair and distinct disposable build numbers. The first command builds the current candidate with build number 2026090701; the second builds the next candidate with build number 2026090702. Both target darwin-arm64 and use the same SOURCE_REVISION. ```sh CURRENT_VERSION='' NEXT_VERSION='' SOURCE_REVISION='' node scripts/package-electron-production.mjs \ --target darwin-arm64 \ --source-revision "$SOURCE_REVISION" \ --build-number 2026090701 \ --rehearsal-candidate current \ --rehearsal-current-version "$CURRENT_VERSION" \ --rehearsal-next-version "$NEXT_VERSION" node scripts/package-electron-production.mjs \ --target darwin-arm64 \ --source-revision "$SOURCE_REVISION" \ --build-number 2026090702 \ --rehearsal-candidate next \ --rehearsal-current-version "$CURRENT_VERSION" \ --rehearsal-next-version "$NEXT_VERSION" ``` -------------------------------- ### Run the signed keychain migration fixture runner Source: https://github.com/adamallcock/tibotattle/blob/main/test/fixtures/macos-keychain-migration/README.md The runner is inert unless --run-signed is supplied. The first command shows the plan only; the second builds test fixtures without signing or execution; the third performs an explicit protected run after operator authorization and local label setup. ```sh node test/helpers/verify-signed-keychain-migration.mjs ``` ```sh node test/helpers/verify-signed-keychain-migration.mjs --compile-only ``` ```sh node test/helpers/verify-signed-keychain-migration.mjs --run-signed \ --legacy-app "/explicit/path/to/previous/TiboTattle.app" ``` -------------------------------- ### GET /api/local/identity/hosted-signin-handoff Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/2026-08-26-api-surface-reference.md Read the hosted sign-in handoff handle. ```APIDOC ## GET /api/local/identity/hosted-signin-handoff ### Description Read the bounded local recovery handle for an in-flight hosted sign-in. ### Method GET ### Endpoint /api/local/identity/hosted-signin-handoff ### Response #### Success Response (200) - Bounded local recovery handle. ``` -------------------------------- ### Source-bound Azure builder preflight (no-write) Source: https://github.com/adamallcock/tibotattle/blob/main/docs/runbooks/2026-08-18-cross-platform-release-publication.md Run the no-write preflight for the canonical prepared Windows source candidate. It binds only the receipt, its SHA-256, the reviewed win32-x64 staging layout, and the release builder configuration; it does not contact Azure, invoke electron-builder, sign a file, create an installer, or publish an update. A ready result still requires a Windows x64 host with Node 26.2.0 and the reviewed non-secret Azure resource selection. ```sh node scripts/finalize-electron-windows-signing.mjs \ --candidate-receipt .release-build/electron-production/win32-x64/production-source-candidate.json ``` -------------------------------- ### GET /api/local/health Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/2026-08-26-api-surface-reference.md Health endpoint for the local companion API. ```APIDOC ## GET /api/local/health ### Description Companion readiness, refresh state, schema versions, and configured capabilities. ### Method GET ### Endpoint /api/local/health ### Response #### Success Response (200) - Companion readiness, refresh state, schema versions, and configured capabilities. ``` -------------------------------- ### Prepare staging package without resources (d1-storage-staging-preparation.mjs) Source: https://github.com/adamallcock/tibotattle/blob/main/docs/runbooks/2026-09-11-d1-storage-operator.md Use to generate a reviewable package without creating resources or enabling collection. Add --allow-unfrozen during local development only. The package leaves approval, source snapshot, resource IDs and qualified receipt pins unfilled, and describes two fresh databases, the existing deletion ledger, retained R2 reachability and one temporary migration Queue. No routing/control database is required for this first staging path. ```sh node scripts/d1-storage-staging-preparation.mjs --worker-root "$PWD" \ --directory /absolute/new/private/staging-preparation ``` -------------------------------- ### GET /api/local/performance/status Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/api-surface.md Independent daily-performance consent and synchronization status. ```APIDOC ## GET /api/local/performance/status ### Description Independent daily-performance consent and synchronization status. ### Method GET ### Endpoint /api/local/performance/status ### Parameters None documented. ### Request Example No request body documented. ### Response No response schema documented. ``` -------------------------------- ### GET /api/local/contribution/incremental-status Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/api-surface.md Reads v1 incremental consent/cursor/retry state. ```APIDOC ## GET /api/local/contribution/incremental-status ### Description Reads v1 incremental consent/cursor/retry state. ### Method GET ### Endpoint /api/local/contribution/incremental-status ### Parameters None documented. ### Request Example No request body documented. ### Response No response schema documented. ``` -------------------------------- ### GET /api/local/contribution/sync-status Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/api-surface.md Reads the legacy prepared-set queue state. ```APIDOC ## GET /api/local/contribution/sync-status ### Description Reads the legacy prepared-set queue state. ### Method GET ### Endpoint /api/local/contribution/sync-status ### Parameters None documented. ### Request Example No request body documented. ### Response No response schema documented. ``` -------------------------------- ### GET /api/local/quality Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/api-surface.md Reads monitoring-quality evidence. Used by the dashboard. ```APIDOC ## GET /api/local/quality ### Description Reads monitoring-quality evidence. ### Method GET ### Endpoint /api/local/quality ### Caller Dashboard ### Authority Loopback read ### Storage or network effect Reads monitoring-quality evidence. ``` -------------------------------- ### GET /api/v1/device/telemetry/performance/capabilities Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/api-surface.md Read the separate daily-performance capability and authorization. ```APIDOC ## GET /api/v1/device/telemetry/performance/capabilities ### Description Read the separate daily-performance capability and authorization. ### Method GET ### Endpoint /api/v1/device/telemetry/performance/capabilities ### Authentication Device ### Audience Contribution client ### Purpose Contribution telemetry ``` -------------------------------- ### Build and open the macOS app Source: https://github.com/adamallcock/tibotattle/blob/main/README.md Builds the self-contained desktop app and opens it. The build requires exactly Node v26.2.0 on macOS arm64; it fails on any other runtime. ```bash npm run product:macos:build open ".release-build/macos/TiboTattle.app" ``` -------------------------------- ### GET /api/v1/admin/community/allowance-preview Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/api-surface.md Reads unpublished allowance-fit previews; does not publish. ```APIDOC ## GET /api/v1/admin/community/allowance-preview ### Description Reads unpublished allowance-fit previews; does not publish. ### Method GET ### Endpoint /api/v1/admin/community/allowance-preview ### Caller Admin application ### Authority Admin ### Storage or network effect Reads unpublished allowance-fit previews; does not publish. ``` -------------------------------- ### Inspect and prepare native-module journal Source: https://github.com/adamallcock/tibotattle/blob/main/docs/runbooks/2026-08-18-cross-platform-release-publication.md Inspect and prepare the exact candidate's no-clobber journal before signing either staged native module. The first command inspects the journal; the second prepares it. If preparation is interrupted before a complete journal exists, both modes refuse the incomplete directory; preserve it for explicit inspection and prepare a fresh verified candidate. ```sh node scripts/rebind-electron-windows-native-modules.mjs --candidate-receipt .release-build/electron-production/win32-x64/production-source-candidate.json node scripts/rebind-electron-windows-native-modules.mjs --prepare --candidate-receipt .release-build/electron-production/win32-x64/production-source-candidate.json ``` -------------------------------- ### GET /api/v1/device/sync/state Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/2026-08-26-api-surface-reference.md Reads the device's accepted-through and synchronization state. ```APIDOC ## GET /api/v1/device/sync/state ### Description Reads the device's accepted-through and synchronization state. ### Method GET ### Endpoint /api/v1/device/sync/state ### Access Level Device ``` -------------------------------- ### Enable development artifact fallback with USAGE_MONITOR_DEVELOPMENT_ARTIFACT_FALLBACK Source: https://github.com/adamallcock/tibotattle/blob/main/apps/local/README.md Run the source checkout with the development artifact fallback enabled. Set USAGE_MONITOR_DEVELOPMENT_ARTIFACT_FALLBACK=1 and USAGE_MONITOR_PORT=8791, then start the server with node ./apps/local/server.js. This is only for developers who need the frozen historical fixture; it is not a production fallback. ```bash USAGE_MONITOR_DEVELOPMENT_ARTIFACT_FALLBACK=1 \ USAGE_MONITOR_PORT=8791 \ node ./apps/local/server.js ``` -------------------------------- ### GET /api/v1/session Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/2026-08-26-api-surface-reference.md Reads the current web-session projection and CSRF material. ```APIDOC ## GET /api/v1/session ### Description Reads the current web-session projection and CSRF material. ### Method GET ### Endpoint /api/v1/session ### Authority Session ### Purpose Read the current web-session projection and CSRF material ``` -------------------------------- ### Create draft release and upload baseline assets (gh release create/upload) Source: https://github.com/adamallcock/tibotattle/blob/main/docs/runbooks/2026-08-18-cross-platform-release-publication.md Creates a draft GitHub release and uploads the baseline asset set for a native/checksum-only release. Requires the reviewed release-notes file to exist (test -s) and the package version, stable tags, checked-in release-notes, CHANGELOG entries, and provenance links to agree. For a macOS direct subject with Sparkle enabled, also upload the exact appcast.xml feed. ```bash TAG="vX.Y.Z" REPO="adamallcock/tibotattle" ARTIFACT="" ARTIFACT_NAME="$(basename "$ARTIFACT")" RELEASE_MANIFEST="" SHA256SUMS="" VERIFY_GUIDE="docs/verify-release.md" NOTES_FILE="./release-notes/X.Y.Z.md" test -s "$NOTES_FILE" gh release create "$TAG" --repo "$REPO" --verify-tag --draft \ --title "TiboTattle X.Y.Z" --notes-file "$NOTES_FILE" # Native/checksum-only path (artifact.sbom and artifact.provenance are null): gh release upload "$TAG" --repo "$REPO" \ "$ARTIFACT" \ "$RELEASE_MANIFEST" "$SHA256SUMS" "$VERIFY_GUIDE" # For a macOS direct subject with Sparkle enabled, also upload the exact feed: gh release upload "$TAG" --repo "$REPO" "/appcast.xml" ``` -------------------------------- ### GET /api/local/model-performance Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/2026-08-26-api-surface-reference.md Model performance endpoint for the local companion API. ```APIDOC ## GET /api/local/model-performance ### Description Independent device-local Codex timing aggregates for `period=1`, `period=7`, `period=30`, or `period=all`, optionally pinned by `endAt`; restores validated saved measurements before background work; reads renew a 60-second background-worker lease; schema 4/method 5 combines response speed and tool-free fallback estimates, preferring response timing per turn, with a fallback count and unchanged TTFT. ### Method GET ### Endpoint /api/local/model-performance ### Parameters #### Query Parameters - **period** (string) - Required - Value must be `1`, `7`, `30`, or `all`. - **endAt** (string) - Optional - Canonical ISO timestamp no later than the current time. ### Response #### Success Response (200) - Device-local Codex timing aggregates. ``` -------------------------------- ### GET /api/local/diagnostics/contribution Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/2026-08-26-api-surface-reference.md Contribution diagnostics endpoint for the local companion API. ```APIDOC ## GET /api/local/diagnostics/contribution ### Description Closed, path-free contribution support diagnostics for the native shell. ### Method GET ### Endpoint /api/local/diagnostics/contribution ### Response #### Success Response (200) - Closed, path-free contribution support diagnostics. ``` -------------------------------- ### Build Windows filesystem binding with node-gyp and generate manifest Source: https://github.com/adamallcock/tibotattle/blob/main/native/windows-filesystem/README.md Build the native Windows filesystem binding on native Windows x64 using the repository's pinned Node toolchain. The first command rebuilds the N-API module; the second generates the sidecar manifest. The resulting build/Release/windows_filesystem.node and its adjacent manifest are loaded only on native Windows x64. ```text npm exec -- node-gyp rebuild --directory native/windows-filesystem node ./scripts/build-windows-filesystem-manifest.mjs ``` -------------------------------- ### GET /api/local/desktop-status Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/2026-08-26-api-surface-reference.md Desktop status endpoint for the local companion API. ```APIDOC ## GET /api/local/desktop-status ### Description Closed lifecycle plus a current direct display allowance from bounded published-overview metadata; strict v2 notification evidence remains receipt-only. Available before the first snapshot and without account identifiers or filesystem paths. ### Method GET ### Endpoint /api/local/desktop-status ### Response #### Success Response (200) - Closed lifecycle plus a current direct display allowance from bounded published-overview metadata. ``` -------------------------------- ### Run default inspection and rehearsal for D1 storage restore Source: https://github.com/adamallcock/tibotattle/blob/main/docs/runbooks/2026-09-11-d1-storage-operator.md Run the default inspection of local source and SQL, then run a rehearsal with the --rehearse flag to a new private directory. Finally, run the storage scripts check. ```sh node scripts/d1-storage-restore.mjs --worker-root "$PWD" --allow-unfrozen node scripts/d1-storage-restore.mjs --worker-root "$PWD" \ --rehearse --allow-unfrozen --directory /absolute/new/private/rehearsal npm run storage:scripts:check ``` -------------------------------- ### GET /api/local/timeline/window-breakdown Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/api-surface.md Reads a bounded `from`/`to` timeline window. Used by the dashboard. ```APIDOC ## GET /api/local/timeline/window-breakdown ### Description Reads a bounded `from`/`to` timeline window. ### Method GET ### Endpoint /api/local/timeline/window-breakdown ### Caller Dashboard ### Authority Loopback read ### Storage or network effect Reads a bounded `from`/`to` timeline window. ``` -------------------------------- ### Run remote-syntax with --import-migration 0058 Source: https://github.com/adamallcock/tibotattle/blob/main/docs/runbooks/release-migration-rehearsal.md Exact 0058 asynchronous-import qualification variant of the remote-syntax command. Only this migration name is accepted; no other migration name or predecessor is accepted by this option. The tool applies the exact predecessor, seeds the existing fixture, applies 0057 normally, imports unchanged 0058 and its ledger append in one file, then applies remaining migrations normally. File imports may make the selected disposable database unavailable while processing. ```sh node apps/worker/scripts/rehearse-release-migrations.mjs remote-syntax \ --prefix /private/tmp/reviewed-migration-prefix.json \ --target /private/tmp/approved-disposable-d1.json \ --confirm APPLY_SYNTHETIC_MIGRATIONS_TO_DISPOSABLE_D1 \ --import-migration 0058_accountless_upload_ownership.sql ``` -------------------------------- ### GET /api/local/gradient Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/api-surface.md Reads the derived cost/quota gradient. Used by the dashboard. ```APIDOC ## GET /api/local/gradient ### Description Reads the derived cost/quota gradient. ### Method GET ### Endpoint /api/local/gradient ### Caller Dashboard ### Authority Loopback read ### Storage or network effect Reads the derived cost/quota gradient. ``` -------------------------------- ### Build a connected macOS app with loopback origin and run smoke test Source: https://github.com/adamallcock/tibotattle/blob/main/apps/local/README.md Builds a signed macOS app with a loopback central origin for end-to-end developer smoke testing against the disposable backend laboratory, then runs the app in smoke-test mode. Plain HTTP is accepted only for the exact 127.0.0.1 host with an explicit port and the development flag. ```bash node ./scripts/build-macos-app.js \ --output ".release-build/macos-connected/TiboTattle.app" \ --central-origin http://127.0.0.1:8792 \ --allow-loopback-central-origin ".release-build/macos-connected/TiboTattle.app/Contents/MacOS/UsageMonitor" \ --central-smoke-test ``` -------------------------------- ### GET /api/v1/me/devices Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/api-surface.md Lists participant device projections without credentials. ```APIDOC ## GET /api/v1/me/devices ### Description Lists participant device projections without credentials. ### Method GET ### Endpoint /api/v1/me/devices ### Authentication Session ### Audience Participant browser ### Purpose Device lifecycle ``` -------------------------------- ### GET /api/v1/session Source: https://github.com/adamallcock/tibotattle/blob/main/docs/reference/api-surface.md Reads the current participant session and CSRF projection. ```APIDOC ## GET /api/v1/session ### Description Reads the current participant session and CSRF projection. ### Method GET ### Endpoint /api/v1/session ### Caller Website or loopback relay ### Authority Session ### Storage or network effect Reads the current participant session and CSRF projection. ``` -------------------------------- ### Preview with fixed port Source: https://github.com/adamallcock/tibotattle/blob/main/docs/runbooks/2026-08-17-public-site-local-preview.md Starts the preview on a fixed port, useful for browser tools or other local workflows. Omit --port or choose another port if the selected port is in use. ```sh npm run product:release-site:preview -- --port 4175 ```