create-egregore 0.21.6 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/egregore-launcher.js +58 -6
- package/assets/egregore-launcher.sh +15 -2
- package/lib/claude-runtime.js +2 -0
- package/lib/codex-runtime.js +2 -0
- package/lib/setup.js +20 -3
- package/package.json +2 -2
- package/runtime/claude/.claude/context/commit-format.md +7 -4
- package/runtime/claude/.claude/context/handoff-claiming.md +32 -0
- package/runtime/claude/.claude/context/notification-consent.md +12 -9
- package/runtime/claude/.claude/hooks/boundary-check.sh +14 -331
- package/runtime/claude/.claude/hooks/memory-read-guard.sh +9 -1
- package/runtime/claude/.claude/rules/voice-bedrock.md +6 -2
- package/runtime/claude/.claude/settings.json +1 -1
- package/runtime/claude/.claude/skills/commit/SKILL.md +5 -3
- package/runtime/claude/.claude/skills/dark-mode/SKILL.md +48 -369
- package/runtime/claude/.claude/skills/records/SKILL.md +158 -0
- package/runtime/claude/.claude/skills/reflect/SKILL.md +50 -21
- package/runtime/claude/.claude/skills/review-pr/SKILL.md +4 -2
- package/runtime/claude/.claude/skills/save/SKILL.md +9 -3
- package/runtime/claude/.claude/skills/summon/SKILL.md +138 -207
- package/runtime/claude/.claude/skills/tui-design/SKILL.md +1 -1
- package/runtime/claude/.claude/skills/update/SKILL.md +1 -1
- package/runtime/claude/.claude/skills/view/SKILL.md +52 -16
- package/runtime/claude/.claude/skills/view/compose-scaffold.html +19 -13
- package/runtime/claude/CLAUDE.md +59 -95
- package/runtime/claude/bin/agent.sh +231 -7
- package/runtime/claude/bin/api-call.sh +44 -23
- package/runtime/claude/bin/artifact-register.sh +7 -1
- package/runtime/claude/bin/artifact-writeback.sh +1 -1
- package/runtime/claude/bin/artifacts.sh +66 -265
- package/runtime/claude/bin/attendant.sh +4 -1
- package/runtime/claude/bin/boundary-guard.cjs +1848 -0
- package/runtime/claude/bin/boundary-hook.sh +41 -0
- package/runtime/claude/bin/boundary.sh +15 -155
- package/runtime/claude/bin/capture-run.sh +32 -2
- package/runtime/claude/bin/codex-render-spec.mjs +24 -46
- package/runtime/claude/bin/codex-session-start.sh +19 -0
- package/runtime/claude/bin/codex-skill-render.mjs +18 -0
- package/runtime/claude/bin/config-get.sh +10 -1
- package/runtime/claude/bin/connect-refresh.sh +16 -0
- package/runtime/claude/bin/corpus_map.py +5 -0
- package/runtime/claude/bin/data/capabilities/claude.json +1480 -0
- package/runtime/claude/bin/genui.sh +19 -0
- package/runtime/claude/bin/graph-batch.sh +1 -1
- package/runtime/claude/bin/graph-op.sh +14 -0
- package/runtime/claude/bin/graph.sh +1 -1
- package/runtime/claude/bin/handoff-pr-backfill.sh +1 -1
- package/runtime/claude/bin/handoff-run.sh +11 -6
- package/runtime/claude/bin/ingest-item.sh +1 -1
- package/runtime/claude/bin/ingest-surface.html +22 -4
- package/runtime/claude/bin/issue.sh +1 -1
- package/runtime/claude/bin/knowledge.sh +1 -1
- package/runtime/claude/bin/lib/card-delivery.sh +329 -0
- package/runtime/claude/bin/lib/config.sh +148 -3
- package/runtime/claude/bin/lib/context.sh +38 -67
- package/runtime/claude/bin/lib/genui-entry.py +36 -0
- package/runtime/claude/bin/lib/git-message.sh +25 -6
- package/runtime/claude/bin/lib/git-sync.sh +12 -4
- package/runtime/claude/bin/lib/greeting.sh +255 -28
- package/runtime/claude/bin/lib/handoff_meta.py +294 -0
- package/runtime/claude/bin/lib/health-footer.sh +83 -2
- package/runtime/claude/bin/lib/identity.sh +31 -10
- package/runtime/claude/bin/lib/instance-registry.sh +71 -0
- package/runtime/claude/bin/lib/local_ci_receipt.py +249 -0
- package/runtime/claude/bin/lib/metrics.sh +121 -8
- package/runtime/claude/bin/lib/notices.sh +36 -0
- package/runtime/claude/bin/lib/record_outcomes.py +729 -0
- package/runtime/claude/bin/lib/reflexes.py +267 -0
- package/runtime/claude/bin/lib/retrieval_scorecard.py +624 -0
- package/runtime/claude/bin/lib/session-record-prompt.txt +18 -0
- package/runtime/claude/bin/lib/session_record.py +3747 -0
- package/runtime/claude/bin/lib/session_trail.py +1983 -0
- package/runtime/claude/bin/lib/settings-drift.sh +8 -5
- package/runtime/claude/bin/lib/startup-restart.sh +41 -0
- package/runtime/claude/bin/lib/worktree-links.sh +92 -0
- package/runtime/claude/bin/memory-push.sh +6 -0
- package/runtime/claude/bin/merge-gate.sh +498 -0
- package/runtime/claude/bin/notify.sh +5 -2
- package/runtime/claude/bin/page-access.sh +103 -0
- package/runtime/claude/bin/person.sh +13 -2
- package/runtime/claude/bin/pi-render-spec.mjs +0 -1
- package/runtime/claude/bin/pi-spirit-discovery.mjs +34 -0
- package/runtime/claude/bin/post-update.sh +181 -0
- package/runtime/claude/bin/prime-render-spec.mjs +0 -1
- package/runtime/claude/bin/publish-artifact.sh +89 -42
- package/runtime/claude/bin/qa-inventory.sh +2 -2
- package/runtime/claude/bin/quest.sh +1 -1
- package/runtime/claude/bin/records.sh +11 -0
- package/runtime/claude/bin/reflexes/05-vitals.sh +9 -0
- package/runtime/claude/bin/reflexes/10-open-items.sh +12 -0
- package/runtime/claude/bin/reflexes/15-retrieval.sh +8 -0
- package/runtime/claude/bin/reflexes/20-nightly.sh +100 -0
- package/runtime/claude/bin/reflexes/20-sandbox.sh +85 -0
- package/runtime/claude/bin/reflexes/30-cost.py +116 -0
- package/runtime/claude/bin/reflexes/40-shells.py +51 -0
- package/runtime/claude/bin/reflexes/README.md +61 -0
- package/runtime/claude/bin/reflexes.sh +7 -0
- package/runtime/claude/bin/runtime-identity.sh +140 -42
- package/runtime/claude/bin/screenshot.sh +77 -0
- package/runtime/claude/bin/scroll.sh +1 -1
- package/runtime/claude/bin/search.sh +31 -5
- package/runtime/claude/bin/session-autosave.sh +6 -3
- package/runtime/claude/bin/session-id.sh +147 -0
- package/runtime/claude/bin/session-log.sh +19 -0
- package/runtime/claude/bin/session-record.sh +26 -0
- package/runtime/claude/bin/session-start.sh +121 -151
- package/runtime/claude/bin/settings.sh +13 -8
- package/runtime/claude/bin/spirit-discovery-claude.sh +4 -0
- package/runtime/claude/bin/spirit-discovery-codex.sh +4 -0
- package/runtime/claude/bin/spirit-discovery-pi.sh +4 -0
- package/runtime/claude/bin/spirit-discovery-prime.sh +4 -0
- package/runtime/claude/bin/spirit-discovery.sh +4 -0
- package/runtime/claude/bin/startup-check.sh +1 -1
- package/runtime/claude/bin/telemetry.sh +11 -4
- package/runtime/claude/bin/test-baseline.sh +33 -5
- package/runtime/claude/bin/todo.sh +1 -1
- package/runtime/claude/bin/worktree-create.sh +15 -45
- package/runtime/claude/bin/worktree.sh +6 -0
- package/runtime/claude/docs/spirit-discovery.md +96 -0
- package/runtime/claude/egregore_runtime/__init__.py +18 -12
- package/runtime/claude/egregore_runtime/access.py +608 -0
- package/runtime/claude/egregore_runtime/access_cli.py +190 -0
- package/runtime/claude/egregore_runtime/adapters/invitation.py +5 -3
- package/runtime/claude/egregore_runtime/adapters/qmd.py +521 -47
- package/runtime/claude/egregore_runtime/admin_entry.py +56 -0
- package/runtime/claude/egregore_runtime/artifacts.py +222 -16
- package/runtime/claude/egregore_runtime/contracts.py +27 -0
- package/runtime/claude/egregore_runtime/eligibility.py +5 -12
- package/runtime/claude/egregore_runtime/episode_binding.py +16 -5
- package/runtime/claude/egregore_runtime/github_issues.py +2 -2
- package/runtime/claude/egregore_runtime/handoff_lookup.py +9 -20
- package/runtime/claude/egregore_runtime/harness_cli.py +674 -149
- package/runtime/claude/egregore_runtime/held.py +2436 -0
- package/runtime/claude/egregore_runtime/hosted_api.py +137 -0
- package/runtime/claude/egregore_runtime/identity.py +196 -65
- package/runtime/claude/egregore_runtime/identity_transfer.py +6 -2
- package/runtime/claude/egregore_runtime/ingest_cli.py +2 -2
- package/runtime/claude/egregore_runtime/ingest_index_cli.py +4 -16
- package/runtime/claude/egregore_runtime/installation.py +119 -0
- package/runtime/claude/egregore_runtime/investigation.py +64 -41
- package/runtime/claude/egregore_runtime/investigation_guidance.py +16 -11
- package/runtime/claude/egregore_runtime/issue_cli.py +51 -32
- package/runtime/claude/egregore_runtime/issue_reporting.py +4 -3
- package/runtime/claude/egregore_runtime/issue_triage_service.py +2 -2
- package/runtime/claude/egregore_runtime/issues.py +12 -6
- package/runtime/claude/egregore_runtime/knowledge.py +331 -5
- package/runtime/claude/egregore_runtime/knowledge_cli.py +57 -17
- package/runtime/claude/egregore_runtime/lifecycle.py +88 -22
- package/runtime/claude/egregore_runtime/lifecycle_cli.py +21 -13
- package/runtime/claude/egregore_runtime/line_ids.py +10 -0
- package/runtime/claude/egregore_runtime/memory_push.py +349 -0
- package/runtime/claude/egregore_runtime/observe.py +64 -25
- package/runtime/claude/egregore_runtime/observers.py +19 -0
- package/runtime/claude/egregore_runtime/optional_modules.py +13 -0
- package/runtime/claude/egregore_runtime/outputs_cli.py +321 -0
- package/runtime/claude/egregore_runtime/policy.py +651 -24
- package/runtime/claude/egregore_runtime/private_result.py +2 -1
- package/runtime/claude/egregore_runtime/projection.py +946 -0
- package/runtime/claude/egregore_runtime/quest_cli.py +20 -23
- package/runtime/claude/egregore_runtime/question_cli.py +15 -11
- package/runtime/claude/egregore_runtime/questions.py +10 -10
- package/runtime/claude/egregore_runtime/quests.py +10 -10
- package/runtime/claude/egregore_runtime/record_publish.py +548 -0
- package/runtime/claude/egregore_runtime/record_subject.py +564 -0
- package/runtime/claude/egregore_runtime/research_ingest.py +2 -4
- package/runtime/claude/egregore_runtime/runtime.py +169 -60
- package/runtime/claude/egregore_runtime/sandbox.py +194 -0
- package/runtime/claude/egregore_runtime/scroll_cli.py +22 -32
- package/runtime/claude/egregore_runtime/scrolls.py +23 -15
- package/runtime/claude/egregore_runtime/shadow.py +262 -0
- package/runtime/claude/egregore_runtime/spirit_discovery.py +487 -0
- package/runtime/claude/egregore_runtime/spirit_discovery_cli.py +25 -0
- package/runtime/claude/egregore_runtime/spirit_discovery_transport.py +18 -0
- package/runtime/claude/egregore_runtime/status.py +101 -44
- package/runtime/claude/egregore_runtime/status_cli.py +13 -5
- package/runtime/claude/egregore_runtime/sync.py +39 -21
- package/runtime/claude/egregore_runtime/taste.py +934 -0
- package/runtime/claude/egregore_runtime/taste_cli.py +242 -0
- package/runtime/claude/egregore_runtime/taste_rules.py +91 -0
- package/runtime/claude/egregore_runtime/telemetry.py +26 -3
- package/runtime/claude/egregore_runtime/todo_cli.py +15 -12
- package/runtime/claude/egregore_runtime/todos.py +3 -2
- package/runtime/claude/egregore_runtime/upgrade.py +85 -58
- package/runtime/claude/egregore_runtime/writeback.py +330 -24
- package/runtime/claude/manifest.json +65 -5
- package/runtime/codex/.claude/context/handoff-claiming.md +32 -0
- package/runtime/codex/.claude/context/notification-consent.md +12 -9
- package/runtime/codex/.claude/skills/view/SKILL.md +438 -0
- package/runtime/codex/.codex/hooks.json +11 -0
- package/runtime/codex/.codex/skills/dark-mode/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/records/SKILL.md +29 -0
- package/runtime/codex/.codex/skills/summon/SKILL.md +1 -1
- package/runtime/codex/.codex/skills/view/assets/compose-scaffold.html +19 -13
- package/runtime/codex/.codex/spec-manifest.json +13 -19
- package/runtime/codex/AGENTS.md +54 -105
- package/runtime/codex/bin/agent.sh +231 -7
- package/runtime/codex/bin/api-call.sh +44 -23
- package/runtime/codex/bin/artifact-register.sh +7 -1
- package/runtime/codex/bin/artifact-writeback.sh +1 -1
- package/runtime/codex/bin/artifacts.sh +66 -265
- package/runtime/codex/bin/attendant.sh +4 -1
- package/runtime/codex/bin/boundary-guard.cjs +1848 -0
- package/runtime/codex/bin/boundary-hook.sh +41 -0
- package/runtime/codex/bin/capture-run.sh +32 -2
- package/runtime/codex/bin/codex-render-spec.mjs +24 -46
- package/runtime/codex/bin/codex-session-start.sh +19 -0
- package/runtime/codex/bin/codex-skill-render.mjs +18 -0
- package/runtime/codex/bin/config-get.sh +10 -1
- package/runtime/codex/bin/connect-refresh.sh +16 -0
- package/runtime/codex/bin/corpus_map.py +5 -0
- package/runtime/codex/bin/data/capabilities/codex.json +1458 -0
- package/runtime/codex/bin/genui.sh +19 -0
- package/runtime/codex/bin/graph-batch.sh +1 -1
- package/runtime/codex/bin/graph-op.sh +14 -0
- package/runtime/codex/bin/graph.sh +1 -1
- package/runtime/codex/bin/handoff-pr-backfill.sh +1 -1
- package/runtime/codex/bin/handoff-run.sh +11 -6
- package/runtime/codex/bin/ingest-item.sh +1 -1
- package/runtime/codex/bin/ingest-surface.html +22 -4
- package/runtime/codex/bin/issue.sh +1 -1
- package/runtime/codex/bin/knowledge.sh +1 -1
- package/runtime/codex/bin/lib/card-delivery.sh +329 -0
- package/runtime/codex/bin/lib/config.sh +148 -3
- package/runtime/codex/bin/lib/context.sh +38 -67
- package/runtime/codex/bin/lib/genui-entry.py +36 -0
- package/runtime/codex/bin/lib/git-message.sh +25 -6
- package/runtime/codex/bin/lib/git-sync.sh +12 -4
- package/runtime/codex/bin/lib/greeting.sh +255 -28
- package/runtime/codex/bin/lib/handoff_meta.py +294 -0
- package/runtime/codex/bin/lib/health-footer.sh +83 -2
- package/runtime/codex/bin/lib/identity.sh +31 -10
- package/runtime/codex/bin/lib/instance-registry.sh +71 -0
- package/runtime/codex/bin/lib/local_ci_receipt.py +249 -0
- package/runtime/codex/bin/lib/metrics.sh +121 -8
- package/runtime/codex/bin/lib/notices.sh +36 -0
- package/runtime/codex/bin/lib/record_outcomes.py +729 -0
- package/runtime/codex/bin/lib/reflexes.py +267 -0
- package/runtime/codex/bin/lib/retrieval_scorecard.py +624 -0
- package/runtime/codex/bin/lib/session-record-prompt.txt +18 -0
- package/runtime/codex/bin/lib/session_record.py +3747 -0
- package/runtime/codex/bin/lib/session_trail.py +1983 -0
- package/runtime/codex/bin/lib/settings-drift.sh +8 -5
- package/runtime/codex/bin/lib/startup-restart.sh +41 -0
- package/runtime/codex/bin/lib/worktree-links.sh +92 -0
- package/runtime/codex/bin/memory-push.sh +6 -0
- package/runtime/codex/bin/merge-gate.sh +498 -0
- package/runtime/codex/bin/notify.sh +5 -2
- package/runtime/codex/bin/page-access.sh +103 -0
- package/runtime/codex/bin/person.sh +13 -2
- package/runtime/codex/bin/pi-render-spec.mjs +0 -1
- package/runtime/codex/bin/pi-spirit-discovery.mjs +34 -0
- package/runtime/codex/bin/post-update.sh +181 -0
- package/runtime/codex/bin/prime-render-spec.mjs +0 -1
- package/runtime/codex/bin/publish-artifact.sh +89 -42
- package/runtime/codex/bin/qa-inventory.sh +2 -2
- package/runtime/codex/bin/quest.sh +1 -1
- package/runtime/codex/bin/records.sh +11 -0
- package/runtime/codex/bin/reflexes/05-vitals.sh +9 -0
- package/runtime/codex/bin/reflexes/10-open-items.sh +12 -0
- package/runtime/codex/bin/reflexes/15-retrieval.sh +8 -0
- package/runtime/codex/bin/reflexes/20-nightly.sh +100 -0
- package/runtime/codex/bin/reflexes/20-sandbox.sh +85 -0
- package/runtime/codex/bin/reflexes/30-cost.py +116 -0
- package/runtime/codex/bin/reflexes/40-shells.py +51 -0
- package/runtime/codex/bin/reflexes/README.md +61 -0
- package/runtime/codex/bin/reflexes.sh +7 -0
- package/runtime/codex/bin/runtime-identity.sh +140 -42
- package/runtime/codex/bin/screenshot.sh +77 -0
- package/runtime/codex/bin/scroll.sh +1 -1
- package/runtime/codex/bin/search.sh +31 -5
- package/runtime/codex/bin/session-autosave.sh +6 -3
- package/runtime/codex/bin/session-id.sh +147 -0
- package/runtime/codex/bin/session-log.sh +19 -0
- package/runtime/codex/bin/session-record.sh +26 -0
- package/runtime/codex/bin/settings.sh +13 -8
- package/runtime/codex/bin/spirit-discovery-claude.sh +4 -0
- package/runtime/codex/bin/spirit-discovery-codex.sh +4 -0
- package/runtime/codex/bin/spirit-discovery-pi.sh +4 -0
- package/runtime/codex/bin/spirit-discovery-prime.sh +4 -0
- package/runtime/codex/bin/spirit-discovery.sh +4 -0
- package/runtime/codex/bin/startup-check.sh +1 -1
- package/runtime/codex/bin/telemetry.sh +11 -4
- package/runtime/codex/bin/test-baseline.sh +33 -5
- package/runtime/codex/bin/todo.sh +1 -1
- package/runtime/codex/bin/worktree-create.sh +15 -45
- package/runtime/codex/bin/worktree.sh +6 -0
- package/runtime/codex/docs/spirit-discovery.md +96 -0
- package/runtime/codex/egregore_runtime/__init__.py +18 -12
- package/runtime/codex/egregore_runtime/access.py +608 -0
- package/runtime/codex/egregore_runtime/access_cli.py +190 -0
- package/runtime/codex/egregore_runtime/adapters/invitation.py +5 -3
- package/runtime/codex/egregore_runtime/adapters/qmd.py +521 -47
- package/runtime/codex/egregore_runtime/admin_entry.py +56 -0
- package/runtime/codex/egregore_runtime/artifacts.py +222 -16
- package/runtime/codex/egregore_runtime/contracts.py +27 -0
- package/runtime/codex/egregore_runtime/eligibility.py +5 -12
- package/runtime/codex/egregore_runtime/episode_binding.py +16 -5
- package/runtime/codex/egregore_runtime/github_issues.py +2 -2
- package/runtime/codex/egregore_runtime/handoff_lookup.py +9 -20
- package/runtime/codex/egregore_runtime/harness_cli.py +674 -149
- package/runtime/codex/egregore_runtime/held.py +2436 -0
- package/runtime/codex/egregore_runtime/hosted_api.py +137 -0
- package/runtime/codex/egregore_runtime/identity.py +196 -65
- package/runtime/codex/egregore_runtime/identity_transfer.py +6 -2
- package/runtime/codex/egregore_runtime/ingest_cli.py +2 -2
- package/runtime/codex/egregore_runtime/ingest_index_cli.py +4 -16
- package/runtime/codex/egregore_runtime/installation.py +119 -0
- package/runtime/codex/egregore_runtime/investigation.py +64 -41
- package/runtime/codex/egregore_runtime/investigation_guidance.py +16 -11
- package/runtime/codex/egregore_runtime/issue_cli.py +51 -32
- package/runtime/codex/egregore_runtime/issue_reporting.py +4 -3
- package/runtime/codex/egregore_runtime/issue_triage_service.py +2 -2
- package/runtime/codex/egregore_runtime/issues.py +12 -6
- package/runtime/codex/egregore_runtime/knowledge.py +331 -5
- package/runtime/codex/egregore_runtime/knowledge_cli.py +57 -17
- package/runtime/codex/egregore_runtime/lifecycle.py +88 -22
- package/runtime/codex/egregore_runtime/lifecycle_cli.py +21 -13
- package/runtime/codex/egregore_runtime/line_ids.py +10 -0
- package/runtime/codex/egregore_runtime/memory_push.py +349 -0
- package/runtime/codex/egregore_runtime/observe.py +64 -25
- package/runtime/codex/egregore_runtime/observers.py +19 -0
- package/runtime/codex/egregore_runtime/optional_modules.py +13 -0
- package/runtime/codex/egregore_runtime/outputs_cli.py +321 -0
- package/runtime/codex/egregore_runtime/policy.py +651 -24
- package/runtime/codex/egregore_runtime/private_result.py +2 -1
- package/runtime/codex/egregore_runtime/projection.py +946 -0
- package/runtime/codex/egregore_runtime/quest_cli.py +20 -23
- package/runtime/codex/egregore_runtime/question_cli.py +15 -11
- package/runtime/codex/egregore_runtime/questions.py +10 -10
- package/runtime/codex/egregore_runtime/quests.py +10 -10
- package/runtime/codex/egregore_runtime/record_publish.py +548 -0
- package/runtime/codex/egregore_runtime/record_subject.py +564 -0
- package/runtime/codex/egregore_runtime/research_ingest.py +2 -4
- package/runtime/codex/egregore_runtime/runtime.py +169 -60
- package/runtime/codex/egregore_runtime/sandbox.py +194 -0
- package/runtime/codex/egregore_runtime/scroll_cli.py +22 -32
- package/runtime/codex/egregore_runtime/scrolls.py +23 -15
- package/runtime/codex/egregore_runtime/shadow.py +262 -0
- package/runtime/codex/egregore_runtime/spirit_discovery.py +487 -0
- package/runtime/codex/egregore_runtime/spirit_discovery_cli.py +25 -0
- package/runtime/codex/egregore_runtime/spirit_discovery_transport.py +18 -0
- package/runtime/codex/egregore_runtime/status.py +101 -44
- package/runtime/codex/egregore_runtime/status_cli.py +13 -5
- package/runtime/codex/egregore_runtime/sync.py +39 -21
- package/runtime/codex/egregore_runtime/taste.py +934 -0
- package/runtime/codex/egregore_runtime/taste_cli.py +242 -0
- package/runtime/codex/egregore_runtime/taste_rules.py +91 -0
- package/runtime/codex/egregore_runtime/telemetry.py +26 -3
- package/runtime/codex/egregore_runtime/todo_cli.py +15 -12
- package/runtime/codex/egregore_runtime/todos.py +3 -2
- package/runtime/codex/egregore_runtime/upgrade.py +85 -58
- package/runtime/codex/egregore_runtime/writeback.py +330 -24
- package/runtime/codex/manifest.json +66 -5
- package/runtime/pi/.claude/context/handoff-claiming.md +32 -0
- package/runtime/pi/.claude/context/notification-consent.md +12 -9
- package/runtime/pi/.claude/skills/view/SKILL.md +438 -0
- package/runtime/pi/.codex/hooks.json +11 -0
- package/runtime/pi/.codex/skills/dark-mode/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/records/SKILL.md +29 -0
- package/runtime/pi/.codex/skills/summon/SKILL.md +1 -1
- package/runtime/pi/.codex/skills/view/assets/compose-scaffold.html +19 -13
- package/runtime/pi/.codex/spec-manifest.json +13 -19
- package/runtime/pi/.pi/APPEND_SYSTEM.md +53 -99
- package/runtime/pi/.pi/extensions/egregore.ts +13 -1
- package/runtime/pi/.pi/spec-manifest.json +2 -2
- package/runtime/pi/AGENTS.md +54 -105
- package/runtime/pi/bin/agent.sh +231 -7
- package/runtime/pi/bin/api-call.sh +44 -23
- package/runtime/pi/bin/artifact-register.sh +7 -1
- package/runtime/pi/bin/artifact-writeback.sh +1 -1
- package/runtime/pi/bin/artifacts.sh +66 -265
- package/runtime/pi/bin/attendant.sh +4 -1
- package/runtime/pi/bin/boundary-guard.cjs +1848 -0
- package/runtime/pi/bin/boundary-hook.sh +41 -0
- package/runtime/pi/bin/capture-run.sh +32 -2
- package/runtime/pi/bin/codex-render-spec.mjs +24 -46
- package/runtime/pi/bin/codex-session-start.sh +19 -0
- package/runtime/pi/bin/codex-skill-render.mjs +18 -0
- package/runtime/pi/bin/config-get.sh +10 -1
- package/runtime/pi/bin/connect-refresh.sh +16 -0
- package/runtime/pi/bin/corpus_map.py +5 -0
- package/runtime/pi/bin/data/capabilities/pi.json +1458 -0
- package/runtime/pi/bin/genui.sh +19 -0
- package/runtime/pi/bin/graph-batch.sh +1 -1
- package/runtime/pi/bin/graph-op.sh +14 -0
- package/runtime/pi/bin/graph.sh +1 -1
- package/runtime/pi/bin/handoff-pr-backfill.sh +1 -1
- package/runtime/pi/bin/handoff-run.sh +11 -6
- package/runtime/pi/bin/ingest-item.sh +1 -1
- package/runtime/pi/bin/ingest-surface.html +22 -4
- package/runtime/pi/bin/issue.sh +1 -1
- package/runtime/pi/bin/knowledge.sh +1 -1
- package/runtime/pi/bin/lib/card-delivery.sh +329 -0
- package/runtime/pi/bin/lib/config.sh +148 -3
- package/runtime/pi/bin/lib/context.sh +38 -67
- package/runtime/pi/bin/lib/genui-entry.py +36 -0
- package/runtime/pi/bin/lib/git-message.sh +25 -6
- package/runtime/pi/bin/lib/git-sync.sh +12 -4
- package/runtime/pi/bin/lib/greeting.sh +255 -28
- package/runtime/pi/bin/lib/handoff_meta.py +294 -0
- package/runtime/pi/bin/lib/health-footer.sh +83 -2
- package/runtime/pi/bin/lib/identity.sh +31 -10
- package/runtime/pi/bin/lib/instance-registry.sh +71 -0
- package/runtime/pi/bin/lib/local_ci_receipt.py +249 -0
- package/runtime/pi/bin/lib/metrics.sh +121 -8
- package/runtime/pi/bin/lib/notices.sh +36 -0
- package/runtime/pi/bin/lib/record_outcomes.py +729 -0
- package/runtime/pi/bin/lib/reflexes.py +267 -0
- package/runtime/pi/bin/lib/retrieval_scorecard.py +624 -0
- package/runtime/pi/bin/lib/session-record-prompt.txt +18 -0
- package/runtime/pi/bin/lib/session_record.py +3747 -0
- package/runtime/pi/bin/lib/session_trail.py +1983 -0
- package/runtime/pi/bin/lib/settings-drift.sh +8 -5
- package/runtime/pi/bin/lib/startup-restart.sh +41 -0
- package/runtime/pi/bin/lib/worktree-links.sh +92 -0
- package/runtime/pi/bin/memory-push.sh +6 -0
- package/runtime/pi/bin/merge-gate.sh +498 -0
- package/runtime/pi/bin/notify.sh +5 -2
- package/runtime/pi/bin/page-access.sh +103 -0
- package/runtime/pi/bin/person.sh +13 -2
- package/runtime/pi/bin/pi-branch-policy.mjs +37 -0
- package/runtime/pi/bin/pi-observe-context.mjs +97 -4
- package/runtime/pi/bin/pi-render-spec.mjs +0 -1
- package/runtime/pi/bin/pi-session-start.sh +4 -1
- package/runtime/pi/bin/pi-spirit-discovery.mjs +34 -0
- package/runtime/pi/bin/post-update.sh +181 -0
- package/runtime/pi/bin/prime-render-spec.mjs +0 -1
- package/runtime/pi/bin/publish-artifact.sh +89 -42
- package/runtime/pi/bin/qa-inventory.sh +2 -2
- package/runtime/pi/bin/quest.sh +1 -1
- package/runtime/pi/bin/records.sh +11 -0
- package/runtime/pi/bin/reflexes/05-vitals.sh +9 -0
- package/runtime/pi/bin/reflexes/10-open-items.sh +12 -0
- package/runtime/pi/bin/reflexes/15-retrieval.sh +8 -0
- package/runtime/pi/bin/reflexes/20-nightly.sh +100 -0
- package/runtime/pi/bin/reflexes/20-sandbox.sh +85 -0
- package/runtime/pi/bin/reflexes/30-cost.py +116 -0
- package/runtime/pi/bin/reflexes/40-shells.py +51 -0
- package/runtime/pi/bin/reflexes/README.md +61 -0
- package/runtime/pi/bin/reflexes.sh +7 -0
- package/runtime/pi/bin/runtime-identity.sh +140 -42
- package/runtime/pi/bin/screenshot.sh +77 -0
- package/runtime/pi/bin/scroll.sh +1 -1
- package/runtime/pi/bin/search.sh +31 -5
- package/runtime/pi/bin/session-autosave.sh +6 -3
- package/runtime/pi/bin/session-id.sh +147 -0
- package/runtime/pi/bin/session-log.sh +19 -0
- package/runtime/pi/bin/session-record.sh +26 -0
- package/runtime/pi/bin/settings.sh +13 -8
- package/runtime/pi/bin/spirit-discovery-claude.sh +4 -0
- package/runtime/pi/bin/spirit-discovery-codex.sh +4 -0
- package/runtime/pi/bin/spirit-discovery-pi.sh +4 -0
- package/runtime/pi/bin/spirit-discovery-prime.sh +4 -0
- package/runtime/pi/bin/spirit-discovery.sh +4 -0
- package/runtime/pi/bin/startup-check.sh +1 -1
- package/runtime/pi/bin/telemetry.sh +11 -4
- package/runtime/pi/bin/test-baseline.sh +33 -5
- package/runtime/pi/bin/todo.sh +1 -1
- package/runtime/pi/bin/worktree-create.sh +15 -45
- package/runtime/pi/bin/worktree.sh +6 -0
- package/runtime/pi/docs/spirit-discovery.md +96 -0
- package/runtime/pi/egregore_runtime/__init__.py +18 -12
- package/runtime/pi/egregore_runtime/access.py +608 -0
- package/runtime/pi/egregore_runtime/access_cli.py +190 -0
- package/runtime/pi/egregore_runtime/adapters/invitation.py +5 -3
- package/runtime/pi/egregore_runtime/adapters/qmd.py +521 -47
- package/runtime/pi/egregore_runtime/admin_entry.py +56 -0
- package/runtime/pi/egregore_runtime/artifacts.py +222 -16
- package/runtime/pi/egregore_runtime/contracts.py +27 -0
- package/runtime/pi/egregore_runtime/eligibility.py +5 -12
- package/runtime/pi/egregore_runtime/episode_binding.py +16 -5
- package/runtime/pi/egregore_runtime/github_issues.py +2 -2
- package/runtime/pi/egregore_runtime/handoff_lookup.py +9 -20
- package/runtime/pi/egregore_runtime/harness_cli.py +674 -149
- package/runtime/pi/egregore_runtime/held.py +2436 -0
- package/runtime/pi/egregore_runtime/hosted_api.py +137 -0
- package/runtime/pi/egregore_runtime/identity.py +196 -65
- package/runtime/pi/egregore_runtime/identity_transfer.py +6 -2
- package/runtime/pi/egregore_runtime/ingest_cli.py +2 -2
- package/runtime/pi/egregore_runtime/ingest_index_cli.py +4 -16
- package/runtime/pi/egregore_runtime/installation.py +119 -0
- package/runtime/pi/egregore_runtime/investigation.py +64 -41
- package/runtime/pi/egregore_runtime/investigation_guidance.py +16 -11
- package/runtime/pi/egregore_runtime/issue_cli.py +51 -32
- package/runtime/pi/egregore_runtime/issue_reporting.py +4 -3
- package/runtime/pi/egregore_runtime/issue_triage_service.py +2 -2
- package/runtime/pi/egregore_runtime/issues.py +12 -6
- package/runtime/pi/egregore_runtime/knowledge.py +331 -5
- package/runtime/pi/egregore_runtime/knowledge_cli.py +57 -17
- package/runtime/pi/egregore_runtime/lifecycle.py +88 -22
- package/runtime/pi/egregore_runtime/lifecycle_cli.py +21 -13
- package/runtime/pi/egregore_runtime/line_ids.py +10 -0
- package/runtime/pi/egregore_runtime/memory_push.py +349 -0
- package/runtime/pi/egregore_runtime/observe.py +64 -25
- package/runtime/pi/egregore_runtime/observers.py +19 -0
- package/runtime/pi/egregore_runtime/optional_modules.py +13 -0
- package/runtime/pi/egregore_runtime/outputs_cli.py +321 -0
- package/runtime/pi/egregore_runtime/policy.py +651 -24
- package/runtime/pi/egregore_runtime/private_result.py +2 -1
- package/runtime/pi/egregore_runtime/projection.py +946 -0
- package/runtime/pi/egregore_runtime/quest_cli.py +20 -23
- package/runtime/pi/egregore_runtime/question_cli.py +15 -11
- package/runtime/pi/egregore_runtime/questions.py +10 -10
- package/runtime/pi/egregore_runtime/quests.py +10 -10
- package/runtime/pi/egregore_runtime/record_publish.py +548 -0
- package/runtime/pi/egregore_runtime/record_subject.py +564 -0
- package/runtime/pi/egregore_runtime/research_ingest.py +2 -4
- package/runtime/pi/egregore_runtime/runtime.py +169 -60
- package/runtime/pi/egregore_runtime/sandbox.py +194 -0
- package/runtime/pi/egregore_runtime/scroll_cli.py +22 -32
- package/runtime/pi/egregore_runtime/scrolls.py +23 -15
- package/runtime/pi/egregore_runtime/shadow.py +262 -0
- package/runtime/pi/egregore_runtime/spirit_discovery.py +487 -0
- package/runtime/pi/egregore_runtime/spirit_discovery_cli.py +25 -0
- package/runtime/pi/egregore_runtime/spirit_discovery_transport.py +18 -0
- package/runtime/pi/egregore_runtime/status.py +101 -44
- package/runtime/pi/egregore_runtime/status_cli.py +13 -5
- package/runtime/pi/egregore_runtime/sync.py +39 -21
- package/runtime/pi/egregore_runtime/taste.py +934 -0
- package/runtime/pi/egregore_runtime/taste_cli.py +242 -0
- package/runtime/pi/egregore_runtime/taste_rules.py +91 -0
- package/runtime/pi/egregore_runtime/telemetry.py +26 -3
- package/runtime/pi/egregore_runtime/todo_cli.py +15 -12
- package/runtime/pi/egregore_runtime/todos.py +3 -2
- package/runtime/pi/egregore_runtime/upgrade.py +85 -58
- package/runtime/pi/egregore_runtime/writeback.py +330 -24
- package/runtime/pi/manifest.json +66 -5
- package/runtime/prime/.claude/context/handoff-claiming.md +32 -0
- package/runtime/prime/.claude/context/notification-consent.md +12 -9
- package/runtime/prime/.claude/skills/view/SKILL.md +438 -0
- package/runtime/prime/.codex/hooks.json +11 -0
- package/runtime/prime/.codex/skills/dark-mode/SKILL.md +1 -1
- package/runtime/prime/.codex/skills/records/SKILL.md +29 -0
- package/runtime/prime/.codex/skills/summon/SKILL.md +1 -1
- package/runtime/prime/.codex/skills/view/assets/compose-scaffold.html +19 -13
- package/runtime/prime/.codex/spec-manifest.json +13 -19
- package/runtime/prime/.prime/agent/APPEND_SYSTEM.md +53 -99
- package/runtime/prime/.prime/agent/extensions/egregore.ts +14 -1
- package/runtime/prime/.prime/agent/skills/egregore/SKILL.md +14 -6
- package/runtime/prime/.prime/agent/skills/egregore/src/egregore/__init__.py +66 -1
- package/runtime/prime/.prime/agent/spec-manifest.json +2 -2
- package/runtime/prime/AGENTS.md +54 -105
- package/runtime/prime/bin/agent.sh +231 -7
- package/runtime/prime/bin/api-call.sh +44 -23
- package/runtime/prime/bin/artifact-register.sh +7 -1
- package/runtime/prime/bin/artifact-writeback.sh +1 -1
- package/runtime/prime/bin/artifacts.sh +66 -265
- package/runtime/prime/bin/attendant.sh +4 -1
- package/runtime/prime/bin/boundary-guard.cjs +1848 -0
- package/runtime/prime/bin/boundary-hook.sh +41 -0
- package/runtime/prime/bin/capture-run.sh +32 -2
- package/runtime/prime/bin/codex-render-spec.mjs +24 -46
- package/runtime/prime/bin/codex-session-start.sh +19 -0
- package/runtime/prime/bin/codex-skill-render.mjs +18 -0
- package/runtime/prime/bin/config-get.sh +10 -1
- package/runtime/prime/bin/connect-refresh.sh +16 -0
- package/runtime/prime/bin/corpus_map.py +5 -0
- package/runtime/prime/bin/data/capabilities/prime.json +1458 -0
- package/runtime/prime/bin/genui.sh +19 -0
- package/runtime/prime/bin/graph-batch.sh +1 -1
- package/runtime/prime/bin/graph-op.sh +14 -0
- package/runtime/prime/bin/graph.sh +1 -1
- package/runtime/prime/bin/handoff-pr-backfill.sh +1 -1
- package/runtime/prime/bin/handoff-run.sh +11 -6
- package/runtime/prime/bin/ingest-item.sh +1 -1
- package/runtime/prime/bin/ingest-surface.html +22 -4
- package/runtime/prime/bin/issue.sh +1 -1
- package/runtime/prime/bin/knowledge.sh +1 -1
- package/runtime/prime/bin/lib/card-delivery.sh +329 -0
- package/runtime/prime/bin/lib/config.sh +148 -3
- package/runtime/prime/bin/lib/context.sh +38 -67
- package/runtime/prime/bin/lib/genui-entry.py +36 -0
- package/runtime/prime/bin/lib/git-message.sh +25 -6
- package/runtime/prime/bin/lib/git-sync.sh +12 -4
- package/runtime/prime/bin/lib/greeting.sh +255 -28
- package/runtime/prime/bin/lib/handoff_meta.py +294 -0
- package/runtime/prime/bin/lib/health-footer.sh +83 -2
- package/runtime/prime/bin/lib/identity.sh +31 -10
- package/runtime/prime/bin/lib/instance-registry.sh +71 -0
- package/runtime/prime/bin/lib/local_ci_receipt.py +249 -0
- package/runtime/prime/bin/lib/metrics.sh +121 -8
- package/runtime/prime/bin/lib/notices.sh +36 -0
- package/runtime/prime/bin/lib/record_outcomes.py +729 -0
- package/runtime/prime/bin/lib/reflexes.py +267 -0
- package/runtime/prime/bin/lib/retrieval_scorecard.py +624 -0
- package/runtime/prime/bin/lib/session-record-prompt.txt +18 -0
- package/runtime/prime/bin/lib/session_record.py +3747 -0
- package/runtime/prime/bin/lib/session_trail.py +1983 -0
- package/runtime/prime/bin/lib/settings-drift.sh +8 -5
- package/runtime/prime/bin/lib/startup-restart.sh +41 -0
- package/runtime/prime/bin/lib/worktree-links.sh +92 -0
- package/runtime/prime/bin/memory-push.sh +6 -0
- package/runtime/prime/bin/merge-gate.sh +498 -0
- package/runtime/prime/bin/notify.sh +5 -2
- package/runtime/prime/bin/page-access.sh +103 -0
- package/runtime/prime/bin/person.sh +13 -2
- package/runtime/prime/bin/pi-branch-policy.mjs +37 -0
- package/runtime/prime/bin/pi-observe-context.mjs +97 -4
- package/runtime/prime/bin/pi-render-spec.mjs +0 -1
- package/runtime/prime/bin/pi-spirit-discovery.mjs +34 -0
- package/runtime/prime/bin/post-update.sh +181 -0
- package/runtime/prime/bin/prime-render-spec.mjs +0 -1
- package/runtime/prime/bin/prime-session-start.sh +3 -1
- package/runtime/prime/bin/publish-artifact.sh +89 -42
- package/runtime/prime/bin/qa-inventory.sh +2 -2
- package/runtime/prime/bin/quest.sh +1 -1
- package/runtime/prime/bin/records.sh +11 -0
- package/runtime/prime/bin/reflexes/05-vitals.sh +9 -0
- package/runtime/prime/bin/reflexes/10-open-items.sh +12 -0
- package/runtime/prime/bin/reflexes/15-retrieval.sh +8 -0
- package/runtime/prime/bin/reflexes/20-nightly.sh +100 -0
- package/runtime/prime/bin/reflexes/20-sandbox.sh +85 -0
- package/runtime/prime/bin/reflexes/30-cost.py +116 -0
- package/runtime/prime/bin/reflexes/40-shells.py +51 -0
- package/runtime/prime/bin/reflexes/README.md +61 -0
- package/runtime/prime/bin/reflexes.sh +7 -0
- package/runtime/prime/bin/runtime-identity.sh +140 -42
- package/runtime/prime/bin/screenshot.sh +77 -0
- package/runtime/prime/bin/scroll.sh +1 -1
- package/runtime/prime/bin/search.sh +31 -5
- package/runtime/prime/bin/session-autosave.sh +6 -3
- package/runtime/prime/bin/session-id.sh +147 -0
- package/runtime/prime/bin/session-log.sh +19 -0
- package/runtime/prime/bin/session-record.sh +26 -0
- package/runtime/prime/bin/settings.sh +13 -8
- package/runtime/prime/bin/spirit-discovery-claude.sh +4 -0
- package/runtime/prime/bin/spirit-discovery-codex.sh +4 -0
- package/runtime/prime/bin/spirit-discovery-pi.sh +4 -0
- package/runtime/prime/bin/spirit-discovery-prime.sh +4 -0
- package/runtime/prime/bin/spirit-discovery.sh +4 -0
- package/runtime/prime/bin/startup-check.sh +1 -1
- package/runtime/prime/bin/telemetry.sh +11 -4
- package/runtime/prime/bin/test-baseline.sh +33 -5
- package/runtime/prime/bin/todo.sh +1 -1
- package/runtime/prime/bin/worktree-create.sh +15 -45
- package/runtime/prime/bin/worktree.sh +6 -0
- package/runtime/prime/docs/spirit-discovery.md +96 -0
- package/runtime/prime/egregore_runtime/__init__.py +18 -12
- package/runtime/prime/egregore_runtime/access.py +608 -0
- package/runtime/prime/egregore_runtime/access_cli.py +190 -0
- package/runtime/prime/egregore_runtime/adapters/invitation.py +5 -3
- package/runtime/prime/egregore_runtime/adapters/qmd.py +521 -47
- package/runtime/prime/egregore_runtime/admin_entry.py +56 -0
- package/runtime/prime/egregore_runtime/artifacts.py +222 -16
- package/runtime/prime/egregore_runtime/contracts.py +27 -0
- package/runtime/prime/egregore_runtime/eligibility.py +5 -12
- package/runtime/prime/egregore_runtime/episode_binding.py +16 -5
- package/runtime/prime/egregore_runtime/github_issues.py +2 -2
- package/runtime/prime/egregore_runtime/handoff_lookup.py +9 -20
- package/runtime/prime/egregore_runtime/harness_cli.py +674 -149
- package/runtime/prime/egregore_runtime/held.py +2436 -0
- package/runtime/prime/egregore_runtime/hosted_api.py +137 -0
- package/runtime/prime/egregore_runtime/identity.py +196 -65
- package/runtime/prime/egregore_runtime/identity_transfer.py +6 -2
- package/runtime/prime/egregore_runtime/ingest_cli.py +2 -2
- package/runtime/prime/egregore_runtime/ingest_index_cli.py +4 -16
- package/runtime/prime/egregore_runtime/installation.py +119 -0
- package/runtime/prime/egregore_runtime/investigation.py +64 -41
- package/runtime/prime/egregore_runtime/investigation_guidance.py +16 -11
- package/runtime/prime/egregore_runtime/issue_cli.py +51 -32
- package/runtime/prime/egregore_runtime/issue_reporting.py +4 -3
- package/runtime/prime/egregore_runtime/issue_triage_service.py +2 -2
- package/runtime/prime/egregore_runtime/issues.py +12 -6
- package/runtime/prime/egregore_runtime/knowledge.py +331 -5
- package/runtime/prime/egregore_runtime/knowledge_cli.py +57 -17
- package/runtime/prime/egregore_runtime/lifecycle.py +88 -22
- package/runtime/prime/egregore_runtime/lifecycle_cli.py +21 -13
- package/runtime/prime/egregore_runtime/line_ids.py +10 -0
- package/runtime/prime/egregore_runtime/memory_push.py +349 -0
- package/runtime/prime/egregore_runtime/observe.py +64 -25
- package/runtime/prime/egregore_runtime/observers.py +19 -0
- package/runtime/prime/egregore_runtime/optional_modules.py +13 -0
- package/runtime/prime/egregore_runtime/outputs_cli.py +321 -0
- package/runtime/prime/egregore_runtime/policy.py +651 -24
- package/runtime/prime/egregore_runtime/private_result.py +2 -1
- package/runtime/prime/egregore_runtime/projection.py +946 -0
- package/runtime/prime/egregore_runtime/quest_cli.py +20 -23
- package/runtime/prime/egregore_runtime/question_cli.py +15 -11
- package/runtime/prime/egregore_runtime/questions.py +10 -10
- package/runtime/prime/egregore_runtime/quests.py +10 -10
- package/runtime/prime/egregore_runtime/record_publish.py +548 -0
- package/runtime/prime/egregore_runtime/record_subject.py +564 -0
- package/runtime/prime/egregore_runtime/research_ingest.py +2 -4
- package/runtime/prime/egregore_runtime/runtime.py +169 -60
- package/runtime/prime/egregore_runtime/sandbox.py +194 -0
- package/runtime/prime/egregore_runtime/scroll_cli.py +22 -32
- package/runtime/prime/egregore_runtime/scrolls.py +23 -15
- package/runtime/prime/egregore_runtime/shadow.py +262 -0
- package/runtime/prime/egregore_runtime/spirit_discovery.py +487 -0
- package/runtime/prime/egregore_runtime/spirit_discovery_cli.py +25 -0
- package/runtime/prime/egregore_runtime/spirit_discovery_transport.py +18 -0
- package/runtime/prime/egregore_runtime/status.py +101 -44
- package/runtime/prime/egregore_runtime/status_cli.py +13 -5
- package/runtime/prime/egregore_runtime/sync.py +39 -21
- package/runtime/prime/egregore_runtime/taste.py +934 -0
- package/runtime/prime/egregore_runtime/taste_cli.py +242 -0
- package/runtime/prime/egregore_runtime/taste_rules.py +91 -0
- package/runtime/prime/egregore_runtime/telemetry.py +26 -3
- package/runtime/prime/egregore_runtime/todo_cli.py +15 -12
- package/runtime/prime/egregore_runtime/todos.py +3 -2
- package/runtime/prime/egregore_runtime/upgrade.py +85 -58
- package/runtime/prime/egregore_runtime/writeback.py +330 -24
- package/runtime/prime/manifest.json +66 -5
- package/runtime/claude/bin/thread.sh +0 -9
- package/runtime/claude/egregore_runtime/admin_gate.py +0 -102
- package/runtime/claude/egregore_runtime/thread_cli.py +0 -173
- package/runtime/claude/egregore_runtime/threads.py +0 -521
- package/runtime/codex/bin/thread.sh +0 -9
- package/runtime/codex/egregore_runtime/admin_gate.py +0 -102
- package/runtime/codex/egregore_runtime/thread_cli.py +0 -173
- package/runtime/codex/egregore_runtime/threads.py +0 -521
- package/runtime/pi/bin/thread.sh +0 -9
- package/runtime/pi/egregore_runtime/admin_gate.py +0 -102
- package/runtime/pi/egregore_runtime/thread_cli.py +0 -173
- package/runtime/pi/egregore_runtime/threads.py +0 -521
- package/runtime/prime/bin/thread.sh +0 -9
- package/runtime/prime/egregore_runtime/admin_gate.py +0 -102
- package/runtime/prime/egregore_runtime/thread_cli.py +0 -173
- package/runtime/prime/egregore_runtime/threads.py +0 -521
|
@@ -1,288 +1,89 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
3
|
-
|
|
2
|
+
# The link commands read the org API key: never trace it.
|
|
3
|
+
set +vx
|
|
4
4
|
|
|
5
5
|
# artifacts.sh — find something you generated, by NAME or CONTENT, and get its URL.
|
|
6
6
|
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
# • handoffs → handoffs/
|
|
10
|
-
# • emissaries (outbound pointers) → handoffs/outbound/
|
|
11
|
-
# • decisions / findings / patterns (/reflect, /add) → knowledge/
|
|
12
|
-
# The finder searches ALL of them, so anything you made is retrievable by what's
|
|
13
|
-
# IN it, not just the name you gave it. Grep-first, so it works with nothing but
|
|
14
|
-
# Claude Code / Codex file ops (OSS):
|
|
7
|
+
# artifacts find [--since D|--until D|--on D] <query...> rank matches
|
|
8
|
+
# artifacts list [N] most recently recorded
|
|
15
9
|
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
# In paid mode (search available) `find` also folds in qmd semantic recall, so
|
|
20
|
-
# "the artifact where I laid out our GTM plan" resolves even without the words.
|
|
21
|
-
# The graph is the third layer — query it via bin/graph.sh for relationships.
|
|
10
|
+
# Both run in the Runtime (`harness_cli artifacts`), which ranks hosted
|
|
11
|
+
# artifacts, handoffs, emissaries and knowledge as this script once did and
|
|
12
|
+
# prints only what the reader may see. The hosted link controls stay here.
|
|
22
13
|
|
|
23
14
|
SCRIPT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
# All artifact-bearing memory dirs. index.md files are navigation, not artifacts.
|
|
27
|
-
_corpus() {
|
|
28
|
-
find \
|
|
29
|
-
"$MEM/artifacts" \
|
|
30
|
-
"$MEM/handoffs" \
|
|
31
|
-
"$MEM/knowledge/decisions" "$MEM/knowledge/findings" "$MEM/knowledge/patterns" \
|
|
32
|
-
-type f -name '*.md' 2>/dev/null | grep -vE '/index\.md$'
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
_field() { # <file> <key> → frontmatter value
|
|
36
|
-
sed -n "/^---$/,/^---$/p" "$1" 2>/dev/null | grep -i "^$2:" | head -1 | cut -d: -f2- | sed 's/^ *//'
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
_title() { # frontmatter title → first "# " heading → filename
|
|
40
|
-
local t; t="$(_field "$1" title)"
|
|
41
|
-
[ -n "$t" ] || t="$(grep -m1 '^# ' "$1" 2>/dev/null | sed 's/^#* *//')"
|
|
42
|
-
[ -n "$t" ] || t="$(basename "$1" .md)"
|
|
43
|
-
printf '%s' "$t"
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
_url() { # frontmatter url → first hosted link in the body
|
|
47
|
-
local u; u="$(_field "$1" url)"
|
|
48
|
-
[ -n "$u" ] || u="$(grep -oE 'https://egregore\.xyz/[^ )>"]+' "$1" 2>/dev/null | head -1)"
|
|
49
|
-
printf '%s' "$u"
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
_tag() { # short source label from path (falls back to frontmatter type)
|
|
53
|
-
case "$1" in
|
|
54
|
-
*/handoffs/outbound/*) printf 'emissary' ;;
|
|
55
|
-
*/handoffs/*) printf 'handoff' ;;
|
|
56
|
-
*/knowledge/decisions/*) printf 'decision' ;;
|
|
57
|
-
*/knowledge/findings/*) printf 'finding' ;;
|
|
58
|
-
*/knowledge/patterns/*) printf 'pattern' ;;
|
|
59
|
-
*) local ty; ty="$(_field "$1" type)"; printf '%s' "${ty:-artifact}" ;;
|
|
60
|
-
esac
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
_rel() { printf 'memory/%s' "${1#"$MEM"/}"; }
|
|
15
|
+
# shellcheck source=bin/lib/config.sh
|
|
16
|
+
source "$SCRIPT_DIR/bin/lib/config.sh"
|
|
64
17
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
local -a out=()
|
|
69
|
-
for w in $(printf '%s' "$1" | LC_ALL=C tr '[:upper:]' '[:lower:]' | LC_ALL=C tr -c 'a-z0-9' ' '); do
|
|
70
|
-
[ ${#w} -ge 3 ] || continue
|
|
71
|
-
case "$stop" in *" $w "*) continue ;; esac
|
|
72
|
-
out+=("$w")
|
|
73
|
-
done
|
|
74
|
-
[ ${#out[@]} -gt 0 ] || out=("$(printf '%s' "$1" | LC_ALL=C tr '[:upper:]' '[:lower:]')")
|
|
75
|
-
printf '%s\n' "${out[@]}"
|
|
18
|
+
_runtime_artifacts() {
|
|
19
|
+
EGREGORE_ROOT="$SCRIPT_DIR" PYTHONSAFEPATH=1 PYTHONPATH="$SCRIPT_DIR${PYTHONPATH:+:$PYTHONPATH}" \
|
|
20
|
+
python3 -m egregore_runtime.harness_cli artifacts "$1" -- "${@:2}"
|
|
76
21
|
}
|
|
77
22
|
|
|
78
|
-
#
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
#
|
|
82
|
-
#
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
since="$(_days_ago "$n")"; cleaned="$(printf '%s' "$lc" | sed -E 's/[0-9]+ +(day|days|week|weeks) +ago//')"
|
|
91
|
-
elif [[ "$lc" =~ (last|past)[[:space:]]+([0-9]+)[[:space:]]+(day|days|week|weeks) ]]; then
|
|
92
|
-
n="${BASH_REMATCH[2]}"; case "${BASH_REMATCH[3]}" in week*) n=$((n * 7)) ;; esac
|
|
93
|
-
since="$(_days_ago "$n")"; cleaned="$(printf '%s' "$lc" | sed -E 's/(last|past) +[0-9]+ +(day|days|week|weeks)//')"
|
|
94
|
-
elif [[ "$lc" == *yesterday* ]]; then
|
|
95
|
-
since="$(_days_ago 1)"; until="$since"; cleaned="${lc//yesterday/}"
|
|
96
|
-
elif [[ "$lc" == *today* ]]; then
|
|
97
|
-
since="$(date +%Y-%m-%d)"; until="$since"; cleaned="${lc//today/}"
|
|
98
|
-
elif [[ "$lc" =~ (this|last|past)[[:space:]]+week ]]; then
|
|
99
|
-
since="$(_days_ago 7)"; cleaned="$(printf '%s' "$lc" | sed -E 's/(this|last|past) +week//')"
|
|
100
|
-
elif [[ "$lc" =~ (this|last|past)[[:space:]]+month ]]; then
|
|
101
|
-
since="$(_days_ago 31)"; cleaned="$(printf '%s' "$lc" | sed -E 's/(this|last|past) +month//')"
|
|
102
|
-
elif [[ "$lc" =~ recent|recently|lately ]]; then
|
|
103
|
-
since="$(_days_ago 14)"; cleaned="$(printf '%s' "$lc" | sed -E 's/recently|recent|lately//')"
|
|
104
|
-
elif [[ "$lc" =~ ([0-9]{4}-[0-9]{2}-[0-9]{2}) ]]; then
|
|
105
|
-
since="${BASH_REMATCH[1]}"; until="$since"; cleaned="${lc//${BASH_REMATCH[1]}/}"
|
|
23
|
+
# --- Hosted link controls (Connected: the page lives on egregore.xyz) --------
|
|
24
|
+
# artifacts close <id> close the link now; it opens a "link closed" notice
|
|
25
|
+
# artifacts reopen <id> open it again, with no closing date
|
|
26
|
+
# artifacts opens <id> when the page was opened (people; previews apart)
|
|
27
|
+
_link_call() { # <method> <id> <action> → JSON on stdout; plain reason on failure
|
|
28
|
+
local method="$1" id="$2" action="$3" api_url api_key body status
|
|
29
|
+
api_url="${EGREGORE_API_URL:-$(grep '^EGREGORE_API_URL=' "$SCRIPT_DIR/.env" 2>/dev/null | cut -d'=' -f2-)}"
|
|
30
|
+
api_url="$(_hosted_api_url "${api_url:-$(jq -r '.api_url // empty' "$SCRIPT_DIR/egregore.json" 2>/dev/null)}")" || return 4
|
|
31
|
+
api_key="${EGREGORE_API_KEY:-$(grep '^EGREGORE_API_KEY=' "$SCRIPT_DIR/.env" 2>/dev/null | cut -d'=' -f2-)}"
|
|
32
|
+
if [ -z "$api_url" ] || [ -z "$api_key" ]; then
|
|
33
|
+
echo "Hosted links are part of Egregore Connect; this configuration has none." >&2
|
|
34
|
+
return 4
|
|
106
35
|
fi
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
# Best-effort YYYY-MM-DD for a memory file: filename prefix, handoff dir/day, or
|
|
111
|
-
# frontmatter date:. Lets the grep path honor temporal windows too.
|
|
112
|
-
_file_date() {
|
|
113
|
-
local f="$1" d dir base
|
|
114
|
-
d="$(basename "$f" | grep -oE '^[0-9]{4}-[0-9]{2}-[0-9]{2}' | head -1)"
|
|
115
|
-
[ -n "$d" ] && { printf '%s' "$d"; return; }
|
|
116
|
-
dir="$(basename "$(dirname "$f")")"; base="$(basename "$f")"
|
|
117
|
-
if [[ "$dir" =~ ^[0-9]{4}-[0-9]{2}$ && "$base" =~ ^([0-9]{2})- ]]; then
|
|
118
|
-
printf '%s-%s' "$dir" "${BASH_REMATCH[1]}"; return
|
|
36
|
+
if ! [[ "$id" =~ ^[A-Za-z0-9_-]{1,50}$ ]]; then
|
|
37
|
+
echo "usage: artifacts $action <id> (the id in egregore.xyz/view/<org>/<id>)" >&2
|
|
38
|
+
return 1
|
|
119
39
|
fi
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
if [
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
[ -d "$MEM" ] || { echo "(no memory linked)"; return 0; }
|
|
135
|
-
local words=(); while IFS= read -r w; do words+=("$w"); done < <(_words "$query")
|
|
136
|
-
|
|
137
|
-
echo "⌕ artifacts · grep-rank · \"$query\"$(_window_label "$since" "$until")"
|
|
138
|
-
echo
|
|
139
|
-
|
|
140
|
-
# Fast path: ONE grep pass narrows 1000s of files to the handful that match
|
|
141
|
-
# any word — scoring the whole corpus per-word in bash is death by subprocess.
|
|
142
|
-
local pat; pat="$(IFS='|'; printf '%s' "${words[*]}")"
|
|
143
|
-
local -a cands=()
|
|
144
|
-
while IFS= read -r f; do [ -n "$f" ] && cands+=("$f"); done \
|
|
145
|
-
< <(_corpus | tr '\n' '\0' | xargs -0 grep -ilE -- "$pat" 2>/dev/null)
|
|
146
|
-
|
|
147
|
-
# Score only the candidates. A word in the title/topics/filename outweighs a
|
|
148
|
-
# passing body mention (8 vs 1), so the doc that's ABOUT the query beats one
|
|
149
|
-
# that merely name-drops it. Header check is a bash builtin (no subprocess);
|
|
150
|
-
# only fall back to a full-file grep for words not in the header.
|
|
151
|
-
local hdr base score matched w fd
|
|
152
|
-
local -a scored=()
|
|
153
|
-
for f in "${cands[@]}"; do
|
|
154
|
-
fd="$(_file_date "$f")"
|
|
155
|
-
# Temporal window: when set, drop out-of-range (and undated) files.
|
|
156
|
-
if [ -n "$since" ] || [ -n "$until" ]; then
|
|
157
|
-
[ -n "$fd" ] || continue
|
|
158
|
-
[ -n "$since" ] && [[ "$fd" < "$since" ]] && continue
|
|
159
|
-
[ -n "$until" ] && [[ "$fd" > "$until" ]] && continue
|
|
160
|
-
fi
|
|
161
|
-
base="${f##*/}"
|
|
162
|
-
hdr="$(sed -n '1,25p' "$f" 2>/dev/null | grep -iE '^title:|^topics:|^# ' ; printf '%s' "$base")"
|
|
163
|
-
hdr="$(printf '%s' "$hdr" | LC_ALL=C tr '[:upper:]' '[:lower:]')"
|
|
164
|
-
score=0; matched=0
|
|
165
|
-
for w in "${words[@]}"; do
|
|
166
|
-
if [[ "$hdr" == *"$w"* ]]; then
|
|
167
|
-
score=$((score + 8)); matched=$((matched + 1))
|
|
168
|
-
elif grep -qiF -- "$w" "$f" 2>/dev/null; then
|
|
169
|
-
score=$((score + 1)); matched=$((matched + 1))
|
|
170
|
-
fi
|
|
171
|
-
done
|
|
172
|
-
[ "$matched" -gt 0 ] && scored+=("$matched $score ${fd:-0000-00-00} $f")
|
|
173
|
-
done
|
|
174
|
-
|
|
175
|
-
if [ ${#scored[@]} -eq 0 ]; then
|
|
176
|
-
echo " no matches across artifacts / handoffs / knowledge."
|
|
177
|
-
else
|
|
178
|
-
# Rank: words matched, then weighted score, then recency (newest first).
|
|
179
|
-
printf '%s\n' "${scored[@]}" | sort -t" " -k1,1nr -k2,2nr -k3,3r | head -8 | while IFS=" " read -r matched score fd f; do
|
|
180
|
-
local title url rel tag
|
|
181
|
-
title="$(_title "$f")"; url="$(_url "$f")"; rel="$(_rel "$f")"; tag="$(_tag "$f")"
|
|
182
|
-
printf ' ● [%s] %s\n' "$tag" "$title"
|
|
183
|
-
[ -n "$url" ] && printf ' %s\n' "$url"
|
|
184
|
-
printf ' %s (%d/%d matched · %s)\n\n' "$rel" "$matched" "${#words[@]}" "$fd"
|
|
185
|
-
done
|
|
40
|
+
body="$(mktemp)"
|
|
41
|
+
# The key goes in on standard input, never in curl's arguments, which any
|
|
42
|
+
# local process can read.
|
|
43
|
+
status="$(curl -q -s -o "$body" -w '%{http_code}' -X "$method" -H @- \
|
|
44
|
+
"${api_url}/api/artifact-links/${id}/${action}" <<< "Authorization: Bearer ${api_key}")" || status=000
|
|
45
|
+
if [ "$status" != "200" ]; then
|
|
46
|
+
case "$status" in
|
|
47
|
+
404) echo "This organization has no hosted page with the id '$id'." >&2 ;;
|
|
48
|
+
401|403) echo "The API key was refused; run /env to check it." >&2 ;;
|
|
49
|
+
000) echo "Could not reach the Egregore API; check the connection and try again." >&2 ;;
|
|
50
|
+
*) echo "The API answered $status: $(jq -r '.detail // empty' "$body" 2>/dev/null)" >&2 ;;
|
|
51
|
+
esac
|
|
52
|
+
rm -f "$body"
|
|
53
|
+
return 1
|
|
186
54
|
fi
|
|
55
|
+
cat "$body"
|
|
56
|
+
rm -f "$body"
|
|
187
57
|
}
|
|
188
58
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
local query="$1" since="${2:-}" until="${3:-}"
|
|
195
|
-
local words=(); while IFS= read -r w; do words+=("$w"); done < <(_words "$query")
|
|
196
|
-
local words_json; words_json="$(jq -nc '$ARGS.positional' --args "${words[@]}")"
|
|
197
|
-
|
|
198
|
-
# A word in the title outweighs topics outweighs a passing excerpt mention —
|
|
199
|
-
# same weighting as the grep path, but scored server-side over indexed nodes.
|
|
200
|
-
# The temporal window filters on a.created; ties break by recency (newest first).
|
|
201
|
-
local cypher='MATCH (a:Artifact)
|
|
202
|
-
WHERE any(w IN $words WHERE toLower(a.title) CONTAINS w
|
|
203
|
-
OR toLower(coalesce(a.excerpt,"")) CONTAINS w
|
|
204
|
-
OR any(t IN coalesce(a.topics,[]) WHERE toLower(t) CONTAINS w))
|
|
205
|
-
AND ($since = "" OR (a.created IS NOT NULL AND a.created >= datetime($since)))
|
|
206
|
-
AND ($until = "" OR (a.created IS NOT NULL AND a.created <= datetime($until + "T23:59:59")))
|
|
207
|
-
WITH a, reduce(s=0, w IN $words | s
|
|
208
|
-
+ (CASE WHEN toLower(a.title) CONTAINS w THEN 8 ELSE 0 END)
|
|
209
|
-
+ (CASE WHEN any(t IN coalesce(a.topics,[]) WHERE toLower(t) CONTAINS w) THEN 5 ELSE 0 END)
|
|
210
|
-
+ (CASE WHEN toLower(coalesce(a.excerpt,"")) CONTAINS w THEN 1 ELSE 0 END)) AS score
|
|
211
|
-
OPTIONAL MATCH (a)-[:CONTRIBUTED_BY]->(p:Person)
|
|
212
|
-
OPTIONAL MATCH (a)-[:PART_OF]->(q:Quest)
|
|
213
|
-
RETURN a.title AS title, a.url AS url, a.type AS type, score,
|
|
214
|
-
collect(DISTINCT p.name)[0] AS author, collect(DISTINCT q.title)[0] AS quest,
|
|
215
|
-
CASE WHEN a.created IS NOT NULL THEN toString(date(a.created)) ELSE "" END AS created
|
|
216
|
-
ORDER BY score DESC, created DESC LIMIT 8'
|
|
217
|
-
|
|
218
|
-
local resp; resp="$(bash "$SCRIPT_DIR/bin/graph.sh" query "$cypher" "$(jq -n --argjson words "$words_json" --arg since "$since" --arg until "$until" '{words: $words, since: $since, until: $until}')" 2>/dev/null)"
|
|
219
|
-
local nrows; nrows="$(printf '%s' "$resp" | jq -r '(.values // []) | length' 2>/dev/null || echo 0)"
|
|
220
|
-
[ "${nrows:-0}" -gt 0 ] || return 1
|
|
221
|
-
|
|
222
|
-
echo "⌕ artifacts · relationships · \"$query\"$(_window_label "$since" "$until")"
|
|
223
|
-
echo
|
|
224
|
-
# Render each row with jq (null-safe): @tsv + bash read collapses null columns
|
|
225
|
-
# because tab is IFS-whitespace. Cols: 0 title,1 url,2 type,3 score,4 author,5 quest,6 created.
|
|
226
|
-
printf '%s' "$resp" | jq -r '
|
|
227
|
-
.values[] |
|
|
228
|
-
" ● [" + (.[2] // "artifact") + "] " + (.[0] // "(untitled)")
|
|
229
|
-
+ (if (.[1] // "") != "" then "\n " + .[1] else "" end)
|
|
230
|
-
+ "\n graph · score " + (.[3] | tostring)
|
|
231
|
-
+ (if (.[6] // "") != "" then " · " + .[6] else "" end)
|
|
232
|
-
+ (if (.[4] // "") != "" then " · by " + .[4] else "" end)
|
|
233
|
-
+ (if (.[5] // "") != "" then " · " + .[5] else "" end)
|
|
234
|
-
+ "\n"'
|
|
235
|
-
return 0
|
|
59
|
+
cmd_close() {
|
|
60
|
+
local out; out="$(_link_call POST "${1:-}" close)" || return $?
|
|
61
|
+
printf 'Closed: egregore.xyz/view/…/%s now opens a "link closed" notice.\n' "$1"
|
|
62
|
+
jq -r '.note // empty' <<< "$out"
|
|
63
|
+
echo "Reopen with: bash bin/artifacts.sh reopen $1"
|
|
236
64
|
}
|
|
237
65
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
local -a rest=()
|
|
242
|
-
while [ $# -gt 0 ]; do
|
|
243
|
-
case "$1" in
|
|
244
|
-
--since) since="${2:-}"; shift 2 ;;
|
|
245
|
-
--until) until="${2:-}"; shift 2 ;;
|
|
246
|
-
--on) since="${2:-}"; until="${2:-}"; shift 2 ;;
|
|
247
|
-
*) rest+=("$1"); shift ;;
|
|
248
|
-
esac
|
|
249
|
-
done
|
|
250
|
-
local query="${rest[*]}"
|
|
251
|
-
[ -n "$query" ] || { echo "usage: artifacts find [--since D|--until D|--on D] <query>" >&2; exit 1; }
|
|
252
|
-
|
|
253
|
-
# No explicit flags → parse a relative-time expression from the query itself
|
|
254
|
-
# ("… from yesterday", "last week", "on 2026-07-10"), stripping it from the
|
|
255
|
-
# keyword match so it doesn't become dead search noise.
|
|
256
|
-
if [ -z "$since" ] && [ -z "$until" ]; then
|
|
257
|
-
local win cleaned; win="$(_time_window "$query")"
|
|
258
|
-
since="${win%%|*}"; win="${win#*|}"; until="${win%%|*}"; cleaned="${win#*|}"
|
|
259
|
-
cleaned="$(printf '%s' "$cleaned" | sed 's/^ *//; s/ *$//')"
|
|
260
|
-
[ -n "$cleaned" ] && query="$cleaned"
|
|
261
|
-
fi
|
|
262
|
-
|
|
263
|
-
# Paid/connected → graph first (relevance + relationships + created, indexed).
|
|
264
|
-
# If the graph is offline or has no match, fall through to grep, which also
|
|
265
|
-
# covers handoffs/emissaries (Session nodes) and is the whole OSS story.
|
|
266
|
-
# EGREGORE_MODE overrides the egregore.json mode (test/OSS-simulation hook).
|
|
267
|
-
local mode; mode="${EGREGORE_MODE:-$(jq -r '.mode // "connected"' "$SCRIPT_DIR/egregore.json" 2>/dev/null)}"
|
|
268
|
-
if [ "$mode" != "local" ]; then
|
|
269
|
-
_graph_find "$query" "$since" "$until" && return 0
|
|
270
|
-
fi
|
|
271
|
-
_grep_find "$query" "$since" "$until"
|
|
66
|
+
cmd_reopen() {
|
|
67
|
+
_link_call POST "${1:-}" reopen >/dev/null || return $?
|
|
68
|
+
printf 'Reopened: %s has no closing date.\n' "$1"
|
|
272
69
|
}
|
|
273
70
|
|
|
274
|
-
|
|
275
|
-
local
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
71
|
+
cmd_opens() {
|
|
72
|
+
local out; out="$(_link_call GET "${1:-}" opens)" || return $?
|
|
73
|
+
jq -r '
|
|
74
|
+
(if .opens == 0 then "Not opened by anyone yet."
|
|
75
|
+
else "Opened \(.opens) time\(if .opens == 1 then "" else "s" end) by people · first \(.first) · last \(.last) (UTC)" end),
|
|
76
|
+
(if .automated > 0 then "\(.automated) more fetch\(if .automated == 1 then "" else "es" end) by link previews and bots." else empty end),
|
|
77
|
+
(if .complete then empty else "Counts cover the newest 500 opens." end),
|
|
78
|
+
"Counted at most once a minute; opens the edge cache answers (within 5 minutes) go uncounted."
|
|
79
|
+
' <<< "$out"
|
|
282
80
|
}
|
|
283
81
|
|
|
284
82
|
case "${1:-find}" in
|
|
285
|
-
find) shift;
|
|
286
|
-
list) shift;
|
|
287
|
-
|
|
83
|
+
find) shift; _runtime_artifacts find "$@" ;;
|
|
84
|
+
list) shift; _runtime_artifacts list "$@" ;;
|
|
85
|
+
close) shift; cmd_close "$@" ;;
|
|
86
|
+
reopen) shift; cmd_reopen "$@" ;;
|
|
87
|
+
opens) shift; cmd_opens "$@" ;;
|
|
88
|
+
*) _runtime_artifacts find "$@" ;;
|
|
288
89
|
esac
|
|
@@ -36,6 +36,8 @@ if [ -f "$SCRIPT_DIR/.git" ]; then
|
|
|
36
36
|
fi
|
|
37
37
|
|
|
38
38
|
CONFIG="$MAIN_DIR/egregore.json"
|
|
39
|
+
# shellcheck source=bin/lib/config.sh
|
|
40
|
+
source "$MAIN_DIR/bin/lib/config.sh"
|
|
39
41
|
MEMORY_DIR="${EGREGORE_MEMORY_DIR:-$MAIN_DIR/memory}"
|
|
40
42
|
STALE_MIN="${ATTENDANT_STALE_MIN:-12}"
|
|
41
43
|
DRY_RUN="${ATTENDANT_DRY_RUN:-0}"
|
|
@@ -126,7 +128,8 @@ _effective_scope() {
|
|
|
126
128
|
local url key
|
|
127
129
|
url="${EGREGORE_API_URL:-$(grep '^EGREGORE_API_URL=' "$MAIN_DIR/.env" 2>/dev/null | cut -d'=' -f2- || true)}"
|
|
128
130
|
key="${EGREGORE_API_KEY:-$(grep '^EGREGORE_API_KEY=' "$MAIN_DIR/.env" 2>/dev/null | cut -d'=' -f2- || true)}"
|
|
129
|
-
|
|
131
|
+
# A fingerprint only: a refused address counts as none, quietly.
|
|
132
|
+
url="$(_hosted_api_url "${url:-$(jq -r '.api_url // empty' "$CONFIG" 2>/dev/null)}" 2>/dev/null)" || url=""
|
|
130
133
|
echo -n "${url}|${key}" | cksum | cut -d' ' -f1
|
|
131
134
|
}
|
|
132
135
|
|