@opencode-compat/profile 0.1.1 → 0.1.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.
- package/README.md +6 -2
- package/dist/detect.js +3 -3
- package/dist/doctor.js +3 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -2
- package/dist/version.d.ts +4 -0
- package/dist/version.js +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# @opencode-compat/profile
|
|
2
2
|
|
|
3
|
-
HostProfile types, draft profiles (`opencode` / `mimo` / `kilo` / `zcode`),
|
|
3
|
+
HostProfile types, draft profiles (`opencode` / `mimo` / `kilo` / `zcode`), `detect()`, and facade override helpers for `ocp setup`.
|
|
4
|
+
|
|
5
|
+
Capability flags include Option B adoption inputs (`streamToolCallEnsure`, `bashDescriptionRequired`) — see [OCP 0.1 §5–§6.5](../../docs/ocp/0.1.md).
|
|
4
6
|
|
|
5
7
|
**License:** MPL-2.0
|
|
6
8
|
|
|
@@ -11,4 +13,6 @@ const { profile, supported, message } = detect()
|
|
|
11
13
|
// or: detect({ env: { OPENCODE_COMPAT_HOST: "mimo" } })
|
|
12
14
|
```
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
**End-user install:** [INSTALL.md](../../INSTALL.md).
|
|
17
|
+
|
|
18
|
+
See the monorepo [README](../../README.md) and [OCP 0.1](../../docs/ocp/0.1.md) §5.
|
package/dist/detect.js
CHANGED
|
@@ -48,11 +48,11 @@ function binaryHint(options) {
|
|
|
48
48
|
}
|
|
49
49
|
function envPrefixHint(env) {
|
|
50
50
|
// Strong host-specific prefixes first (avoid OPENCODE_* false positives from compat tooling).
|
|
51
|
-
if (hasPrefix(env, "MIMOCODE_"))
|
|
51
|
+
if (env.MIMOCODE || hasPrefix(env, "MIMOCODE_"))
|
|
52
52
|
return "mimo";
|
|
53
|
-
if (hasPrefix(env, "KILO_"))
|
|
53
|
+
if (env.KILO || hasPrefix(env, "KILO_"))
|
|
54
54
|
return "kilo";
|
|
55
|
-
if (hasPrefix(env, "ZCODE_"))
|
|
55
|
+
if (env.ZCODE || hasPrefix(env, "ZCODE_"))
|
|
56
56
|
return "zcode";
|
|
57
57
|
// OPENCODE_* alone is weak — only count when not also running under compat tooling only.
|
|
58
58
|
// Prefer config/binary for OpenCode; still allow OPENCODE_CONFIG_DIR as a hint.
|
package/dist/doctor.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
|
+
import { OCP_VERSION } from "./version";
|
|
2
3
|
/** T0 doctor copy for ZCode — marketplace ABI ≠ OCP. */
|
|
3
4
|
export function zcodeDoctorMessage() {
|
|
4
5
|
return [
|
|
@@ -69,14 +70,14 @@ export function formatProfileSummary(profile) {
|
|
|
69
70
|
return profileSummaryLines(profile).join("\n");
|
|
70
71
|
}
|
|
71
72
|
/** Layer A override map: `@opencode-ai/*` → `@opencode-compat/facade-*` (npm: form). */
|
|
72
|
-
export function facadeOverrides(version =
|
|
73
|
+
export function facadeOverrides(version = OCP_VERSION) {
|
|
73
74
|
return {
|
|
74
75
|
"@opencode-ai/plugin": `npm:@opencode-compat/facade-plugin@${version}`,
|
|
75
76
|
"@opencode-ai/sdk": `npm:@opencode-compat/facade-sdk@${version}`,
|
|
76
77
|
};
|
|
77
78
|
}
|
|
78
79
|
/** Suggested override map snippet for plugin install trees / operator overrides. */
|
|
79
|
-
export function facadeOverrideSnippet(version =
|
|
80
|
+
export function facadeOverrideSnippet(version = OCP_VERSION) {
|
|
80
81
|
return JSON.stringify(facadeOverrides(version), null, 2);
|
|
81
82
|
}
|
|
82
83
|
/** Resolve a project-relative plugin dir candidate list for a profile. */
|
package/dist/index.d.ts
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
* Contract: docs/ocp/0.1.md §5
|
|
4
4
|
*/
|
|
5
5
|
export declare const PKG: "@opencode-compat/profile";
|
|
6
|
-
export
|
|
7
|
-
export declare const OCP_VERSION: "0.1.1";
|
|
6
|
+
export { VERSION, OCP_VERSION } from "./version";
|
|
8
7
|
export type { DetectOptions, DetectResult, DetectSource, HostCapabilities, HostHooks, HostId, HostPaths, HostProfile, } from "./types";
|
|
9
8
|
export { CORE_HOOKS, MIMO_EXTENSION_HOOKS, MIMO_MISSING_HOOKS, type CoreHook, } from "./hooks";
|
|
10
9
|
export { expandHome, resolveXdgDirs } from "./paths";
|
package/dist/index.js
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
* Contract: docs/ocp/0.1.md §5
|
|
4
4
|
*/
|
|
5
5
|
export const PKG = "@opencode-compat/profile";
|
|
6
|
-
export
|
|
7
|
-
export const OCP_VERSION = "0.1.1";
|
|
6
|
+
export { VERSION, OCP_VERSION } from "./version";
|
|
8
7
|
export { CORE_HOOKS, MIMO_EXTENSION_HOOKS, MIMO_MISSING_HOOKS, } from "./hooks";
|
|
9
8
|
export { expandHome, resolveXdgDirs } from "./paths";
|
|
10
9
|
export { DRAFTS, kiloProfile, mimoProfile, opencodeProfile, unknownProfile, zcodeProfile, } from "./drafts";
|
package/dist/version.js
ADDED