@fitlab-ai/agent-infra 0.9.10 → 0.9.11
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/README.md +13 -3
- package/README.zh-CN.md +13 -3
- package/bin/cli.ts +17 -4
- package/dist/bin/cli.js +19 -4
- package/dist/bin/internal-cli.js +50 -4
- package/dist/lib/agent-client.js +0 -1
- package/dist/lib/agent-clients/adapters/opencode-sandbox.js +0 -4
- package/dist/lib/agent-clients/adapters/traecli.js +7 -8
- package/dist/lib/agent-clients/config.js +14 -99
- package/dist/lib/agent-clients/reconcile.js +1 -11
- package/dist/lib/agent-clients/schema.js +5 -4
- package/dist/lib/agent-clients/tokens.js +5 -15
- package/dist/lib/decide.js +14 -30
- package/dist/lib/defaults.json +4 -0
- package/dist/lib/init.js +2 -2
- package/dist/lib/internal/release-workflow.js +0 -1
- package/dist/lib/internal/task-finalization.js +19 -9
- package/dist/lib/internal/task-ledger.js +8 -2
- package/dist/lib/internal/task-lifecycle.js +17 -93
- package/dist/lib/internal/task-orchestration.js +30 -216
- package/dist/lib/internal/task-validate.js +2 -1
- package/dist/lib/merge.js +205 -103
- package/dist/lib/process-data/normalize.js +2 -9
- package/dist/lib/run/host.js +46 -16
- package/dist/lib/sandbox/agent-client-reconciler.js +4 -12
- package/dist/lib/sandbox/commands/create.js +3 -3
- package/dist/lib/sandbox/commands/enter.js +18 -4
- package/dist/lib/sandbox/config.js +3 -12
- package/dist/lib/sandbox/control/executor.js +131 -39
- package/dist/lib/sandbox/control/lifecycle.js +29 -20
- package/dist/lib/sandbox/control/server.js +18 -16
- package/dist/lib/sandbox/mounts.js +3 -2
- package/dist/lib/sandbox/recovery.js +123 -22
- package/dist/lib/sandbox/workspace-identity.js +14 -0
- package/dist/lib/sandbox/workspace-view.js +8 -9
- package/dist/lib/self-update.js +278 -0
- package/dist/lib/server/protocol.js +5 -5
- package/dist/lib/task/activity-log.js +4 -1
- package/dist/lib/task/artifact-lifecycle.js +4 -2
- package/dist/lib/task/codex-orchestration.js +1 -1
- package/dist/lib/task/command-options.js +1 -3
- package/dist/lib/task/commands/cat.js +0 -5
- package/dist/lib/task/commands/decisions.js +76 -92
- package/dist/lib/task/commands/files.js +6 -6
- package/dist/lib/task/commands/grep.js +25 -61
- package/dist/lib/task/commands/issue-body.js +6 -6
- package/dist/lib/task/commands/log.js +25 -10
- package/dist/lib/task/commands/show.js +5 -6
- package/dist/lib/task/commands/status.js +8 -8
- package/dist/lib/task/commit-operation.js +21 -25
- package/dist/lib/task/commit-policy.js +1 -1
- package/dist/lib/task/control-authority.js +431 -0
- package/dist/lib/task/create.js +6 -1
- package/dist/lib/task/current-contract.js +35 -0
- package/dist/lib/task/decision-details.js +263 -0
- package/dist/lib/task/decision-intents.js +5 -2
- package/dist/lib/task/events.js +11 -5
- package/dist/lib/task/index.js +19 -20
- package/dist/lib/task/ledger-intents.js +8 -9
- package/dist/lib/task/ledger.js +13 -6
- package/dist/lib/task/lifecycle.js +16 -0
- package/dist/lib/task/orchestration.js +50 -13
- package/dist/lib/task/review-artifacts.js +31 -12
- package/dist/lib/task/review-finalization.js +19 -6
- package/dist/lib/task/verification-engine.js +38 -15
- package/dist/lib/task/verification-review.js +1 -1
- package/dist/lib/task/workspace-snapshot.js +5 -11
- package/dist/lib/task/write.js +11 -1
- package/dist/lib/update.js +6 -37
- package/dist/lib/version.js +5 -1
- package/dist/lifecycle-build-manifest.json +3 -3
- package/lib/agent-client.ts +0 -1
- package/lib/agent-clients/adapters/opencode-sandbox.ts +0 -5
- package/lib/agent-clients/adapters/traecli.ts +7 -8
- package/lib/agent-clients/config.ts +14 -144
- package/lib/agent-clients/reconcile.ts +1 -12
- package/lib/agent-clients/schema.ts +5 -4
- package/lib/agent-clients/tokens.ts +5 -18
- package/lib/decide.ts +12 -22
- package/lib/defaults.json +4 -0
- package/lib/init.ts +2 -2
- package/lib/internal/release-workflow.ts +0 -1
- package/lib/internal/task-finalization.ts +27 -13
- package/lib/internal/task-ledger.ts +8 -2
- package/lib/internal/task-lifecycle.ts +33 -76
- package/lib/internal/task-orchestration.ts +33 -190
- package/lib/internal/task-validate.ts +3 -2
- package/lib/merge.ts +236 -120
- package/lib/process-data/normalize.ts +2 -8
- package/lib/run/host.ts +63 -14
- package/lib/sandbox/agent-client-reconciler.ts +5 -15
- package/lib/sandbox/commands/create.ts +4 -4
- package/lib/sandbox/commands/enter.ts +24 -4
- package/lib/sandbox/config.ts +2 -14
- package/lib/sandbox/control/container-identity.ts +2 -2
- package/lib/sandbox/control/executor.ts +148 -51
- package/lib/sandbox/control/lifecycle.ts +34 -28
- package/lib/sandbox/control/protocol.ts +1 -3
- package/lib/sandbox/control/server.ts +15 -12
- package/lib/sandbox/control/state.ts +7 -7
- package/lib/sandbox/mounts.ts +4 -3
- package/lib/sandbox/recovery.ts +162 -34
- package/lib/sandbox/tools.ts +1 -1
- package/lib/sandbox/workspace-identity.ts +28 -0
- package/lib/sandbox/workspace-view.ts +14 -10
- package/lib/self-update.ts +341 -0
- package/lib/server/protocol.ts +5 -5
- package/lib/task/activity-log.ts +6 -1
- package/lib/task/artifact-lifecycle.ts +5 -3
- package/lib/task/codex-orchestration.ts +2 -1
- package/lib/task/command-options.ts +1 -2
- package/lib/task/commands/cat.ts +0 -4
- package/lib/task/commands/decisions.ts +80 -75
- package/lib/task/commands/files.ts +6 -6
- package/lib/task/commands/grep.ts +23 -51
- package/lib/task/commands/issue-body.ts +6 -6
- package/lib/task/commands/log.ts +22 -10
- package/lib/task/commands/show.ts +5 -6
- package/lib/task/commands/status.ts +8 -8
- package/lib/task/commit-operation.ts +25 -30
- package/lib/task/commit-policy.ts +1 -2
- package/lib/task/control-authority.ts +563 -0
- package/lib/task/create.ts +6 -1
- package/lib/task/current-contract.ts +49 -0
- package/lib/task/decision-details.ts +340 -0
- package/lib/task/decision-intents.ts +7 -2
- package/lib/task/events.ts +10 -5
- package/lib/task/index.ts +19 -20
- package/lib/task/ledger-intents.ts +6 -8
- package/lib/task/ledger.ts +17 -7
- package/lib/task/lifecycle.ts +20 -0
- package/lib/task/orchestration.ts +40 -15
- package/lib/task/review-artifacts.ts +53 -15
- package/lib/task/review-finalization.ts +33 -7
- package/lib/task/verification-engine.ts +33 -18
- package/lib/task/verification-review.ts +1 -1
- package/lib/task/workspace-snapshot.ts +4 -13
- package/lib/task/write.ts +20 -1
- package/lib/update.ts +6 -40
- package/lib/version.ts +6 -1
- package/package.json +1 -1
- package/templates/.agents/README.en.md +5 -3
- package/templates/.agents/README.zh-CN.md +5 -3
- package/templates/.agents/rules/compatibility-policy.en.md +5 -4
- package/templates/.agents/rules/compatibility-policy.zh-CN.md +5 -4
- package/templates/.agents/rules/create-issue.github.en.md +1 -1
- package/templates/.agents/rules/create-issue.github.zh-CN.md +1 -1
- package/templates/.agents/rules/human-decision-context.en.md +9 -7
- package/templates/.agents/rules/human-decision-context.zh-CN.md +9 -7
- package/templates/.agents/rules/issue-fields.github.en.md +1 -1
- package/templates/.agents/rules/issue-fields.github.zh-CN.md +1 -1
- package/templates/.agents/rules/issue-pr-commands.en.md +1 -1
- package/templates/.agents/rules/issue-pr-commands.github.en.md +1 -1
- package/templates/.agents/rules/issue-pr-commands.github.zh-CN.md +1 -1
- package/templates/.agents/rules/issue-pr-commands.zh-CN.md +1 -1
- package/templates/.agents/rules/issue-sync.github.en.md +1 -1
- package/templates/.agents/rules/issue-sync.github.zh-CN.md +2 -2
- package/templates/.agents/rules/milestone-inference.github.en.md +1 -1
- package/templates/.agents/rules/milestone-inference.github.zh-CN.md +1 -1
- package/templates/.agents/rules/next-step-output.en.md +3 -3
- package/templates/.agents/rules/next-step-output.zh-CN.md +3 -3
- package/templates/.agents/rules/no-mid-flow-questions.en.md +1 -1
- package/templates/.agents/rules/no-mid-flow-questions.zh-CN.md +1 -1
- package/templates/.agents/rules/pr-sync.en.md +1 -1
- package/templates/.agents/rules/pr-sync.github.en.md +1 -1
- package/templates/.agents/rules/pr-sync.github.zh-CN.md +1 -1
- package/templates/.agents/rules/pr-sync.zh-CN.md +1 -1
- package/templates/.agents/rules/release-commands.github.en.md +6 -0
- package/templates/.agents/rules/release-commands.github.zh-CN.md +6 -0
- package/templates/.agents/rules/review-handshake.en.md +1 -1
- package/templates/.agents/rules/review-handshake.zh-CN.md +1 -1
- package/templates/.agents/rules/task-management.en.md +1 -2
- package/templates/.agents/rules/task-management.zh-CN.md +1 -2
- package/templates/.agents/skills/analyze-task/SKILL.en.md +3 -3
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/block-task/SKILL.en.md +2 -2
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/cancel-task/SKILL.en.md +2 -2
- package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/check-task/SKILL.en.md +2 -2
- package/templates/.agents/skills/check-task/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/close-codescan/SKILL.en.md +1 -1
- package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/close-dependabot/SKILL.en.md +1 -1
- package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/code-task/SKILL.en.md +3 -3
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/commit/SKILL.en.md +27 -7
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +3 -4
- package/templates/.agents/skills/complete-manual-validation/SKILL.en.md +5 -5
- package/templates/.agents/skills/complete-manual-validation/SKILL.zh-CN.md +5 -5
- package/templates/.agents/skills/complete-task/SKILL.en.md +3 -3
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/create-pr/SKILL.en.md +5 -7
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +5 -7
- package/templates/.agents/skills/create-pr/reference/change-report.en.md +9 -4
- package/templates/.agents/skills/create-pr/reference/change-report.zh-CN.md +9 -4
- package/templates/.agents/skills/create-pr/scripts/change-report.mjs +203 -0
- package/templates/.agents/skills/create-release-note/SKILL.en.md +5 -6
- package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +5 -6
- package/templates/.agents/skills/create-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/import-issue/SKILL.en.md +1 -1
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/plan-task/SKILL.en.md +3 -3
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/restore-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/review-analysis/SKILL.en.md +5 -3
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +5 -3
- package/templates/.agents/skills/review-analysis/config/verify.en.json +1 -0
- package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +1 -0
- package/templates/.agents/skills/review-code/SKILL.en.md +5 -3
- package/templates/.agents/skills/review-code/SKILL.zh-CN.md +5 -3
- package/templates/.agents/skills/review-code/config/verify.en.json +1 -0
- package/templates/.agents/skills/review-code/config/verify.zh-CN.json +1 -0
- package/templates/.agents/skills/review-code/reference/migration-risks.en.md +2 -1
- package/templates/.agents/skills/review-code/reference/migration-risks.zh-CN.md +2 -1
- package/templates/.agents/skills/review-plan/SKILL.en.md +5 -3
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +5 -3
- package/templates/.agents/skills/review-plan/config/verify.en.json +1 -0
- package/templates/.agents/skills/review-plan/config/verify.zh-CN.json +1 -0
- package/templates/.agents/skills/run-manual-validation/SKILL.en.md +4 -0
- package/templates/.agents/skills/run-manual-validation/SKILL.zh-CN.md +4 -0
- package/templates/.agents/skills/run-task/SKILL.en.md +4 -0
- package/templates/.agents/skills/run-task/SKILL.zh-CN.md +4 -0
- package/templates/.agents/skills/update-agent-infra/SKILL.en.md +2 -2
- package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +140 -109
- package/templates/.agents/skills/watch-pr/SKILL.en.md +2 -2
- package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +2 -2
- package/templates/.agents/templates/task.en.md +1 -1
- package/templates/.agents/templates/task.zh-CN.md +1 -1
- package/templates/.claude/commands/analyze-task.en.md +1 -1
- package/templates/.claude/commands/analyze-task.zh-CN.md +1 -1
- package/templates/.claude/commands/block-task.en.md +1 -1
- package/templates/.claude/commands/block-task.zh-CN.md +1 -1
- package/templates/.claude/commands/cancel-task.en.md +1 -1
- package/templates/.claude/commands/cancel-task.zh-CN.md +1 -1
- package/templates/.claude/commands/check-task.en.md +1 -1
- package/templates/.claude/commands/check-task.zh-CN.md +1 -1
- package/templates/.claude/commands/code-task.en.md +1 -1
- package/templates/.claude/commands/code-task.zh-CN.md +1 -1
- package/templates/.claude/commands/commit.en.md +1 -1
- package/templates/.claude/commands/commit.zh-CN.md +1 -1
- package/templates/.claude/commands/complete-manual-validation.en.md +1 -1
- package/templates/.claude/commands/complete-manual-validation.zh-CN.md +1 -1
- package/templates/.claude/commands/complete-task.en.md +1 -1
- package/templates/.claude/commands/complete-task.zh-CN.md +1 -1
- package/templates/.claude/commands/create-pr.en.md +1 -1
- package/templates/.claude/commands/create-pr.zh-CN.md +1 -1
- package/templates/.claude/commands/plan-task.en.md +1 -1
- package/templates/.claude/commands/plan-task.zh-CN.md +1 -1
- package/templates/.claude/commands/review-analysis.en.md +1 -1
- package/templates/.claude/commands/review-analysis.zh-CN.md +1 -1
- package/templates/.claude/commands/review-code.en.md +1 -1
- package/templates/.claude/commands/review-code.zh-CN.md +1 -1
- package/templates/.claude/commands/review-plan.en.md +1 -1
- package/templates/.claude/commands/review-plan.zh-CN.md +1 -1
- package/templates/.claude/commands/run-manual-validation.en.md +1 -1
- package/templates/.claude/commands/run-manual-validation.zh-CN.md +1 -1
- package/templates/.claude/commands/run-task.en.md +1 -1
- package/templates/.claude/commands/run-task.zh-CN.md +1 -1
- package/templates/.claude/commands/watch-pr.en.md +1 -1
- package/templates/.claude/commands/watch-pr.zh-CN.md +1 -1
- package/templates/{.trae/skills → .traecli/commands}/update-agent-infra.en.md +0 -1
- package/templates/{.trae/skills → .traecli/commands}/update-agent-infra.zh-CN.md +0 -1
- package/dist/lib/builtin-tuis.js +0 -40
- package/lib/builtin-tuis.ts +0 -56
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createDirectHostExecutionContext, dispatchTaskControlOperation, parseTaskControlOperation } from '../task/control-authority.js';
|
|
2
2
|
import { applyTaskFinalization } from '../task/finalization.js';
|
|
3
3
|
import { detectRepoRoot, resolveTaskRef } from '../task/resolve-ref.js';
|
|
4
|
-
import { verifyTaskEvent } from '../task/verification.js';
|
|
5
4
|
const USAGE = 'Usage: agent-infra-internal task-finalization <N | TASK-id> complete --agent <agent>\n';
|
|
6
5
|
function envelope(status, changed, accepted, result, error) {
|
|
7
6
|
return `${JSON.stringify({ version: 1, status, changed, accepted, result, error })}\n`;
|
|
@@ -15,18 +14,25 @@ function fail(message) {
|
|
|
15
14
|
process.stderr.write(USAGE);
|
|
16
15
|
process.exitCode = 1;
|
|
17
16
|
}
|
|
17
|
+
function parseFailure(error) {
|
|
18
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
19
|
+
return message.replace(/^TASK_CONTROL_OPERATION_INVALID: /u, '');
|
|
20
|
+
}
|
|
18
21
|
function taskFinalization(args = []) {
|
|
19
22
|
if (args[0] === '--help' || args[0] === '-h') {
|
|
20
23
|
process.stdout.write(USAGE);
|
|
21
24
|
return;
|
|
22
25
|
}
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
let operation;
|
|
27
|
+
try {
|
|
28
|
+
operation = parseTaskControlOperation('task-finalization', args);
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
fail(parseFailure(error));
|
|
25
32
|
return;
|
|
26
33
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
fail(`invalid --agent: ${AGENT_USAGE_HINT}`);
|
|
34
|
+
if (operation.family !== 'task-finalization') {
|
|
35
|
+
fail('finalization operation is invalid');
|
|
30
36
|
return;
|
|
31
37
|
}
|
|
32
38
|
let repoRoot;
|
|
@@ -39,14 +45,18 @@ function taskFinalization(args = []) {
|
|
|
39
45
|
process.exitCode = 1;
|
|
40
46
|
return;
|
|
41
47
|
}
|
|
42
|
-
const resolved = resolveTaskRef(
|
|
48
|
+
const resolved = resolveTaskRef(operation.request.taskRef, { repoRoot });
|
|
43
49
|
if (!resolved.ok) {
|
|
44
50
|
const detail = { code: resolved.code, message: resolved.message, retryable: false };
|
|
45
51
|
process.stdout.write(envelope('failed', false, true, null, detail));
|
|
46
52
|
process.exitCode = 1;
|
|
47
53
|
return;
|
|
48
54
|
}
|
|
49
|
-
const
|
|
55
|
+
const boundOperation = {
|
|
56
|
+
...operation,
|
|
57
|
+
request: { ...operation.request, taskRef: resolved.taskId }
|
|
58
|
+
};
|
|
59
|
+
const result = dispatchTaskControlOperation(createDirectHostExecutionContext({ repoRoot }), boundOperation);
|
|
50
60
|
process.stdout.write(envelope(result.status, result.changed, true, result, result.error));
|
|
51
61
|
process.exitCode = exitCode(result.status);
|
|
52
62
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
2
|
import { applyLedgerIntent } from '../task/ledger-intents.js';
|
|
3
3
|
import { consumeHumanOverride, failureId, overrideDryRunConflict } from '../task/human-override.js';
|
|
4
|
-
import { isReviewStage,
|
|
4
|
+
import { LEDGER_SECTION_MISSING_CODE, LEDGER_SECTION_MISSING_MESSAGE, isReviewStage, parseLedgerDocument, summarizeLedgerStage, validateLedgerRows } from '../task/ledger.js';
|
|
5
5
|
import { resolveTaskRef } from '../task/resolve-ref.js';
|
|
6
6
|
import { TaskExecutionLockError, withTaskExecutionLock } from '../task/task-execution-lock.js';
|
|
7
7
|
const USAGE = `Usage: agent-infra-internal task-ledger <task-ref> <intent> [intent flags] [--dry-run]\n\nIntents: finding-upsert, finding-respond, finding-review, decision-next-id, decision-upsert, stage-status\n`;
|
|
@@ -110,7 +110,13 @@ function taskLedger(args = []) {
|
|
|
110
110
|
return;
|
|
111
111
|
}
|
|
112
112
|
try {
|
|
113
|
-
const
|
|
113
|
+
const ledger = parseLedgerDocument(fs.readFileSync(resolved.taskMdPath, 'utf8'));
|
|
114
|
+
if (!ledger.present) {
|
|
115
|
+
process.stdout.write(`${JSON.stringify({ status: 'failed', changed: false, taskId: resolved.taskId, error: { code: LEDGER_SECTION_MISSING_CODE, message: LEDGER_SECTION_MISSING_MESSAGE } })}\n`);
|
|
116
|
+
process.exitCode = 1;
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
const rows = ledger.rows;
|
|
114
120
|
const invalid = validateLedgerRows(rows);
|
|
115
121
|
if (invalid) {
|
|
116
122
|
process.stdout.write(`${JSON.stringify({ status: 'failed', changed: false, taskId: resolved.taskId, error: invalid })}\n`);
|
|
@@ -1,76 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { applyTaskLifecycle, lifecycleIntentCatalog } from '../task/lifecycle.js';
|
|
1
|
+
import { createDirectHostExecutionContext, dispatchTaskControlOperation, parseTaskControlOperation } from '../task/control-authority.js';
|
|
2
|
+
import { lifecycleIntentCatalog } from '../task/lifecycle.js';
|
|
4
3
|
import { detectRepoRoot, resolveTaskRef } from '../task/resolve-ref.js';
|
|
5
|
-
import { TaskExecutionLockError, withTaskExecutionLock } from '../task/task-execution-lock.js';
|
|
6
4
|
const USAGE = `Usage: agent-infra-internal task-lifecycle <N | TASK-id> <intent> --agent <agent> [intent flags] [--dry-run]\n\nIntents: ${lifecycleIntentCatalog.join(', ')}\nOverride: --override-ticket <ticket> --override-target <target> --override-scope <scope>\n`;
|
|
7
|
-
const FLAGS = {
|
|
8
|
-
'--agent': 'agent', '--reason': 'reason', '--unblock-condition': 'unblockCondition',
|
|
9
|
-
'--note': 'note', '--alert-number': 'alertNumber', '--staging-dir': 'stagingDir',
|
|
10
|
-
'--issue-number': 'issueNumber', '--override-ticket': 'overrideTicket',
|
|
11
|
-
'--override-target': 'overrideTarget', '--override-scope': 'overrideScope'
|
|
12
|
-
};
|
|
13
5
|
function usageFailure(message) {
|
|
14
6
|
process.stdout.write(`${JSON.stringify({ status: 'failed', changed: false, error: { code: 'LIFECYCLE_PAYLOAD_INVALID', message } })}\n`);
|
|
15
7
|
process.stderr.write(USAGE);
|
|
16
8
|
process.exitCode = 1;
|
|
17
9
|
}
|
|
10
|
+
function parseFailure(error) {
|
|
11
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
12
|
+
return message.replace(/^TASK_CONTROL_OPERATION_INVALID: /u, '');
|
|
13
|
+
}
|
|
18
14
|
function taskLifecycle(args = []) {
|
|
19
15
|
if (args[0] === '--help' || args[0] === '-h') {
|
|
20
16
|
process.stdout.write(USAGE);
|
|
21
17
|
return;
|
|
22
18
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
const values = { taskRef: args[0], intent: args[1], agent: '' };
|
|
28
|
-
const seen = new Set();
|
|
29
|
-
for (let index = 2; index < args.length; index += 1) {
|
|
30
|
-
const flag = args[index];
|
|
31
|
-
if (flag === '--dry-run') {
|
|
32
|
-
if (seen.has(flag)) {
|
|
33
|
-
usageFailure(`duplicate option '${flag}'`);
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
seen.add(flag);
|
|
37
|
-
values.dryRun = true;
|
|
38
|
-
continue;
|
|
39
|
-
}
|
|
40
|
-
const key = FLAGS[flag];
|
|
41
|
-
if (!key) {
|
|
42
|
-
usageFailure(`unknown option '${flag}'`);
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
if (seen.has(flag)) {
|
|
46
|
-
usageFailure(`duplicate option '${flag}'`);
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
const value = args[++index];
|
|
50
|
-
if (value === undefined || value.startsWith('--')) {
|
|
51
|
-
usageFailure(`option '${flag}' requires a value`);
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
seen.add(flag);
|
|
55
|
-
values[key] = key === 'alertNumber' || key === 'issueNumber' ? Number(value) : value;
|
|
19
|
+
let operation;
|
|
20
|
+
try {
|
|
21
|
+
operation = parseTaskControlOperation('task-lifecycle', args);
|
|
56
22
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
usageFailure(`invalid --agent '${values.agent}': ${AGENT_USAGE_HINT}`);
|
|
23
|
+
catch (error) {
|
|
24
|
+
usageFailure(parseFailure(error));
|
|
60
25
|
return;
|
|
61
26
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
if (dryRunConflict) {
|
|
65
|
-
usageFailure(dryRunConflict.message);
|
|
27
|
+
if (operation.family !== 'task-lifecycle') {
|
|
28
|
+
usageFailure('lifecycle operation is invalid');
|
|
66
29
|
return;
|
|
67
30
|
}
|
|
31
|
+
const request = operation.request;
|
|
68
32
|
let repoRoot;
|
|
69
|
-
|
|
70
|
-
if (values.intent === 'restore') {
|
|
71
|
-
// restore's precondition is that the task does NOT exist locally yet (it only lives
|
|
72
|
-
// in a staging dir), so resolveTaskRef's existence check is inapplicable here; identity
|
|
73
|
-
// is guaranteed by applyTaskLifecycle's own full-TASK-id check plus staging validation.
|
|
33
|
+
if (request.intent === 'restore') {
|
|
74
34
|
try {
|
|
75
35
|
repoRoot = detectRepoRoot();
|
|
76
36
|
}
|
|
@@ -79,53 +39,17 @@ function taskLifecycle(args = []) {
|
|
|
79
39
|
process.exitCode = 1;
|
|
80
40
|
return;
|
|
81
41
|
}
|
|
82
|
-
taskId = String(values.taskRef);
|
|
83
42
|
}
|
|
84
43
|
else {
|
|
85
|
-
const resolved = resolveTaskRef(
|
|
44
|
+
const resolved = resolveTaskRef(request.taskRef);
|
|
86
45
|
if (!resolved.ok) {
|
|
87
46
|
process.stdout.write(`${JSON.stringify({ status: 'failed', changed: false, error: { code: resolved.code, message: resolved.message } })}\n`);
|
|
88
47
|
process.exitCode = 1;
|
|
89
48
|
return;
|
|
90
49
|
}
|
|
91
50
|
repoRoot = resolved.repoRoot;
|
|
92
|
-
taskId = resolved.taskId;
|
|
93
|
-
}
|
|
94
|
-
let result;
|
|
95
|
-
try {
|
|
96
|
-
result = withTaskExecutionLock(repoRoot, taskId, `task-lifecycle.${String(values.intent)}`, () => {
|
|
97
|
-
const lifecycleResult = applyTaskLifecycle(values);
|
|
98
|
-
if (lifecycleResult.status !== 'failed' || !values.overrideTicket)
|
|
99
|
-
return lifecycleResult;
|
|
100
|
-
if (!values.overrideTarget || !values.overrideScope) {
|
|
101
|
-
return {
|
|
102
|
-
...lifecycleResult,
|
|
103
|
-
error: { code: 'OVERRIDE_PAYLOAD_INVALID', message: 'override ticket requires --override-target and --override-scope' }
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
const override = consumeHumanOverride({
|
|
107
|
-
taskRef: String(values.taskRef),
|
|
108
|
-
ticketId: String(values.overrideTicket),
|
|
109
|
-
failureId: failureId('lifecycle.apply', lifecycleResult.error?.code ?? 'LIFECYCLE_FAILED'),
|
|
110
|
-
target: String(values.overrideTarget),
|
|
111
|
-
scope: String(values.overrideScope),
|
|
112
|
-
intent: String(values.intent),
|
|
113
|
-
...(values.alertNumber ? { alertNumber: Number(values.alertNumber) } : {}),
|
|
114
|
-
...(values.issueNumber ? { issueNumber: Number(values.issueNumber) } : {}),
|
|
115
|
-
...(values.stagingDir ? { stagingDir: String(values.stagingDir) } : {})
|
|
116
|
-
});
|
|
117
|
-
if (override.status === 'failed')
|
|
118
|
-
return { ...lifecycleResult, humanOverride: override };
|
|
119
|
-
return { ...lifecycleResult, ...override, humanOverride: override, error: null };
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
catch (error) {
|
|
123
|
-
if (!(error instanceof TaskExecutionLockError))
|
|
124
|
-
throw error;
|
|
125
|
-
process.stdout.write(`${JSON.stringify({ status: 'failed', changed: false, error: { code: error.code, message: error.message } })}\n`);
|
|
126
|
-
process.exitCode = 1;
|
|
127
|
-
return;
|
|
128
51
|
}
|
|
52
|
+
const result = dispatchTaskControlOperation(createDirectHostExecutionContext({ repoRoot }), operation);
|
|
129
53
|
process.stdout.write(`${JSON.stringify(result)}\n`);
|
|
130
54
|
if (result.status === 'failed')
|
|
131
55
|
process.exitCode = 1;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { createDirectHostExecutionContext, dispatchTaskControlOperation, parseTaskControlOperation } from '../task/control-authority.js';
|
|
2
|
+
import { OrchestrationStateError } from '../task/orchestration.js';
|
|
3
|
+
import { detectRepoRoot } from '../task/resolve-ref.js';
|
|
4
4
|
const USAGE = 'Usage: agent-infra-internal task-orchestration <task-ref|auto> <begin-or-resume|route|prepare|dispatch|await-activation|recover-prepared|hook-start|hook-stop|advance|pause|status> [options]\n';
|
|
5
5
|
function usageFailure(message) {
|
|
6
6
|
process.stdout.write(`${JSON.stringify({
|
|
@@ -10,236 +10,50 @@ function usageFailure(message) {
|
|
|
10
10
|
process.stderr.write(USAGE);
|
|
11
11
|
process.exitCode = 2;
|
|
12
12
|
}
|
|
13
|
+
function parseFailure(error) {
|
|
14
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
15
|
+
return message.replace(/^TASK_CONTROL_OPERATION_INVALID: /u, '');
|
|
16
|
+
}
|
|
13
17
|
async function taskOrchestration(args = []) {
|
|
14
18
|
if (args[0] === '--help' || args[0] === '-h') {
|
|
15
19
|
process.stdout.write(USAGE);
|
|
16
20
|
return;
|
|
17
21
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
let operation;
|
|
23
|
+
try {
|
|
24
|
+
operation = parseTaskControlOperation('task-orchestration', args);
|
|
21
25
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
'begin-or-resume', 'route', 'prepare', 'dispatch', 'await-activation', 'recover-prepared',
|
|
25
|
-
'hook-start', 'hook-stop', 'advance', 'pause', 'status'
|
|
26
|
-
].includes(intent)) {
|
|
27
|
-
usageFailure(`unknown intent '${intent}'`);
|
|
26
|
+
catch (error) {
|
|
27
|
+
usageFailure(parseFailure(error));
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
for (let index = 2; index < args.length; index += 1) {
|
|
33
|
-
const flag = args[index];
|
|
34
|
-
if (![
|
|
35
|
-
'--max-steps', '--executor-model', '--executor-reasoning-effort',
|
|
36
|
-
'--reviewer-model', '--reviewer-reasoning-effort',
|
|
37
|
-
'--client', '--requested-model', '--requested-reasoning-effort', '--capability-token',
|
|
38
|
-
'--parent-id', '--before-fingerprint',
|
|
39
|
-
'--stage', '--round', '--artifact', '--role',
|
|
40
|
-
'--native-agent', '--child-id', '--spawn-mode', '--actual-model', '--actual-reasoning-effort',
|
|
41
|
-
'--model-fallback-reason', '--reasoning-effort-fallback-reason',
|
|
42
|
-
'--exit-code', '--after-fingerprint', '--changed-paths', '--code', '--message', '--recoverable', '--agent',
|
|
43
|
-
'--git-worktree-root'
|
|
44
|
-
].includes(flag)) {
|
|
45
|
-
usageFailure(`unknown option '${flag}'`);
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
if (seen.has(flag)) {
|
|
49
|
-
usageFailure(`duplicate option '${flag}'`);
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
seen.add(flag);
|
|
53
|
-
const value = args[++index];
|
|
54
|
-
if (!value || value.startsWith('--')) {
|
|
55
|
-
usageFailure(`option '${flag}' requires a value`);
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
values[flag] = value;
|
|
59
|
-
}
|
|
60
|
-
const requireValues = (flags) => flags.find((flag) => values[flag] === undefined);
|
|
61
|
-
const coreOptions = values['--git-worktree-root'] === undefined
|
|
62
|
-
? {}
|
|
63
|
-
: { gitWorktreeRoot: values['--git-worktree-root'] };
|
|
64
|
-
if (values['--client'] !== undefined && !isAgentClientId(values['--client'])) {
|
|
65
|
-
usageFailure(`unknown client '${values['--client']}'`);
|
|
30
|
+
if (operation.family !== 'task-orchestration') {
|
|
31
|
+
usageFailure('orchestration operation is invalid');
|
|
66
32
|
return;
|
|
67
33
|
}
|
|
68
|
-
let
|
|
34
|
+
let repoRoot = process.cwd();
|
|
69
35
|
try {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const policyFlags = [
|
|
82
|
-
'--executor-model', '--executor-reasoning-effort',
|
|
83
|
-
'--reviewer-model', '--reviewer-reasoning-effort'
|
|
84
|
-
];
|
|
85
|
-
const hasAnyPolicy = policyFlags.some((flag) => values[flag] !== undefined);
|
|
86
|
-
if (hasAnyPolicy && policyFlags.some((flag) => values[flag] === undefined)) {
|
|
87
|
-
usageFailure('explicit model policy requires executor/reviewer model and reasoning effort');
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
result = beginOrResumeOrchestration(taskRef, {
|
|
91
|
-
...coreOptions,
|
|
92
|
-
maxSteps,
|
|
93
|
-
client: values['--client'],
|
|
94
|
-
modelPolicy: hasAnyPolicy ? {
|
|
95
|
-
executor: {
|
|
96
|
-
model: values['--executor-model'],
|
|
97
|
-
reasoningEffort: values['--executor-reasoning-effort']
|
|
98
|
-
},
|
|
99
|
-
reviewer: {
|
|
100
|
-
model: values['--reviewer-model'],
|
|
101
|
-
reasoningEffort: values['--reviewer-reasoning-effort']
|
|
102
|
-
}
|
|
103
|
-
} : undefined
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
else if (intent === 'route') {
|
|
107
|
-
result = routeOrchestration(taskRef, coreOptions);
|
|
108
|
-
}
|
|
109
|
-
else if (intent === 'status') {
|
|
110
|
-
result = statusOrchestration(taskRef, coreOptions);
|
|
111
|
-
}
|
|
112
|
-
else if (intent === 'prepare') {
|
|
113
|
-
const missing = requireValues(['--client']);
|
|
114
|
-
if (missing) {
|
|
115
|
-
usageFailure(`intent 'prepare' requires '${missing}'`);
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
result = await prepareCodexOrchestrationDelegation(taskRef, {
|
|
119
|
-
client: values['--client'],
|
|
120
|
-
requestedModel: values['--requested-model'],
|
|
121
|
-
requestedReasoningEffort: values['--requested-reasoning-effort'],
|
|
122
|
-
capabilityToken: values['--capability-token']
|
|
123
|
-
}, { orchestrationOptions: coreOptions });
|
|
124
|
-
}
|
|
125
|
-
else if (intent === 'dispatch') {
|
|
126
|
-
result = dispatchOrchestrationDelegation(taskRef, coreOptions);
|
|
127
|
-
}
|
|
128
|
-
else if (intent === 'await-activation') {
|
|
129
|
-
const missing = requireValues(['--stage', '--round', '--artifact', '--role']);
|
|
130
|
-
if (missing) {
|
|
131
|
-
usageFailure(`intent 'await-activation' requires '${missing}'`);
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
const round = Number(values['--round']);
|
|
135
|
-
if (!Number.isSafeInteger(round) || round < 1) {
|
|
136
|
-
usageFailure('--round must be a positive integer');
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
if (!['executor', 'reviewer'].includes(values['--role'])) {
|
|
140
|
-
usageFailure('--role must be executor or reviewer');
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
result = await awaitOrchestrationDelegationActivation(taskRef, {
|
|
144
|
-
stage: values['--stage'],
|
|
145
|
-
round,
|
|
146
|
-
artifact: values['--artifact'],
|
|
147
|
-
role: values['--role']
|
|
148
|
-
}, coreOptions);
|
|
149
|
-
}
|
|
150
|
-
else if (intent === 'recover-prepared') {
|
|
151
|
-
result = recoverPreparedOrchestrationDelegation(taskRef, coreOptions);
|
|
152
|
-
}
|
|
153
|
-
else if (intent === 'hook-start') {
|
|
154
|
-
const missing = requireValues([
|
|
155
|
-
...(taskRef === 'auto' ? ['--client'] : []),
|
|
156
|
-
'--native-agent', '--child-id', '--parent-id'
|
|
157
|
-
]);
|
|
158
|
-
if (missing) {
|
|
159
|
-
usageFailure(`intent 'hook-start' requires '${missing}'`);
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
const event = {
|
|
163
|
-
nativeAgent: values['--native-agent'], childId: values['--child-id'],
|
|
164
|
-
parentId: values['--parent-id'], spawnMode: values['--spawn-mode'],
|
|
165
|
-
actualModel: values['--actual-model'],
|
|
166
|
-
actualReasoningEffort: values['--actual-reasoning-effort'],
|
|
167
|
-
modelFallbackReason: values['--model-fallback-reason'],
|
|
168
|
-
reasoningEffortFallbackReason: values['--reasoning-effort-fallback-reason']
|
|
169
|
-
};
|
|
170
|
-
result = taskRef === 'auto'
|
|
171
|
-
? activateMatchingOrchestrationDelegation(values['--client'], event, coreOptions)
|
|
172
|
-
: activateOrchestrationDelegation(taskRef, event, coreOptions);
|
|
173
|
-
}
|
|
174
|
-
else if (intent === 'hook-stop') {
|
|
175
|
-
if (taskRef === 'auto') {
|
|
176
|
-
const missing = requireValues(['--client', '--native-agent', '--child-id']);
|
|
177
|
-
if (missing) {
|
|
178
|
-
usageFailure(`intent 'hook-stop' requires '${missing}'`);
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
|
-
result = sealMatchingOrchestrationDelegation(values['--client'], {
|
|
182
|
-
nativeAgent: values['--native-agent'], childId: values['--child-id'],
|
|
183
|
-
actualModel: values['--actual-model'],
|
|
184
|
-
actualReasoningEffort: values['--actual-reasoning-effort'],
|
|
185
|
-
modelFallbackReason: values['--model-fallback-reason'],
|
|
186
|
-
reasoningEffortFallbackReason: values['--reasoning-effort-fallback-reason']
|
|
187
|
-
}, coreOptions);
|
|
188
|
-
}
|
|
189
|
-
else {
|
|
190
|
-
const missing = requireValues(['--child-id', '--exit-code', '--after-fingerprint']);
|
|
191
|
-
if (missing) {
|
|
192
|
-
usageFailure(`intent 'hook-stop' requires '${missing}'`);
|
|
193
|
-
return;
|
|
194
|
-
}
|
|
195
|
-
const exitCode = Number(values['--exit-code']);
|
|
196
|
-
if (!Number.isInteger(exitCode)) {
|
|
197
|
-
usageFailure('--exit-code must be an integer');
|
|
198
|
-
return;
|
|
199
|
-
}
|
|
200
|
-
result = sealOrchestrationDelegation(taskRef, {
|
|
201
|
-
childId: values['--child-id'], exitCode,
|
|
202
|
-
afterFingerprint: values['--after-fingerprint'],
|
|
203
|
-
changedPaths: values['--changed-paths'] ? values['--changed-paths'].split(',').filter(Boolean) : [],
|
|
204
|
-
actualModel: values['--actual-model'],
|
|
205
|
-
actualReasoningEffort: values['--actual-reasoning-effort'],
|
|
206
|
-
modelFallbackReason: values['--model-fallback-reason'],
|
|
207
|
-
reasoningEffortFallbackReason: values['--reasoning-effort-fallback-reason']
|
|
208
|
-
}, coreOptions);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
else if (intent === 'advance') {
|
|
212
|
-
result = advanceOrchestration(taskRef, coreOptions);
|
|
213
|
-
}
|
|
214
|
-
else {
|
|
215
|
-
const missing = requireValues(['--code', '--message', '--recoverable']);
|
|
216
|
-
if (missing) {
|
|
217
|
-
usageFailure(`intent 'pause' requires '${missing}'`);
|
|
218
|
-
return;
|
|
219
|
-
}
|
|
220
|
-
if (!['true', 'false'].includes(values['--recoverable'])) {
|
|
221
|
-
usageFailure('--recoverable must be true or false');
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
224
|
-
result = pauseOrchestration(taskRef, values['--code'], values['--message'], values['--recoverable'] === 'true', coreOptions);
|
|
225
|
-
}
|
|
36
|
+
repoRoot = detectRepoRoot();
|
|
37
|
+
}
|
|
38
|
+
catch { /* domain resolution reports the repository error */ }
|
|
39
|
+
try {
|
|
40
|
+
const result = await dispatchTaskControlOperation(createDirectHostExecutionContext({
|
|
41
|
+
repoRoot,
|
|
42
|
+
...(process.env.AGENT_INFRA_RUNTIME_DIR ? { runtimeDir: process.env.AGENT_INFRA_RUNTIME_DIR } : {})
|
|
43
|
+
}), operation);
|
|
44
|
+
process.stdout.write(`${JSON.stringify(result)}\n`);
|
|
45
|
+
if (result.status === 'failed')
|
|
46
|
+
process.exitCode = 1;
|
|
226
47
|
}
|
|
227
48
|
catch (error) {
|
|
228
49
|
if (!(error instanceof OrchestrationStateError))
|
|
229
50
|
throw error;
|
|
230
|
-
|
|
231
|
-
status: 'failed',
|
|
232
|
-
changed: false,
|
|
233
|
-
taskId: error.taskId,
|
|
234
|
-
run: null,
|
|
235
|
-
next: null,
|
|
51
|
+
process.stdout.write(`${JSON.stringify({
|
|
52
|
+
status: 'failed', changed: false, taskId: error.taskId, run: null, next: null,
|
|
236
53
|
error: { code: error.code, message: error.message }
|
|
237
|
-
};
|
|
238
|
-
}
|
|
239
|
-
const output = result;
|
|
240
|
-
process.stdout.write(`${JSON.stringify(output)}\n`);
|
|
241
|
-
if (result.status === 'failed')
|
|
54
|
+
})}\n`);
|
|
242
55
|
process.exitCode = 1;
|
|
56
|
+
}
|
|
243
57
|
}
|
|
244
58
|
export { taskOrchestration };
|
|
245
59
|
//# sourceMappingURL=task-orchestration.js.map
|
|
@@ -12,6 +12,7 @@ import { containerNameCandidates } from '../sandbox/constants.js';
|
|
|
12
12
|
import { resolveSandboxTarget } from '../sandbox/workspace-identity.js';
|
|
13
13
|
import { sandboxControlPaths } from '../sandbox/workspace-view.js';
|
|
14
14
|
import { appendSandboxControlAudit, readActiveLease, readSandboxControlStatus } from '../sandbox/control/state.js';
|
|
15
|
+
import { readSandboxControlManifest } from '../sandbox/control/lifecycle.js';
|
|
15
16
|
import { SANDBOX_CONTROL_FUTURE_SKEW_MS, SANDBOX_CONTROL_STATUS_STALE_MS } from '../sandbox/control/protocol.js';
|
|
16
17
|
import { getProcessStartTime } from '../server/process-state.js';
|
|
17
18
|
import { assertGitWorktreeBinding } from '../git/worktree-identity.js';
|
|
@@ -150,7 +151,7 @@ function inplaceValidation(config, target, options) {
|
|
|
150
151
|
base: config.controlBase, project: config.project,
|
|
151
152
|
container: row.name, identity: target.workspace
|
|
152
153
|
});
|
|
153
|
-
const manifest =
|
|
154
|
+
const manifest = readSandboxControlManifest(control.manifestPath);
|
|
154
155
|
const initial = readSandboxControlStatus(control.statusDir);
|
|
155
156
|
const now = Date.now();
|
|
156
157
|
if (initial.generation !== manifest.generation
|