impel-cli 0.20.43 → 0.20.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/package.json +1 -1
- package/src/agents.js +23 -13
- package/src/managedProfileVersion.js +1 -1
package/README.md
CHANGED
|
@@ -188,6 +188,16 @@ impel claude --agent research-agent --print "answer this question"
|
|
|
188
188
|
impel codex --agent research-agent exec "answer this question"
|
|
189
189
|
```
|
|
190
190
|
|
|
191
|
+
Claude profiles also generate `/ask-<agent>` commands for synchronized,
|
|
192
|
+
read-only agents that support direct answers. The generated command invokes
|
|
193
|
+
the exact tenant-bound agent, attributes the response, and returns its answer
|
|
194
|
+
verbatim; the ordinary relay subagent remains available. To suppress these
|
|
195
|
+
additive commands and remove previously generated ones on the next sync, run:
|
|
196
|
+
|
|
197
|
+
```sh
|
|
198
|
+
IMPEL_NATIVE_SLASH_COMMANDS=0 impel agents sync claude
|
|
199
|
+
```
|
|
200
|
+
|
|
191
201
|
Both managed paths verify the selected tenant manifest and generated adapter
|
|
192
202
|
bytes, resolve the canonical native agent name, and omit the normal parent
|
|
193
203
|
specialist instructions. Claude Code receives the explicit 2.1.220 opt-in and
|
package/package.json
CHANGED
package/src/agents.js
CHANGED
|
@@ -88,8 +88,11 @@ function eagerNativeAgentTransportEnabled() {
|
|
|
88
88
|
return process.env.IMPEL_NATIVE_EAGER_TRANSPORT !== "0";
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
function enabledProfileFlag(environment, name) {
|
|
92
|
-
|
|
91
|
+
function enabledProfileFlag(environment, name, { defaultEnabled = false } = {}) {
|
|
92
|
+
const configured = String(environment?.[name] || "").toLowerCase();
|
|
93
|
+
if (["1", "true"].includes(configured)) return true;
|
|
94
|
+
if (["0", "false"].includes(configured)) return false;
|
|
95
|
+
return defaultEnabled;
|
|
93
96
|
}
|
|
94
97
|
|
|
95
98
|
export function nativeParentDirectEnabled(environment = process.env) {
|
|
@@ -97,7 +100,11 @@ export function nativeParentDirectEnabled(environment = process.env) {
|
|
|
97
100
|
}
|
|
98
101
|
|
|
99
102
|
export function nativeSlashCommandsEnabled(environment = process.env) {
|
|
100
|
-
|
|
103
|
+
// This surface is additive: the relay agent remains installed. Keep the
|
|
104
|
+
// explicit false literals as a symmetric rollback for managed profiles.
|
|
105
|
+
return enabledProfileFlag(environment, IMPEL_NATIVE_SLASH_COMMANDS_ENV, {
|
|
106
|
+
defaultEnabled: true,
|
|
107
|
+
});
|
|
101
108
|
}
|
|
102
109
|
const MAX_RETIRED_AGENT_BINDINGS = 50;
|
|
103
110
|
const MAX_NATIVE_AGENT_STATE_BYTES = 512 * 1024;
|
|
@@ -1669,22 +1676,23 @@ function profileIsFresh(profile, tenantId, now, ttlMs) {
|
|
|
1669
1676
|
if (!Array.isArray(manifest.files) || !manifest.contentDigests
|
|
1670
1677
|
|| typeof manifest.contentDigests !== "object"
|
|
1671
1678
|
|| Array.isArray(manifest.contentDigests)) return false;
|
|
1679
|
+
const profileEnvironment = profile.environment ?? process.env;
|
|
1672
1680
|
const expectedDirectProfiles = profile.client === "codex" && profile.directProfiles !== false;
|
|
1673
1681
|
const expectedDirectCodeMode = profile.client === "codex" && profile.directCodeMode !== false;
|
|
1674
1682
|
const expectedNativeParentDirect = profile.client === "claude"
|
|
1675
|
-
&& (profile.nativeParentDirect ?? nativeParentDirectEnabled());
|
|
1683
|
+
&& (profile.nativeParentDirect ?? nativeParentDirectEnabled(profileEnvironment));
|
|
1676
1684
|
const expectedNativeSlashCommands = profile.client === "claude"
|
|
1677
|
-
&& (profile.nativeSlashCommands ?? nativeSlashCommandsEnabled());
|
|
1685
|
+
&& (profile.nativeSlashCommands ?? nativeSlashCommandsEnabled(profileEnvironment));
|
|
1678
1686
|
const expectedNativeIntercept = profile.client === "claude"
|
|
1679
|
-
&& (profile.nativeIntercept ?? nativeInterceptEnabled());
|
|
1687
|
+
&& (profile.nativeIntercept ?? nativeInterceptEnabled(profileEnvironment));
|
|
1680
1688
|
const expectedNativeInterceptTimeoutMs = expectedNativeIntercept
|
|
1681
|
-
? (profile.nativeInterceptTimeoutMs ?? nativeInterceptTimeoutMs())
|
|
1689
|
+
? (profile.nativeInterceptTimeoutMs ?? nativeInterceptTimeoutMs(profileEnvironment))
|
|
1682
1690
|
: null;
|
|
1683
1691
|
const expectedTelemetryEnvironment = nativeAgentTelemetryEnvironment(
|
|
1684
|
-
|
|
1692
|
+
profileEnvironment,
|
|
1685
1693
|
);
|
|
1686
1694
|
const expectedBenchmark = nativeBenchmarkHeaderValue(
|
|
1687
|
-
|
|
1695
|
+
profileEnvironment,
|
|
1688
1696
|
) !== null;
|
|
1689
1697
|
if (manifest.directProfiles !== expectedDirectProfiles
|
|
1690
1698
|
|| manifest.directCodeMode !== expectedDirectCodeMode
|
|
@@ -1729,11 +1737,13 @@ export function syncAgentProfile({
|
|
|
1729
1737
|
agents,
|
|
1730
1738
|
directProfiles = client === "codex",
|
|
1731
1739
|
directCodeMode = client === "codex",
|
|
1732
|
-
nativeParentDirect = client === "claude" && nativeParentDirectEnabled(),
|
|
1733
|
-
nativeSlashCommands = client === "claude" && nativeSlashCommandsEnabled(),
|
|
1734
|
-
nativeIntercept = client === "claude" && nativeInterceptEnabled(),
|
|
1735
|
-
nativeInterceptTimeoutMs: interceptTimeoutMs = nativeIntercept ? nativeInterceptTimeoutMs() : null,
|
|
1736
1740
|
environment = process.env,
|
|
1741
|
+
nativeParentDirect = client === "claude" && nativeParentDirectEnabled(environment),
|
|
1742
|
+
nativeSlashCommands = client === "claude" && nativeSlashCommandsEnabled(environment),
|
|
1743
|
+
nativeIntercept = client === "claude" && nativeInterceptEnabled(environment),
|
|
1744
|
+
nativeInterceptTimeoutMs: interceptTimeoutMs = nativeIntercept
|
|
1745
|
+
? nativeInterceptTimeoutMs(environment)
|
|
1746
|
+
: null,
|
|
1737
1747
|
invocation = null,
|
|
1738
1748
|
now = Date.now(),
|
|
1739
1749
|
nativeAgentRunsRoot = path.join(CONFIG_DIR, "native-agent-runs"),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// Fleet generation shared by managed-profile writers and upstream clients.
|
|
2
2
|
// Keep this isolated from apps.js so latency-sensitive transports do not load
|
|
3
3
|
// desktop bundle machinery just to identify their managed config contract.
|
|
4
|
-
export const CURRENT_CONFIG_VERSION =
|
|
4
|
+
export const CURRENT_CONFIG_VERSION = 36;
|