instar 1.3.489 → 1.3.491
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/dashboard/index.html +30 -0
- package/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +1124 -28
- package/dist/commands/server.js.map +1 -1
- package/dist/config/ConfigDefaults.d.ts.map +1 -1
- package/dist/config/ConfigDefaults.js +23 -0
- package/dist/config/ConfigDefaults.js.map +1 -1
- package/dist/core/CodexResumeMap.d.ts +95 -0
- package/dist/core/CodexResumeMap.d.ts.map +1 -0
- package/dist/core/CodexResumeMap.js +283 -0
- package/dist/core/CodexResumeMap.js.map +1 -0
- package/dist/core/GuardPostureStore.d.ts +38 -0
- package/dist/core/GuardPostureStore.d.ts.map +1 -0
- package/dist/core/GuardPostureStore.js +87 -0
- package/dist/core/GuardPostureStore.js.map +1 -0
- package/dist/core/MachinePoolRegistry.d.ts +16 -0
- package/dist/core/MachinePoolRegistry.d.ts.map +1 -1
- package/dist/core/MachinePoolRegistry.js +24 -1
- package/dist/core/MachinePoolRegistry.js.map +1 -1
- package/dist/core/MeshRpc.d.ts +3 -0
- package/dist/core/MeshRpc.d.ts.map +1 -1
- package/dist/core/MeshRpc.js +5 -0
- package/dist/core/MeshRpc.js.map +1 -1
- package/dist/core/ModelSwapService.d.ts +26 -11
- package/dist/core/ModelSwapService.d.ts.map +1 -1
- package/dist/core/ModelSwapService.js +59 -21
- package/dist/core/ModelSwapService.js.map +1 -1
- package/dist/core/PeerPresencePuller.d.ts +9 -0
- package/dist/core/PeerPresencePuller.d.ts.map +1 -1
- package/dist/core/PeerPresencePuller.js +1 -1
- package/dist/core/PeerPresencePuller.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts +16 -0
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +92 -4
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/SessionManager.d.ts +4 -0
- package/dist/core/SessionManager.d.ts.map +1 -1
- package/dist/core/SessionManager.js +3 -0
- package/dist/core/SessionManager.js.map +1 -1
- package/dist/core/SessionRefresh.d.ts +36 -7
- package/dist/core/SessionRefresh.d.ts.map +1 -1
- package/dist/core/SessionRefresh.js +90 -29
- package/dist/core/SessionRefresh.js.map +1 -1
- package/dist/core/TopicProfileOrchestrator.d.ts +480 -0
- package/dist/core/TopicProfileOrchestrator.d.ts.map +1 -0
- package/dist/core/TopicProfileOrchestrator.js +1404 -0
- package/dist/core/TopicProfileOrchestrator.js.map +1 -0
- package/dist/core/TopicProfileResolver.d.ts +104 -0
- package/dist/core/TopicProfileResolver.d.ts.map +1 -0
- package/dist/core/TopicProfileResolver.js +231 -0
- package/dist/core/TopicProfileResolver.js.map +1 -0
- package/dist/core/TopicProfileStore.d.ts +308 -0
- package/dist/core/TopicProfileStore.d.ts.map +1 -0
- package/dist/core/TopicProfileStore.js +781 -0
- package/dist/core/TopicProfileStore.js.map +1 -0
- package/dist/core/TopicProfileTransferCarrier.d.ts +227 -0
- package/dist/core/TopicProfileTransferCarrier.d.ts.map +1 -0
- package/dist/core/TopicProfileTransferCarrier.js +533 -0
- package/dist/core/TopicProfileTransferCarrier.js.map +1 -0
- package/dist/core/TopicResumeMap.d.ts +67 -1
- package/dist/core/TopicResumeMap.d.ts.map +1 -1
- package/dist/core/TopicResumeMap.js +114 -1
- package/dist/core/TopicResumeMap.js.map +1 -1
- package/dist/core/classifyProfileChange.d.ts +83 -0
- package/dist/core/classifyProfileChange.d.ts.map +1 -0
- package/dist/core/classifyProfileChange.js +274 -0
- package/dist/core/classifyProfileChange.js.map +1 -0
- package/dist/core/devGatedFeatures.d.ts.map +1 -1
- package/dist/core/devGatedFeatures.js +6 -0
- package/dist/core/devGatedFeatures.js.map +1 -1
- package/dist/core/frameworkSessionLaunch.d.ts +26 -0
- package/dist/core/frameworkSessionLaunch.d.ts.map +1 -1
- package/dist/core/frameworkSessionLaunch.js +58 -0
- package/dist/core/frameworkSessionLaunch.js.map +1 -1
- package/dist/core/slackRefreshBinding.d.ts +83 -0
- package/dist/core/slackRefreshBinding.d.ts.map +1 -0
- package/dist/core/slackRefreshBinding.js +54 -0
- package/dist/core/slackRefreshBinding.js.map +1 -0
- package/dist/core/topicProfileIngress.d.ts +128 -0
- package/dist/core/topicProfileIngress.d.ts.map +1 -0
- package/dist/core/topicProfileIngress.js +249 -0
- package/dist/core/topicProfileIngress.js.map +1 -0
- package/dist/core/topicProfileValidation.d.ts +109 -0
- package/dist/core/topicProfileValidation.d.ts.map +1 -0
- package/dist/core/topicProfileValidation.js +247 -0
- package/dist/core/topicProfileValidation.js.map +1 -0
- package/dist/core/topicProfileWriteSurface.d.ts +222 -0
- package/dist/core/topicProfileWriteSurface.d.ts.map +1 -0
- package/dist/core/topicProfileWriteSurface.js +631 -0
- package/dist/core/topicProfileWriteSurface.js.map +1 -0
- package/dist/core/types.d.ts +66 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/lifeline/TelegramLifeline.d.ts.map +1 -1
- package/dist/lifeline/TelegramLifeline.js +6 -0
- package/dist/lifeline/TelegramLifeline.js.map +1 -1
- package/dist/messaging/TelegramAdapter.d.ts +10 -1
- package/dist/messaging/TelegramAdapter.d.ts.map +1 -1
- package/dist/messaging/TelegramAdapter.js +41 -1
- package/dist/messaging/TelegramAdapter.js.map +1 -1
- package/dist/monitoring/ActiveWorkSilenceSentinel.d.ts +8 -0
- package/dist/monitoring/ActiveWorkSilenceSentinel.d.ts.map +1 -1
- package/dist/monitoring/ActiveWorkSilenceSentinel.js +8 -0
- package/dist/monitoring/ActiveWorkSilenceSentinel.js.map +1 -1
- package/dist/monitoring/ContextWedgeSentinel.d.ts +8 -0
- package/dist/monitoring/ContextWedgeSentinel.d.ts.map +1 -1
- package/dist/monitoring/ContextWedgeSentinel.js +8 -0
- package/dist/monitoring/ContextWedgeSentinel.js.map +1 -1
- package/dist/monitoring/GuardPostureTripwire.d.ts +3 -27
- package/dist/monitoring/GuardPostureTripwire.d.ts.map +1 -1
- package/dist/monitoring/GuardPostureTripwire.js +8 -76
- package/dist/monitoring/GuardPostureTripwire.js.map +1 -1
- package/dist/monitoring/GuardRegistry.d.ts +48 -0
- package/dist/monitoring/GuardRegistry.d.ts.map +1 -0
- package/dist/monitoring/GuardRegistry.js +49 -0
- package/dist/monitoring/GuardRegistry.js.map +1 -0
- package/dist/monitoring/SessionReaper.d.ts +7 -0
- package/dist/monitoring/SessionReaper.d.ts.map +1 -1
- package/dist/monitoring/SessionReaper.js +9 -0
- package/dist/monitoring/SessionReaper.js.map +1 -1
- package/dist/monitoring/SessionWatchdog.d.ts +8 -0
- package/dist/monitoring/SessionWatchdog.d.ts.map +1 -1
- package/dist/monitoring/SessionWatchdog.js +8 -0
- package/dist/monitoring/SessionWatchdog.js.map +1 -1
- package/dist/monitoring/SocketDisconnectSentinel.d.ts +8 -0
- package/dist/monitoring/SocketDisconnectSentinel.d.ts.map +1 -1
- package/dist/monitoring/SocketDisconnectSentinel.js +8 -0
- package/dist/monitoring/SocketDisconnectSentinel.js.map +1 -1
- package/dist/monitoring/guardManifest.d.ts +67 -0
- package/dist/monitoring/guardManifest.d.ts.map +1 -0
- package/dist/monitoring/guardManifest.js +536 -0
- package/dist/monitoring/guardManifest.js.map +1 -0
- package/dist/monitoring/guardPosture.d.ts +77 -0
- package/dist/monitoring/guardPosture.d.ts.map +1 -0
- package/dist/monitoring/guardPosture.js +198 -0
- package/dist/monitoring/guardPosture.js.map +1 -0
- package/dist/monitoring/guardPostureView.d.ts +100 -0
- package/dist/monitoring/guardPostureView.d.ts.map +1 -0
- package/dist/monitoring/guardPostureView.js +294 -0
- package/dist/monitoring/guardPostureView.js.map +1 -0
- package/dist/monitoring/probes/GuardPostureProbe.d.ts +82 -0
- package/dist/monitoring/probes/GuardPostureProbe.d.ts.map +1 -0
- package/dist/monitoring/probes/GuardPostureProbe.js +384 -0
- package/dist/monitoring/probes/GuardPostureProbe.js.map +1 -0
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +18 -0
- package/dist/scaffold/templates.js.map +1 -1
- package/dist/scheduler/JobScheduler.d.ts +10 -0
- package/dist/scheduler/JobScheduler.d.ts.map +1 -1
- package/dist/scheduler/JobScheduler.js +12 -0
- package/dist/scheduler/JobScheduler.js.map +1 -1
- package/dist/server/AgentServer.d.ts +40 -0
- package/dist/server/AgentServer.d.ts.map +1 -1
- package/dist/server/AgentServer.js +54 -3
- package/dist/server/AgentServer.js.map +1 -1
- package/dist/server/CapabilityIndex.d.ts.map +1 -1
- package/dist/server/CapabilityIndex.js +12 -0
- package/dist/server/CapabilityIndex.js.map +1 -1
- package/dist/server/peerUrlGuard.d.ts +35 -0
- package/dist/server/peerUrlGuard.d.ts.map +1 -0
- package/dist/server/peerUrlGuard.js +93 -0
- package/dist/server/peerUrlGuard.js.map +1 -0
- package/dist/server/routes.d.ts +31 -0
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +407 -1
- package/dist/server/routes.js.map +1 -1
- package/package.json +3 -2
- package/scripts/lint-guard-manifest.js +264 -0
- package/src/data/builtin-manifest.json +67 -67
- package/src/data/state-coherence-registry.json +54 -18
- package/src/scaffold/templates.ts +18 -0
- package/upgrades/1.3.490.md +34 -0
- package/upgrades/1.3.491.md +37 -0
- package/upgrades/side-effects/guard-posture-endpoint.md +101 -0
- package/upgrades/side-effects/topic-profile.md +142 -0
|
@@ -3846,8 +3846,11 @@ Beyond the one-awake-machine model: with the pool enabled I run conversations ac
|
|
|
3846
3846
|
// section predate GET /sessions?scope=pool (every session, every machine, each
|
|
3847
3847
|
// tagged with its machine — the dashboard cross-machine sessions list). Append
|
|
3848
3848
|
// the line so deployed agents can answer "what's running across my machines?"
|
|
3849
|
-
// from the API. Idempotent via the unique `scope=pool` marker
|
|
3850
|
-
|
|
3849
|
+
// from the API. Idempotent via the unique `sessions?scope=pool` marker
|
|
3850
|
+
// (route-qualified: other sections legitimately mention `?scope=pool` for
|
|
3851
|
+
// their own routes — e.g. the Guard Posture section's /guards?scope=pool —
|
|
3852
|
+
// so a bare `scope=pool` sniff would falsely block this append).
|
|
3853
|
+
if (content.includes('Multi-Machine Session Pool (active-active') && !content.includes('sessions?scope=pool')) {
|
|
3851
3854
|
const poolSessions = `
|
|
3852
3855
|
- **Every session, every machine:** the dashboard sessions list shows ALL sessions across the pool, each tagged with the machine it runs on. API: \`GET /sessions?scope=pool\` → \`{ sessions: [...each with machineId/machineNickname...], pool: { peersOk, failed } }\`. An unreachable peer degrades to a \`failed\` entry — local sessions always answer.
|
|
3853
3856
|
- **Post-transfer closeout (automatic):** when a topic moves to another machine, the OLD machine's session for it is closed automatically (immediately on an explicit "move", or within ~2 reaper ticks for any other path) — no duplicate sessions doing duplicate work. The close is recorded in the reap-log with reason "topic moved to <machine>"; protected sessions are never auto-closed.
|
|
@@ -3982,6 +3985,31 @@ At every server boot the guard posture (every \`monitoring.*\` enabled flag + \`
|
|
|
3982
3985
|
else {
|
|
3983
3986
|
result.skipped.push('CLAUDE.md: Guard-Posture Tripwire section already present');
|
|
3984
3987
|
}
|
|
3988
|
+
// Guard Posture endpoint (GUARD-POSTURE-ENDPOINT-SPEC §4 Agent Awareness +
|
|
3989
|
+
// §2.5 interim hazard containment). The tripwire section above only covers
|
|
3990
|
+
// boot-time TRANSITIONS; this teaches the steady-state read surface
|
|
3991
|
+
// (GET /guards, ?scope=pool) plus the PATCH /config one-level-deep-merge
|
|
3992
|
+
// hazard (a partial block erases sibling tuning — lived 2026-06-11).
|
|
3993
|
+
// Byte-identical to the generateClaudeMd block (Migration Parity).
|
|
3994
|
+
// Idempotent via content-sniffing on the section heading.
|
|
3995
|
+
if (!content.includes('Guard Posture — which safety systems are genuinely on')) {
|
|
3996
|
+
const section = `
|
|
3997
|
+
### Guard Posture — which safety systems are genuinely on (\`GET /guards\`)
|
|
3998
|
+
|
|
3999
|
+
Every guard (monitoring sentinels, reapers, the scheduler, …) is graded by what can be VERIFIED, never by what the config wishes: \`on-confirmed\` / \`on-unverified\` / \`on-stale\` / \`on-dry-run\` / \`off\` (\`dark-default\` = ships-dark, quiet vs \`diverged-from-default\` = default-on but currently off — the load-shed signature) / \`diverged-pending-restart\` / \`errored\` / \`missing\` / \`off-runtime-divergent\`. Only the "off that shouldn't be off" and runtime-contradiction classes alert — a ships-dark feature that is off is normal, never noise.
|
|
4000
|
+
- This machine: \`curl -H "Authorization: Bearer $AUTH" http://localhost:${port}/guards\`
|
|
4001
|
+
- Every machine (heartbeat-fresh, or last-known posture with its age for a dark peer): \`curl -H "Authorization: Bearer $AUTH" "http://localhost:${port}/guards?scope=pool"\`
|
|
4002
|
+
- **When to use** (PROACTIVE — this is the trigger): "are my guards on?" / "why didn't the watchdog/reaper fire on machine X?" / a post-incident sweep after ANY load-shed → read \`/guards?scope=pool\` and report the deviant rows instead of guessing from config memory. The Machines dashboard tab shows each machine's last-known posture with its age — even for a peer that is currently dark.
|
|
4003
|
+
- **HAZARD — re-enabling a guard via \`PATCH /config\`**: send the guard's FULL config block (the merge is one-level-deep and a partial block erases sibling tuning); read the current block from the source machine first (\`GET /guards\` shows posture; the config block itself comes from that machine's config).
|
|
4004
|
+
- Three complementary layers, one shared inventory: the Guard-Posture Tripwire covers enabled→disabled transitions at boot (\`logs/guard-posture.jsonl\`); \`/guards\` is the steady-state read; the GuardPostureProbe raises ONE aggregated Attention item when an anomaly persists across consecutive probes.
|
|
4005
|
+
`;
|
|
4006
|
+
content += '\n' + section;
|
|
4007
|
+
patched = true;
|
|
4008
|
+
result.upgraded.push('CLAUDE.md: added Guard Posture (/guards) capability section');
|
|
4009
|
+
}
|
|
4010
|
+
else {
|
|
4011
|
+
result.skipped.push('CLAUDE.md: Guard Posture (/guards) capability section already present');
|
|
4012
|
+
}
|
|
3985
4013
|
// AgentWorktreeReaper report (RESPONSIBLE-RESOURCE-USAGE — OS resource hygiene).
|
|
3986
4014
|
// Tells the agent the "which stale worktrees can be reclaimed?" read-surface
|
|
3987
4015
|
// exists. Without it, an agent asked about worktree disk/sprawl has no grounded
|
|
@@ -5018,6 +5046,28 @@ Create worktrees for collaborator repos with \`instar worktree create <branch>\`
|
|
|
5018
5046
|
patched = true;
|
|
5019
5047
|
result.upgraded.push('CLAUDE.md: added import dry-run line to Cutover Readiness section');
|
|
5020
5048
|
}
|
|
5049
|
+
// Topic Profile (TOPIC-PROFILE-SPEC §12) — Agent Awareness backfill. The
|
|
5050
|
+
// conversational triggers are the PRIMARY surface (B2/B36: the agent acts
|
|
5051
|
+
// on intent, never instructs the operator to type /topic — the slash form
|
|
5052
|
+
// is a power-user convenience only), and the READ direction ships in the
|
|
5053
|
+
// same section as Registry-First entries (GET /topic-profile/:topicId +
|
|
5054
|
+
// logs/topic-profile-changes.jsonl) so the agent reads instead of guessing.
|
|
5055
|
+
// Body mirrors generateClaudeMd() (Agent Awareness Standard). Content-
|
|
5056
|
+
// sniffed on the section header, distinctive + stable, so the migration is
|
|
5057
|
+
// idempotent and skips template-generated CLAUDE.md files.
|
|
5058
|
+
if (!content.includes('Topic Profile (per-topic model')) {
|
|
5059
|
+
const section = `
|
|
5060
|
+
**Topic Profile (per-topic model, thinking, framework pins)** — Every conversation topic can carry a durable profile pinning its BASELINE model (an explicit id OR a tier — never both), thinking depth (\`off\`/\`low\`/\`medium\`/\`high\`/\`max\`), and framework (\`claude-code\`/\`codex-cli\`/…). Pins survive restarts and follow the topic. **The conversational surface is PRIMARY** (PROACTIVE — these are the triggers): when the user says "use codex here", "pin this topic to Fable", or "set high thinking on this topic", that IS the request — propose the change back in plain words, confirm, and the pin is durable from then on. NEVER instruct the user to type \`/topic\`; the \`/topic\` command exists only as a power-user convenience.
|
|
5061
|
+
- What is this topic pinned to? \`curl -H "Authorization: Bearer $AUTH" http://localhost:${port}/topic-profile/TOPIC_ID\` — Registry First: read it, never guess (no entry = the topic runs on defaults).
|
|
5062
|
+
- Why/when did a pin change? Read \`logs/topic-profile-changes.jsonl\` — the per-change audit (who set what, when, old → new).
|
|
5063
|
+
- A pinned model/framework that is no longer available falls back to defaults with a once-per-transition notice — the session keeps working; a pin is never a block.
|
|
5064
|
+
- A baseline pin does NOT disable the heavy-work ultra escalation (\`escalationOverride: 'inherit'\` is the default); it steps aside only when the operator explicitly opts the topic out (\`'suppress'\`).
|
|
5065
|
+
- Config: \`.instar/config.json\` → \`topicProfiles\` (\`dryRun\`, debounce windows, stagger cap, breaker threshold; \`defaults\` = per-topic config-default model/thinking). Writes ship dark behind the dev-agent gate with \`dryRun: true\` (intended respawns are logged, not performed); resolution (reads) is always on.
|
|
5066
|
+
`;
|
|
5067
|
+
content += '\n' + section;
|
|
5068
|
+
patched = true;
|
|
5069
|
+
result.upgraded.push('CLAUDE.md: added Topic Profile awareness section');
|
|
5070
|
+
}
|
|
5021
5071
|
if (patched) {
|
|
5022
5072
|
try {
|
|
5023
5073
|
fs.writeFileSync(claudeMdPath, content);
|
|
@@ -5166,6 +5216,11 @@ Create worktrees for collaborator repos with \`instar worktree create <branch>\`
|
|
|
5166
5216
|
// "how much did feature X spend on which model?" or spot audit-blind
|
|
5167
5217
|
// frameworks.
|
|
5168
5218
|
'### Token-Audit Completeness — per-model token breakdown & usage coverage',
|
|
5219
|
+
// Topic Profile (TOPIC-PROFILE-SPEC §12): framework-agnostic — a Codex/
|
|
5220
|
+
// Gemini agent's topics carry pins too, and an agent that never learns
|
|
5221
|
+
// the conversational triggers + read surfaces will guess instead of
|
|
5222
|
+
// reading GET /topic-profile/:topicId (the B2/B36 failure class).
|
|
5223
|
+
'**Topic Profile (per-topic model, thinking, framework pins)**',
|
|
5169
5224
|
];
|
|
5170
5225
|
for (const shadowName of ['AGENTS.md', 'GEMINI.md']) {
|
|
5171
5226
|
const shadowPath = path.join(this.config.projectDir, shadowName);
|
|
@@ -6207,6 +6262,22 @@ Create worktrees for collaborator repos with \`instar worktree create <branch>\`
|
|
|
6207
6262
|
* - .instar/state/pr-cost-ledger.jsonl (daily cost accounting)
|
|
6208
6263
|
* - .instar/state/security.jsonl* (auth + revocation events)
|
|
6209
6264
|
*
|
|
6265
|
+
* Topic Profile (TOPIC-PROFILE-SPEC §12, round-5/6): the profile store
|
|
6266
|
+
* (`state/topic-profiles.json`) and the operator-binding store it
|
|
6267
|
+
* authorizes against (`state/topic-operators.json`) join the same union —
|
|
6268
|
+
* both are durable operator intent, exactly the identity/continuity class
|
|
6269
|
+
* the backup protects (a restore must not produce pins whose bound
|
|
6270
|
+
* operator is absent). The resume maps (topic-resume-map /
|
|
6271
|
+
* codex-resume-map) are machine-local ephemera and deliberately EXCLUDED
|
|
6272
|
+
* — they reference transcripts that don't travel.
|
|
6273
|
+
*
|
|
6274
|
+
* PATH SHAPE IS PINNED (round-6 integration): the topic-profile entries
|
|
6275
|
+
* are stateDir-RELATIVE (`state/...`), NEVER `.instar/state/...` —
|
|
6276
|
+
* BackupManager.createSnapshot() joins each entry onto a stateDir that
|
|
6277
|
+
* already IS `<project>/.instar`, so an `.instar/`-prefixed entry
|
|
6278
|
+
* silently never matches anything (a dead manifest entry that loses
|
|
6279
|
+
* every operator pin on restore).
|
|
6280
|
+
*
|
|
6210
6281
|
* Set-union semantics preserve user-added entries. Idempotent on
|
|
6211
6282
|
* re-run. Atomic write (temp → fsync → rename).
|
|
6212
6283
|
*
|
|
@@ -6224,6 +6295,12 @@ Create worktrees for collaborator repos with \`instar worktree create <branch>\`
|
|
|
6224
6295
|
'.instar/state/pr-cost-ledger.jsonl',
|
|
6225
6296
|
'.instar/state/security.jsonl*',
|
|
6226
6297
|
];
|
|
6298
|
+
// stateDir-relative (see PATH SHAPE IS PINNED above) — these resolve in
|
|
6299
|
+
// BackupManager.createSnapshot's `path.join(stateDir, entry)`.
|
|
6300
|
+
const TOPIC_PROFILE_BACKUP_ENTRIES = [
|
|
6301
|
+
'state/topic-profiles.json',
|
|
6302
|
+
'state/topic-operators.json',
|
|
6303
|
+
];
|
|
6227
6304
|
const configPath = path.join(this.config.stateDir, 'config.json');
|
|
6228
6305
|
if (!fs.existsSync(configPath)) {
|
|
6229
6306
|
result.skipped.push('config.backup.includeFiles (config.json not found)');
|
|
@@ -6241,7 +6318,11 @@ Create worktrees for collaborator repos with \`instar worktree create <branch>\`
|
|
|
6241
6318
|
const existing = Array.isArray(backup.includeFiles)
|
|
6242
6319
|
? backup.includeFiles.filter((e) => typeof e === 'string')
|
|
6243
6320
|
: [];
|
|
6244
|
-
const merged = Array.from(new Set([
|
|
6321
|
+
const merged = Array.from(new Set([
|
|
6322
|
+
...existing,
|
|
6323
|
+
...PR_GATE_BACKUP_ENTRIES,
|
|
6324
|
+
...TOPIC_PROFILE_BACKUP_ENTRIES,
|
|
6325
|
+
]));
|
|
6245
6326
|
for (const entry of merged) {
|
|
6246
6327
|
if (path.normalize(entry).startsWith('.instar/secrets/')) {
|
|
6247
6328
|
result.errors.push(`migrateBackupManifest: includeFiles contains secrets-prefix entry "${entry}" — BackupManager will refuse it at snapshot time, but the entry should not be here`);
|
|
@@ -6265,7 +6346,14 @@ Create worktrees for collaborator repos with \`instar worktree create <branch>\`
|
|
|
6265
6346
|
fs.closeSync(fd);
|
|
6266
6347
|
}
|
|
6267
6348
|
fs.renameSync(tmpPath, configPath);
|
|
6268
|
-
|
|
6349
|
+
const prGateAdded = added.filter((e) => PR_GATE_BACKUP_ENTRIES.includes(e)).length;
|
|
6350
|
+
const topicProfileAdded = added.filter((e) => TOPIC_PROFILE_BACKUP_ENTRIES.includes(e)).length;
|
|
6351
|
+
if (prGateAdded > 0) {
|
|
6352
|
+
result.upgraded.push(`config.backup.includeFiles: added ${prGateAdded} pr-gate state path(s)`);
|
|
6353
|
+
}
|
|
6354
|
+
if (topicProfileAdded > 0) {
|
|
6355
|
+
result.upgraded.push(`config.backup.includeFiles: added ${topicProfileAdded} topic-profile state path(s)`);
|
|
6356
|
+
}
|
|
6269
6357
|
}
|
|
6270
6358
|
catch (err) {
|
|
6271
6359
|
result.errors.push(`migrateBackupManifest write: ${err instanceof Error ? err.message : String(err)}`);
|