create-egregore 0.21.0-runtime-mvp.28 → 0.21.1
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 +170 -80
- package/lib/api.js +2 -2
- package/lib/claude-runtime.js +25 -46
- package/lib/codex-runtime.js +6 -1
- package/lib/local.js +37 -95
- package/lib/pi-runtime.js +6 -1
- package/lib/prime-runtime.js +6 -1
- package/lib/runtime-git-excludes.js +95 -0
- package/lib/setup.js +86 -63
- package/lib/ui.js +91 -64
- package/package.json +3 -3
- package/runtime/claude/.claude/context/retrieval-investigation.md +7 -0
- package/runtime/claude/.claude/context/telemetry.md +2 -1
- package/runtime/claude/.claude/hooks/retrieval-context.sh +1 -1
- package/runtime/claude/.claude/hooks/search-hint.sh +11 -0
- package/runtime/claude/.claude/rules/voice-bedrock.md +9 -0
- package/runtime/claude/.claude/settings.json +9 -0
- package/runtime/claude/.claude/skills/announce/SKILL.md +33 -12
- package/runtime/claude/.claude/skills/archive/SKILL.md +7 -6
- package/runtime/claude/.claude/skills/branch/SKILL.md +16 -13
- package/runtime/claude/.claude/skills/checkup/SKILL.md +8 -11
- package/runtime/claude/.claude/skills/contribute/SKILL.md +108 -62
- package/runtime/claude/.claude/skills/create-skill/SKILL.md +14 -5
- package/runtime/claude/.claude/skills/dashboard/SKILL.md +3 -3
- package/runtime/claude/.claude/skills/deep-reflect/REPORT.md +6 -6
- package/runtime/claude/.claude/skills/deep-reflect/ROLES.md +2 -2
- package/runtime/claude/.claude/skills/deep-reflect/SKILL.md +26 -15
- package/runtime/claude/.claude/skills/delete-user/SKILL.md +39 -44
- package/runtime/claude/.claude/skills/emissary/SKILL.md +36 -26
- package/runtime/claude/.claude/skills/env/SKILL.md +161 -0
- package/runtime/claude/.claude/skills/handoff/SKILL.md +16 -6
- package/runtime/claude/.claude/skills/harvest/AUDIT.md +4 -4
- package/runtime/claude/.claude/skills/harvest/PROCESS.md +7 -6
- package/runtime/claude/.claude/skills/harvest/SKILL.md +8 -6
- package/runtime/claude/.claude/skills/ingest/SKILL.md +25 -11
- package/runtime/claude/.claude/skills/ingest-corpus/SKILL.md +9 -7
- package/runtime/claude/.claude/skills/ingest-user-interview/SKILL.md +6 -3
- package/runtime/claude/.claude/skills/invite/SKILL.md +36 -5
- package/runtime/claude/.claude/skills/issue/SKILL.md +179 -27
- package/runtime/claude/.claude/skills/me/SKILL.md +2 -2
- package/runtime/claude/.claude/skills/meeting/SKILL.md +16 -4
- package/runtime/claude/.claude/skills/note/SKILL.md +6 -4
- package/runtime/claude/.claude/skills/notion-connect/SKILL.md +2 -2
- package/runtime/claude/.claude/skills/onboarding/SKILL.md +23 -5
- package/runtime/claude/.claude/skills/reflect/SKILL.md +9 -7
- package/runtime/claude/.claude/skills/review-pr/SKILL.md +27 -18
- package/runtime/claude/.claude/skills/save/SKILL.md +36 -6
- package/runtime/claude/.claude/skills/slack-connect/SKILL.md +63 -16
- package/runtime/claude/.claude/skills/summon/SKILL.md +44 -44
- package/runtime/claude/.claude/skills/sync-repos/SKILL.md +37 -14
- package/runtime/claude/.claude/skills/teams-connect/SKILL.md +82 -28
- package/runtime/claude/.claude/skills/telegram-connect/SKILL.md +20 -3
- package/runtime/claude/.claude/skills/telemetry/SKILL.md +3 -1
- package/runtime/claude/.claude/skills/test/SKILL.md +1 -1
- package/runtime/claude/.claude/skills/tui-design/SKILL.md +4 -4
- package/runtime/claude/.claude/skills/tutorial/SKILL.md +6 -5
- package/runtime/claude/.claude/skills/update/SKILL.md +115 -67
- package/runtime/claude/.claude/skills/view/SKILL.md +16 -9
- package/runtime/claude/.claude/skills/visual-explain/SKILL.md +1 -1
- package/runtime/claude/.claude/skills/wrap/SKILL.md +11 -6
- package/runtime/claude/CLAUDE.md +27 -15
- package/runtime/claude/bin/activity-action.sh +1 -1
- package/runtime/claude/bin/activity-data.sh +1 -1
- package/runtime/claude/bin/agent.sh +78 -27
- package/runtime/claude/bin/api-call.sh +181 -0
- package/runtime/claude/bin/artifact-register.sh +62 -6
- package/runtime/claude/bin/artifact-writeback.sh +28 -3
- package/runtime/claude/bin/artifacts.sh +1 -1
- package/runtime/claude/bin/attendant.sh +1 -1
- package/runtime/claude/bin/codex-render-spec.mjs +14 -10
- package/runtime/claude/bin/codex-session-start.sh +7 -1
- package/runtime/claude/bin/codex-skill-render.mjs +15 -6
- package/runtime/claude/bin/codex-sync-skills.sh +6 -2
- package/runtime/claude/bin/config-get.sh +65 -0
- package/runtime/claude/bin/contribute-guard.sh +70 -0
- package/runtime/claude/bin/dashboard-data.sh +1 -1
- package/runtime/claude/bin/gh-run.sh +25 -0
- package/runtime/claude/bin/graph-op.sh +230 -3
- package/runtime/claude/bin/graph-projection.sh +1 -1
- package/runtime/claude/bin/graph-wal.sh +2 -2
- package/runtime/claude/bin/graph.sh +1 -1
- package/runtime/claude/bin/handoff-lifecycle.sh +2 -2
- package/runtime/claude/bin/handoff-preview.sh +7 -3
- package/runtime/claude/bin/handoff-run.sh +1 -1
- package/runtime/claude/bin/hosting-ops.sh +248 -0
- package/runtime/claude/bin/index-handoff.sh +3 -3
- package/runtime/claude/bin/ingest-item.sh +1 -1
- package/runtime/claude/bin/ingest.sh +3 -3
- package/runtime/claude/bin/invite.sh +1 -0
- package/runtime/claude/bin/issue.sh +1 -1
- package/runtime/claude/bin/knowledge.sh +1 -1
- package/runtime/claude/bin/lib/config.sh +4 -8
- package/runtime/claude/bin/lib/dashboard-artifact.sh +1 -1
- package/runtime/claude/bin/lib/framework-update.sh +41 -0
- package/runtime/claude/bin/lib/git-sync.sh +18 -11
- package/runtime/claude/bin/lib/greeting.sh +4 -1
- package/runtime/claude/bin/lib/health-footer.sh +1 -1
- package/runtime/claude/bin/lib/hosted-ref-id.sh +108 -0
- package/runtime/claude/bin/lib/runtime-owned.sh +52 -16
- package/runtime/claude/bin/lib/scratch.sh +26 -0
- package/runtime/claude/bin/lib/secret_entry.py +1013 -0
- package/runtime/claude/bin/notification.sh +1 -1
- package/runtime/claude/bin/notify.sh +134 -14
- package/runtime/claude/bin/observe-context.sh +1 -1
- package/runtime/claude/bin/onboarding.sh +1 -0
- package/runtime/claude/bin/person.sh +9 -4
- package/runtime/claude/bin/prose-rules/harness-tool-names.md +36 -0
- package/runtime/claude/bin/publish-artifact.sh +52 -4
- package/runtime/claude/bin/publish-references.sh +27 -8
- package/runtime/claude/bin/qa-gate.sh +205 -0
- package/runtime/claude/bin/quest.sh +1 -1
- package/runtime/claude/bin/question.sh +1 -1
- package/runtime/claude/bin/research-ingest.sh +1 -1
- package/runtime/claude/bin/runtime-identity.sh +3 -3
- package/runtime/claude/bin/runtime-upgrade.sh +5 -3
- package/runtime/claude/bin/scratch-sweep.sh +29 -0
- package/runtime/claude/bin/scroll.sh +1 -1
- package/runtime/claude/bin/search.sh +7 -7
- package/runtime/claude/bin/secret-entry.py +6 -0
- package/runtime/claude/bin/session-autosave.sh +1 -1
- package/runtime/claude/bin/session-log.sh +7 -2
- package/runtime/claude/bin/session-start.sh +3 -1
- package/runtime/claude/bin/settings.sh +1 -1
- package/runtime/claude/bin/test-baseline.sh +188 -44
- package/runtime/claude/bin/thread.sh +1 -1
- package/runtime/claude/bin/todo.sh +1 -1
- package/runtime/claude/bin/update-framework.sh +24 -0
- package/runtime/claude/bin/view-render.sh +21 -1
- package/runtime/claude/bin/worktree.sh +1 -1
- package/runtime/claude/docs/credential-entry.md +286 -0
- package/runtime/claude/egregore_runtime/artifacts.py +122 -19
- package/runtime/claude/egregore_runtime/contracts.py +18 -0
- package/runtime/claude/egregore_runtime/github_issues.py +89 -1
- package/runtime/claude/egregore_runtime/graph.py +15 -6
- package/runtime/claude/egregore_runtime/harness_cli.py +82 -12
- package/runtime/claude/egregore_runtime/identity.py +108 -8
- package/runtime/claude/egregore_runtime/identity_transfer.py +320 -0
- package/runtime/claude/egregore_runtime/ingest_cli.py +4 -6
- package/runtime/claude/egregore_runtime/investigation_guidance.py +8 -1
- package/runtime/claude/egregore_runtime/issue_cli.py +32 -1
- package/runtime/claude/egregore_runtime/issue_duplicates.py +116 -0
- package/runtime/claude/egregore_runtime/issue_readiness.py +231 -0
- package/runtime/claude/egregore_runtime/issue_triage.py +331 -0
- package/runtime/claude/egregore_runtime/issue_triage_service.py +124 -0
- package/runtime/claude/egregore_runtime/knowledge_cli.py +4 -3
- package/runtime/claude/egregore_runtime/notification_cli.py +66 -8
- package/runtime/claude/egregore_runtime/questions.py +1 -0
- package/runtime/claude/egregore_runtime/research_ingest_cli.py +4 -4
- package/runtime/claude/egregore_runtime/runtime.py +23 -2
- package/runtime/claude/egregore_runtime/scratch.py +294 -0
- package/runtime/claude/egregore_runtime/scroll_cli.py +7 -7
- package/runtime/claude/egregore_runtime/sync.py +21 -6
- package/runtime/claude/egregore_runtime/thread_cli.py +4 -4
- package/runtime/claude/egregore_runtime/threads.py +1 -0
- package/runtime/claude/egregore_runtime/upgrade.py +771 -34
- package/runtime/claude/egregore_runtime/writeback.py +146 -8
- package/runtime/claude/egregore_runtime/writeback_cli.py +89 -17
- package/runtime/claude/manifest.json +24 -1
- package/runtime/codex/.claude/context/retrieval-investigation.md +7 -0
- package/runtime/codex/.codex/config.toml +1 -2
- package/runtime/codex/.codex/skills/activity/SKILL.md +45 -39
- package/runtime/codex/.codex/skills/announce/SKILL.md +25 -47
- package/runtime/codex/.codex/skills/archive/SKILL.md +45 -33
- package/runtime/codex/.codex/skills/branch/SKILL.md +2 -2
- package/runtime/codex/.codex/skills/checkup/SKILL.md +39 -83
- package/runtime/codex/.codex/skills/commit/SKILL.md +2 -2
- package/runtime/codex/.codex/skills/contribute/SKILL.md +2 -2
- package/runtime/codex/.codex/skills/create-skill/SKILL.md +2 -2
- package/runtime/codex/.codex/skills/dark-mode/SKILL.md +2 -2
- package/runtime/codex/.codex/skills/dashboard/SKILL.md +45 -29
- package/runtime/codex/.codex/skills/deep-reflect/SKILL.md +45 -113
- package/runtime/codex/.codex/skills/delete-user/SKILL.md +2 -2
- package/runtime/codex/.codex/skills/emissary/SKILL.md +6 -2
- package/runtime/codex/.codex/skills/env/SKILL.md +29 -0
- package/runtime/codex/.codex/skills/handoff/SKILL.md +45 -131
- package/runtime/codex/.codex/skills/harvest/SKILL.md +45 -50
- package/runtime/codex/.codex/skills/ingest/SKILL.md +25 -51
- package/runtime/codex/.codex/skills/ingest-corpus/SKILL.md +2 -2
- package/runtime/codex/.codex/skills/ingest-notion/SKILL.md +2 -2
- package/runtime/codex/.codex/skills/ingest-user-interview/SKILL.md +45 -30
- package/runtime/codex/.codex/skills/invite/SKILL.md +25 -33
- package/runtime/codex/.codex/skills/issue/SKILL.md +45 -162
- package/runtime/codex/.codex/skills/me/SKILL.md +2 -2
- package/runtime/codex/.codex/skills/meeting/SKILL.md +45 -29
- package/runtime/codex/.codex/skills/note/SKILL.md +25 -37
- package/runtime/codex/.codex/skills/notion-connect/SKILL.md +2 -2
- package/runtime/codex/.codex/skills/onboarding/SKILL.md +45 -43
- package/runtime/codex/.codex/skills/pr/SKILL.md +2 -2
- package/runtime/codex/.codex/skills/pull/SKILL.md +2 -2
- package/runtime/codex/.codex/skills/push/SKILL.md +2 -2
- package/runtime/codex/.codex/skills/quest/SKILL.md +45 -44
- package/runtime/codex/.codex/skills/reflect/SKILL.md +45 -35
- package/runtime/codex/.codex/skills/review-pr/SKILL.md +6 -2
- package/runtime/codex/.codex/skills/save/SKILL.md +25 -137
- package/runtime/codex/.codex/skills/slack-connect/SKILL.md +2 -2
- package/runtime/codex/.codex/skills/summon/SKILL.md +6 -2
- package/runtime/codex/.codex/skills/sync-repos/SKILL.md +2 -2
- package/runtime/codex/.codex/skills/teams-connect/SKILL.md +2 -2
- package/runtime/codex/.codex/skills/telegram-connect/SKILL.md +2 -2
- package/runtime/codex/.codex/skills/telemetry/SKILL.md +2 -2
- package/runtime/codex/.codex/skills/test/SKILL.md +7 -3
- package/runtime/codex/.codex/skills/the-spiral/SKILL.md +25 -89
- package/runtime/codex/.codex/skills/tui-design/SKILL.md +6 -2
- package/runtime/codex/.codex/skills/tutorial/SKILL.md +45 -48
- package/runtime/codex/.codex/skills/update/SKILL.md +2 -2
- package/runtime/codex/.codex/skills/view/SKILL.md +39 -158
- package/runtime/codex/.codex/skills/visual-explain/SKILL.md +6 -2
- package/runtime/codex/.codex/skills/wrap/SKILL.md +45 -66
- package/runtime/codex/.codex/spec-manifest.json +10 -10
- package/runtime/codex/AGENTS.md +29 -18
- package/runtime/codex/bin/activity-action.sh +1 -1
- package/runtime/codex/bin/activity-data.sh +1 -1
- package/runtime/codex/bin/agent.sh +78 -27
- package/runtime/codex/bin/api-call.sh +181 -0
- package/runtime/codex/bin/artifact-register.sh +62 -6
- package/runtime/codex/bin/artifact-writeback.sh +28 -3
- package/runtime/codex/bin/artifacts.sh +1 -1
- package/runtime/codex/bin/attendant.sh +1 -1
- package/runtime/codex/bin/codex-render-spec.mjs +14 -10
- package/runtime/codex/bin/codex-session-start.sh +7 -1
- package/runtime/codex/bin/codex-skill-render.mjs +15 -6
- package/runtime/codex/bin/codex-sync-skills.sh +6 -2
- package/runtime/codex/bin/config-get.sh +65 -0
- package/runtime/codex/bin/contribute-guard.sh +70 -0
- package/runtime/codex/bin/dashboard-data.sh +1 -1
- package/runtime/codex/bin/gh-run.sh +25 -0
- package/runtime/codex/bin/graph-op.sh +230 -3
- package/runtime/codex/bin/graph-projection.sh +1 -1
- package/runtime/codex/bin/graph-wal.sh +2 -2
- package/runtime/codex/bin/graph.sh +1 -1
- package/runtime/codex/bin/handoff-lifecycle.sh +2 -2
- package/runtime/codex/bin/handoff-preview.sh +7 -3
- package/runtime/codex/bin/handoff-run.sh +1 -1
- package/runtime/codex/bin/hosting-ops.sh +248 -0
- package/runtime/codex/bin/index-handoff.sh +3 -3
- package/runtime/codex/bin/ingest-item.sh +1 -1
- package/runtime/codex/bin/ingest.sh +3 -3
- package/runtime/codex/bin/invite.sh +1 -0
- package/runtime/codex/bin/issue.sh +1 -1
- package/runtime/codex/bin/knowledge.sh +1 -1
- package/runtime/codex/bin/lib/config.sh +4 -8
- package/runtime/codex/bin/lib/dashboard-artifact.sh +1 -1
- package/runtime/codex/bin/lib/framework-update.sh +41 -0
- package/runtime/codex/bin/lib/git-sync.sh +18 -11
- package/runtime/codex/bin/lib/greeting.sh +4 -1
- package/runtime/codex/bin/lib/health-footer.sh +1 -1
- package/runtime/codex/bin/lib/hosted-ref-id.sh +108 -0
- package/runtime/codex/bin/lib/runtime-owned.sh +52 -16
- package/runtime/codex/bin/lib/scratch.sh +26 -0
- package/runtime/codex/bin/lib/secret_entry.py +1013 -0
- package/runtime/codex/bin/notification.sh +1 -1
- package/runtime/codex/bin/notify.sh +134 -14
- package/runtime/codex/bin/observe-context.sh +1 -1
- package/runtime/codex/bin/onboarding.sh +1 -0
- package/runtime/codex/bin/person.sh +9 -4
- package/runtime/codex/bin/prose-rules/harness-tool-names.md +36 -0
- package/runtime/codex/bin/publish-artifact.sh +52 -4
- package/runtime/codex/bin/publish-references.sh +27 -8
- package/runtime/codex/bin/qa-gate.sh +205 -0
- package/runtime/codex/bin/quest.sh +1 -1
- package/runtime/codex/bin/question.sh +1 -1
- package/runtime/codex/bin/research-ingest.sh +1 -1
- package/runtime/codex/bin/runtime-identity.sh +3 -3
- package/runtime/codex/bin/runtime-upgrade.sh +5 -3
- package/runtime/codex/bin/scratch-sweep.sh +29 -0
- package/runtime/codex/bin/scroll.sh +1 -1
- package/runtime/codex/bin/search.sh +7 -7
- package/runtime/codex/bin/secret-entry.py +6 -0
- package/runtime/codex/bin/session-autosave.sh +1 -1
- package/runtime/codex/bin/session-log.sh +7 -2
- package/runtime/codex/bin/settings.sh +1 -1
- package/runtime/codex/bin/test-baseline.sh +188 -44
- package/runtime/codex/bin/thread.sh +1 -1
- package/runtime/codex/bin/todo.sh +1 -1
- package/runtime/codex/bin/update-framework.sh +24 -0
- package/runtime/codex/bin/view-render.sh +21 -1
- package/runtime/codex/bin/worktree.sh +1 -1
- package/runtime/codex/docs/credential-entry.md +286 -0
- package/runtime/codex/egregore_runtime/artifacts.py +122 -19
- package/runtime/codex/egregore_runtime/contracts.py +18 -0
- package/runtime/codex/egregore_runtime/github_issues.py +89 -1
- package/runtime/codex/egregore_runtime/graph.py +15 -6
- package/runtime/codex/egregore_runtime/harness_cli.py +82 -12
- package/runtime/codex/egregore_runtime/identity.py +108 -8
- package/runtime/codex/egregore_runtime/identity_transfer.py +320 -0
- package/runtime/codex/egregore_runtime/ingest_cli.py +4 -6
- package/runtime/codex/egregore_runtime/investigation_guidance.py +8 -1
- package/runtime/codex/egregore_runtime/issue_cli.py +32 -1
- package/runtime/codex/egregore_runtime/issue_duplicates.py +116 -0
- package/runtime/codex/egregore_runtime/issue_readiness.py +231 -0
- package/runtime/codex/egregore_runtime/issue_triage.py +331 -0
- package/runtime/codex/egregore_runtime/issue_triage_service.py +124 -0
- package/runtime/codex/egregore_runtime/knowledge_cli.py +4 -3
- package/runtime/codex/egregore_runtime/notification_cli.py +66 -8
- package/runtime/codex/egregore_runtime/questions.py +1 -0
- package/runtime/codex/egregore_runtime/research_ingest_cli.py +4 -4
- package/runtime/codex/egregore_runtime/runtime.py +23 -2
- package/runtime/codex/egregore_runtime/scratch.py +294 -0
- package/runtime/codex/egregore_runtime/scroll_cli.py +7 -7
- package/runtime/codex/egregore_runtime/sync.py +21 -6
- package/runtime/codex/egregore_runtime/thread_cli.py +4 -4
- package/runtime/codex/egregore_runtime/threads.py +1 -0
- package/runtime/codex/egregore_runtime/upgrade.py +771 -34
- package/runtime/codex/egregore_runtime/writeback.py +146 -8
- package/runtime/codex/egregore_runtime/writeback_cli.py +89 -17
- package/runtime/codex/manifest.json +23 -1
- package/runtime/pi/.claude/context/retrieval-investigation.md +7 -0
- package/runtime/pi/.codex/config.toml +1 -2
- package/runtime/pi/.codex/skills/activity/SKILL.md +45 -39
- package/runtime/pi/.codex/skills/announce/SKILL.md +25 -47
- package/runtime/pi/.codex/skills/archive/SKILL.md +45 -33
- package/runtime/pi/.codex/skills/branch/SKILL.md +2 -2
- package/runtime/pi/.codex/skills/checkup/SKILL.md +39 -83
- package/runtime/pi/.codex/skills/commit/SKILL.md +2 -2
- package/runtime/pi/.codex/skills/contribute/SKILL.md +2 -2
- package/runtime/pi/.codex/skills/create-skill/SKILL.md +2 -2
- package/runtime/pi/.codex/skills/dark-mode/SKILL.md +2 -2
- package/runtime/pi/.codex/skills/dashboard/SKILL.md +45 -29
- package/runtime/pi/.codex/skills/deep-reflect/SKILL.md +45 -113
- package/runtime/pi/.codex/skills/delete-user/SKILL.md +2 -2
- package/runtime/pi/.codex/skills/emissary/SKILL.md +6 -2
- package/runtime/pi/.codex/skills/env/SKILL.md +29 -0
- package/runtime/pi/.codex/skills/handoff/SKILL.md +45 -131
- package/runtime/pi/.codex/skills/harvest/SKILL.md +45 -50
- package/runtime/pi/.codex/skills/ingest/SKILL.md +25 -51
- package/runtime/pi/.codex/skills/ingest-corpus/SKILL.md +2 -2
- package/runtime/pi/.codex/skills/ingest-notion/SKILL.md +2 -2
- package/runtime/pi/.codex/skills/ingest-user-interview/SKILL.md +45 -30
- package/runtime/pi/.codex/skills/invite/SKILL.md +25 -33
- package/runtime/pi/.codex/skills/issue/SKILL.md +45 -162
- package/runtime/pi/.codex/skills/me/SKILL.md +2 -2
- package/runtime/pi/.codex/skills/meeting/SKILL.md +45 -29
- package/runtime/pi/.codex/skills/note/SKILL.md +25 -37
- package/runtime/pi/.codex/skills/notion-connect/SKILL.md +2 -2
- package/runtime/pi/.codex/skills/onboarding/SKILL.md +45 -43
- package/runtime/pi/.codex/skills/pr/SKILL.md +2 -2
- package/runtime/pi/.codex/skills/pull/SKILL.md +2 -2
- package/runtime/pi/.codex/skills/push/SKILL.md +2 -2
- package/runtime/pi/.codex/skills/quest/SKILL.md +45 -44
- package/runtime/pi/.codex/skills/reflect/SKILL.md +45 -35
- package/runtime/pi/.codex/skills/review-pr/SKILL.md +6 -2
- package/runtime/pi/.codex/skills/save/SKILL.md +25 -137
- package/runtime/pi/.codex/skills/slack-connect/SKILL.md +2 -2
- package/runtime/pi/.codex/skills/summon/SKILL.md +6 -2
- package/runtime/pi/.codex/skills/sync-repos/SKILL.md +2 -2
- package/runtime/pi/.codex/skills/teams-connect/SKILL.md +2 -2
- package/runtime/pi/.codex/skills/telegram-connect/SKILL.md +2 -2
- package/runtime/pi/.codex/skills/telemetry/SKILL.md +2 -2
- package/runtime/pi/.codex/skills/test/SKILL.md +7 -3
- package/runtime/pi/.codex/skills/the-spiral/SKILL.md +25 -89
- package/runtime/pi/.codex/skills/tui-design/SKILL.md +6 -2
- package/runtime/pi/.codex/skills/tutorial/SKILL.md +45 -48
- package/runtime/pi/.codex/skills/update/SKILL.md +2 -2
- package/runtime/pi/.codex/skills/view/SKILL.md +39 -158
- package/runtime/pi/.codex/skills/visual-explain/SKILL.md +6 -2
- package/runtime/pi/.codex/skills/wrap/SKILL.md +45 -66
- package/runtime/pi/.codex/spec-manifest.json +10 -10
- package/runtime/pi/.pi/APPEND_SYSTEM.md +28 -17
- package/runtime/pi/.pi/spec-manifest.json +2 -2
- package/runtime/pi/AGENTS.md +29 -18
- package/runtime/pi/bin/activity-action.sh +1 -1
- package/runtime/pi/bin/activity-data.sh +1 -1
- package/runtime/pi/bin/agent.sh +78 -27
- package/runtime/pi/bin/api-call.sh +181 -0
- package/runtime/pi/bin/artifact-register.sh +62 -6
- package/runtime/pi/bin/artifact-writeback.sh +28 -3
- package/runtime/pi/bin/artifacts.sh +1 -1
- package/runtime/pi/bin/attendant.sh +1 -1
- package/runtime/pi/bin/codex-render-spec.mjs +14 -10
- package/runtime/pi/bin/codex-session-start.sh +7 -1
- package/runtime/pi/bin/codex-skill-render.mjs +15 -6
- package/runtime/pi/bin/codex-sync-skills.sh +6 -2
- package/runtime/pi/bin/config-get.sh +65 -0
- package/runtime/pi/bin/contribute-guard.sh +70 -0
- package/runtime/pi/bin/dashboard-data.sh +1 -1
- package/runtime/pi/bin/gh-run.sh +25 -0
- package/runtime/pi/bin/graph-op.sh +230 -3
- package/runtime/pi/bin/graph-projection.sh +1 -1
- package/runtime/pi/bin/graph-wal.sh +2 -2
- package/runtime/pi/bin/graph.sh +1 -1
- package/runtime/pi/bin/handoff-lifecycle.sh +2 -2
- package/runtime/pi/bin/handoff-preview.sh +7 -3
- package/runtime/pi/bin/handoff-run.sh +1 -1
- package/runtime/pi/bin/hosting-ops.sh +248 -0
- package/runtime/pi/bin/index-handoff.sh +3 -3
- package/runtime/pi/bin/ingest-item.sh +1 -1
- package/runtime/pi/bin/ingest.sh +3 -3
- package/runtime/pi/bin/invite.sh +1 -0
- package/runtime/pi/bin/issue.sh +1 -1
- package/runtime/pi/bin/knowledge.sh +1 -1
- package/runtime/pi/bin/lib/config.sh +4 -8
- package/runtime/pi/bin/lib/dashboard-artifact.sh +1 -1
- package/runtime/pi/bin/lib/framework-update.sh +41 -0
- package/runtime/pi/bin/lib/git-sync.sh +18 -11
- package/runtime/pi/bin/lib/greeting.sh +4 -1
- package/runtime/pi/bin/lib/health-footer.sh +1 -1
- package/runtime/pi/bin/lib/hosted-ref-id.sh +108 -0
- package/runtime/pi/bin/lib/runtime-owned.sh +52 -16
- package/runtime/pi/bin/lib/scratch.sh +26 -0
- package/runtime/pi/bin/lib/secret_entry.py +1013 -0
- package/runtime/pi/bin/notification.sh +1 -1
- package/runtime/pi/bin/notify.sh +134 -14
- package/runtime/pi/bin/observe-context.sh +1 -1
- package/runtime/pi/bin/onboarding.sh +1 -0
- package/runtime/pi/bin/person.sh +9 -4
- package/runtime/pi/bin/pi-product-workflows.mjs +5 -0
- package/runtime/pi/bin/prose-rules/harness-tool-names.md +36 -0
- package/runtime/pi/bin/publish-artifact.sh +52 -4
- package/runtime/pi/bin/publish-references.sh +27 -8
- package/runtime/pi/bin/qa-gate.sh +205 -0
- package/runtime/pi/bin/quest.sh +1 -1
- package/runtime/pi/bin/question.sh +1 -1
- package/runtime/pi/bin/research-ingest.sh +1 -1
- package/runtime/pi/bin/runtime-identity.sh +3 -3
- package/runtime/pi/bin/runtime-upgrade.sh +5 -3
- package/runtime/pi/bin/scratch-sweep.sh +29 -0
- package/runtime/pi/bin/scroll.sh +1 -1
- package/runtime/pi/bin/search.sh +7 -7
- package/runtime/pi/bin/secret-entry.py +6 -0
- package/runtime/pi/bin/session-autosave.sh +1 -1
- package/runtime/pi/bin/session-log.sh +7 -2
- package/runtime/pi/bin/settings.sh +1 -1
- package/runtime/pi/bin/test-baseline.sh +188 -44
- package/runtime/pi/bin/thread.sh +1 -1
- package/runtime/pi/bin/todo.sh +1 -1
- package/runtime/pi/bin/update-framework.sh +24 -0
- package/runtime/pi/bin/view-render.sh +21 -1
- package/runtime/pi/bin/worktree.sh +1 -1
- package/runtime/pi/docs/credential-entry.md +286 -0
- package/runtime/pi/egregore_runtime/artifacts.py +122 -19
- package/runtime/pi/egregore_runtime/contracts.py +18 -0
- package/runtime/pi/egregore_runtime/github_issues.py +89 -1
- package/runtime/pi/egregore_runtime/graph.py +15 -6
- package/runtime/pi/egregore_runtime/harness_cli.py +82 -12
- package/runtime/pi/egregore_runtime/identity.py +108 -8
- package/runtime/pi/egregore_runtime/identity_transfer.py +320 -0
- package/runtime/pi/egregore_runtime/ingest_cli.py +4 -6
- package/runtime/pi/egregore_runtime/investigation_guidance.py +8 -1
- package/runtime/pi/egregore_runtime/issue_cli.py +32 -1
- package/runtime/pi/egregore_runtime/issue_duplicates.py +116 -0
- package/runtime/pi/egregore_runtime/issue_readiness.py +231 -0
- package/runtime/pi/egregore_runtime/issue_triage.py +331 -0
- package/runtime/pi/egregore_runtime/issue_triage_service.py +124 -0
- package/runtime/pi/egregore_runtime/knowledge_cli.py +4 -3
- package/runtime/pi/egregore_runtime/notification_cli.py +66 -8
- package/runtime/pi/egregore_runtime/questions.py +1 -0
- package/runtime/pi/egregore_runtime/research_ingest_cli.py +4 -4
- package/runtime/pi/egregore_runtime/runtime.py +23 -2
- package/runtime/pi/egregore_runtime/scratch.py +294 -0
- package/runtime/pi/egregore_runtime/scroll_cli.py +7 -7
- package/runtime/pi/egregore_runtime/sync.py +21 -6
- package/runtime/pi/egregore_runtime/thread_cli.py +4 -4
- package/runtime/pi/egregore_runtime/threads.py +1 -0
- package/runtime/pi/egregore_runtime/upgrade.py +771 -34
- package/runtime/pi/egregore_runtime/writeback.py +146 -8
- package/runtime/pi/egregore_runtime/writeback_cli.py +89 -17
- package/runtime/pi/manifest.json +23 -1
- package/runtime/prime/.claude/context/retrieval-investigation.md +7 -0
- package/runtime/prime/.codex/config.toml +1 -2
- package/runtime/prime/.codex/skills/activity/SKILL.md +45 -39
- package/runtime/prime/.codex/skills/announce/SKILL.md +25 -47
- package/runtime/prime/.codex/skills/archive/SKILL.md +45 -33
- package/runtime/prime/.codex/skills/branch/SKILL.md +2 -2
- package/runtime/prime/.codex/skills/checkup/SKILL.md +39 -83
- package/runtime/prime/.codex/skills/commit/SKILL.md +2 -2
- package/runtime/prime/.codex/skills/contribute/SKILL.md +2 -2
- package/runtime/prime/.codex/skills/create-skill/SKILL.md +2 -2
- package/runtime/prime/.codex/skills/dark-mode/SKILL.md +2 -2
- package/runtime/prime/.codex/skills/dashboard/SKILL.md +45 -29
- package/runtime/prime/.codex/skills/deep-reflect/SKILL.md +45 -113
- package/runtime/prime/.codex/skills/delete-user/SKILL.md +2 -2
- package/runtime/prime/.codex/skills/emissary/SKILL.md +6 -2
- package/runtime/prime/.codex/skills/env/SKILL.md +29 -0
- package/runtime/prime/.codex/skills/handoff/SKILL.md +45 -131
- package/runtime/prime/.codex/skills/harvest/SKILL.md +45 -50
- package/runtime/prime/.codex/skills/ingest/SKILL.md +25 -51
- package/runtime/prime/.codex/skills/ingest-corpus/SKILL.md +2 -2
- package/runtime/prime/.codex/skills/ingest-notion/SKILL.md +2 -2
- package/runtime/prime/.codex/skills/ingest-user-interview/SKILL.md +45 -30
- package/runtime/prime/.codex/skills/invite/SKILL.md +25 -33
- package/runtime/prime/.codex/skills/issue/SKILL.md +45 -162
- package/runtime/prime/.codex/skills/me/SKILL.md +2 -2
- package/runtime/prime/.codex/skills/meeting/SKILL.md +45 -29
- package/runtime/prime/.codex/skills/note/SKILL.md +25 -37
- package/runtime/prime/.codex/skills/notion-connect/SKILL.md +2 -2
- package/runtime/prime/.codex/skills/onboarding/SKILL.md +45 -43
- package/runtime/prime/.codex/skills/pr/SKILL.md +2 -2
- package/runtime/prime/.codex/skills/pull/SKILL.md +2 -2
- package/runtime/prime/.codex/skills/push/SKILL.md +2 -2
- package/runtime/prime/.codex/skills/quest/SKILL.md +45 -44
- package/runtime/prime/.codex/skills/reflect/SKILL.md +45 -35
- package/runtime/prime/.codex/skills/review-pr/SKILL.md +6 -2
- package/runtime/prime/.codex/skills/save/SKILL.md +25 -137
- package/runtime/prime/.codex/skills/slack-connect/SKILL.md +2 -2
- package/runtime/prime/.codex/skills/summon/SKILL.md +6 -2
- package/runtime/prime/.codex/skills/sync-repos/SKILL.md +2 -2
- package/runtime/prime/.codex/skills/teams-connect/SKILL.md +2 -2
- package/runtime/prime/.codex/skills/telegram-connect/SKILL.md +2 -2
- package/runtime/prime/.codex/skills/telemetry/SKILL.md +2 -2
- package/runtime/prime/.codex/skills/test/SKILL.md +7 -3
- package/runtime/prime/.codex/skills/the-spiral/SKILL.md +25 -89
- package/runtime/prime/.codex/skills/tui-design/SKILL.md +6 -2
- package/runtime/prime/.codex/skills/tutorial/SKILL.md +45 -48
- package/runtime/prime/.codex/skills/update/SKILL.md +2 -2
- package/runtime/prime/.codex/skills/view/SKILL.md +39 -158
- package/runtime/prime/.codex/skills/visual-explain/SKILL.md +6 -2
- package/runtime/prime/.codex/skills/wrap/SKILL.md +45 -66
- package/runtime/prime/.codex/spec-manifest.json +10 -10
- package/runtime/prime/.prime/agent/APPEND_SYSTEM.md +28 -17
- package/runtime/prime/.prime/agent/skills/egregore/SKILL.md +8 -1
- package/runtime/prime/.prime/agent/skills/egregore/src/egregore/__init__.py +10 -2
- package/runtime/prime/.prime/agent/spec-manifest.json +2 -2
- package/runtime/prime/AGENTS.md +29 -18
- package/runtime/prime/bin/activity-action.sh +1 -1
- package/runtime/prime/bin/activity-data.sh +1 -1
- package/runtime/prime/bin/agent.sh +78 -27
- package/runtime/prime/bin/api-call.sh +181 -0
- package/runtime/prime/bin/artifact-register.sh +62 -6
- package/runtime/prime/bin/artifact-writeback.sh +28 -3
- package/runtime/prime/bin/artifacts.sh +1 -1
- package/runtime/prime/bin/attendant.sh +1 -1
- package/runtime/prime/bin/codex-render-spec.mjs +14 -10
- package/runtime/prime/bin/codex-session-start.sh +7 -1
- package/runtime/prime/bin/codex-skill-render.mjs +15 -6
- package/runtime/prime/bin/codex-sync-skills.sh +6 -2
- package/runtime/prime/bin/config-get.sh +65 -0
- package/runtime/prime/bin/contribute-guard.sh +70 -0
- package/runtime/prime/bin/dashboard-data.sh +1 -1
- package/runtime/prime/bin/gh-run.sh +25 -0
- package/runtime/prime/bin/graph-op.sh +230 -3
- package/runtime/prime/bin/graph-projection.sh +1 -1
- package/runtime/prime/bin/graph-wal.sh +2 -2
- package/runtime/prime/bin/graph.sh +1 -1
- package/runtime/prime/bin/handoff-lifecycle.sh +2 -2
- package/runtime/prime/bin/handoff-preview.sh +7 -3
- package/runtime/prime/bin/handoff-run.sh +1 -1
- package/runtime/prime/bin/hosting-ops.sh +248 -0
- package/runtime/prime/bin/index-handoff.sh +3 -3
- package/runtime/prime/bin/ingest-item.sh +1 -1
- package/runtime/prime/bin/ingest.sh +3 -3
- package/runtime/prime/bin/invite.sh +1 -0
- package/runtime/prime/bin/issue.sh +1 -1
- package/runtime/prime/bin/knowledge.sh +1 -1
- package/runtime/prime/bin/lib/config.sh +4 -8
- package/runtime/prime/bin/lib/dashboard-artifact.sh +1 -1
- package/runtime/prime/bin/lib/framework-update.sh +41 -0
- package/runtime/prime/bin/lib/git-sync.sh +18 -11
- package/runtime/prime/bin/lib/greeting.sh +4 -1
- package/runtime/prime/bin/lib/health-footer.sh +1 -1
- package/runtime/prime/bin/lib/hosted-ref-id.sh +108 -0
- package/runtime/prime/bin/lib/runtime-owned.sh +52 -16
- package/runtime/prime/bin/lib/scratch.sh +26 -0
- package/runtime/prime/bin/lib/secret_entry.py +1013 -0
- package/runtime/prime/bin/notification.sh +1 -1
- package/runtime/prime/bin/notify.sh +134 -14
- package/runtime/prime/bin/observe-context.sh +1 -1
- package/runtime/prime/bin/onboarding.sh +1 -0
- package/runtime/prime/bin/person.sh +9 -4
- package/runtime/prime/bin/pi-product-workflows.mjs +5 -0
- package/runtime/prime/bin/prose-rules/harness-tool-names.md +36 -0
- package/runtime/prime/bin/publish-artifact.sh +52 -4
- package/runtime/prime/bin/publish-references.sh +27 -8
- package/runtime/prime/bin/qa-gate.sh +205 -0
- package/runtime/prime/bin/quest.sh +1 -1
- package/runtime/prime/bin/question.sh +1 -1
- package/runtime/prime/bin/research-ingest.sh +1 -1
- package/runtime/prime/bin/runtime-identity.sh +3 -3
- package/runtime/prime/bin/runtime-upgrade.sh +5 -3
- package/runtime/prime/bin/scratch-sweep.sh +29 -0
- package/runtime/prime/bin/scroll.sh +1 -1
- package/runtime/prime/bin/search.sh +7 -7
- package/runtime/prime/bin/secret-entry.py +6 -0
- package/runtime/prime/bin/session-autosave.sh +1 -1
- package/runtime/prime/bin/session-log.sh +7 -2
- package/runtime/prime/bin/settings.sh +1 -1
- package/runtime/prime/bin/test-baseline.sh +188 -44
- package/runtime/prime/bin/thread.sh +1 -1
- package/runtime/prime/bin/todo.sh +1 -1
- package/runtime/prime/bin/update-framework.sh +24 -0
- package/runtime/prime/bin/view-render.sh +21 -1
- package/runtime/prime/bin/worktree.sh +1 -1
- package/runtime/prime/docs/credential-entry.md +286 -0
- package/runtime/prime/egregore_runtime/artifacts.py +122 -19
- package/runtime/prime/egregore_runtime/contracts.py +18 -0
- package/runtime/prime/egregore_runtime/github_issues.py +89 -1
- package/runtime/prime/egregore_runtime/graph.py +15 -6
- package/runtime/prime/egregore_runtime/harness_cli.py +82 -12
- package/runtime/prime/egregore_runtime/identity.py +108 -8
- package/runtime/prime/egregore_runtime/identity_transfer.py +320 -0
- package/runtime/prime/egregore_runtime/ingest_cli.py +4 -6
- package/runtime/prime/egregore_runtime/investigation_guidance.py +8 -1
- package/runtime/prime/egregore_runtime/issue_cli.py +32 -1
- package/runtime/prime/egregore_runtime/issue_duplicates.py +116 -0
- package/runtime/prime/egregore_runtime/issue_readiness.py +231 -0
- package/runtime/prime/egregore_runtime/issue_triage.py +331 -0
- package/runtime/prime/egregore_runtime/issue_triage_service.py +124 -0
- package/runtime/prime/egregore_runtime/knowledge_cli.py +4 -3
- package/runtime/prime/egregore_runtime/notification_cli.py +66 -8
- package/runtime/prime/egregore_runtime/questions.py +1 -0
- package/runtime/prime/egregore_runtime/research_ingest_cli.py +4 -4
- package/runtime/prime/egregore_runtime/runtime.py +23 -2
- package/runtime/prime/egregore_runtime/scratch.py +294 -0
- package/runtime/prime/egregore_runtime/scroll_cli.py +7 -7
- package/runtime/prime/egregore_runtime/sync.py +21 -6
- package/runtime/prime/egregore_runtime/thread_cli.py +4 -4
- package/runtime/prime/egregore_runtime/threads.py +1 -0
- package/runtime/prime/egregore_runtime/upgrade.py +771 -34
- package/runtime/prime/egregore_runtime/writeback.py +146 -8
- package/runtime/prime/egregore_runtime/writeback_cli.py +89 -17
- package/runtime/prime/manifest.json +23 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// egregore-launcher-version: 0.21.
|
|
2
|
+
// egregore-launcher-version: 0.21.1
|
|
3
3
|
//
|
|
4
4
|
// egregore — launch and browse Egregore instances from your terminal.
|
|
5
5
|
// Installed by create-egregore. Reads ~/.egregore/instances.json.
|
|
@@ -35,7 +35,7 @@ const crypto = require("node:crypto");
|
|
|
35
35
|
const { spawnSync, spawn } = require("node:child_process");
|
|
36
36
|
const readline = require("node:readline");
|
|
37
37
|
|
|
38
|
-
const VERSION = "0.21.
|
|
38
|
+
const VERSION = "0.21.1";
|
|
39
39
|
const REGISTRY = path.join(os.homedir(), ".egregore", "instances.json");
|
|
40
40
|
const DEFAULT_FILE = path.join(os.homedir(), ".egregore", "default");
|
|
41
41
|
const UPDATE_CACHE_FILE = path.join(os.homedir(), ".egregore", "update-check.json");
|
|
@@ -755,6 +755,7 @@ async function renderCodexStartupCard(egregoreDir) {
|
|
|
755
755
|
|
|
756
756
|
const CORE_SUPPORT_PATHS = {
|
|
757
757
|
codex: [
|
|
758
|
+
"AGENTS.md",
|
|
758
759
|
"bin/codex-session-start.sh",
|
|
759
760
|
"bin/codex-install-skills.sh",
|
|
760
761
|
".codex/config.toml",
|
|
@@ -1354,7 +1355,10 @@ function compareReleaseVersions(a, b) {
|
|
|
1354
1355
|
}
|
|
1355
1356
|
|
|
1356
1357
|
function cliUpdateState(latest) {
|
|
1357
|
-
|
|
1358
|
+
// The global refresh follows latest; prerelease testing is selected explicitly.
|
|
1359
|
+
const parsed = parseReleaseVersion(latest);
|
|
1360
|
+
if (!RUNTIME_STABLE_VERSION_RE.test(latest || "") || !parsed
|
|
1361
|
+
|| !parsed.parts.every(Number.isSafeInteger)) return null;
|
|
1358
1362
|
return {
|
|
1359
1363
|
current: VERSION,
|
|
1360
1364
|
latest,
|
|
@@ -1445,7 +1449,7 @@ function cmdCliUpdate(latest) {
|
|
|
1445
1449
|
);
|
|
1446
1450
|
if (result.status !== 0) {
|
|
1447
1451
|
console.log(`\r${ANSI.clearLine} [1/2] ${YELLOW}!${RESET} Install failed`);
|
|
1448
|
-
const detail =
|
|
1452
|
+
const detail = adapterErrorText(result.stderr || result.stdout || "").trim().split("\n").filter(Boolean).pop();
|
|
1449
1453
|
if (detail) console.error(` ${DIM}${detail}${RESET}`);
|
|
1450
1454
|
console.error(` Retry: npx -y ${PUBLIC_NPX_PACKAGE}@${latest} --refresh-launcher\n`);
|
|
1451
1455
|
process.exitCode = 1;
|
|
@@ -1617,10 +1621,39 @@ function persistConnectState(inst, fields) {
|
|
|
1617
1621
|
writeJsonFileAtomic(file, state);
|
|
1618
1622
|
}
|
|
1619
1623
|
|
|
1624
|
+
// Older installed adapters and API versions may still use storage terminology.
|
|
1625
|
+
// Normalize only diagnostic display text; protocol fields and payloads stay intact.
|
|
1626
|
+
function adapterErrorText(detail) {
|
|
1627
|
+
return String(detail)
|
|
1628
|
+
// Describe a retired technical reference as a whole. Replacing one word
|
|
1629
|
+
// inside a path/module or shell invocation would invent a runnable command.
|
|
1630
|
+
.replace(/(^|\s)(?:(?:\/[^\s"'`]+)*\/)?(?:bash|sh|zsh)\s+(?:"([^"\n]+)"|'([^'\n]+)'|([^\s;"'`]+))/g,
|
|
1631
|
+
(command, prefix, quoted, singleQuoted, bare) => {
|
|
1632
|
+
const script = quoted || singleQuoted || bare;
|
|
1633
|
+
if (!/(?:graph|neo4j)/i.test(script)) return command;
|
|
1634
|
+
return prefix + (/sync-graph\.sh$/i.test(script) ? "the memory sync operation" : "the hosted storage operation");
|
|
1635
|
+
})
|
|
1636
|
+
.replace(/[^\s"'`()\[\]{},;:]+/g, (token) => {
|
|
1637
|
+
if (!/(?:graph|neo4j)/i.test(token)) return token;
|
|
1638
|
+
if (/[/\\]/.test(token)) {
|
|
1639
|
+
if (/[/\\]bin[/\\][^/\\]+\.sh$/i.test(token) || /^bin[/\\][^/\\]+\.sh$/i.test(token)) {
|
|
1640
|
+
return /sync-graph\.sh$/i.test(token) ? "the memory sync adapter" : "the hosted storage adapter";
|
|
1641
|
+
}
|
|
1642
|
+
return "the hosted storage path";
|
|
1643
|
+
}
|
|
1644
|
+
if (/^[a-z_][\w-]*(?:\.[a-z_][\w-]*)+\.?$/i.test(token)) return "the hosted storage component";
|
|
1645
|
+
return token;
|
|
1646
|
+
})
|
|
1647
|
+
.replace(/\bknowledge graph\b/gi, "shared memory")
|
|
1648
|
+
.replace(/\bgraph database\b/gi, "hosted storage")
|
|
1649
|
+
.replace(/\bneo4j\b/gi, "hosted storage")
|
|
1650
|
+
.replace(/\bgraph\b/gi, "storage");
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1620
1653
|
function connectError(result, fallback) {
|
|
1621
1654
|
if (!result) return fallback;
|
|
1622
1655
|
const data = result.data || {};
|
|
1623
|
-
return data.detail || data.message || (typeof data === "string" ? data : fallback);
|
|
1656
|
+
return adapterErrorText(data.detail || data.message || (typeof data === "string" ? data : fallback));
|
|
1624
1657
|
}
|
|
1625
1658
|
|
|
1626
1659
|
function sleep(ms) {
|
|
@@ -1646,7 +1679,7 @@ function backfillSummaryLines(summary) {
|
|
|
1646
1679
|
|
|
1647
1680
|
if (sessions !== null && artifacts !== null && quests !== null) {
|
|
1648
1681
|
if (sessions + artifacts + quests === 0) {
|
|
1649
|
-
lines.push("
|
|
1682
|
+
lines.push("Hosted memory is already up to date for sessions, artifacts, and quests");
|
|
1650
1683
|
} else {
|
|
1651
1684
|
lines.push(`Added ${[
|
|
1652
1685
|
backfillCountLabel(sessions, "session", "sessions"),
|
|
@@ -1664,6 +1697,23 @@ function backfillSummaryLines(summary) {
|
|
|
1664
1697
|
return lines;
|
|
1665
1698
|
}
|
|
1666
1699
|
|
|
1700
|
+
function connectedOrganizationId(config, response) {
|
|
1701
|
+
const current = String(config.org_id || "");
|
|
1702
|
+
const returned = String(response?.org_id || "");
|
|
1703
|
+
if (!/^(?:org_[0-9a-f]{32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/.test(returned) ||
|
|
1704
|
+
(current && !current.startsWith("legacy-org:") && returned !== current)) {
|
|
1705
|
+
die("Connected did not confirm this Egregore's existing identity. Local configuration is unchanged; update the hosted service before retrying.");
|
|
1706
|
+
}
|
|
1707
|
+
return returned || current;
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1710
|
+
function hostedMemorySyncEnabled(config) {
|
|
1711
|
+
const override = process.env.EGREGORE_GRAPH_PROJECTION;
|
|
1712
|
+
if (["1", "true", "enabled"].includes(override)) return true;
|
|
1713
|
+
if (["0", "false", "disabled"].includes(override)) return false;
|
|
1714
|
+
return config.features?.graph_projection === true;
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1667
1717
|
async function cmdConnect(args) {
|
|
1668
1718
|
const fresh = args.includes("--fresh");
|
|
1669
1719
|
const positional = args.filter((a) => !String(a).startsWith("--"));
|
|
@@ -1681,6 +1731,8 @@ async function cmdConnect(args) {
|
|
|
1681
1731
|
die(`GITHUB_TOKEN is missing for ${inst.slug}.\n Add it to ${path.join(inst.path, ".env")} and retry.`);
|
|
1682
1732
|
}
|
|
1683
1733
|
const activation = state.connected_activation || {};
|
|
1734
|
+
let expectedOrgId = cfg.org_id && !String(cfg.org_id).startsWith("legacy-org:")
|
|
1735
|
+
? cfg.org_id : activation.org_id || "";
|
|
1684
1736
|
if (cfg.mode === "connected" && activation.status === "connected") {
|
|
1685
1737
|
if (activation.intent_id) {
|
|
1686
1738
|
const repaired = await connectedApiRequest(
|
|
@@ -1694,8 +1746,10 @@ async function cmdConnect(args) {
|
|
|
1694
1746
|
`Connected is active, but its shared configuration could not be published: ${connectError(repaired, `HTTP ${repaired.status}`)}`,
|
|
1695
1747
|
);
|
|
1696
1748
|
}
|
|
1749
|
+
const orgId = connectedOrganizationId(cfg, repaired.data);
|
|
1697
1750
|
writeJsonFileAtomic(path.join(inst.path, "egregore.json"), {
|
|
1698
1751
|
...cfg,
|
|
1752
|
+
...(orgId ? { org_id: orgId } : {}),
|
|
1699
1753
|
mode: "connected",
|
|
1700
1754
|
api_url: repaired.data.api_url,
|
|
1701
1755
|
});
|
|
@@ -1751,16 +1805,18 @@ async function cmdConnect(args) {
|
|
|
1751
1805
|
// Local installs may have skipped platform registration (DO_NOT_TRACK
|
|
1752
1806
|
// gates it as telemetry). Connect requires it functionally, and choosing
|
|
1753
1807
|
// Connect is the consent — register on demand. Idempotent for members of
|
|
1754
|
-
// already-registered orgs
|
|
1755
|
-
// through to the billing-actor check on intent creation.
|
|
1808
|
+
// already-registered orgs. Identity conflicts must stop before checkout.
|
|
1756
1809
|
const registration = await connectedApiRequest(githubToken, "POST", "/api/org/register", {
|
|
1757
1810
|
org_name: cfg.org_name || inst.slug,
|
|
1758
1811
|
github_org: cfg.github_org || "",
|
|
1759
1812
|
slug: cfg.slug || inst.slug,
|
|
1813
|
+
...(cfg.org_id && !String(cfg.org_id).startsWith("legacy-org:") ? { org_id: cfg.org_id } : {}),
|
|
1814
|
+
repo_name: cfg.repo_name || "egregore",
|
|
1760
1815
|
});
|
|
1761
|
-
if (registration.status !== 200
|
|
1816
|
+
if (registration.status !== 200) {
|
|
1762
1817
|
die(`could not register this Egregore with the platform: ${connectError(registration, `HTTP ${registration.status}`)}`);
|
|
1763
1818
|
}
|
|
1819
|
+
expectedOrgId = connectedOrganizationId(cfg, registration.data);
|
|
1764
1820
|
console.log(` [1/5] ${DIM}Creating connection intent…${RESET}`);
|
|
1765
1821
|
const checkout = await connectedApiRequest(
|
|
1766
1822
|
githubToken,
|
|
@@ -1774,6 +1830,7 @@ async function cmdConnect(args) {
|
|
|
1774
1830
|
mode: cfg.mode || "local",
|
|
1775
1831
|
repo_name: cfg.repo_name || "",
|
|
1776
1832
|
managed_repo_count: Array.isArray(cfg.repos) ? cfg.repos.length : 0,
|
|
1833
|
+
hosted_memory_sync: hostedMemorySyncEnabled(cfg),
|
|
1777
1834
|
fresh,
|
|
1778
1835
|
},
|
|
1779
1836
|
},
|
|
@@ -1786,6 +1843,7 @@ async function cmdConnect(args) {
|
|
|
1786
1843
|
connectUrl = checkout.data.connect_url;
|
|
1787
1844
|
persistConnectState(inst, {
|
|
1788
1845
|
intent_id: intentId,
|
|
1846
|
+
org_id: expectedOrgId,
|
|
1789
1847
|
connect_ticket: checkout.data.connect_ticket,
|
|
1790
1848
|
connect_ticket_expires_at: checkout.data.connect_ticket_expires_at,
|
|
1791
1849
|
connect_url: connectUrl,
|
|
@@ -1793,6 +1851,17 @@ async function cmdConnect(args) {
|
|
|
1793
1851
|
});
|
|
1794
1852
|
console.log(` [1/5] ${GREEN}✓${RESET} Connection intent`);
|
|
1795
1853
|
} else {
|
|
1854
|
+
if (!expectedOrgId) {
|
|
1855
|
+
const registration = await connectedApiRequest(githubToken, "POST", "/api/org/register", {
|
|
1856
|
+
org_name: cfg.org_name || inst.slug, github_org: cfg.github_org || "",
|
|
1857
|
+
slug: cfg.slug || inst.slug, repo_name: cfg.repo_name || "egregore",
|
|
1858
|
+
});
|
|
1859
|
+
if (registration.status !== 200) {
|
|
1860
|
+
die(`could not confirm this Egregore's identity: ${connectError(registration, `HTTP ${registration.status}`)}`);
|
|
1861
|
+
}
|
|
1862
|
+
expectedOrgId = connectedOrganizationId(cfg, registration.data);
|
|
1863
|
+
persistConnectState(inst, { org_id: expectedOrgId });
|
|
1864
|
+
}
|
|
1796
1865
|
console.log(` [1/5] ${GREEN}✓${RESET} Resuming connection intent`);
|
|
1797
1866
|
}
|
|
1798
1867
|
|
|
@@ -1852,8 +1921,11 @@ async function cmdConnect(args) {
|
|
|
1852
1921
|
const configFile = path.join(inst.path, "egregore.json");
|
|
1853
1922
|
const envFile = path.join(inst.path, ".env");
|
|
1854
1923
|
const currentConfig = readJsonFile(configFile);
|
|
1924
|
+
const orgId = connectedOrganizationId({ ...currentConfig, org_id: expectedOrgId || currentConfig.org_id }, claim.data);
|
|
1925
|
+
const syncEnabled = hostedMemorySyncEnabled(currentConfig);
|
|
1855
1926
|
writeJsonFileAtomic(configFile, {
|
|
1856
1927
|
...currentConfig,
|
|
1928
|
+
...(orgId ? { org_id: orgId } : {}),
|
|
1857
1929
|
mode: "connected",
|
|
1858
1930
|
api_url: claim.data.api_url,
|
|
1859
1931
|
});
|
|
@@ -1864,19 +1936,22 @@ async function cmdConnect(args) {
|
|
|
1864
1936
|
status: "backfilling",
|
|
1865
1937
|
activation_protocol: claim.data.activation_protocol,
|
|
1866
1938
|
});
|
|
1867
|
-
console.log(` [4/5] ${GREEN}✓${RESET}
|
|
1939
|
+
console.log(` [4/5] ${GREEN}✓${RESET} Hosted access and organization ready`);
|
|
1868
1940
|
|
|
1869
1941
|
let backfillSummary = { replayed: true };
|
|
1870
1942
|
if (fresh) {
|
|
1871
1943
|
// Fresh install — no existing memory to project; skip the replay entirely.
|
|
1872
|
-
console.log(` [5/5] ${GREEN}✓${RESET} Fresh instance —
|
|
1944
|
+
console.log(` [5/5] ${GREEN}✓${RESET} Fresh instance — no existing memory to sync`);
|
|
1873
1945
|
backfillSummary = { fresh: true, replayed: false };
|
|
1946
|
+
} else if (!syncEnabled) {
|
|
1947
|
+
backfillSummary = { replayed: false, reason: "local_memory" };
|
|
1948
|
+
console.log(` [5/5] ${GREEN}✓${RESET} Memory and retrieval remain local`);
|
|
1874
1949
|
} else {
|
|
1875
1950
|
const syncScript = path.join(inst.path, "bin", "sync-graph.sh");
|
|
1876
1951
|
if (!fs.existsSync(syncScript)) {
|
|
1877
|
-
die("
|
|
1952
|
+
die("The memory sync adapter is missing. Update the installed Egregore version, then run egregore connect again.");
|
|
1878
1953
|
}
|
|
1879
|
-
console.log(` [5/5] ${CYAN}◦${RESET}
|
|
1954
|
+
console.log(` [5/5] ${CYAN}◦${RESET} Syncing existing memory with hosted services…`);
|
|
1880
1955
|
console.log(` ${DIM}Scanning sessions, artifacts, quests, and ingest history${RESET}`);
|
|
1881
1956
|
const sync = spawnSync("bash", [syncScript], {
|
|
1882
1957
|
cwd: inst.path,
|
|
@@ -1885,8 +1960,8 @@ async function cmdConnect(args) {
|
|
|
1885
1960
|
timeout: 10 * 60 * 1000,
|
|
1886
1961
|
});
|
|
1887
1962
|
if (sync.status !== 0) {
|
|
1888
|
-
const detail = (sync.stderr || sync.stdout || "
|
|
1889
|
-
die(`Connected is configured, but
|
|
1963
|
+
const detail = adapterErrorText(sync.stderr || sync.stdout || "memory sync failed").trim();
|
|
1964
|
+
die(`Connected is configured, but memory sync did not finish.\n ${detail}\n Run egregore connect ${inst.slug} to retry; existing data is unchanged.`);
|
|
1890
1965
|
}
|
|
1891
1966
|
try { backfillSummary = JSON.parse((sync.stdout || "").trim()); } catch {}
|
|
1892
1967
|
}
|
|
@@ -1903,15 +1978,15 @@ async function cmdConnect(args) {
|
|
|
1903
1978
|
await sleep(250 * (attempt + 1));
|
|
1904
1979
|
}
|
|
1905
1980
|
if (complete.status !== 200) {
|
|
1906
|
-
die(`
|
|
1981
|
+
die(`Hosted access is configured, but activation could not be finalized: ${connectError(complete, `HTTP ${complete.status}`)}`);
|
|
1907
1982
|
}
|
|
1908
1983
|
persistConnectState(inst, {
|
|
1909
1984
|
status: "connected",
|
|
1910
1985
|
connected_at: new Date().toISOString(),
|
|
1911
1986
|
backfill_summary: backfillSummary,
|
|
1912
1987
|
});
|
|
1913
|
-
if (!fresh) {
|
|
1914
|
-
console.log(` [5/5] ${GREEN}✓${RESET} Existing memory
|
|
1988
|
+
if (!fresh && syncEnabled) {
|
|
1989
|
+
console.log(` [5/5] ${GREEN}✓${RESET} Existing memory synced with hosted services`);
|
|
1915
1990
|
for (const line of backfillSummaryLines(backfillSummary)) {
|
|
1916
1991
|
console.log(` ${DIM}${line}${RESET}`);
|
|
1917
1992
|
}
|
|
@@ -2345,43 +2420,23 @@ function settingsDump(inst) {
|
|
|
2345
2420
|
// explicit verbs — one source of truth, no JS reimplementation.
|
|
2346
2421
|
|
|
2347
2422
|
const RUNTIME_MVP_VERSION_RE = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)-runtime-mvp\.(0|[1-9]\d*)$/;
|
|
2348
|
-
const
|
|
2349
|
-
|| "https://registry.npmjs.org/create-egregore/runtime-mvp";
|
|
2423
|
+
const RUNTIME_STABLE_VERSION_RE = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/;
|
|
2350
2424
|
|
|
2351
|
-
function
|
|
2352
|
-
return
|
|
2425
|
+
function isRuntimeCandidate(version) {
|
|
2426
|
+
return typeof version === "string"
|
|
2427
|
+
&& (RUNTIME_MVP_VERSION_RE.test(version) || RUNTIME_STABLE_VERSION_RE.test(version))
|
|
2428
|
+
&& parseReleaseVersion(version).parts.every(Number.isSafeInteger)
|
|
2429
|
+
&& compareReleaseVersions(version, "0.21.0-runtime-mvp.0") >= 0;
|
|
2353
2430
|
}
|
|
2354
2431
|
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
// connection is for. Mirror the shell gate (bin/search.sh): stable org
|
|
2358
|
-
// identity composed with the main installation path keys the activation
|
|
2359
|
-
// record; only a real record flips the wording.
|
|
2360
|
-
function upgradedGraphRetrievalOff(instPath) {
|
|
2361
|
-
try {
|
|
2362
|
-
const cfg = JSON.parse(fs.readFileSync(path.join(instPath, "egregore.json"), "utf-8"));
|
|
2363
|
-
const orgId = String(cfg.org_id || "").trim();
|
|
2364
|
-
if (!orgId) return false;
|
|
2365
|
-
let main = instPath;
|
|
2366
|
-
const gitFile = path.join(instPath, ".git");
|
|
2367
|
-
if (fs.existsSync(gitFile) && fs.statSync(gitFile).isFile()) {
|
|
2368
|
-
const m = /^gitdir: (.*)$/m.exec(fs.readFileSync(gitFile, "utf-8"));
|
|
2369
|
-
if (m && m[1].includes("/.git/worktrees/")) main = m[1].split("/.git/worktrees/")[0];
|
|
2370
|
-
}
|
|
2371
|
-
main = fs.realpathSync(main);
|
|
2372
|
-
const key = crypto.createHash("sha256").update(`${orgId}|${main}`).digest("hex").slice(0, 16);
|
|
2373
|
-
const base = process.env.EGREGORE_UPGRADE_ROOT || path.join(os.homedir(), ".egregore", "runtime", "upgrade");
|
|
2374
|
-
const record = JSON.parse(fs.readFileSync(path.join(base, key, "active.json"), "utf-8"));
|
|
2375
|
-
return record.retrieval === "runtime-qmd";
|
|
2376
|
-
} catch {
|
|
2377
|
-
return false;
|
|
2378
|
-
}
|
|
2432
|
+
function upgradeScriptPath(inst) {
|
|
2433
|
+
return path.join(inst.path, "bin", "runtime-upgrade.sh");
|
|
2379
2434
|
}
|
|
2380
2435
|
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2436
|
+
// Connected describes the hosted service relationship. Retrieval health is
|
|
2437
|
+
// shown separately in Runtime settings, including on fresh installations.
|
|
2438
|
+
function connectedModeSuffix() {
|
|
2439
|
+
return "· hosted services";
|
|
2385
2440
|
}
|
|
2386
2441
|
|
|
2387
2442
|
// An instance that predates the bridge (0.20.1 and earlier) is still
|
|
@@ -2407,8 +2462,23 @@ function packagedUpgradeScript() {
|
|
|
2407
2462
|
|
|
2408
2463
|
function resolveUpgradeBridge(inst) {
|
|
2409
2464
|
const own = upgradeScriptPath(inst);
|
|
2410
|
-
if (fs.existsSync(own)) return { script: own, env: {} };
|
|
2411
2465
|
const packaged = packagedUpgradeScript();
|
|
2466
|
+
if (fs.existsSync(own)) {
|
|
2467
|
+
// Older MVP engines reject stable versions. Probe without identity setup
|
|
2468
|
+
// or state writes; use the launcher's engine for the entire transaction
|
|
2469
|
+
// when the installed engine predates this protocol advertisement.
|
|
2470
|
+
if (!packaged || !fs.existsSync(packaged)) return { script: own, env: { EGREGORE_INSTANCE_ROOT: inst.path } };
|
|
2471
|
+
try {
|
|
2472
|
+
const probe = spawnSync("bash", upgradeBridgeArgs({ script: own }, ["capabilities"]), {
|
|
2473
|
+
cwd: inst.path, encoding: "utf-8", timeout: 2000,
|
|
2474
|
+
env: { ...process.env, EGREGORE_INSTANCE_ROOT: inst.path },
|
|
2475
|
+
});
|
|
2476
|
+
const capability = probe.status === 0 ? JSON.parse(probe.stdout) : null;
|
|
2477
|
+
if (capability?.upgrade_protocol === 1 && capability.stable_candidates === true) {
|
|
2478
|
+
return { script: own, env: { EGREGORE_INSTANCE_ROOT: inst.path } };
|
|
2479
|
+
}
|
|
2480
|
+
} catch { /* Missing/legacy capability response uses the packaged engine. */ }
|
|
2481
|
+
}
|
|
2412
2482
|
if (packaged && fs.existsSync(packaged)) {
|
|
2413
2483
|
return { script: packaged, env: { EGREGORE_INSTANCE_ROOT: inst.path } };
|
|
2414
2484
|
}
|
|
@@ -2499,8 +2569,8 @@ function formatPrivacyLines(snapshot) {
|
|
|
2499
2569
|
lines.push(`Personal read roots: ${personalRoots.length ? personalRoots.join(", ") : "none"}`);
|
|
2500
2570
|
lines.push(
|
|
2501
2571
|
snapshot.graph_retrieval === "not-used-by-this-runtime"
|
|
2502
|
-
? "
|
|
2503
|
-
: "
|
|
2572
|
+
? "Search: local to this Egregore"
|
|
2573
|
+
: "Search: check Runtime status",
|
|
2504
2574
|
);
|
|
2505
2575
|
return lines;
|
|
2506
2576
|
}
|
|
@@ -2619,14 +2689,20 @@ function retrievalHealthAsync(inst, cb) {
|
|
|
2619
2689
|
} catch { cb(null); }
|
|
2620
2690
|
}
|
|
2621
2691
|
|
|
2622
|
-
//
|
|
2623
|
-
//
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2692
|
+
// Stable is the default even for an existing MVP installation. Testing the
|
|
2693
|
+
// prerelease channel requires an explicit selection; dist-tags never reach init.
|
|
2694
|
+
async function fetchRuntimeCandidate() {
|
|
2695
|
+
const channel = process.env.EGREGORE_RUNTIME_CHANNEL || "stable";
|
|
2696
|
+
if (!["stable", "runtime-mvp"].includes(channel)) return null;
|
|
2697
|
+
const mvp = channel === "runtime-mvp";
|
|
2698
|
+
const accepts = (version) => isRuntimeCandidate(version)
|
|
2699
|
+
&& (mvp ? RUNTIME_MVP_VERSION_RE : RUNTIME_STABLE_VERSION_RE).test(version);
|
|
2700
|
+
const seeded = process.env[mvp ? "EGREGORE_RUNTIME_MVP_CANDIDATE" : "EGREGORE_RUNTIME_STABLE_CANDIDATE"];
|
|
2701
|
+
if (seeded !== undefined) return accepts(seeded) ? seeded : null;
|
|
2702
|
+
const registryUrl = process.env[mvp ? "EGREGORE_RUNTIME_MVP_REGISTRY_URL" : "EGREGORE_RUNTIME_STABLE_REGISTRY_URL"]
|
|
2703
|
+
|| `https://registry.npmjs.org/create-egregore/${mvp ? "runtime-mvp" : "latest"}`;
|
|
2628
2704
|
try {
|
|
2629
|
-
const url = new URL(
|
|
2705
|
+
const url = new URL(registryUrl);
|
|
2630
2706
|
const result = await requestJson({
|
|
2631
2707
|
hostname: url.hostname,
|
|
2632
2708
|
port: url.port || undefined,
|
|
@@ -2638,7 +2714,7 @@ async function fetchRuntimeMvpCandidate() {
|
|
|
2638
2714
|
headers: { Accept: "application/json" },
|
|
2639
2715
|
});
|
|
2640
2716
|
const version = result.status === 200 && result.data && result.data.version;
|
|
2641
|
-
return
|
|
2717
|
+
return accepts(version) ? version : null;
|
|
2642
2718
|
} catch {
|
|
2643
2719
|
return null;
|
|
2644
2720
|
}
|
|
@@ -2649,6 +2725,7 @@ async function fetchRuntimeMvpCandidate() {
|
|
|
2649
2725
|
// staged must not dead-end into a CLI instruction referencing a tarball the
|
|
2650
2726
|
// user does not have — the registry has it, digest-verified.
|
|
2651
2727
|
function fetchCandidateTarball(version, cb) {
|
|
2728
|
+
if (!isRuntimeCandidate(version)) return cb(new Error("an exact supported Runtime version is required"));
|
|
2652
2729
|
const metaUrl = new URL(`https://registry.npmjs.org/${PUBLIC_NPX_PACKAGE}/${version}`);
|
|
2653
2730
|
requestJson({
|
|
2654
2731
|
hostname: metaUrl.hostname,
|
|
@@ -2659,7 +2736,12 @@ function fetchCandidateTarball(version, cb) {
|
|
|
2659
2736
|
headers: { Accept: "application/json" },
|
|
2660
2737
|
}).then((meta) => {
|
|
2661
2738
|
const dist = meta && meta.status === 200 && meta.data && meta.data.dist;
|
|
2662
|
-
if (!dist || !dist.tarball
|
|
2739
|
+
if (!dist || !dist.tarball || meta.data.name !== PUBLIC_NPX_PACKAGE || meta.data.version !== version) {
|
|
2740
|
+
return cb(new Error(`candidate ${version} not found on the registry`));
|
|
2741
|
+
}
|
|
2742
|
+
if (typeof dist.integrity !== "string" || !/^sha512-[A-Za-z0-9+/]{86}==$/.test(dist.integrity)) {
|
|
2743
|
+
return cb(new Error("candidate sha512 integrity is missing or invalid — refusing to stage"));
|
|
2744
|
+
}
|
|
2663
2745
|
const dest = path.join(os.tmpdir(), `egregore-candidate-${version}.tgz`);
|
|
2664
2746
|
const fetchTarball = (url, redirects) => {
|
|
2665
2747
|
https.get(url, { headers: { "User-Agent": "egregore-launcher" } }, (res) => {
|
|
@@ -2710,7 +2792,7 @@ const UPGRADE_STATUS_LABEL = {
|
|
|
2710
2792
|
// transaction state, not the condition the user needs to see.
|
|
2711
2793
|
function runtimeUpdateAvailable(st, candidate) {
|
|
2712
2794
|
return st?.status === "active"
|
|
2713
|
-
&&
|
|
2795
|
+
&& isRuntimeCandidate(candidate)
|
|
2714
2796
|
&& compareReleaseVersions(candidate, st.active_version) > 0;
|
|
2715
2797
|
}
|
|
2716
2798
|
|
|
@@ -2766,14 +2848,14 @@ function formatUpgradeLines(inst, st, { candidate = "", retrieval = null } = {})
|
|
|
2766
2848
|
// A recorded failure only needs attention while the transaction is stuck
|
|
2767
2849
|
// on it; once a later prepare succeeds the line would contradict "ready".
|
|
2768
2850
|
if (d.failure && d.failure.message && (["failed", "interrupted", "unavailable"].includes(d.status))) {
|
|
2769
|
-
lines.push(`Attention: ${d.failure.message}`);
|
|
2851
|
+
lines.push(`Attention: ${adapterErrorText(d.failure.message)}`);
|
|
2770
2852
|
}
|
|
2771
2853
|
if (d.rollback_version && d.status !== "none") lines.push(`Rollback target: ${d.rollback_version}`);
|
|
2772
2854
|
const ts = d.team_sync;
|
|
2773
2855
|
if (ts && ts.label) lines.push(`Team memory: ${ts.label}`);
|
|
2774
2856
|
if (d.status === "active") {
|
|
2775
2857
|
lines.push("Organizational retrieval: Runtime/QMD");
|
|
2776
|
-
lines.push("
|
|
2858
|
+
lines.push("Search: local to this Egregore");
|
|
2777
2859
|
} else if (d.status !== "none") {
|
|
2778
2860
|
lines.push("Previous Runtime remains active until activation.");
|
|
2779
2861
|
}
|
|
@@ -2802,10 +2884,10 @@ function formatUpgradeLines(inst, st, { candidate = "", retrieval = null } = {})
|
|
|
2802
2884
|
parts.push(`${upgradeElapsed(d)} elapsed`);
|
|
2803
2885
|
detail = ` — ${parts.join(" · ")}`;
|
|
2804
2886
|
} else if (stage.state === "done" && stage.detail) {
|
|
2805
|
-
detail = ` — ${stage.detail}`;
|
|
2887
|
+
detail = ` — ${adapterErrorText(stage.detail)}`;
|
|
2806
2888
|
}
|
|
2807
2889
|
} else if (stage.state === "failed" && stage.detail) {
|
|
2808
|
-
detail = ` — ${stage.detail}`;
|
|
2890
|
+
detail = ` — ${adapterErrorText(stage.detail)}`;
|
|
2809
2891
|
}
|
|
2810
2892
|
lines.push(` ${glyph} ${stage.label}${detail}`);
|
|
2811
2893
|
}
|
|
@@ -2825,7 +2907,7 @@ const UPGRADE_CHANGES = [
|
|
|
2825
2907
|
"Runtime version",
|
|
2826
2908
|
"Organizational retrieval moves to Runtime/QMD",
|
|
2827
2909
|
"Keyword and meaning search become owned by this Egregore",
|
|
2828
|
-
"
|
|
2910
|
+
"Previous search is replaced after activation (kept for rollback)",
|
|
2829
2911
|
"Cross-session continuity uses the new Runtime",
|
|
2830
2912
|
"Readiness and synchronization become visible here in Settings",
|
|
2831
2913
|
];
|
|
@@ -2852,22 +2934,28 @@ async function cmdSettingsRuntime(inst, args) {
|
|
|
2852
2934
|
if (action === "init") {
|
|
2853
2935
|
const version = (args[1] || "").trim();
|
|
2854
2936
|
const tarball = (args[2] || "").trim();
|
|
2855
|
-
if (!
|
|
2856
|
-
process.stderr.write("Runtime update needs an exact
|
|
2937
|
+
if (!isRuntimeCandidate(version)) {
|
|
2938
|
+
process.stderr.write("Runtime update needs an exact version like 0.21.0 or 0.21.0-runtime-mvp.1.\n");
|
|
2857
2939
|
process.exitCode = 1; return;
|
|
2858
2940
|
}
|
|
2859
2941
|
if (!tarball || !fs.existsSync(tarball)) {
|
|
2860
2942
|
process.stderr.write("Runtime update installs actual packaged bytes: egregore settings <slug> runtime init <version> <candidate.tgz>\n");
|
|
2861
2943
|
process.exitCode = 1; return;
|
|
2862
2944
|
}
|
|
2945
|
+
const current = upgradeStatus(inst);
|
|
2946
|
+
if (!current || current.status === "unavailable" || (current.active_version && (!parseReleaseVersion(current.active_version)
|
|
2947
|
+
|| compareReleaseVersions(version, current.active_version) <= 0))) {
|
|
2948
|
+
process.stderr.write("Runtime update requires a version newer than the verified active version; use rollback for recovery.\n");
|
|
2949
|
+
process.exitCode = 1; return;
|
|
2950
|
+
}
|
|
2863
2951
|
const r = runUpgrade(inst, ["init", "--candidate", version, "--tarball", path.resolve(tarball)]);
|
|
2864
|
-
if (r.status !== 0) { process.stderr.write(r.stderr || "could not stage the candidate\n"); process.exitCode = r.status; return; }
|
|
2952
|
+
if (r.status !== 0) { process.stderr.write(adapterErrorText(r.stderr || "could not stage the candidate\n")); process.exitCode = r.status; return; }
|
|
2865
2953
|
emit(upgradeStatus(inst) || null);
|
|
2866
2954
|
return;
|
|
2867
2955
|
}
|
|
2868
2956
|
if (["prepare", "activate", "cancel", "rollback"].includes(action)) {
|
|
2869
2957
|
const r = runUpgrade(inst, [action]);
|
|
2870
|
-
if (r.status !== 0) { process.stderr.write(r.stderr || `${action} failed\n`); process.exitCode = r.status; return; }
|
|
2958
|
+
if (r.status !== 0) { process.stderr.write(adapterErrorText(r.stderr || `${action} failed\n`)); process.exitCode = r.status; return; }
|
|
2871
2959
|
const st = upgradeStatus(inst);
|
|
2872
2960
|
emit(st);
|
|
2873
2961
|
if (action === "activate" && st && st.status === "active") {
|
|
@@ -3975,17 +4063,17 @@ async function browser(args = {}) {
|
|
|
3975
4063
|
const r = runUpgrade(inst, ["prepare"]);
|
|
3976
4064
|
state.upgradeNotice = r.status === 0
|
|
3977
4065
|
? `${DIM}Preparing in the background — safe to leave this screen.${RESET}`
|
|
3978
|
-
: `${YELLOW}${(r.stderr || "prepare failed").trim().split("\n")[0]}${RESET}`;
|
|
4066
|
+
: `${YELLOW}${adapterErrorText(r.stderr || "prepare failed").trim().split("\n")[0]}${RESET}`;
|
|
3979
4067
|
} else if (mode === "confirm-activate") {
|
|
3980
4068
|
const r = runUpgrade(inst, ["activate"]);
|
|
3981
4069
|
state.upgradeNotice = r.status === 0
|
|
3982
4070
|
? `${GREEN}Update complete. Start a session to work on the new Runtime.${RESET}`
|
|
3983
|
-
: `${YELLOW}${(r.stderr || "activation refused — a gate has not passed").trim().split("\n")[0]}${RESET}`;
|
|
4071
|
+
: `${YELLOW}${adapterErrorText(r.stderr || "activation refused — a gate has not passed").trim().split("\n")[0]}${RESET}`;
|
|
3984
4072
|
} else if (mode === "confirm-rollback") {
|
|
3985
4073
|
const r = runUpgrade(inst, ["rollback"]);
|
|
3986
4074
|
state.upgradeNotice = r.status === 0
|
|
3987
4075
|
? `${DIM}Rolled back. The previous Runtime is active again.${RESET}`
|
|
3988
|
-
: `${YELLOW}${(r.stderr || "rollback failed").trim().split("\n")[0]}${RESET}`;
|
|
4076
|
+
: `${YELLOW}${adapterErrorText(r.stderr || "rollback failed").trim().split("\n")[0]}${RESET}`;
|
|
3989
4077
|
} else if (mode === "confirm-cancel") {
|
|
3990
4078
|
runUpgrade(inst, ["cancel"]);
|
|
3991
4079
|
state.upgradeNotice = `${DIM}Preparation cancelled. The current Runtime was never touched.${RESET}`;
|
|
@@ -4008,8 +4096,10 @@ async function browser(args = {}) {
|
|
|
4008
4096
|
&& state.upgradeData.candidate_version;
|
|
4009
4097
|
if (!staged) {
|
|
4010
4098
|
const candidate = state.upgradeCandidate;
|
|
4011
|
-
if (!candidate
|
|
4012
|
-
|
|
4099
|
+
if (!candidate || (state.upgradeData?.active_version
|
|
4100
|
+
&& (!parseReleaseVersion(state.upgradeData.active_version)
|
|
4101
|
+
|| compareReleaseVersions(candidate, state.upgradeData.active_version) <= 0))) {
|
|
4102
|
+
state.upgradeNotice = `${DIM}No published candidate found. Stage one manually: egregore settings ${state.upgradeInst.slug} runtime init <version> <candidate.tgz>${RESET}`;
|
|
4013
4103
|
render(); return;
|
|
4014
4104
|
}
|
|
4015
4105
|
if (state.upgradeFetching) { render(); return; }
|
|
@@ -4026,7 +4116,7 @@ async function browser(args = {}) {
|
|
|
4026
4116
|
}
|
|
4027
4117
|
const r = runUpgrade(inst, ["init", "--candidate", candidate, "--tarball", tgz]);
|
|
4028
4118
|
if (r === null || r.status !== 0) {
|
|
4029
|
-
const detail = ((r && (r.stderr || r.stdout)) || "staging failed").trim().split("\n")[0];
|
|
4119
|
+
const detail = adapterErrorText((r && (r.stderr || r.stdout)) || "staging failed").trim().split("\n")[0];
|
|
4030
4120
|
state.upgradeNotice = `${YELLOW}${detail}${RESET}`;
|
|
4031
4121
|
render(); return;
|
|
4032
4122
|
}
|
|
@@ -4326,7 +4416,7 @@ async function browser(args = {}) {
|
|
|
4326
4416
|
});
|
|
4327
4417
|
refreshUpgrade();
|
|
4328
4418
|
if (!state.upgradeCandidate) {
|
|
4329
|
-
|
|
4419
|
+
fetchRuntimeCandidate().then((v) => {
|
|
4330
4420
|
state.upgradeCandidate = v || "";
|
|
4331
4421
|
if (state.upgradeInst) render();
|
|
4332
4422
|
});
|
|
@@ -4620,7 +4710,7 @@ async function browser(args = {}) {
|
|
|
4620
4710
|
if (state.settingsInst === pick && !state.upgradeInst) render();
|
|
4621
4711
|
});
|
|
4622
4712
|
if (!state.upgradeCandidate) {
|
|
4623
|
-
|
|
4713
|
+
fetchRuntimeCandidate().then((v) => {
|
|
4624
4714
|
state.upgradeCandidate = v || "";
|
|
4625
4715
|
if (state.settingsInst === pick && !state.upgradeInst) render();
|
|
4626
4716
|
});
|
package/lib/api.js
CHANGED
|
@@ -99,10 +99,10 @@ class EgregoreAPI {
|
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
async registerOrg(githubToken, { org_name, github_org, slug, flow_variant }) {
|
|
102
|
+
async registerOrg(githubToken, { org_name, github_org, slug, flow_variant, org_id, repo_name }) {
|
|
103
103
|
return request("POST", `${this.base}/api/org/register`, {
|
|
104
104
|
headers: { Authorization: `Bearer ${githubToken}` },
|
|
105
|
-
body: { org_name, github_org, slug, ...(flow_variant ? { flow_variant } : {}) },
|
|
105
|
+
body: { org_name, github_org, slug, ...(org_id ? { org_id } : {}), ...(repo_name ? { repo_name } : {}), ...(flow_variant ? { flow_variant } : {}) },
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
108
|
|