@cotal-ai/connector-core 0.30.1 → 0.31.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/docs-bundle.generated.js +11 -11
- package/dist/docs-bundle.generated.js.map +1 -1
- package/dist/launch.d.ts +33 -52
- package/dist/launch.d.ts.map +1 -1
- package/dist/launch.js +54 -87
- package/dist/launch.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-bundle.generated.js","sourceRoot":"","sources":["../src/docs-bundle.generated.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,WAAW,GAAe;IACrC,SAAS,EAAE,QAAQ;IACnB,eAAe,EAAE,mEAAmE;IACpF,OAAO,EAAE;QACP;YACE,MAAM,EAAE,eAAe;YACvB,OAAO,EAAE,eAAe;YACxB,MAAM,EAAE,0BAA0B;YAClC,SAAS,EAAE,+FAA+F;YAC1G,MAAM,EAAE,o6IAAo6I;SAC76I;QACD;YACE,MAAM,EAAE,iBAAiB;YACzB,OAAO,EAAE,YAAY;YACrB,MAAM,EAAE,0BAA0B;YAClC,SAAS,EAAE,gHAAgH;YAC3H,MAAM,EAAE,imVAAimV;SAC1mV;QACD;YACE,MAAM,EAAE,cAAc;YACtB,OAAO,EAAE,cAAc;YACvB,MAAM,EAAE,uBAAuB;YAC/B,SAAS,EAAE,wMAAwM;YACnN,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"docs-bundle.generated.js","sourceRoot":"","sources":["../src/docs-bundle.generated.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,WAAW,GAAe;IACrC,SAAS,EAAE,QAAQ;IACnB,eAAe,EAAE,mEAAmE;IACpF,OAAO,EAAE;QACP;YACE,MAAM,EAAE,eAAe;YACvB,OAAO,EAAE,eAAe;YACxB,MAAM,EAAE,0BAA0B;YAClC,SAAS,EAAE,+FAA+F;YAC1G,MAAM,EAAE,o6IAAo6I;SAC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AAE,kGAAkG;YAC7G,MAAM,EAAE,oyPAAoyP;SAC7yP;QACD;YACE,MAAM,EAAE,WAAW;YACnB,OAAO,EAAE,uBAAuB;YAChC,MAAM,EAAE,uBAAuB;YAC/B,SAAS,EAAE,kGAAkG;YAC7G,MAAM,EAAE,mlNAAmlN;SAC5lN;QACD;YACE,MAAM,EAAE,cAAc;YACtB,OAAO,EAAE,cAAc;YACvB,MAAM,EAAE,qBAAqB;YAC7B,SAAS,EAAE,uHAAuH;YAClI,MAAM,EAAE,m6XAAm6X;SAC56X;QACD;YACE,MAAM,EAAE,WAAW;YACnB,OAAO,EAAE,eAAe;YACxB,MAAM,EAAE,uBAAuB;YAC/B,SAAS,EAAE,kHAAkH;YAC7H,MAAM,EAAE,0/UAA0/U;SACngV;KACF;IACD,MAAM,EAAE;QACN,OAAO,EAAE,0BAA0B;QACnC,MAAM,EAAE,k0qaAAk0qa;KAC30qa;IACD,MAAM,EAAE;QACN,OAAO,EAAE,mCAAmC;QAC5C,MAAM,EAAE,k4yEAAk4yE;KAC34yE;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,oCAAoC;QAC7C,MAAM,EAAE,siUAAsiU;KAC/iU;CACF,CAAC"}
|
package/dist/launch.d.ts
CHANGED
|
@@ -1,66 +1,46 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The spawned-agent env (P3) - the single chokepoint for what a child process sees.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* `
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* ASYMMETRY rather than any single omission: `COTAL_EVENTS` and `COTAL_WORKSPACE_ROOT` are set by
|
|
20
|
-
* opencode/claude/codex and NOT by hermes/pi, `COTAL_CHANNEL` only by claude, `COTAL_VARIANT` only
|
|
21
|
-
* by opencode/codex, the `COTAL_CODEX_*` family only by codex. A hand-maintained deny-list names
|
|
22
|
-
* what its author remembers. The repo has a worked example: six suite files reached main each
|
|
23
|
-
* blanking exactly `COTAL_SPACE`, `COTAL_SERVERS` and `COTAL_CREDS` by hand before spreading
|
|
24
|
-
* `...process.env` into a `cotal attach` child, which let the lifecycle uid, the control token, both
|
|
25
|
-
* identity quads and {@link LAUNCH_MATERIAL_ENV} through to a process that reads connection
|
|
26
|
-
* material. {@link OPERATOR_ENV_KEEP} is the inverse and is safe for the same reason a deny-list is
|
|
27
|
-
* not: every name on it is one no connector assigns per spawn, so a new connector cannot invalidate
|
|
28
|
-
* it by forgetting something.
|
|
29
|
-
*
|
|
30
|
-
* OPT-IN CONTAINMENT: an operator who wants the child confined sets `spawn.env` in the cotal config
|
|
31
|
-
* file; the caller resolves it and passes it as `envAllow`. The child then gets the OS allow-list
|
|
32
|
-
* plus exactly the names declared there, and nothing else.
|
|
33
|
-
*
|
|
34
|
-
* Scope this is HONEST about (P6). NEITHER mode closes filesystem secret access: HOME / XDG /
|
|
35
|
-
* platform config dirs are forwarded either way, so a child with a shell reads ~/.aws, ~/.ssh,
|
|
36
|
-
* ~/.config and ~/.cotal straight off disk. An allow-list stops env-ONLY secrets - an
|
|
37
|
-
* `aws-vault exec` or `op run` shell, CI-injected values - and nothing that has a file behind it.
|
|
38
|
-
* Nor does either mode close model-key exfil: a key-based agent holds its provider key in its own
|
|
39
|
-
* process in order to do inference. What DOES narrow under inherit is that Cotal's own connection
|
|
40
|
-
* material is no longer in the environment at all: {@link materialEnv} moved the credential, the
|
|
41
|
-
* broker address and the control token behind a 0600 file, so what a child now inherits from the
|
|
42
|
-
* `COTAL_*` namespace is a path this function removes, not a secret.
|
|
4
|
+
* Connectors build the child's env as `{ ...launchEnv(...), <COTAL_* identity>, <connector vars> }`
|
|
5
|
+
* and runtimes pass only that env. The default is a fixed OS allow-list, the machine-wide
|
|
6
|
+
* {@link OPERATOR_ENV_KEEP} knobs, connector-declared provider keys, and `mcpKeys` — never the
|
|
7
|
+
* manager's ambient environment. This is both a capability and a session-identity boundary:
|
|
8
|
+
* sockets, temporary credentials, and host markers such as `CLAUDE_CODE_CHILD_SESSION` must not
|
|
9
|
+
* become properties of every seat merely because an ancestor ran `cotal up` inside a host.
|
|
10
|
+
* An operator deliberately expands the boundary only through `spawn.env`.
|
|
11
|
+
*
|
|
12
|
+
* Scope this is HONEST about (P6). This does not close filesystem secret access: HOME / XDG /
|
|
13
|
+
* platform config dirs are forwarded, so a child with a shell reads ~/.aws, ~/.ssh, ~/.config and
|
|
14
|
+
* ~/.cotal straight off disk. An allow-list stops env-ONLY secrets - an `aws-vault exec` or
|
|
15
|
+
* `op run` shell, CI-injected values - and nothing that has a file behind it. Nor does it close
|
|
16
|
+
* model-key exfil: a key-based agent holds its provider key in its own process in order to do
|
|
17
|
+
* inference. Cotal's own connection material is not in the environment at all: {@link materialEnv}
|
|
18
|
+
* moved the credential, the broker address and the control token behind a 0600 file.
|
|
43
19
|
*/
|
|
44
20
|
import { type McpServerSpec } from "@cotal-ai/core";
|
|
21
|
+
/** Model-provider API keys a key-based connector may forward to its child. Other connectors extend
|
|
22
|
+
* this list locally when their supported provider surface is broader. */
|
|
23
|
+
export declare const MODEL_PROVIDER_KEYS: readonly ["OPENCODE_API_KEY", "ANTHROPIC_API_KEY", "OPENAI_API_KEY", "OPENROUTER_API_KEY", "NOUS_API_KEY"];
|
|
45
24
|
/** The `COTAL_*` an operator sets MACHINE-WIDE, which a child legitimately needs. The qualifying
|
|
46
25
|
* property is not "harmless" but "no connector assigns it per spawn": a name no launch path writes
|
|
47
26
|
* cannot carry one agent's grant into another, which is why this list stays correct as connectors
|
|
48
|
-
* are added and a deny-list would not. `COTAL_HOME` is the load-bearing entry
|
|
49
|
-
* mesh registry, and a child that shells out to `cotal` must resolve the one
|
|
50
|
-
* `COTAL_CODEX_BIN` and its siblings are operator binary overrides, and sit here
|
|
51
|
-
* the neighbouring per-launch `COTAL_CODEX_HOME`/`_CONFIG`/`_TUI`/`_PROMPT` do
|
|
27
|
+
* are added and a deny-list of per-session names would not. `COTAL_HOME` is the load-bearing entry
|
|
28
|
+
* - it redirects the mesh registry, and a child that shells out to `cotal` must resolve the one
|
|
29
|
+
* its parent did. `COTAL_CODEX_BIN` and its siblings are operator binary overrides, and sit here
|
|
30
|
+
* precisely BECAUSE the neighbouring per-launch `COTAL_CODEX_HOME`/`_CONFIG`/`_TUI`/`_PROMPT` do
|
|
31
|
+
* not. Host-session markers (`CLAUDE_CODE_CHILD_SESSION`, `CLAUDECODE`, `CLAUDE_CODE_ENTRYPOINT`,
|
|
32
|
+
* and the analogous names other hosts use to mark a nested session) are never on this list: a
|
|
33
|
+
* seat's transcript/resume behaviour is a property of the seat, never of how many layers up
|
|
34
|
+
* someone once ran `cotal up` inside an agent. Connector-declared auth vars such as
|
|
35
|
+
* `CLAUDE_CODE_OAUTH_TOKEN` are not operator knobs and live on the connector's providerKeys. */
|
|
52
36
|
export declare const OPERATOR_ENV_KEEP: readonly ["COTAL_HOME", "COTAL_FEEDBACK_KEY", "COTAL_FEEDBACK_EMAIL", "COTAL_FEEDBACK_URL", "COTAL_DEFAULT_AGENT", "COTAL_DEFAULT_PERSONA", "COTAL_SKIP_CONNECTOR_SEED", "COTAL_SKIP_ASSIST", "COTAL_DETACH_KEY", "COTAL_COMPLETE_DEBUG", "COTAL_DEBUG", "COTAL_SERVE_HEADLESS", "COTAL_EVENTS_DEFAULT", "COTAL_MEMBERSHIP_INTERVAL_MS", "COTAL_DELIVERY_BROKER_GONE_MS", "COTAL_IDP_TIMEOUT_MS", "COTAL_CODEX_BIN", "COTAL_OPENCODE_BIN", "COTAL_ORCA_BIN"];
|
|
53
37
|
/** Build the base env a spawned agent runs with.
|
|
54
38
|
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* the declared names and `mcpKeys` (the `${VAR}` secrets a shared MCP server references, see
|
|
61
|
-
* {@link mcpServerEnvKeys}). Each is copied BY NAME and only when present. An EMPTY array is a real
|
|
62
|
-
* policy - the OS allow-list alone - and not "unset", which is why the mode is chosen on
|
|
63
|
-
* `!== undefined` rather than on length.
|
|
39
|
+
* The child receives the OS allow-list, {@link OPERATOR_ENV_KEEP}, connector-declared provider
|
|
40
|
+
* keys, `mcpKeys` (the `${VAR}` secrets a shared MCP server references), and names deliberately
|
|
41
|
+
* added by `spawn.env`. There is no inherit mode: omitting `envAllow` adds no extras, never the
|
|
42
|
+
* manager's ambient environment. Host-session markers therefore cannot leak unless a persona or
|
|
43
|
+
* operator names them on `spawn.env`.
|
|
64
44
|
*
|
|
65
45
|
* Allow-list matching is CASE-INSENSITIVE and each value is copied under the OS's OWN key casing:
|
|
66
46
|
* Windows spells these `Path`/`ComSpec`/`windir`, so a canonical-only copy would either miss them
|
|
@@ -68,6 +48,7 @@ export declare const OPERATOR_ENV_KEEP: readonly ["COTAL_HOME", "COTAL_FEEDBACK_
|
|
|
68
48
|
* BOTH `Path` and `PATH` - a case-duplicate Windows process creation chokes on. Keying off the
|
|
69
49
|
* source env's actual casing (one entry per lowercased name) forwards each var exactly once. */
|
|
70
50
|
export declare function launchEnv(opts?: {
|
|
51
|
+
providerKeys?: readonly string[];
|
|
71
52
|
mcpKeys?: readonly string[];
|
|
72
53
|
envAllow?: readonly string[];
|
|
73
54
|
}): Record<string, string>;
|
package/dist/launch.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launch.d.ts","sourceRoot":"","sources":["../src/launch.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"launch.d.ts","sourceRoot":"","sources":["../src/launch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAOL,KAAK,aAAa,EACnB,MAAM,gBAAgB,CAAC;AA0DxB;0EAC0E;AAC1E,eAAO,MAAM,mB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AAM,EAAE,MAAM,CAAC,CAczB;AAED;;;;;;;;;;;;;;;;qFAgBqF;AACrF,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,qBAAqB,EACrB,cAAc,GACf,MAAM,gBAAgB,CAAC;AAExB;;;;;;;;;;;;6CAY6C;AAC7C,wBAAgB,sBAAsB,CACpC,EAAE,EAAE;IAAE,SAAS,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,gBAAgB,EAAE,OAAO,CAAA;CAAE,GAC7E,MAAM,CASR;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,GAC9E,MAAM,CAwCR;AAED;;;;kEAIkE;AAClE,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,MAAM,EAAE,CAcjF"}
|
package/dist/launch.js
CHANGED
|
@@ -1,45 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The spawned-agent env (P3) - the single chokepoint for what a child process sees.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
4
|
+
* Connectors build the child's env as `{ ...launchEnv(...), <COTAL_* identity>, <connector vars> }`
|
|
5
|
+
* and runtimes pass only that env. The default is a fixed OS allow-list, the machine-wide
|
|
6
|
+
* {@link OPERATOR_ENV_KEEP} knobs, connector-declared provider keys, and `mcpKeys` — never the
|
|
7
|
+
* manager's ambient environment. This is both a capability and a session-identity boundary:
|
|
8
|
+
* sockets, temporary credentials, and host markers such as `CLAUDE_CODE_CHILD_SESSION` must not
|
|
9
|
+
* become properties of every seat merely because an ancestor ran `cotal up` inside a host.
|
|
10
|
+
* An operator deliberately expands the boundary only through `spawn.env`.
|
|
9
11
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* The prefix is stripped WHOLESALE rather than by a named deny-list, because the danger is
|
|
19
|
-
* ASYMMETRY rather than any single omission: `COTAL_EVENTS` and `COTAL_WORKSPACE_ROOT` are set by
|
|
20
|
-
* opencode/claude/codex and NOT by hermes/pi, `COTAL_CHANNEL` only by claude, `COTAL_VARIANT` only
|
|
21
|
-
* by opencode/codex, the `COTAL_CODEX_*` family only by codex. A hand-maintained deny-list names
|
|
22
|
-
* what its author remembers. The repo has a worked example: six suite files reached main each
|
|
23
|
-
* blanking exactly `COTAL_SPACE`, `COTAL_SERVERS` and `COTAL_CREDS` by hand before spreading
|
|
24
|
-
* `...process.env` into a `cotal attach` child, which let the lifecycle uid, the control token, both
|
|
25
|
-
* identity quads and {@link LAUNCH_MATERIAL_ENV} through to a process that reads connection
|
|
26
|
-
* material. {@link OPERATOR_ENV_KEEP} is the inverse and is safe for the same reason a deny-list is
|
|
27
|
-
* not: every name on it is one no connector assigns per spawn, so a new connector cannot invalidate
|
|
28
|
-
* it by forgetting something.
|
|
29
|
-
*
|
|
30
|
-
* OPT-IN CONTAINMENT: an operator who wants the child confined sets `spawn.env` in the cotal config
|
|
31
|
-
* file; the caller resolves it and passes it as `envAllow`. The child then gets the OS allow-list
|
|
32
|
-
* plus exactly the names declared there, and nothing else.
|
|
33
|
-
*
|
|
34
|
-
* Scope this is HONEST about (P6). NEITHER mode closes filesystem secret access: HOME / XDG /
|
|
35
|
-
* platform config dirs are forwarded either way, so a child with a shell reads ~/.aws, ~/.ssh,
|
|
36
|
-
* ~/.config and ~/.cotal straight off disk. An allow-list stops env-ONLY secrets - an
|
|
37
|
-
* `aws-vault exec` or `op run` shell, CI-injected values - and nothing that has a file behind it.
|
|
38
|
-
* Nor does either mode close model-key exfil: a key-based agent holds its provider key in its own
|
|
39
|
-
* process in order to do inference. What DOES narrow under inherit is that Cotal's own connection
|
|
40
|
-
* material is no longer in the environment at all: {@link materialEnv} moved the credential, the
|
|
41
|
-
* broker address and the control token behind a 0600 file, so what a child now inherits from the
|
|
42
|
-
* `COTAL_*` namespace is a path this function removes, not a secret.
|
|
12
|
+
* Scope this is HONEST about (P6). This does not close filesystem secret access: HOME / XDG /
|
|
13
|
+
* platform config dirs are forwarded, so a child with a shell reads ~/.aws, ~/.ssh, ~/.config and
|
|
14
|
+
* ~/.cotal straight off disk. An allow-list stops env-ONLY secrets - an `aws-vault exec` or
|
|
15
|
+
* `op run` shell, CI-injected values - and nothing that has a file behind it. Nor does it close
|
|
16
|
+
* model-key exfil: a key-based agent holds its provider key in its own process in order to do
|
|
17
|
+
* inference. Cotal's own connection material is not in the environment at all: {@link materialEnv}
|
|
18
|
+
* moved the credential, the broker address and the control token behind a 0600 file.
|
|
43
19
|
*/
|
|
44
20
|
import { eventChannel, LAUNCH_MATERIAL_ENV, parsePrincipalKey, principalKey, writeLaunchMaterial, } from "@cotal-ai/core";
|
|
45
21
|
/** OS env a coding-agent TUI genuinely needs to run — find its binary (PATH), render (TERM /
|
|
@@ -97,17 +73,27 @@ const OS_ENV_ALLOW = [
|
|
|
97
73
|
"CommonProgramFiles",
|
|
98
74
|
"PUBLIC",
|
|
99
75
|
];
|
|
100
|
-
/**
|
|
101
|
-
*
|
|
102
|
-
|
|
103
|
-
|
|
76
|
+
/** Model-provider API keys a key-based connector may forward to its child. Other connectors extend
|
|
77
|
+
* this list locally when their supported provider surface is broader. */
|
|
78
|
+
export const MODEL_PROVIDER_KEYS = [
|
|
79
|
+
"OPENCODE_API_KEY",
|
|
80
|
+
"ANTHROPIC_API_KEY",
|
|
81
|
+
"OPENAI_API_KEY",
|
|
82
|
+
"OPENROUTER_API_KEY",
|
|
83
|
+
"NOUS_API_KEY",
|
|
84
|
+
];
|
|
104
85
|
/** The `COTAL_*` an operator sets MACHINE-WIDE, which a child legitimately needs. The qualifying
|
|
105
86
|
* property is not "harmless" but "no connector assigns it per spawn": a name no launch path writes
|
|
106
87
|
* cannot carry one agent's grant into another, which is why this list stays correct as connectors
|
|
107
|
-
* are added and a deny-list would not. `COTAL_HOME` is the load-bearing entry
|
|
108
|
-
* mesh registry, and a child that shells out to `cotal` must resolve the one
|
|
109
|
-
* `COTAL_CODEX_BIN` and its siblings are operator binary overrides, and sit here
|
|
110
|
-
* the neighbouring per-launch `COTAL_CODEX_HOME`/`_CONFIG`/`_TUI`/`_PROMPT` do
|
|
88
|
+
* are added and a deny-list of per-session names would not. `COTAL_HOME` is the load-bearing entry
|
|
89
|
+
* - it redirects the mesh registry, and a child that shells out to `cotal` must resolve the one
|
|
90
|
+
* its parent did. `COTAL_CODEX_BIN` and its siblings are operator binary overrides, and sit here
|
|
91
|
+
* precisely BECAUSE the neighbouring per-launch `COTAL_CODEX_HOME`/`_CONFIG`/`_TUI`/`_PROMPT` do
|
|
92
|
+
* not. Host-session markers (`CLAUDE_CODE_CHILD_SESSION`, `CLAUDECODE`, `CLAUDE_CODE_ENTRYPOINT`,
|
|
93
|
+
* and the analogous names other hosts use to mark a nested session) are never on this list: a
|
|
94
|
+
* seat's transcript/resume behaviour is a property of the seat, never of how many layers up
|
|
95
|
+
* someone once ran `cotal up` inside an agent. Connector-declared auth vars such as
|
|
96
|
+
* `CLAUDE_CODE_OAUTH_TOKEN` are not operator knobs and live on the connector's providerKeys. */
|
|
111
97
|
export const OPERATOR_ENV_KEEP = [
|
|
112
98
|
"COTAL_HOME",
|
|
113
99
|
"COTAL_FEEDBACK_KEY",
|
|
@@ -131,15 +117,11 @@ export const OPERATOR_ENV_KEEP = [
|
|
|
131
117
|
];
|
|
132
118
|
/** Build the base env a spawned agent runs with.
|
|
133
119
|
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
* the declared names and `mcpKeys` (the `${VAR}` secrets a shared MCP server references, see
|
|
140
|
-
* {@link mcpServerEnvKeys}). Each is copied BY NAME and only when present. An EMPTY array is a real
|
|
141
|
-
* policy - the OS allow-list alone - and not "unset", which is why the mode is chosen on
|
|
142
|
-
* `!== undefined` rather than on length.
|
|
120
|
+
* The child receives the OS allow-list, {@link OPERATOR_ENV_KEEP}, connector-declared provider
|
|
121
|
+
* keys, `mcpKeys` (the `${VAR}` secrets a shared MCP server references), and names deliberately
|
|
122
|
+
* added by `spawn.env`. There is no inherit mode: omitting `envAllow` adds no extras, never the
|
|
123
|
+
* manager's ambient environment. Host-session markers therefore cannot leak unless a persona or
|
|
124
|
+
* operator names them on `spawn.env`.
|
|
143
125
|
*
|
|
144
126
|
* Allow-list matching is CASE-INSENSITIVE and each value is copied under the OS's OWN key casing:
|
|
145
127
|
* Windows spells these `Path`/`ComSpec`/`windir`, so a canonical-only copy would either miss them
|
|
@@ -147,39 +129,24 @@ export const OPERATOR_ENV_KEEP = [
|
|
|
147
129
|
* BOTH `Path` and `PATH` - a case-duplicate Windows process creation chokes on. Keying off the
|
|
148
130
|
* source env's actual casing (one entry per lowercased name) forwards each var exactly once. */
|
|
149
131
|
export function launchEnv(opts = {}) {
|
|
150
|
-
if (opts.envAllow !== undefined) {
|
|
151
|
-
const env = {};
|
|
152
|
-
// lowercased name -> the OS's actual key casing; one entry per var (the OS env has no case-dup),
|
|
153
|
-
// so every allow-list name resolves to a single source key and the result carries no case-dup.
|
|
154
|
-
const sourceKey = new Map();
|
|
155
|
-
for (const k of Object.keys(process.env))
|
|
156
|
-
sourceKey.set(k.toLowerCase(), k);
|
|
157
|
-
const copy = (name) => {
|
|
158
|
-
const src = sourceKey.get(name.toLowerCase());
|
|
159
|
-
if (src === undefined)
|
|
160
|
-
return;
|
|
161
|
-
const v = process.env[src];
|
|
162
|
-
if (v !== undefined)
|
|
163
|
-
env[src] = v;
|
|
164
|
-
};
|
|
165
|
-
for (const k of OS_ENV_ALLOW)
|
|
166
|
-
copy(k);
|
|
167
|
-
for (const k of [...opts.envAllow, ...(opts.mcpKeys ?? [])])
|
|
168
|
-
copy(k);
|
|
169
|
-
return env;
|
|
170
|
-
}
|
|
171
|
-
// Inherit. `mcpKeys` needs no handling in this mode: a `${VAR}` a shared MCP server references is
|
|
172
|
-
// already in the operator's environment, which is what the child is being given.
|
|
173
|
-
const keep = new Set(OPERATOR_ENV_KEEP);
|
|
174
132
|
const env = {};
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
133
|
+
const sourceKey = new Map();
|
|
134
|
+
for (const k of Object.keys(process.env))
|
|
135
|
+
sourceKey.set(k.toLowerCase(), k);
|
|
136
|
+
const copy = (name) => {
|
|
137
|
+
const src = sourceKey.get(name.toLowerCase());
|
|
138
|
+
if (src === undefined)
|
|
139
|
+
return;
|
|
140
|
+
const v = process.env[src];
|
|
141
|
+
if (v !== undefined)
|
|
142
|
+
env[src] = v;
|
|
143
|
+
};
|
|
144
|
+
for (const k of OS_ENV_ALLOW)
|
|
145
|
+
copy(k);
|
|
146
|
+
for (const k of OPERATOR_ENV_KEEP)
|
|
147
|
+
copy(k);
|
|
148
|
+
for (const k of [...(opts.providerKeys ?? []), ...(opts.mcpKeys ?? []), ...(opts.envAllow ?? [])])
|
|
149
|
+
copy(k);
|
|
183
150
|
return env;
|
|
184
151
|
}
|
|
185
152
|
/** The agent's resolved access policy as `COTAL_*` env, when present. Forwarded by each connector
|
package/dist/launch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launch.js","sourceRoot":"","sources":["../src/launch.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"launch.js","sourceRoot":"","sources":["../src/launch.ts"],"names":[],"mapp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QACf,IAAI,IAAI,CAAC,OAAO;YAAE,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;gBAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC;AACpB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cotal-ai/connector-core",
|
|
3
3
|
"description": "Shared MCP-bridge runtime for Cotal connectors: the mesh agent, cotal_* tools, and hook relay.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.31.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@ag-ui/core": "0.0.57",
|
|
33
33
|
"@nats-io/transport-node": "^3.4.0",
|
|
34
34
|
"@cotal-ai/smoke-kit": "0.0.0",
|
|
35
|
-
"@cotal-ai/core": "0.
|
|
35
|
+
"@cotal-ai/core": "0.31.0"
|
|
36
36
|
},
|
|
37
37
|
"files": [
|
|
38
38
|
"dist"
|