jishushell 0.4.17 → 0.4.24
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/Dockerfile.hermes-slim +193 -0
- package/apps/hermes-container.yaml +35 -0
- package/apps/ollama-binary.yaml +200 -0
- package/apps/ollama-cpu-container.yaml +37 -0
- package/apps/ollama-with-hollama-binary.yaml +195 -0
- package/apps/openclaw-binary.yaml +69 -0
- package/apps/openclaw-container.yaml +37 -0
- package/apps/openclaw-with-ollama-container.yaml +42 -0
- package/apps/openclaw-with-searxng-container.yaml +136 -0
- package/apps/openwebui-container.yaml +53 -0
- package/apps/playwright-container.yaml +120 -0
- package/apps/searxng-container.yaml +115 -0
- package/dist/auth.d.ts +1 -0
- package/dist/auth.js +15 -14
- package/dist/auth.js.map +1 -1
- package/dist/cli/app.d.ts +1 -0
- package/dist/cli/app.js +710 -52
- package/dist/cli/app.js.map +1 -1
- package/dist/cli/backup.d.ts +3 -0
- package/dist/cli/backup.js +434 -0
- package/dist/cli/backup.js.map +1 -0
- package/dist/cli/doctor.d.ts +1 -0
- package/dist/cli/doctor.js +61 -35
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/job.d.ts +1 -0
- package/dist/cli/job.js +37 -99
- package/dist/cli/job.js.map +1 -1
- package/dist/cli/llm.d.ts +1 -0
- package/dist/cli/llm.js +20 -14
- package/dist/cli/llm.js.map +1 -1
- package/dist/cli/managed-list.d.ts +30 -0
- package/dist/cli/managed-list.js +129 -0
- package/dist/cli/managed-list.js.map +1 -0
- package/dist/cli/panel.d.ts +4 -3
- package/dist/cli/panel.js +94 -24
- package/dist/cli/panel.js.map +1 -1
- package/dist/cli/version.d.ts +1 -0
- package/dist/cli/version.js +12 -0
- package/dist/cli/version.js.map +1 -0
- package/dist/cli.js +47 -516
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +68 -0
- package/dist/config.js +266 -12
- package/dist/config.js.map +1 -1
- package/dist/control.d.ts +10 -6
- package/dist/control.js +87 -6
- package/dist/control.js.map +1 -1
- package/dist/install.d.ts +16 -0
- package/dist/install.js +75 -26
- package/dist/install.js.map +1 -1
- package/dist/routes/agent-apps.d.ts +15 -0
- package/dist/routes/agent-apps.js +78 -0
- package/dist/routes/agent-apps.js.map +1 -0
- package/dist/routes/apps.js +186 -7
- package/dist/routes/apps.js.map +1 -1
- package/dist/routes/backup.js +3 -3
- package/dist/routes/backup.js.map +1 -1
- package/dist/routes/instances.d.ts +6 -0
- package/dist/routes/instances.js +862 -879
- package/dist/routes/instances.js.map +1 -1
- package/dist/routes/llm.js +9 -8
- package/dist/routes/llm.js.map +1 -1
- package/dist/routes/runtime.d.ts +15 -0
- package/dist/routes/runtime.js +69 -0
- package/dist/routes/runtime.js.map +1 -0
- package/dist/routes/setup.js +103 -8
- package/dist/routes/setup.js.map +1 -1
- package/dist/routes/system.js +25 -3
- package/dist/routes/system.js.map +1 -1
- package/dist/server.js +71 -7
- package/dist/server.js.map +1 -1
- package/dist/services/agent-apps/catalog.d.ts +30 -0
- package/dist/services/agent-apps/catalog.js +60 -0
- package/dist/services/agent-apps/catalog.js.map +1 -0
- package/dist/services/agent-apps/index.d.ts +36 -0
- package/dist/services/agent-apps/index.js +171 -0
- package/dist/services/agent-apps/index.js.map +1 -0
- package/dist/services/agent-apps/installers/adapter-probes.d.ts +49 -0
- package/dist/services/agent-apps/installers/adapter-probes.js +223 -0
- package/dist/services/agent-apps/installers/adapter-probes.js.map +1 -0
- package/dist/services/agent-apps/installers/adapter.d.ts +30 -0
- package/dist/services/agent-apps/installers/adapter.js +171 -0
- package/dist/services/agent-apps/installers/adapter.js.map +1 -0
- package/dist/services/agent-apps/installers/registry-probe.d.ts +38 -0
- package/dist/services/agent-apps/installers/registry-probe.js +183 -0
- package/dist/services/agent-apps/installers/registry-probe.js.map +1 -0
- package/dist/services/agent-apps/installers/shell-script.d.ts +47 -0
- package/dist/services/agent-apps/installers/shell-script.js +471 -0
- package/dist/services/agent-apps/installers/shell-script.js.map +1 -0
- package/dist/services/agent-apps/types.d.ts +125 -0
- package/dist/services/agent-apps/types.js +17 -0
- package/dist/services/agent-apps/types.js.map +1 -0
- package/dist/services/{app-compiler.d.ts → app/app-compiler.d.ts} +3 -3
- package/dist/services/{app-compiler.js → app/app-compiler.js} +10 -7
- package/dist/services/app/app-compiler.js.map +1 -0
- package/dist/services/app/app-manager.d.ts +142 -0
- package/dist/services/app/app-manager.js +1988 -0
- package/dist/services/app/app-manager.js.map +1 -0
- package/dist/services/app/custom-manager.d.ts +27 -0
- package/dist/services/app/custom-manager.js +285 -0
- package/dist/services/app/custom-manager.js.map +1 -0
- package/dist/services/app/hermes-agent-manager.d.ts +20 -0
- package/dist/services/app/hermes-agent-manager.js +289 -0
- package/dist/services/app/hermes-agent-manager.js.map +1 -0
- package/dist/services/app/id-normalizer.d.ts +27 -0
- package/dist/services/app/id-normalizer.js +77 -0
- package/dist/services/app/id-normalizer.js.map +1 -0
- package/dist/services/app/ollama-manager.d.ts +18 -0
- package/dist/services/app/ollama-manager.js +207 -0
- package/dist/services/app/ollama-manager.js.map +1 -0
- package/dist/services/app/openclaw-manager.d.ts +63 -0
- package/dist/services/app/openclaw-manager.js +1178 -0
- package/dist/services/app/openclaw-manager.js.map +1 -0
- package/dist/services/app/paths.d.ts +47 -0
- package/dist/services/app/paths.js +68 -0
- package/dist/services/app/paths.js.map +1 -0
- package/dist/services/app/registry.d.ts +17 -0
- package/dist/services/app/registry.js +31 -0
- package/dist/services/app/registry.js.map +1 -0
- package/dist/services/app/remote-spec.d.ts +14 -0
- package/dist/services/app/remote-spec.js +58 -0
- package/dist/services/app/remote-spec.js.map +1 -0
- package/dist/services/app/terminal-session-manager.d.ts +27 -0
- package/dist/services/app/terminal-session-manager.js +157 -0
- package/dist/services/app/terminal-session-manager.js.map +1 -0
- package/dist/services/app/types.d.ts +72 -0
- package/dist/services/app/types.js +16 -0
- package/dist/services/app/types.js.map +1 -0
- package/dist/services/backup-manager.js +60 -22
- package/dist/services/backup-manager.js.map +1 -1
- package/dist/services/instance-manager.d.ts +82 -39
- package/dist/services/instance-manager.js +575 -1142
- package/dist/services/instance-manager.js.map +1 -1
- package/dist/services/llm-proxy/circuit-breaker.js +10 -2
- package/dist/services/llm-proxy/circuit-breaker.js.map +1 -1
- package/dist/services/llm-proxy/index.d.ts +14 -1
- package/dist/services/llm-proxy/index.js +51 -6
- package/dist/services/llm-proxy/index.js.map +1 -1
- package/dist/services/nomad-manager.d.ts +260 -3
- package/dist/services/nomad-manager.js +2866 -449
- package/dist/services/nomad-manager.js.map +1 -1
- package/dist/services/panel-manager.d.ts +10 -0
- package/dist/services/panel-manager.js +97 -0
- package/dist/services/panel-manager.js.map +1 -1
- package/dist/services/plugin-installer.js +28 -2
- package/dist/services/plugin-installer.js.map +1 -1
- package/dist/services/process-manager.js +22 -0
- package/dist/services/process-manager.js.map +1 -1
- package/dist/services/runtime/adapters/custom.d.ts +20 -0
- package/dist/services/runtime/adapters/custom.js +90 -0
- package/dist/services/runtime/adapters/custom.js.map +1 -0
- package/dist/services/runtime/adapters/hermes.d.ts +174 -0
- package/dist/services/runtime/adapters/hermes.js +1316 -0
- package/dist/services/runtime/adapters/hermes.js.map +1 -0
- package/dist/services/runtime/adapters/openclaw-routes.d.ts +17 -0
- package/dist/services/runtime/adapters/openclaw-routes.js +946 -0
- package/dist/services/runtime/adapters/openclaw-routes.js.map +1 -0
- package/dist/services/runtime/adapters/openclaw.d.ts +188 -0
- package/dist/services/runtime/adapters/openclaw.js +2195 -0
- package/dist/services/runtime/adapters/openclaw.js.map +1 -0
- package/dist/services/runtime/errors.d.ts +28 -0
- package/dist/services/runtime/errors.js +31 -0
- package/dist/services/runtime/errors.js.map +1 -0
- package/dist/services/runtime/index.d.ts +34 -0
- package/dist/services/runtime/index.js +51 -0
- package/dist/services/runtime/index.js.map +1 -0
- package/dist/services/runtime/instance.d.ts +24 -0
- package/dist/services/runtime/instance.js +143 -0
- package/dist/services/runtime/instance.js.map +1 -0
- package/dist/services/runtime/migrations.d.ts +15 -0
- package/dist/services/runtime/migrations.js +25 -0
- package/dist/services/runtime/migrations.js.map +1 -0
- package/dist/services/runtime/registry.d.ts +13 -0
- package/dist/services/runtime/registry.js +32 -0
- package/dist/services/runtime/registry.js.map +1 -0
- package/dist/services/runtime/types.d.ts +545 -0
- package/dist/services/runtime/types.js +14 -0
- package/dist/services/runtime/types.js.map +1 -0
- package/dist/services/setup-manager.d.ts +70 -29
- package/dist/services/setup-manager.js +278 -597
- package/dist/services/setup-manager.js.map +1 -1
- package/dist/services/task-registry.d.ts +44 -0
- package/dist/services/task-registry.js +74 -0
- package/dist/services/task-registry.js.map +1 -0
- package/dist/services/telemetry/heartbeat.d.ts +6 -6
- package/dist/services/telemetry/heartbeat.js +29 -30
- package/dist/services/telemetry/heartbeat.js.map +1 -1
- package/dist/types.d.ts +162 -2
- package/dist/utils/docker-host.d.ts +15 -0
- package/dist/utils/docker-host.js +64 -0
- package/dist/utils/docker-host.js.map +1 -0
- package/install/jishu-install.sh +25 -1
- package/package.json +14 -4
- package/public/assets/Dashboard-B-JoOjBQ.js +1 -0
- package/public/assets/HermesChatPanel-mFSureyc.js +1 -0
- package/public/assets/HermesConfigForm-DvR05LK1.js +4 -0
- package/public/assets/InitPassword-CVA8wQA6.js +1 -0
- package/public/assets/InstanceDetail-DcZW2QGO.js +91 -0
- package/public/assets/{Login-D1Bt-Lyk.js → Login-BWsZH2mu.js} +1 -1
- package/public/assets/NewInstance-BCIrAd86.js +1 -0
- package/public/assets/Settings-xkDcduFz.js +1 -0
- package/public/assets/Setup-Cfuwj4gV.js +1 -0
- package/public/assets/WeixinLoginPanel-CnjR8xMu.js +9 -0
- package/public/assets/index-CPhVFEsx.css +1 -0
- package/public/assets/index-DQsM6Joa.js +19 -0
- package/public/assets/input-paste-CrNVAyOy.js +1 -0
- package/public/assets/registry-B4UFJdpA.js +2 -0
- package/public/assets/{usePolling-CK0DfI4h.js → usePolling-Do5Erqm_.js} +1 -1
- package/public/assets/vendor-i18n-ucpM0OR0.js +9 -0
- package/public/assets/{vendor-react-B1-3Yrt-.js → vendor-react-Bk1hRGiY.js} +1 -1
- package/public/favicon.png +0 -0
- package/public/index.html +9 -4
- package/public/logos/hermes.png +0 -0
- package/public/logos/ollama.png +0 -0
- package/public/logos/openclaw.svg +60 -0
- package/scripts/build-hermes-image.sh +21 -0
- package/scripts/build-local.sh +54 -0
- package/scripts/check-adapter-isolation.ts +293 -0
- package/scripts/fixtures/instances/hermes-sample/instance.json +37 -0
- package/scripts/fixtures/instances/legacy-openclaw-sample/instance.json +7 -0
- package/scripts/smoke/hermes-bootstrap.sh +195 -0
- package/templates/hermes-entrypoint.sh +154 -0
- package/dist/cli/openclaw.d.ts +0 -12
- package/dist/cli/openclaw.js +0 -156
- package/dist/cli/openclaw.js.map +0 -1
- package/dist/services/app-compiler.js.map +0 -1
- package/dist/services/app-manager.d.ts +0 -17
- package/dist/services/app-manager.js +0 -168
- package/dist/services/app-manager.js.map +0 -1
- package/dist/services/job-manager.d.ts +0 -22
- package/dist/services/job-manager.js +0 -102
- package/dist/services/job-manager.js.map +0 -1
- package/public/assets/Dashboard-CQsp1Mr9.js +0 -1
- package/public/assets/InitPassword-BEC8SE4A.js +0 -1
- package/public/assets/InstanceDetail-B5wTgNEg.js +0 -17
- package/public/assets/NewInstance-GQzm3K9D.js +0 -1
- package/public/assets/Settings-ByjGlqhP.js +0 -1
- package/public/assets/Setup-cMF21Y-8.js +0 -1
- package/public/assets/index-B6qQP4mH.css +0 -1
- package/public/assets/index-BuTQtuNy.js +0 -16
- package/public/assets/vendor-i18n-CfW0RvgE.js +0 -9
|
@@ -1,15 +1,34 @@
|
|
|
1
|
-
import type { AppSpec } from "../types.js";
|
|
2
1
|
type ConfigChangeListener = (instanceId: string) => void;
|
|
3
2
|
export declare function onConfigChange(listener: ConfigChangeListener): () => void;
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Fire the config-change listener fan-out. Adapters call this after
|
|
5
|
+
* `saveNativeConfig()` so LLM proxy / config editors pick up the change.
|
|
6
|
+
*/
|
|
7
|
+
export declare function notifyConfigChange(instanceId: string): void;
|
|
8
|
+
export declare function instanceDir(instanceId: string): string;
|
|
9
|
+
export declare function instanceMetaPath(instanceId: string): string;
|
|
10
|
+
export declare function defaultModelEnvFile(instanceId: string): string;
|
|
11
|
+
export declare function normalizePath(p: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Read the gateway port out of a persisted runtime record. Tries
|
|
14
|
+
* `runtime.ports[]` first (generic framework contract); on miss,
|
|
15
|
+
* asks the runtime adapter for its legacy fallback (e.g. OpenClaw's
|
|
16
|
+
* `env.OPENCLAW_GATEWAY_PORT` / `args --port N`).
|
|
17
|
+
*/
|
|
18
|
+
export declare function extractGatewayPort(runtime: Record<string, any> | undefined, agentType?: string): number | null;
|
|
5
19
|
/**
|
|
6
20
|
* Probes whether a port is currently held by any process on the host.
|
|
7
21
|
*
|
|
8
|
-
* Binds `0.0.0.0
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
22
|
+
* Binds four addresses concurrently — `0.0.0.0`, `127.0.0.1`, `::` (v6-only),
|
|
23
|
+
* and `::1` — and treats the port as busy if any probe returns EADDRINUSE.
|
|
24
|
+
* The single-`0.0.0.0` probe used by the earlier revision was sufficient on
|
|
25
|
+
* Linux (where binding `0.0.0.0` conflicts with any pre-existing loopback
|
|
26
|
+
* listener on the same port) but silently passed on macOS, where BSD socket
|
|
27
|
+
* semantics let a wildcard v4 bind coexist with a `127.0.0.1` listener. A
|
|
28
|
+
* user running a natively-installed openclaw bound to `127.0.0.1:18789`
|
|
29
|
+
* would then be invisible to jishushell, so port allocation would assign
|
|
30
|
+
* 18789 to a new instance and the gateway would silently fail to bind at
|
|
31
|
+
* start time. Probing the loopback addresses directly closes that gap.
|
|
13
32
|
*/
|
|
14
33
|
export declare function isPortInUse(port: number): Promise<boolean>;
|
|
15
34
|
/**
|
|
@@ -25,6 +44,19 @@ export type GatewayPortAllocation = {
|
|
|
25
44
|
port: number;
|
|
26
45
|
skipped: number[];
|
|
27
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* Kind-agnostic gateway port allocator. Callers (adapters) pass their own
|
|
49
|
+
* `defaultPort` — the framework no longer hardcodes OpenClaw / Hermes base
|
|
50
|
+
* ports here. Walks upward from `defaultPort` until a free port is found
|
|
51
|
+
* that is neither held by an existing instance nor by any process on the
|
|
52
|
+
* host. Concurrent callers coordinate via `_pendingPorts`.
|
|
53
|
+
*
|
|
54
|
+
* Caller must release the allocated port via {@link releasePendingPort}
|
|
55
|
+
* after persisting it into instance metadata (or on failure).
|
|
56
|
+
*/
|
|
57
|
+
export declare function allocateGatewayPort(instanceId: string, defaultPort: number): Promise<GatewayPortAllocation>;
|
|
58
|
+
/** Release a port previously reserved by {@link allocateGatewayPort}. */
|
|
59
|
+
export declare function releasePendingPort(port: number): void;
|
|
28
60
|
export declare function getResolvedOpenclawBin(): string;
|
|
29
61
|
/**
|
|
30
62
|
* When jishushell runs as root (e.g. systemd service), returns the actual
|
|
@@ -36,40 +68,18 @@ export declare function resolveServiceUser(): {
|
|
|
36
68
|
uid: number;
|
|
37
69
|
gid: number;
|
|
38
70
|
} | null;
|
|
71
|
+
/**
|
|
72
|
+
* When running as root, chown a file (and its .bak) to the service user so the
|
|
73
|
+
* openclaw process (running as that user) can read/write its own data files.
|
|
74
|
+
* No-op when not running as root.
|
|
75
|
+
*/
|
|
76
|
+
export declare function chownToServiceUser(...paths: string[]): void;
|
|
39
77
|
export declare function parseEnvFile(path: string): Record<string, string>;
|
|
40
78
|
export declare function updateEnvFile(path: string, updates: Record<string, string>): void;
|
|
41
79
|
export declare function inferProviderApiKeyEnvName(providerId: string): string;
|
|
42
|
-
export declare const CHANNEL_PLUGIN_MAP: Record<string, string>;
|
|
43
|
-
/**
|
|
44
|
-
* Dissociate a cloned/imported config from its source instance's IM bindings.
|
|
45
|
-
*
|
|
46
|
-
* Mutates the given config in place:
|
|
47
|
-
* - Deletes the entire `channels` block (same channel cannot serve multiple
|
|
48
|
-
* instances, so every inherited enabled/credential/account entry must go).
|
|
49
|
-
* - Deletes matching IM entries from `plugins.entries` so the plugin loader
|
|
50
|
-
* does not try to boot a channel whose config no longer exists.
|
|
51
|
-
*
|
|
52
|
-
* Used by both domain clone (`createInstance`'s `cloneFrom` path) and the
|
|
53
|
-
* backup import paths (`importInstance`, `createFromBackup`) so that a new
|
|
54
|
-
* instance never inherits a half-configured IM binding.
|
|
55
|
-
*/
|
|
56
|
-
export declare function stripImBindings(config: Record<string, any>): void;
|
|
57
|
-
/** Check if a channel plugin is installed for an instance. */
|
|
58
|
-
export declare function isChannelPluginInstalled(instanceId: string, channelId: string): boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Install a single channel plugin.
|
|
61
|
-
* Docker mode: runs install inside the running container via docker exec.
|
|
62
|
-
* Host mode (fallback): spawns the host openclaw binary directly.
|
|
63
|
-
*/
|
|
64
|
-
export declare function installChannelPlugin(instanceId: string, channelId: string): Promise<void>;
|
|
65
80
|
export declare function listInstances(): Record<string, any>[];
|
|
66
81
|
export declare function getInstance(instanceId: string): Record<string, any> | null;
|
|
67
|
-
export declare function createInstance(instanceId: string, name: string, description?: string, cloneFrom?: string, openclawHome?: string, appSpec?: AppSpec, cloneOptions?: {
|
|
68
|
-
include_sessions?: boolean;
|
|
69
|
-
include_memory?: boolean;
|
|
70
|
-
}): Promise<Record<string, any>>;
|
|
71
82
|
export declare function updateInstance(instanceId: string, name?: string, description?: string): Record<string, any> | null;
|
|
72
|
-
/** Update instance.json metadata fields (shallow merge at top level). */
|
|
73
83
|
export declare function updateInstanceMeta(instanceId: string, patch: Record<string, any>): void;
|
|
74
84
|
export declare function deleteInstance(instanceId: string, purgeBackups?: boolean): Promise<{
|
|
75
85
|
ok: boolean;
|
|
@@ -77,7 +87,26 @@ export declare function deleteInstance(instanceId: string, purgeBackups?: boolea
|
|
|
77
87
|
}>;
|
|
78
88
|
export declare function getConfig(instanceId: string): Record<string, any> | null;
|
|
79
89
|
export declare function getStoredConfig(instanceId: string): Record<string, any> | null;
|
|
80
|
-
export declare function saveConfig(instanceId: string, config: Record<string, any>): boolean
|
|
90
|
+
export declare function saveConfig(instanceId: string, config: Record<string, any>): Promise<boolean>;
|
|
91
|
+
/**
|
|
92
|
+
* @deprecated Use `getAdapter("openclaw").channelPluginMap` instead.
|
|
93
|
+
* Provides the OpenClaw channel-plugin map via a Proxy so old direct-
|
|
94
|
+
* property reads (e.g. `CHANNEL_PLUGIN_MAP.feishu`) keep working.
|
|
95
|
+
*/
|
|
96
|
+
export declare const CHANNEL_PLUGIN_MAP: Record<string, string>;
|
|
97
|
+
/**
|
|
98
|
+
* @deprecated Use `getAdapter(agentType).isChannelPluginInstalled(id, channelId)` instead.
|
|
99
|
+
*/
|
|
100
|
+
export declare function isChannelPluginInstalled(instanceId: string, channelId: string): boolean;
|
|
101
|
+
/**
|
|
102
|
+
* @deprecated Use `getAdapter(agentType).createInstance({ instanceId, name, description, ... })` instead.
|
|
103
|
+
* Retained for unit tests and legacy scripts; forwards to the
|
|
104
|
+
* OpenClawAdapter's `createInstance` method.
|
|
105
|
+
*/
|
|
106
|
+
export declare function createInstance(instanceId: string, name: string, description: string, cloneFrom?: string, agentHome?: string, cloneOptions?: {
|
|
107
|
+
include_sessions?: boolean;
|
|
108
|
+
include_memory?: boolean;
|
|
109
|
+
}): Promise<Record<string, any>>;
|
|
81
110
|
export declare function getOpenclawHome(instanceId: string): string;
|
|
82
111
|
export declare function saveFeishuCredentials(instanceId: string, creds: {
|
|
83
112
|
appId: string;
|
|
@@ -91,9 +120,6 @@ export declare function saveWeixinCredentials(instanceId: string, creds: {
|
|
|
91
120
|
baseUrl: string;
|
|
92
121
|
userId: string;
|
|
93
122
|
}): void;
|
|
94
|
-
/**
|
|
95
|
-
* Get connected WeChat accounts for an instance.
|
|
96
|
-
*/
|
|
97
123
|
export declare function getWeixinAccounts(instanceId: string): Array<{
|
|
98
124
|
accountId: string;
|
|
99
125
|
userId?: string;
|
|
@@ -104,6 +130,8 @@ export declare function getLegacyOpenclawConfigPath(instanceId: string): string;
|
|
|
104
130
|
export declare function getInstanceRuntime(instanceId: string): Record<string, any>;
|
|
105
131
|
export declare function getRuntimeEnvFiles(instanceId: string): string[];
|
|
106
132
|
export declare function getGatewayPort(instanceId: string): number;
|
|
133
|
+
export declare function getListeningHostForPort(port: number): string;
|
|
134
|
+
export declare function getAdvertisedHostForPort(port: number): string;
|
|
107
135
|
export declare function getGatewayHost(instanceId: string): Promise<string>;
|
|
108
136
|
/**
|
|
109
137
|
* Wrap an IPv6 literal in brackets for safe URL host-component / Host-header
|
|
@@ -133,3 +161,18 @@ export declare function reallocateGatewayPort(instanceId: string): Promise<{
|
|
|
133
161
|
export declare function findInstancesSharingGatewayPort(instanceId: string): string[];
|
|
134
162
|
export declare function getRuntimeEnv(instanceId: string): Record<string, string>;
|
|
135
163
|
export { instanceDir as getInstanceDir };
|
|
164
|
+
/**
|
|
165
|
+
* Compatibility shim: allocate a gateway port for a new instance and return
|
|
166
|
+
* just the port number. Wraps `allocateGatewayPort`, which takes a seed port
|
|
167
|
+
* and returns `{ port, skipped }`. Non-OpenClaw app managers don't have an
|
|
168
|
+
* agentType-specific default port yet, so we seed with 18789 (OpenClaw's
|
|
169
|
+
* default) — the allocator walks upward until it finds a free slot so the
|
|
170
|
+
* actual port chosen is independent of the seed.
|
|
171
|
+
*/
|
|
172
|
+
export declare function defaultGatewayPort(instanceId: string): Promise<number>;
|
|
173
|
+
/**
|
|
174
|
+
* Compatibility shim: release a pending port reservation.
|
|
175
|
+
* Mirrors the cli-branch `releasePort(port)` helper on top of the framework's
|
|
176
|
+
* existing `releasePendingPort`.
|
|
177
|
+
*/
|
|
178
|
+
export declare function releasePort(port: number): void;
|