@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.
Files changed (68) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/native/claude-acp.d.ts +1 -1
  3. package/dist/native/claude-acp.d.ts.map +1 -1
  4. package/dist/native/claude-acp.js +2 -1
  5. package/dist/native/claude-acp.js.map +1 -1
  6. package/dist/native/client.d.ts.map +1 -1
  7. package/dist/native/client.js +18 -2
  8. package/dist/native/client.js.map +1 -1
  9. package/dist/native/host-runtime.d.ts +8 -0
  10. package/dist/native/host-runtime.d.ts.map +1 -0
  11. package/dist/native/host-runtime.js +92 -0
  12. package/dist/native/host-runtime.js.map +1 -0
  13. package/dist/native/host-unavailable.d.ts +35 -0
  14. package/dist/native/host-unavailable.d.ts.map +1 -0
  15. package/dist/native/host-unavailable.js +52 -0
  16. package/dist/native/host-unavailable.js.map +1 -0
  17. package/dist/native/host.js +8 -2
  18. package/dist/native/host.js.map +1 -1
  19. package/dist/native/ipc.d.ts +6 -0
  20. package/dist/native/ipc.d.ts.map +1 -1
  21. package/dist/native/ipc.js +5 -2
  22. package/dist/native/ipc.js.map +1 -1
  23. package/dist/native/manager.d.ts +6 -0
  24. package/dist/native/manager.d.ts.map +1 -1
  25. package/dist/native/manager.js +36 -3
  26. package/dist/native/manager.js.map +1 -1
  27. package/dist/native/service.d.ts +3 -2
  28. package/dist/native/service.d.ts.map +1 -1
  29. package/dist/native/service.js +7 -0
  30. package/dist/native/service.js.map +1 -1
  31. package/dist/native/supervisor.js +3 -0
  32. package/dist/native/supervisor.js.map +1 -1
  33. package/dist/native/worker-launch.d.ts.map +1 -1
  34. package/dist/native/worker-launch.js +4 -3
  35. package/dist/native/worker-launch.js.map +1 -1
  36. package/dist/native/worker-service.d.ts.map +1 -1
  37. package/dist/native/worker-service.js +6 -0
  38. package/dist/native/worker-service.js.map +1 -1
  39. package/dist/task-init/artifact-only.d.ts +6 -1
  40. package/dist/task-init/artifact-only.d.ts.map +1 -1
  41. package/dist/task-init/artifact-only.js +30 -8
  42. package/dist/task-init/artifact-only.js.map +1 -1
  43. package/dist/task-init/index.d.ts +8 -1
  44. package/dist/task-init/index.d.ts.map +1 -1
  45. package/dist/task-init/index.js +11 -1
  46. package/dist/task-init/index.js.map +1 -1
  47. package/dist/task-init/required-skills.d.ts +9 -1
  48. package/dist/task-init/required-skills.d.ts.map +1 -1
  49. package/dist/task-init/required-skills.js +60 -2
  50. package/dist/task-init/required-skills.js.map +1 -1
  51. package/dist/task-init/review-rules.d.ts +31 -0
  52. package/dist/task-init/review-rules.d.ts.map +1 -0
  53. package/dist/task-init/review-rules.js +73 -0
  54. package/dist/task-init/review-rules.js.map +1 -0
  55. package/dist/task-init/task-document.d.ts +29 -1
  56. package/dist/task-init/task-document.d.ts.map +1 -1
  57. package/dist/task-init/task-document.js +26 -0
  58. package/dist/task-init/task-document.js.map +1 -1
  59. package/dist/task-init/write.d.ts +10 -1
  60. package/dist/task-init/write.d.ts.map +1 -1
  61. package/dist/task-init/write.js +15 -2
  62. package/dist/task-init/write.js.map +1 -1
  63. package/dist/tool-usage/prices.d.ts.map +1 -1
  64. package/dist/tool-usage/prices.js +11 -8
  65. package/dist/tool-usage/prices.js.map +1 -1
  66. package/package.json +3 -3
  67. package/scripts/check-task-artifact-contract.mjs +3 -1
  68. 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 evaluateDeterministicChecks(taskDir, checklist) {
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. */