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
|
@@ -5,19 +5,24 @@ from __future__ import annotations
|
|
|
5
5
|
from dataclasses import dataclass, field
|
|
6
6
|
from datetime import UTC, datetime, timedelta
|
|
7
7
|
import hashlib
|
|
8
|
+
import importlib.util
|
|
9
|
+
from functools import lru_cache
|
|
8
10
|
import json
|
|
9
11
|
from pathlib import Path
|
|
10
12
|
import re
|
|
13
|
+
import sys
|
|
11
14
|
from typing import Any, Iterable, Mapping
|
|
12
15
|
|
|
13
16
|
from .artifacts import artifact_id_from_path, split_frontmatter
|
|
14
|
-
from .contracts import ActorContext, Permission
|
|
17
|
+
from .contracts import ActorContext, Permission, PolicyDecision
|
|
18
|
+
from .line_ids import unmarked
|
|
15
19
|
from .identity import actor_presentation_name
|
|
16
|
-
from .policy import
|
|
20
|
+
from .policy import check, is_admin
|
|
21
|
+
from .record_subject import classify_record, record_subject
|
|
17
22
|
from .questions import actor_aliases
|
|
18
|
-
from .quests import
|
|
23
|
+
from .quests import parse_quest_markdown
|
|
19
24
|
from .runtime import EgregoreRuntime
|
|
20
|
-
from .todos import CanonicalTodoService
|
|
25
|
+
from .todos import CanonicalTodoService, parse_todo_markdown
|
|
21
26
|
|
|
22
27
|
|
|
23
28
|
STATUS_SCHEMA_VERSION = "egregore-status-snapshot/v1"
|
|
@@ -29,6 +34,29 @@ MAX_HANDOFF_RESULTS = 30
|
|
|
29
34
|
MAX_QUESTION_RESULTS = 20
|
|
30
35
|
|
|
31
36
|
|
|
37
|
+
@lru_cache(maxsize=1)
|
|
38
|
+
def _record_controls():
|
|
39
|
+
lib = Path(__file__).resolve().parents[1] / "bin/lib"
|
|
40
|
+
sys.path.insert(0, str(lib))
|
|
41
|
+
spec = importlib.util.spec_from_file_location("egregore_status_records", lib / "session_record.py")
|
|
42
|
+
module = importlib.util.module_from_spec(spec)
|
|
43
|
+
spec.loader.exec_module(module)
|
|
44
|
+
return module
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def _native_control_held(root: Path, control_id: str) -> bool:
|
|
48
|
+
"""Reuse public record controls without importing the private producer.
|
|
49
|
+
|
|
50
|
+
A personal hold can precede the canonical stub after an interrupted write.
|
|
51
|
+
Failure to inspect that control must not reveal the earlier full record.
|
|
52
|
+
"""
|
|
53
|
+
try:
|
|
54
|
+
module = _record_controls()
|
|
55
|
+
return module.native_record_held(module.Context(root), control_id)
|
|
56
|
+
except (OSError, ImportError, ValueError, KeyError, TypeError):
|
|
57
|
+
return True
|
|
58
|
+
|
|
59
|
+
|
|
32
60
|
def _scalar(fields: Mapping[str, Any], *names: str) -> str:
|
|
33
61
|
for name in names:
|
|
34
62
|
value = fields.get(name)
|
|
@@ -120,7 +148,7 @@ def _extract_open_threads(markdown: str) -> list[str]:
|
|
|
120
148
|
return []
|
|
121
149
|
rows = []
|
|
122
150
|
for line in match.group(1).splitlines():
|
|
123
|
-
item = re.match(r"^\s*(?:[-*]|\d+\.)\s+(?:\[[ xX]\]\s*)?(.+)$", line)
|
|
151
|
+
item = re.match(r"^\s*(?:[-*]|\d+\.)\s+(?:\[[ xX]\]\s*)?(.+)$", unmarked(line))
|
|
124
152
|
if item and item.group(1).strip():
|
|
125
153
|
rows.append(item.group(1).strip())
|
|
126
154
|
return rows[:3]
|
|
@@ -147,16 +175,10 @@ class CanonicalStatusSnapshotService:
|
|
|
147
175
|
raise PermissionError("organizational status read denied")
|
|
148
176
|
return decision
|
|
149
177
|
|
|
150
|
-
def _admin_visible(self,
|
|
178
|
+
def _admin_visible(self, decision: PolicyDecision) -> bool:
|
|
151
179
|
"""Egregore-surface admin protection for listings — fails closed."""
|
|
152
180
|
|
|
153
|
-
|
|
154
|
-
if gate is None:
|
|
155
|
-
return True
|
|
156
|
-
try:
|
|
157
|
-
return bool(gate.actor_is_admin(actor))
|
|
158
|
-
except Exception:
|
|
159
|
-
return False
|
|
181
|
+
return is_admin(decision)
|
|
160
182
|
|
|
161
183
|
@staticmethod
|
|
162
184
|
def _fields_admin(fields: Mapping[str, Any]) -> bool:
|
|
@@ -166,7 +188,7 @@ class CanonicalStatusSnapshotService:
|
|
|
166
188
|
self,
|
|
167
189
|
actor: ActorContext,
|
|
168
190
|
*,
|
|
169
|
-
|
|
191
|
+
decision: PolicyDecision,
|
|
170
192
|
cutoff: datetime,
|
|
171
193
|
) -> tuple[list[dict[str, Any]], int]:
|
|
172
194
|
candidates: list[Path] = []
|
|
@@ -176,16 +198,24 @@ class CanonicalStatusSnapshotService:
|
|
|
176
198
|
candidates.extend(base.rglob("*.md"))
|
|
177
199
|
candidates = [path for path in candidates if not path.name.startswith("index")]
|
|
178
200
|
candidates.sort(key=lambda path: path.as_posix(), reverse=True)
|
|
179
|
-
|
|
180
|
-
admin_visible = self._admin_visible(actor)
|
|
201
|
+
admin_visible = self._admin_visible(decision)
|
|
181
202
|
rows: list[dict[str, Any]] = []
|
|
182
|
-
|
|
203
|
+
visible_sources = 0
|
|
204
|
+
for path in candidates:
|
|
183
205
|
relative = path.relative_to(self.memory_root).as_posix()
|
|
184
206
|
canonical = f"memory/{relative}"
|
|
185
|
-
|
|
207
|
+
verdict = check(decision, canonical, root=self.memory_root)
|
|
208
|
+
if not verdict.allowed and not verdict.reason.startswith("held:"):
|
|
186
209
|
continue
|
|
210
|
+
# Unreadable paths cannot consume the visible-content budget and
|
|
211
|
+
# displace authorized records merely by sorting ahead of them.
|
|
212
|
+
if visible_sources >= MAX_SESSION_SOURCES:
|
|
213
|
+
break
|
|
214
|
+
visible_sources += 1
|
|
187
215
|
try:
|
|
188
|
-
|
|
216
|
+
# Held rows may need legacy body dates; only the masked row is emitted.
|
|
217
|
+
source = verdict.resolved if verdict.allowed else path.resolve()
|
|
218
|
+
markdown = source.read_text(encoding="utf-8")
|
|
189
219
|
fields, _ = split_frontmatter(markdown)
|
|
190
220
|
except (OSError, ValueError):
|
|
191
221
|
continue
|
|
@@ -205,7 +235,10 @@ class CanonicalStatusSnapshotService:
|
|
|
205
235
|
kind = relative.split("/", 1)[0]
|
|
206
236
|
if not status:
|
|
207
237
|
status = "wrapped" if kind == "wraps" else "handed_off" if kind == "handoffs" else "active"
|
|
208
|
-
|
|
238
|
+
subject = classify_record(fields, markdown)
|
|
239
|
+
projection = record_subject(fields, markdown) if subject != "human-session" else None
|
|
240
|
+
control_held = subject != "human-session" and _native_control_held(self.root, str(fields.get("session", "")))
|
|
241
|
+
if verdict.reason.startswith("held:") or (not admin_visible and self._fields_admin(fields)) or control_held or projection and projection.get("held"):
|
|
209
242
|
# Tag-not-hide: existence stays visible, identity does not.
|
|
210
243
|
rows.append(
|
|
211
244
|
{
|
|
@@ -216,12 +249,19 @@ class CanonicalStatusSnapshotService:
|
|
|
216
249
|
"author": "[admin]",
|
|
217
250
|
"by": "[admin]",
|
|
218
251
|
"status": "[admin]",
|
|
219
|
-
"type": kind,
|
|
252
|
+
"type": kind if subject == "human-session" else "held-record",
|
|
220
253
|
"filePath": "[admin]",
|
|
221
254
|
"openThreads": [],
|
|
222
255
|
}
|
|
223
256
|
)
|
|
224
257
|
continue
|
|
258
|
+
if subject != "human-session":
|
|
259
|
+
if subject == "unsupported-native":
|
|
260
|
+
rows.append({"subject_kind": subject, "date": occurred.isoformat().replace("+00:00", "Z")})
|
|
261
|
+
else:
|
|
262
|
+
rows.append({**projection, "date": occurred.isoformat().replace("+00:00", "Z"),
|
|
263
|
+
"id": projection["control_id"], "type": "spirit-record", "filePath": canonical})
|
|
264
|
+
continue
|
|
225
265
|
rows.append(
|
|
226
266
|
{
|
|
227
267
|
"id": _scalar(fields, "id", "session_id") or path.stem,
|
|
@@ -237,19 +277,24 @@ class CanonicalStatusSnapshotService:
|
|
|
237
277
|
}
|
|
238
278
|
)
|
|
239
279
|
rows.sort(key=lambda row: row["date"], reverse=True)
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
)
|
|
280
|
+
# Only expose sources represented by authorized (possibly masked) rows.
|
|
281
|
+
# The pre-authorization inventory size would disclose unreadable records.
|
|
282
|
+
return rows, len(rows)
|
|
283
|
+
|
|
284
|
+
def _quests(self, actor: ActorContext, decision: PolicyDecision) -> list[dict[str, Any]]:
|
|
285
|
+
rows, quests = [], []
|
|
286
|
+
for path in sorted((self.memory_root / "quests").glob("*.md")):
|
|
287
|
+
if path.name in {"_template.md", "index.md"}:
|
|
288
|
+
continue
|
|
289
|
+
verdict = check(decision, f"memory/quests/{path.name}", root=self.memory_root)
|
|
290
|
+
if not verdict.allowed and not verdict.reason.startswith("held:"):
|
|
291
|
+
continue
|
|
292
|
+
source = verdict.resolved if verdict.allowed else path.resolve()
|
|
293
|
+
quest = parse_quest_markdown(source.read_text(encoding="utf-8"), slug=path.stem, org_id=actor.profile.org_id)
|
|
294
|
+
if quest.status != "completed":
|
|
295
|
+
quests.append((quest.priority, quest.started, quest if verdict.allowed else None))
|
|
296
|
+
for _, _, quest in sorted(quests, key=lambda row: row[:2], reverse=True)[:MAX_QUEST_RESULTS]:
|
|
297
|
+
if quest is None:
|
|
253
298
|
rows.append(
|
|
254
299
|
{
|
|
255
300
|
"quest": "[admin]",
|
|
@@ -280,7 +325,7 @@ class CanonicalStatusSnapshotService:
|
|
|
280
325
|
return rows
|
|
281
326
|
|
|
282
327
|
def _todos(
|
|
283
|
-
self, actor: ActorContext,
|
|
328
|
+
self, actor: ActorContext, decision: PolicyDecision
|
|
284
329
|
) -> list[dict[str, Any]]:
|
|
285
330
|
aliases = [actor.actor.display_name, *actor.actor.aliases.values()]
|
|
286
331
|
person = next((str(value) for value in aliases if str(value).strip()), actor.actor.actor_id)
|
|
@@ -288,9 +333,10 @@ class CanonicalStatusSnapshotService:
|
|
|
288
333
|
memory_root=self.memory_root,
|
|
289
334
|
write_document=self.runtime.write_document,
|
|
290
335
|
)
|
|
291
|
-
|
|
336
|
+
verdict = check(decision, service.canonical_path(person), root=self.memory_root)
|
|
337
|
+
if not verdict.allowed or not verdict.resolved.exists():
|
|
292
338
|
return []
|
|
293
|
-
snapshot =
|
|
339
|
+
snapshot = parse_todo_markdown(verdict.resolved.read_text(encoding="utf-8"), person=person)
|
|
294
340
|
return [dict(row) for row in snapshot.todos if row.get("status") in {"open", "blocked", "deferred"}]
|
|
295
341
|
|
|
296
342
|
def _questions(self, actor: ActorContext, limit: int) -> list[dict[str, Any]]:
|
|
@@ -305,15 +351,16 @@ class CanonicalStatusSnapshotService:
|
|
|
305
351
|
for path in sorted(directory.glob("*.md"), reverse=True):
|
|
306
352
|
relative = path.relative_to(self.memory_root).as_posix()
|
|
307
353
|
canonical = f"memory/{relative}"
|
|
308
|
-
|
|
354
|
+
verdict = check(decision, canonical, root=self.memory_root)
|
|
355
|
+
if not verdict.allowed:
|
|
309
356
|
continue
|
|
310
357
|
try:
|
|
311
|
-
fields, _ = split_frontmatter(
|
|
358
|
+
fields, _ = split_frontmatter(verdict.resolved.read_text(encoding="utf-8"))
|
|
312
359
|
except (OSError, ValueError):
|
|
313
360
|
continue
|
|
314
361
|
if str(fields.get("status") or "pending") != "pending":
|
|
315
362
|
continue
|
|
316
|
-
if not self._admin_visible(
|
|
363
|
+
if not self._admin_visible(decision) and self._fields_admin(fields):
|
|
317
364
|
continue
|
|
318
365
|
recipient_actor = str(fields.get("to_actor_id") or "").strip()
|
|
319
366
|
recipient_alias = str(fields.get("to") or fields.get("addressed_to") or "").strip().removeprefix("@").casefold()
|
|
@@ -341,11 +388,15 @@ class CanonicalStatusSnapshotService:
|
|
|
341
388
|
decision = self._decision(actor)
|
|
342
389
|
days = {"P1D": 1, "P7D": 7, "P30D": 30, "P365D": 365}.get(time_range, 7)
|
|
343
390
|
now = self.clock().astimezone(UTC)
|
|
344
|
-
|
|
391
|
+
rows, source_count = self._session_rows(
|
|
345
392
|
actor,
|
|
346
|
-
|
|
393
|
+
decision=decision,
|
|
347
394
|
cutoff=now - timedelta(days=days),
|
|
348
395
|
)
|
|
396
|
+
sessions = [row for row in rows if "subject_kind" not in row and row.get("type") != "held-record"][:MAX_SESSION_RESULTS]
|
|
397
|
+
spirits = [row for row in rows if row.get("subject_kind") == "durable-intent"][:MAX_SESSION_RESULTS]
|
|
398
|
+
held_records = [row for row in rows if row.get("type") == "held-record"][:MAX_SESSION_RESULTS]
|
|
399
|
+
unsupported = sum(row.get("subject_kind") == "unsupported-native" for row in rows)
|
|
349
400
|
aliases = _actor_aliases(actor)
|
|
350
401
|
mine = [row for row in sessions if row["author"].casefold() in aliases]
|
|
351
402
|
team = [row for row in sessions if row["author"] and row["author"].casefold() not in aliases]
|
|
@@ -354,8 +405,8 @@ class CanonicalStatusSnapshotService:
|
|
|
354
405
|
handoffs = [_handoff_row(actor, row) for row in plan.records][:MAX_HANDOFF_RESULTS]
|
|
355
406
|
active_handoffs = [row for row in handoffs if row["status"] in {"pending", "read", "claimed"}]
|
|
356
407
|
questions = self._questions(actor, MAX_QUESTION_RESULTS)
|
|
357
|
-
quests = self._quests(actor, decision
|
|
358
|
-
todos = self._todos(actor, decision
|
|
408
|
+
quests = self._quests(actor, decision)
|
|
409
|
+
todos = self._todos(actor, decision)
|
|
359
410
|
open_threads = [
|
|
360
411
|
{"id": row["id"], "date": row["date"], "topic": row["topic"], "threads": row["openThreads"]}
|
|
361
412
|
for row in mine
|
|
@@ -379,6 +430,12 @@ class CanonicalStatusSnapshotService:
|
|
|
379
430
|
"sessions": sessions,
|
|
380
431
|
"my_sessions": mine,
|
|
381
432
|
"team_sessions": team,
|
|
433
|
+
"spirit_records": spirits,
|
|
434
|
+
"my_spirit_records": [row for row in spirits if row["record_owner_actor_id"] == actor.actor.actor_id],
|
|
435
|
+
"spirit_intents": len(spirits),
|
|
436
|
+
"unsupported_native_records": unsupported,
|
|
437
|
+
"held_records": held_records,
|
|
438
|
+
"spirit_coverage": "bounded",
|
|
382
439
|
"handoffs_to_me": handoffs,
|
|
383
440
|
"handoffs": active_handoffs,
|
|
384
441
|
"pending_questions": questions,
|
|
@@ -10,9 +10,11 @@ from pathlib import Path
|
|
|
10
10
|
import subprocess
|
|
11
11
|
from urllib.error import HTTPError, URLError
|
|
12
12
|
from urllib.parse import urlencode
|
|
13
|
-
from urllib.request import
|
|
13
|
+
from urllib.request import urlopen
|
|
14
14
|
|
|
15
15
|
from .contracts import Capability, Permission
|
|
16
|
+
from . import held
|
|
17
|
+
from .hosted_api import RefusedApiAddress, credential_request, hosted_api_url
|
|
16
18
|
from .runtime import local_runtime
|
|
17
19
|
from .status import CanonicalStatusSnapshotService
|
|
18
20
|
|
|
@@ -38,7 +40,10 @@ def _connected_enrichment(root, config, runtime, actor, surface, time_range):
|
|
|
38
40
|
decision = runtime.authorize(actor, Permission.READ, ("projection:status",))
|
|
39
41
|
if not decision.allowed:
|
|
40
42
|
return {"status": "unavailable", "reason": "authorization_denied"}
|
|
41
|
-
|
|
43
|
+
try:
|
|
44
|
+
api_url = hosted_api_url(config.get("api_url") or "")
|
|
45
|
+
except RefusedApiAddress:
|
|
46
|
+
return {"status": "unavailable", "reason": "refused_address"}
|
|
42
47
|
api_key = os.environ.get("EGREGORE_API_KEY", "")
|
|
43
48
|
if not api_key:
|
|
44
49
|
try:
|
|
@@ -58,7 +63,8 @@ def _connected_enrichment(root, config, runtime, actor, surface, time_range):
|
|
|
58
63
|
query = {"github_username": username}
|
|
59
64
|
if surface == "dashboard":
|
|
60
65
|
query.update({"time_range": time_range, "session_id": actor.session_id})
|
|
61
|
-
|
|
66
|
+
# The key never follows a redirect off the control plane.
|
|
67
|
+
request = credential_request(
|
|
62
68
|
f"{api_url}{endpoint}?{urlencode(query)}",
|
|
63
69
|
headers={"Authorization": f"Bearer {api_key}"},
|
|
64
70
|
)
|
|
@@ -89,6 +95,8 @@ def main() -> int:
|
|
|
89
95
|
payload = CanonicalStatusSnapshotService(runtime, root).build(actor, time_range=args.time_range)
|
|
90
96
|
if args.surface == "dashboard":
|
|
91
97
|
payload["sessions"] = payload["my_sessions"]
|
|
98
|
+
payload["spirit_records"] = payload["my_spirit_records"]
|
|
99
|
+
payload["spirit_intents"] = len(payload["spirit_records"])
|
|
92
100
|
branch = subprocess.run(
|
|
93
101
|
["git", "-C", str(root), "branch", "--show-current"],
|
|
94
102
|
capture_output=True,
|
|
@@ -166,8 +174,8 @@ def main() -> int:
|
|
|
166
174
|
payload["connected_enrichment"] = enrichment
|
|
167
175
|
payload["graph_status"] = enrichment["status"]
|
|
168
176
|
payload["graph_reason"] = enrichment.get("reason")
|
|
169
|
-
|
|
170
|
-
|
|
177
|
+
return held.emit_for(runtime, actor, payload, render=lambda shown: json.dumps(shown, ensure_ascii=False,
|
|
178
|
+
separators=(",", ":")))
|
|
171
179
|
|
|
172
180
|
|
|
173
181
|
if __name__ == "__main__":
|
|
@@ -4,6 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
6
|
import subprocess
|
|
7
|
+
import sys
|
|
7
8
|
import time
|
|
8
9
|
from pathlib import Path
|
|
9
10
|
from typing import Sequence
|
|
@@ -59,9 +60,13 @@ class LocalGitSyncTransport:
|
|
|
59
60
|
locally-ahead history is reconciled on the next pull.
|
|
60
61
|
"""
|
|
61
62
|
|
|
62
|
-
def __init__(self, repository: Path, *, push_remote: bool = True
|
|
63
|
+
def __init__(self, repository: Path, *, push_remote: bool = True,
|
|
64
|
+
allow_local_transport: bool = False) -> None:
|
|
63
65
|
self.repository = repository.resolve()
|
|
64
66
|
self.push_remote = push_remote
|
|
67
|
+
# Explicit host option for disposable local-remote fixtures. All history
|
|
68
|
+
# and destination checks still run; no environment variable enables it.
|
|
69
|
+
self.allow_local_transport = allow_local_transport
|
|
65
70
|
self.async_remote_push = os.environ.get("EGREGORE_ASYNC_REMOTE_PUSH") == "1"
|
|
66
71
|
self._lock_warnings: list[str] = []
|
|
67
72
|
|
|
@@ -238,26 +243,25 @@ class LocalGitSyncTransport:
|
|
|
238
243
|
return completed.stdout.strip() if completed.returncode == 0 else None
|
|
239
244
|
|
|
240
245
|
def _push_remote_background(self) -> str | None:
|
|
241
|
-
environment =
|
|
246
|
+
environment = {key: value for key, value in os.environ.items() if not key.startswith("GIT_")}
|
|
242
247
|
environment["GIT_TERMINAL_PROMPT"] = "0"
|
|
248
|
+
module_root = Path(__file__).resolve().parents[1]
|
|
249
|
+
environment["PYTHONPATH"] = str(module_root)
|
|
250
|
+
branch = self._required("branch", "--show-current")
|
|
251
|
+
if not branch:
|
|
252
|
+
return "memory saved locally; publication requires a named branch"
|
|
253
|
+
command = [sys.executable, "-m", "egregore_runtime.memory_push",
|
|
254
|
+
"--repository", str(self.repository), "--branch", branch]
|
|
255
|
+
if self.allow_local_transport:
|
|
256
|
+
command.append("--allow-local-transport")
|
|
243
257
|
try:
|
|
244
258
|
subprocess.Popen(
|
|
245
|
-
|
|
246
|
-
"git",
|
|
247
|
-
"-c",
|
|
248
|
-
"http.lowSpeedLimit=1",
|
|
249
|
-
"-c",
|
|
250
|
-
"http.lowSpeedTime=15",
|
|
251
|
-
"-C",
|
|
252
|
-
str(self.repository),
|
|
253
|
-
"push",
|
|
254
|
-
"origin",
|
|
255
|
-
"HEAD",
|
|
256
|
-
),
|
|
259
|
+
command,
|
|
257
260
|
stdin=subprocess.DEVNULL,
|
|
258
261
|
stdout=subprocess.DEVNULL,
|
|
259
262
|
stderr=subprocess.DEVNULL,
|
|
260
263
|
env=environment,
|
|
264
|
+
cwd=module_root,
|
|
261
265
|
start_new_session=True,
|
|
262
266
|
)
|
|
263
267
|
except OSError as exc:
|
|
@@ -440,16 +444,20 @@ class LocalGitSyncTransport:
|
|
|
440
444
|
autostashed rebase and retried — the exact manual recovery this
|
|
441
445
|
failure class always needed — before anything is reported as failed.
|
|
442
446
|
"""
|
|
447
|
+
from .memory_push import push_memory
|
|
443
448
|
detail = ""
|
|
444
449
|
for attempt in range(attempts):
|
|
445
|
-
pushed = self._run("push", "origin", "HEAD", timeout=180)
|
|
446
|
-
if pushed.returncode == 0:
|
|
447
|
-
return []
|
|
448
|
-
detail = (pushed.stderr or pushed.stdout).strip()
|
|
449
|
-
if attempt == attempts - 1:
|
|
450
|
-
break
|
|
451
450
|
branch = self._required("branch", "--show-current")
|
|
452
451
|
if not branch:
|
|
452
|
+
return ["memory saved locally; publication requires a named branch"]
|
|
453
|
+
receipt = push_memory(self.repository, branch=branch,
|
|
454
|
+
allow_local_transport=self.allow_local_transport)
|
|
455
|
+
if receipt.get("status") in {"pushed", "already-current"}:
|
|
456
|
+
return []
|
|
457
|
+
detail = str(receipt.get("cause", "guard_unavailable"))
|
|
458
|
+
if not receipt.get("retry_safe"):
|
|
459
|
+
return [f"memory saved locally; guarded publication pending: {detail}"]
|
|
460
|
+
if attempt == attempts - 1:
|
|
453
461
|
break
|
|
454
462
|
if self._run("fetch", "origin", branch, timeout=180).returncode != 0:
|
|
455
463
|
break
|
|
@@ -472,7 +480,17 @@ class LocalGitSyncTransport:
|
|
|
472
480
|
staged = self._run("diff", "--cached", "--quiet", "--", *selected, literal_pathspecs=True)
|
|
473
481
|
if staged.returncode not in (0, 1):
|
|
474
482
|
raise GitSyncError((staged.stderr or staged.stdout).strip() or "git diff failed")
|
|
475
|
-
|
|
483
|
+
named = tuple(getattr(message, "trailers", ()))
|
|
484
|
+
if staged.returncode == 1 and named:
|
|
485
|
+
# A message with its own trailers (a CommitMessage): its text as given, then one trailer
|
|
486
|
+
# paragraph, its trailers first and the provenance ones it does not name after them.
|
|
487
|
+
keys = {trailer.split(":", 1)[0].strip().casefold() for trailer in named}
|
|
488
|
+
trailers = [*named, *(trailer for trailer in self._provenance_trailers()
|
|
489
|
+
if trailer.split(":", 1)[0].strip().casefold() not in keys)]
|
|
490
|
+
arguments = ["commit", "--only", "--cleanup=whitespace", "-m", str(message), "-m", "\n".join(trailers),
|
|
491
|
+
"--", *selected]
|
|
492
|
+
self._required(*arguments, literal_pathspecs=True)
|
|
493
|
+
elif staged.returncode == 1:
|
|
476
494
|
arguments = [
|
|
477
495
|
"commit",
|
|
478
496
|
"--only",
|