thinkpool-pair 0.7.220 → 0.7.221

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/bridge.mjs CHANGED
@@ -65,7 +65,7 @@ import { writeLaneArtifact, digestSlice, appendDigest, resumeLane } from './flow
65
65
  import { createFlowWorktree, worktreeSpec } from './flow-worktree.mjs'
66
66
  import { startPreview, stopAllPreviews, previews } from './flow-preview.mjs'
67
67
  import { ViewportManager, createViewportTools, sharedViewportBrowser } from './viewport.mjs'
68
- import { designPrompt, resolveDesignSource, restoreDesignSources, syncRealtimeAuth, validateDesignRequest } from './design-edit.mjs'
68
+ import { designPrompt, resolveDesignSource, resolveManifestDesignSource, restoreDesignSources, syncRealtimeAuth, validateDesignRequest } from './design-edit.mjs'
69
69
  // FL-M9 — per-lane preview servers leak (one per done lane, never stopped until shutdown).
70
70
  // Lane previews are keyed `lane:<flowId>:<laneId>`; stop a whole flow's set when it assembles
71
71
  // (the assembled preview supersedes them) or when a lane is reverted.
@@ -1321,8 +1321,8 @@ const handleManifest = async (box, file, term, trustedDesignSource = false) => {
1321
1321
  try { m = JSON.parse(fs.readFileSync(full, 'utf8')) } catch { return }
1322
1322
  if (!m?.slug) return
1323
1323
  const producer = trustedDesignSource ? sessions.get(term) : null
1324
- const designRecord = producer && m.source
1325
- ? resolveDesignSource(m.source, producer.cwd || process.cwd())
1324
+ const designRecord = producer
1325
+ ? resolveManifestDesignSource(m, producer.cwd || process.cwd())
1326
1326
  : null
1327
1327
  // 2026-07-07: these used to swallow read errors silently — a transient
1328
1328
  // unreadable file (race with the render script, permissions, mid-write)
package/design-edit.mjs CHANGED
@@ -48,6 +48,15 @@ export function resolveDesignSource(file, workspaceRoot) {
48
48
  return { previewId, revision, sourcePath, workspaceRoot: root, source }
49
49
  }
50
50
 
51
+ // Older lane worktrees predate the explicit `source` manifest field and emit the
52
+ // authored mockup path as `html` only. Preserve the explicit field when present;
53
+ // otherwise let the same containment/generated-output checks decide whether the
54
+ // HTML path is canonical editable source or view-only render evidence.
55
+ export function resolveManifestDesignSource(manifest, workspaceRoot) {
56
+ if (!manifest || typeof manifest !== 'object') return null
57
+ return resolveDesignSource(manifest.source || manifest.html, workspaceRoot)
58
+ }
59
+
51
60
  // Design provenance is intentionally host-only, but it must survive a bridge
52
61
  // restart. Rebuild the in-memory registry from manifests already written by the
53
62
  // trusted lane render workflow; do not re-upload or re-broadcast old cards.
@@ -68,8 +77,7 @@ export function restoreDesignSources(box, workspaceRoot, term, limit = 100) {
68
77
  for (const { file } of files) {
69
78
  try {
70
79
  const manifest = JSON.parse(fs.readFileSync(file, 'utf8'))
71
- if (!manifest?.source) continue
72
- const record = resolveDesignSource(manifest.source, workspaceRoot)
80
+ const record = resolveManifestDesignSource(manifest, workspaceRoot)
73
81
  if (!record) continue
74
82
  Object.assign(record, {
75
83
  term,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thinkpool-pair",
3
- "version": "0.7.220",
3
+ "version": "0.7.221",
4
4
  "description": "Share a local coding-agent CLI (Claude Code, Codex, Gemini, Aider, …) into a ThinkPool Code room, live.",
5
5
  "type": "module",
6
6
  "bin": {