@xenosystem/agent-sdk 0.9.8 → 0.9.9

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 (92) hide show
  1. package/LICENSE +15 -15
  2. package/README.md +511 -511
  3. package/dist/agents/metafile-cjs.json +1 -1
  4. package/dist/agents/metafile-esm.json +1 -1
  5. package/dist/artifacts/index.cjs +1 -1
  6. package/dist/artifacts/index.js +1 -1
  7. package/dist/artifacts/metafile-cjs.json +1 -1
  8. package/dist/artifacts/metafile-esm.json +1 -1
  9. package/dist/automation/index.cjs +478 -17
  10. package/dist/automation/index.js +478 -17
  11. package/dist/automation/metafile-cjs.json +1 -1
  12. package/dist/automation/metafile-esm.json +1 -1
  13. package/dist/control-plane/index.cjs +1 -1
  14. package/dist/control-plane/index.js +1 -1
  15. package/dist/control-plane/metafile-cjs.json +1 -1
  16. package/dist/control-plane/metafile-esm.json +1 -1
  17. package/dist/control-room/metafile-cjs.json +1 -1
  18. package/dist/control-room/metafile-esm.json +1 -1
  19. package/dist/electron/index.cjs +614 -153
  20. package/dist/electron/index.d.cts +0 -1
  21. package/dist/electron/index.d.ts +0 -1
  22. package/dist/electron/index.js +617 -156
  23. package/dist/electron/metafile-cjs.json +1 -1
  24. package/dist/electron/metafile-esm.json +1 -1
  25. package/dist/governance/metafile-cjs.json +1 -1
  26. package/dist/governance/metafile-esm.json +1 -1
  27. package/dist/hooks/metafile-cjs.json +1 -1
  28. package/dist/hooks/metafile-esm.json +1 -1
  29. package/dist/hosted/metafile-cjs.json +1 -1
  30. package/dist/hosted/metafile-esm.json +1 -1
  31. package/dist/index.cjs +787 -316
  32. package/dist/index.d.cts +15 -4
  33. package/dist/index.d.ts +15 -4
  34. package/dist/index.js +788 -317
  35. package/dist/intelligence/metafile-cjs.json +1 -1
  36. package/dist/intelligence/metafile-esm.json +1 -1
  37. package/dist/mcp/metafile-cjs.json +1 -1
  38. package/dist/mcp/metafile-esm.json +1 -1
  39. package/dist/metafile-cjs.json +1 -1
  40. package/dist/metafile-esm.json +1 -1
  41. package/dist/oracle/metafile-cjs.json +1 -1
  42. package/dist/oracle/metafile-esm.json +1 -1
  43. package/dist/providers/index.cjs +8 -8
  44. package/dist/providers/index.js +7 -7
  45. package/dist/providers/metafile-cjs.json +1 -1
  46. package/dist/providers/metafile-esm.json +1 -1
  47. package/dist/recipes/metafile-cjs.json +1 -1
  48. package/dist/recipes/metafile-esm.json +1 -1
  49. package/dist/research/metafile-cjs.json +1 -1
  50. package/dist/research/metafile-esm.json +1 -1
  51. package/dist/session/index.cjs +6 -6
  52. package/dist/session/index.js +10 -10
  53. package/dist/session/metafile-cjs.json +1 -1
  54. package/dist/session/metafile-esm.json +1 -1
  55. package/dist/sharing/metafile-cjs.json +1 -1
  56. package/dist/sharing/metafile-esm.json +1 -1
  57. package/dist/skills/metafile-cjs.json +1 -1
  58. package/dist/skills/metafile-esm.json +1 -1
  59. package/dist/soul/metafile-cjs.json +1 -1
  60. package/dist/soul/metafile-esm.json +1 -1
  61. package/dist/terminal/metafile-cjs.json +1 -1
  62. package/dist/terminal/metafile-esm.json +1 -1
  63. package/dist/ui/index.cjs +3 -3
  64. package/dist/ui/index.js +3 -3
  65. package/dist/ui/metafile-cjs.json +1 -1
  66. package/dist/ui/metafile-esm.json +1 -1
  67. package/dist/utils/metafile-cjs.json +1 -1
  68. package/dist/utils/metafile-esm.json +1 -1
  69. package/native/mxc/LICENSE.microsoft-mxc-sdk.md +20 -20
  70. package/native/mxc/README.md +25 -25
  71. package/native/mxc/bin/arm64/lxc-exec +0 -0
  72. package/native/mxc/bin/arm64/mxc-exec-mac +0 -0
  73. package/native/mxc/bin/x64/lxc-exec +0 -0
  74. package/native/mxc/package.json +58 -58
  75. package/ownership/CLEAN_ROOM_CONTRIBUTOR_GUIDE.md +63 -63
  76. package/ownership/audit.mjs +34 -3
  77. package/ownership/evidence/PROPRIETARY-COMMAND-1/implementation-record.md +77 -77
  78. package/ownership/evidence/PROPRIETARY-COMMAND-1/provenance-review.md +51 -51
  79. package/ownership/evidence/PROPRIETARY-MEDIA-1/implementation-record.md +131 -131
  80. package/ownership/evidence/PROPRIETARY-MEDIA-1/provenance-review.md +50 -50
  81. package/ownership/evidence/PROPRIETARY-PTY-1/implementation-record.md +86 -86
  82. package/ownership/evidence/PROPRIETARY-PTY-1/provenance-review.md +52 -52
  83. package/ownership/evidence/PROPRIETARY-RUNTIME-1/implementation-record.md +68 -68
  84. package/ownership/evidence/PROPRIETARY-RUNTIME-1/provenance-review.md +32 -32
  85. package/ownership/evidence/PROPRIETARY-TOOLCHAIN-1/implementation-record.md +53 -53
  86. package/ownership/evidence/PROPRIETARY-TOOLCHAIN-1/provenance-review.md +32 -32
  87. package/ownership/evidence/PROPRIETARY-UI-1/implementation-record.md +96 -96
  88. package/ownership/evidence/PROPRIETARY-UI-1/provenance-review.md +46 -46
  89. package/ownership/ownership-policy.schema.json +192 -192
  90. package/ownership/templates/clean-room-implementation-record.md +70 -70
  91. package/ownership/templates/provenance-review.md +51 -51
  92. package/package.json +4 -1
@@ -1 +1 @@
1
- {"inputs":{"src/utils/fs.ts":{"bytes":9993,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/utils/json.ts":{"bytes":804,"imports":[],"format":"esm"},"src/utils/yaml.ts":{"bytes":5506,"imports":[],"format":"esm"},"src/utils/path-security.ts":{"bytes":993,"imports":[{"path":"path","kind":"import-statement","external":true}],"format":"esm"},"src/utils/platform.ts":{"bytes":973,"imports":[{"path":"node:os","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/utils/validation.ts":{"bytes":5336,"imports":[],"format":"esm"},"src/utils/logger.ts":{"bytes":3719,"imports":[],"format":"esm"},"src/utils/retry.ts":{"bytes":9045,"imports":[],"format":"esm"},"src/utils/tokens.ts":{"bytes":3207,"imports":[],"format":"esm"},"src/utils/cost.ts":{"bytes":1826,"imports":[],"format":"esm"},"src/utils/clipboard.ts":{"bytes":1156,"imports":[{"path":"node:child_process","kind":"import-statement","external":true}],"format":"esm"},"src/utils/benchmark-safety.ts":{"bytes":6542,"imports":[],"format":"esm"},"src/utils/tool-result-content.ts":{"bytes":4750,"imports":[],"format":"esm"},"src/utils/text-security.ts":{"bytes":809,"imports":[],"format":"esm"},"src/utils/index.ts":{"bytes":1453,"imports":[{"path":"src/utils/fs.ts","kind":"import-statement","original":"./fs.js"},{"path":"src/utils/json.ts","kind":"import-statement","original":"./json.js"},{"path":"src/utils/yaml.ts","kind":"import-statement","original":"./yaml.js"},{"path":"src/utils/path-security.ts","kind":"import-statement","original":"./path-security.js"},{"path":"src/utils/platform.ts","kind":"import-statement","original":"./platform.js"},{"path":"src/utils/validation.ts","kind":"import-statement","original":"./validation.js"},{"path":"src/utils/logger.ts","kind":"import-statement","original":"./logger.js"},{"path":"src/utils/retry.ts","kind":"import-statement","original":"./retry.js"},{"path":"src/utils/tokens.ts","kind":"import-statement","original":"./tokens.js"},{"path":"src/utils/cost.ts","kind":"import-statement","original":"./cost.js"},{"path":"src/utils/clipboard.ts","kind":"import-statement","original":"./clipboard.js"},{"path":"src/utils/benchmark-safety.ts","kind":"import-statement","original":"./benchmark-safety.js"},{"path":"src/utils/tool-result-content.ts","kind":"import-statement","original":"./tool-result-content.js"},{"path":"src/utils/text-security.ts","kind":"import-statement","original":"./text-security.js"}],"format":"esm"}},"outputs":{"dist/utils/index.cjs":{"imports":[{"path":"node:fs","kind":"require-call","external":true},{"path":"node:fs","kind":"require-call","external":true},{"path":"node:fs/promises","kind":"require-call","external":true},{"path":"node:path","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"node:os","kind":"require-call","external":true},{"path":"node:child_process","kind":"require-call","external":true},{"path":"node:path","kind":"require-call","external":true},{"path":"node:child_process","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/utils/index.ts","inputs":{"src/utils/index.ts":{"bytesInOutput":1866},"src/utils/fs.ts":{"bytesInOutput":4051},"src/utils/json.ts":{"bytesInOutput":239},"src/utils/yaml.ts":{"bytesInOutput":2639},"src/utils/path-security.ts":{"bytesInOutput":313},"src/utils/platform.ts":{"bytesInOutput":483},"src/utils/validation.ts":{"bytesInOutput":1423},"src/utils/logger.ts":{"bytesInOutput":913},"src/utils/retry.ts":{"bytesInOutput":2918},"src/utils/tokens.ts":{"bytesInOutput":904},"src/utils/cost.ts":{"bytesInOutput":933},"src/utils/clipboard.ts":{"bytesInOutput":604},"src/utils/benchmark-safety.ts":{"bytesInOutput":3108},"src/utils/tool-result-content.ts":{"bytesInOutput":2072},"src/utils/text-security.ts":{"bytesInOutput":180}},"bytes":24527}}}
1
+ {"inputs":{"src/utils/fs.ts":{"bytes":10330,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/utils/json.ts":{"bytes":842,"imports":[],"format":"esm"},"src/utils/yaml.ts":{"bytes":5668,"imports":[],"format":"esm"},"src/utils/path-security.ts":{"bytes":1024,"imports":[{"path":"path","kind":"import-statement","external":true}],"format":"esm"},"src/utils/platform.ts":{"bytes":1012,"imports":[{"path":"node:os","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/utils/validation.ts":{"bytes":5519,"imports":[],"format":"esm"},"src/utils/logger.ts":{"bytes":3873,"imports":[],"format":"esm"},"src/utils/retry.ts":{"bytes":9294,"imports":[],"format":"esm"},"src/utils/tokens.ts":{"bytes":3306,"imports":[],"format":"esm"},"src/utils/cost.ts":{"bytes":1876,"imports":[],"format":"esm"},"src/utils/clipboard.ts":{"bytes":1196,"imports":[{"path":"node:child_process","kind":"import-statement","external":true}],"format":"esm"},"src/utils/benchmark-safety.ts":{"bytes":6703,"imports":[],"format":"esm"},"src/utils/tool-result-content.ts":{"bytes":4887,"imports":[],"format":"esm"},"src/utils/text-security.ts":{"bytes":833,"imports":[],"format":"esm"},"src/utils/index.ts":{"bytes":1490,"imports":[{"path":"src/utils/fs.ts","kind":"import-statement","original":"./fs.js"},{"path":"src/utils/json.ts","kind":"import-statement","original":"./json.js"},{"path":"src/utils/yaml.ts","kind":"import-statement","original":"./yaml.js"},{"path":"src/utils/path-security.ts","kind":"import-statement","original":"./path-security.js"},{"path":"src/utils/platform.ts","kind":"import-statement","original":"./platform.js"},{"path":"src/utils/validation.ts","kind":"import-statement","original":"./validation.js"},{"path":"src/utils/logger.ts","kind":"import-statement","original":"./logger.js"},{"path":"src/utils/retry.ts","kind":"import-statement","original":"./retry.js"},{"path":"src/utils/tokens.ts","kind":"import-statement","original":"./tokens.js"},{"path":"src/utils/cost.ts","kind":"import-statement","original":"./cost.js"},{"path":"src/utils/clipboard.ts","kind":"import-statement","original":"./clipboard.js"},{"path":"src/utils/benchmark-safety.ts","kind":"import-statement","original":"./benchmark-safety.js"},{"path":"src/utils/tool-result-content.ts","kind":"import-statement","original":"./tool-result-content.js"},{"path":"src/utils/text-security.ts","kind":"import-statement","original":"./text-security.js"}],"format":"esm"}},"outputs":{"dist/utils/index.cjs":{"imports":[{"path":"node:fs","kind":"require-call","external":true},{"path":"node:fs","kind":"require-call","external":true},{"path":"node:fs/promises","kind":"require-call","external":true},{"path":"node:path","kind":"require-call","external":true},{"path":"path","kind":"require-call","external":true},{"path":"node:os","kind":"require-call","external":true},{"path":"node:child_process","kind":"require-call","external":true},{"path":"node:path","kind":"require-call","external":true},{"path":"node:child_process","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/utils/index.ts","inputs":{"src/utils/index.ts":{"bytesInOutput":1866},"src/utils/fs.ts":{"bytesInOutput":4051},"src/utils/json.ts":{"bytesInOutput":239},"src/utils/yaml.ts":{"bytesInOutput":2639},"src/utils/path-security.ts":{"bytesInOutput":313},"src/utils/platform.ts":{"bytesInOutput":483},"src/utils/validation.ts":{"bytesInOutput":1423},"src/utils/logger.ts":{"bytesInOutput":913},"src/utils/retry.ts":{"bytesInOutput":2918},"src/utils/tokens.ts":{"bytesInOutput":904},"src/utils/cost.ts":{"bytesInOutput":933},"src/utils/clipboard.ts":{"bytesInOutput":604},"src/utils/benchmark-safety.ts":{"bytesInOutput":3108},"src/utils/tool-result-content.ts":{"bytesInOutput":2072},"src/utils/text-security.ts":{"bytesInOutput":180}},"bytes":24527}}}
@@ -1 +1 @@
1
- {"inputs":{"src/utils/fs.ts":{"bytes":9993,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/utils/json.ts":{"bytes":804,"imports":[],"format":"esm"},"src/utils/yaml.ts":{"bytes":5506,"imports":[],"format":"esm"},"src/utils/path-security.ts":{"bytes":993,"imports":[{"path":"path","kind":"import-statement","external":true}],"format":"esm"},"src/utils/platform.ts":{"bytes":973,"imports":[{"path":"node:os","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/utils/validation.ts":{"bytes":5336,"imports":[],"format":"esm"},"src/utils/logger.ts":{"bytes":3719,"imports":[],"format":"esm"},"src/utils/retry.ts":{"bytes":9045,"imports":[],"format":"esm"},"src/utils/tokens.ts":{"bytes":3207,"imports":[],"format":"esm"},"src/utils/cost.ts":{"bytes":1826,"imports":[],"format":"esm"},"src/utils/clipboard.ts":{"bytes":1156,"imports":[{"path":"node:child_process","kind":"import-statement","external":true}],"format":"esm"},"src/utils/benchmark-safety.ts":{"bytes":6542,"imports":[],"format":"esm"},"src/utils/tool-result-content.ts":{"bytes":4750,"imports":[],"format":"esm"},"src/utils/text-security.ts":{"bytes":809,"imports":[],"format":"esm"},"src/utils/index.ts":{"bytes":1453,"imports":[{"path":"src/utils/fs.ts","kind":"import-statement","original":"./fs.js"},{"path":"src/utils/json.ts","kind":"import-statement","original":"./json.js"},{"path":"src/utils/yaml.ts","kind":"import-statement","original":"./yaml.js"},{"path":"src/utils/path-security.ts","kind":"import-statement","original":"./path-security.js"},{"path":"src/utils/platform.ts","kind":"import-statement","original":"./platform.js"},{"path":"src/utils/validation.ts","kind":"import-statement","original":"./validation.js"},{"path":"src/utils/logger.ts","kind":"import-statement","original":"./logger.js"},{"path":"src/utils/retry.ts","kind":"import-statement","original":"./retry.js"},{"path":"src/utils/tokens.ts","kind":"import-statement","original":"./tokens.js"},{"path":"src/utils/cost.ts","kind":"import-statement","original":"./cost.js"},{"path":"src/utils/clipboard.ts","kind":"import-statement","original":"./clipboard.js"},{"path":"src/utils/benchmark-safety.ts","kind":"import-statement","original":"./benchmark-safety.js"},{"path":"src/utils/tool-result-content.ts","kind":"import-statement","original":"./tool-result-content.js"},{"path":"src/utils/text-security.ts","kind":"import-statement","original":"./text-security.js"}],"format":"esm"}},"outputs":{"dist/utils/index.js":{"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"path","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true}],"exports":["ApiTransientError","HOME_DIR","IS_LINUX","IS_MAC","IS_WINDOWS","LogLevel","OS_VERSION","PLATFORM","accountTextTokens","appendLine","benchmarkLeakError","buildToolResultBlock","buildToolResultText","calculateCost","commandMentionsBenchmarkLeak","conservativeTokenAccountingAdapter","copyTextToClipboard","createSafeRegex","debug","decodeTextBuffer","deleteDir","deleteFile","detectLineEnding","detectPreferredLineEnding","detectTextEncoding","encodeTextBuffer","ensureDir","error","estimateTokens","estimateTokensForModel","existsSync","filterBenchmarkLeakPaths","findSimilarFile","fitsInBudget","formatCost","getBenchmarkReferenceOverwriteHint","getBoolean","getConfigDir","getLogLevel","getNumber","getProjectConfigDir","getRetryErrorContext","getShellName","getString","getToolResultTransportContent","hasDir","hasDisallowedAsciiControlCharacter","hasFile","hasFrontmatter","hasNonTextToolResultContent","info","isBenchmarkLeakPath","isBenchmarkMode","isGitRepo","isPathSafe","isRetryableError","listDirs","listFiles","normalizeLineEndings","parseDocument","parseJsonLines","readFileSafe","readIfExists","readTextFile","remainingBudget","safeJsonParse","safeJsonStringify","safeRegexTest","safeResolvePath","setLogLevel","stringifyDocument","toTransportAssistantBlocks","toolAssistantContentToText","toolResultContentToText","truncateToTokens","validateRegexPattern","validateRequired","warn","withRetry","writeAtomic","writeTextFile"],"entryPoint":"src/utils/index.ts","inputs":{"src/utils/fs.ts":{"bytesInOutput":3994},"src/utils/index.ts":{"bytesInOutput":0},"src/utils/json.ts":{"bytesInOutput":239},"src/utils/yaml.ts":{"bytesInOutput":2639},"src/utils/path-security.ts":{"bytesInOutput":311},"src/utils/platform.ts":{"bytesInOutput":491},"src/utils/validation.ts":{"bytesInOutput":1425},"src/utils/logger.ts":{"bytesInOutput":915},"src/utils/retry.ts":{"bytesInOutput":2918},"src/utils/tokens.ts":{"bytesInOutput":904},"src/utils/cost.ts":{"bytesInOutput":933},"src/utils/clipboard.ts":{"bytesInOutput":601},"src/utils/benchmark-safety.ts":{"bytesInOutput":3090},"src/utils/tool-result-content.ts":{"bytesInOutput":2069},"src/utils/text-security.ts":{"bytesInOutput":180}},"bytes":22467}}}
1
+ {"inputs":{"src/utils/fs.ts":{"bytes":10330,"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/utils/json.ts":{"bytes":842,"imports":[],"format":"esm"},"src/utils/yaml.ts":{"bytes":5668,"imports":[],"format":"esm"},"src/utils/path-security.ts":{"bytes":1024,"imports":[{"path":"path","kind":"import-statement","external":true}],"format":"esm"},"src/utils/platform.ts":{"bytes":1012,"imports":[{"path":"node:os","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true}],"format":"esm"},"src/utils/validation.ts":{"bytes":5519,"imports":[],"format":"esm"},"src/utils/logger.ts":{"bytes":3873,"imports":[],"format":"esm"},"src/utils/retry.ts":{"bytes":9294,"imports":[],"format":"esm"},"src/utils/tokens.ts":{"bytes":3306,"imports":[],"format":"esm"},"src/utils/cost.ts":{"bytes":1876,"imports":[],"format":"esm"},"src/utils/clipboard.ts":{"bytes":1196,"imports":[{"path":"node:child_process","kind":"import-statement","external":true}],"format":"esm"},"src/utils/benchmark-safety.ts":{"bytes":6703,"imports":[],"format":"esm"},"src/utils/tool-result-content.ts":{"bytes":4887,"imports":[],"format":"esm"},"src/utils/text-security.ts":{"bytes":833,"imports":[],"format":"esm"},"src/utils/index.ts":{"bytes":1490,"imports":[{"path":"src/utils/fs.ts","kind":"import-statement","original":"./fs.js"},{"path":"src/utils/json.ts","kind":"import-statement","original":"./json.js"},{"path":"src/utils/yaml.ts","kind":"import-statement","original":"./yaml.js"},{"path":"src/utils/path-security.ts","kind":"import-statement","original":"./path-security.js"},{"path":"src/utils/platform.ts","kind":"import-statement","original":"./platform.js"},{"path":"src/utils/validation.ts","kind":"import-statement","original":"./validation.js"},{"path":"src/utils/logger.ts","kind":"import-statement","original":"./logger.js"},{"path":"src/utils/retry.ts","kind":"import-statement","original":"./retry.js"},{"path":"src/utils/tokens.ts","kind":"import-statement","original":"./tokens.js"},{"path":"src/utils/cost.ts","kind":"import-statement","original":"./cost.js"},{"path":"src/utils/clipboard.ts","kind":"import-statement","original":"./clipboard.js"},{"path":"src/utils/benchmark-safety.ts","kind":"import-statement","original":"./benchmark-safety.js"},{"path":"src/utils/tool-result-content.ts","kind":"import-statement","original":"./tool-result-content.js"},{"path":"src/utils/text-security.ts","kind":"import-statement","original":"./text-security.js"}],"format":"esm"}},"outputs":{"dist/utils/index.js":{"imports":[{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs","kind":"import-statement","external":true},{"path":"node:fs/promises","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"path","kind":"import-statement","external":true},{"path":"node:os","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"node:child_process","kind":"import-statement","external":true}],"exports":["ApiTransientError","HOME_DIR","IS_LINUX","IS_MAC","IS_WINDOWS","LogLevel","OS_VERSION","PLATFORM","accountTextTokens","appendLine","benchmarkLeakError","buildToolResultBlock","buildToolResultText","calculateCost","commandMentionsBenchmarkLeak","conservativeTokenAccountingAdapter","copyTextToClipboard","createSafeRegex","debug","decodeTextBuffer","deleteDir","deleteFile","detectLineEnding","detectPreferredLineEnding","detectTextEncoding","encodeTextBuffer","ensureDir","error","estimateTokens","estimateTokensForModel","existsSync","filterBenchmarkLeakPaths","findSimilarFile","fitsInBudget","formatCost","getBenchmarkReferenceOverwriteHint","getBoolean","getConfigDir","getLogLevel","getNumber","getProjectConfigDir","getRetryErrorContext","getShellName","getString","getToolResultTransportContent","hasDir","hasDisallowedAsciiControlCharacter","hasFile","hasFrontmatter","hasNonTextToolResultContent","info","isBenchmarkLeakPath","isBenchmarkMode","isGitRepo","isPathSafe","isRetryableError","listDirs","listFiles","normalizeLineEndings","parseDocument","parseJsonLines","readFileSafe","readIfExists","readTextFile","remainingBudget","safeJsonParse","safeJsonStringify","safeRegexTest","safeResolvePath","setLogLevel","stringifyDocument","toTransportAssistantBlocks","toolAssistantContentToText","toolResultContentToText","truncateToTokens","validateRegexPattern","validateRequired","warn","withRetry","writeAtomic","writeTextFile"],"entryPoint":"src/utils/index.ts","inputs":{"src/utils/fs.ts":{"bytesInOutput":3994},"src/utils/index.ts":{"bytesInOutput":0},"src/utils/json.ts":{"bytesInOutput":239},"src/utils/yaml.ts":{"bytesInOutput":2639},"src/utils/path-security.ts":{"bytesInOutput":311},"src/utils/platform.ts":{"bytesInOutput":491},"src/utils/validation.ts":{"bytesInOutput":1425},"src/utils/logger.ts":{"bytesInOutput":915},"src/utils/retry.ts":{"bytesInOutput":2918},"src/utils/tokens.ts":{"bytesInOutput":904},"src/utils/cost.ts":{"bytesInOutput":933},"src/utils/clipboard.ts":{"bytesInOutput":601},"src/utils/benchmark-safety.ts":{"bytesInOutput":3090},"src/utils/tool-result-content.ts":{"bytesInOutput":2069},"src/utils/text-security.ts":{"bytesInOutput":180}},"bytes":22467}}}
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) Microsoft Corporation.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE
@@ -1,25 +1,25 @@
1
- # Microsoft MXC native assets
2
-
3
- This directory contains only the seven release-reviewed executables needed by
4
- XENO's containment adapter and Windows host preparation. They were extracted from the integrity-pinned
5
- `@microsoft/mxc-sdk@0.7.0` npm artifact recorded in `package.json`.
6
-
7
- XENO does not execute or redistribute that package's JavaScript wrapper or its
8
- `node-pty`, `node-addon-api`, or `semver` dependency graph. Every executable is
9
- checked against both this manifest and the compiled XENO trust table before it
10
- can be probed or launched.
11
-
12
- The two `wxc-host-prep.exe` assets are invoked only by the explicit
13
- `prepareMxcWindowsHost()` setup API. They apply MXC's idempotent
14
- `prepare-system-drive` and `prepare-null-device` operations from an elevated
15
- host setup context; normal agent execution never attempts to elevate. Windows
16
- 11 on Arm runs the reviewed x64 host-preparation helper through the operating
17
- system's x64 emulation layer because these operations are architecture-neutral
18
- and MXC's ARM64 helper can stall while applying the system-drive metadata ACEs.
19
- The containment runtime itself remains the native ARM64 `wxc-exec.exe`.
20
-
21
- The original Microsoft MIT license is preserved in
22
- `LICENSE.microsoft-mxc-sdk.md`. Presence of these assets is not containment
23
- certification: XENO still requires a candidate-bound, platform-bound, signed
24
- certification and independent reviewer approval before advertising or using
25
- `contained` execution.
1
+ # Microsoft MXC native assets
2
+
3
+ This directory contains only the seven release-reviewed executables needed by
4
+ XENO's containment adapter and Windows host preparation. They were extracted from the integrity-pinned
5
+ `@microsoft/mxc-sdk@0.7.0` npm artifact recorded in `package.json`.
6
+
7
+ XENO does not execute or redistribute that package's JavaScript wrapper or its
8
+ `node-pty`, `node-addon-api`, or `semver` dependency graph. Every executable is
9
+ checked against both this manifest and the compiled XENO trust table before it
10
+ can be probed or launched.
11
+
12
+ The two `wxc-host-prep.exe` assets are invoked only by the explicit
13
+ `prepareMxcWindowsHost()` setup API. They apply MXC's idempotent
14
+ `prepare-system-drive` and `prepare-null-device` operations from an elevated
15
+ host setup context; normal agent execution never attempts to elevate. Windows
16
+ 11 on Arm runs the reviewed x64 host-preparation helper through the operating
17
+ system's x64 emulation layer because these operations are architecture-neutral
18
+ and MXC's ARM64 helper can stall while applying the system-drive metadata ACEs.
19
+ The containment runtime itself remains the native ARM64 `wxc-exec.exe`.
20
+
21
+ The original Microsoft MIT license is preserved in
22
+ `LICENSE.microsoft-mxc-sdk.md`. Presence of these assets is not containment
23
+ certification: XENO still requires a candidate-bound, platform-bound, signed
24
+ certification and independent reviewer approval before advertising or using
25
+ `contained` execution.
File without changes
File without changes
File without changes
@@ -1,58 +1,58 @@
1
- {
2
- "name": "microsoft-mxc-native-assets",
3
- "version": "0.7.0",
4
- "private": true,
5
- "license": "MIT",
6
- "sourcePackage": {
7
- "name": "@microsoft/mxc-sdk",
8
- "version": "0.7.0",
9
- "integrity": "sha512-EWhz2pKkcPluZHAOI1yneV+JK0NO/3hdh7nABBb0x4PjyUWMeSWPTBAjtIu+BhtMYOqlaijSPZMZ0Hs/J4ZL4A==",
10
- "shasum": "561a269b8cb5a4eb7e71fc9158ffd0f74760b640"
11
- },
12
- "assets": [
13
- {
14
- "platform": "win32",
15
- "arch": "x64",
16
- "path": "bin/x64/wxc-exec.exe",
17
- "sha256": "db0a3422be9e1b396cc1b2547c70ff16b27412438a31c10a45abf370cac86ae2"
18
- },
19
- {
20
- "platform": "win32",
21
- "arch": "arm64",
22
- "path": "bin/arm64/wxc-exec.exe",
23
- "sha256": "e430d0e4f44f616e91db684f8d825a6dc93e06a1262b8d00bcaac7522a317aab"
24
- },
25
- {
26
- "platform": "win32",
27
- "arch": "x64",
28
- "purpose": "host-preparation",
29
- "path": "bin/x64/wxc-host-prep.exe",
30
- "sha256": "531fb3cdb4b0c964908fd71b71d40961417afb399cbab72f92a25e95309a6416"
31
- },
32
- {
33
- "platform": "win32",
34
- "arch": "arm64",
35
- "purpose": "host-preparation",
36
- "path": "bin/arm64/wxc-host-prep.exe",
37
- "sha256": "3ef702332286a39153fc259310b5021e3de3c191751d7522684f6475f73af5ef"
38
- },
39
- {
40
- "platform": "linux",
41
- "arch": "x64",
42
- "path": "bin/x64/lxc-exec",
43
- "sha256": "1efe3f817f5ae9ba9f9f2fd59142e79b2dde7a4dd024576b0ddb635fc87edeb5"
44
- },
45
- {
46
- "platform": "linux",
47
- "arch": "arm64",
48
- "path": "bin/arm64/lxc-exec",
49
- "sha256": "fdc00ccecf362ae3ddd8ccad93fd7c8b5b1f03c68897ab05ef1c9f1d327ea3fe"
50
- },
51
- {
52
- "platform": "darwin",
53
- "arch": "arm64",
54
- "path": "bin/arm64/mxc-exec-mac",
55
- "sha256": "77c07a86f483ed91dd5be290cd77878ac0c56fe113cdb8c764e7e5201c744ad2"
56
- }
57
- ]
58
- }
1
+ {
2
+ "name": "microsoft-mxc-native-assets",
3
+ "version": "0.7.0",
4
+ "private": true,
5
+ "license": "MIT",
6
+ "sourcePackage": {
7
+ "name": "@microsoft/mxc-sdk",
8
+ "version": "0.7.0",
9
+ "integrity": "sha512-EWhz2pKkcPluZHAOI1yneV+JK0NO/3hdh7nABBb0x4PjyUWMeSWPTBAjtIu+BhtMYOqlaijSPZMZ0Hs/J4ZL4A==",
10
+ "shasum": "561a269b8cb5a4eb7e71fc9158ffd0f74760b640"
11
+ },
12
+ "assets": [
13
+ {
14
+ "platform": "win32",
15
+ "arch": "x64",
16
+ "path": "bin/x64/wxc-exec.exe",
17
+ "sha256": "db0a3422be9e1b396cc1b2547c70ff16b27412438a31c10a45abf370cac86ae2"
18
+ },
19
+ {
20
+ "platform": "win32",
21
+ "arch": "arm64",
22
+ "path": "bin/arm64/wxc-exec.exe",
23
+ "sha256": "e430d0e4f44f616e91db684f8d825a6dc93e06a1262b8d00bcaac7522a317aab"
24
+ },
25
+ {
26
+ "platform": "win32",
27
+ "arch": "x64",
28
+ "purpose": "host-preparation",
29
+ "path": "bin/x64/wxc-host-prep.exe",
30
+ "sha256": "531fb3cdb4b0c964908fd71b71d40961417afb399cbab72f92a25e95309a6416"
31
+ },
32
+ {
33
+ "platform": "win32",
34
+ "arch": "arm64",
35
+ "purpose": "host-preparation",
36
+ "path": "bin/arm64/wxc-host-prep.exe",
37
+ "sha256": "3ef702332286a39153fc259310b5021e3de3c191751d7522684f6475f73af5ef"
38
+ },
39
+ {
40
+ "platform": "linux",
41
+ "arch": "x64",
42
+ "path": "bin/x64/lxc-exec",
43
+ "sha256": "1efe3f817f5ae9ba9f9f2fd59142e79b2dde7a4dd024576b0ddb635fc87edeb5"
44
+ },
45
+ {
46
+ "platform": "linux",
47
+ "arch": "arm64",
48
+ "path": "bin/arm64/lxc-exec",
49
+ "sha256": "fdc00ccecf362ae3ddd8ccad93fd7c8b5b1f03c68897ab05ef1c9f1d327ea3fe"
50
+ },
51
+ {
52
+ "platform": "darwin",
53
+ "arch": "arm64",
54
+ "path": "bin/arm64/mxc-exec-mac",
55
+ "sha256": "77c07a86f483ed91dd5be290cd77878ac0c56fe113cdb8c764e7e5201c744ad2"
56
+ }
57
+ ]
58
+ }
@@ -1,63 +1,63 @@
1
- # Xeno Clean-Room Contributor Guide
2
-
3
- Status: engineering control draft. Legal counsel approval is required before Xeno makes a public clean-room or proprietary-ownership claim.
4
-
5
- ## Purpose
6
-
7
- This guide governs replacement of third-party implementation code with independently authored Xeno code. It is an engineering provenance control, not legal advice and not proof by itself that a replacement is clean-room work.
8
-
9
- ## Required roles
10
-
11
- - The contract author records behavior from Xeno-owned tests, public standards, public API documentation, and black-box observations.
12
- - The implementer writes the replacement from the approved contract and declared normative sources.
13
- - The provenance reviewer independently reviews the implementation, evidence, and contributor disclosures.
14
- - Counsel determines whether contributor separation or additional review is required for a specific component.
15
-
16
- One person may not approve their own provenance review. High-risk native, codec, parser, and cryptographic work also requires a domain reviewer.
17
-
18
- ## Before implementation
19
-
20
- 1. Create a clean-room implementation record from `templates/clean-room-implementation-record.md`.
21
- 2. Freeze the required behavior and compatibility fixtures before reading implementation source from the component being replaced.
22
- 3. List every normative standard, public API document, Xeno-owned test, and black-box observation used.
23
- 4. Disclose whether each contributor previously inspected the replaced implementation source and when.
24
- 5. Obtain a written role/separation decision for contributors who inspected that source.
25
- 6. Record patents, trademarks, specification licenses, and export-control questions for counsel.
26
-
27
- ## Allowed inputs
28
-
29
- - Published standards whose terms permit the intended use.
30
- - Public API and user documentation used only to define observable behavior.
31
- - Xeno-owned requirements, tests, fixtures, traces, and interoperability captures.
32
- - Black-box behavior measured through a documented harness.
33
- - Operating-system and language-host API documentation for approved platform boundaries.
34
-
35
- ## Prohibited inputs and actions
36
-
37
- - Copying third-party source, comments, tests, identifiers, non-normative constants, or internal architecture.
38
- - Asking an AI model to translate, rewrite, disguise, or recreate third-party source.
39
- - Including third-party source in prompts, tickets, implementation records, fixtures, or generated-code context.
40
- - Claiming clean-room status when source-exposure disclosures or counsel review are incomplete.
41
- - Using a compatibility result as evidence of independent authorship.
42
-
43
- ## During implementation
44
-
45
- 1. Keep the implementation record current with design decisions and source citations.
46
- 2. Add conformance, malformed-input, resource-limit, and fuzz tests appropriate to the surface.
47
- 3. Record any behavior that differs from the frozen contract and obtain an explicit versioning decision.
48
- 4. Keep generated artifacts traceable to Xeno-owned source and the approved build process.
49
- 5. Stop and escalate if an undeclared source, copied fragment, or provenance ambiguity is discovered.
50
-
51
- AI-generated contributions follow the same rules. Prompts must request independent, standards-based implementation and must be retained or summarized in the implementation record without sensitive user data.
52
-
53
- ## Required completion evidence
54
-
55
- - Completed clean-room implementation record.
56
- - Completed independent provenance review.
57
- - Contributor source-exposure disclosures and counsel disposition.
58
- - Contract fixtures and conformance results.
59
- - Fuzz and security evidence where required.
60
- - Ownership inventory, bundle graph, native hashes, SBOM, and clean-install report for the candidate release.
61
- - Commit or source revision and reviewer identities.
62
-
63
- The ownership capability gate remains false until all required evidence exists and the designated reviewer signs the provenance record. Public ownership language additionally requires counsel and product approval.
1
+ # Xeno Clean-Room Contributor Guide
2
+
3
+ Status: engineering control draft. Legal counsel approval is required before Xeno makes a public clean-room or proprietary-ownership claim.
4
+
5
+ ## Purpose
6
+
7
+ This guide governs replacement of third-party implementation code with independently authored Xeno code. It is an engineering provenance control, not legal advice and not proof by itself that a replacement is clean-room work.
8
+
9
+ ## Required roles
10
+
11
+ - The contract author records behavior from Xeno-owned tests, public standards, public API documentation, and black-box observations.
12
+ - The implementer writes the replacement from the approved contract and declared normative sources.
13
+ - The provenance reviewer independently reviews the implementation, evidence, and contributor disclosures.
14
+ - Counsel determines whether contributor separation or additional review is required for a specific component.
15
+
16
+ One person may not approve their own provenance review. High-risk native, codec, parser, and cryptographic work also requires a domain reviewer.
17
+
18
+ ## Before implementation
19
+
20
+ 1. Create a clean-room implementation record from `templates/clean-room-implementation-record.md`.
21
+ 2. Freeze the required behavior and compatibility fixtures before reading implementation source from the component being replaced.
22
+ 3. List every normative standard, public API document, Xeno-owned test, and black-box observation used.
23
+ 4. Disclose whether each contributor previously inspected the replaced implementation source and when.
24
+ 5. Obtain a written role/separation decision for contributors who inspected that source.
25
+ 6. Record patents, trademarks, specification licenses, and export-control questions for counsel.
26
+
27
+ ## Allowed inputs
28
+
29
+ - Published standards whose terms permit the intended use.
30
+ - Public API and user documentation used only to define observable behavior.
31
+ - Xeno-owned requirements, tests, fixtures, traces, and interoperability captures.
32
+ - Black-box behavior measured through a documented harness.
33
+ - Operating-system and language-host API documentation for approved platform boundaries.
34
+
35
+ ## Prohibited inputs and actions
36
+
37
+ - Copying third-party source, comments, tests, identifiers, non-normative constants, or internal architecture.
38
+ - Asking an AI model to translate, rewrite, disguise, or recreate third-party source.
39
+ - Including third-party source in prompts, tickets, implementation records, fixtures, or generated-code context.
40
+ - Claiming clean-room status when source-exposure disclosures or counsel review are incomplete.
41
+ - Using a compatibility result as evidence of independent authorship.
42
+
43
+ ## During implementation
44
+
45
+ 1. Keep the implementation record current with design decisions and source citations.
46
+ 2. Add conformance, malformed-input, resource-limit, and fuzz tests appropriate to the surface.
47
+ 3. Record any behavior that differs from the frozen contract and obtain an explicit versioning decision.
48
+ 4. Keep generated artifacts traceable to Xeno-owned source and the approved build process.
49
+ 5. Stop and escalate if an undeclared source, copied fragment, or provenance ambiguity is discovered.
50
+
51
+ AI-generated contributions follow the same rules. Prompts must request independent, standards-based implementation and must be retained or summarized in the implementation record without sensitive user data.
52
+
53
+ ## Required completion evidence
54
+
55
+ - Completed clean-room implementation record.
56
+ - Completed independent provenance review.
57
+ - Contributor source-exposure disclosures and counsel disposition.
58
+ - Contract fixtures and conformance results.
59
+ - Fuzz and security evidence where required.
60
+ - Ownership inventory, bundle graph, native hashes, SBOM, and clean-install report for the candidate release.
61
+ - Commit or source revision and reviewer identities.
62
+
63
+ The ownership capability gate remains false until all required evidence exists and the designated reviewer signs the provenance record. Public ownership language additionally requires counsel and product approval.
@@ -7,11 +7,12 @@ import {
7
7
  mkdirSync,
8
8
  readFileSync,
9
9
  readdirSync,
10
+ realpathSync,
10
11
  writeFileSync,
11
12
  } from "node:fs";
12
13
  import { builtinModules } from "node:module";
13
14
  import { dirname, extname, isAbsolute, join, relative, resolve } from "node:path";
14
- import { fileURLToPath, pathToFileURL } from "node:url";
15
+ import { fileURLToPath } from "node:url";
15
16
 
16
17
  const CLASSIFICATIONS = new Set([
17
18
  "xeno-owned",
@@ -718,8 +719,38 @@ async function main() {
718
719
  if (report.violations.length > 0) process.exitCode = 1;
719
720
  }
720
721
 
721
- const invokedPath = process.argv[1] ? pathToFileURL(resolve(process.argv[1])).href : undefined;
722
- if (invokedPath === import.meta.url) {
722
+ /**
723
+ * 🔴 Compare REAL paths. `resolve` normalises; it does not follow symlinks.
724
+ *
725
+ * This file SHIPS: `files` in package.json lists `ownership`, in BOTH packages that carry it. So
726
+ * the lexical form is the idiom that made `@xenosystem/agent-cli` 0.5.17 exit 0 for every command
727
+ * on Linux and macOS — and stayed shipped for a full release — sitting in code that reaches users.
728
+ *
729
+ * It is not broken today because nothing symlinks this path, which is precisely the state the
730
+ * 0.5.17 entry was in until npm made its bin a symlink.
731
+ *
732
+ * ⚠️ Resolution can throw — the invoked path may be gone, and some mounts refuse it — so failure
733
+ * falls back to the LEXICAL comparison, never to `false`. Returning false on error would
734
+ * reintroduce the silent no-op through a different door.
735
+ *
736
+ * Reference: `xeno-agent-cli/apps/xeno-agent-cli/src/cli/direct-invocation.ts`, the tested version.
737
+ *
738
+ * ⚠️ This comment is deliberately generic. The first fix wrote a repo-specific note into each
739
+ * copy and broke the byte-identical rule stated at the top of this file within minutes of applying
740
+ * it — which is the drift that rule exists to prevent.
741
+ */
742
+ function isDirectInvocation() {
743
+ const invoked = process.argv[1];
744
+ if (!invoked) return false;
745
+ const modulePath = fileURLToPath(import.meta.url);
746
+ try {
747
+ return realpathSync(resolve(invoked)) === realpathSync(modulePath);
748
+ } catch {
749
+ return resolve(invoked) === resolve(modulePath);
750
+ }
751
+ }
752
+
753
+ if (isDirectInvocation()) {
723
754
  main().catch((error) => {
724
755
  console.error(error instanceof Error ? error.message : String(error));
725
756
  process.exitCode = 1;