@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
|
@@ -381,6 +381,11 @@ declare class Agent {
|
|
|
381
381
|
/** Drop any queued-but-unconsumed injections. The REPL calls this after a LOCAL command (/cmd, !bash)
|
|
382
382
|
* — which runs no send() to drain them — so a mid-command steer can't leak into the next real turn. */
|
|
383
383
|
clearInjections(): void;
|
|
384
|
+
/** Pull queued injections that are plain TEXT, removing them, for a runtime that can accept mid-turn
|
|
385
|
+
* steers over its own channel (claude-code's warm InputQueue via `providerOptions.steer`). Non-text
|
|
386
|
+
* injections (images) stay queued for the step-boundary `drainInjections()` re-open — the text-only
|
|
387
|
+
* steer channel can't carry them. Consumed DURING chat(); no overlap with drainInjections() (post-call). */
|
|
388
|
+
drainPendingSteers(): string[];
|
|
384
389
|
/** Fold any host-injected messages into the transcript as user turns. Returns true if any landed. */
|
|
385
390
|
private drainInjections;
|
|
386
391
|
constructor(options?: Partial<AgentOptions>);
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
import { H as Hooks, h as RunResult, R as ReasoningEffort, A as Agent } from './Agent-
|
|
2
|
+
import { H as Hooks, h as RunResult, R as ReasoningEffort, A as Agent } from './Agent-BfQS-MfB.js';
|
|
3
3
|
import { IFilesystem } from '@livx.cc/wcli/core';
|
|
4
4
|
import { M as Message, H as HostBridge, c as ContentPart, e as MessageContent } from './tools-DKf3hN4M.js';
|
|
5
5
|
|
package/dist/cli.js
CHANGED
|
@@ -3421,6 +3421,22 @@ var Agent = class _Agent {
|
|
|
3421
3421
|
clearInjections() {
|
|
3422
3422
|
this.pendingInjections.length = 0;
|
|
3423
3423
|
}
|
|
3424
|
+
/** Pull queued injections that are plain TEXT, removing them, for a runtime that can accept mid-turn
|
|
3425
|
+
* steers over its own channel (claude-code's warm InputQueue via `providerOptions.steer`). Non-text
|
|
3426
|
+
* injections (images) stay queued for the step-boundary `drainInjections()` re-open — the text-only
|
|
3427
|
+
* steer channel can't carry them. Consumed DURING chat(); no overlap with drainInjections() (post-call). */
|
|
3428
|
+
drainPendingSteers() {
|
|
3429
|
+
if (!this.pendingInjections.length) return [];
|
|
3430
|
+
const texts = [];
|
|
3431
|
+
this.pendingInjections = this.pendingInjections.filter((c) => {
|
|
3432
|
+
if (typeof c === "string") {
|
|
3433
|
+
texts.push(c);
|
|
3434
|
+
return false;
|
|
3435
|
+
}
|
|
3436
|
+
return true;
|
|
3437
|
+
});
|
|
3438
|
+
return texts;
|
|
3439
|
+
}
|
|
3424
3440
|
/** Fold any host-injected messages into the transcript as user turns. Returns true if any landed. */
|
|
3425
3441
|
drainInjections() {
|
|
3426
3442
|
if (!this.pendingInjections.length) return false;
|
|
@@ -3625,10 +3641,11 @@ var Agent = class _Agent {
|
|
|
3625
3641
|
return typeof raw === "string" ? raw : raw.text;
|
|
3626
3642
|
}
|
|
3627
3643
|
} : void 0;
|
|
3644
|
+
const claudeSteerPo = o.model.startsWith("claude-code/") ? { steer: () => this.drainPendingSteers() } : void 0;
|
|
3628
3645
|
const reasonOpts = {
|
|
3629
3646
|
...frag,
|
|
3630
3647
|
...o.promptCache ? { promptCache: true } : {},
|
|
3631
|
-
...o.providerOptions || cursorPo ? { providerOptions: { ...frag.providerOptions, ...o.providerOptions, ...cursorPo } } : {}
|
|
3648
|
+
...o.providerOptions || cursorPo || claudeSteerPo ? { providerOptions: { ...frag.providerOptions, ...o.providerOptions, ...cursorPo, ...claudeSteerPo } } : {}
|
|
3632
3649
|
};
|
|
3633
3650
|
try {
|
|
3634
3651
|
for (let attempt = 0; ; attempt++) {
|