fix: address acp client typing
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
ClientSideConnection,
|
||||
PROTOCOL_VERSION,
|
||||
ndJsonStream,
|
||||
type RequestPermissionRequest,
|
||||
type SessionNotification,
|
||||
} from "@agentclientprotocol/sdk";
|
||||
|
||||
@@ -90,7 +91,7 @@ export async function createAcpClient(opts: AcpClientOptions = {}): Promise<AcpC
|
||||
}
|
||||
|
||||
const input = Writable.toWeb(agent.stdin);
|
||||
const output = Readable.toWeb(agent.stdout) as ReadableStream<Uint8Array>;
|
||||
const output = Readable.toWeb(agent.stdout) as unknown as ReadableStream<Uint8Array>;
|
||||
const stream = ndJsonStream(input, output);
|
||||
|
||||
const client = new ClientSideConnection(
|
||||
@@ -98,7 +99,7 @@ export async function createAcpClient(opts: AcpClientOptions = {}): Promise<AcpC
|
||||
sessionUpdate: async (params: SessionNotification) => {
|
||||
printSessionUpdate(params);
|
||||
},
|
||||
requestPermission: async (params) => {
|
||||
requestPermission: async (params: RequestPermissionRequest) => {
|
||||
console.log("\n[permission requested]", params.toolCall?.title ?? "tool");
|
||||
const allowOnce = params.options.find((option) => option.kind === "allow_once");
|
||||
const fallback = params.options[0];
|
||||
|
||||
@@ -117,11 +117,7 @@ export function registerMemoryCli(program: Command) {
|
||||
.option("--json", "Print JSON")
|
||||
.option("--deep", "Probe embedding provider availability")
|
||||
.option("--index", "Reindex if dirty (implies --deep)")
|
||||
.option(
|
||||
"--index-mode <mode>",
|
||||
"Index mode (auto|batch|direct) when indexing",
|
||||
"auto",
|
||||
)
|
||||
.option("--index-mode <mode>", "Index mode (auto|batch|direct) when indexing", "auto")
|
||||
.option("--progress <mode>", "Progress output (auto|line|log|none)", "auto")
|
||||
.option("--verbose", "Verbose logging", false)
|
||||
.action(async (opts: MemoryCommandOptions) => {
|
||||
@@ -148,12 +144,12 @@ export function registerMemoryCli(program: Command) {
|
||||
await withProgress(
|
||||
{ label: "Checking memory…", total: 2, ...progressOptions },
|
||||
async (progress) => {
|
||||
progress.setLabel("Probing vector…");
|
||||
await manager.probeVectorAvailability();
|
||||
progress.tick();
|
||||
progress.setLabel("Probing embeddings…");
|
||||
embeddingProbe = await manager.probeEmbeddingAvailability();
|
||||
progress.tick();
|
||||
progress.setLabel("Probing vector…");
|
||||
await manager.probeVectorAvailability();
|
||||
progress.tick();
|
||||
progress.setLabel("Probing embeddings…");
|
||||
embeddingProbe = await manager.probeEmbeddingAvailability();
|
||||
progress.tick();
|
||||
},
|
||||
);
|
||||
if (opts.index) {
|
||||
@@ -304,11 +300,7 @@ export function registerMemoryCli(program: Command) {
|
||||
.description("Reindex memory files")
|
||||
.option("--agent <id>", "Agent id (default: default agent)")
|
||||
.option("--force", "Force full reindex", false)
|
||||
.option(
|
||||
"--index-mode <mode>",
|
||||
"Index mode (auto|batch|direct) when indexing",
|
||||
"auto",
|
||||
)
|
||||
.option("--index-mode <mode>", "Index mode (auto|batch|direct) when indexing", "auto")
|
||||
.option("--progress <mode>", "Progress output (auto|line|log|none)", "auto")
|
||||
.action(async (opts: MemoryCommandOptions & { force?: boolean }) => {
|
||||
const rawCfg = loadConfig();
|
||||
|
||||
Reference in New Issue
Block a user