@aviaratech/ai-delivery 0.3.34 → 0.3.36
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/CONTRIBUTING.md +12 -206
- package/README.md +57 -506
- package/dist/agent.d.ts +0 -2
- package/dist/agent.js +76 -16
- package/dist/agent.js.map +7 -1
- package/dist/agentReadiness.test.js +73 -67
- package/dist/agentReadiness.test.js.map +7 -1
- package/dist/boardReconcile.test.js +1746 -0
- package/dist/boardReconcile.test.js.map +7 -0
- package/dist/build.test.js +130 -0
- package/dist/build.test.js.map +7 -0
- package/dist/callerErrors.test.js +105 -0
- package/dist/callerErrors.test.js.map +7 -0
- package/dist/cli.js +406 -485
- package/dist/cli.js.map +7 -1
- package/dist/cliResult.d.ts +2 -2
- package/dist/cliResult.js +42 -25
- package/dist/cliResult.js.map +7 -1
- package/dist/cliResult.test.js +434 -297
- package/dist/cliResult.test.js.map +7 -1
- package/dist/config/deliveryConfig.d.ts +320 -14
- package/dist/config/deliveryConfig.js +472 -385
- package/dist/config/deliveryConfig.js.map +7 -1
- package/dist/config/deliveryConfig.test.js +775 -584
- package/dist/config/deliveryConfig.test.js.map +7 -1
- package/dist/contributorChecks.test.js +1694 -916
- package/dist/contributorChecks.test.js.map +7 -1
- package/dist/currentConsumer.test.js +819 -737
- package/dist/currentConsumer.test.js.map +7 -1
- package/dist/currentTrackingScenario.test.js +499 -477
- package/dist/currentTrackingScenario.test.js.map +7 -1
- package/dist/delivery/common.js +160 -172
- package/dist/delivery/common.js.map +7 -1
- package/dist/delivery/delivery.test.js +509 -431
- package/dist/delivery/delivery.test.js.map +7 -1
- package/dist/delivery/evidence.d.ts +2 -2
- package/dist/delivery/evidence.js +133 -120
- package/dist/delivery/evidence.js.map +7 -1
- package/dist/delivery/index.js +7 -2
- package/dist/delivery/index.js.map +7 -1
- package/dist/delivery/legacy.js +65 -5
- package/dist/delivery/legacy.js.map +7 -1
- package/dist/delivery/policy.d.ts +10 -10
- package/dist/delivery/policy.js +211 -238
- package/dist/delivery/policy.js.map +7 -1
- package/dist/delivery/stage.d.ts +18 -18
- package/dist/delivery/stage.js +220 -235
- package/dist/delivery/stage.js.map +7 -1
- package/dist/deliveryBoard.d.ts +74 -0
- package/dist/deliveryBoard.js +644 -0
- package/dist/deliveryBoard.js.map +7 -0
- package/dist/deliveryBoard.test.d.ts +1 -0
- package/dist/deliveryBoard.test.js +649 -0
- package/dist/deliveryBoard.test.js.map +7 -0
- package/dist/deliveryHealth.test.js +179 -155
- package/dist/deliveryHealth.test.js.map +7 -1
- package/dist/dependencyCompatibility.test.js +154 -140
- package/dist/dependencyCompatibility.test.js.map +7 -1
- package/dist/directoryIndependent.test.js +417 -383
- package/dist/directoryIndependent.test.js.map +7 -1
- package/dist/dispatch.d.ts +17 -12
- package/dist/dispatch.js +330 -322
- package/dist/dispatch.js.map +7 -1
- package/dist/errors.d.ts +16 -3
- package/dist/errors.js +104 -82
- package/dist/errors.js.map +7 -1
- package/dist/fixtures/deliveryBoardReplay.d.ts +56 -0
- package/dist/fixtures/deliveryBoardReplay.js +617 -0
- package/dist/fixtures/deliveryBoardReplay.js.map +7 -0
- package/dist/fixtures/discovery.d.ts +59 -19
- package/dist/fixtures/discovery.js +96 -90
- package/dist/fixtures/discovery.js.map +7 -1
- package/dist/fixtures/inertEntrypointChild.js +57 -56
- package/dist/fixtures/inertEntrypointChild.js.map +7 -1
- package/dist/fixtures/inertEntrypoints.d.ts +1 -1
- package/dist/fixtures/inertEntrypoints.js +321 -276
- package/dist/fixtures/inertEntrypoints.js.map +7 -1
- package/dist/fixtures/inertTarget.d.ts +78 -7
- package/dist/fixtures/inertTarget.js +769 -691
- package/dist/fixtures/inertTarget.js.map +7 -1
- package/dist/fixtures/issue63.d.ts +4 -3
- package/dist/fixtures/issue63.js +260 -274
- package/dist/fixtures/issue63.js.map +7 -1
- package/dist/fixtures/issueProjectItems.d.ts +20 -0
- package/dist/fixtures/issueProjectItems.js +15 -0
- package/dist/fixtures/issueProjectItems.js.map +7 -0
- package/dist/fixtures/readView.d.ts +120 -0
- package/dist/fixtures/readView.js +172 -0
- package/dist/fixtures/readView.js.map +7 -0
- package/dist/fixtures/recordedGitHubFlows.d.ts +120 -0
- package/dist/fixtures/recordedGitHubFlows.js +109 -0
- package/dist/fixtures/recordedGitHubFlows.js.map +7 -0
- package/dist/genericCompatibility.test.js +64 -55
- package/dist/genericCompatibility.test.js.map +7 -1
- package/dist/git.js +73 -67
- package/dist/git.js.map +7 -1
- package/dist/gitProcess.d.ts +1 -1
- package/dist/gitProcess.js +58 -53
- package/dist/gitProcess.js.map +7 -1
- package/dist/github/client.d.ts +2 -2
- package/dist/github/client.js +484 -379
- package/dist/github/client.js.map +7 -1
- package/dist/github/commandIdentityPolicy.js +44 -51
- package/dist/github/commandIdentityPolicy.js.map +7 -1
- package/dist/github/discovery.d.ts +3 -0
- package/dist/github/discovery.js +197 -201
- package/dist/github/discovery.js.map +7 -1
- package/dist/github/discovery.test.js +223 -177
- package/dist/github/discovery.test.js.map +7 -1
- package/dist/github/issueHistory.d.ts +2 -2
- package/dist/github/issueHistory.js +117 -125
- package/dist/github/issueHistory.js.map +7 -1
- package/dist/github/machineAuth.d.ts +1 -1
- package/dist/github/machineAuth.js +126 -117
- package/dist/github/machineAuth.js.map +7 -1
- package/dist/github/machineAuth.test.js +755 -639
- package/dist/github/machineAuth.test.js.map +7 -1
- package/dist/github/nativeIssueMetadata.js +286 -273
- package/dist/github/nativeIssueMetadata.js.map +7 -1
- package/dist/github/projectDelivery.d.ts +53 -1
- package/dist/github/projectDelivery.js +623 -460
- package/dist/github/projectDelivery.js.map +7 -1
- package/dist/github/relationships.d.ts +5 -2
- package/dist/github/relationships.js +434 -333
- package/dist/github/relationships.js.map +7 -1
- package/dist/github/repo.d.ts +1 -0
- package/dist/github/repo.js +123 -96
- package/dist/github/repo.js.map +7 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +7 -1
- package/dist/issue.d.ts +103 -7
- package/dist/issue.js +2104 -1547
- package/dist/issue.js.map +7 -1
- package/dist/issue63History.test.js +40 -42
- package/dist/issue63History.test.js.map +7 -1
- package/dist/issue63Routes.test.js +154 -143
- package/dist/issue63Routes.test.js.map +7 -1
- package/dist/issueBatchUpdate.test.js +1004 -683
- package/dist/issueBatchUpdate.test.js.map +7 -1
- package/dist/issueBlockerGuard.test.js +262 -226
- package/dist/issueBlockerGuard.test.js.map +7 -1
- package/dist/issueContract.d.ts +23 -4
- package/dist/issueContract.js +416 -395
- package/dist/issueContract.js.map +7 -1
- package/dist/issueContract.test.d.ts +4 -3
- package/dist/issueContract.test.js +358 -321
- package/dist/issueContract.test.js.map +7 -1
- package/dist/issueDates.test.js +235 -233
- package/dist/issueDates.test.js.map +7 -1
- package/dist/issueInfoReadback.test.js +304 -190
- package/dist/issueInfoReadback.test.js.map +7 -1
- package/dist/issueIntake.test.js +1945 -1732
- package/dist/issueIntake.test.js.map +7 -1
- package/dist/issueJournal.d.ts +40 -19
- package/dist/issueJournal.js +229 -138
- package/dist/issueJournal.js.map +7 -1
- package/dist/issueJournal.test.js +605 -422
- package/dist/issueJournal.test.js.map +7 -1
- package/dist/issueRollup.test.d.ts +1 -0
- package/dist/issueRollup.test.js +476 -0
- package/dist/issueRollup.test.js.map +7 -0
- package/dist/issueTracking.test.js +1088 -593
- package/dist/issueTracking.test.js.map +7 -1
- package/dist/issueWriteRecovery.test.d.ts +1 -0
- package/dist/issueWriteRecovery.test.js +260 -0
- package/dist/issueWriteRecovery.test.js.map +7 -0
- package/dist/lifecycle.test.js +112 -441
- package/dist/lifecycle.test.js.map +7 -1
- package/dist/logger.js +80 -74
- package/dist/logger.js.map +7 -1
- package/dist/mcp/index.js +116 -90
- package/dist/mcp/index.js.map +7 -1
- package/dist/mcp/tools.d.ts +790 -220
- package/dist/mcp/tools.js +267 -333
- package/dist/mcp/tools.js.map +7 -1
- package/dist/pluginAuthProbe.js +63 -52
- package/dist/pluginAuthProbe.js.map +7 -1
- package/dist/pluginAuthProbe.test.js +85 -62
- package/dist/pluginAuthProbe.test.js.map +7 -1
- package/dist/pluginCredentials.test.js +282 -259
- package/dist/pluginCredentials.test.js.map +7 -1
- package/dist/pluginDoctor.test.js +653 -588
- package/dist/pluginDoctor.test.js.map +7 -1
- package/dist/pluginInstaller.d.ts +7 -5
- package/dist/pluginInstaller.js +1173 -1231
- package/dist/pluginInstaller.js.map +7 -1
- package/dist/pluginInstaller.test.js +1822 -1283
- package/dist/pluginInstaller.test.js.map +7 -1
- package/dist/pluginPackaging.test.js +485 -305
- package/dist/pluginPackaging.test.js.map +7 -1
- package/dist/pr.d.ts +132 -94
- package/dist/pr.js +1521 -1323
- package/dist/pr.js.map +7 -1
- package/dist/pr.test.js +1678 -632
- package/dist/pr.test.js.map +7 -1
- package/dist/prAssociation.test.js +2419 -1788
- package/dist/prAssociation.test.js.map +7 -1
- package/dist/prDispatch.test.js +150 -89
- package/dist/prDispatch.test.js.map +7 -1
- package/dist/readView.d.ts +183 -0
- package/dist/readView.js +217 -0
- package/dist/readView.js.map +7 -0
- package/dist/readView.test.d.ts +1 -0
- package/dist/readView.test.js +119 -0
- package/dist/readView.test.js.map +7 -0
- package/dist/releaseReconciliation.test.js +267 -288
- package/dist/releaseReconciliation.test.js.map +7 -1
- package/dist/releaseWorkflow.test.js +2493 -422
- package/dist/releaseWorkflow.test.js.map +7 -1
- package/dist/review.d.ts +738 -2
- package/dist/review.js +601 -348
- package/dist/review.js.map +7 -1
- package/dist/review.test.js +1218 -812
- package/dist/review.test.js.map +7 -1
- package/dist/reviewSubmit.test.d.ts +1 -0
- package/dist/reviewSubmit.test.js +747 -0
- package/dist/reviewSubmit.test.js.map +7 -0
- package/dist/services/agentReadinessService.js +42 -37
- package/dist/services/agentReadinessService.js.map +7 -1
- package/dist/services/blockerGuardService.js +188 -188
- package/dist/services/blockerGuardService.js.map +7 -1
- package/dist/services/boardReconcileService.d.ts +1204 -0
- package/dist/services/boardReconcileService.js +1445 -0
- package/dist/services/boardReconcileService.js.map +7 -0
- package/dist/services/deliveryAdmission.d.ts +2 -0
- package/dist/services/deliveryAdmission.js +129 -152
- package/dist/services/deliveryAdmission.js.map +7 -1
- package/dist/services/deliveryHealthService.js +197 -199
- package/dist/services/deliveryHealthService.js.map +7 -1
- package/dist/services/legacyIssueMigration.js +263 -277
- package/dist/services/legacyIssueMigration.js.map +7 -1
- package/dist/services/worktreeRegistry.d.ts +27 -119
- package/dist/services/worktreeRegistry.js +765 -1182
- package/dist/services/worktreeRegistry.js.map +7 -1
- package/dist/stagedChecks.test.js +396 -194
- package/dist/stagedChecks.test.js.map +7 -1
- package/dist/start.test.js +99 -95
- package/dist/start.test.js.map +7 -1
- package/dist/stdoutRegression.test.js +354 -350
- package/dist/stdoutRegression.test.js.map +7 -1
- package/dist/targetPolicyDiscovery.test.js +141 -143
- package/dist/targetPolicyDiscovery.test.js.map +7 -1
- package/dist/targetPolicyEntrypoints.test.js +308 -269
- package/dist/targetPolicyEntrypoints.test.js.map +7 -1
- package/dist/targetPolicyLocal.test.js +580 -1051
- package/dist/targetPolicyLocal.test.js.map +7 -1
- package/dist/targetPolicyRoutes.test.js +305 -281
- package/dist/targetPolicyRoutes.test.js.map +7 -1
- package/dist/targetRepositoryExecution.test.d.ts +1 -0
- package/dist/targetRepositoryExecution.test.js +463 -0
- package/dist/targetRepositoryExecution.test.js.map +7 -0
- package/dist/terminalMessages.js +41 -35
- package/dist/terminalMessages.js.map +7 -1
- package/dist/toolOutput.d.ts +2 -0
- package/dist/toolOutput.js +36 -0
- package/dist/toolOutput.js.map +7 -0
- package/dist/toolOutput.test.d.ts +1 -0
- package/dist/toolOutput.test.js +240 -0
- package/dist/toolOutput.test.js.map +7 -0
- package/dist/utils/atomicJson.js +84 -76
- package/dist/utils/atomicJson.js.map +7 -1
- package/dist/utils/filesystem.js +15 -18
- package/dist/utils/filesystem.js.map +7 -1
- package/dist/utils/lockfile.js +68 -71
- package/dist/utils/lockfile.js.map +7 -1
- package/dist/verification.d.ts +1 -19
- package/dist/verification.js +1020 -1929
- package/dist/verification.js.map +7 -1
- package/dist/verificationGate.test.js +127 -117
- package/dist/verificationGate.test.js.map +7 -1
- package/dist/version.d.ts +6 -0
- package/dist/version.js +24 -10
- package/dist/version.js.map +7 -1
- package/dist/worktree.d.ts +3 -15
- package/dist/worktree.js +97 -177
- package/dist/worktree.js.map +7 -1
- package/package.json +10 -8
- package/plugins/ai-delivery/.claude-plugin/plugin.json +2 -2
- package/plugins/ai-delivery/README.md +47 -156
- package/plugins/ai-delivery/plugin.json +1 -1
- package/plugins/ai-delivery/runtime/dist/THIRD-PARTY-NOTICES.md +261 -43
- package/plugins/ai-delivery/runtime/dist/cli.js +369 -125
- package/plugins/ai-delivery/runtime/package.json +1 -1
- package/plugins/ai-delivery/skills/intake-create/SKILL.md +14 -78
- package/plugins/ai-delivery/skills/pr-handoff/SKILL.md +35 -36
- package/plugins/ai-delivery/skills/worktree-lifecycle/SKILL.md +14 -15
- package/dist/investigationCompletion.test.js +0 -728
- package/dist/investigationCompletion.test.js.map +0 -1
- package/dist/setup.d.ts +0 -60
- package/dist/setup.js +0 -585
- package/dist/setup.js.map +0 -1
- package/dist/setup.test.js +0 -3058
- package/dist/setup.test.js.map +0 -1
- package/dist/worktreeTransition.d.ts +0 -211
- package/dist/worktreeTransition.js +0 -1037
- package/dist/worktreeTransition.js.map +0 -1
- package/dist/worktreeTransition.test.js +0 -1191
- package/dist/worktreeTransition.test.js.map +0 -1
- /package/dist/{investigationCompletion.test.d.ts → boardReconcile.test.d.ts} +0 -0
- /package/dist/{setup.test.d.ts → build.test.d.ts} +0 -0
- /package/dist/{worktreeTransition.test.d.ts → callerErrors.test.d.ts} +0 -0
package/dist/worktree.js
CHANGED
|
@@ -1,188 +1,108 @@
|
|
|
1
|
-
import { existsSync, lstatSync, realpathSync } from
|
|
2
|
-
import { isAbsolute, join, relative,
|
|
3
|
-
import { resolveGitRemoteName } from
|
|
4
|
-
import { DeliveryError } from
|
|
5
|
-
import { assertClean, defaultBaseRef, git, gitCommonDir, gitExitCode, gitRoot, primaryGitRoot } from
|
|
6
|
-
import { assertIssueWorktreeTransitionAdmission, } from './services/worktreeRegistry.js';
|
|
1
|
+
import { existsSync, lstatSync, realpathSync } from "node:fs";
|
|
2
|
+
import { isAbsolute, join, relative, sep } from "node:path";
|
|
3
|
+
import { resolveGitRemoteName } from "./github/repo.js";
|
|
4
|
+
import { DeliveryError } from "./errors.js";
|
|
5
|
+
import { assertClean, defaultBaseRef, git, gitCommonDir, gitExitCode, gitRoot, primaryGitRoot } from "./git.js";
|
|
7
6
|
function assertSafePath(root, target) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
const rel = relative(join(root, ".worktrees"), target);
|
|
8
|
+
if (rel === "" || rel.startsWith("..") || rel.startsWith("/")) {
|
|
9
|
+
throw new DeliveryError("Worktree path must be inside the repository .worktrees directory.");
|
|
10
|
+
}
|
|
12
11
|
}
|
|
13
12
|
function assertIssueNumber(issueNumber) {
|
|
14
|
-
|
|
15
|
-
throw new DeliveryError('Issue number must be positive.');
|
|
16
|
-
}
|
|
17
|
-
/** @internal Shared physical custody check for preparation and same-owner continuation. */
|
|
18
|
-
export function assertIssueWorktreeLocation(row, root) {
|
|
19
|
-
assertIssueNumber(row.issueNumber ?? 0);
|
|
20
|
-
const branch = `issue/${String(row.issueNumber)}`;
|
|
21
|
-
const target = join(root, '.worktrees', `issue-${String(row.issueNumber)}`);
|
|
22
|
-
if (row.type !== 'issue' ||
|
|
23
|
-
row.path !== target ||
|
|
24
|
-
row.branch !== branch ||
|
|
25
|
-
!existsSync(target) ||
|
|
26
|
-
gitRoot(target) !== realpathSync(target) ||
|
|
27
|
-
gitCommonDir(target) !== gitCommonDir(root)) {
|
|
28
|
-
throw new DeliveryError('Registered worktree disagrees with its exact repository, path or branch.');
|
|
29
|
-
}
|
|
30
|
-
if (git(target, 'branch', '--show-current') !== branch)
|
|
31
|
-
throw new DeliveryError('Registered branch drifted.');
|
|
32
|
-
}
|
|
33
|
-
/** @internal Preservation-only refusal for callers of the removed issue-worktree API. */
|
|
34
|
-
export async function prepareIssueWorktree(input) {
|
|
35
|
-
assertIssueNumber(input.issueNumber);
|
|
36
|
-
assertIssueWorktreeTransitionAdmission(input.issueNumber, primaryGitRoot(input.repoRoot));
|
|
37
|
-
throw new DeliveryError('Issue worktree preparation was removed; prepare a host-owned worktree from the GitHub-linked branch.');
|
|
38
|
-
}
|
|
39
|
-
function investigationGitRows(root) {
|
|
40
|
-
return git(root, 'worktree', 'list', '--porcelain')
|
|
41
|
-
.split('\n\n')
|
|
42
|
-
.filter(Boolean)
|
|
43
|
-
.map((block) => block.split('\n'));
|
|
44
|
-
}
|
|
45
|
-
function investigationPathPresent(path) {
|
|
46
|
-
try {
|
|
47
|
-
lstatSync(path);
|
|
48
|
-
return true;
|
|
49
|
-
}
|
|
50
|
-
catch (error) {
|
|
51
|
-
if (error.code === 'ENOENT')
|
|
52
|
-
return false;
|
|
53
|
-
throw error;
|
|
54
|
-
}
|
|
13
|
+
if (!Number.isSafeInteger(issueNumber) || issueNumber <= 0) throw new DeliveryError("Issue number must be positive.");
|
|
55
14
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
if (git(target, 'ls-files', '-v', '-z')
|
|
65
|
-
.split('\0')
|
|
66
|
-
.some((entry) => /^(?:[a-z]|S) /u.test(entry)))
|
|
67
|
-
throw new DeliveryError('Investigation source has assume-unchanged or skip-worktree index entries; preserve hidden local data.');
|
|
68
|
-
assertClean(target);
|
|
69
|
-
if (git(target, 'ls-files', '--others', '--ignored', '--exclude-standard', '-z') !== '')
|
|
70
|
-
throw new DeliveryError('Investigation source contains ignored files; preserve them before completion.');
|
|
71
|
-
const rows = investigationGitRows(root).filter((row) => row.includes(`worktree ${target}`) || row.includes(`branch refs/heads/${branch}`));
|
|
72
|
-
if (rows.length !== 1 || rows[0].some((line) => /^(?:locked|prunable)(?: |$)/u.test(line)))
|
|
73
|
-
throw new DeliveryError('Investigation Git worktree custody is ambiguous or locked.');
|
|
74
|
-
const directory = realpathSync(resolve(target, git(target, 'rev-parse', '--git-dir')));
|
|
75
|
-
const metadata = lstatSync(target);
|
|
76
|
-
const administration = lstatSync(directory);
|
|
77
|
-
return {
|
|
78
|
-
head: { sha: git(target, 'rev-parse', 'HEAD'), tree: git(target, 'rev-parse', 'HEAD^{tree}') },
|
|
79
|
-
physical: {
|
|
80
|
-
device: metadata.dev,
|
|
81
|
-
inode: metadata.ino,
|
|
82
|
-
gitDirectory: directory,
|
|
83
|
-
gitDevice: administration.dev,
|
|
84
|
-
gitInode: administration.ino,
|
|
85
|
-
},
|
|
86
|
-
};
|
|
15
|
+
function assertIssueWorktreeLocation(row, root) {
|
|
16
|
+
assertIssueNumber(row.issueNumber ?? 0);
|
|
17
|
+
const branch = `issue/${String(row.issueNumber)}`;
|
|
18
|
+
const target = join(root, ".worktrees", `issue-${String(row.issueNumber)}`);
|
|
19
|
+
if (row.type !== "issue" || row.path !== target || row.branch !== branch || !existsSync(target) || gitRoot(target) !== realpathSync(target) || gitCommonDir(target) !== gitCommonDir(root)) {
|
|
20
|
+
throw new DeliveryError("Registered worktree disagrees with its exact repository, path or branch.");
|
|
21
|
+
}
|
|
22
|
+
if (git(target, "branch", "--show-current") !== branch) throw new DeliveryError("Registered branch drifted.");
|
|
87
23
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
const { repoRoot: root, row, head } = preparation;
|
|
91
|
-
assertSafePath(root, row.path);
|
|
92
|
-
if (row.path !== join(root, '.worktrees', `issue-${String(row.issueNumber)}`) ||
|
|
93
|
-
row.branch !== `issue/${String(row.issueNumber)}`)
|
|
94
|
-
throw new DeliveryError('Investigation path or branch disagrees.');
|
|
95
|
-
if (row.path === primaryGitRoot(root) || row.path === gitRoot(launchDirectory))
|
|
96
|
-
throw new DeliveryError('Investigation completion refuses the primary or current worktree.');
|
|
97
|
-
// --repo-root must not hide an invocation launched inside the removable worktree.
|
|
98
|
-
const currentRelative = relative(row.path, realpathSync(process.cwd()));
|
|
99
|
-
const currentOutside = currentRelative === '..' || currentRelative.startsWith(`..${sep}`) || isAbsolute(currentRelative);
|
|
100
|
-
if (!currentOutside)
|
|
101
|
-
throw new DeliveryError('Investigation completion refuses the current worktree.');
|
|
102
|
-
if (git(root, 'rev-parse', `refs/heads/${row.branch}`) !== head.sha)
|
|
103
|
-
throw new DeliveryError('Investigation retaining branch has new or unpushed commits.');
|
|
104
|
-
const rows = investigationGitRows(root).filter((candidate) => candidate.includes(`worktree ${row.path}`) || candidate.includes(`branch refs/heads/${row.branch}`));
|
|
105
|
-
if (!investigationPathPresent(row.path)) {
|
|
106
|
-
// Git removal must have completed both disk and administration before row retirement.
|
|
107
|
-
if (!allowAbsent || rows.length !== 0 || investigationPathPresent(preparation.physical.gitDirectory))
|
|
108
|
-
throw new DeliveryError('Investigation source is missing without exact completed Git removal.');
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
const observed = investigationSourceIdentity(root, row.issueNumber);
|
|
112
|
-
if (JSON.stringify(observed.head) !== JSON.stringify(head) ||
|
|
113
|
-
JSON.stringify(observed.physical) !== JSON.stringify(preparation.physical))
|
|
114
|
-
throw new DeliveryError('Investigation source commit, tree or physical identity changed.');
|
|
24
|
+
function gitWorktreeRows(root) {
|
|
25
|
+
return git(root, "worktree", "list", "--porcelain").split("\n\n").filter(Boolean).map((block) => block.split("\n"));
|
|
115
26
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
assertInvestigationSource(preparation, launchDirectory, true);
|
|
27
|
+
function pathPresent(path) {
|
|
28
|
+
try {
|
|
29
|
+
lstatSync(path);
|
|
30
|
+
return true;
|
|
31
|
+
} catch (error) {
|
|
32
|
+
if (error.code === "ENOENT") return false;
|
|
33
|
+
throw error;
|
|
34
|
+
}
|
|
125
35
|
}
|
|
126
36
|
function removeMergedIssueSource(row, root, remote, attestation, allowAbsent) {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
if (attestation) {
|
|
143
|
-
|
|
144
|
-
attestation.headSha !== git(present ? row.path : root, 'rev-parse', present ? 'HEAD' : row.branch) ||
|
|
145
|
-
(attestation.remoteHeadSha !== null && attestation.remoteHeadSha !== attestation.headSha) ||
|
|
146
|
-
attestation.baseBranch !== base.slice(`refs/remotes/${resolveGitRemoteName(root, remote)}/`.length) ||
|
|
147
|
-
attestation.remoteBaseSha !== git(root, 'rev-parse', base) ||
|
|
148
|
-
gitExitCode(root, 'merge-base', '--is-ancestor', attestation.baseSha, attestation.mergeSha) !== 0 ||
|
|
149
|
-
gitExitCode(root, 'merge-base', '--is-ancestor', attestation.mergeSha, base) !== 0 ||
|
|
150
|
-
git(root, 'rev-parse', `${attestation.mergeSha}^{tree}`) !== attestation.mergeTree ||
|
|
151
|
-
(!branchIncluded && attestation.strategy === 'merge')) {
|
|
152
|
-
throw new DeliveryError('Exact merged-result cleanup attestation disagrees with Git or remote readback.');
|
|
153
|
-
}
|
|
37
|
+
assertSafePath(root, row.path);
|
|
38
|
+
if (row.status !== "merged" || row.path !== join(root, ".worktrees", `issue-${String(row.issueNumber)}`)) {
|
|
39
|
+
throw new DeliveryError("Only the exact registered merged issue worktree can be cleaned.");
|
|
40
|
+
}
|
|
41
|
+
const present = existsSync(row.path);
|
|
42
|
+
if (present && gitRoot(row.path) !== realpathSync(row.path)) {
|
|
43
|
+
throw new DeliveryError("Registered worktree points elsewhere.");
|
|
44
|
+
}
|
|
45
|
+
if (!present && !allowAbsent) {
|
|
46
|
+
throw new DeliveryError("Registered worktree is missing.");
|
|
47
|
+
}
|
|
48
|
+
if (present) assertClean(row.path);
|
|
49
|
+
const base = defaultBaseRef(root, remote);
|
|
50
|
+
const branchIncluded = gitExitCode(root, "merge-base", "--is-ancestor", row.branch, base) === 0;
|
|
51
|
+
if (attestation) {
|
|
52
|
+
if (attestation.headBranch !== row.branch || attestation.headSha !== git(present ? row.path : root, "rev-parse", present ? "HEAD" : row.branch) || attestation.remoteHeadSha !== null && attestation.remoteHeadSha !== attestation.headSha || attestation.baseBranch !== base.slice(`refs/remotes/${resolveGitRemoteName(root, remote)}/`.length) || attestation.remoteBaseSha !== git(root, "rev-parse", base) || gitExitCode(root, "merge-base", "--is-ancestor", attestation.baseSha, attestation.mergeSha) !== 0 || gitExitCode(root, "merge-base", "--is-ancestor", attestation.mergeSha, base) !== 0 || git(root, "rev-parse", `${attestation.mergeSha}^{tree}`) !== attestation.mergeTree || !branchIncluded && attestation.strategy === "merge") {
|
|
53
|
+
throw new DeliveryError("Exact merged-result cleanup attestation disagrees with Git or remote readback.");
|
|
154
54
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
55
|
+
} else if (!branchIncluded) {
|
|
56
|
+
throw new DeliveryError(
|
|
57
|
+
"Branch is not included in the current base and exact merged-result attestation is absent."
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
if (present) git(root, "worktree", "remove", row.path);
|
|
160
61
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
62
|
+
function removeFinishedIssueSource(row, root, headSha, attestation) {
|
|
63
|
+
assertIssueNumber(row.issueNumber ?? 0);
|
|
64
|
+
if (row.branch !== `issue/${String(row.issueNumber)}` || row.path !== join(root, ".worktrees", `issue-${String(row.issueNumber)}`))
|
|
65
|
+
throw new DeliveryError("Registered path or branch differs from the finished issue; preserve the source.");
|
|
66
|
+
if (gitExitCode(root, "symbolic-ref", "--quiet", `refs/heads/${row.branch}`) === 0)
|
|
67
|
+
throw new DeliveryError("Registered branch is symbolic; preserve its target and restore direct branch ownership.");
|
|
68
|
+
if (pathPresent(row.path) && realpathSync(row.path) !== row.path)
|
|
69
|
+
throw new DeliveryError("Registered source has a symlinked path; preserve its physical worktree.");
|
|
70
|
+
const current = relative(row.path, realpathSync(process.cwd()));
|
|
71
|
+
if (row.path === primaryGitRoot(root) || !(current === ".." || current.startsWith(`..${sep}`) || isAbsolute(current)))
|
|
72
|
+
throw new DeliveryError("Cleanup targets the current or primary worktree; run finish from outside that worktree.");
|
|
73
|
+
const rows = gitWorktreeRows(root).filter(
|
|
74
|
+
(lines) => lines.includes(`worktree ${row.path}`) || lines.includes(`branch refs/heads/${row.branch}`)
|
|
75
|
+
);
|
|
76
|
+
if (pathPresent(row.path)) {
|
|
77
|
+
if (lstatSync(row.path).isSymbolicLink())
|
|
78
|
+
throw new DeliveryError("Registered source is a symlink; preserve the source.");
|
|
79
|
+
assertIssueWorktreeLocation(row, root);
|
|
80
|
+
try {
|
|
81
|
+
assertClean(row.path);
|
|
82
|
+
} catch {
|
|
83
|
+
throw new DeliveryError("Worktree contains local changes; preserve them before cleanup.");
|
|
84
|
+
}
|
|
85
|
+
if (rows.length !== 1 || rows[0].some((line) => /^(?:locked|prunable)(?: |$)/u.test(line)))
|
|
86
|
+
throw new DeliveryError("Worktree custody is ambiguous or locked; preserve the source.");
|
|
87
|
+
if (git(row.path, "ls-files", "-v", "-z").split("\0").some((entry) => /^(?:[a-z]|S) /u.test(entry)))
|
|
88
|
+
throw new DeliveryError("Worktree has hidden index entries; preserve local data before cleanup.");
|
|
89
|
+
if (git(row.path, "ls-files", "--others", "--ignored", "--exclude-standard", "-z") !== "")
|
|
90
|
+
throw new DeliveryError("Worktree contains ignored files; preserve local data before cleanup.");
|
|
91
|
+
} else if (rows.length !== 0)
|
|
92
|
+
throw new DeliveryError("Missing worktree still has Git custody; reconcile it without forced cleanup.");
|
|
93
|
+
if (gitExitCode(root, "show-ref", "--verify", "--quiet", `refs/heads/${row.branch}`) !== 0) {
|
|
94
|
+
if (!pathPresent(row.path)) return;
|
|
95
|
+
throw new DeliveryError("Registered branch is absent; preserve the source.");
|
|
96
|
+
}
|
|
97
|
+
if (git(root, "rev-parse", `refs/heads/${row.branch}`) !== headSha)
|
|
98
|
+
throw new DeliveryError("Local branch differs from the finished PR head; preserve its commits.");
|
|
99
|
+
removeMergedIssueSource(row, root, void 0, attestation, true);
|
|
100
|
+
git(root, "update-ref", "--no-deref", "-d", `refs/heads/${row.branch}`, headSha);
|
|
101
|
+
if (pathPresent(row.path) || gitExitCode(root, "show-ref", "--verify", "--quiet", `refs/heads/${row.branch}`) === 0)
|
|
102
|
+
throw new DeliveryError("Cleanup readback is incomplete; inspect the retained source without retrying removal.");
|
|
187
103
|
}
|
|
188
|
-
|
|
104
|
+
export {
|
|
105
|
+
assertIssueWorktreeLocation,
|
|
106
|
+
removeFinishedIssueSource
|
|
107
|
+
};
|
|
108
|
+
//# sourceMappingURL=worktree.js.map
|
package/dist/worktree.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/worktree.ts"],
|
|
4
|
+
"sourcesContent": ["import { existsSync, lstatSync, realpathSync } from 'node:fs';\nimport { isAbsolute, join, relative, sep } from 'node:path';\n\nimport { resolveGitRemoteName } from './github/repo.js';\n\nimport { DeliveryError } from './errors.js';\nimport { assertClean, defaultBaseRef, git, gitCommonDir, gitExitCode, gitRoot, primaryGitRoot } from './git.js';\nimport type { WorktreeEntry } from './services/worktreeRegistry.js';\n\nfunction assertSafePath(root: string, target: string): void {\n const rel = relative(join(root, '.worktrees'), target);\n if (rel === '' || rel.startsWith('..') || rel.startsWith('/')) {\n throw new DeliveryError('Worktree path must be inside the repository .worktrees directory.');\n }\n}\n\nfunction assertIssueNumber(issueNumber: number): void {\n if (!Number.isSafeInteger(issueNumber) || issueNumber <= 0) throw new DeliveryError('Issue number must be positive.');\n}\n\n/** @internal Shared physical custody check for preparation and same-owner continuation. */\nexport function assertIssueWorktreeLocation(row: WorktreeEntry, root: string): void {\n assertIssueNumber(row.issueNumber ?? 0);\n const branch = `issue/${String(row.issueNumber)}`;\n const target = join(root, '.worktrees', `issue-${String(row.issueNumber)}`);\n if (\n row.type !== 'issue' ||\n row.path !== target ||\n row.branch !== branch ||\n !existsSync(target) ||\n gitRoot(target) !== realpathSync(target) ||\n gitCommonDir(target) !== gitCommonDir(root)\n ) {\n throw new DeliveryError('Registered worktree disagrees with its exact repository, path or branch.');\n }\n if (git(target, 'branch', '--show-current') !== branch) throw new DeliveryError('Registered branch drifted.');\n}\n\nfunction gitWorktreeRows(root: string): string[][] {\n return git(root, 'worktree', 'list', '--porcelain')\n .split('\\n\\n')\n .filter(Boolean)\n .map((block) => block.split('\\n'));\n}\nfunction pathPresent(path: string): boolean {\n try {\n lstatSync(path);\n return true;\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === 'ENOENT') return false;\n throw error;\n }\n}\n\nexport interface MergeCleanupAttestation {\n baseBranch: string;\n baseSha: string;\n headBranch: string;\n headSha: string;\n mergeSha: string;\n mergeTree: string;\n remoteBaseSha: string;\n remoteHeadSha: string | null;\n strategy: 'merge' | 'squash' | 'rebase';\n}\n\nfunction removeMergedIssueSource(\n row: WorktreeEntry,\n root: string,\n remote: string | undefined,\n attestation: MergeCleanupAttestation | undefined,\n allowAbsent: boolean,\n): void {\n assertSafePath(root, row.path);\n if (row.status !== 'merged' || row.path !== join(root, '.worktrees', `issue-${String(row.issueNumber)}`)) {\n throw new DeliveryError('Only the exact registered merged issue worktree can be cleaned.');\n }\n const present = existsSync(row.path);\n if (present && gitRoot(row.path) !== realpathSync(row.path)) {\n throw new DeliveryError('Registered worktree points elsewhere.');\n }\n if (!present && !allowAbsent) {\n throw new DeliveryError('Registered worktree is missing.');\n }\n if (present) assertClean(row.path);\n const base = defaultBaseRef(root, remote);\n const branchIncluded = gitExitCode(root, 'merge-base', '--is-ancestor', row.branch, base) === 0;\n if (attestation) {\n if (\n attestation.headBranch !== row.branch ||\n attestation.headSha !== git(present ? row.path : root, 'rev-parse', present ? 'HEAD' : row.branch) ||\n (attestation.remoteHeadSha !== null && attestation.remoteHeadSha !== attestation.headSha) ||\n attestation.baseBranch !== base.slice(`refs/remotes/${resolveGitRemoteName(root, remote)}/`.length) ||\n attestation.remoteBaseSha !== git(root, 'rev-parse', base) ||\n gitExitCode(root, 'merge-base', '--is-ancestor', attestation.baseSha, attestation.mergeSha) !== 0 ||\n gitExitCode(root, 'merge-base', '--is-ancestor', attestation.mergeSha, base) !== 0 ||\n git(root, 'rev-parse', `${attestation.mergeSha}^{tree}`) !== attestation.mergeTree ||\n (!branchIncluded && attestation.strategy === 'merge')\n ) {\n throw new DeliveryError('Exact merged-result cleanup attestation disagrees with Git or remote readback.');\n }\n } else if (!branchIncluded) {\n throw new DeliveryError(\n 'Branch is not included in the current base and exact merged-result attestation is absent.',\n );\n }\n if (present) git(root, 'worktree', 'remove', row.path);\n}\n\n/** Remove only a finished, retained source and its exact local branch; never force Git removal. */\nexport function removeFinishedIssueSource(\n row: WorktreeEntry,\n root: string,\n headSha: string,\n attestation?: MergeCleanupAttestation,\n): void {\n assertIssueNumber(row.issueNumber ?? 0);\n if (\n row.branch !== `issue/${String(row.issueNumber)}` ||\n row.path !== join(root, '.worktrees', `issue-${String(row.issueNumber)}`)\n )\n throw new DeliveryError('Registered path or branch differs from the finished issue; preserve the source.');\n if (gitExitCode(root, 'symbolic-ref', '--quiet', `refs/heads/${row.branch}`) === 0)\n throw new DeliveryError('Registered branch is symbolic; preserve its target and restore direct branch ownership.');\n if (pathPresent(row.path) && realpathSync(row.path) !== row.path)\n throw new DeliveryError('Registered source has a symlinked path; preserve its physical worktree.');\n const current = relative(row.path, realpathSync(process.cwd()));\n if (row.path === primaryGitRoot(root) || !(current === '..' || current.startsWith(`..${sep}`) || isAbsolute(current)))\n throw new DeliveryError('Cleanup targets the current or primary worktree; run finish from outside that worktree.');\n const rows = gitWorktreeRows(root).filter(\n (lines) => lines.includes(`worktree ${row.path}`) || lines.includes(`branch refs/heads/${row.branch}`),\n );\n if (pathPresent(row.path)) {\n if (lstatSync(row.path).isSymbolicLink())\n throw new DeliveryError('Registered source is a symlink; preserve the source.');\n assertIssueWorktreeLocation(row, root);\n try {\n assertClean(row.path);\n } catch {\n throw new DeliveryError('Worktree contains local changes; preserve them before cleanup.');\n }\n if (rows.length !== 1 || rows[0]!.some((line) => /^(?:locked|prunable)(?: |$)/u.test(line)))\n throw new DeliveryError('Worktree custody is ambiguous or locked; preserve the source.');\n if (\n git(row.path, 'ls-files', '-v', '-z')\n .split('\\0')\n .some((entry) => /^(?:[a-z]|S) /u.test(entry))\n )\n throw new DeliveryError('Worktree has hidden index entries; preserve local data before cleanup.');\n if (git(row.path, 'ls-files', '--others', '--ignored', '--exclude-standard', '-z') !== '')\n throw new DeliveryError('Worktree contains ignored files; preserve local data before cleanup.');\n } else if (rows.length !== 0)\n throw new DeliveryError('Missing worktree still has Git custody; reconcile it without forced cleanup.');\n if (gitExitCode(root, 'show-ref', '--verify', '--quiet', `refs/heads/${row.branch}`) !== 0) {\n if (!pathPresent(row.path)) return;\n throw new DeliveryError('Registered branch is absent; preserve the source.');\n }\n if (git(root, 'rev-parse', `refs/heads/${row.branch}`) !== headSha)\n throw new DeliveryError('Local branch differs from the finished PR head; preserve its commits.');\n removeMergedIssueSource(row, root, undefined, attestation, true);\n git(root, 'update-ref', '--no-deref', '-d', `refs/heads/${row.branch}`, headSha);\n if (pathPresent(row.path) || gitExitCode(root, 'show-ref', '--verify', '--quiet', `refs/heads/${row.branch}`) === 0)\n throw new DeliveryError('Cleanup readback is incomplete; inspect the retained source without retrying removal.');\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,YAAY,WAAW,oBAAoB;AACpD,SAAS,YAAY,MAAM,UAAU,WAAW;AAEhD,SAAS,4BAA4B;AAErC,SAAS,qBAAqB;AAC9B,SAAS,aAAa,gBAAgB,KAAK,cAAc,aAAa,SAAS,sBAAsB;AAGrG,SAAS,eAAe,MAAc,QAAsB;AAC1D,QAAM,MAAM,SAAS,KAAK,MAAM,YAAY,GAAG,MAAM;AACrD,MAAI,QAAQ,MAAM,IAAI,WAAW,IAAI,KAAK,IAAI,WAAW,GAAG,GAAG;AAC7D,UAAM,IAAI,cAAc,mEAAmE;AAAA,EAC7F;AACF;AAEA,SAAS,kBAAkB,aAA2B;AACpD,MAAI,CAAC,OAAO,cAAc,WAAW,KAAK,eAAe,EAAG,OAAM,IAAI,cAAc,gCAAgC;AACtH;AAGO,SAAS,4BAA4B,KAAoB,MAAoB;AAClF,oBAAkB,IAAI,eAAe,CAAC;AACtC,QAAM,SAAS,SAAS,OAAO,IAAI,WAAW,CAAC;AAC/C,QAAM,SAAS,KAAK,MAAM,cAAc,SAAS,OAAO,IAAI,WAAW,CAAC,EAAE;AAC1E,MACE,IAAI,SAAS,WACb,IAAI,SAAS,UACb,IAAI,WAAW,UACf,CAAC,WAAW,MAAM,KAClB,QAAQ,MAAM,MAAM,aAAa,MAAM,KACvC,aAAa,MAAM,MAAM,aAAa,IAAI,GAC1C;AACA,UAAM,IAAI,cAAc,0EAA0E;AAAA,EACpG;AACA,MAAI,IAAI,QAAQ,UAAU,gBAAgB,MAAM,OAAQ,OAAM,IAAI,cAAc,4BAA4B;AAC9G;AAEA,SAAS,gBAAgB,MAA0B;AACjD,SAAO,IAAI,MAAM,YAAY,QAAQ,aAAa,EAC/C,MAAM,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
|
|
5
5
|
"description": "Generic GitHub issue and pull request delivery CLI and MCP server",
|
|
6
6
|
"homepage": "https://github.com/aviaratech/ai-delivery#readme",
|
|
@@ -46,19 +46,20 @@
|
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
|
-
"format": "oxfmt
|
|
50
|
-
"format:check": "oxfmt --
|
|
51
|
-
"lint": "oxlint
|
|
49
|
+
"format": "oxfmt src scripts package.json tsconfig.json tsconfig.build.json vitest.config.ts .oxlintrc.json .oxfmtrc.json",
|
|
50
|
+
"format:check": "oxfmt --check src scripts package.json tsconfig.json tsconfig.build.json vitest.config.ts .oxlintrc.json .oxfmtrc.json",
|
|
51
|
+
"lint": "oxlint",
|
|
52
52
|
"typecheck": "tsc -p tsconfig.json",
|
|
53
|
-
"build": "
|
|
54
|
-
"postbuild": "node -e \"require('node:fs').chmodSync('dist/cli.js', 0o755)\"",
|
|
53
|
+
"build": "node scripts/build.mjs --clean --declarations --plugin",
|
|
55
54
|
"test": "npm run build && vitest run",
|
|
56
|
-
"checks": "node scripts/
|
|
55
|
+
"checks": "node scripts/checks.mjs",
|
|
56
|
+
"checks:release": "node scripts/current-qualification.mjs",
|
|
57
57
|
"checks:fast": "node scripts/checks.mjs --fast",
|
|
58
58
|
"checks:producer": "node scripts/current-qualification.mjs --producer-only",
|
|
59
59
|
"checks:resume": "node scripts/current-qualification.mjs"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
+
"@aviaratech/ai-plugin-tools": "0.1.0",
|
|
62
63
|
"@modelcontextprotocol/sdk": "^1.31.0",
|
|
63
64
|
"@octokit/auth-app": "^8.2.0",
|
|
64
65
|
"@octokit/graphql": "^9.0.3",
|
|
@@ -71,10 +72,11 @@
|
|
|
71
72
|
"devDependencies": {
|
|
72
73
|
"@types/node": "^25.9.1",
|
|
73
74
|
"@types/proper-lockfile": "^4.1.4",
|
|
75
|
+
"esbuild": "0.28.2",
|
|
74
76
|
"oxfmt": "0.70.0",
|
|
75
77
|
"oxlint": "1.85.0",
|
|
76
78
|
"oxlint-tsgolint": "7.0.2003",
|
|
77
|
-
"typescript": "
|
|
79
|
+
"typescript": "7.0.2",
|
|
78
80
|
"vitest": "5.0.1"
|
|
79
81
|
},
|
|
80
82
|
"engines": {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-delivery",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.36",
|
|
4
4
|
"description": "GitHub issue and pull request delivery tools for prepared worktrees and evidence-based handoff.",
|
|
5
5
|
"author": { "name": "AviaraTech", "url": "https://github.com/aviaratech" },
|
|
6
6
|
"homepage": "https://github.com/aviaratech/ai-delivery#readme",
|
|
7
7
|
"repository": "https://github.com/aviaratech/ai-delivery",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"deliveryCapabilityVersion": 2,
|
|
10
|
-
"packageVersion": "0.3.
|
|
10
|
+
"packageVersion": "0.3.36"
|
|
11
11
|
}
|