comisai 1.0.24 → 1.0.25
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/node_modules/@comis/agent/package.json +1 -1
- package/node_modules/@comis/channels/package.json +1 -1
- package/node_modules/@comis/cli/package.json +1 -1
- package/node_modules/@comis/core/dist/bootstrap.js +5 -0
- package/node_modules/@comis/core/dist/config/env-layer.d.ts +31 -0
- package/node_modules/@comis/core/dist/config/env-layer.js +41 -0
- package/node_modules/@comis/core/dist/config/layered.d.ts +9 -0
- package/node_modules/@comis/core/dist/config/layered.js +11 -0
- package/node_modules/@comis/core/package.json +1 -1
- package/node_modules/@comis/daemon/dist/daemon.js +3 -0
- package/node_modules/@comis/daemon/package.json +1 -1
- package/node_modules/@comis/gateway/package.json +1 -1
- package/node_modules/@comis/infra/package.json +1 -1
- package/node_modules/@comis/memory/package.json +1 -1
- package/node_modules/@comis/scheduler/package.json +1 -1
- package/node_modules/@comis/shared/package.json +1 -1
- package/node_modules/@comis/skills/package.json +1 -1
- package/node_modules/@comis/web/dist/assets/{agent-detail-BG9MGWWj.js → agent-detail-ru-AhppM.js} +270 -270
- package/node_modules/@comis/web/dist/assets/agent-editor-hjwRuFVp.js +2173 -0
- package/node_modules/@comis/web/dist/assets/{agent-list-LHCJ4rw2.js → agent-list-6Uotjatr.js} +170 -170
- package/node_modules/@comis/web/dist/assets/{approvals-q9VH_IKr.js → approvals-C-K6hN2U.js} +13 -13
- package/node_modules/@comis/web/dist/assets/billing-view-CxysXH0p.js +375 -0
- package/node_modules/@comis/web/dist/assets/{channel-detail-CaInesJM.js → channel-detail-BBCKtmne.js} +265 -265
- package/node_modules/@comis/web/dist/assets/channel-list-FkfeOLBQ.js +323 -0
- package/node_modules/@comis/web/dist/assets/{chat-console-CNmzl0JW.js → chat-console-BumBaIgO.js} +243 -246
- package/node_modules/@comis/web/dist/assets/{config-editor-DX4ITw6y.js → config-editor-C9BSwHGy.js} +477 -477
- package/node_modules/@comis/web/dist/assets/{context-dag-browser-BwiaF5tf.js → context-dag-browser-BHm00mJD.js} +105 -105
- package/node_modules/@comis/web/dist/assets/{context-engine-BZ5Am6hA.js → context-engine-BENY3pWE.js} +136 -136
- package/node_modules/@comis/web/dist/assets/decorate-BvWYovGE.js +38 -0
- package/node_modules/@comis/web/dist/assets/{delivery-view-OfBZof-m.js → delivery-view-BCnkPsAp.js} +134 -134
- package/node_modules/@comis/web/dist/assets/{diagnostics-view-YFwCxgr2.js → diagnostics-view-C_jQFG2H.js} +82 -82
- package/node_modules/@comis/web/dist/assets/directive-BOYXJ-K-.js +1 -0
- package/node_modules/@comis/web/dist/assets/{extract-variables-BM5qyK-s.js → extract-variables-B7-Doo7l.js} +39 -39
- package/node_modules/@comis/web/dist/assets/{ic-array-editor-B7m6x7-S.js → ic-array-editor-BLoEyeLS.js} +29 -29
- package/node_modules/@comis/web/dist/assets/{ic-breadcrumb-CUMpp3BL.js → ic-breadcrumb-DqN6G3gc.js} +16 -16
- package/node_modules/@comis/web/dist/assets/{ic-budget-segment-bar-BtJ6x5mN.js → ic-budget-segment-bar-zLsMzjDO.js} +20 -20
- package/node_modules/@comis/web/dist/assets/ic-chat-message-FdQcZsSQ.js +352 -0
- package/node_modules/@comis/web/dist/assets/{ic-confirm-dialog-CCDbB04e.js → ic-confirm-dialog-DGlPbV1T.js} +26 -26
- package/node_modules/@comis/web/dist/assets/{ic-connection-dot-CnT1b8xr.js → ic-connection-dot-BgYiK2N4.js} +13 -13
- package/node_modules/@comis/web/dist/assets/ic-data-table-CKIvr-ag.js +277 -0
- package/node_modules/@comis/web/dist/assets/ic-delivery-row-B3YwjjuM.js +67 -0
- package/node_modules/@comis/web/dist/assets/{ic-detail-panel-BF83r-if.js → ic-detail-panel-DiCe4hLr.js} +27 -27
- package/node_modules/@comis/web/dist/assets/{ic-empty-state-60l2ePhd.js → ic-empty-state-CM3Wbj2f.js} +19 -19
- package/node_modules/@comis/web/dist/assets/ic-graph-canvas-ByRjij68.js +359 -0
- package/node_modules/@comis/web/dist/assets/ic-icon-BGNCCPpZ.js +33 -0
- package/node_modules/@comis/web/dist/assets/{ic-layer-waterfall-COvEYMg5.js → ic-layer-waterfall-WkaFyu-l.js} +18 -18
- package/node_modules/@comis/web/dist/assets/ic-relative-time-B3UAnTqg.js +12 -0
- package/node_modules/@comis/web/dist/assets/{ic-search-input-CSOxY9g7.js → ic-search-input-B02AGw1i.js} +22 -22
- package/node_modules/@comis/web/dist/assets/{ic-select-Ce-Raudx.js → ic-select-BqfZISjw.js} +29 -29
- package/node_modules/@comis/web/dist/assets/ic-tabs-yBjkWKJH.js +95 -0
- package/node_modules/@comis/web/dist/assets/ic-tag-CvMVQFRR.js +33 -0
- package/node_modules/@comis/web/dist/assets/{ic-time-range-picker-CypCT68y.js → ic-time-range-picker-DXbYeBmY.js} +31 -31
- package/node_modules/@comis/web/dist/assets/{ic-tool-call-7MaXSsCW.js → ic-tool-call-DMPHsLyx.js} +51 -51
- package/node_modules/@comis/web/dist/assets/index-CVEaS9aY.css +2 -0
- package/node_modules/@comis/web/dist/assets/index-FLPhHz8p.js +2792 -0
- package/node_modules/@comis/web/dist/assets/{mcp-management-BNZPnpDn.js → mcp-management-5jyScQis.js} +209 -209
- package/node_modules/@comis/web/dist/assets/{media-config-BBvTYxOX.js → media-config-J9oT9PPs.js} +154 -154
- package/node_modules/@comis/web/dist/assets/{media-test-BkK3RCRK.js → media-test-DGTCtM8-.js} +259 -259
- package/node_modules/@comis/web/dist/assets/{memory-inspector-1hDGCGat.js → memory-inspector-D5Re9ptG.js} +450 -450
- package/node_modules/@comis/web/dist/assets/{message-center-CXefwsUu.js → message-center-cRLK6ZmG.js} +290 -290
- package/node_modules/@comis/web/dist/assets/{models-C1qcU_j3.js → models-D5vu07MR.js} +371 -371
- package/node_modules/@comis/web/dist/assets/observability-types-D0tkwElU.js +1 -0
- package/node_modules/@comis/web/dist/assets/{observe-view-C0VBhX4C.js → observe-view-CalNNEmd.js} +399 -399
- package/node_modules/@comis/web/dist/assets/pipeline-builder-DUYDGwZf.js +1495 -0
- package/node_modules/@comis/web/dist/assets/{pipeline-history-DkfOQ6SW.js → pipeline-history-BAO8brOe.js} +124 -124
- package/node_modules/@comis/web/dist/assets/{pipeline-history-detail-hyHgD0ai.js → pipeline-history-detail-DectIoQt.js} +65 -65
- package/node_modules/@comis/web/dist/assets/{pipeline-list-BPW8hV-q.js → pipeline-list-BHlaBKww.js} +227 -227
- package/node_modules/@comis/web/dist/assets/{pipeline-monitor-Bip16T7e.js → pipeline-monitor-BhtpNEHf.js} +298 -298
- package/node_modules/@comis/web/dist/assets/{scheduler-BGgwKd06.js → scheduler-VafN_8xi.js} +486 -486
- package/node_modules/@comis/web/dist/assets/{security-D15st4xx.js → security-QQXMRTlo.js} +389 -389
- package/node_modules/@comis/web/dist/assets/{session-detail-SGEYNJ0M.js → session-detail-BpZ_8Yih.js} +294 -294
- package/node_modules/@comis/web/dist/assets/session-key-parser-Dkqcj2Ss.js +1 -0
- package/node_modules/@comis/web/dist/assets/session-list-DfCm8Cec.js +231 -0
- package/node_modules/@comis/web/dist/assets/{setup-wizard-nT0tz9QP.js → setup-wizard-C-z477CG.js} +486 -494
- package/node_modules/@comis/web/dist/assets/{skills-D8yVfSUy.js → skills-BCOGPf6s.js} +329 -329
- package/node_modules/@comis/web/dist/assets/{subagents-HHXMeHYo.js → subagents-l-auUraL.js} +74 -74
- package/node_modules/@comis/web/dist/assets/{workspace-manager-BQlr10iH.js → workspace-manager-DlvBixiq.js} +236 -236
- package/node_modules/@comis/web/dist/index.html +3 -2
- package/node_modules/@comis/web/package.json +1 -1
- package/package.json +15 -15
- package/node_modules/@comis/web/dist/assets/agent-editor-C26Q_xCs.js +0 -2173
- package/node_modules/@comis/web/dist/assets/billing-view-CtYvBqTE.js +0 -375
- package/node_modules/@comis/web/dist/assets/channel-list-B8dj3O9a.js +0 -323
- package/node_modules/@comis/web/dist/assets/directive-DoeGSK_T.js +0 -1
- package/node_modules/@comis/web/dist/assets/ic-chat-message-CFyDJd0z.js +0 -352
- package/node_modules/@comis/web/dist/assets/ic-data-table-CKUNTxHw.js +0 -277
- package/node_modules/@comis/web/dist/assets/ic-delivery-row-GP5Fkygs.js +0 -67
- package/node_modules/@comis/web/dist/assets/ic-graph-canvas-C8FuSMe1.js +0 -359
- package/node_modules/@comis/web/dist/assets/ic-icon-xeGTVhVG.js +0 -33
- package/node_modules/@comis/web/dist/assets/ic-relative-time-3FqpjeAI.js +0 -12
- package/node_modules/@comis/web/dist/assets/ic-tabs-B7QtM_v8.js +0 -95
- package/node_modules/@comis/web/dist/assets/ic-tag-CPPUnDLF.js +0 -33
- package/node_modules/@comis/web/dist/assets/index-CEcM1R_C.js +0 -2830
- package/node_modules/@comis/web/dist/assets/index-CIJFuItj.css +0 -1
- package/node_modules/@comis/web/dist/assets/observability-types-D7jUtSde.js +0 -1
- package/node_modules/@comis/web/dist/assets/pipeline-builder-DcUUIrm0.js +0 -1496
- package/node_modules/@comis/web/dist/assets/session-key-parser-DPORMVyU.js +0 -1
- package/node_modules/@comis/web/dist/assets/session-list-6ybUTxbY.js +0 -231
|
@@ -2,6 +2,7 @@ import { ok, err } from "@comis/shared";
|
|
|
2
2
|
import os from "node:os";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { loadLayered } from "./config/layered.js";
|
|
5
|
+
import { buildGatewayEnvLayer } from "./config/env-layer.js";
|
|
5
6
|
import { TypedEventBus } from "./event-bus/index.js";
|
|
6
7
|
import { createSecretManager, safePath } from "./security/index.js";
|
|
7
8
|
import { createPluginRegistry } from "./hooks/plugin-registry.js";
|
|
@@ -44,12 +45,16 @@ export function bootstrap(options) {
|
|
|
44
45
|
// Wrap getSecret to record every name referenced by the config — the set
|
|
45
46
|
// becomes container.platformSecretNames and is used by the exec tool to
|
|
46
47
|
// refuse secretRefs access to platform-managed credentials.
|
|
48
|
+
// envLayer projects operational env vars (COMIS_GATEWAY_HOST/PORT) into
|
|
49
|
+
// the config layer stack at lower priority than YAML files, so explicit
|
|
50
|
+
// user config wins over env — see config/env-layer.ts.
|
|
47
51
|
const referencedNames = new Set();
|
|
48
52
|
const configResult = loadLayered(options.configPaths, {
|
|
49
53
|
getSecret: (key) => {
|
|
50
54
|
referencedNames.add(key);
|
|
51
55
|
return secretManager.get(key);
|
|
52
56
|
},
|
|
57
|
+
envLayer: buildGatewayEnvLayer(env),
|
|
53
58
|
});
|
|
54
59
|
if (!configResult.ok) {
|
|
55
60
|
return err(configResult.error);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Operational env-var → config-layer projection.
|
|
3
|
+
*
|
|
4
|
+
* Bridges container/systemd/pm2 deployments to layered config without a
|
|
5
|
+
* config.yaml. Currently supported:
|
|
6
|
+
*
|
|
7
|
+
* COMIS_GATEWAY_HOST → gateway.host (e.g. "0.0.0.0" inside the Docker image)
|
|
8
|
+
* COMIS_GATEWAY_PORT → gateway.port
|
|
9
|
+
*
|
|
10
|
+
* The returned object is a partial config layer fed to mergeLayered() at
|
|
11
|
+
* lower priority than YAML files: schema defaults < env layer < config.yaml.
|
|
12
|
+
* This keeps explicit user config authoritative — a `gateway.host: 127.0.0.1`
|
|
13
|
+
* in config.yaml is never silently broadened to 0.0.0.0 by an inherited env
|
|
14
|
+
* var, preserving the secure-by-default contract on `gateway.host`.
|
|
15
|
+
*
|
|
16
|
+
* Empty-string host and non-numeric / out-of-range ports are dropped so a
|
|
17
|
+
* typo never silently relocates the daemon.
|
|
18
|
+
*
|
|
19
|
+
* @module
|
|
20
|
+
*/
|
|
21
|
+
/** Subset of env vars consumed by this projection. */
|
|
22
|
+
export interface GatewayEnvSource {
|
|
23
|
+
COMIS_GATEWAY_HOST?: string | undefined;
|
|
24
|
+
COMIS_GATEWAY_PORT?: string | undefined;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Build a partial config layer from env vars. Returns an empty object when
|
|
28
|
+
* no relevant env vars are set (callers can pass through to mergeLayered
|
|
29
|
+
* unconditionally without affecting precedence).
|
|
30
|
+
*/
|
|
31
|
+
export declare function buildGatewayEnvLayer(env: GatewayEnvSource): Record<string, unknown>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
/**
|
|
3
|
+
* Operational env-var → config-layer projection.
|
|
4
|
+
*
|
|
5
|
+
* Bridges container/systemd/pm2 deployments to layered config without a
|
|
6
|
+
* config.yaml. Currently supported:
|
|
7
|
+
*
|
|
8
|
+
* COMIS_GATEWAY_HOST → gateway.host (e.g. "0.0.0.0" inside the Docker image)
|
|
9
|
+
* COMIS_GATEWAY_PORT → gateway.port
|
|
10
|
+
*
|
|
11
|
+
* The returned object is a partial config layer fed to mergeLayered() at
|
|
12
|
+
* lower priority than YAML files: schema defaults < env layer < config.yaml.
|
|
13
|
+
* This keeps explicit user config authoritative — a `gateway.host: 127.0.0.1`
|
|
14
|
+
* in config.yaml is never silently broadened to 0.0.0.0 by an inherited env
|
|
15
|
+
* var, preserving the secure-by-default contract on `gateway.host`.
|
|
16
|
+
*
|
|
17
|
+
* Empty-string host and non-numeric / out-of-range ports are dropped so a
|
|
18
|
+
* typo never silently relocates the daemon.
|
|
19
|
+
*
|
|
20
|
+
* @module
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Build a partial config layer from env vars. Returns an empty object when
|
|
24
|
+
* no relevant env vars are set (callers can pass through to mergeLayered
|
|
25
|
+
* unconditionally without affecting precedence).
|
|
26
|
+
*/
|
|
27
|
+
export function buildGatewayEnvLayer(env) {
|
|
28
|
+
const gateway = {};
|
|
29
|
+
const rawHost = env.COMIS_GATEWAY_HOST;
|
|
30
|
+
if (typeof rawHost === "string" && rawHost.length > 0) {
|
|
31
|
+
gateway["host"] = rawHost;
|
|
32
|
+
}
|
|
33
|
+
const rawPort = env.COMIS_GATEWAY_PORT;
|
|
34
|
+
if (typeof rawPort === "string" && rawPort.length > 0) {
|
|
35
|
+
const parsed = Number.parseInt(rawPort, 10);
|
|
36
|
+
if (Number.isFinite(parsed) && parsed >= 1 && parsed <= 65_535) {
|
|
37
|
+
gateway["port"] = parsed;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return Object.keys(gateway).length > 0 ? { gateway } : {};
|
|
41
|
+
}
|
|
@@ -24,7 +24,16 @@ export declare function mergeLayered(layers: Record<string, unknown>[]): Result<
|
|
|
24
24
|
* This supports the common pattern: defaults.yaml < config.yaml < config.local.yaml
|
|
25
25
|
*
|
|
26
26
|
* If any file fails to load, returns the error immediately.
|
|
27
|
+
*
|
|
28
|
+
* `envLayer` (when provided) is prepended to the layer sequence so it sits
|
|
29
|
+
* between Zod schema defaults and YAML files in precedence order:
|
|
30
|
+
* defaults < envLayer < config files
|
|
31
|
+
* Explicit user config in YAML always wins over env-derived values, which
|
|
32
|
+
* preserves secure-by-default semantics for security-sensitive fields like
|
|
33
|
+
* `gateway.host` — an inherited env var can never silently broaden a bind
|
|
34
|
+
* the operator pinned in config.yaml.
|
|
27
35
|
*/
|
|
28
36
|
export declare function loadLayered(configPaths: string[], options?: {
|
|
29
37
|
getSecret?: (key: string) => string | undefined;
|
|
38
|
+
envLayer?: Record<string, unknown>;
|
|
30
39
|
}): Result<AppConfig, ConfigError>;
|
|
@@ -73,9 +73,20 @@ export function mergeLayered(layers) {
|
|
|
73
73
|
* This supports the common pattern: defaults.yaml < config.yaml < config.local.yaml
|
|
74
74
|
*
|
|
75
75
|
* If any file fails to load, returns the error immediately.
|
|
76
|
+
*
|
|
77
|
+
* `envLayer` (when provided) is prepended to the layer sequence so it sits
|
|
78
|
+
* between Zod schema defaults and YAML files in precedence order:
|
|
79
|
+
* defaults < envLayer < config files
|
|
80
|
+
* Explicit user config in YAML always wins over env-derived values, which
|
|
81
|
+
* preserves secure-by-default semantics for security-sensitive fields like
|
|
82
|
+
* `gateway.host` — an inherited env var can never silently broaden a bind
|
|
83
|
+
* the operator pinned in config.yaml.
|
|
76
84
|
*/
|
|
77
85
|
export function loadLayered(configPaths, options) {
|
|
78
86
|
const layers = [];
|
|
87
|
+
if (options?.envLayer && Object.keys(options.envLayer).length > 0) {
|
|
88
|
+
layers.push(options.envLayer);
|
|
89
|
+
}
|
|
79
90
|
for (const configPath of configPaths) {
|
|
80
91
|
const result = loadConfigFile(configPath, options?.getSecret ? { getSecret: options.getSecret } : undefined);
|
|
81
92
|
if (!result.ok) {
|
|
@@ -1044,6 +1044,9 @@ export async function main(overrides = {}) {
|
|
|
1044
1044
|
};
|
|
1045
1045
|
wireDispatch(rpcDispatchDeps);
|
|
1046
1046
|
// 7. Gateway
|
|
1047
|
+
// gateway.host / .port are resolved through the layered config in bootstrap:
|
|
1048
|
+
// schema defaults < env layer (COMIS_GATEWAY_HOST/PORT) < config.yaml.
|
|
1049
|
+
// See packages/core/src/config/env-layer.ts.
|
|
1047
1050
|
const gwConfig = container.config.gateway;
|
|
1048
1051
|
const { gatewayHandle, activeExecutions, getActiveConnectionCount, wsConnections } = await setupGateway({
|
|
1049
1052
|
container, gwConfig, webhooksConfig: container.config.webhooks, agents, defaultAgentId,
|