qlogicagent 2.7.0 → 2.10.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 (117) hide show
  1. package/dist/agent.js +18 -18
  2. package/dist/cli.js +445 -433
  3. package/dist/index.js +444 -432
  4. package/dist/orchestration.js +6 -6
  5. package/dist/protocol.js +1 -1
  6. package/dist/types/agent/agent.d.ts +1 -1
  7. package/dist/types/agent/tool-loop.d.ts +1 -1
  8. package/dist/types/agent/tunable-defaults.d.ts +4 -0
  9. package/dist/types/agent/types.d.ts +7 -18
  10. package/dist/types/cli/handlers/agents-handler.d.ts +19 -0
  11. package/dist/types/cli/handlers/config-handler.d.ts +17 -0
  12. package/dist/types/cli/handlers/dream-handler.d.ts +5 -0
  13. package/dist/types/cli/handlers/files-handler.d.ts +15 -0
  14. package/dist/types/cli/handlers/media-handler.d.ts +13 -0
  15. package/dist/types/cli/handlers/memory-handler.d.ts +21 -0
  16. package/dist/types/cli/handlers/pet-handler.d.ts +28 -0
  17. package/dist/types/cli/handlers/product-handler.d.ts +32 -0
  18. package/dist/types/cli/handlers/project-handler.d.ts +19 -0
  19. package/dist/types/cli/handlers/session-handler.d.ts +38 -0
  20. package/dist/types/cli/handlers/settings-handler.d.ts +24 -0
  21. package/dist/types/cli/handlers/skills-handler.d.ts +20 -0
  22. package/dist/types/cli/handlers/solo-handler.d.ts +15 -0
  23. package/dist/types/cli/handlers/turn-handler.d.ts +17 -0
  24. package/dist/types/cli/main.d.ts +2 -2
  25. package/dist/types/cli/stdio-server.d.ts +90 -106
  26. package/dist/types/cli/tool-bootstrap.d.ts +4 -3
  27. package/dist/types/config/config.d.ts +1 -1
  28. package/dist/types/index.d.ts +2 -2
  29. package/dist/types/llm/index.d.ts +1 -31
  30. package/dist/types/orchestration/tool-cascade.d.ts +2 -2
  31. package/dist/types/protocol/methods.d.ts +153 -5
  32. package/dist/types/protocol/wire/agent-events.d.ts +2 -2
  33. package/dist/types/protocol/wire/agent-methods.d.ts +5 -3
  34. package/dist/types/protocol/wire/gateway-rpc.d.ts +125 -4
  35. package/dist/types/protocol/wire/index.d.ts +1 -1
  36. package/dist/types/protocol/wire/notification-payloads.d.ts +79 -1
  37. package/dist/types/runtime/execution/dream-agent.d.ts +1 -1
  38. package/dist/types/runtime/execution/forked-agent.d.ts +1 -1
  39. package/dist/types/runtime/hooks/context-compression.d.ts +1 -1
  40. package/dist/types/runtime/hooks/memory-hooks.d.ts +1 -1
  41. package/dist/types/runtime/infra/acp-types.d.ts +4 -0
  42. package/dist/types/runtime/infra/agent-paths.d.ts +22 -25
  43. package/dist/types/runtime/infra/agent-process.d.ts +1 -1
  44. package/dist/types/runtime/infra/builtin-providers.d.ts +36 -0
  45. package/dist/types/runtime/infra/checkpoint-backend.d.ts +1 -1
  46. package/dist/types/runtime/infra/index.d.ts +1 -2
  47. package/dist/types/runtime/infra/key-pool.d.ts +120 -0
  48. package/dist/types/runtime/infra/media-persistence.d.ts +26 -15
  49. package/dist/types/runtime/infra/model-registry.d.ts +187 -0
  50. package/dist/types/runtime/infra/project-instructions-store.d.ts +3 -3
  51. package/dist/types/runtime/infra/project-store.d.ts +3 -0
  52. package/dist/types/runtime/infra/token-budget.d.ts +2 -2
  53. package/dist/types/runtime/infra/worktree-backend.d.ts +1 -1
  54. package/dist/types/runtime/pet/index.d.ts +10 -0
  55. package/dist/types/runtime/pet/pet-consistency.d.ts +79 -0
  56. package/dist/types/runtime/pet/pet-context-injection.d.ts +8 -0
  57. package/dist/types/runtime/pet/pet-file-loader.d.ts +62 -0
  58. package/dist/types/runtime/pet/pet-growth-engine.d.ts +60 -0
  59. package/dist/types/runtime/pet/pet-reaction-service.d.ts +33 -0
  60. package/dist/types/runtime/pet/pet-skeleton.d.ts +70 -0
  61. package/dist/types/runtime/pet/pet-soul-service.d.ts +71 -0
  62. package/dist/types/runtime/session/group-session-split.d.ts +38 -0
  63. package/dist/types/runtime/session/index.d.ts +4 -2
  64. package/dist/types/runtime/session/session-locator.d.ts +24 -0
  65. package/dist/types/runtime/session/session-memory.d.ts +4 -4
  66. package/dist/types/runtime/session/session-persistence.d.ts +47 -46
  67. package/dist/types/runtime/session/session-state.d.ts +3 -5
  68. package/dist/types/skills/memory/local-memory-provider.d.ts +11 -1
  69. package/dist/types/skills/memory/local-store.d.ts +3 -2
  70. package/dist/types/skills/memory/memdir.d.ts +7 -4
  71. package/dist/types/skills/memory/memory-provider-factory.d.ts +2 -8
  72. package/dist/types/skills/permissions/denial-audit-log.d.ts +1 -1
  73. package/dist/types/skills/permissions/permission-classifier.d.ts +1 -1
  74. package/dist/types/skills/tools/search-tool.d.ts +1 -1
  75. package/dist/types/skills/tools.d.ts +3 -3
  76. package/dist/types/transport/acp-event-emitter.d.ts +1 -1
  77. package/dist/types/transport/acp-server.d.ts +2 -2
  78. package/package.json +2 -1
  79. package/dist/types/llm/adapters/aliyun-oss-file-upload-adapter.d.ts +0 -44
  80. package/dist/types/llm/adapters/gemini-file-upload-adapter.d.ts +0 -26
  81. package/dist/types/llm/adapters/hub-oss-file-upload-adapter.d.ts +0 -29
  82. package/dist/types/llm/adapters/index.d.ts +0 -10
  83. package/dist/types/llm/adapters/openai-file-upload-adapter.d.ts +0 -38
  84. package/dist/types/llm/adapters/volcengine-file-upload-adapter.d.ts +0 -24
  85. package/dist/types/llm/builtin-providers.d.ts +0 -10
  86. package/dist/types/llm/debug-transport.d.ts +0 -12
  87. package/dist/types/llm/file-upload-service.d.ts +0 -68
  88. package/dist/types/llm/gemini-schema-utils.d.ts +0 -17
  89. package/dist/types/llm/llm-client.d.ts +0 -43
  90. package/dist/types/llm/media-client.d.ts +0 -42
  91. package/dist/types/llm/media-transport.d.ts +0 -176
  92. package/dist/types/llm/model-catalog.d.ts +0 -82
  93. package/dist/types/llm/model-detection.d.ts +0 -22
  94. package/dist/types/llm/provider-def.d.ts +0 -203
  95. package/dist/types/llm/provider-registry.d.ts +0 -59
  96. package/dist/types/llm/provider-tool-api.d.ts +0 -44
  97. package/dist/types/llm/retry.d.ts +0 -37
  98. package/dist/types/llm/transport.d.ts +0 -281
  99. package/dist/types/llm/transports/anthropic-messages.d.ts +0 -65
  100. package/dist/types/llm/transports/gemini-cache-api.d.ts +0 -86
  101. package/dist/types/llm/transports/gemini-file-api.d.ts +0 -90
  102. package/dist/types/llm/transports/gemini-generatecontent.d.ts +0 -56
  103. package/dist/types/llm/transports/gemini-lyria-realtime.d.ts +0 -117
  104. package/dist/types/llm/transports/gemini-media.d.ts +0 -53
  105. package/dist/types/llm/transports/media-resolve.d.ts +0 -50
  106. package/dist/types/llm/transports/minimax-media.d.ts +0 -55
  107. package/dist/types/llm/transports/openai-chat.d.ts +0 -81
  108. package/dist/types/llm/transports/openai-media.d.ts +0 -24
  109. package/dist/types/llm/transports/openai-responses.d.ts +0 -63
  110. package/dist/types/llm/transports/qwen-media.d.ts +0 -50
  111. package/dist/types/llm/transports/realtime-transport.d.ts +0 -183
  112. package/dist/types/llm/transports/volcengine-grounding.d.ts +0 -58
  113. package/dist/types/llm/transports/volcengine-media.d.ts +0 -93
  114. package/dist/types/llm/transports/volcengine-responses.d.ts +0 -64
  115. package/dist/types/llm/transports/zhipu-media.d.ts +0 -82
  116. package/dist/types/llm/transports/zhipu-tool-api.d.ts +0 -35
  117. package/dist/types/runtime/infra/project-plan-store.d.ts +0 -27
@@ -1,93 +0,0 @@
1
- /**
2
- * Volcengine Media Transport — Doubao Seedream (image), Seedance (video), 3D generation.
3
- *
4
- * API reference:
5
- * Image: POST /v3/images/generations (sync)
6
- * Video: POST /v3/contents/generations/tasks (async job)
7
- * 3D: POST /v3/contents/generations/tasks (async job, same endpoint as video)
8
- *
9
- * Auth: Authorization: Bearer $ARK_API_KEY
10
- * Docs: https://www.volcengine.com/docs/82379/1330310
11
- * https://www.volcengine.com/docs/82379/1874993 (3D)
12
- */
13
- import type { AsyncMediaTransport, MediaRequest, MediaResult, MediaType } from "../media-transport.js";
14
- export interface VolcengineMediaConfig {
15
- /** Base URL, e.g. "https://ark.cn-beijing.volces.com/api" */
16
- baseUrl: string;
17
- timeoutMs?: number;
18
- }
19
- export declare class VolcengineMediaTransport implements AsyncMediaTransport {
20
- readonly supportedTypes: readonly MediaType[];
21
- private baseUrl;
22
- private timeoutMs;
23
- constructor(config: VolcengineMediaConfig);
24
- generate(request: MediaRequest, apiKey: string, signal?: AbortSignal): Promise<MediaResult>;
25
- /**
26
- * Check if this transport can handle a given operation.
27
- * Video edit/merge/upscale are routed through the same video endpoint.
28
- */
29
- canHandle(request: MediaRequest): boolean;
30
- private generateImage;
31
- /**
32
- * Parse streaming image SSE — yields progressive image quality upgrades.
33
- * Final event contains the full-quality image URL.
34
- */
35
- private parseStreamingImage;
36
- private generateVideo;
37
- private generate3D;
38
- /**
39
- * Query a single video generation task by ID.
40
- * GET /v3/contents/generations/tasks/{taskId}
41
- */
42
- getTaskStatus(taskId: string, apiKey: string, signal?: AbortSignal): Promise<{
43
- status: string;
44
- task: Record<string, unknown>;
45
- }>;
46
- /**
47
- * List video generation tasks with optional filters.
48
- * GET /v3/contents/generations/tasks
49
- */
50
- listVideoTasks(apiKey: string, options?: {
51
- after?: string;
52
- limit?: number;
53
- status?: string;
54
- }, signal?: AbortSignal): Promise<Record<string, unknown>>;
55
- /**
56
- * Cancel or delete a video generation task.
57
- * DELETE /v3/contents/generations/tasks/{taskId}
58
- */
59
- deleteVideoTask(taskId: string, apiKey: string, signal?: AbortSignal): Promise<void>;
60
- /**
61
- * Upload a file to Volcengine Files API for reuse in multimodal requests.
62
- * POST /v3/files
63
- */
64
- uploadFile(file: Blob | Buffer, apiKey: string, options?: {
65
- purpose?: string;
66
- filename?: string;
67
- }, signal?: AbortSignal): Promise<{
68
- id: string;
69
- status: string;
70
- }>;
71
- /**
72
- * Get file info by ID.
73
- * GET /v3/files/{fileId}
74
- */
75
- getFile(fileId: string, apiKey: string, signal?: AbortSignal): Promise<Record<string, unknown>>;
76
- /**
77
- * List uploaded files.
78
- * GET /v3/files
79
- */
80
- listFiles(apiKey: string, options?: {
81
- after?: string;
82
- limit?: number;
83
- purpose?: string;
84
- order?: "asc" | "desc";
85
- }, signal?: AbortSignal): Promise<Record<string, unknown>>;
86
- /**
87
- * Delete a file.
88
- * DELETE /v3/files/{fileId}
89
- */
90
- deleteFile(fileId: string, apiKey: string, signal?: AbortSignal): Promise<void>;
91
- private submitTask;
92
- private pollTask;
93
- }
@@ -1,64 +0,0 @@
1
- /**
2
- * Volcengine Responses API Transport 鈥?SSE streaming implementation.
3
- *
4
- * Implements the fire mountain ark Responses API (`/api/v3/responses`),
5
- * which is the officially recommended primary path for Doubao LLM text generation
6
- * (250615+ models: doubao-seed-2.0 series).
7
- *
8
- * Key differences from OpenAI Chat Completions:
9
- * - Endpoint: POST {baseUrl}/v3/responses
10
- * - Request body uses `input` (not `messages`), `instructions`, `thinking`, `reasoning`
11
- * - SSE events: response.output_text.delta, response.reasoning_summary_text.delta,
12
- * response.function_call_arguments.delta, response.completed, etc.
13
- * - Tool calling: function_call / function_call_output with call_id
14
- * - Context persistence: previous_response_id for server-side session continuation
15
- * - Deep thinking: thinking.type (enabled/disabled/auto) + reasoning.effort
16
- *
17
- * Docs: https://www.volcengine.com/docs/82379/1399008
18
- */
19
- import type { LLMChunk, LLMRequest, LLMTransport } from "../transport.js";
20
- import type { ProviderQuirks } from "../provider-def.js";
21
- import type { FileUploadAdapter } from "../file-upload-service.js";
22
- export interface VolcengineResponsesTransportConfig {
23
- baseUrl: string;
24
- extraHeaders?: Record<string, string>;
25
- timeoutMs?: number;
26
- quirks?: ProviderQuirks;
27
- /** File upload adapter for resolving local media URLs via upload instead of base64. */
28
- fileUploadAdapter?: FileUploadAdapter;
29
- }
30
- export declare class VolcengineResponsesTransport implements LLMTransport {
31
- private baseUrl;
32
- private extraHeaders;
33
- private timeoutMs;
34
- private quirks;
35
- private fileUploadAdapter?;
36
- constructor(config: VolcengineResponsesTransportConfig);
37
- stream(request: LLMRequest, apiKey: string, signal?: AbortSignal): AsyncGenerator<LLMChunk>;
38
- /**
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
43
- * Returns a shallow copy with fields adjusted; never mutates the original.
44
- */
45
- private resolveConstraints;
46
- private buildRequestBody;
47
- private fetchAndStream;
48
- private handleNonStreamingResponse;
49
- /**
50
- * Parse Volcengine Responses API SSE stream.
51
- *
52
- * Event format: "event: <type>\ndata: <json>\n\n"
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
61
- */
62
- private parseSSEStream;
63
- private processEvent;
64
- }
@@ -1,82 +0,0 @@
1
- /**
2
- * Zhipu (GLM) Media Transport — CogView (image), CogVideoX (video), TTS, STT, Embedding.
3
- *
4
- * API reference (docs.bigmodel.cn):
5
- * Image sync: POST /images/generations (CogView-4, cogview-3-flash)
6
- * Image async: POST /async/images/generations (glm-image)
7
- * Video async: POST /videos/generations (CogVideoX)
8
- * TTS sync: POST /audio/speech (glm-tts, returns audio bytes)
9
- * STT sync: POST /audio/transcriptions (glm-asr, multipart/form-data)
10
- * Embedding: POST /embeddings (embedding-3/2)
11
- * Async poll: GET /async-result/{id} (unified poll for all async tasks)
12
- *
13
- * Base URL: https://open.bigmodel.cn/api/paas/v4
14
- * Auth: Authorization: Bearer $ZHIPU_API_KEY
15
- */
16
- import type { AsyncMediaTransport, MediaRequest, MediaResult, MediaType } from "../media-transport.js";
17
- export interface ZhipuMediaConfig {
18
- /** Base URL, e.g. "https://open.bigmodel.cn/api/paas/v4" */
19
- baseUrl: string;
20
- timeoutMs?: number;
21
- }
22
- export declare class ZhipuMediaTransport implements AsyncMediaTransport {
23
- readonly supportedTypes: readonly MediaType[];
24
- private baseUrl;
25
- private timeoutMs;
26
- constructor(config: ZhipuMediaConfig);
27
- generate(request: MediaRequest, apiKey: string, signal?: AbortSignal): Promise<MediaResult>;
28
- private generateImage;
29
- /** CogView-4 / cogview-3-flash — sync, returns URL directly */
30
- private generateImageSync;
31
- /** glm-image — async submit + poll */
32
- private generateImageAsync;
33
- private generateVideo;
34
- private generateTTS;
35
- private generateSTT;
36
- private generateEmbedding;
37
- private generateVoiceClone;
38
- private generateDocumentParsing;
39
- private generateRerank;
40
- private postJSON;
41
- /**
42
- * Unified async result polling — GET /async-result/{id}
43
- * Returns the result object when task_status === "SUCCESS".
44
- * Throws on "FAIL" or timeout.
45
- */
46
- private pollAsyncResult;
47
- /**
48
- * Query a single task status — GET /async-result/{id}
49
- * Zhipu uses a unified async result endpoint for all task types.
50
- */
51
- getTaskStatus(taskId: string, apiKey: string, signal?: AbortSignal): Promise<{
52
- status: string;
53
- task: Record<string, unknown>;
54
- }>;
55
- /**
56
- * List recent tasks — Zhipu does not have a native list endpoint.
57
- * Returns empty since individual task query via getTaskStatus() is the primary API.
58
- */
59
- listVideoTasks(_apiKey: string, _options?: {
60
- after?: string;
61
- limit?: number;
62
- status?: string;
63
- }, _signal?: AbortSignal): Promise<Record<string, unknown>>;
64
- /**
65
- * Cancel/delete is not supported by Zhipu's async API — throws informative error.
66
- * The /async-result/{id} endpoint is read-only.
67
- */
68
- deleteVideoTask(_taskId: string, _apiKey: string, _signal?: AbortSignal): Promise<void>;
69
- /**
70
- * List cloned voices — GET /voice/
71
- * Returns all voice clones for the current user.
72
- */
73
- listVoices(apiKey: string, signal?: AbortSignal): Promise<Array<{
74
- voice_id: string;
75
- voice_name: string;
76
- status: string;
77
- }>>;
78
- /**
79
- * Delete a cloned voice — DELETE /voice/{voice_id}
80
- */
81
- deleteVoice(voiceId: string, apiKey: string, signal?: AbortSignal): Promise<void>;
82
- }
@@ -1,35 +0,0 @@
1
- /**
2
- * ZhipuToolAPI — Zhipu-specific utility endpoints.
3
- *
4
- * Implements ProviderToolAPI for Zhipu GLM platform independent APIs:
5
- * C1: Web Search — POST /tools/web-search
6
- * C2: Reader — POST /tools/reader (extract web page content)
7
- * C3: Tokenizer — POST /tokenizer
8
- * C4: Moderations — POST /moderations
9
- *
10
- * Base URL: https://open.bigmodel.cn/api/paas/v4
11
- * Auth: Authorization: Bearer $ZHIPU_API_KEY
12
- *
13
- * C5 (File Parser) is handled by document_parsing media handler.
14
- * C6 (Realtime API) requires WebSocket — out of scope for this interface.
15
- */
16
- import type { ProviderToolAPI, ProviderToolCapability, WebSearchResult, ReaderResult, TokenizerResult, ModerationResult } from "../provider-tool-api.js";
17
- export interface ZhipuToolAPIConfig {
18
- baseUrl: string;
19
- apiKey: string;
20
- timeoutMs?: number;
21
- }
22
- export declare class ZhipuToolAPI implements ProviderToolAPI {
23
- readonly capabilities: readonly ProviderToolCapability[];
24
- private baseUrl;
25
- private apiKey;
26
- private timeoutMs;
27
- constructor(config: ZhipuToolAPIConfig);
28
- webSearch(query: string, options?: {
29
- maxResults?: number;
30
- }): Promise<WebSearchResult[]>;
31
- reader(pageUrl: string): Promise<ReaderResult>;
32
- tokenize(text: string, model: string): Promise<TokenizerResult>;
33
- moderate(text: string): Promise<ModerationResult>;
34
- private postJSON;
35
- }
@@ -1,27 +0,0 @@
1
- /**
2
- * ProjectPlanStore — CRUD for project-scoped plan files.
3
- *
4
- * Storage location: `<workspace>/.qlogicagent/plans/*.md`
5
- * Each plan is a markdown file with YAML frontmatter (slug, status, timestamps).
6
- */
7
- export interface PlanEntry {
8
- slug: string;
9
- status: "active" | "completed" | "abandoned";
10
- content: string;
11
- createdAt: string;
12
- updatedAt: string;
13
- }
14
- export declare class ProjectPlanStore {
15
- private dir;
16
- constructor(cwd: string);
17
- /** List all plans. */
18
- list(): PlanEntry[];
19
- /** Load active plans only. */
20
- loadActive(): PlanEntry[];
21
- /** Load a single plan by slug. */
22
- load(slug: string): PlanEntry | null;
23
- /** Save or update a plan. */
24
- save(slug: string, content: string): void;
25
- /** Delete a plan. */
26
- remove(slug: string): boolean;
27
- }