@bastani/atomic 0.9.85 → 0.9.86-alpha.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.
Files changed (125) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/builtin/intercom/CHANGELOG.md +15 -0
  3. package/dist/builtin/intercom/README.md +10 -9
  4. package/dist/builtin/intercom/broker/away-asks.ts +260 -0
  5. package/dist/builtin/intercom/broker/broker.ts +170 -9
  6. package/dist/builtin/intercom/broker/client.ts +5 -3
  7. package/dist/builtin/intercom/broker/held-reply-targets.ts +5 -0
  8. package/dist/builtin/intercom/broker/multinode-router.ts +16 -7
  9. package/dist/builtin/intercom/broker/paths.ts +5 -0
  10. package/dist/builtin/intercom/broker/pending-question-index.ts +119 -0
  11. package/dist/builtin/intercom/broker/released-asker-replies.ts +39 -0
  12. package/dist/builtin/intercom/broker/send-handler.ts +44 -3
  13. package/dist/builtin/intercom/broker/terminal-questions.ts +2 -0
  14. package/dist/builtin/intercom/index.bundle.mjs +799 -177
  15. package/dist/builtin/intercom/package.json +1 -1
  16. package/dist/builtin/intercom/retry-policy.ts +1 -1
  17. package/dist/builtin/intercom/skills/intercom/SKILL.md +29 -35
  18. package/dist/builtin/intercom/types.ts +7 -2
  19. package/dist/builtin/mcp/package.json +1 -1
  20. package/dist/builtin/subagents/CHANGELOG.md +20 -0
  21. package/dist/builtin/subagents/package.json +1 -1
  22. package/dist/builtin/subagents/skills/subagent/SKILL.md +1 -1
  23. package/dist/builtin/subagents/src/extension/index.bundle.mjs +2765 -2719
  24. package/dist/builtin/web-access/package.json +1 -1
  25. package/dist/builtin/workflows/CHANGELOG.md +12 -0
  26. package/dist/builtin/workflows/package.json +1 -1
  27. package/dist/builtin/workflows/src/authoring.d.ts +1 -1
  28. package/dist/builtin/workflows/src/extension/index.bundle.mjs +371 -193
  29. package/dist/builtin/workflows/src/extension/local-worker-entry.mjs +358 -181
  30. package/dist/builtin/workflows/src/index.js +356 -183
  31. package/dist/builtin/workflows/src/local-worker-entry.mjs +358 -181
  32. package/dist/builtin/workflows/src/shared/worktree-restore-outcome.d.ts +16 -0
  33. package/dist/builtin/workflows/src/workers/workspace-binding.d.ts +13 -2
  34. package/dist/core/agent-session-methods.d.ts +1 -0
  35. package/dist/core/agent-session-methods.d.ts.map +1 -1
  36. package/dist/core/agent-session-methods.js.map +1 -1
  37. package/dist/core/agent-session-prompt.d.ts.map +1 -1
  38. package/dist/core/agent-session-prompt.js +2 -35
  39. package/dist/core/agent-session-prompt.js.map +1 -1
  40. package/dist/core/agent-session-runtime.d.ts +3 -1
  41. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  42. package/dist/core/agent-session-runtime.js +12 -5
  43. package/dist/core/agent-session-runtime.js.map +1 -1
  44. package/dist/core/agent-session-state.d.ts.map +1 -1
  45. package/dist/core/agent-session-state.js +14 -1
  46. package/dist/core/agent-session-state.js.map +1 -1
  47. package/dist/core/agent-session.d.ts +2 -0
  48. package/dist/core/agent-session.d.ts.map +1 -1
  49. package/dist/core/agent-session.js +3 -1
  50. package/dist/core/agent-session.js.map +1 -1
  51. package/dist/core/resume/index.d.ts +1 -1
  52. package/dist/core/resume/index.d.ts.map +1 -1
  53. package/dist/core/resume/index.js +1 -1
  54. package/dist/core/resume/index.js.map +1 -1
  55. package/dist/core/resume/path-mapping.d.ts +10 -0
  56. package/dist/core/resume/path-mapping.d.ts.map +1 -1
  57. package/dist/core/resume/path-mapping.js +20 -0
  58. package/dist/core/resume/path-mapping.js.map +1 -1
  59. package/dist/core/resume/session-resume.d.ts +5 -0
  60. package/dist/core/resume/session-resume.d.ts.map +1 -1
  61. package/dist/core/resume/session-resume.js +24 -9
  62. package/dist/core/resume/session-resume.js.map +1 -1
  63. package/dist/core/session-worktree-snapshots.d.ts +5 -8
  64. package/dist/core/session-worktree-snapshots.d.ts.map +1 -1
  65. package/dist/core/session-worktree-snapshots.js +34 -99
  66. package/dist/core/session-worktree-snapshots.js.map +1 -1
  67. package/dist/core/skill-catalog.d.ts +11 -0
  68. package/dist/core/skill-catalog.d.ts.map +1 -1
  69. package/dist/core/skill-catalog.js +31 -0
  70. package/dist/core/skill-catalog.js.map +1 -1
  71. package/dist/core/tasks/agent-adapter.d.ts +2 -0
  72. package/dist/core/tasks/agent-adapter.d.ts.map +1 -1
  73. package/dist/core/tasks/agent-adapter.js +5 -1
  74. package/dist/core/tasks/agent-adapter.js.map +1 -1
  75. package/dist/core/tasks/supervisor.d.ts +17 -0
  76. package/dist/core/tasks/supervisor.d.ts.map +1 -1
  77. package/dist/core/tasks/supervisor.js +12 -6
  78. package/dist/core/tasks/supervisor.js.map +1 -1
  79. package/dist/core/tasks/task-view-source.d.ts +10 -0
  80. package/dist/core/tasks/task-view-source.d.ts.map +1 -1
  81. package/dist/core/tasks/task-view-source.js +24 -1
  82. package/dist/core/tasks/task-view-source.js.map +1 -1
  83. package/dist/core/worktree-snapshot/best-restore.d.ts +45 -0
  84. package/dist/core/worktree-snapshot/best-restore.d.ts.map +1 -0
  85. package/dist/core/worktree-snapshot/best-restore.js +92 -0
  86. package/dist/core/worktree-snapshot/best-restore.js.map +1 -0
  87. package/dist/core/worktree-snapshot/git.d.ts +2 -2
  88. package/dist/core/worktree-snapshot/git.d.ts.map +1 -1
  89. package/dist/core/worktree-snapshot/git.js +2 -5
  90. package/dist/core/worktree-snapshot/git.js.map +1 -1
  91. package/dist/core/worktree-snapshot/index.d.ts +1 -0
  92. package/dist/core/worktree-snapshot/index.d.ts.map +1 -1
  93. package/dist/core/worktree-snapshot/index.js +1 -0
  94. package/dist/core/worktree-snapshot/index.js.map +1 -1
  95. package/dist/core/worktree-snapshot/restore.d.ts.map +1 -1
  96. package/dist/core/worktree-snapshot/restore.js +18 -2
  97. package/dist/core/worktree-snapshot/restore.js.map +1 -1
  98. package/dist/index.d.ts +3 -2
  99. package/dist/index.d.ts.map +1 -1
  100. package/dist/index.js +1 -0
  101. package/dist/index.js.map +1 -1
  102. package/dist/modes/interactive/chat-autocomplete.d.ts +7 -0
  103. package/dist/modes/interactive/chat-autocomplete.d.ts.map +1 -0
  104. package/dist/modes/interactive/chat-autocomplete.js +85 -0
  105. package/dist/modes/interactive/chat-autocomplete.js.map +1 -0
  106. package/dist/modes/interactive/components/task-transcript-page.d.ts.map +1 -1
  107. package/dist/modes/interactive/components/task-transcript-page.js +8 -0
  108. package/dist/modes/interactive/components/task-transcript-page.js.map +1 -1
  109. package/dist/modes/interactive/interactive-autocomplete.js +3 -79
  110. package/dist/modes/interactive/interactive-autocomplete.js.map +1 -1
  111. package/dist/modes/interactive/skill-command-autocomplete.d.ts +6 -0
  112. package/dist/modes/interactive/skill-command-autocomplete.d.ts.map +1 -1
  113. package/dist/modes/interactive/skill-command-autocomplete.js +18 -2
  114. package/dist/modes/interactive/skill-command-autocomplete.js.map +1 -1
  115. package/docs/background-tasks.md +1 -1
  116. package/docs/intercom/operations.md +4 -4
  117. package/docs/intercom/reference.md +39 -8
  118. package/docs/intercom.md +26 -9
  119. package/docs/skills.md +3 -1
  120. package/docs/subagents.md +2 -0
  121. package/docs/workflows/api-reference.md +3 -3
  122. package/docs/workflows/operations.md +2 -2
  123. package/docs/worktree-snapshots.md +10 -4
  124. package/npm-shrinkwrap.json +32 -32
  125. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/worktree-snapshot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,uBAAuB,EACvB,yBAAyB,EAEzB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,GACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACN,SAAS,EAET,uBAAuB,GAGvB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC9F,OAAO,EACN,kBAAkB,EAClB,mBAAmB,EAEnB,iBAAiB,EAEjB,qBAAqB,EACrB,yBAAyB,EACzB,0BAA0B,EAC1B,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,EACnB,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EAGvB,uBAAuB,EACvB,wBAAwB,EAGxB,oBAAoB,EAGpB,mBAAmB,EAGnB,cAAc,EAKd,iBAAiB,EAEjB,qBAAqB,EAGrB,sBAAsB,GAEtB,MAAM,aAAa,CAAC;AACrB,OAAO,EAEN,sBAAsB,EACtB,0BAA0B,EAC1B,yBAAyB,EAIzB,0BAA0B,GAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAkD,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACvG,OAAO,EAEN,+BAA+B,EAC/B,0BAA0B,EAI1B,sBAAsB,EACtB,uBAAuB,EACvB,eAAe,EACf,uBAAuB,EAEvB,cAAc,GACd,MAAM,cAAc,CAAC;AACtB,OAAO,EACN,kCAAkC,EAClC,+BAA+B,GAE/B,MAAM,eAAe,CAAC","sourcesContent":["export {\n\tMemorySnapshotBlobStore,\n\tSNAPSHOT_COLLECTION_BATCH,\n\ttype SnapshotIndexTables,\n\tSqlSnapshotBlobStore,\n\tsnapshotBlobHashes,\n\tsnapshotIndexTables,\n} from \"./blob-store.ts\";\nexport {\n\tbindingOf,\n\ttype CaptureWorktreeSnapshotOptions,\n\tcaptureWorktreeSnapshot,\n\ttype WorktreeSnapshotCapture,\n\ttype WorktreeSnapshotUnavailableReason,\n} from \"./capture.ts\";\nexport { computeEnvironmentHash, ENVIRONMENT_INPUT_FILES, snapshotBlob } from \"./env-hash.ts\";\nexport {\n\tfindWorkspaceError,\n\tGitUnavailableError,\n\ttype GitUnavailableErrorCode,\n\tgitInstallCommand,\n\ttype InvalidSnapshotReason,\n\tisGitUnavailableError,\n\tisRetryableWorkspaceError,\n\tisWorkspaceCollectionError,\n\tisWorkspaceConfigError,\n\tisWorkspaceDriftError,\n\tisWorkspaceError,\n\tisWorkspaceGitError,\n\tisWorkspaceRestoreError,\n\tisWorkspaceSnapshotError,\n\trehydrateWorkspaceError,\n\ttype SerializedWorkspaceError,\n\ttype SnapshotCollectionPhase,\n\tserializeWorkspaceError,\n\tWorkspaceCollectionError,\n\ttype WorkspaceCollectionErrorCode,\n\ttype WorkspaceCollectionErrorFields,\n\tWorkspaceConfigError,\n\ttype WorkspaceConfigErrorCode,\n\ttype WorkspaceConfigSource,\n\tWorkspaceDriftError,\n\ttype WorkspaceDriftErrorCode,\n\ttype WorkspaceDriftErrorFields,\n\tWorkspaceError,\n\ttype WorkspaceErrorCode,\n\ttype WorkspaceErrorFields,\n\ttype WorkspaceErrorFieldValue,\n\ttype WorkspaceErrorName,\n\tWorkspaceGitError,\n\ttype WorkspaceGitErrorCode,\n\tWorkspaceRestoreError,\n\ttype WorkspaceRestoreErrorCode,\n\ttype WorkspaceRestoreErrorFields,\n\tWorkspaceSnapshotError,\n\ttype WorkspaceSnapshotErrorCode,\n} from \"./errors.ts\";\nexport {\n\ttype CollectSnapshotGarbageOptions,\n\tcollectSnapshotGarbage,\n\tDEFAULT_BLOB_GRACE_SECONDS,\n\trunningSnapshotCollection,\n\ttype ScheduleSnapshotCollectionOptions,\n\ttype SnapshotCollectionOutcome,\n\ttype SnapshotCollectionSkipReason,\n\tscheduleSnapshotCollection,\n} from \"./garbage.ts\";\nexport { type GitExecutable, type GitExecutableResolver, setWorktreeSnapshotGit } from \"./git.ts\";\nexport { isHeadOnlyAdvance } from \"./head-advance.ts\";\nexport { canonicalizeWorktreePath } from \"./paths.ts\";\nexport { SNAPSHOT_DENY_PATTERNS, SNAPSHOT_IGNORE_FILE, SNAPSHOT_KEY_FILE_PATTERNS } from \"./policy.ts\";\nexport {\n\ttype DegradedWorktree,\n\tdefaultWorktreeSnapshotStoreDir,\n\tisDegradableRestoreFailure,\n\ttype RestoreDegradedWorktreeOptions,\n\ttype RestoredWorktree,\n\ttype RestoreWorktreeSnapshotOptions,\n\tremoveRestoredWorktree,\n\trestoreDegradedWorktree,\n\trestoreWorktree,\n\trestoreWorktreeSnapshot,\n\ttype VerifyWorktreeOptions,\n\tverifyWorktree,\n} from \"./restore.ts\";\nexport {\n\tDEFAULT_WORKTREE_SNAPSHOT_SETTINGS,\n\tresolveWorktreeSnapshotSettings,\n\ttype WorktreeSnapshotSettingsInput,\n} from \"./settings.ts\";\nexport type {\n\tSnapshotBlob,\n\tSnapshotBlobStore,\n\tWorkspaceBinding,\n\tWorktreeDegradedRestore,\n\tWorktreeDegradedRestoreBasis,\n\tWorktreeRestoreWarning,\n\tWorktreeRootMapping,\n\tWorktreeSnapshot,\n\tWorktreeSnapshotBundle,\n\tWorktreeSnapshotChainLink,\n\tWorktreeSnapshotFilters,\n\tWorktreeSnapshotOmission,\n\tWorktreeSnapshotOmissionReason,\n\tWorktreeSnapshotPathOmissionReason,\n\tWorktreeSnapshotSettings,\n\tWorktreeSnapshotSizeOmissionReason,\n\tWorktreeUnrestored,\n} from \"./types.ts\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/worktree-snapshot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,mBAAmB,EACnB,gBAAgB,GAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACN,uBAAuB,EACvB,yBAAyB,EAEzB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,GACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACN,SAAS,EAET,uBAAuB,GAGvB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC9F,OAAO,EACN,kBAAkB,EAClB,mBAAmB,EAEnB,iBAAiB,EAEjB,qBAAqB,EACrB,yBAAyB,EACzB,0BAA0B,EAC1B,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,EACnB,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EAGvB,uBAAuB,EACvB,wBAAwB,EAGxB,oBAAoB,EAGpB,mBAAmB,EAGnB,cAAc,EAKd,iBAAiB,EAEjB,qBAAqB,EAGrB,sBAAsB,GAEtB,MAAM,aAAa,CAAC;AACrB,OAAO,EAEN,sBAAsB,EACtB,0BAA0B,EAC1B,yBAAyB,EAIzB,0BAA0B,GAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAkD,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACvG,OAAO,EAEN,+BAA+B,EAC/B,0BAA0B,EAI1B,sBAAsB,EACtB,uBAAuB,EACvB,eAAe,EACf,uBAAuB,EAEvB,cAAc,GACd,MAAM,cAAc,CAAC;AACtB,OAAO,EACN,kCAAkC,EAClC,+BAA+B,GAE/B,MAAM,eAAe,CAAC","sourcesContent":["export {\n\ttype BestWorktreeRestore,\n\ttype RestoreBestWorktreeOptions,\n\trestoreBestWorktree,\n\tunrestoredRecord,\n} from \"./best-restore.ts\";\nexport {\n\tMemorySnapshotBlobStore,\n\tSNAPSHOT_COLLECTION_BATCH,\n\ttype SnapshotIndexTables,\n\tSqlSnapshotBlobStore,\n\tsnapshotBlobHashes,\n\tsnapshotIndexTables,\n} from \"./blob-store.ts\";\nexport {\n\tbindingOf,\n\ttype CaptureWorktreeSnapshotOptions,\n\tcaptureWorktreeSnapshot,\n\ttype WorktreeSnapshotCapture,\n\ttype WorktreeSnapshotUnavailableReason,\n} from \"./capture.ts\";\nexport { computeEnvironmentHash, ENVIRONMENT_INPUT_FILES, snapshotBlob } from \"./env-hash.ts\";\nexport {\n\tfindWorkspaceError,\n\tGitUnavailableError,\n\ttype GitUnavailableErrorCode,\n\tgitInstallCommand,\n\ttype InvalidSnapshotReason,\n\tisGitUnavailableError,\n\tisRetryableWorkspaceError,\n\tisWorkspaceCollectionError,\n\tisWorkspaceConfigError,\n\tisWorkspaceDriftError,\n\tisWorkspaceError,\n\tisWorkspaceGitError,\n\tisWorkspaceRestoreError,\n\tisWorkspaceSnapshotError,\n\trehydrateWorkspaceError,\n\ttype SerializedWorkspaceError,\n\ttype SnapshotCollectionPhase,\n\tserializeWorkspaceError,\n\tWorkspaceCollectionError,\n\ttype WorkspaceCollectionErrorCode,\n\ttype WorkspaceCollectionErrorFields,\n\tWorkspaceConfigError,\n\ttype WorkspaceConfigErrorCode,\n\ttype WorkspaceConfigSource,\n\tWorkspaceDriftError,\n\ttype WorkspaceDriftErrorCode,\n\ttype WorkspaceDriftErrorFields,\n\tWorkspaceError,\n\ttype WorkspaceErrorCode,\n\ttype WorkspaceErrorFields,\n\ttype WorkspaceErrorFieldValue,\n\ttype WorkspaceErrorName,\n\tWorkspaceGitError,\n\ttype WorkspaceGitErrorCode,\n\tWorkspaceRestoreError,\n\ttype WorkspaceRestoreErrorCode,\n\ttype WorkspaceRestoreErrorFields,\n\tWorkspaceSnapshotError,\n\ttype WorkspaceSnapshotErrorCode,\n} from \"./errors.ts\";\nexport {\n\ttype CollectSnapshotGarbageOptions,\n\tcollectSnapshotGarbage,\n\tDEFAULT_BLOB_GRACE_SECONDS,\n\trunningSnapshotCollection,\n\ttype ScheduleSnapshotCollectionOptions,\n\ttype SnapshotCollectionOutcome,\n\ttype SnapshotCollectionSkipReason,\n\tscheduleSnapshotCollection,\n} from \"./garbage.ts\";\nexport { type GitExecutable, type GitExecutableResolver, setWorktreeSnapshotGit } from \"./git.ts\";\nexport { isHeadOnlyAdvance } from \"./head-advance.ts\";\nexport { canonicalizeWorktreePath } from \"./paths.ts\";\nexport { SNAPSHOT_DENY_PATTERNS, SNAPSHOT_IGNORE_FILE, SNAPSHOT_KEY_FILE_PATTERNS } from \"./policy.ts\";\nexport {\n\ttype DegradedWorktree,\n\tdefaultWorktreeSnapshotStoreDir,\n\tisDegradableRestoreFailure,\n\ttype RestoreDegradedWorktreeOptions,\n\ttype RestoredWorktree,\n\ttype RestoreWorktreeSnapshotOptions,\n\tremoveRestoredWorktree,\n\trestoreDegradedWorktree,\n\trestoreWorktree,\n\trestoreWorktreeSnapshot,\n\ttype VerifyWorktreeOptions,\n\tverifyWorktree,\n} from \"./restore.ts\";\nexport {\n\tDEFAULT_WORKTREE_SNAPSHOT_SETTINGS,\n\tresolveWorktreeSnapshotSettings,\n\ttype WorktreeSnapshotSettingsInput,\n} from \"./settings.ts\";\nexport type {\n\tSnapshotBlob,\n\tSnapshotBlobStore,\n\tWorkspaceBinding,\n\tWorktreeDegradedRestore,\n\tWorktreeDegradedRestoreBasis,\n\tWorktreeRestoreWarning,\n\tWorktreeRootMapping,\n\tWorktreeSnapshot,\n\tWorktreeSnapshotBundle,\n\tWorktreeSnapshotChainLink,\n\tWorktreeSnapshotFilters,\n\tWorktreeSnapshotOmission,\n\tWorktreeSnapshotOmissionReason,\n\tWorktreeSnapshotPathOmissionReason,\n\tWorktreeSnapshotSettings,\n\tWorktreeSnapshotSizeOmissionReason,\n\tWorktreeUnrestored,\n} from \"./types.ts\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"restore.d.ts","sourceRoot":"","sources":["../../../src/core/worktree-snapshot/restore.ts"],"names":[],"mappings":"AAeA,OAAO,EAQN,qBAAqB,EAErB,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,KAAK,aAAa,EAOlB,MAAM,UAAU,CAAC;AAGlB,OAAO,EAGN,KAAK,6BAA6B,EAClC,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EACX,iBAAiB,EACjB,gBAAgB,EAChB,uBAAuB,EAEvB,sBAAsB,EACtB,gBAAgB,EAChB,MAAM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CAAC,EAAE,6BAA6B,CAAC;IAClD,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC9B;AAED;;;GAGG;AACH,wBAAsB,cAAc,CACnC,OAAO,EAAE,gBAAgB,GAAG,gBAAgB,EAC5C,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,qBAA0B,GACjC,OAAO,CAAC,gBAAgB,CAAC,CAqC3B"}
@@ -880,7 +880,7 @@ async function restoreDegradedValidated(snapshot, failure, options) {
880
880
  basis: closest.basis,
881
881
  missingLinks: snapshot.chain.flatMap((link, index) => (link.patch === null ? [] : [index])),
882
882
  missingPaths: [],
883
- missingCommits: unpushedCommits(snapshot),
883
+ missingCommits: await notInHistory(git, unpushedCommits(snapshot), closest.commit),
884
884
  ...cause,
885
885
  };
886
886
  });
@@ -896,7 +896,9 @@ async function restoreDegradedValidated(snapshot, failure, options) {
896
896
  scratch,
897
897
  warn,
898
898
  signal,
899
- verify: failure.code === "tree-mismatch" ? "head" : "tree",
899
+ // Whatever started the degraded restore, this host's checkout filters may change the files it writes (#4744):
900
+ // check its HEAD and keep the checkout, recording the tree it holds.
901
+ verify: "head",
900
902
  });
901
903
  if (measured === degraded.tree)
902
904
  return { path, degraded, warnings };
@@ -913,6 +915,20 @@ function unpushedCommits(snapshot) {
913
915
  const named = snapshot.omitted.flatMap((omission) => ("commits" in omission ? omission.commits : []));
914
916
  return named.length > 0 ? [...new Set(named)] : [snapshot.head];
915
917
  }
918
+ /** `commits` without those `head`'s history holds: the restored history already has them (#4744). */
919
+ async function notInHistory(git, commits, head) {
920
+ const missing = [];
921
+ for (const commit of commits) {
922
+ // Exit 1: not an ancestor; 128: not in the store, so not in the restored history either.
923
+ const { exitCode } = await runGit(["merge-base", "--is-ancestor", commit, head], {
924
+ ...git,
925
+ allowExitCodes: [1, 128],
926
+ });
927
+ if (exitCode !== 0)
928
+ missing.push(commit);
929
+ }
930
+ return missing;
931
+ }
916
932
  /**
917
933
  * The tree of `snapshot`'s `HEAD` with its patch chain applied in the store, link by link, up to the first link whose
918
934
  * patch is missing, corrupt or does not give the link's tree; that link and every later one are left out whole. Lists