@atomic-chat/core 0.20.6 → 0.21.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/audio/jobs.js +4 -0
- package/dist/audio/jobs.js.map +1 -1
- package/dist/audio/service.d.ts +1 -1
- package/dist/audio/service.js +3 -1
- package/dist/audio/service.js.map +1 -1
- package/dist/audio/session.js +28 -16
- package/dist/audio/session.js.map +1 -1
- package/dist/audio/state.d.ts +3 -1
- package/dist/audio/state.js +3 -1
- package/dist/audio/state.js.map +1 -1
- package/dist/cli/launch.d.ts +23 -3
- package/dist/cli/launch.js +59 -8
- package/dist/cli/launch.js.map +1 -1
- package/dist/cli/main.d.ts +1 -1
- package/dist/contracts/events.d.ts +8 -0
- package/dist/contracts/settings.d.ts +5 -0
- package/dist/contracts/settings.js.map +1 -1
- package/dist/core/atomic-core.d.ts +3 -1
- package/dist/core/atomic-core.js +4 -1
- package/dist/core/atomic-core.js.map +1 -1
- package/dist/core/create.js +4 -1
- package/dist/core/create.js.map +1 -1
- package/dist/core/sessions.js +1 -0
- package/dist/core/sessions.js.map +1 -1
- package/dist/integrations/catalog.d.ts +25 -8
- package/dist/integrations/catalog.js +105 -38
- package/dist/integrations/catalog.js.map +1 -1
- package/dist/integrations/configure/atomic-agent.d.ts +9 -1
- package/dist/integrations/configure/atomic-agent.js +42 -3
- package/dist/integrations/configure/atomic-agent.js.map +1 -1
- package/dist/integrations/configure/backup.d.ts +21 -0
- package/dist/integrations/configure/backup.js +52 -0
- package/dist/integrations/configure/backup.js.map +1 -0
- package/dist/integrations/configure/claude-code.d.ts +11 -4
- package/dist/integrations/configure/claude-code.js +73 -24
- package/dist/integrations/configure/claude-code.js.map +1 -1
- package/dist/integrations/configure/cline.d.ts +14 -4
- package/dist/integrations/configure/cline.js +78 -6
- package/dist/integrations/configure/cline.js.map +1 -1
- package/dist/integrations/configure/codex.d.ts +5 -3
- package/dist/integrations/configure/codex.js +12 -5
- package/dist/integrations/configure/codex.js.map +1 -1
- package/dist/integrations/configure/copilot.d.ts +28 -5
- package/dist/integrations/configure/copilot.js +124 -8
- package/dist/integrations/configure/copilot.js.map +1 -1
- package/dist/integrations/configure/droid.d.ts +13 -7
- package/dist/integrations/configure/droid.js +48 -17
- package/dist/integrations/configure/droid.js.map +1 -1
- package/dist/integrations/configure/dsh.d.ts +36 -20
- package/dist/integrations/configure/dsh.js +250 -48
- package/dist/integrations/configure/dsh.js.map +1 -1
- package/dist/integrations/configure/goose.d.ts +21 -7
- package/dist/integrations/configure/goose.js +141 -10
- package/dist/integrations/configure/goose.js.map +1 -1
- package/dist/integrations/configure/hermes.d.ts +63 -10
- package/dist/integrations/configure/hermes.js +360 -75
- package/dist/integrations/configure/hermes.js.map +1 -1
- package/dist/integrations/configure/json-backup.d.ts +73 -0
- package/dist/integrations/configure/json-backup.js +292 -0
- package/dist/integrations/configure/json-backup.js.map +1 -0
- package/dist/integrations/configure/json-key-backup.d.ts +43 -0
- package/dist/integrations/configure/json-key-backup.js +113 -0
- package/dist/integrations/configure/json-key-backup.js.map +1 -0
- package/dist/integrations/configure/kilo.d.ts +4 -4
- package/dist/integrations/configure/kilo.js +6 -9
- package/dist/integrations/configure/kilo.js.map +1 -1
- package/dist/integrations/configure/legacy-env-block.d.ts +18 -0
- package/dist/integrations/configure/legacy-env-block.js +47 -0
- package/dist/integrations/configure/legacy-env-block.js.map +1 -0
- package/dist/integrations/configure/mimo.d.ts +3 -2
- package/dist/integrations/configure/mimo.js +8 -9
- package/dist/integrations/configure/mimo.js.map +1 -1
- package/dist/integrations/configure/muse.d.ts +3 -3
- package/dist/integrations/configure/muse.js +5 -6
- package/dist/integrations/configure/muse.js.map +1 -1
- package/dist/integrations/configure/openclaude.d.ts +22 -7
- package/dist/integrations/configure/openclaude.js +132 -39
- package/dist/integrations/configure/openclaude.js.map +1 -1
- package/dist/integrations/configure/openclaw.d.ts +19 -5
- package/dist/integrations/configure/openclaw.js +79 -23
- package/dist/integrations/configure/openclaw.js.map +1 -1
- package/dist/integrations/configure/opencode-style.d.ts +53 -11
- package/dist/integrations/configure/opencode-style.js +218 -23
- package/dist/integrations/configure/opencode-style.js.map +1 -1
- package/dist/integrations/configure/opencode.d.ts +5 -4
- package/dist/integrations/configure/opencode.js +8 -10
- package/dist/integrations/configure/opencode.js.map +1 -1
- package/dist/integrations/configure/openhands.d.ts +5 -4
- package/dist/integrations/configure/openhands.js +7 -7
- package/dist/integrations/configure/openhands.js.map +1 -1
- package/dist/integrations/configure/pi.d.ts +6 -5
- package/dist/integrations/configure/pi.js +79 -30
- package/dist/integrations/configure/pi.js.map +1 -1
- package/dist/integrations/configure/poolside.d.ts +5 -4
- package/dist/integrations/configure/poolside.js +7 -7
- package/dist/integrations/configure/poolside.js.map +1 -1
- package/dist/integrations/configure/registry.d.ts +6 -0
- package/dist/integrations/configure/registry.js +1 -0
- package/dist/integrations/configure/registry.js.map +1 -1
- package/dist/integrations/configure/zcode.d.ts +6 -7
- package/dist/integrations/configure/zcode.js +26 -11
- package/dist/integrations/configure/zcode.js.map +1 -1
- package/dist/integrations/configure/zed.d.ts +16 -4
- package/dist/integrations/configure/zed.js +61 -13
- package/dist/integrations/configure/zed.js.map +1 -1
- package/dist/models/gguf/kv-cache.d.ts +20 -1
- package/dist/models/gguf/kv-cache.js +97 -7
- package/dist/models/gguf/kv-cache.js.map +1 -1
- package/dist/models/gguf/reader.d.ts +5 -3
- package/dist/models/gguf/reader.js +10 -6
- package/dist/models/gguf/reader.js.map +1 -1
- package/dist/runtime/llamacpp/args.d.ts +14 -0
- package/dist/runtime/llamacpp/args.js +48 -4
- package/dist/runtime/llamacpp/args.js.map +1 -1
- package/dist/runtime/llamacpp/ctx-ladder.d.ts +6 -3
- package/dist/runtime/llamacpp/ctx-ladder.js +6 -3
- package/dist/runtime/llamacpp/ctx-ladder.js.map +1 -1
- package/dist/runtime/llamacpp/fit-margin.d.ts +24 -0
- package/dist/runtime/llamacpp/fit-margin.js +31 -0
- package/dist/runtime/llamacpp/fit-margin.js.map +1 -1
- package/dist/runtime/llamacpp/generation-limits.d.ts +45 -0
- package/dist/runtime/llamacpp/generation-limits.js +61 -0
- package/dist/runtime/llamacpp/generation-limits.js.map +1 -0
- package/dist/runtime/llamacpp/load-plan.d.ts +14 -2
- package/dist/runtime/llamacpp/load-plan.js +64 -13
- package/dist/runtime/llamacpp/load-plan.js.map +1 -1
- package/dist/runtime/llamacpp/runtime.d.ts +1 -0
- package/dist/runtime/llamacpp/runtime.js +2 -0
- package/dist/runtime/llamacpp/runtime.js.map +1 -1
- package/dist/runtime/managed-engines/runtime.js +13 -2
- package/dist/runtime/managed-engines/runtime.js.map +1 -1
- package/dist/runtime/managed-engines/spec.d.ts +6 -0
- package/dist/runtime/managed-engines/spec.js.map +1 -1
- package/dist/runtime/managed-models/auto-limits.d.ts +47 -0
- package/dist/runtime/managed-models/auto-limits.js +60 -0
- package/dist/runtime/managed-models/auto-limits.js.map +1 -0
- package/dist/runtime/managed-models/index.d.ts +1 -0
- package/dist/runtime/managed-models/index.js +1 -0
- package/dist/runtime/managed-models/index.js.map +1 -1
- package/dist/runtime/mlx/config.d.ts +9 -5
- package/dist/runtime/mlx/config.js +12 -6
- package/dist/runtime/mlx/config.js.map +1 -1
- package/dist/runtime/mlx/model-files.d.ts +9 -0
- package/dist/runtime/mlx/model-files.js +26 -0
- package/dist/runtime/mlx/model-files.js.map +1 -1
- package/dist/runtime/mlx/runtime.d.ts +7 -0
- package/dist/runtime/mlx/runtime.js +24 -2
- package/dist/runtime/mlx/runtime.js.map +1 -1
- package/dist/runtime/sglang/adapter.d.ts +4 -0
- package/dist/runtime/sglang/adapter.js +9 -6
- package/dist/runtime/sglang/adapter.js.map +1 -1
- package/dist/runtime/sglang/engine.js +2 -1
- package/dist/runtime/sglang/engine.js.map +1 -1
- package/dist/runtime/sglang/memory.d.ts +11 -1
- package/dist/runtime/sglang/memory.js +34 -3
- package/dist/runtime/sglang/memory.js.map +1 -1
- package/dist/runtime/sglang/settings.d.ts +2 -1
- package/dist/runtime/sglang/settings.js +11 -7
- package/dist/runtime/sglang/settings.js.map +1 -1
- package/dist/runtime/vllm/adapter.d.ts +4 -0
- package/dist/runtime/vllm/adapter.js +9 -6
- package/dist/runtime/vllm/adapter.js.map +1 -1
- package/dist/runtime/vllm/engine.js +1 -0
- package/dist/runtime/vllm/engine.js.map +1 -1
- package/dist/runtime/vllm/memory.d.ts +12 -1
- package/dist/runtime/vllm/memory.js +44 -2
- package/dist/runtime/vllm/memory.js.map +1 -1
- package/dist/runtime/vllm/settings.d.ts +2 -1
- package/dist/runtime/vllm/settings.js +12 -7
- package/dist/runtime/vllm/settings.js.map +1 -1
- package/dist/server/public/context-window.d.ts +29 -0
- package/dist/server/public/context-window.js +77 -0
- package/dist/server/public/context-window.js.map +1 -0
- package/dist/server/public/decision-preview.js +1 -0
- package/dist/server/public/decision-preview.js.map +1 -1
- package/dist/server/public/errors.d.ts +15 -4
- package/dist/server/public/errors.js +53 -7
- package/dist/server/public/errors.js.map +1 -1
- package/dist/server/public/forward.js +65 -5
- package/dist/server/public/forward.js.map +1 -1
- package/dist/server/public/index.d.ts +1 -0
- package/dist/server/public/index.js +1 -0
- package/dist/server/public/index.js.map +1 -1
- package/dist/server/public/listing.d.ts +9 -2
- package/dist/server/public/listing.js +30 -9
- package/dist/server/public/listing.js.map +1 -1
- package/dist/server/public/responses.js +9 -5
- package/dist/server/public/responses.js.map +1 -1
- package/dist/server/public/system-messages.d.ts +39 -0
- package/dist/server/public/system-messages.js +166 -0
- package/dist/server/public/system-messages.js.map +1 -0
- package/dist/server/public/telemetry.d.ts +9 -0
- package/dist/server/public/telemetry.js +42 -6
- package/dist/server/public/telemetry.js.map +1 -1
- package/dist/server/public/thinking.d.ts +26 -0
- package/dist/server/public/thinking.js +62 -0
- package/dist/server/public/thinking.js.map +1 -0
- package/dist/server/public/trace.d.ts +8 -0
- package/dist/server/public/trace.js +17 -0
- package/dist/server/public/trace.js.map +1 -1
- package/dist/server/public/types.d.ts +8 -0
- package/dist/server/shims/index.d.ts +1 -0
- package/dist/server/shims/index.js +1 -0
- package/dist/server/shims/index.js.map +1 -1
- package/dist/server/shims/reminders.d.ts +8 -0
- package/dist/server/shims/reminders.js +14 -0
- package/dist/server/shims/reminders.js.map +1 -0
- package/dist/server/shims/responses.d.ts +33 -9
- package/dist/server/shims/responses.js +160 -36
- package/dist/server/shims/responses.js.map +1 -1
- package/dist/settings/default-migrations.d.ts +34 -0
- package/dist/settings/default-migrations.js +47 -0
- package/dist/settings/default-migrations.js.map +1 -0
- package/dist/settings/schema/atomic-prism.json +23 -9
- package/dist/settings/schema/llamacpp-upstream.json +23 -9
- package/dist/settings/schema/llamacpp.json +23 -9
- package/dist/settings/schema/sglang.json +8 -8
- package/dist/settings/schema/vllm.json +8 -8
- package/dist/settings/schema.js +1 -0
- package/dist/settings/schema.js.map +1 -1
- package/dist/settings/store.d.ts +6 -0
- package/dist/settings/store.js +18 -1
- package/dist/settings/store.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openclaw.js","sourceRoot":"","sources":["../../../src/integrations/configure/openclaw.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"openclaw.js","sourceRoot":"","sources":["../../../src/integrations/configure/openclaw.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAE1D,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACxE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3F,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE1D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAA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AAM,eAAe,CAAC,EAAE,EAAE,IAAI,EAAE,YAAY,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,CAAA;AACrE,CAAC,CAAA;AAED,cAAc,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAA"}
|
|
@@ -3,23 +3,65 @@
|
|
|
3
3
|
*
|
|
4
4
|
* All three keep one JSON file whose `provider.<id>` map names an `@ai-sdk/openai-compatible`
|
|
5
5
|
* endpoint, and all three are configured by upserting a single `atomic` entry into it and then
|
|
6
|
-
* selecting `"<providerId>/<modelId>"` as the active model.
|
|
7
|
-
*
|
|
8
|
-
* differ, so here it is once with those four as parameters.
|
|
6
|
+
* selecting `"<providerId>/<modelId>"` as the active model. Port of `opencode_family.rs` in the app,
|
|
7
|
+
* byte for byte.
|
|
9
8
|
*
|
|
10
9
|
* Everything the user already had is preserved: other providers, unrelated top-level keys, and an
|
|
11
10
|
* existing `$schema`. The active model is overwritten on purpose — pressing Run is an explicit
|
|
12
|
-
* "use this one".
|
|
11
|
+
* "use this one" — but what it replaces is kept in `<config file>.atomic-chat-backup.json` beside
|
|
12
|
+
* the file, for the app's Disconnect to put back. A value that is already ours is not kept: a
|
|
13
|
+
* reconnect keeps the one saved the first time.
|
|
14
|
+
*
|
|
15
|
+
* The files are read as JSON5 (comments, trailing commas), as the agents read them, and written
|
|
16
|
+
* back as strict JSON, which drops the comments.
|
|
13
17
|
*/
|
|
18
|
+
import type { ConfigFs, JsonValue } from '../config-io.js';
|
|
19
|
+
import type { JsonObject } from './json-tree.js';
|
|
14
20
|
import type { ConfigureInput } from './registry.js';
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
export declare const PROVIDER_ID = "atomic";
|
|
22
|
+
/** The display name of our provider entry, which is also how an entry is recognised as ours. */
|
|
23
|
+
export declare const PROVIDER_NAME = "Atomic Chat";
|
|
24
|
+
/** The output cap for a window of `contextLength` tokens. */
|
|
25
|
+
export declare function outputCap(contextLength: number): number;
|
|
26
|
+
/** A known window, or `undefined` for none. */
|
|
27
|
+
export declare function knownWindow(contextLength: number | undefined): number | undefined;
|
|
28
|
+
/** One agent's config file, and the files beside it an earlier release may have written. */
|
|
29
|
+
export interface ConfigTarget {
|
|
30
|
+
/** The file Connect writes (relative to the home, or absolute). */
|
|
19
31
|
file: string;
|
|
32
|
+
/** Read before `file`: whatever of ours is left there is removed. */
|
|
33
|
+
others: string[];
|
|
34
|
+
}
|
|
35
|
+
/** Kilo: `$KILO_CONFIG_DIR` (read after the global directory), else `<xdg>/kilo`; always `kilo.jsonc`. */
|
|
36
|
+
export declare function kiloTarget(env: NodeJS.ProcessEnv): ConfigTarget;
|
|
37
|
+
/** OpenCode: `$OPENCODE_CONFIG_DIR` is read last, an `$OPENCODE_CONFIG` file after the global one. */
|
|
38
|
+
export declare function opencodeTarget(fs: ConfigFs, env: NodeJS.ProcessEnv): Promise<ConfigTarget>;
|
|
39
|
+
/** MiMo: an absolute `$MIMOCODE_HOME` holds `config/` (MiMo refuses a relative one). */
|
|
40
|
+
export declare function mimoTarget(fs: ConfigFs, env: NodeJS.ProcessEnv): Promise<ConfigTarget>;
|
|
41
|
+
/** pi's agent directory: `$PI_CODING_AGENT_DIR` (a leading `~` expanded), else `.pi/agent`. */
|
|
42
|
+
export declare function piDir(fs: ConfigFs, env: NodeJS.ProcessEnv): string;
|
|
43
|
+
/** The file as a JSON object (blank or missing is `{}`); anything else is refused. */
|
|
44
|
+
export declare function readRoot(fs: ConfigFs, path: string, lenient: boolean): Promise<JsonObject>;
|
|
45
|
+
/** Set `keys` to `value`, making objects of whatever is missing or not an object on the way. */
|
|
46
|
+
export declare function setAt(root: JsonObject, keys: readonly string[], value: JsonValue): void;
|
|
47
|
+
/** A key Connect overwrites, and how to tell (from the whole root) that what it holds is ours. */
|
|
48
|
+
export interface Managed {
|
|
49
|
+
keys: readonly string[];
|
|
50
|
+
ours: (root: JsonObject) => boolean;
|
|
51
|
+
}
|
|
52
|
+
export declare function backupPath(config: string): string;
|
|
53
|
+
/**
|
|
54
|
+
* Before Connect writes `managed` into `root` (the file at `config` as it is now), save what they hold
|
|
55
|
+
* that is not ours. Nothing to save removes an earlier backup.
|
|
56
|
+
*/
|
|
57
|
+
export declare function saveReplaced(fs: ConfigFs, root: JsonObject, config: string, managed: readonly Managed[]): Promise<void>;
|
|
58
|
+
/** Put back what Connect replaced, for each key that is still ours. Whether anything changed. */
|
|
59
|
+
export declare function restoreReplaced(fs: ConfigFs, root: JsonObject, config: string, managed: readonly Managed[]): Promise<boolean>;
|
|
60
|
+
export interface OpencodeStyleSpec {
|
|
20
61
|
/** `$schema` seeded into a config that does not carry one yet. */
|
|
21
62
|
schema: string;
|
|
22
|
-
/**
|
|
23
|
-
|
|
63
|
+
/** A `$schema` an earlier release wrote by mistake; replaced by `schema`. */
|
|
64
|
+
staleSchema?: string;
|
|
24
65
|
}
|
|
25
|
-
export declare function
|
|
66
|
+
export declare function opencodeProviderEntry(input: ConfigureInput): JsonObject;
|
|
67
|
+
export declare function writeOpencodeStyleConfig(input: ConfigureInput, target: ConfigTarget, spec: OpencodeStyleSpec): Promise<void>;
|
|
@@ -3,41 +3,236 @@
|
|
|
3
3
|
*
|
|
4
4
|
* All three keep one JSON file whose `provider.<id>` map names an `@ai-sdk/openai-compatible`
|
|
5
5
|
* endpoint, and all three are configured by upserting a single `atomic` entry into it and then
|
|
6
|
-
* selecting `"<providerId>/<modelId>"` as the active model.
|
|
7
|
-
*
|
|
8
|
-
* differ, so here it is once with those four as parameters.
|
|
6
|
+
* selecting `"<providerId>/<modelId>"` as the active model. Port of `opencode_family.rs` in the app,
|
|
7
|
+
* byte for byte.
|
|
9
8
|
*
|
|
10
9
|
* Everything the user already had is preserved: other providers, unrelated top-level keys, and an
|
|
11
10
|
* existing `$schema`. The active model is overwritten on purpose — pressing Run is an explicit
|
|
12
|
-
* "use this one".
|
|
11
|
+
* "use this one" — but what it replaces is kept in `<config file>.atomic-chat-backup.json` beside
|
|
12
|
+
* the file, for the app's Disconnect to put back. A value that is already ours is not kept: a
|
|
13
|
+
* reconnect keeps the one saved the first time.
|
|
14
|
+
*
|
|
15
|
+
* The files are read as JSON5 (comments, trailing commas), as the agents read them, and written
|
|
16
|
+
* back as strict JSON, which drops the comments.
|
|
13
17
|
*/
|
|
18
|
+
import { basename, isAbsolute } from 'node:path';
|
|
14
19
|
import { AtomicCoreError } from '../../contracts/index.js';
|
|
15
|
-
import { canonicalJson, keyOr, parseJsonLenient, parseJsonStrict } from '../config-io.js';
|
|
20
|
+
import { canonicalJson, expandTilde, keyOr, parseJsonLenient, parseJsonStrict } from '../config-io.js';
|
|
16
21
|
import { asJsonObject } from './json-tree.js';
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
export const PROVIDER_ID = 'atomic';
|
|
23
|
+
/** The display name of our provider entry, which is also how an entry is recognised as ours. */
|
|
24
|
+
export const PROVIDER_NAME = 'Atomic Chat';
|
|
25
|
+
const BACKUP_SUFFIX = '.atomic-chat-backup.json';
|
|
26
|
+
const BACKUP_ABOUT = 'Atomic Chat keeps the settings its connection replaced here and puts them back on Disconnect.';
|
|
27
|
+
/** The longest reply an agent asks for: a quarter of the window, at most this. */
|
|
28
|
+
const OUTPUT_CAP = 8192;
|
|
29
|
+
/** The output cap for a window of `contextLength` tokens. */
|
|
30
|
+
export function outputCap(contextLength) {
|
|
31
|
+
return Math.min(OUTPUT_CAP, Math.floor(contextLength / 4));
|
|
32
|
+
}
|
|
33
|
+
/** A known window, or `undefined` for none. */
|
|
34
|
+
export function knownWindow(contextLength) {
|
|
35
|
+
return contextLength !== undefined && contextLength > 0 ? Math.floor(contextLength) : undefined;
|
|
36
|
+
}
|
|
37
|
+
// ── where the configs live ──────────────────────────────────────────────────────────────────────
|
|
38
|
+
function envValue(env, name) {
|
|
39
|
+
const value = env[name];
|
|
40
|
+
return value !== undefined && value.trim() !== '' ? value : undefined;
|
|
41
|
+
}
|
|
42
|
+
/** `$XDG_CONFIG_HOME`, else `.config` under the home — on every OS, as `xdg-basedir` resolves it. */
|
|
43
|
+
function xdgConfigHome(env) {
|
|
44
|
+
return envValue(env, 'XDG_CONFIG_HOME') ?? '.config';
|
|
45
|
+
}
|
|
46
|
+
/** `<stem>.jsonc` when it exists — read after `<stem>.json`, so it wins — else `<stem>.json`. */
|
|
47
|
+
async function dirTarget(fs, dir, stem) {
|
|
48
|
+
const json = `${dir}/${stem}.json`;
|
|
49
|
+
const jsonc = `${dir}/${stem}.jsonc`;
|
|
50
|
+
return (await fs.exists(jsonc)) ? { file: jsonc, others: [json] } : { file: json, others: [] };
|
|
51
|
+
}
|
|
52
|
+
/** Kilo: `$KILO_CONFIG_DIR` (read after the global directory), else `<xdg>/kilo`; always `kilo.jsonc`. */
|
|
53
|
+
export function kiloTarget(env) {
|
|
54
|
+
const dir = envValue(env, 'KILO_CONFIG_DIR') ?? `${xdgConfigHome(env)}/kilo`;
|
|
55
|
+
return { file: `${dir}/kilo.jsonc`, others: [] };
|
|
56
|
+
}
|
|
57
|
+
/** OpenCode: `$OPENCODE_CONFIG_DIR` is read last, an `$OPENCODE_CONFIG` file after the global one. */
|
|
58
|
+
export async function opencodeTarget(fs, env) {
|
|
59
|
+
const dir = envValue(env, 'OPENCODE_CONFIG_DIR');
|
|
60
|
+
if (dir)
|
|
61
|
+
return dirTarget(fs, dir, 'opencode');
|
|
62
|
+
const file = envValue(env, 'OPENCODE_CONFIG');
|
|
63
|
+
if (file)
|
|
64
|
+
return { file, others: [] };
|
|
65
|
+
return dirTarget(fs, `${xdgConfigHome(env)}/opencode`, 'opencode');
|
|
66
|
+
}
|
|
67
|
+
/** MiMo: an absolute `$MIMOCODE_HOME` holds `config/` (MiMo refuses a relative one). */
|
|
68
|
+
export async function mimoTarget(fs, env) {
|
|
69
|
+
const home = envValue(env, 'MIMOCODE_HOME');
|
|
70
|
+
return dirTarget(fs, home !== undefined && isAbsolute(home) ? `${home}/config` : `${xdgConfigHome(env)}/mimocode`, 'mimocode');
|
|
71
|
+
}
|
|
72
|
+
/** pi's agent directory: `$PI_CODING_AGENT_DIR` (a leading `~` expanded), else `.pi/agent`. */
|
|
73
|
+
export function piDir(fs, env) {
|
|
74
|
+
const dir = envValue(env, 'PI_CODING_AGENT_DIR');
|
|
75
|
+
return dir ? expandTilde(dir, fs.home) : '.pi/agent';
|
|
76
|
+
}
|
|
77
|
+
// ── JSON in place ───────────────────────────────────────────────────────────────────────────────
|
|
78
|
+
/** The file as a JSON object (blank or missing is `{}`); anything else is refused. */
|
|
79
|
+
export async function readRoot(fs, path, lenient) {
|
|
23
80
|
const text = await fs.read(path);
|
|
24
|
-
const parse =
|
|
81
|
+
const parse = lenient ? parseJsonLenient : parseJsonStrict;
|
|
25
82
|
const parsed = text === undefined ? {} : parse(text, fs.absolute(path));
|
|
26
83
|
const root = asJsonObject(parsed);
|
|
27
84
|
if (!root)
|
|
28
|
-
throw new AtomicCoreError('IO_ERROR', `${
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
85
|
+
throw new AtomicCoreError('IO_ERROR', `${basename(path)} is not a JSON object`);
|
|
86
|
+
return root;
|
|
87
|
+
}
|
|
88
|
+
function at(root, keys) {
|
|
89
|
+
let node = root;
|
|
90
|
+
for (const key of keys) {
|
|
91
|
+
const obj = asJsonObject(node);
|
|
92
|
+
if (!obj || !(key in obj))
|
|
93
|
+
return undefined;
|
|
94
|
+
node = obj[key];
|
|
95
|
+
}
|
|
96
|
+
return node;
|
|
97
|
+
}
|
|
98
|
+
/** Set `keys` to `value`, making objects of whatever is missing or not an object on the way. */
|
|
99
|
+
export function setAt(root, keys, value) {
|
|
100
|
+
let node = root;
|
|
101
|
+
for (const key of keys.slice(0, -1)) {
|
|
102
|
+
let next = asJsonObject(node[key]);
|
|
103
|
+
if (!next) {
|
|
104
|
+
next = {};
|
|
105
|
+
node[key] = next;
|
|
106
|
+
}
|
|
107
|
+
node = next;
|
|
108
|
+
}
|
|
109
|
+
node[keys[keys.length - 1]] = value;
|
|
110
|
+
}
|
|
111
|
+
function removeAt(root, keys) {
|
|
112
|
+
const parent = asJsonObject(at(root, keys.slice(0, -1)));
|
|
113
|
+
if (parent)
|
|
114
|
+
delete parent[keys[keys.length - 1]];
|
|
115
|
+
}
|
|
116
|
+
export function backupPath(config) {
|
|
117
|
+
return `${config}${BACKUP_SUFFIX}`;
|
|
118
|
+
}
|
|
119
|
+
async function savedValues(fs, config) {
|
|
120
|
+
const text = await fs.read(backupPath(config));
|
|
121
|
+
if (text === undefined)
|
|
122
|
+
return {};
|
|
123
|
+
try {
|
|
124
|
+
return asJsonObject(asJsonObject(JSON.parse(text))?.['previous']) ?? {};
|
|
125
|
+
}
|
|
126
|
+
catch {
|
|
127
|
+
return {};
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Before Connect writes `managed` into `root` (the file at `config` as it is now), save what they hold
|
|
132
|
+
* that is not ours. Nothing to save removes an earlier backup.
|
|
133
|
+
*/
|
|
134
|
+
export async function saveReplaced(fs, root, config, managed) {
|
|
135
|
+
const saved = await savedValues(fs, config);
|
|
136
|
+
const previous = {};
|
|
137
|
+
for (const m of managed) {
|
|
138
|
+
const current = at(root, m.keys);
|
|
139
|
+
if (current === undefined)
|
|
140
|
+
continue;
|
|
141
|
+
// Ours from an earlier Connect: what that one saved still stands.
|
|
142
|
+
const kept = m.ours(root) ? at(saved, m.keys) : current;
|
|
143
|
+
if (kept !== undefined)
|
|
144
|
+
setAt(previous, m.keys, kept);
|
|
145
|
+
}
|
|
146
|
+
if (Object.keys(previous).length === 0) {
|
|
147
|
+
await fs.remove(backupPath(config));
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
await fs.write(backupPath(config), canonicalJson({ about: BACKUP_ABOUT, previous }));
|
|
151
|
+
}
|
|
152
|
+
/** Put back what Connect replaced, for each key that is still ours. Whether anything changed. */
|
|
153
|
+
export async function restoreReplaced(fs, root, config, managed) {
|
|
154
|
+
const saved = await savedValues(fs, config);
|
|
155
|
+
// Judge every key before touching any: a pair is judged together.
|
|
156
|
+
const ours = managed.map((m) => at(root, m.keys) !== undefined && m.ours(root));
|
|
157
|
+
let changed = false;
|
|
158
|
+
managed.forEach((m, i) => {
|
|
159
|
+
if (!ours[i])
|
|
160
|
+
return;
|
|
161
|
+
const previous = at(saved, m.keys);
|
|
162
|
+
if (previous !== undefined)
|
|
163
|
+
setAt(root, m.keys, previous);
|
|
164
|
+
else
|
|
165
|
+
removeAt(root, m.keys);
|
|
166
|
+
changed = true;
|
|
167
|
+
});
|
|
168
|
+
return changed;
|
|
169
|
+
}
|
|
170
|
+
const OPENCODE_MANAGED = [
|
|
171
|
+
{
|
|
172
|
+
keys: ['model'],
|
|
173
|
+
ours: (root) => typeof root['model'] === 'string' && root['model'].startsWith(`${PROVIDER_ID}/`),
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
keys: ['provider', PROVIDER_ID],
|
|
177
|
+
ours: (root) => at(root, ['provider', PROVIDER_ID, 'name']) === PROVIDER_NAME,
|
|
178
|
+
},
|
|
179
|
+
];
|
|
180
|
+
/**
|
|
181
|
+
* The `models.<id>` entry: thinking models answer in `reasoning_content`, which the agent then shows
|
|
182
|
+
* as thoughts and sends back within a tool loop (a model that does not think sends an empty one,
|
|
183
|
+
* which servers drop); the window and output cap when known, without which the agent never compacts
|
|
184
|
+
* and asks for 32K tokens per reply.
|
|
185
|
+
*/
|
|
186
|
+
function modelEntry(model, contextLength) {
|
|
187
|
+
const entry = { name: model, reasoning: true, interleaved: { field: 'reasoning_content' } };
|
|
188
|
+
const ctx = knownWindow(contextLength);
|
|
189
|
+
if (ctx !== undefined)
|
|
190
|
+
entry['limit'] = { context: ctx, output: outputCap(ctx) };
|
|
191
|
+
return entry;
|
|
192
|
+
}
|
|
193
|
+
export function opencodeProviderEntry(input) {
|
|
194
|
+
const { apiUrl, model, apiKey, contextLength } = input;
|
|
195
|
+
return {
|
|
196
|
+
name: PROVIDER_NAME,
|
|
36
197
|
npm: '@ai-sdk/openai-compatible',
|
|
37
|
-
|
|
38
|
-
|
|
198
|
+
// A local model can read a long prompt for longer than the 5 minutes these agents wait for the
|
|
199
|
+
// first byte, and then they give up.
|
|
200
|
+
options: { baseURL: apiUrl, apiKey: keyOr(apiKey, 'atomic'), timeout: false, headerTimeout: false },
|
|
201
|
+
models: { [model]: modelEntry(model, contextLength) },
|
|
39
202
|
};
|
|
40
|
-
|
|
203
|
+
}
|
|
204
|
+
export async function writeOpencodeStyleConfig(input, target, spec) {
|
|
205
|
+
const { fs, model } = input;
|
|
206
|
+
const path = target.file;
|
|
207
|
+
// The directory is created before the file is read, so a parse failure below still leaves it —
|
|
208
|
+
// matching `create_dir_all` sitting above the read in the Rust writer.
|
|
209
|
+
const slash = Math.max(path.lastIndexOf('/'), path.lastIndexOf('\\'));
|
|
210
|
+
if (slash > 0)
|
|
211
|
+
await fs.mkdirp(path.slice(0, slash));
|
|
212
|
+
const root = await readRoot(fs, path, true);
|
|
213
|
+
await saveReplaced(fs, root, path, OPENCODE_MANAGED);
|
|
214
|
+
const schema = root['$schema'];
|
|
215
|
+
if (!('$schema' in root) || (spec.staleSchema !== undefined && schema === spec.staleSchema)) {
|
|
216
|
+
root['$schema'] = spec.schema;
|
|
217
|
+
}
|
|
218
|
+
setAt(root, ['provider', PROVIDER_ID], opencodeProviderEntry(input));
|
|
219
|
+
root['model'] = `${PROVIDER_ID}/${model}`;
|
|
41
220
|
await fs.write(path, canonicalJson(root));
|
|
221
|
+
for (const other of target.others)
|
|
222
|
+
await removeOurs(fs, other);
|
|
223
|
+
}
|
|
224
|
+
/** Take our entries out of a file Connect does not write; one it cannot read is left as it is. */
|
|
225
|
+
async function removeOurs(fs, path) {
|
|
226
|
+
if ((await fs.read(path)) === undefined)
|
|
227
|
+
return;
|
|
228
|
+
let root;
|
|
229
|
+
try {
|
|
230
|
+
root = await readRoot(fs, path, true);
|
|
231
|
+
}
|
|
232
|
+
catch {
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
if (await restoreReplaced(fs, root, path, OPENCODE_MANAGED))
|
|
236
|
+
await fs.write(path, canonicalJson(root));
|
|
42
237
|
}
|
|
43
238
|
//# sourceMappingURL=opencode-style.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"opencode-style.js","sourceRoot":"","sources":["../../../src/integrations/configure/opencode-style.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"opencode-style.js","sourceRoot":"","sources":["../../../src/integrations/configure/opencode-style.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtG,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAI7C,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAA;AACnC,gGAAgG;AAChG,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAA;AAC1C,MAAM,aAAa,GAAG,0BAA0B,CAAA;AAChD,MAAM,YAAY,GAChB,+FAA+F,CAAA;AACjG,kFAAkF;AAClF,MAAM,UAAU,GAAG,IAAI,CAAA;AAEvB,6DAA6D;AAC7D,MAAM,UAAU,SAAS,CAAC,aAAqB;IAC7C,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,CAAC,CAAC,CAAC,CAAA;AAC5D,CAAC;AAED,+CAA+C;AAC/C,MAAM,UAAU,WAAW,CAAC,aAAiC;IAC3D,OAAO,aAAa,KA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config/opencode`.
|
|
3
4
|
*
|
|
4
|
-
* Port of `configure_opencode` in `src-tauri/src/core/system/commands.rs`.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Port of `configure_opencode` in `src-tauri/src/core/system/commands.rs`. A file the parser rejects
|
|
6
|
+
* is a hard error and nothing is written, so a typo in the user's config is reported instead of
|
|
7
|
+
* being overwritten.
|
|
7
8
|
*/
|
|
8
9
|
import type { ConfigureInput } from './registry.js';
|
|
9
10
|
export declare function configureOpencode(input: ConfigureInput): Promise<void>;
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* OpenCode —
|
|
2
|
+
* OpenCode — `opencode.jsonc` when there is one, else `opencode.json`, in `$OPENCODE_CONFIG_DIR`,
|
|
3
|
+
* else the `$OPENCODE_CONFIG` file, else `~/.config/opencode`.
|
|
3
4
|
*
|
|
4
|
-
* Port of `configure_opencode` in `src-tauri/src/core/system/commands.rs`.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Port of `configure_opencode` in `src-tauri/src/core/system/commands.rs`. A file the parser rejects
|
|
6
|
+
* is a hard error and nothing is written, so a typo in the user's config is reported instead of
|
|
7
|
+
* being overwritten.
|
|
7
8
|
*/
|
|
8
9
|
import { registerWriter } from './registry.js';
|
|
9
|
-
import { writeOpencodeStyleConfig } from './opencode-style.js';
|
|
10
|
-
export function configureOpencode(input) {
|
|
11
|
-
return writeOpencodeStyleConfig(input, {
|
|
12
|
-
dir: '.config/opencode',
|
|
13
|
-
file: 'opencode.json',
|
|
10
|
+
import { opencodeTarget, writeOpencodeStyleConfig } from './opencode-style.js';
|
|
11
|
+
export async function configureOpencode(input) {
|
|
12
|
+
return writeOpencodeStyleConfig(input, await opencodeTarget(input.fs, input.env), {
|
|
14
13
|
schema: 'https://opencode.ai/config.json',
|
|
15
|
-
lenient: false,
|
|
16
14
|
});
|
|
17
15
|
}
|
|
18
16
|
registerWriter('opencode', configureOpencode);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"opencode.js","sourceRoot":"","sources":["../../../src/integrations/configure/opencode.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"opencode.js","sourceRoot":"","sources":["../../../src/integrations/configure/opencode.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AAE9E,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,KAAqB;IAC3D,OAAO,wBAAwB,CAAC,KAAK,EAAE,MAAM,cAAc,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE;QAChF,MAAM,EAAE,iCAAiC;KAC1C,CAAC,CAAA;AACJ,CAAC;AAED,cAAc,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAA"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* OpenHands reads
|
|
3
|
-
*
|
|
4
|
-
* required for a custom OpenAI-compatible base URL — without it litellm
|
|
5
|
-
* own model registry and fails before the request leaves the process.
|
|
2
|
+
* OpenHands reads `LLM_API_KEY` / `LLM_BASE_URL` / `LLM_MODEL` only when launched with
|
|
3
|
+
* `--override-with-envs`, and `launch` sets them on the child (`childEnv`). The litellm `openai/`
|
|
4
|
+
* prefix on the model id is required for a custom OpenAI-compatible base URL — without it litellm
|
|
5
|
+
* resolves the id against its own model registry and fails before the request leaves the process.
|
|
6
|
+
* Nothing is persisted; Connect only removes what an older release did (`legacy-env-block.ts`).
|
|
6
7
|
*/
|
|
7
8
|
import type { ConfigureWriter } from './registry.js';
|
|
8
9
|
export declare const configureOpenhands: ConfigureWriter;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* OpenHands reads
|
|
3
|
-
*
|
|
4
|
-
* required for a custom OpenAI-compatible base URL — without it litellm
|
|
5
|
-
* own model registry and fails before the request leaves the process.
|
|
2
|
+
* OpenHands reads `LLM_API_KEY` / `LLM_BASE_URL` / `LLM_MODEL` only when launched with
|
|
3
|
+
* `--override-with-envs`, and `launch` sets them on the child (`childEnv`). The litellm `openai/`
|
|
4
|
+
* prefix on the model id is required for a custom OpenAI-compatible base URL — without it litellm
|
|
5
|
+
* resolves the id against its own model registry and fails before the request leaves the process.
|
|
6
|
+
* Nothing is persisted; Connect only removes what an older release did (`legacy-env-block.ts`).
|
|
6
7
|
*/
|
|
8
|
+
import { legacyEnvAgentWriter } from './legacy-env-block.js';
|
|
7
9
|
import { registerWriter } from './registry.js';
|
|
8
|
-
|
|
9
|
-
const MARKER = '# Atomic Chat - OpenHands Config';
|
|
10
|
-
export const configureOpenhands = (input) => configureEnvAgent(input, { agentId: 'openhands', marker: MARKER, prefix: 'LLM_' });
|
|
10
|
+
export const configureOpenhands = legacyEnvAgentWriter('# Atomic Chat - OpenHands Config');
|
|
11
11
|
registerWriter('openhands', configureOpenhands);
|
|
12
12
|
//# sourceMappingURL=openhands.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openhands.js","sourceRoot":"","sources":["../../../src/integrations/configure/openhands.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"openhands.js","sourceRoot":"","sources":["../../../src/integrations/configure/openhands.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAE5D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE9C,MAAM,CAAC,MAAM,kBAAkB,GAAoB,oBAAoB,CAAC,kCAAkC,CAAC,CAAA;AAE3G,cAAc,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAA"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Pi —
|
|
2
|
+
* Pi — `models.json` and `settings.json` in `$PI_CODING_AGENT_DIR`, else `~/.pi/agent`.
|
|
3
3
|
*
|
|
4
|
-
* Port of `configure_pi` in `src-tauri/src/core/system/commands.rs
|
|
5
|
-
* integration across two strict-JSON files: `models.json` declares the provider
|
|
6
|
-
* serves, `settings.json` says which of them the agent opens on. Both are upserted,
|
|
7
|
-
* providers and unrelated settings survive
|
|
4
|
+
* Port of `configure_pi` in `src-tauri/src/core/system/commands.rs` (`opencode_family.rs`). Pi splits
|
|
5
|
+
* the two halves of an integration across two strict-JSON files: `models.json` declares the provider
|
|
6
|
+
* and the models it serves, `settings.json` says which of them the agent opens on. Both are upserted,
|
|
7
|
+
* so other providers and unrelated settings survive; the default model a connection replaces is kept
|
|
8
|
+
* beside `settings.json` for the app's Disconnect.
|
|
8
9
|
*
|
|
9
10
|
* The order matters on failure: `models.json` is written before `settings.json` is even read, so a
|
|
10
11
|
* broken `settings.json` leaves a correctly updated `models.json` behind — the same half-applied
|