infra-kit 0.1.113 → 0.1.114
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/.eslintcache +1 -1
- package/.omc/state/agent-replay-0d1515ce-4ebe-4ce8-a865-2897f68de168.jsonl +1 -0
- package/.omc/state/agent-replay-f99d8dad-81d1-4987-8183-62edf0843d0c.jsonl +2 -0
- package/.omc/state/idle-notif-cooldown.json +1 -1
- package/.omc/state/sessions/0d1515ce-4ebe-4ce8-a865-2897f68de168/pre-tool-advisory-throttle.json +10 -0
- package/.omc/state/sessions/560ea519-574a-4713-b134-5bf6cfaf3c33/pre-tool-advisory-throttle.json +18 -0
- package/.omc/state/sessions/f99d8dad-81d1-4987-8183-62edf0843d0c/pre-tool-advisory-throttle.json +14 -0
- package/.omc/state/sessions/f99d8dad-81d1-4987-8183-62edf0843d0c/ralph-state.json +13 -0
- package/.omc/state/sessions/f99d8dad-81d1-4987-8183-62edf0843d0c/ultrawork-state.json +11 -0
- package/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-test.log +20 -20
- package/dist/cli.js +53 -53
- package/dist/cli.js.map +4 -4
- package/dist/mcp.js +34 -34
- package/dist/mcp.js.map +4 -4
- package/package.json +1 -1
- package/src/.omc/state/sessions/f99d8dad-81d1-4987-8183-62edf0843d0c/pre-tool-advisory-throttle.json +14 -0
- package/src/commands/doctor/doctor.ts +6 -0
- package/src/integrations/cursor/.omc/state/agent-replay-f99d8dad-81d1-4987-8183-62edf0843d0c.jsonl +2 -0
- package/src/integrations/cursor/.omc/state/idle-notif-cooldown.json +3 -0
- package/src/integrations/cursor/.omc/state/sessions/f99d8dad-81d1-4987-8183-62edf0843d0c/pre-tool-advisory-throttle.json +18 -0
- package/src/integrations/cursor/.omc/state/sessions/f99d8dad-81d1-4987-8183-62edf0843d0c/subagent-tracking-state.json +17 -0
- package/src/integrations/cursor/index.ts +1 -0
- package/src/integrations/cursor/launch-cursor.ts +12 -0
- package/src/integrations/cursor/open-cursor-workspace.ts +2 -3
- package/src/integrations/ide/__tests__/ide-facade.test.ts +8 -0
- package/src/integrations/ide/add-ide-worktree-folders.ts +2 -4
- package/src/lib/worktrees/remove-worktrees.ts +15 -0
- package/tsconfig.tsbuildinfo +1 -1
package/package.json
CHANGED
package/src/.omc/state/sessions/f99d8dad-81d1-4987-8183-62edf0843d0c/pre-tool-advisory-throttle.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"entries": {
|
|
4
|
+
"79a93d4a2f8f50b95f852280616242fee1855dc99a3c75211917f55e72e95fae": {
|
|
5
|
+
"last_emitted_at_ms": 1782111727397,
|
|
6
|
+
"message": "Use parallel execution for independent tasks. Use run_in_background for long operations (npm install, builds, tests)."
|
|
7
|
+
},
|
|
8
|
+
"466399dafa2d20f60587180bad0a07358eb7f2bce724df0ff682f038ad33f5ad": {
|
|
9
|
+
"last_emitted_at_ms": 1782111707131,
|
|
10
|
+
"message": "Read multiple files in parallel when possible for faster analysis."
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"updated_at": "2026-06-22T07:02:07.397Z"
|
|
14
|
+
}
|
|
@@ -403,6 +403,12 @@ export const doctor = async () => {
|
|
|
403
403
|
'RTK is installed',
|
|
404
404
|
'RTK is not installed. Install from: https://github.com/rtk-ai/rtk',
|
|
405
405
|
),
|
|
406
|
+
checkCommand(
|
|
407
|
+
'typescript-language-server installed',
|
|
408
|
+
['typescript-language-server', '--version'],
|
|
409
|
+
'typescript-language-server is installed',
|
|
410
|
+
'typescript-language-server is not installed. Install from: https://github.com/typescript-language-server/typescript-language-server#installing',
|
|
411
|
+
),
|
|
406
412
|
checkRtkConfigured(),
|
|
407
413
|
Promise.resolve(checkZshrcInitialized()),
|
|
408
414
|
checkPnpmWorkspaceVirtualStore(),
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"entries": {
|
|
4
|
+
"79a93d4a2f8f50b95f852280616242fee1855dc99a3c75211917f55e72e95fae": {
|
|
5
|
+
"last_emitted_at_ms": 1782112155382,
|
|
6
|
+
"message": "Use parallel execution for independent tasks. Use run_in_background for long operations (npm install, builds, tests)."
|
|
7
|
+
},
|
|
8
|
+
"466399dafa2d20f60587180bad0a07358eb7f2bce724df0ff682f038ad33f5ad": {
|
|
9
|
+
"last_emitted_at_ms": 1782112102061,
|
|
10
|
+
"message": "Read multiple files in parallel when possible for faster analysis."
|
|
11
|
+
},
|
|
12
|
+
"445ed27a3872b681d98190bae61ccb84954e1bc4e140df5370be958dee776b3a": {
|
|
13
|
+
"last_emitted_at_ms": 1782112093035,
|
|
14
|
+
"message": "Verify changes work after editing. Test functionality before marking complete."
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"updated_at": "2026-06-22T07:09:15.382Z"
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"agents": [
|
|
3
|
+
{
|
|
4
|
+
"agent_id": "a56b8e33689099584",
|
|
5
|
+
"agent_type": "unknown",
|
|
6
|
+
"started_at": "2026-06-22T07:13:23.151Z",
|
|
7
|
+
"parent_mode": "none",
|
|
8
|
+
"status": "completed",
|
|
9
|
+
"completed_at": "2026-06-22T07:13:23.151Z",
|
|
10
|
+
"duration_ms": 0
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"total_spawned": 0,
|
|
14
|
+
"total_completed": 1,
|
|
15
|
+
"total_failed": 0,
|
|
16
|
+
"last_updated": "2026-06-22T07:13:23.253Z"
|
|
17
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { addFoldersToCursorWorkspace } from './add-folders-to-workspace'
|
|
2
|
+
export { launchCursor } from './launch-cursor'
|
|
2
3
|
export { openCursorWorkspace } from './open-cursor-workspace'
|
|
3
4
|
export { reconcileCursorWorkspaceFolders } from './reconcile-workspace-folders'
|
|
4
5
|
export { removeFoldersFromCursorWorkspace } from './remove-folders-from-workspace'
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { $ } from 'zx'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Spawns Cursor against a `.code-workspace` file (or any path). Centralised here
|
|
5
|
+
* — rather than inlined at each call site — so the editor spawn lives inside the
|
|
6
|
+
* cursor provider module and is covered by a single `vi.mock('src/integrations/cursor')`.
|
|
7
|
+
* Keeping it out of the IDE-orchestration layer is what stops tests that mock the
|
|
8
|
+
* provider (but not `zx`) from shelling out to a real editor.
|
|
9
|
+
*/
|
|
10
|
+
export const launchCursor = async (workspacePath: string): Promise<void> => {
|
|
11
|
+
await $`cursor ${workspacePath}`
|
|
12
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { $ } from 'zx'
|
|
2
|
-
|
|
3
1
|
import { logger } from 'src/lib/logger'
|
|
4
2
|
|
|
3
|
+
import { launchCursor } from './launch-cursor'
|
|
5
4
|
import { reconcileCursorWorkspaceFolders } from './reconcile-workspace-folders'
|
|
6
5
|
import { resolveCursorWorkspacePath } from './resolve-workspace-path'
|
|
7
6
|
|
|
@@ -58,7 +57,7 @@ export const openCursorWorkspace = async (args: OpenCursorWorkspaceArgs): Promis
|
|
|
58
57
|
})
|
|
59
58
|
|
|
60
59
|
if (!(skipRelaunchWhenEmpty && currentBranches.length === 0)) {
|
|
61
|
-
await
|
|
60
|
+
await launchCursor(workspacePath)
|
|
62
61
|
}
|
|
63
62
|
|
|
64
63
|
return { ran: true, added: added.length, removed: removed.length }
|
|
@@ -33,6 +33,7 @@ const cursor = vi.hoisted(() => {
|
|
|
33
33
|
openCursorWorkspace: vi.fn(),
|
|
34
34
|
addFoldersToCursorWorkspace: vi.fn(),
|
|
35
35
|
removeFoldersFromCursorWorkspace: vi.fn(),
|
|
36
|
+
launchCursor: vi.fn(),
|
|
36
37
|
resolveCursorWorkspacePath: vi.fn((value: string) => {
|
|
37
38
|
return `/abs/${value}`
|
|
38
39
|
}),
|
|
@@ -43,6 +44,13 @@ vi.mock('src/integrations/cursor', () => {
|
|
|
43
44
|
return cursor
|
|
44
45
|
})
|
|
45
46
|
|
|
47
|
+
// Defense-in-depth: never let a test shell out to a real editor. Even if an
|
|
48
|
+
// editor spawn leaks back into a layer this suite exercises directly, `$` is a
|
|
49
|
+
// no-op here so `cursor <path>` can never open a real window during the run.
|
|
50
|
+
vi.mock('zx', () => {
|
|
51
|
+
return { $: vi.fn() }
|
|
52
|
+
})
|
|
53
|
+
|
|
46
54
|
const zed = vi.hoisted(() => {
|
|
47
55
|
return {
|
|
48
56
|
openZedWorkspace: vi.fn(),
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { addFoldersToCursorWorkspace, resolveCursorWorkspacePath } from 'src/integrations/cursor'
|
|
1
|
+
import { addFoldersToCursorWorkspace, launchCursor, resolveCursorWorkspacePath } from 'src/integrations/cursor'
|
|
4
2
|
import { addFoldersToZedWorkspace } from 'src/integrations/zed'
|
|
5
3
|
import { assertNever } from 'src/lib/assert-never'
|
|
6
4
|
import { getInfraKitConfig, resolveConfiguredIdes } from 'src/lib/infra-kit-config'
|
|
@@ -56,7 +54,7 @@ export const addIdeWorktreeFolders = async (
|
|
|
56
54
|
|
|
57
55
|
logger.info(`✅ Added ${added.length} folder(s) to ${workspacePath}${skippedSuffix}`)
|
|
58
56
|
|
|
59
|
-
await
|
|
57
|
+
await launchCursor(workspacePath)
|
|
60
58
|
|
|
61
59
|
outcomes.push({ ran: true, provider: 'cursor', added: added.length, skipped: skipped.length })
|
|
62
60
|
break
|
|
@@ -53,6 +53,21 @@ export const removeWorktrees = async (args: RemoveWorktreesArgs): Promise<string
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
// `git worktree remove` only deletes the leaf worktree, leaving the group
|
|
57
|
+
// folder (e.g. `release/`, `feature/`) behind. Remove it when it's now empty;
|
|
58
|
+
// `rmdir` is a no-op when the folder still holds other worktrees.
|
|
59
|
+
const groupDirs = new Set<string>()
|
|
60
|
+
|
|
61
|
+
for (const branch of removed) {
|
|
62
|
+
if (branch.includes('/')) {
|
|
63
|
+
groupDirs.add(`${worktreeDir}/${branch.split('/')[0]}`)
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
for (const groupDir of groupDirs) {
|
|
68
|
+
await $`rmdir ${groupDir}`.nothrow()
|
|
69
|
+
}
|
|
70
|
+
|
|
56
71
|
if (pruneFolder && removed.length === branches.length) {
|
|
57
72
|
await $`git worktree prune`
|
|
58
73
|
await $`rm -rf ${worktreeDir}`
|