@quolu/lattice 0.72.0 → 0.72.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quolu/lattice",
3
- "version": "0.72.0",
3
+ "version": "0.72.1",
4
4
  "description": "Schedulability compiler for multi-agent development: observe real code boundaries, refactor the conflicting seam, recompile the plan for parallel execution",
5
5
  "author": {
6
6
  "name": "Quo / クオ at kitepon.dev",
@@ -45,6 +45,9 @@ const COMMAND_KIND = /^[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)?$/;
45
45
  const COMMAND_KIND_MAX = 48;
46
46
  // Nodeが付けるerror code(ENOENT・ERR_MODULE_NOT_FOUND等)だけを通す。Lattice自身のcodeや任意文字列は`none`。
47
47
  const CAUSE_CODE = /^(?:E[A-Z0-9]{2,15}|ERR_[A-Z0-9_]{1,60})$/;
48
+ // 工場の`factory-reporter.json`が名乗る端末の種類。dotagentsの契約(lib/factory/contract.mjs)と同じ語を
49
+ // 受ける——ここに無い語の端末は設定全体が無効とみなされ、故障を1件も記録しない。
50
+ const HOST_PROFILES = Object.freeze(['server', 'mac', 'linux', 'wsl', 'windows-native']);
48
51
 
49
52
  const plain = (value) => typeof value === 'object' && value !== null && !Array.isArray(value);
50
53
  const exact = (value, keys) => Object.keys(value).length === keys.length && keys.every((key) => Object.hasOwn(value, key));
@@ -83,7 +86,7 @@ function collectionEnabled(options = {}) {
83
86
  return plain(config) && exact(config, ['schema_version', 'host', 'collection', 'reporting'])
84
87
  && config.schema_version === '1.0' && plain(config.host) && exact(config.host, ['id', 'profile'])
85
88
  && typeof config.host.id === 'string' && /^[a-z0-9][a-z0-9._-]{0,63}$/.test(config.host.id)
86
- && ['server', 'mac', 'wsl', 'windows-native'].includes(config.host.profile)
89
+ && HOST_PROFILES.includes(config.host.profile)
87
90
  && plain(config.collection) && exact(config.collection, ['enabled']) && config.collection.enabled === true
88
91
  && canonicalReporting(config.reporting);
89
92
  } catch {