qlogicagent 2.3.0 → 2.5.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 (68) hide show
  1. package/dist/agent.js +6 -6
  2. package/dist/cli.js +209 -208
  3. package/dist/index.js +234 -233
  4. package/dist/orchestration.js +2 -2
  5. package/dist/protocol.js +1 -0
  6. package/dist/types/agent/tunable-defaults.d.ts +7 -0
  7. package/dist/types/agent/types.d.ts +24 -100
  8. package/dist/types/cli/stdio-server.d.ts +11 -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 +13 -0
  20. package/dist/types/orchestration/solo-persistence.d.ts +38 -0
  21. package/dist/types/orchestration/tool-loop/tool-choice-policy.d.ts +1 -1
  22. package/dist/types/protocol/methods.d.ts +173 -53
  23. package/dist/types/protocol/notifications.d.ts +4 -514
  24. package/dist/types/protocol/wire/acp-protocol.d.ts +411 -0
  25. package/dist/types/protocol/wire/agent-events.d.ts +32 -0
  26. package/dist/types/protocol/wire/agent-methods.d.ts +587 -0
  27. package/dist/types/protocol/wire/agent-rpc.d.ts +97 -0
  28. package/dist/types/protocol/wire/capability-manifest.d.ts +111 -0
  29. package/dist/types/protocol/wire/capability-transport.d.ts +207 -0
  30. package/dist/types/protocol/wire/channel-ingress.d.ts +29 -0
  31. package/dist/types/protocol/wire/channel.d.ts +89 -0
  32. package/dist/types/protocol/wire/chat-types.d.ts +87 -0
  33. package/dist/types/protocol/wire/checkpoint-runtime.d.ts +61 -0
  34. package/dist/types/protocol/wire/checkpoint.d.ts +72 -0
  35. package/dist/types/protocol/wire/execution.d.ts +391 -0
  36. package/dist/types/protocol/wire/gateway-rpc.d.ts +314 -0
  37. package/dist/types/protocol/wire/gateway.d.ts +62 -0
  38. package/dist/types/protocol/wire/hook-protocol.d.ts +37 -0
  39. package/dist/types/protocol/wire/index.d.ts +25 -0
  40. package/dist/types/protocol/wire/memory-provider-lifecycle.d.ts +80 -0
  41. package/dist/types/protocol/wire/notification-payloads.d.ts +581 -0
  42. package/dist/types/protocol/wire/provider-runtime-contract.d.ts +66 -0
  43. package/dist/types/protocol/wire/provider-runtime-core.d.ts +147 -0
  44. package/dist/types/protocol/wire/provider-runtime-io.d.ts +20 -0
  45. package/dist/types/protocol/wire/resource-manifest.d.ts +68 -0
  46. package/dist/types/protocol/wire/session.d.ts +32 -0
  47. package/dist/types/protocol/wire/thread-protocol.d.ts +157 -0
  48. package/dist/types/protocol/wire/transport.d.ts +57 -0
  49. package/dist/types/protocol/wire/turn.d.ts +208 -0
  50. package/dist/types/protocol/wire/web-capability.d.ts +51 -0
  51. package/dist/types/runtime/hooks/memory-hooks.d.ts +2 -2
  52. package/dist/types/runtime/infra/acp-types.d.ts +3 -142
  53. package/dist/types/runtime/infra/token-budget.d.ts +3 -3
  54. package/dist/types/runtime/session/index.d.ts +1 -1
  55. package/dist/types/runtime/session/session-memory.d.ts +46 -0
  56. package/dist/types/runtime/session/session-persistence.d.ts +34 -8
  57. package/dist/types/runtime/session/session-state.d.ts +4 -4
  58. package/dist/types/skills/memory/memory-tool.d.ts +1 -1
  59. package/dist/types/skills/memory/qmemory-adapter.d.ts +2 -2
  60. package/dist/types/skills/memory/qmemory-http-client.d.ts +16 -0
  61. package/dist/types/skills/permissions/hook-runner.d.ts +4 -4
  62. package/dist/types/skills/permissions/permission-classifier.d.ts +2 -2
  63. package/dist/types/skills/tools/project-switch-tool.d.ts +24 -0
  64. package/dist/types/skills/tools.d.ts +5 -5
  65. package/dist/types/transport/acp-event-emitter.d.ts +1 -1
  66. package/dist/types/transport/acp-server.d.ts +17 -10
  67. package/package.json +14 -4
  68. package/dist/types/runtime/execution/remote-agent.d.ts +0 -63
@@ -1,5 +1,5 @@
1
1
  /**
2
- * ACP Server Agent-Client Protocol server layer for qlogicagent.
2
+ * ACP Server 鈥?Agent-Client Protocol server layer for qlogicagent.
3
3
  *
4
4
  * This module implements qlogicagent as an ACP Server, allowing any ACP-compliant
5
5
  * host (AionUI, Cursor, openclaw, etc.) to connect and interact with the agent.
@@ -17,7 +17,7 @@
17
17
  * existing internal handlers.
18
18
  */
19
19
  import type { Transport } from "../cli/transport.js";
20
- import { type AcpInitializeParams, type AcpInitializeResult, type AcpSessionNewParams, type AcpSessionNewResult, type AcpSessionPromptParams, type AcpSessionPromptResult, type AcpSessionEndParams, type AcpSessionSetConfigParams, type AcpSessionUpdateType, type AcpPermissionRequestParams, type AcpPermissionRequestResult } from "qlogicagent-runtime-contracts";
20
+ import { type AcpInitializeParams, type AcpInitializeResult, type AcpSessionNewParams, type AcpSessionNewResult, type AcpSessionPromptParams, type AcpSessionPromptResult, type AcpSessionEndParams, type AcpSessionSetConfigParams, type AcpSessionUpdateType, type AcpPermissionRequestParams, type AcpPermissionRequestResult } from "../protocol/wire/index.js";
21
21
  export declare const ACP_ERROR_CODES: {
22
22
  readonly PARSE_ERROR: -32700;
23
23
  readonly INVALID_REQUEST: -32600;
@@ -54,26 +54,33 @@ export interface AcpRequestHandler {
54
54
  ok: boolean;
55
55
  summary?: string;
56
56
  }>;
57
+ handleAcpAgentsList(): Promise<unknown>;
57
58
  handleAcpSoloStart(params: Record<string, unknown>): Promise<unknown>;
58
59
  handleAcpSoloStatus(params: Record<string, unknown>): Promise<unknown>;
59
60
  handleAcpSoloSelect(params: Record<string, unknown>): Promise<unknown>;
61
+ handleAcpSoloCancel(params: Record<string, unknown>): Promise<unknown>;
62
+ handleAcpSoloSubscribe(params: Record<string, unknown>): Promise<unknown>;
60
63
  handleAcpProductCreate(params: Record<string, unknown>): Promise<unknown>;
64
+ handleAcpProductPause(params: Record<string, unknown>): Promise<unknown>;
61
65
  handleAcpProductResume(params: Record<string, unknown>): Promise<unknown>;
66
+ handleAcpProductCancel(params: Record<string, unknown>): Promise<unknown>;
67
+ handleAcpProductRollback(params: Record<string, unknown>): Promise<unknown>;
62
68
  handleAcpProductStatus(params: Record<string, unknown>): Promise<unknown>;
69
+ handleAcpProductSubscribe(params: Record<string, unknown>): Promise<unknown>;
63
70
  handleAcpTeamDelegate(params: Record<string, unknown>): Promise<unknown>;
64
71
  }
65
72
  export interface AcpServerConfig {
66
73
  verbose?: boolean;
67
74
  }
68
75
  /**
69
- * AcpServer manages the ACP protocol state machine.
76
+ * AcpServer 鈥?manages the ACP protocol state machine.
70
77
  *
71
78
  * Lifecycle:
72
79
  * 1. Host connects (stdio)
73
- * 2. Host sends `initialize` agent responds with capabilities
74
- * 3. Host sends `session/new` session created
75
- * 4. Host sends `session/prompt` agent runs turn, emits session/update notifications
76
- * 5. Host sends `session/end` session cleaned up
80
+ * 2. Host sends `initialize` 鈫?agent responds with capabilities
81
+ * 3. Host sends `session/new` 鈫?session created
82
+ * 4. Host sends `session/prompt` 鈫?agent runs turn, emits session/update notifications
83
+ * 5. Host sends `session/end` 鈫?session cleaned up
77
84
  */
78
85
  export declare class AcpServer {
79
86
  private transport;
@@ -87,9 +94,9 @@ export declare class AcpServer {
87
94
  private hostSupportsExtendedMethods;
88
95
  /** Active session ID (ACP v1 = single session per connection) */
89
96
  private activeSessionId;
90
- /** Pending permission requests (agent host) waiting for response */
97
+ /** Pending permission requests (agent 鈫?host) waiting for response */
91
98
  private pendingPermissions;
92
- /** Map from outbound JSON-RPC request id permissionId for response matching */
99
+ /** Map from outbound JSON-RPC request id 鈫?permissionId for response matching */
93
100
  private outboundRequestMap;
94
101
  constructor(transport: Transport, handler: AcpRequestHandler, config?: AcpServerConfig);
95
102
  /**
@@ -105,7 +112,7 @@ export declare class AcpServer {
105
112
  */
106
113
  emitSessionUpdate(sessionId: string, type: AcpSessionUpdateType, payload: Record<string, unknown>): void;
107
114
  /**
108
- * Send a permission request to the host (agent host RPC).
115
+ * Send a permission request to the host (agent 鈫?host RPC).
109
116
  * Returns a promise that resolves with the host's chosen option.
110
117
  */
111
118
  requestPermission(params: AcpPermissionRequestParams): Promise<AcpPermissionRequestResult>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qlogicagent",
3
- "version": "2.3.0",
3
+ "version": "2.5.0",
4
4
  "description": "XiaozhiClaw Agent CLI — subprocess architecture (JSON-RPC over stdio)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -23,11 +23,23 @@
23
23
  "./orchestration": {
24
24
  "types": "./dist/types/orchestration/index.d.ts",
25
25
  "default": "./dist/orchestration.js"
26
+ },
27
+ "./protocol": {
28
+ "types": "./dist/types/protocol/wire/index.d.ts",
29
+ "default": "./dist/protocol.js"
26
30
  }
27
31
  },
28
32
  "files": [
29
33
  "dist/"
30
34
  ],
35
+ "typesVersions": {
36
+ "*": {
37
+ "protocol": ["./dist/types/protocol/wire/index.d.ts"],
38
+ "agent": ["./dist/types/agent/agent.d.ts"],
39
+ "contracts": ["./dist/types/contracts/index.d.ts"],
40
+ "orchestration": ["./dist/types/orchestration/index.d.ts"]
41
+ }
42
+ },
31
43
  "scripts": {
32
44
  "dev": "tsx watch src/index.ts",
33
45
  "build": "node scripts/build.mjs",
@@ -45,9 +57,7 @@
45
57
  "dotenv": "^17.3.1",
46
58
  "nanoid": "^5.1.5",
47
59
  "pino": "^9.6.0",
48
- "pino-pretty": "^13.0.0",
49
- "qlogicagent-adapter-claw": "^0.2.0",
50
- "qlogicagent-runtime-contracts": "^3.0.0"
60
+ "pino-pretty": "^13.0.0"
51
61
  },
52
62
  "devDependencies": {
53
63
  "@types/node": "^22.15.0",
@@ -1,63 +0,0 @@
1
- /**
2
- * Remote Agent Runtime — cloud sandbox execution via HTTP relay.
3
- *
4
- * Enables the local agent to delegate tasks to a cloud-hosted sandbox
5
- * (e.g., qlogicagent-hub GPU workers, CCR-style isolated environments).
6
- *
7
- * Protocol:
8
- * 1. POST /agents/run → start remote execution, returns sessionId
9
- * 2. GET /agents/:id → poll for status + streaming results
10
- * 3. POST /agents/:id/abort → cancel remote execution
11
- *
12
- * Reference: CC cloudCode / remoteAgent patterns
13
- */
14
- import type { AgentLogger, TokenUsage } from "../../agent/types.js";
15
- export interface RemoteAgentConfig {
16
- /** Base URL of the remote execution endpoint (e.g., hub relay). */
17
- baseUrl: string;
18
- /** API key for authentication. */
19
- apiKey: string;
20
- /** Timeout for HTTP requests in ms (default: 30_000). */
21
- timeoutMs?: number;
22
- /** Polling interval in ms (default: 2_000). */
23
- pollIntervalMs?: number;
24
- /** Max polling duration in ms (default: 300_000 = 5 min). */
25
- maxPollDurationMs?: number;
26
- /** Logger. */
27
- log: AgentLogger;
28
- }
29
- export interface RemoteAgentRequest {
30
- /** Task prompt for the remote agent. */
31
- prompt: string;
32
- /** Model to use on the remote side. */
33
- model?: string;
34
- /** Max turns for the remote agent. */
35
- maxTurns?: number;
36
- /** Tool restrictions (allowlist). */
37
- allowedTools?: string[];
38
- /** Label for tracking. */
39
- label?: string;
40
- }
41
- export interface RemoteAgentResult {
42
- /** Remote session ID. */
43
- sessionId: string;
44
- /** Whether it completed successfully. */
45
- ok: boolean;
46
- /** Text output from the remote agent. */
47
- output?: string;
48
- /** Error message if failed. */
49
- error?: string;
50
- /** Token usage on the remote side. */
51
- usage?: TokenUsage;
52
- /** Duration in ms. */
53
- durationMs: number;
54
- }
55
- /**
56
- * Run a task on a remote agent endpoint.
57
- *
58
- * This is a polling-based implementation:
59
- * 1. POST to start the remote execution
60
- * 2. Poll GET until completion or timeout
61
- * 3. Return the aggregated result
62
- */
63
- export declare function runRemoteAgent(config: RemoteAgentConfig, request: RemoteAgentRequest, signal?: AbortSignal): Promise<RemoteAgentResult>;