@livx.cc/agentx 0.99.16 → 0.99.17
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/{Agent-CvLBalJE.d.ts → Agent-BfQS-MfB.d.ts} +5 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +18 -1
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +18 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as AgentOptions, H as Hooks, h as RunResult, A as Agent } from './Agent-
|
|
2
|
-
export { C as ChatFragment, D as DEFAULT_MUTATING, b as Decision, P as PermissionOptions, c as PermissionPolicy, d as PermissionRule, e as PreToolUseDecision, R as ReasoningEffort, f as RecordingHooks, g as RecordingLifecycle, T as ToolUse, i as ToolUseMeta, j as composeHooks, p as planMode, r as reasoningToChatFragment } from './Agent-
|
|
1
|
+
import { a as AgentOptions, H as Hooks, h as RunResult, A as Agent } from './Agent-BfQS-MfB.js';
|
|
2
|
+
export { C as ChatFragment, D as DEFAULT_MUTATING, b as Decision, P as PermissionOptions, c as PermissionPolicy, d as PermissionRule, e as PreToolUseDecision, R as ReasoningEffort, f as RecordingHooks, g as RecordingLifecycle, T as ToolUse, i as ToolUseMeta, j as composeHooks, p as planMode, r as reasoningToChatFragment } from './Agent-BfQS-MfB.js';
|
|
3
3
|
export { MODEL_ALIASES, ModelSwitch, ResolveModelSwitchOpts, modelShortLabel, resolveModelAlias, resolveModelSwitch } from './models.js';
|
|
4
4
|
import { IFilesystem, FileMetadata } from '@livx.cc/wcli/core';
|
|
5
5
|
export { CommandExecutor, FileMetadata, IFilesystem, IndexedDbFilesystem, MemFilesystem, registerHeadlessCommands } from '@livx.cc/wcli/core';
|
package/dist/index.js
CHANGED
|
@@ -3383,6 +3383,22 @@ var Agent = class _Agent {
|
|
|
3383
3383
|
clearInjections() {
|
|
3384
3384
|
this.pendingInjections.length = 0;
|
|
3385
3385
|
}
|
|
3386
|
+
/** Pull queued injections that are plain TEXT, removing them, for a runtime that can accept mid-turn
|
|
3387
|
+
* steers over its own channel (claude-code's warm InputQueue via `providerOptions.steer`). Non-text
|
|
3388
|
+
* injections (images) stay queued for the step-boundary `drainInjections()` re-open — the text-only
|
|
3389
|
+
* steer channel can't carry them. Consumed DURING chat(); no overlap with drainInjections() (post-call). */
|
|
3390
|
+
drainPendingSteers() {
|
|
3391
|
+
if (!this.pendingInjections.length) return [];
|
|
3392
|
+
const texts = [];
|
|
3393
|
+
this.pendingInjections = this.pendingInjections.filter((c) => {
|
|
3394
|
+
if (typeof c === "string") {
|
|
3395
|
+
texts.push(c);
|
|
3396
|
+
return false;
|
|
3397
|
+
}
|
|
3398
|
+
return true;
|
|
3399
|
+
});
|
|
3400
|
+
return texts;
|
|
3401
|
+
}
|
|
3386
3402
|
/** Fold any host-injected messages into the transcript as user turns. Returns true if any landed. */
|
|
3387
3403
|
drainInjections() {
|
|
3388
3404
|
if (!this.pendingInjections.length) return false;
|
|
@@ -3587,10 +3603,11 @@ var Agent = class _Agent {
|
|
|
3587
3603
|
return typeof raw === "string" ? raw : raw.text;
|
|
3588
3604
|
}
|
|
3589
3605
|
} : void 0;
|
|
3606
|
+
const claudeSteerPo = o.model.startsWith("claude-code/") ? { steer: () => this.drainPendingSteers() } : void 0;
|
|
3590
3607
|
const reasonOpts = {
|
|
3591
3608
|
...frag,
|
|
3592
3609
|
...o.promptCache ? { promptCache: true } : {},
|
|
3593
|
-
...o.providerOptions || cursorPo ? { providerOptions: { ...frag.providerOptions, ...o.providerOptions, ...cursorPo } } : {}
|
|
3610
|
+
...o.providerOptions || cursorPo || claudeSteerPo ? { providerOptions: { ...frag.providerOptions, ...o.providerOptions, ...cursorPo, ...claudeSteerPo } } : {}
|
|
3594
3611
|
};
|
|
3595
3612
|
try {
|
|
3596
3613
|
for (let attempt = 0; ; attempt++) {
|