Practical patterns, starters & CLI tools for loop engineering with AI coding agents. Design systems that prompt and orchestrate agents (inspired by Addy Osmani and Boris Cherny). Includes loop-audit, loop-init, loop-cost.
TypeScript agentic-aiai-agentsai-codinganthropicautomationclaudeclaude-codecodexcoding-agentsdevops-automationdevtoolsgithub-actionsgrokllmloop-engineeringmcpprompt-engineering
fix(loop-sandbox): use loop-worktree's public lock subpath instead of a dist/ deep import (#448)
JonyT Agentic3852f5c5de08
diff --git a/tools/loop-sandbox/dist/sandbox.js b/tools/loop-sandbox/dist/sandbox.jsindex 0f4bb34..9079932 100644--- a/tools/loop-sandbox/dist/sandbox.js+++ b/tools/loop-sandbox/dist/sandbox.js@@ -4,16 +4,7 @@ import { mkdir, writeFile, readdir, stat } from 'node:fs/promises';import path from 'node:path';import crypto from 'node:crypto';import { createWorktree, isGitRepo, gc } from '@cobusgreyling/loop-worktree';-// loop-worktree's package.json has no "exports" map restricting subpaths, so-// this resolves cleanly; a re-export from the package's main entry was tried-// first but creates a module-load cycle (lock.js reads MANIFEST_DIR from-// worktree.js, which would need lock.js's own export to finish first).-//-// This reaches into loop-worktree's compiled internals rather than a public-// subpath export, since none exists yet -- a supported `loop-worktree/lock`-// entry point would be a better long-term home for this, tracked as a-// follow-up rather than done here to keep this change scoped to sandbox.ts.-import { lockPaths, unlockOwner } from '@cobusgreyling/loop-worktree/dist/lock.js';+import { lockPaths, unlockOwner } from '@cobusgreyling/loop-worktree/lock';const runExec = promisify(execFile);/** Run a git command in cwd, returning stdout trimmed. Throws on error. */async function git(args, cwd) {diff --git a/tools/loop-sandbox/package-lock.json b/tools/loop-sandbox/package-lock.jsonindex b625959..43d0f15 100644--- a/tools/loop-sandbox/package-lock.json+++ b/tools/loop-sandbox/package-lock.json@@ -9,7 +9,7 @@"version": "1.0.0","license": "MIT","dependencies": {- "@cobusgreyling/loop-worktree": "file:../loop-worktree"+ "@cobusgreyling/loop-worktree": "^1.3.0"},"bin": {"loop-sandbox": "dist/cli.js"@@ -24,7 +24,7 @@},"../loop-worktree": {"name": "@cobusgreyling/loop-worktree",- "version": "1.2.0",+ "version": "1.3.1","license": "MIT","bin": {"loop-worktree": "dist/cli.js"diff --git a/tools/loop-sandbox/package.json b/tools/loop-sandbox/package.jsonindex c257a2d..f1e5c74 100644--- a/tools/loop-sandbox/package.json+++ b/tools/loop-sandbox/package.json@@ -40,7 +40,7 @@"access": "public"},"dependencies": {- "@cobusgreyling/loop-worktree": "^1.2.0"+ "@cobusgreyling/loop-worktree": "^1.3.0"},"devDependencies": {"@types/node": "^20.0.0",diff --git a/tools/loop-sandbox/src/sandbox.ts b/tools/loop-sandbox/src/sandbox.tsindex 4a20391..7751b49 100644--- a/tools/loop-sandbox/src/sandbox.ts+++ b/tools/loop-sandbox/src/sandbox.ts@@ -4,16 +4,7 @@ import { mkdir, writeFile, readdir, stat } from 'node:fs/promises';import path from 'node:path';import crypto from 'node:crypto';import { createWorktree, isGitRepo, gc } from '@cobusgreyling/loop-worktree';-// loop-worktree's package.json has no "exports" map restricting subpaths, so-// this resolves cleanly; a re-export from the package's main entry was tried-// first but creates a module-load cycle (lock.js reads MANIFEST_DIR from-// worktree.js, which would need lock.js's own export to finish first).-//-// This reaches into loop-worktree's compiled internals rather than a public-// subpath export, since none exists yet -- a supported `loop-worktree/lock`-// entry point would be a better long-term home for this, tracked as a-// follow-up rather than done here to keep this change scoped to sandbox.ts.-import { lockPaths, unlockOwner } from '@cobusgreyling/loop-worktree/dist/lock.js';+import { lockPaths, unlockOwner } from '@cobusgreyling/loop-worktree/lock';const runExec = promisify(execFile);