@xemahq/worker-runtime-opencode 0.7.0 → 0.8.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/dist/index.d.ts CHANGED
@@ -3,7 +3,8 @@ export { createOpencodeWorkerRuntimeAdapter } from './lib/factory';
3
3
  export { compileOpencodeRuntimeProfile } from './lib/runtime-profile-compiler';
4
4
  export { buildOpenCodeCompaction, deriveOpenCodeCompaction, deriveOpenCodeCompactionReserve, type OpenCodeCompactionConfig, } from './lib/compaction-policy';
5
5
  export { OPENCODE_RUNTIME_PROFILE_SETTING_DEFAULTS, resolveOpencodeRuntimeProfileSettings, type OpencodeAuthoredRuntimeProfileSettings, } from './lib/runtime-profile';
6
- export { OPENCODE_NATIVE_PERMISSION_REFS, OpencodeRuntimeProfileSchema, type OpencodeNativePermissionRef, type OpencodeRuntimeProfileSettings, } from './lib/runtime-profile';
6
+ export { OPENCODE_AUTHORED_COMPACTION_KEYS, OPENCODE_AUTHORED_SETTINGS_KEYS, OPENCODE_EXCLUDED_NATIVE_PERMISSION_REFS, OPENCODE_NATIVE_PERMISSION_REFS, OPENCODE_RETIRED_COMPACTION_KEYS, OpencodeRuntimeProfileSchema, type OpencodeNativePermissionRef, type OpencodeRuntimeProfileSettings, } from './lib/runtime-profile';
7
+ export { assertDropArmApplies, collectOpencodeRuntimeProfileDiagnostics, } from './lib/runtime-profile-diagnostics';
7
8
  export { buildOpencodeSessionBundle, computeSessionBindingRevision, computeStaticBundleFingerprint, decodeOpencodeSessionBundle, type OpencodeBundleSubAgent, type OpencodeSessionBundlePayload, } from './lib/session-bundle';
8
9
  export type { BundleCallerContext, OpencodeRuntimeConfig, WorkerRef, } from './lib/worker-ref';
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,EACvB,KAAK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EAChC,KAAK,8BAA8B,GACpC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,oBAAoB,EACpB,wCAAwC,GACzC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,EAC7B,8BAA8B,EAC9B,2BAA2B,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,4BAA4B,GAClC,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,mBAAmB,EACnB,qBAAqB,EACrB,SAAS,GACV,MAAM,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.decodeOpencodeSessionBundle = exports.computeStaticBundleFingerprint = exports.computeSessionBindingRevision = exports.buildOpencodeSessionBundle = exports.OpencodeRuntimeProfileSchema = exports.OPENCODE_NATIVE_PERMISSION_REFS = exports.resolveOpencodeRuntimeProfileSettings = exports.OPENCODE_RUNTIME_PROFILE_SETTING_DEFAULTS = exports.deriveOpenCodeCompactionReserve = exports.deriveOpenCodeCompaction = exports.buildOpenCodeCompaction = exports.compileOpencodeRuntimeProfile = exports.createOpencodeWorkerRuntimeAdapter = exports.OPENCODE_CONNECTOR_KIND = exports.OpencodeWorkerRuntimeAdapter = void 0;
3
+ exports.decodeOpencodeSessionBundle = exports.computeStaticBundleFingerprint = exports.computeSessionBindingRevision = exports.buildOpencodeSessionBundle = exports.collectOpencodeRuntimeProfileDiagnostics = exports.assertDropArmApplies = exports.OpencodeRuntimeProfileSchema = exports.OPENCODE_RETIRED_COMPACTION_KEYS = exports.OPENCODE_NATIVE_PERMISSION_REFS = exports.OPENCODE_EXCLUDED_NATIVE_PERMISSION_REFS = exports.OPENCODE_AUTHORED_SETTINGS_KEYS = exports.OPENCODE_AUTHORED_COMPACTION_KEYS = exports.resolveOpencodeRuntimeProfileSettings = exports.OPENCODE_RUNTIME_PROFILE_SETTING_DEFAULTS = exports.deriveOpenCodeCompactionReserve = exports.deriveOpenCodeCompaction = exports.buildOpenCodeCompaction = exports.compileOpencodeRuntimeProfile = exports.createOpencodeWorkerRuntimeAdapter = exports.OPENCODE_CONNECTOR_KIND = exports.OpencodeWorkerRuntimeAdapter = void 0;
4
4
  var opencode_worker_runtime_1 = require("./lib/opencode-worker-runtime");
5
5
  Object.defineProperty(exports, "OpencodeWorkerRuntimeAdapter", { enumerable: true, get: function () { return opencode_worker_runtime_1.OpencodeWorkerRuntimeAdapter; } });
6
6
  Object.defineProperty(exports, "OPENCODE_CONNECTOR_KIND", { enumerable: true, get: function () { return opencode_worker_runtime_1.OPENCODE_CONNECTOR_KIND; } });
@@ -16,8 +16,15 @@ var runtime_profile_1 = require("./lib/runtime-profile");
16
16
  Object.defineProperty(exports, "OPENCODE_RUNTIME_PROFILE_SETTING_DEFAULTS", { enumerable: true, get: function () { return runtime_profile_1.OPENCODE_RUNTIME_PROFILE_SETTING_DEFAULTS; } });
17
17
  Object.defineProperty(exports, "resolveOpencodeRuntimeProfileSettings", { enumerable: true, get: function () { return runtime_profile_1.resolveOpencodeRuntimeProfileSettings; } });
18
18
  var runtime_profile_2 = require("./lib/runtime-profile");
19
+ Object.defineProperty(exports, "OPENCODE_AUTHORED_COMPACTION_KEYS", { enumerable: true, get: function () { return runtime_profile_2.OPENCODE_AUTHORED_COMPACTION_KEYS; } });
20
+ Object.defineProperty(exports, "OPENCODE_AUTHORED_SETTINGS_KEYS", { enumerable: true, get: function () { return runtime_profile_2.OPENCODE_AUTHORED_SETTINGS_KEYS; } });
21
+ Object.defineProperty(exports, "OPENCODE_EXCLUDED_NATIVE_PERMISSION_REFS", { enumerable: true, get: function () { return runtime_profile_2.OPENCODE_EXCLUDED_NATIVE_PERMISSION_REFS; } });
19
22
  Object.defineProperty(exports, "OPENCODE_NATIVE_PERMISSION_REFS", { enumerable: true, get: function () { return runtime_profile_2.OPENCODE_NATIVE_PERMISSION_REFS; } });
23
+ Object.defineProperty(exports, "OPENCODE_RETIRED_COMPACTION_KEYS", { enumerable: true, get: function () { return runtime_profile_2.OPENCODE_RETIRED_COMPACTION_KEYS; } });
20
24
  Object.defineProperty(exports, "OpencodeRuntimeProfileSchema", { enumerable: true, get: function () { return runtime_profile_2.OpencodeRuntimeProfileSchema; } });
25
+ var runtime_profile_diagnostics_1 = require("./lib/runtime-profile-diagnostics");
26
+ Object.defineProperty(exports, "assertDropArmApplies", { enumerable: true, get: function () { return runtime_profile_diagnostics_1.assertDropArmApplies; } });
27
+ Object.defineProperty(exports, "collectOpencodeRuntimeProfileDiagnostics", { enumerable: true, get: function () { return runtime_profile_diagnostics_1.collectOpencodeRuntimeProfileDiagnostics; } });
21
28
  var session_bundle_1 = require("./lib/session-bundle");
22
29
  Object.defineProperty(exports, "buildOpencodeSessionBundle", { enumerable: true, get: function () { return session_bundle_1.buildOpencodeSessionBundle; } });
23
30
  Object.defineProperty(exports, "computeSessionBindingRevision", { enumerable: true, get: function () { return session_bundle_1.computeSessionBindingRevision; } });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AASA,yEAIuC;AAHrC,uIAAA,4BAA4B,OAAA;AAC5B,kIAAA,uBAAuB,OAAA;AAGzB,yCAAmE;AAA1D,6HAAA,kCAAkC,OAAA;AAC3C,2EAA+E;AAAtE,yIAAA,6BAA6B,OAAA;AACtC,6DAKiC;AAJ/B,4HAAA,uBAAuB,OAAA;AACvB,6HAAA,wBAAwB,OAAA;AACxB,oIAAA,+BAA+B,OAAA;AAGjC,yDAI+B;AAH7B,4IAAA,yCAAyC,OAAA;AACzC,wIAAA,qCAAqC,OAAA;AAGvC,yDAK+B;AAJ7B,kIAAA,+BAA+B,OAAA;AAC/B,+HAAA,4BAA4B,OAAA;AAI9B,uDAO8B;AAN5B,4HAAA,0BAA0B,OAAA;AAC1B,+HAAA,6BAA6B,OAAA;AAC7B,gIAAA,8BAA8B,OAAA;AAC9B,6HAAA,2BAA2B,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AASA,yEAIuC;AAHrC,uIAAA,4BAA4B,OAAA;AAC5B,kIAAA,uBAAuB,OAAA;AAGzB,yCAAmE;AAA1D,6HAAA,kCAAkC,OAAA;AAC3C,2EAA+E;AAAtE,yIAAA,6BAA6B,OAAA;AACtC,6DAKiC;AAJ/B,4HAAA,uBAAuB,OAAA;AACvB,6HAAA,wBAAwB,OAAA;AACxB,oIAAA,+BAA+B,OAAA;AAGjC,yDAI+B;AAH7B,4IAAA,yCAAyC,OAAA;AACzC,wIAAA,qCAAqC,OAAA;AAGvC,yDAS+B;AAR7B,oIAAA,iCAAiC,OAAA;AACjC,kIAAA,+BAA+B,OAAA;AAC/B,2IAAA,wCAAwC,OAAA;AACxC,kIAAA,+BAA+B,OAAA;AAC/B,mIAAA,gCAAgC,OAAA;AAChC,+HAAA,4BAA4B,OAAA;AAI9B,iFAG2C;AAFzC,mIAAA,oBAAoB,OAAA;AACpB,uJAAA,wCAAwC,OAAA;AAE1C,uDAO8B;AAN5B,4HAAA,0BAA0B,OAAA;AAC1B,+HAAA,6BAA6B,OAAA;AAC7B,gIAAA,8BAA8B,OAAA;AAC9B,6HAAA,2BAA2B,OAAA"}
@@ -0,0 +1,4 @@
1
+ import { type RuntimeNativePermissionPolicy, type RuntimeProfileContent, type RuntimeProfileDiagnostic } from '@xemahq/kernel-contracts/worker-runtime';
2
+ export declare function assertDropArmApplies(policy: RuntimeNativePermissionPolicy): void;
3
+ export declare function collectOpencodeRuntimeProfileDiagnostics(profile: RuntimeProfileContent): readonly RuntimeProfileDiagnostic[];
4
+ //# sourceMappingURL=runtime-profile-diagnostics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-profile-diagnostics.d.ts","sourceRoot":"","sources":["../../src/lib/runtime-profile-diagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,6BAA6B,EAClC,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC9B,MAAM,yCAAyC,CAAC;AAmFjD,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,6BAA6B,GACpC,IAAI,CASN;AAsBD,wBAAgB,wCAAwC,CACtD,OAAO,EAAE,qBAAqB,GAC7B,SAAS,wBAAwB,EAAE,CAyDrC"}
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.assertDropArmApplies = assertDropArmApplies;
4
+ exports.collectOpencodeRuntimeProfileDiagnostics = collectOpencodeRuntimeProfileDiagnostics;
5
+ const worker_runtime_1 = require("@xemahq/kernel-contracts/worker-runtime");
6
+ const runtime_profile_1 = require("./runtime-profile");
7
+ const POLICY_KIND_DROP_IS_NARROWING = Object.freeze({
8
+ 'deny-all-except': true,
9
+ });
10
+ function assertDropArmApplies(policy) {
11
+ if (POLICY_KIND_DROP_IS_NARROWING[policy.kind] !== true) {
12
+ throw new TypeError(`Native permission policy "${policy.kind}" does not deny by default, so ` +
13
+ 'dropping an unrecognised entry would WIDEN what the agent may do. ' +
14
+ 'Classify this discriminator in POLICY_KIND_DROP_IS_NARROWING before ' +
15
+ 'the drop arm may apply to it.');
16
+ }
17
+ }
18
+ function diagnostic(input) {
19
+ return Object.freeze({ ...input, runtimeKind: worker_runtime_1.WorkerRuntimeKind.Opencode });
20
+ }
21
+ function collectOpencodeRuntimeProfileDiagnostics(profile) {
22
+ assertDropArmApplies(profile.nativePermissionPolicy);
23
+ const diagnostics = [];
24
+ profile.nativePermissionPolicy.entries.forEach((entry, index) => {
25
+ if ((0, runtime_profile_1.isOpencodeNativePermissionRef)(entry.nativeToolRef)) {
26
+ return;
27
+ }
28
+ const excluded = Object.hasOwn(runtime_profile_1.OPENCODE_EXCLUDED_NATIVE_PERMISSION_REFS, entry.nativeToolRef)
29
+ ? runtime_profile_1.OPENCODE_EXCLUDED_NATIVE_PERMISSION_REFS[entry.nativeToolRef]
30
+ : undefined;
31
+ diagnostics.push(diagnostic({
32
+ code: worker_runtime_1.RuntimeProfileDiagnosticCode.UnknownNativeToolRef,
33
+ cause: excluded === undefined
34
+ ? worker_runtime_1.RuntimeProfileDiagnosticCause.UnknownToRuntime
35
+ : worker_runtime_1.RuntimeProfileDiagnosticCause.RetiredByPlatform,
36
+ subject: entry.nativeToolRef,
37
+ path: ['nativePermissionPolicy', 'entries', index, 'nativeToolRef'],
38
+ authoredValueDropped: true,
39
+ message: excluded ??
40
+ `OpenCode does not expose native tool "${entry.nativeToolRef}", so the ` +
41
+ `authored decision "${entry.decision}" was dropped. The tool remains ` +
42
+ 'DENIED by the deny-all-except catch-all. Two things produce this, and ' +
43
+ 'they are indistinguishable from here: upstream renamed or removed the ' +
44
+ 'tool — re-author under the new ref — or the ref is a Xema capability ' +
45
+ 'or an MCP tool, which are authorized by the capability funnel and are ' +
46
+ 'never OpenCode native permissions.',
47
+ }));
48
+ });
49
+ const settings = profile.settings;
50
+ collectUnknownSettingKeys(settings, runtime_profile_1.OPENCODE_AUTHORED_SETTINGS_KEYS, ['settings'], {}, diagnostics);
51
+ collectDefaulted(settings, 'snapshot', ['settings'], diagnostics);
52
+ const compaction = isRecord(settings.compaction) ? settings.compaction : undefined;
53
+ if (compaction !== undefined) {
54
+ collectUnknownSettingKeys(compaction, runtime_profile_1.OPENCODE_AUTHORED_COMPACTION_KEYS, ['settings', 'compaction'], runtime_profile_1.OPENCODE_RETIRED_COMPACTION_KEYS, diagnostics);
55
+ }
56
+ for (const key of runtime_profile_1.OPENCODE_AUTHORED_COMPACTION_KEYS) {
57
+ collectDefaulted(compaction ?? {}, key, ['settings', 'compaction'], diagnostics);
58
+ }
59
+ return Object.freeze(diagnostics);
60
+ }
61
+ function collectUnknownSettingKeys(value, known, path, retired, sink) {
62
+ const vocabulary = new Set(known);
63
+ for (const key of Object.keys(value)) {
64
+ if (vocabulary.has(key)) {
65
+ continue;
66
+ }
67
+ const retirement = Object.hasOwn(retired, key) ? retired[key] : undefined;
68
+ sink.push(diagnostic({
69
+ code: worker_runtime_1.RuntimeProfileDiagnosticCode.UnknownSettingKey,
70
+ cause: retirement === undefined
71
+ ? worker_runtime_1.RuntimeProfileDiagnosticCause.UnknownToRuntime
72
+ : worker_runtime_1.RuntimeProfileDiagnosticCause.RetiredByPlatform,
73
+ subject: key,
74
+ path: [...path, key],
75
+ authoredValueDropped: true,
76
+ message: retirement ??
77
+ `OpenCode no longer exposes setting "${key}", so the authored value ` +
78
+ "was dropped and the runtime's own default applies. Re-author this " +
79
+ 'profile if the setting was renamed.',
80
+ }));
81
+ }
82
+ }
83
+ function collectDefaulted(value, key, path, sink) {
84
+ if (value[key] !== undefined) {
85
+ return;
86
+ }
87
+ sink.push(diagnostic({
88
+ code: worker_runtime_1.RuntimeProfileDiagnosticCode.SettingDefaulted,
89
+ cause: worker_runtime_1.RuntimeProfileDiagnosticCause.Unauthored,
90
+ subject: key,
91
+ path: [...path, key],
92
+ authoredValueDropped: false,
93
+ message: `OpenCode setting "${key}" was not authored; the platform default ` +
94
+ 'applies.',
95
+ }));
96
+ }
97
+ function isRecord(value) {
98
+ return value !== null && typeof value === 'object' && !Array.isArray(value);
99
+ }
100
+ //# sourceMappingURL=runtime-profile-diagnostics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-profile-diagnostics.js","sourceRoot":"","sources":["../../src/lib/runtime-profile-diagnostics.ts"],"names":[],"mappings":";;AA0FA,oDAWC;AAsBD,4FA2DC;AAtLD,4EAOiD;AAEjD,uDAM2B;AA4D3B,MAAM,6BAA6B,GAE/B,MAAM,CAAC,MAAM,CAAC;IAChB,iBAAiB,EAAE,IAAI;CACxB,CAAC,CAAC;AAWH,SAAgB,oBAAoB,CAClC,MAAqC;IAErC,IAAI,6BAA6B,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;QACxD,MAAM,IAAI,SAAS,CACjB,6BAA6B,MAAM,CAAC,IAAI,iCAAiC;YACvE,oEAAoE;Y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ProfileSettings;
19
19
  export declare function resolveOpencodeRuntimeProfileSettings(authored: OpencodeAuthoredRuntimeProfileSettings): OpencodeRuntimeProfileSettings;
20
+ export declare const OPENCODE_AUTHORED_SETTINGS_KEYS: readonly ["compaction", "snapshot"];
21
+ export declare const OPENCODE_AUTHORED_COMPACTION_KEYS: readonly ["auto", "prune"];
22
+ export declare const OPENCODE_EXCLUDED_NATIVE_PERMISSION_REFS: Readonly<Record<string, string>>;
20
23
  export declare function isOpencodeNativePermissionRef(value: string): value is OpencodeNativePermissionRef;
21
24
  export declare const OpencodeRuntimeProfileSchema: RuntimeProfileSchema;
25
+ export declare const OPENCODE_RETIRED_COMPACTION_KEYS: Readonly<Record<string, string>>;
22
26
  //# sourceMappingURL=runtime-profile.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-profile.d.ts","sourceRoot":"","sources":["../../src/lib/runtime-profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,yCAAyC,CAAC;AAWjD,eAAO,MAAM,+BAA+B,0IAclC,CAAC;AAEX,MAAM,MAAM,2BAA2B,GACrC,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,CAAC,CAAC;AASnD,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE;QACnB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;QACvB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;KACzB,CAAC;CACH;AA4CD,MAAM,WAAW,sCAAsC;IACrD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE;QACpB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;QACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;KAC1B,CAAC;CACH;AAiBD,eAAO,MAAM,yCAAyC,EAAE,8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wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,MAAM,GACZ,KAAK,IAAI,2BAA2B,CAEtC;AAyDD,eAAO,MAAM,4BAA4B,EAAE,oBAkBvC,CAAC;AAgDL,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CACrD,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAKtB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OpencodeRuntimeProfileSchema = exports.OPENCODE_RUNTIME_PROFILE_SETTING_DEFAULTS = exports.OPENCODE_NATIVE_PERMISSION_REFS = void 0;
3
+ exports.OPENCODE_RETIRED_COMPACTION_KEYS = exports.OpencodeRuntimeProfileSchema = exports.OPENCODE_EXCLUDED_NATIVE_PERMISSION_REFS = exports.OPENCODE_AUTHORED_COMPACTION_KEYS = exports.OPENCODE_AUTHORED_SETTINGS_KEYS = exports.OPENCODE_RUNTIME_PROFILE_SETTING_DEFAULTS = exports.OPENCODE_NATIVE_PERMISSION_REFS = void 0;
4
4
  exports.resolveOpencodeRuntimeProfileSettings = resolveOpencodeRuntimeProfileSettings;
5
5
  exports.isOpencodeNativePermissionRef = isOpencodeNativePermissionRef;
6
6
  const worker_runtime_1 = require("@xemahq/kernel-contracts/worker-runtime");
@@ -33,8 +33,13 @@ function resolveOpencodeRuntimeProfileSettings(authored) {
33
33
  },
34
34
  };
35
35
  }
36
- const SETTINGS_KEYS = ['compaction', 'snapshot'];
37
- const COMPACTION_KEYS = ['auto', 'prune'];
36
+ exports.OPENCODE_AUTHORED_SETTINGS_KEYS = ['compaction', 'snapshot'];
37
+ exports.OPENCODE_AUTHORED_COMPACTION_KEYS = ['auto', 'prune'];
38
+ exports.OPENCODE_EXCLUDED_NATIVE_PERMISSION_REFS = Object.freeze({
39
+ external_directory: 'external_directory is deliberately not governed by a RuntimeProfile: filesystem reach is ' +
40
+ 'ENVIRONMENT authority, decided by the workspace mount, not a runtime preference. The ' +
41
+ 'authored decision was dropped and the subject stays denied by the catch-all.',
42
+ });
38
43
  const NATIVE_PERMISSION_REF_SET = new Set(exports.OPENCODE_NATIVE_PERMISSION_REFS);
39
44
  function isOpencodeNativePermissionRef(value) {
40
45
  return NATIVE_PERMISSION_REF_SET.has(value);
@@ -44,17 +49,8 @@ exports.OpencodeRuntimeProfileSchema = worker_runtime_1.RuntimeProfileContentSch
44
49
  addIssue(context, ['runtimeKind'], `OpenCode adapter requires runtimeKind "${worker_runtime_1.WorkerRuntimeKind.Opencode}".`);
45
50
  }
46
51
  addSettingsIssues(profile.settings, context);
47
- for (let index = 0; index < profile.nativePermissionPolicy.entries.length; index += 1) {
48
- const entry = profile.nativePermissionPolicy.entries[index];
49
- if (entry !== undefined &&
50
- !isOpencodeNativePermissionRef(entry.nativeToolRef)) {
51
- addIssue(context, ['nativePermissionPolicy', 'entries', index, 'nativeToolRef'], `Unsupported OpenCode native permission ref "${entry.nativeToolRef}". ` +
52
- 'Xema capabilities and MCP tools are not OpenCode native permissions.');
53
- }
54
- }
55
52
  });
56
53
  function addSettingsIssues(settings, context) {
57
- addUnknownKeyIssues(settings, SETTINGS_KEYS, ['settings'], context);
58
54
  if (Object.hasOwn(settings, 'snapshot') && typeof settings.snapshot !== 'boolean') {
59
55
  addIssue(context, ['settings', 'snapshot'], 'snapshot must be a boolean.');
60
56
  }
@@ -66,29 +62,16 @@ function addSettingsIssues(settings, context) {
66
62
  return;
67
63
  }
68
64
  const compaction = settings.compaction;
69
- addUnknownKeyIssues(compaction, COMPACTION_KEYS, ['settings', 'compaction'], context, RETIRED_COMPACTION_KEYS);
70
65
  for (const key of ['auto', 'prune']) {
71
66
  if (Object.hasOwn(compaction, key) && typeof compaction[key] !== 'boolean') {
72
67
  addIssue(context, ['settings', 'compaction', key], `${key} must be a boolean.`);
73
68
  }
74
69
  }
75
70
  }
76
- const RETIRED_COMPACTION_KEYS = {
71
+ exports.OPENCODE_RETIRED_COMPACTION_KEYS = Object.freeze({
77
72
  reservedTokens: 'reservedTokens is no longer authored: the compaction reserve is derived per session ' +
78
73
  "from the primary model's context window, which a profile author cannot know. Remove the key.",
79
- };
80
- function addUnknownKeyIssues(value, expectedKeys, path, context, retiredKeys = {}) {
81
- const expected = new Set(expectedKeys);
82
- for (const key of Object.keys(value)) {
83
- if (expected.has(key)) {
84
- continue;
85
- }
86
- const retired = Object.hasOwn(retiredKeys, key)
87
- ? retiredKeys[key]
88
- : undefined;
89
- addIssue(context, [...path, key], retired ?? `Unknown OpenCode setting "${key}".`);
90
- }
91
- }
74
+ });
92
75
  function addIssue(context, path, message) {
93
76
  context.addIssue({ code: 'custom', path: [...path], message });
94
77
  }
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-profile.js","sourceRoot":"","sources":["../../src/lib/runtime-profile.ts"],"names":[],"mappings":";;;AAoIA,sFAWC;AAQD,sEAIC;AA3JD,4EAIiD;AAWpC,QAAA,+BAA+B,GAAG;IAC7C,MAAM;IACN,WAAW;IACX,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,UAAU;IACV,MAAM;IACN,OAAO;IACP,MAAM;IACN,WAAW;IACX,UAAU;IACV,WAAW;CACH,CAAC;AAqFE,QAAA,yCAAyC,GACpD,MAAM,CAAC,MAAM,CAAC;IACZ,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;CACvD,CAAC,CAAC;AAcL,SAAgB,qCAAqC,CACnD,QAAgD;IAEhD,MAAM,QAAQ,GAAG,iDAAyC,CAAC;IAC3D,OAAO;QACL,QAAQ,EAAE,QAAQ,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ;QAChD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ,CAAC,UAAU,EAAE,IAAI,IAAI,QAAQ,CAAC,UAAU,CAAC,IAAI;YAC3D,KAAK,EAAE,QAAQ,CAAC,UAAU,EAAE,KA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AEf,OAAO,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;AACjE,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xemahq/worker-runtime-opencode",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Opencode WorkerRuntime driver — wraps the workspace-proxy control-session handshake and the opencode SSE event stream behind the kernel WorkerRuntime contract.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Neuralchowder Inc. <developer@xema.dev> (https://xema.dev)",
@@ -27,7 +27,7 @@
27
27
  "prettier": "3.6.2",
28
28
  "ts-jest": "^29.4.9",
29
29
  "typescript": "5.9.3",
30
- "@xemahq/kernel-contracts": "^29.2.0"
30
+ "@xemahq/kernel-contracts": "^33.5.0"
31
31
  },
32
32
  "exports": {
33
33
  ".": {
@@ -41,7 +41,7 @@
41
41
  }
42
42
  },
43
43
  "peerDependencies": {
44
- "@xemahq/kernel-contracts": ">=12.0.0"
44
+ "@xemahq/kernel-contracts": ">=33.5.0"
45
45
  },
46
46
  "scripts": {
47
47
  "clean": "rm -rf dist",