@farmslot/agent-runtime 0.48.8 → 0.50.0
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/CHANGELOG.md +16 -0
- package/dist/native/claude-acp.d.ts +1 -1
- package/dist/native/claude-acp.d.ts.map +1 -1
- package/dist/native/claude-acp.js +2 -1
- package/dist/native/claude-acp.js.map +1 -1
- package/dist/native/client.d.ts.map +1 -1
- package/dist/native/client.js +18 -2
- package/dist/native/client.js.map +1 -1
- package/dist/native/host-runtime.d.ts +8 -0
- package/dist/native/host-runtime.d.ts.map +1 -0
- package/dist/native/host-runtime.js +92 -0
- package/dist/native/host-runtime.js.map +1 -0
- package/dist/native/host-unavailable.d.ts +35 -0
- package/dist/native/host-unavailable.d.ts.map +1 -0
- package/dist/native/host-unavailable.js +52 -0
- package/dist/native/host-unavailable.js.map +1 -0
- package/dist/native/host.js +8 -2
- package/dist/native/host.js.map +1 -1
- package/dist/native/ipc.d.ts +6 -0
- package/dist/native/ipc.d.ts.map +1 -1
- package/dist/native/ipc.js +5 -2
- package/dist/native/ipc.js.map +1 -1
- package/dist/native/manager.d.ts +6 -0
- package/dist/native/manager.d.ts.map +1 -1
- package/dist/native/manager.js +36 -3
- package/dist/native/manager.js.map +1 -1
- package/dist/native/service.d.ts +3 -2
- package/dist/native/service.d.ts.map +1 -1
- package/dist/native/service.js +7 -0
- package/dist/native/service.js.map +1 -1
- package/dist/native/supervisor.js +3 -0
- package/dist/native/supervisor.js.map +1 -1
- package/dist/native/worker-launch.d.ts.map +1 -1
- package/dist/native/worker-launch.js +4 -3
- package/dist/native/worker-launch.js.map +1 -1
- package/dist/native/worker-service.d.ts.map +1 -1
- package/dist/native/worker-service.js +6 -0
- package/dist/native/worker-service.js.map +1 -1
- package/dist/task-init/artifact-only.d.ts +6 -1
- package/dist/task-init/artifact-only.d.ts.map +1 -1
- package/dist/task-init/artifact-only.js +30 -8
- package/dist/task-init/artifact-only.js.map +1 -1
- package/dist/task-init/index.d.ts +8 -1
- package/dist/task-init/index.d.ts.map +1 -1
- package/dist/task-init/index.js +11 -1
- package/dist/task-init/index.js.map +1 -1
- package/dist/task-init/required-skills.d.ts +9 -1
- package/dist/task-init/required-skills.d.ts.map +1 -1
- package/dist/task-init/required-skills.js +60 -2
- package/dist/task-init/required-skills.js.map +1 -1
- package/dist/task-init/review-rules.d.ts +31 -0
- package/dist/task-init/review-rules.d.ts.map +1 -0
- package/dist/task-init/review-rules.js +73 -0
- package/dist/task-init/review-rules.js.map +1 -0
- package/dist/task-init/task-document.d.ts +29 -1
- package/dist/task-init/task-document.d.ts.map +1 -1
- package/dist/task-init/task-document.js +26 -0
- package/dist/task-init/task-document.js.map +1 -1
- package/dist/task-init/write.d.ts +10 -1
- package/dist/task-init/write.d.ts.map +1 -1
- package/dist/task-init/write.js +15 -2
- package/dist/task-init/write.js.map +1 -1
- package/dist/tool-usage/prices.d.ts.map +1 -1
- package/dist/tool-usage/prices.js +11 -8
- package/dist/tool-usage/prices.js.map +1 -1
- package/package.json +3 -3
- package/scripts/check-task-artifact-contract.mjs +3 -1
- package/scripts/worker-terminal-contract.cjs +40 -2
|
@@ -718,7 +718,9 @@ if (terminalCommand !== 'blocked') {
|
|
|
718
718
|
if (checklists.size === 0) checklists.add(undefined);
|
|
719
719
|
for (const checklist of checklists) {
|
|
720
720
|
try {
|
|
721
|
-
const result = deterministicChecks.evaluate(taskDir, checklist
|
|
721
|
+
const result = deterministicChecks.evaluate(taskDir, checklist, {
|
|
722
|
+
noChange: terminalCommand === 'no-change',
|
|
723
|
+
});
|
|
722
724
|
if (!proofMeasurement) issues.push(...result.issues);
|
|
723
725
|
deterministicResults.push(...result.checks);
|
|
724
726
|
} catch (error) {
|
|
@@ -798,10 +798,47 @@ function readDeterministicChecks(taskDir, checklist, options = {}) {
|
|
|
798
798
|
});
|
|
799
799
|
}
|
|
800
800
|
|
|
801
|
-
function
|
|
801
|
+
function isMissingLocalCheck(check) {
|
|
802
|
+
return (
|
|
803
|
+
check.reference === 'ci.local_check' && Boolean(check.command) && check.status === 'missing'
|
|
804
|
+
);
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
function assertNoChangeCheckout(taskDir, base) {
|
|
808
|
+
const checkout = deterministicCheckout(taskDir);
|
|
809
|
+
if (base !== undefined) {
|
|
810
|
+
if (!base) throw new Error('No-change CI waiver requires the recorded dispatch baseline');
|
|
811
|
+
const head = spawnSync('git', ['rev-parse', 'HEAD'], { cwd: checkout, encoding: 'utf8' });
|
|
812
|
+
if (head.status !== 0 || head.stdout.trim() !== base)
|
|
813
|
+
throw new Error('No-change CI waiver requires HEAD to match the recorded dispatch baseline');
|
|
814
|
+
}
|
|
815
|
+
const relativeTask = path.relative(checkout, fs.realpathSync(taskDir));
|
|
816
|
+
const status = spawnSync(
|
|
817
|
+
'git',
|
|
818
|
+
[
|
|
819
|
+
'--no-optional-locks',
|
|
820
|
+
'status',
|
|
821
|
+
'--porcelain=v1',
|
|
822
|
+
'--untracked-files=all',
|
|
823
|
+
'--ignore-submodules=none',
|
|
824
|
+
'--',
|
|
825
|
+
'.',
|
|
826
|
+
...(relativeTask && !relativeTask.startsWith('../') && relativeTask !== '..'
|
|
827
|
+
? [`:(exclude,literal)${relativeTask}`]
|
|
828
|
+
: []),
|
|
829
|
+
],
|
|
830
|
+
{ cwd: checkout, encoding: 'utf8' },
|
|
831
|
+
);
|
|
832
|
+
if (status.status !== 0 || status.stdout)
|
|
833
|
+
throw new Error('No-change CI waiver requires a checkout without uncommitted source changes');
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
function evaluateDeterministicChecks(taskDir, checklist, options = {}) {
|
|
802
837
|
const checks = readDeterministicChecks(taskDir, checklist);
|
|
838
|
+
const waive = options.noChange === true && checks.some(isMissingLocalCheck);
|
|
839
|
+
if (waive) assertNoChangeCheckout(taskDir, options.baseSha);
|
|
803
840
|
const issues = checks
|
|
804
|
-
.filter((step) => step.status !== 'passed')
|
|
841
|
+
.filter((step) => step.status !== 'passed' && !(waive && isMissingLocalCheck(step)))
|
|
805
842
|
.map(
|
|
806
843
|
(step) =>
|
|
807
844
|
`${step.checklist} step ${step.stepNumber} (${step.reference}): ${step.message || step.status}`,
|
|
@@ -821,6 +858,7 @@ const deterministicChecks = {
|
|
|
821
858
|
read: readDeterministicChecks,
|
|
822
859
|
issues: deterministicContractIssues,
|
|
823
860
|
evaluate: evaluateDeterministicChecks,
|
|
861
|
+
isMissingLocalCheck,
|
|
824
862
|
};
|
|
825
863
|
|
|
826
864
|
/** Written by the scripted runner beside SIGNAL.json; the only proof a command run gives. */
|