deadbyte-mcp 0.15.2 → 0.15.3

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 (56) hide show
  1. package/MANIFEST.SHA256 +54 -33
  2. package/package.json +88 -88
  3. package/scripts/autonomous-build.ps1 +1 -0
  4. package/scripts/autonomous-tests.ps1 +1 -0
  5. package/scripts/check-agent-backend-r46.mjs +77 -0
  6. package/scripts/check-atomic-resource-r46.mjs +84 -0
  7. package/scripts/check-autonomous-race-r46.mjs +160 -0
  8. package/scripts/check-coding-task-deadline-r46.mjs +59 -0
  9. package/scripts/check-deadline-cancellation-r46.mjs +49 -0
  10. package/scripts/check-process-deadline-r46.mjs +52 -0
  11. package/scripts/check-r46-background.mjs +5 -0
  12. package/scripts/extract-r46-failures.mjs +5 -0
  13. package/scripts/full-regression-r46.mjs +20 -12
  14. package/scripts/gate-windows-r46.ps1 +2 -0
  15. package/scripts/inspect-r46-active.mjs +2 -0
  16. package/scripts/r47-core-failures.mjs +1 -0
  17. package/scripts/release-manifest.mjs +1 -1
  18. package/scripts/run-r46-full-regression-background.mjs +7 -0
  19. package/scripts/run-r46-windows-gate-background.mjs +6 -0
  20. package/scripts/run-r46-windows-gate-background.ps1 +10 -0
  21. package/scripts/windows-gate-evidence-r46.mjs +4 -3
  22. package/scripts/workload-contract-regression-r47.mjs +14 -0
  23. package/scripts/workload-stream-regression.mjs +16 -0
  24. package/scripts/workload-substrate-r47-regression.mjs +12 -0
  25. package/src/agent-backend-r44.mjs +75 -10
  26. package/src/atomic-mutation.mjs +55 -0
  27. package/src/autonomous-mcp-tools.mjs +4 -3
  28. package/src/autonomous-output-contracts.mjs +16 -3
  29. package/src/autonomous-runtime.mjs +83 -30
  30. package/src/coding-mcp-tools.mjs +2 -2
  31. package/src/coding-output-contracts.mjs +18 -4
  32. package/src/coding-plane.mjs +3 -24
  33. package/src/coding-search.mjs +11 -2
  34. package/src/coding-task-runtime.mjs +41 -6
  35. package/src/deadline-cancellation.mjs +83 -0
  36. package/src/machine-fs-smoke-client.mjs +1 -1
  37. package/src/machine-fs.mjs +3 -23
  38. package/src/mcp-server.mjs +6 -0
  39. package/src/observation-smoke-client.mjs +1 -1
  40. package/src/process-mcp-tools.mjs +11 -3
  41. package/src/process-output-contracts.mjs +23 -0
  42. package/src/process-runtime.mjs +54 -5
  43. package/src/process-smoke-client.mjs +1 -1
  44. package/src/resource-identity.mjs +59 -0
  45. package/src/runtime-update.mjs +526 -162
  46. package/src/workload-substrate.mjs +87 -0
  47. package/test/coding-runtime.test.mjs +12 -0
  48. package/test/coding-search-r36.test.mjs +7 -0
  49. package/test/full-max-catalog-r46.test.mjs +2 -2
  50. package/test/helpers/autonomous-r34-fixture.mjs +10 -1
  51. package/test/process-mcp-tools.test.mjs +5 -2
  52. package/test/process-runtime.test.mjs +18 -1
  53. package/test/r45-finalization.test.mjs +1 -1
  54. package/test/release-version.test.mjs +1 -1
  55. package/test/runtime-self-update.test.mjs +118 -1
  56. package/test/workload-substrate.test.mjs +22 -0
@@ -59,7 +59,7 @@ try {
59
59
  const listed = await client.listTools();
60
60
  const names = listed.tools.map(tool => tool.name).sort();
61
61
  const expected = ['contained_transform','evidence_verify','file_read','proof_execute','skill_catalog','workspace_open',
62
- 'process_session_action','process_session_list','process_session_read','process_session_start','process_session_status','process_session_terminate','process_session_write'].sort();
62
+ 'process_session_action','process_session_cancel','process_session_list','process_session_read','process_session_start','process_session_status','process_session_terminate','process_session_write'].sort();
63
63
  if (JSON.stringify(names) !== JSON.stringify(expected)) throw new Error(`process smoke catalog mismatch: ${JSON.stringify(names)}`);
64
64
  const started = structured(await client.callTool({ name: 'process_session_start', arguments: {
65
65
  profile_id: 'ping_hold', root_id: 'core', cwd: '.', args: []
@@ -0,0 +1,59 @@
1
+ import { createHash } from 'node:crypto';
2
+
3
+ const SHA256_RE = /^[0-9a-f]{64}$/;
4
+
5
+ function hashObject(value) {
6
+ const json = JSON.stringify(value);
7
+ return createHash('sha256').update(Buffer.from(json, 'utf8')).digest('hex');
8
+ }
9
+
10
+ function requiredString(value, name, max = 512) {
11
+ if (typeof value !== 'string' || value.length < 1 || value.length > max) throw new Error(`resource identity ${name} invalid`);
12
+ return value;
13
+ }
14
+
15
+ export function createResourceIdentity({
16
+ rootId,
17
+ rootGeneration = null,
18
+ relativePath,
19
+ canonicalPath,
20
+ kind,
21
+ exists,
22
+ size = 0,
23
+ contentSha256 = null,
24
+ objectIdentitySha256 = null
25
+ }) {
26
+ requiredString(rootId, 'root_id', 64);
27
+ requiredString(relativePath, 'relative_path');
28
+ requiredString(canonicalPath, 'canonical_path', 4096);
29
+ requiredString(kind, 'kind', 32);
30
+ if (rootGeneration !== null && typeof rootGeneration !== 'string') throw new Error('resource identity root_generation invalid');
31
+ if (typeof exists !== 'boolean') throw new Error('resource identity exists invalid');
32
+ if (!Number.isSafeInteger(size) || size < 0) throw new Error('resource identity size invalid');
33
+ if (contentSha256 !== null && !SHA256_RE.test(contentSha256)) throw new Error('resource identity content_sha256 invalid');
34
+ if (objectIdentitySha256 !== null && !SHA256_RE.test(objectIdentitySha256)) throw new Error('resource identity object_identity_sha256 invalid');
35
+
36
+ const location = {
37
+ schema: 'deadbyte.resource-location.v1',
38
+ root_id: rootId,
39
+ root_generation: rootGeneration,
40
+ relative_path: relativePath.replaceAll('\\', '/'),
41
+ canonical_path: canonicalPath,
42
+ kind,
43
+ exists
44
+ };
45
+ const resourceIdentitySha256 = hashObject(location);
46
+
47
+ return Object.freeze({
48
+ ...location,
49
+ size,
50
+ content_sha256: contentSha256,
51
+ object_identity_sha256: objectIdentitySha256,
52
+ resource_identity_sha256: resourceIdentitySha256
53
+ });
54
+ }
55
+
56
+ export function contentIdentitySha256(contentSha256) {
57
+ if (contentSha256 !== null && !SHA256_RE.test(contentSha256)) throw new Error('content_sha256 invalid');
58
+ return contentSha256;
59
+ }