infra-kit 0.1.110 → 0.1.113
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-127837d3-a000-4656-9453-2324ab353723.jsonl +5 -0
- package/.omc/state/agent-replay-15c409af-24fa-4026-88d3-a82dd1e68b87.jsonl +11 -0
- package/.omc/state/agent-replay-74afa912-1443-4011-b4f2-db9f055cdd9f.jsonl +3 -0
- package/.omc/state/agent-replay-8dd0ad2f-3a90-4158-b9de-ec8e19a7c983.jsonl +3 -0
- package/.omc/state/agent-replay-d5aae73c-340d-4aa2-9fe0-1bf2d79b69dc.jsonl +10 -0
- package/.omc/state/idle-notif-cooldown.json +1 -1
- package/.omc/state/sessions/127837d3-a000-4656-9453-2324ab353723/mission-state.json +61 -0
- package/.omc/state/sessions/127837d3-a000-4656-9453-2324ab353723/pre-tool-advisory-throttle.json +22 -0
- package/.omc/state/sessions/127837d3-a000-4656-9453-2324ab353723/skill-active-state.json +15 -0
- package/.omc/state/sessions/127837d3-a000-4656-9453-2324ab353723/subagent-tracking-state.json +26 -0
- package/.omc/state/sessions/15c409af-24fa-4026-88d3-a82dd1e68b87/last-tool-error-state.json +7 -0
- package/.omc/state/sessions/15c409af-24fa-4026-88d3-a82dd1e68b87/mission-state.json +89 -0
- package/.omc/state/sessions/15c409af-24fa-4026-88d3-a82dd1e68b87/pre-tool-advisory-throttle.json +34 -0
- package/.omc/state/sessions/15c409af-24fa-4026-88d3-a82dd1e68b87/ralph-state.json +13 -0
- package/.omc/state/sessions/15c409af-24fa-4026-88d3-a82dd1e68b87/skill-active-state.json +15 -0
- package/.omc/state/sessions/15c409af-24fa-4026-88d3-a82dd1e68b87/subagent-tracking-state.json +44 -0
- package/.omc/state/sessions/15c409af-24fa-4026-88d3-a82dd1e68b87/ultrawork-state.json +11 -0
- package/.omc/state/sessions/74afa912-1443-4011-b4f2-db9f055cdd9f/pre-tool-advisory-throttle.json +18 -0
- package/.omc/state/sessions/74afa912-1443-4011-b4f2-db9f055cdd9f/skill-active-state.json +15 -0
- package/.omc/state/sessions/74afa912-1443-4011-b4f2-db9f055cdd9f/subagent-tracking-state.json +17 -0
- package/.omc/state/sessions/8dd0ad2f-3a90-4158-b9de-ec8e19a7c983/pre-tool-advisory-throttle.json +14 -0
- package/.omc/state/sessions/8dd0ad2f-3a90-4158-b9de-ec8e19a7c983/ralph-state.json +13 -0
- package/.omc/state/sessions/8dd0ad2f-3a90-4158-b9de-ec8e19a7c983/subagent-tracking-state.json +17 -0
- package/.omc/state/sessions/8dd0ad2f-3a90-4158-b9de-ec8e19a7c983/ultrawork-state.json +11 -0
- package/.omc/state/sessions/d5aae73c-340d-4aa2-9fe0-1bf2d79b69dc/last-tool-error-state.json +7 -0
- package/.omc/state/sessions/d5aae73c-340d-4aa2-9fe0-1bf2d79b69dc/mission-state.json +103 -0
- package/.omc/state/sessions/d5aae73c-340d-4aa2-9fe0-1bf2d79b69dc/pre-tool-advisory-throttle.json +30 -0
- package/.omc/state/sessions/d5aae73c-340d-4aa2-9fe0-1bf2d79b69dc/ralph-state.json +13 -0
- package/.omc/state/sessions/d5aae73c-340d-4aa2-9fe0-1bf2d79b69dc/subagent-tracking-state.json +62 -0
- package/.omc/state/sessions/d5aae73c-340d-4aa2-9fe0-1bf2d79b69dc/ultrawork-state.json +11 -0
- package/.turbo/turbo-build.log +6 -6
- package/.turbo/turbo-eslint-check.log +1 -1
- package/.turbo/turbo-prettier-check.log +1 -1
- package/.turbo/turbo-prettier-fix.log +1 -2
- package/.turbo/turbo-test.log +79 -70
- package/.turbo/turbo-ts-check.log +1 -1
- package/dist/cli.js +64 -56
- package/dist/cli.js.map +4 -4
- package/dist/mcp.js +39 -39
- package/dist/mcp.js.map +4 -4
- package/package.json +1 -1
- package/src/.omc/state/agent-replay-8dd0ad2f-3a90-4158-b9de-ec8e19a7c983.jsonl +11 -0
- package/src/.omc/state/idle-notif-cooldown.json +3 -0
- package/src/.omc/state/sessions/8dd0ad2f-3a90-4158-b9de-ec8e19a7c983/mission-state.json +79 -0
- package/src/.omc/state/sessions/8dd0ad2f-3a90-4158-b9de-ec8e19a7c983/pre-tool-advisory-throttle.json +22 -0
- package/src/.omc/state/sessions/8dd0ad2f-3a90-4158-b9de-ec8e19a7c983/ralph-state.json +13 -0
- package/src/.omc/state/sessions/8dd0ad2f-3a90-4158-b9de-ec8e19a7c983/subagent-tracking-state.json +26 -0
- package/src/.omc/state/sessions/8dd0ad2f-3a90-4158-b9de-ec8e19a7c983/ultrawork-state.json +11 -0
- package/src/commands/doctor/.omc/state/sessions/8dd0ad2f-3a90-4158-b9de-ec8e19a7c983/pre-tool-advisory-throttle.json +14 -0
- package/src/commands/doctor/__tests__/check-ide-installed.test.ts +142 -0
- package/src/commands/doctor/doctor.ts +98 -1
- package/src/commands/gh-release-deliver/gh-release-deliver.ts +32 -1
- package/src/commands/init/.omc/state/sessions/8dd0ad2f-3a90-4158-b9de-ec8e19a7c983/pre-tool-advisory-throttle.json +18 -0
- package/src/commands/init/__tests__/migrate-config.test.ts +132 -1
- package/src/commands/init/init.ts +19 -6
- package/src/commands/init/migrate-config.ts +104 -0
- package/src/commands/release-create/release-create.ts +5 -13
- package/src/commands/worktrees-add/index.ts +1 -2
- package/src/commands/worktrees-add/worktrees-add.ts +24 -60
- package/src/commands/worktrees-open/worktrees-open.ts +55 -68
- package/src/commands/worktrees-reload/__tests__/reload-cmux.test.ts +119 -0
- package/src/commands/worktrees-reload/index.ts +1 -0
- package/src/commands/worktrees-reload/worktrees-reload.ts +229 -0
- package/src/commands/worktrees-remove/worktrees-remove.ts +2 -44
- package/src/commands/worktrees-sync/worktrees-sync.ts +2 -44
- package/src/entry/cli.ts +35 -25
- package/src/integrations/cursor/index.ts +1 -0
- package/src/integrations/cursor/open-cursor-workspace.ts +70 -0
- package/src/integrations/ide/__tests__/ide-facade.test.ts +242 -0
- package/src/integrations/ide/add-ide-worktree-folders.ts +79 -0
- package/src/integrations/ide/index.ts +6 -0
- package/src/integrations/ide/open-ide-workspace.ts +51 -0
- package/src/integrations/ide/provider-label.ts +24 -0
- package/src/integrations/ide/remove-ide-worktree-folders.ts +80 -0
- package/src/integrations/ide/types.ts +32 -0
- package/src/integrations/zed/__tests__/open-zed-workspace.test.ts +85 -0
- package/src/integrations/zed/add-folders-to-zed-workspace.ts +30 -0
- package/src/integrations/zed/index.ts +2 -0
- package/src/integrations/zed/open-zed-workspace.ts +57 -0
- package/src/lib/assert-never/assert-never.ts +15 -0
- package/src/lib/assert-never/index.ts +1 -0
- package/src/lib/git-utils/__tests__/git-primitives.test.ts +122 -1
- package/src/lib/git-utils/git-utils.ts +35 -0
- package/src/lib/git-utils/index.ts +2 -0
- package/src/lib/infra-kit-config/.omc/state/sessions/8dd0ad2f-3a90-4158-b9de-ec8e19a7c983/pre-tool-advisory-throttle.json +18 -0
- package/src/lib/infra-kit-config/__tests__/infra-kit-config.test.ts +172 -9
- package/src/lib/infra-kit-config/index.ts +2 -1
- package/src/lib/infra-kit-config/infra-kit-config.ts +80 -22
- package/src/lib/package-config/.omc/state/sessions/dde22a92-a0e9-4948-905d-25c9a812ab35/last-tool-error-state.json +7 -0
- package/src/lib/package-config/.omc/state/sessions/dde22a92-a0e9-4948-905d-25c9a812ab35/pre-tool-advisory-throttle.json +10 -0
- package/src/lib/version-utils/__tests__/next-version.test.ts +84 -0
- package/src/lib/version-utils/index.ts +1 -0
- package/src/lib/version-utils/next-version.ts +56 -15
- package/src/mcp/tools/index.ts +2 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tool_name": "Bash",
|
|
3
|
+
"tool_input_preview": "{\"command\":\"rtk ls -1 infra-kit.config.ts apps/*/*/infra-kit.config.* packages/*/infra-kit.config.* vendor/packages/*/infra-kit.config.* vendor/configs/*/infra-kit.config.* 2>/dev/null\",\"description\":...",
|
|
4
|
+
"error": "Exit code 1\n(eval):1: no matches found: apps/*/*/infra-kit.config.*",
|
|
5
|
+
"timestamp": "2026-06-20T09:23:27.849Z",
|
|
6
|
+
"retry_count": 1
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"entries": {
|
|
4
|
+
"79a93d4a2f8f50b95f852280616242fee1855dc99a3c75211917f55e72e95fae": {
|
|
5
|
+
"last_emitted_at_ms": 1781947394826,
|
|
6
|
+
"message": "Use parallel execution for independent tasks. Use run_in_background for long operations (npm install, builds, tests)."
|
|
7
|
+
}
|
|
8
|
+
},
|
|
9
|
+
"updated_at": "2026-06-20T09:23:14.826Z"
|
|
10
|
+
}
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
NoPriorVersionsError,
|
|
7
7
|
collectKnownVersions,
|
|
8
8
|
computeNextVersion,
|
|
9
|
+
formatReleaseSpec,
|
|
9
10
|
hasNextToken,
|
|
10
11
|
parseReleaseSpec,
|
|
11
12
|
resolveReleaseEntries,
|
|
@@ -132,6 +133,89 @@ describe('parseReleaseSpec', () => {
|
|
|
132
133
|
return parseReleaseSpec(' ')
|
|
133
134
|
}).toThrow(/empty/)
|
|
134
135
|
})
|
|
136
|
+
|
|
137
|
+
it('parses a bare name token into a named input', () => {
|
|
138
|
+
expect(parseReleaseSpec('checkout-redesign')).toEqual({ name: 'checkout-redesign', type: 'regular' })
|
|
139
|
+
})
|
|
140
|
+
|
|
141
|
+
it('parses name:type:description into a named input', () => {
|
|
142
|
+
expect(parseReleaseSpec('checkout-redesign:regular:Q3 work')).toEqual({
|
|
143
|
+
name: 'checkout-redesign',
|
|
144
|
+
type: 'regular',
|
|
145
|
+
description: 'Q3 work',
|
|
146
|
+
})
|
|
147
|
+
})
|
|
148
|
+
|
|
149
|
+
it('parses name:hotfix into a named hotfix input', () => {
|
|
150
|
+
expect(parseReleaseSpec('checkout-redesign:hotfix')).toEqual({ name: 'checkout-redesign', type: 'hotfix' })
|
|
151
|
+
})
|
|
152
|
+
|
|
153
|
+
it('treats a v-prefixed semver as a version, not a name', () => {
|
|
154
|
+
expect(parseReleaseSpec('v1.2.5')).toEqual({ version: 'v1.2.5', type: 'regular' })
|
|
155
|
+
})
|
|
156
|
+
})
|
|
157
|
+
|
|
158
|
+
describe('formatReleaseSpec', () => {
|
|
159
|
+
const entry = (id: ReleaseId, type: ReleaseEntry['type'], description?: string): ReleaseEntry => {
|
|
160
|
+
return description !== undefined ? { id, type, description } : { id, type }
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
it('renders a regular version as the bare token', () => {
|
|
164
|
+
expect(formatReleaseSpec(entry(versionId('1.2.5'), 'regular'))).toBe('1.2.5')
|
|
165
|
+
})
|
|
166
|
+
|
|
167
|
+
it('renders a hotfix version as token:hotfix', () => {
|
|
168
|
+
expect(formatReleaseSpec(entry(versionId('1.2.5'), 'hotfix'))).toBe('1.2.5:hotfix')
|
|
169
|
+
})
|
|
170
|
+
|
|
171
|
+
it('renders a version with a description as token:type:description', () => {
|
|
172
|
+
expect(formatReleaseSpec(entry(versionId('1.2.5'), 'regular', 'Holiday backend'))).toBe(
|
|
173
|
+
'1.2.5:regular:Holiday backend',
|
|
174
|
+
)
|
|
175
|
+
})
|
|
176
|
+
|
|
177
|
+
it('renders a regular named release as the bare name', () => {
|
|
178
|
+
expect(formatReleaseSpec(entry(nameId('checkout-redesign'), 'regular'))).toBe('checkout-redesign')
|
|
179
|
+
})
|
|
180
|
+
|
|
181
|
+
it('renders a named release with a description as name:type:description', () => {
|
|
182
|
+
expect(formatReleaseSpec(entry(nameId('checkout-redesign'), 'regular', 'Q3 work'))).toBe(
|
|
183
|
+
'checkout-redesign:regular:Q3 work',
|
|
184
|
+
)
|
|
185
|
+
})
|
|
186
|
+
|
|
187
|
+
it('renders a named hotfix as name:hotfix', () => {
|
|
188
|
+
expect(formatReleaseSpec(entry(nameId('checkout-redesign'), 'hotfix'))).toBe('checkout-redesign:hotfix')
|
|
189
|
+
})
|
|
190
|
+
|
|
191
|
+
it('preserves colons inside the description', () => {
|
|
192
|
+
expect(formatReleaseSpec(entry(versionId('1.2.5'), 'hotfix', 'Fixes: A and B'))).toBe('1.2.5:hotfix:Fixes: A and B')
|
|
193
|
+
})
|
|
194
|
+
|
|
195
|
+
it('treats an empty description as absent', () => {
|
|
196
|
+
expect(formatReleaseSpec(entry(versionId('1.2.5'), 'regular', ''))).toBe('1.2.5')
|
|
197
|
+
})
|
|
198
|
+
})
|
|
199
|
+
|
|
200
|
+
describe('formatReleaseSpec round-trips through parseReleaseSpec + resolveReleaseEntries', () => {
|
|
201
|
+
const known = collectKnownVersions({ remoteBranches: ['release/v1.63.0'] })
|
|
202
|
+
|
|
203
|
+
const roundTrip = (entry: ReleaseEntry): ReleaseEntry => {
|
|
204
|
+
return resolveReleaseEntries([parseReleaseSpec(formatReleaseSpec(entry))], known)[0] as ReleaseEntry
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
const cases: ReleaseEntry[] = [
|
|
208
|
+
{ id: versionId('1.2.5'), type: 'regular' },
|
|
209
|
+
{ id: versionId('1.2.5'), type: 'hotfix' },
|
|
210
|
+
{ id: versionId('1.2.5'), type: 'regular', description: 'Holiday: backend' },
|
|
211
|
+
{ id: nameId('checkout-redesign'), type: 'regular' },
|
|
212
|
+
{ id: nameId('checkout-redesign'), type: 'hotfix' },
|
|
213
|
+
{ id: nameId('checkout-redesign'), type: 'regular', description: 'Q3 work' },
|
|
214
|
+
]
|
|
215
|
+
|
|
216
|
+
it.each(cases)('reconstructs %o', (entry) => {
|
|
217
|
+
expect(roundTrip(entry)).toEqual(entry)
|
|
218
|
+
})
|
|
135
219
|
})
|
|
136
220
|
|
|
137
221
|
describe('resolveReleaseEntries', () => {
|
|
@@ -144,40 +144,81 @@ const isNamedReleaseInput = (input: ReleaseInput): input is NamedReleaseInput =>
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
|
-
* Parse a CLI release spec of the form
|
|
148
|
-
*
|
|
149
|
-
*
|
|
147
|
+
* Parse a CLI release spec of the form `<token>[:type[:description]]` into a
|
|
148
|
+
* {@link ReleaseInput}. The token determines the kind: a semver (`"1.2.5"`) or
|
|
149
|
+
* the literal `"next"` yields a versioned {@link ReleaseSpec}; anything else is
|
|
150
|
+
* treated as a named release ({@link NamedReleaseInput}) — the name is not
|
|
151
|
+
* validated here, {@link resolveReleaseEntries} runs `validateName` later. Type
|
|
152
|
+
* defaults to "regular". Description is everything after the second colon, so
|
|
153
|
+
* colons inside descriptions are preserved.
|
|
150
154
|
*/
|
|
151
|
-
export const parseReleaseSpec = (raw: string):
|
|
155
|
+
export const parseReleaseSpec = (raw: string): ReleaseInput => {
|
|
152
156
|
const spec = raw.trim()
|
|
153
157
|
|
|
154
158
|
if (spec === '') throw new Error('Release spec is empty')
|
|
155
159
|
|
|
156
160
|
const firstColon = spec.indexOf(':')
|
|
161
|
+
let token = spec
|
|
162
|
+
let type: ReleaseType = 'regular'
|
|
163
|
+
let description = ''
|
|
157
164
|
|
|
158
|
-
if (firstColon
|
|
159
|
-
|
|
165
|
+
if (firstColon !== -1) {
|
|
166
|
+
token = spec.slice(0, firstColon).trim()
|
|
167
|
+
const rest = spec.slice(firstColon + 1)
|
|
168
|
+
const secondColon = rest.indexOf(':')
|
|
169
|
+
const typeRaw = secondColon === -1 ? rest.trim() : rest.slice(0, secondColon).trim()
|
|
170
|
+
|
|
171
|
+
description = secondColon === -1 ? '' : rest.slice(secondColon + 1).trim()
|
|
172
|
+
const typeLower = typeRaw.toLowerCase()
|
|
173
|
+
|
|
174
|
+
if (!isReleaseType(typeLower)) {
|
|
175
|
+
throw new Error(`Invalid release type "${typeRaw}". Expected "regular" or "hotfix".`)
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
type = typeLower
|
|
160
179
|
}
|
|
161
180
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
181
|
+
// A semver token or the "next" token is a versioned release; everything else
|
|
182
|
+
// is a named release. parseReleaseRef applies the same precedence downstream.
|
|
183
|
+
// Note: tryParse strips a leading "release/" prefix, so "release/1.2.3" reads
|
|
184
|
+
// as the version 1.2.3 (a real name can never contain a slash anyway).
|
|
185
|
+
if (isNextToken(token) || tryParse(token) !== null) {
|
|
186
|
+
const entry: ReleaseSpec = { version: token, type }
|
|
165
187
|
|
|
166
|
-
|
|
167
|
-
const description = secondColon === -1 ? '' : rest.slice(secondColon + 1).trim()
|
|
168
|
-
const typeLower = typeRaw.toLowerCase()
|
|
188
|
+
if (description !== '') entry.description = description
|
|
169
189
|
|
|
170
|
-
|
|
171
|
-
throw new Error(`Invalid release type "${typeRaw}". Expected "regular" or "hotfix".`)
|
|
190
|
+
return entry
|
|
172
191
|
}
|
|
173
192
|
|
|
174
|
-
const entry:
|
|
193
|
+
const entry: NamedReleaseInput = { name: token, type }
|
|
175
194
|
|
|
176
195
|
if (description !== '') entry.description = description
|
|
177
196
|
|
|
178
197
|
return entry
|
|
179
198
|
}
|
|
180
199
|
|
|
200
|
+
/**
|
|
201
|
+
* Render a resolved {@link ReleaseEntry} as the canonical `--release` spec that
|
|
202
|
+
* reproduces it — the inverse of {@link parseReleaseSpec} composed with
|
|
203
|
+
* {@link resolveReleaseEntries}. The form is minimal: the bare token when the
|
|
204
|
+
* release is `regular` with no description, `token:hotfix` for a hotfix with no
|
|
205
|
+
* description, and `token:type:description` whenever a description is present
|
|
206
|
+
* (the type segment is required to reach the description segment). The token is
|
|
207
|
+
* the resolved {@link ReleaseId.raw} — a concrete semver for versions (so a
|
|
208
|
+
* resolved `"next"` pins its computed version) or the name for named releases.
|
|
209
|
+
*/
|
|
210
|
+
export const formatReleaseSpec = (entry: ReleaseEntry): string => {
|
|
211
|
+
const token = entry.id.raw
|
|
212
|
+
|
|
213
|
+
if (entry.description !== undefined && entry.description !== '') {
|
|
214
|
+
return `${token}:${entry.type}:${entry.description}`
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
if (entry.type === 'hotfix') return `${token}:hotfix`
|
|
218
|
+
|
|
219
|
+
return token
|
|
220
|
+
}
|
|
221
|
+
|
|
181
222
|
const withDescription = (base: { id: ReleaseId; type: ReleaseType }, description?: string): ReleaseEntry => {
|
|
182
223
|
return description !== undefined && description !== '' ? { ...base, description } : base
|
|
183
224
|
}
|
package/src/mcp/tools/index.ts
CHANGED
|
@@ -16,6 +16,7 @@ import { versionMcpTool } from 'src/commands/version'
|
|
|
16
16
|
import { worktreesAddMcpTool } from 'src/commands/worktrees-add'
|
|
17
17
|
import { worktreesListMcpTool } from 'src/commands/worktrees-list'
|
|
18
18
|
import { worktreesOpenMcpTool } from 'src/commands/worktrees-open'
|
|
19
|
+
import { worktreesReloadMcpTool } from 'src/commands/worktrees-reload'
|
|
19
20
|
import { worktreesRemoveMcpTool } from 'src/commands/worktrees-remove'
|
|
20
21
|
import { worktreesSyncMcpTool } from 'src/commands/worktrees-sync'
|
|
21
22
|
import { createToolHandler } from 'src/lib/tool-handler'
|
|
@@ -37,6 +38,7 @@ const tools = [
|
|
|
37
38
|
worktreesAddMcpTool,
|
|
38
39
|
worktreesListMcpTool,
|
|
39
40
|
worktreesOpenMcpTool,
|
|
41
|
+
worktreesReloadMcpTool,
|
|
40
42
|
worktreesRemoveMcpTool,
|
|
41
43
|
worktreesSyncMcpTool,
|
|
42
44
|
]
|