qlogicagent 2.3.0 → 2.4.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.
Files changed (65) hide show
  1. package/dist/agent.js +6 -6
  2. package/dist/cli.js +212 -211
  3. package/dist/index.js +211 -210
  4. package/dist/orchestration.js +2 -2
  5. package/dist/protocol.js +1 -0
  6. package/dist/types/agent/tunable-defaults.d.ts +4 -0
  7. package/dist/types/agent/types.d.ts +24 -100
  8. package/dist/types/cli/stdio-server.d.ts +7 -0
  9. package/dist/types/cli/tool-bootstrap.d.ts +6 -0
  10. package/dist/types/contracts/index.d.ts +2 -3
  11. package/dist/types/llm/provider-def.d.ts +3 -0
  12. package/dist/types/llm/transport.d.ts +25 -25
  13. package/dist/types/llm/transports/anthropic-messages.d.ts +2 -2
  14. package/dist/types/llm/transports/gemini-generatecontent.d.ts +2 -2
  15. package/dist/types/llm/transports/openai-chat.d.ts +2 -2
  16. package/dist/types/llm/transports/openai-responses.d.ts +9 -9
  17. package/dist/types/llm/transports/volcengine-responses.d.ts +11 -11
  18. package/dist/types/orchestration/agent-instance.d.ts +15 -0
  19. package/dist/types/orchestration/solo-evaluator.d.ts +7 -0
  20. package/dist/types/orchestration/tool-loop/tool-choice-policy.d.ts +1 -1
  21. package/dist/types/protocol/methods.d.ts +143 -53
  22. package/dist/types/protocol/notifications.d.ts +4 -514
  23. package/dist/types/protocol/wire/acp-protocol.d.ts +411 -0
  24. package/dist/types/protocol/wire/agent-events.d.ts +32 -0
  25. package/dist/types/protocol/wire/agent-methods.d.ts +587 -0
  26. package/dist/types/protocol/wire/agent-rpc.d.ts +97 -0
  27. package/dist/types/protocol/wire/capability-manifest.d.ts +111 -0
  28. package/dist/types/protocol/wire/capability-transport.d.ts +207 -0
  29. package/dist/types/protocol/wire/channel-ingress.d.ts +29 -0
  30. package/dist/types/protocol/wire/channel.d.ts +89 -0
  31. package/dist/types/protocol/wire/chat-types.d.ts +87 -0
  32. package/dist/types/protocol/wire/checkpoint-runtime.d.ts +61 -0
  33. package/dist/types/protocol/wire/checkpoint.d.ts +72 -0
  34. package/dist/types/protocol/wire/execution.d.ts +391 -0
  35. package/dist/types/protocol/wire/gateway-rpc.d.ts +314 -0
  36. package/dist/types/protocol/wire/gateway.d.ts +62 -0
  37. package/dist/types/protocol/wire/hook-protocol.d.ts +37 -0
  38. package/dist/types/protocol/wire/index.d.ts +25 -0
  39. package/dist/types/protocol/wire/memory-provider-lifecycle.d.ts +80 -0
  40. package/dist/types/protocol/wire/notification-payloads.d.ts +581 -0
  41. package/dist/types/protocol/wire/provider-runtime-contract.d.ts +66 -0
  42. package/dist/types/protocol/wire/provider-runtime-core.d.ts +147 -0
  43. package/dist/types/protocol/wire/provider-runtime-io.d.ts +20 -0
  44. package/dist/types/protocol/wire/resource-manifest.d.ts +68 -0
  45. package/dist/types/protocol/wire/session.d.ts +32 -0
  46. package/dist/types/protocol/wire/thread-protocol.d.ts +157 -0
  47. package/dist/types/protocol/wire/transport.d.ts +57 -0
  48. package/dist/types/protocol/wire/turn.d.ts +208 -0
  49. package/dist/types/protocol/wire/web-capability.d.ts +51 -0
  50. package/dist/types/runtime/hooks/memory-hooks.d.ts +2 -2
  51. package/dist/types/runtime/infra/acp-types.d.ts +3 -142
  52. package/dist/types/runtime/infra/token-budget.d.ts +3 -3
  53. package/dist/types/runtime/session/index.d.ts +1 -1
  54. package/dist/types/runtime/session/session-memory.d.ts +46 -0
  55. package/dist/types/runtime/session/session-persistence.d.ts +34 -8
  56. package/dist/types/runtime/session/session-state.d.ts +4 -4
  57. package/dist/types/skills/memory/memory-tool.d.ts +1 -1
  58. package/dist/types/skills/memory/qmemory-adapter.d.ts +1 -1
  59. package/dist/types/skills/permissions/hook-runner.d.ts +4 -4
  60. package/dist/types/skills/permissions/permission-classifier.d.ts +2 -2
  61. package/dist/types/skills/tools/project-switch-tool.d.ts +24 -0
  62. package/dist/types/skills/tools.d.ts +5 -5
  63. package/dist/types/transport/acp-event-emitter.d.ts +1 -1
  64. package/dist/types/transport/acp-server.d.ts +17 -10
  65. package/package.json +14 -3
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Volcengine Responses API Transport SSE streaming implementation.
2
+ * Volcengine Responses API Transport 鈥?SSE streaming implementation.
3
3
  *
4
4
  * Implements the fire mountain ark Responses API (`/api/v3/responses`),
5
5
  * which is the officially recommended primary path for Doubao LLM text generation
@@ -37,9 +37,9 @@ export declare class VolcengineResponsesTransport implements LLMTransport {
37
37
  stream(request: LLMRequest, apiKey: string, signal?: AbortSignal): AsyncGenerator<LLMChunk>;
38
38
  /**
39
39
  * Resolve known Volcengine Responses API incompatibilities:
40
- * - instructions + caching drop caching (§20.7)
41
- * - caching + json_schema downgrade to json_object (§20.10)
42
- * - caching + builtin_web_search/image_process drop those builtin tools
40
+ * - instructions + caching 鈫?drop caching (20.7)
41
+ * - caching + json_schema 鈫?downgrade to json_object (20.10)
42
+ * - caching + builtin_web_search/image_process 鈫?drop those builtin tools
43
43
  * Returns a shallow copy with fields adjusted; never mutates the original.
44
44
  */
45
45
  private resolveConstraints;
@@ -51,13 +51,13 @@ export declare class VolcengineResponsesTransport implements LLMTransport {
51
51
  *
52
52
  * Event format: "event: <type>\ndata: <json>\n\n"
53
53
  * Key events:
54
- * - response.output_text.delta text content delta
55
- * - response.reasoning_summary_text.delta thinking/reasoning text
56
- * - response.function_call_arguments.delta tool call arguments streaming
57
- * - response.output_item.added new output item started
58
- * - response.output_item.done output item completed
59
- * - response.completed full response complete with usage
60
- * - response.failed error
54
+ * - response.output_text.delta 鈫?text content delta
55
+ * - response.reasoning_summary_text.delta 鈫?thinking/reasoning text
56
+ * - response.function_call_arguments.delta 鈫?tool call arguments streaming
57
+ * - response.output_item.added 鈫?new output item started
58
+ * - response.output_item.done 鈫?output item completed
59
+ * - response.completed 鈫?full response complete with usage
60
+ * - response.failed 鈫?error
61
61
  */
62
62
  private parseSSEStream;
63
63
  private processEvent;
@@ -26,6 +26,19 @@ export interface ProductCallbacks {
26
26
  onCheckpointed?: (productId: string, timestamp: string) => void;
27
27
  onBudgetWarning?: (productId: string, usedTokens: number, maxTotalTokens: number, percentage: number) => void;
28
28
  onCompleted?: (productId: string, summary: string) => void;
29
+ /** DAG topology resolved and sent to client for visualization. */
30
+ onDagTopology?: (productId: string, nodes: {
31
+ id: string;
32
+ label: string;
33
+ deps: string[];
34
+ }[], edges: {
35
+ from: string;
36
+ to: string;
37
+ }[]) => void;
38
+ /** Real-time budget consumption update. */
39
+ onBudgetUpdate?: (productId: string, inputTokens: number, outputTokens: number, elapsed: number, maxTotalTokens?: number) => void;
40
+ /** Streaming text output from a running task. */
41
+ onTaskOutputDelta?: (productId: string, taskId: string, text: string) => void;
29
42
  }
30
43
  export declare class ProductOrchestrator {
31
44
  private processManager;
@@ -46,6 +59,8 @@ export declare class ProductOrchestrator {
46
59
  checkpoint(productId: string): Promise<void>;
47
60
  /** Delete a product session, pausing first if active. */
48
61
  delete(productId: string): Promise<void>;
62
+ /** Rollback a product to a checkpoint: delete running session then resume from disk. */
63
+ rollback(productId: string, _checkpoint: string): Promise<void>;
49
64
  /** Get product status. */
50
65
  getStatus(productId: string): ProductStatus | null;
51
66
  /** List all products (in-memory + on-disk). */
@@ -24,6 +24,13 @@ export interface SoloCallbacks {
24
24
  onEvaluation?: (soloId: string, evaluation: SoloEvaluation) => void;
25
25
  /** Streaming text delta from a competing agent (forwarded from child process). */
26
26
  onAgentDelta?: (soloId: string, agentId: string, text: string) => void;
27
+ /** File diff produced by a completed agent. */
28
+ onAgentDiff?: (soloId: string, agentId: string, files: {
29
+ path: string;
30
+ hunks: string;
31
+ }[]) => void;
32
+ /** Token usage report after agent completes. */
33
+ onAgentUsage?: (soloId: string, agentId: string, inputTokens: number, outputTokens: number) => void;
27
34
  }
28
35
  export declare class SoloEvaluator {
29
36
  private processManager;
@@ -1,4 +1,4 @@
1
- import type { RuntimeToolEligibilityContract } from "qlogicagent-runtime-contracts";
1
+ import type { RuntimeToolEligibilityContract } from "../../protocol/wire/index.js";
2
2
  export type ToolChoiceLike = "auto" | "none" | "required" | {
3
3
  type: "function";
4
4
  function?: {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Centralized RPC Method Protocol all JSON-RPC request methods
2
+ * Centralized RPC Method Protocol 鈥?all JSON-RPC request methods
3
3
  * that qlogicagent exposes to external apps.
4
4
  *
5
5
  * This is the SINGLE SOURCE OF TRUTH for the agent's inbound API contract.
@@ -8,7 +8,8 @@
8
8
  */
9
9
  import type { ChatMessage, ToolDefinition } from "../agent/types.js";
10
10
  import type { TodoItem } from "../contracts/todo.js";
11
- import type { AgentDescriptor, AgentConfig, AgentsScanParams, AgentsConfigParams, AgentsSetConfigParams, AgentsGetConfigParams, AgentsRemoveConfigParams, AgentsSetGatewayParams, SoloStatus, SoloStartParams, SoloIdParams, SoloSelectParams, ProductCreateParams, ProductIdParams, ProductStatus, ProductSummary } from "../runtime/infra/acp-types.js";
11
+ import type { AgentDescriptor, AgentConfig, GatewayRpcMethodMap, RpcProjectInfo, RpcProjectType, RpcProjectStatus, SoloStatus, ProductStatus, ProductSummary } from "./wire/index.js";
12
+ import type { AgentsScanParams, AgentsConfigParams, AgentsSetConfigParams, AgentsGetConfigParams, AgentsRemoveConfigParams, AgentsSetGatewayParams, SoloStartParams, SoloIdParams, SoloSelectParams, ProductCreateParams, ProductIdParams } from "../runtime/infra/acp-types.js";
12
13
  export interface InitializeParams {
13
14
  protocolVersion: string;
14
15
  host?: {
@@ -125,6 +126,8 @@ export interface SessionGetInfoResult {
125
126
  totalCost?: number;
126
127
  };
127
128
  }
129
+ export type SessionGetMessagesParams = GatewayRpcMethodMap["session.getMessages"]["params"];
130
+ export type SessionGetMessagesResult = GatewayRpcMethodMap["session.getMessages"]["result"];
128
131
  export interface MemoryListParams {
129
132
  /** Filter by source: "local" (md files), "store" (in-memory), "qmemory" (remote). */
130
133
  source?: "local" | "store" | "qmemory" | "all";
@@ -177,7 +180,7 @@ export interface MemoryDreamResult {
177
180
  export interface ToolsListParams {
178
181
  /** Filter by category. */
179
182
  category?: "builtin" | "mcp" | "plugin" | "all";
180
- /** Include full parameter schemas (default false names only). */
183
+ /** Include full parameter schemas (default false 鈥?names only). */
181
184
  includeSchema?: boolean;
182
185
  }
183
186
  export interface ToolsListResult {
@@ -302,56 +305,59 @@ export interface TasksCancelResult {
302
305
  ok: boolean;
303
306
  message: string;
304
307
  }
305
- export type ProjectType = "default" | "personal" | "group";
306
- export type ProjectStatus = "active" | "archived";
307
- export interface ProjectInfo {
308
- id: string;
309
- name: string;
310
- workspaceDir: string;
311
- type: ProjectType;
312
- status: ProjectStatus;
313
- groupId?: string;
314
- createdAt: string;
315
- updatedAt: string;
316
- }
317
- export interface ProjectCreateParams {
318
- name: string;
319
- workspaceDir: string;
320
- type?: ProjectType;
321
- groupId?: string;
322
- }
323
- export interface ProjectCreateResult {
324
- ok: boolean;
325
- project: ProjectInfo;
326
- }
327
- export interface ProjectListParams {
328
- }
329
- export interface ProjectListResult {
330
- projects: ProjectInfo[];
331
- }
332
- export interface ProjectDeleteParams {
333
- projectId: string;
334
- }
335
- export interface ProjectDeleteResult {
336
- ok: boolean;
337
- switchedTo?: ProjectInfo;
338
- }
339
- export interface SessionSwitchProjectParams {
340
- projectId?: string;
341
- projectName?: string;
342
- workspaceDir?: string;
343
- }
344
- export interface SessionSwitchProjectResult {
345
- ok: boolean;
346
- project: ProjectInfo;
347
- }
348
- export interface SessionGetStateParams {
349
- }
350
- export interface SessionGetStateResult {
351
- sessionId: string;
352
- activeProject: ProjectInfo | null;
353
- projects: ProjectInfo[];
354
- }
308
+ export type ProjectType = RpcProjectType;
309
+ export type ProjectStatus = RpcProjectStatus;
310
+ export type ProjectInfo = RpcProjectInfo;
311
+ export type ProjectCreateParams = GatewayRpcMethodMap["project.create"]["params"];
312
+ export type ProjectCreateResult = GatewayRpcMethodMap["project.create"]["result"];
313
+ export type ProjectListParams = GatewayRpcMethodMap["project.list"]["params"];
314
+ export type ProjectListResult = GatewayRpcMethodMap["project.list"]["result"];
315
+ export type ProjectDeleteParams = GatewayRpcMethodMap["project.delete"]["params"];
316
+ export type ProjectDeleteResult = GatewayRpcMethodMap["project.delete"]["result"];
317
+ export type ProjectRenameParams = GatewayRpcMethodMap["project.rename"]["params"];
318
+ export type ProjectRenameResult = GatewayRpcMethodMap["project.rename"]["result"];
319
+ export type ProjectArchiveParams = GatewayRpcMethodMap["project.archive"]["params"];
320
+ export type ProjectArchiveResult = GatewayRpcMethodMap["project.archive"]["result"];
321
+ export type ProjectUnarchiveParams = GatewayRpcMethodMap["project.unarchive"]["params"];
322
+ export type ProjectUnarchiveResult = GatewayRpcMethodMap["project.unarchive"]["result"];
323
+ export type ProjectArchiveByGroupParams = GatewayRpcMethodMap["project.archiveByGroup"]["params"];
324
+ export type ProjectArchiveByGroupResult = GatewayRpcMethodMap["project.archiveByGroup"]["result"];
325
+ export type SessionCreateParams = GatewayRpcMethodMap["session.create"]["params"];
326
+ export type SessionCreateResult = GatewayRpcMethodMap["session.create"]["result"];
327
+ export type SessionListParams = GatewayRpcMethodMap["session.list"]["params"];
328
+ export type SessionListResult = GatewayRpcMethodMap["session.list"]["result"];
329
+ export type SessionGetParams = GatewayRpcMethodMap["session.get"]["params"];
330
+ export type SessionGetResult = GatewayRpcMethodMap["session.get"]["result"];
331
+ export type SessionUpdateParams = GatewayRpcMethodMap["session.update"]["params"];
332
+ export type SessionUpdateResult = GatewayRpcMethodMap["session.update"]["result"];
333
+ export type SessionDeleteParams = GatewayRpcMethodMap["session.delete"]["params"];
334
+ export type SessionDeleteResult = GatewayRpcMethodMap["session.delete"]["result"];
335
+ export type SessionArchiveParams = GatewayRpcMethodMap["session.archive"]["params"];
336
+ export type SessionArchiveResult = GatewayRpcMethodMap["session.archive"]["result"];
337
+ export type InstructionsListParams = GatewayRpcMethodMap["instructions.list"]["params"];
338
+ export type InstructionsListResult = GatewayRpcMethodMap["instructions.list"]["result"];
339
+ export type InstructionsReadParams = GatewayRpcMethodMap["instructions.read"]["params"];
340
+ export type InstructionsReadResult = GatewayRpcMethodMap["instructions.read"]["result"];
341
+ export type InstructionsWriteParams = GatewayRpcMethodMap["instructions.write"]["params"];
342
+ export type InstructionsWriteResult = GatewayRpcMethodMap["instructions.write"]["result"];
343
+ export type InstructionsDeleteParams = GatewayRpcMethodMap["instructions.delete"]["params"];
344
+ export type InstructionsDeleteResult = GatewayRpcMethodMap["instructions.delete"]["result"];
345
+ export type FilesListParams = GatewayRpcMethodMap["files.list"]["params"];
346
+ export type FilesListResult = GatewayRpcMethodMap["files.list"]["result"];
347
+ export type FilesReadParams = GatewayRpcMethodMap["files.read"]["params"];
348
+ export type FilesReadResult = GatewayRpcMethodMap["files.read"]["result"];
349
+ export type FilesCreateParams = GatewayRpcMethodMap["files.create"]["params"];
350
+ export type FilesCreateResult = GatewayRpcMethodMap["files.create"]["result"];
351
+ export type FilesRenameParams = GatewayRpcMethodMap["files.rename"]["params"];
352
+ export type FilesRenameResult = GatewayRpcMethodMap["files.rename"]["result"];
353
+ export type FilesDeleteParams = GatewayRpcMethodMap["files.delete"]["params"];
354
+ export type FilesDeleteResult = GatewayRpcMethodMap["files.delete"]["result"];
355
+ export type FilesGitStatusParams = GatewayRpcMethodMap["files.gitStatus"]["params"];
356
+ export type FilesGitStatusResult = GatewayRpcMethodMap["files.gitStatus"]["result"];
357
+ export type SessionSwitchProjectParams = GatewayRpcMethodMap["session.switchProject"]["params"];
358
+ export type SessionSwitchProjectResult = GatewayRpcMethodMap["session.switchProject"]["result"];
359
+ export type SessionGetStateParams = GatewayRpcMethodMap["session.getState"]["params"];
360
+ export type SessionGetStateResult = GatewayRpcMethodMap["session.getState"]["result"];
355
361
  export interface RpcMethodMap {
356
362
  "initialize": {
357
363
  params: InitializeParams;
@@ -377,6 +383,10 @@ export interface RpcMethodMap {
377
383
  params: SessionGetInfoParams;
378
384
  result: SessionGetInfoResult;
379
385
  };
386
+ "session.getMessages": {
387
+ params: SessionGetMessagesParams;
388
+ result: SessionGetMessagesResult;
389
+ };
380
390
  "memory.list": {
381
391
  params: MemoryListParams;
382
392
  result: MemoryListResult;
@@ -546,6 +556,22 @@ export interface RpcMethodMap {
546
556
  params: ProjectDeleteParams;
547
557
  result: ProjectDeleteResult;
548
558
  };
559
+ "project.rename": {
560
+ params: ProjectRenameParams;
561
+ result: ProjectRenameResult;
562
+ };
563
+ "project.archive": {
564
+ params: ProjectArchiveParams;
565
+ result: ProjectArchiveResult;
566
+ };
567
+ "project.unarchive": {
568
+ params: ProjectUnarchiveParams;
569
+ result: ProjectUnarchiveResult;
570
+ };
571
+ "project.archiveByGroup": {
572
+ params: ProjectArchiveByGroupParams;
573
+ result: ProjectArchiveByGroupResult;
574
+ };
549
575
  "session.switchProject": {
550
576
  params: SessionSwitchProjectParams;
551
577
  result: SessionSwitchProjectResult;
@@ -554,6 +580,70 @@ export interface RpcMethodMap {
554
580
  params: SessionGetStateParams;
555
581
  result: SessionGetStateResult;
556
582
  };
583
+ "session.create": {
584
+ params: SessionCreateParams;
585
+ result: SessionCreateResult;
586
+ };
587
+ "session.list": {
588
+ params: SessionListParams;
589
+ result: SessionListResult;
590
+ };
591
+ "session.get": {
592
+ params: SessionGetParams;
593
+ result: SessionGetResult;
594
+ };
595
+ "session.update": {
596
+ params: SessionUpdateParams;
597
+ result: SessionUpdateResult;
598
+ };
599
+ "session.delete": {
600
+ params: SessionDeleteParams;
601
+ result: SessionDeleteResult;
602
+ };
603
+ "session.archive": {
604
+ params: SessionArchiveParams;
605
+ result: SessionArchiveResult;
606
+ };
607
+ "instructions.list": {
608
+ params: InstructionsListParams;
609
+ result: InstructionsListResult;
610
+ };
611
+ "instructions.read": {
612
+ params: InstructionsReadParams;
613
+ result: InstructionsReadResult;
614
+ };
615
+ "instructions.write": {
616
+ params: InstructionsWriteParams;
617
+ result: InstructionsWriteResult;
618
+ };
619
+ "instructions.delete": {
620
+ params: InstructionsDeleteParams;
621
+ result: InstructionsDeleteResult;
622
+ };
623
+ "files.list": {
624
+ params: FilesListParams;
625
+ result: FilesListResult;
626
+ };
627
+ "files.read": {
628
+ params: FilesReadParams;
629
+ result: FilesReadResult;
630
+ };
631
+ "files.create": {
632
+ params: FilesCreateParams;
633
+ result: FilesCreateResult;
634
+ };
635
+ "files.rename": {
636
+ params: FilesRenameParams;
637
+ result: FilesRenameResult;
638
+ };
639
+ "files.delete": {
640
+ params: FilesDeleteParams;
641
+ result: FilesDeleteResult;
642
+ };
643
+ "files.gitStatus": {
644
+ params: FilesGitStatusParams;
645
+ result: FilesGitStatusResult;
646
+ };
557
647
  }
558
648
  /** All known RPC method names. */
559
649
  export type RpcMethod = keyof RpcMethodMap;