qlogicagent 2.20.2 → 2.20.4

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 (197) hide show
  1. package/dist/agent-contract.js +1 -1
  2. package/dist/agent.js +39 -35
  3. package/dist/cli.js +1 -1
  4. package/dist/host-contract.js +1 -1
  5. package/dist/host-session-collection-contract.js +1 -1
  6. package/dist/index.js +624 -549
  7. package/dist/memory-category-contract.js +1 -0
  8. package/dist/orchestration.js +1 -1
  9. package/dist/project-memory-host.js +21 -21
  10. package/dist/protocol.js +1 -1
  11. package/dist/skill-category-contract.js +1 -0
  12. package/dist/skills/builtin/web-research/SKILL.md +37 -0
  13. package/dist/skills/mcp/astraclaw-native-mcp-server.js +1 -1
  14. package/dist/tunables.js +1 -1
  15. package/dist/types/agent/memory-recall-context.d.ts +6 -9
  16. package/dist/types/agent/memory-recall-injection.d.ts +1 -6
  17. package/dist/types/agent/tool-loop/agent-argument-normalizer.d.ts +12 -0
  18. package/dist/types/agent/tool-loop/artifact-final-contract.d.ts +8 -0
  19. package/dist/types/agent/tool-loop.d.ts +5 -0
  20. package/dist/types/agent/types.d.ts +5 -0
  21. package/dist/types/cli/acp-extended-handlers.d.ts +11 -9
  22. package/dist/types/cli/acp-session-handlers.d.ts +1 -1
  23. package/dist/types/cli/acp-session-host.d.ts +8 -0
  24. package/dist/types/cli/agent-runtime-bootstrap.d.ts +7 -1
  25. package/dist/types/cli/agent-runtime-session-state.d.ts +23 -6
  26. package/dist/types/cli/atomic-text-file.d.ts +31 -0
  27. package/dist/types/cli/background-context-capsule.d.ts +12 -0
  28. package/dist/types/cli/base-tool-bootstrap.d.ts +1 -0
  29. package/dist/types/cli/cli-acp-request-handler.d.ts +3 -1
  30. package/dist/types/cli/community-workflow-installer.d.ts +1 -1
  31. package/dist/types/cli/core-tool-coordinator.d.ts +1 -0
  32. package/dist/types/cli/core-tools/agent-tool-service.d.ts +17 -1
  33. package/dist/types/cli/dev-tool-bootstrap.d.ts +3 -2
  34. package/dist/types/cli/dev-tools/dev-tool-bootstrap-service.d.ts +1 -0
  35. package/dist/types/cli/dev-tools/dev-tool-registry.d.ts +3 -1
  36. package/dist/types/cli/dev-tools/incremental-repo-map.d.ts +81 -0
  37. package/dist/types/cli/dev-tools/lsp-supervisor.d.ts +59 -0
  38. package/dist/types/cli/dev-tools/lsp-tool-service.d.ts +2 -0
  39. package/dist/types/cli/handlers/community-handler.d.ts +2 -0
  40. package/dist/types/cli/handlers/dream-handler.d.ts +1 -1
  41. package/dist/types/cli/handlers/memory-handler.d.ts +2 -14
  42. package/dist/types/cli/handlers/product-handler.d.ts +6 -24
  43. package/dist/types/cli/handlers/turn-handler.d.ts +1 -0
  44. package/dist/types/cli/idle-dream-coordinator.d.ts +9 -5
  45. package/dist/types/cli/memory-background-coordinator.d.ts +26 -0
  46. package/dist/types/cli/memory-candidate-service.d.ts +2 -3
  47. package/dist/types/cli/memory-coordinator.d.ts +12 -8
  48. package/dist/types/cli/permission-bootstrap.d.ts +10 -1
  49. package/dist/types/cli/product-acp-params.d.ts +29 -0
  50. package/dist/types/cli/resolved-agent-cache.d.ts +18 -7
  51. package/dist/types/cli/rpc-registry.d.ts +2 -1
  52. package/dist/types/cli/runtime-hook-bootstrap.d.ts +2 -0
  53. package/dist/types/cli/stdio-acp-request-host.d.ts +7 -4
  54. package/dist/types/cli/stdio-agent-session-bootstrap.d.ts +8 -2
  55. package/dist/types/cli/stdio-rpc-handler-hosts.d.ts +4 -2
  56. package/dist/types/cli/stdio-runtime-bootstrap.d.ts +1 -0
  57. package/dist/types/cli/stdio-server.d.ts +53 -16
  58. package/dist/types/cli/stdio-session-runtime-coordinator.d.ts +0 -2
  59. package/dist/types/cli/task-distillation-coordinator.d.ts +42 -14
  60. package/dist/types/cli/tool-bootstrap-core-registration.d.ts +14 -4
  61. package/dist/types/cli/tool-bootstrap.d.ts +2 -1
  62. package/dist/types/cli/turn-core.d.ts +4 -0
  63. package/dist/types/cli/turn-lifecycle.d.ts +1 -0
  64. package/dist/types/contracts/hooks.d.ts +3 -2
  65. package/dist/types/contracts/turn-event.d.ts +7 -0
  66. package/dist/types/host-contract/index.d.ts +144 -14
  67. package/dist/types/host-contract/memory-category.d.ts +8 -0
  68. package/dist/types/host-contract/skill-category.d.ts +5 -0
  69. package/dist/types/host-session-collection-contract.d.ts +1 -0
  70. package/dist/types/orchestration/agent-instance.d.ts +15 -0
  71. package/dist/types/orchestration/dag-scheduler.d.ts +18 -0
  72. package/dist/types/orchestration/delegate-approval-policy.d.ts +8 -0
  73. package/dist/types/orchestration/goal-acceptance.d.ts +2 -5
  74. package/dist/types/orchestration/goal-loop-coordinator.d.ts +4 -2
  75. package/dist/types/orchestration/goal-mode-adapters.d.ts +16 -0
  76. package/dist/types/orchestration/goal-run-types.d.ts +6 -1
  77. package/dist/types/orchestration/product-budget.d.ts +35 -16
  78. package/dist/types/orchestration/product-persistence.d.ts +5 -14
  79. package/dist/types/orchestration/product-planner.d.ts +38 -0
  80. package/dist/types/orchestration/product-worktree.d.ts +4 -2
  81. package/dist/types/orchestration/solo-evaluator.d.ts +42 -2
  82. package/dist/types/orchestration/solo-spec-builder.d.ts +3 -0
  83. package/dist/types/orchestration/testing/delegate-test-bridge.d.ts +6 -0
  84. package/dist/types/orchestration/testing/run-state-client-double.d.ts +13 -0
  85. package/dist/types/orchestration/workflow/builtin-capabilities.d.ts +3 -0
  86. package/dist/types/orchestration/workflow/capability-catalog.d.ts +31 -0
  87. package/dist/types/orchestration/workflow/cron-schedule.d.ts +3 -4
  88. package/dist/types/orchestration/workflow/expression.d.ts +2 -1
  89. package/dist/types/orchestration/workflow/n8n-import.d.ts +3 -0
  90. package/dist/types/orchestration/workflow/node-registry.d.ts +2 -2
  91. package/dist/types/orchestration/workflow/node-schema.d.ts +20 -4
  92. package/dist/types/orchestration/workflow/params-schema.d.ts +7 -6
  93. package/dist/types/orchestration/workflow/qla-executor-host.d.ts +4 -1
  94. package/dist/types/orchestration/workflow/run-history-store.d.ts +33 -3
  95. package/dist/types/orchestration/workflow/semantic-acceptance.d.ts +65 -0
  96. package/dist/types/orchestration/workflow/workflow-authoring.d.ts +74 -0
  97. package/dist/types/orchestration/workflow/workflow-bundle.d.ts +4 -0
  98. package/dist/types/orchestration/workflow/workflow-controller.d.ts +16 -4
  99. package/dist/types/orchestration/workflow/workflow-edit-context.d.ts +46 -0
  100. package/dist/types/orchestration/workflow/workflow-intent-contract.d.ts +56 -0
  101. package/dist/types/orchestration/workflow/workflow-patch.d.ts +7 -0
  102. package/dist/types/orchestration/workflow/workflow-runtime.d.ts +5 -0
  103. package/dist/types/orchestration/workflow/workflow-scheduler.d.ts +11 -0
  104. package/dist/types/orchestration/workflow/workflow-store.d.ts +5 -0
  105. package/dist/types/orchestration/workflow/workflow-template-setup.d.ts +65 -0
  106. package/dist/types/orchestration/workflow/workflow-trigger.d.ts +4 -0
  107. package/dist/types/orchestration/workflow-chat-builder.d.ts +105 -20
  108. package/dist/types/orchestration/worktree-task-prompt.d.ts +1 -0
  109. package/dist/types/protocol/agent-contract.d.ts +49 -8
  110. package/dist/types/protocol/notifications.d.ts +1 -1
  111. package/dist/types/protocol/wire/acp-agent-management.d.ts +97 -9
  112. package/dist/types/protocol/wire/acp-protocol.d.ts +7 -1
  113. package/dist/types/protocol/wire/agent-methods.d.ts +15 -1
  114. package/dist/types/protocol/wire/index.d.ts +2 -4
  115. package/dist/types/protocol/wire/memory-provider-lifecycle.d.ts +1 -39
  116. package/dist/types/protocol/wire/notification-payloads.d.ts +96 -1
  117. package/dist/types/protocol/wire/web-capability.d.ts +2 -2
  118. package/dist/types/runtime/community/community-consent-client.d.ts +3 -0
  119. package/dist/types/runtime/config/tunable-defaults.d.ts +0 -6
  120. package/dist/types/runtime/execution/bounded-output-tail.d.ts +7 -0
  121. package/dist/types/runtime/execution/dream-agent.d.ts +8 -5
  122. package/dist/types/runtime/execution/dream-category-context.d.ts +3 -3
  123. package/dist/types/runtime/execution/structured-tool-progress.d.ts +21 -0
  124. package/dist/types/runtime/hooks/memory-hooks.d.ts +20 -8
  125. package/dist/types/runtime/infra/background-tasks.d.ts +5 -1
  126. package/dist/types/runtime/infra/cloud-auth-host-authority.d.ts +4 -0
  127. package/dist/types/runtime/infra/llmrouter-access-token.d.ts +0 -1
  128. package/dist/types/runtime/infra/subagent-turn-snapshot.d.ts +32 -0
  129. package/dist/types/runtime/infra/turn-telemetry-store.d.ts +22 -0
  130. package/dist/types/runtime/memory/implicit-extraction.d.ts +23 -7
  131. package/dist/types/runtime/ports/agent-runtime-ports.d.ts +0 -5
  132. package/dist/types/runtime/ports/index.d.ts +2 -3
  133. package/dist/types/runtime/ports/memory-provider.d.ts +31 -16
  134. package/dist/types/runtime/ports/memory-writer.d.ts +55 -6
  135. package/dist/types/runtime/ports/permission-contracts.d.ts +2 -0
  136. package/dist/types/runtime/ports/tool-contracts.d.ts +3 -1
  137. package/dist/types/runtime/prompt/identity-section.d.ts +2 -0
  138. package/dist/types/runtime/session/session-permission-store.d.ts +6 -0
  139. package/dist/types/runtime/tasks/task-types.d.ts +2 -0
  140. package/dist/types/skills/memory/host-memory-provider.d.ts +59 -9
  141. package/dist/types/skills/memory/memory-tool.d.ts +3 -1
  142. package/dist/types/skills/memory/task-distillation.d.ts +22 -3
  143. package/dist/types/skills/permissions/hook-runner.d.ts +8 -0
  144. package/dist/types/skills/permissions/operation-classifier.d.ts +7 -0
  145. package/dist/types/skills/skill-system/skill-category.d.ts +10 -0
  146. package/dist/types/skills/tools/agent-tool.d.ts +13 -21
  147. package/dist/types/skills/tools/edit-tool.d.ts +10 -2
  148. package/dist/types/skills/tools/exec-tool.d.ts +2 -2
  149. package/dist/types/skills/tools/file-text-snapshot.d.ts +24 -0
  150. package/dist/types/skills/tools/lsp-tool.d.ts +1 -1
  151. package/dist/types/skills/tools/patch-tool.d.ts +10 -3
  152. package/dist/types/skills/tools/read-tool.d.ts +23 -1
  153. package/dist/types/skills/tools/repo-map-tool.d.ts +52 -0
  154. package/dist/types/skills/tools/search-tool.d.ts +10 -1
  155. package/dist/types/skills/tools/shell/index.d.ts +1 -2
  156. package/dist/types/skills/tools/shell/shell-command.d.ts +1 -1
  157. package/dist/types/skills/tools/shell/shell-exec.d.ts +2 -2
  158. package/dist/types/skills/tools/shell/task-output.d.ts +12 -3
  159. package/dist/types/skills/tools/subagent-decision-tool.d.ts +15 -0
  160. package/dist/types/skills/tools/task-tool.d.ts +16 -2
  161. package/dist/types/skills/tools/write-tool.d.ts +2 -1
  162. package/dist/types/transport/acp-server.d.ts +1 -0
  163. package/dist/types/transport/host-cloud-auth-client.d.ts +10 -0
  164. package/dist/types/transport/host-community-client.d.ts +8 -0
  165. package/dist/types/transport/host-run-state-client.d.ts +6 -0
  166. package/dist/types/workflow-host.d.ts +8 -1
  167. package/dist/workflow-host.js +9 -9
  168. package/package.json +25 -6
  169. package/dist/types/cli/tool-bootstrap-web-registration.d.ts +0 -14
  170. package/dist/types/orchestration/tool-cascade.d.ts +0 -49
  171. package/dist/types/protocol/wire/channel-ingress.d.ts +0 -29
  172. package/dist/types/protocol/wire/channel.d.ts +0 -89
  173. package/dist/types/runtime/infra/native-mcp-config-sync.d.ts +0 -16
  174. package/dist/types/runtime/memory/categories.d.ts +0 -5
  175. package/dist/types/runtime/memory/recall-category-filter.d.ts +0 -42
  176. package/dist/types/runtime/ports/source-provider.d.ts +0 -39
  177. package/dist/types/runtime/ports/web-search-contracts.d.ts +0 -21
  178. package/dist/types/server/search-svc.d.ts +0 -1
  179. package/dist/types/skills/memory/local-embedding.d.ts +0 -80
  180. package/dist/types/skills/memory/memory-config-resolver.d.ts +0 -4
  181. package/dist/types/skills/memory/memory-embedding-config.d.ts +0 -31
  182. package/dist/types/skills/tools/web-answer-tool.d.ts +0 -27
  183. package/dist/types/skills/tools/web-fetch-tool.d.ts +0 -80
  184. package/dist/types/skills/tools/web-research-tool.d.ts +0 -48
  185. package/dist/types/skills/tools/web-search-tool.d.ts +0 -46
  186. package/dist/types/skills/web-search/brave-source.d.ts +0 -3
  187. package/dist/types/skills/web-search/crawl4ai-extractor.d.ts +0 -16
  188. package/dist/types/skills/web-search/embedding-rerank.d.ts +0 -13
  189. package/dist/types/skills/web-search/exa-source.d.ts +0 -3
  190. package/dist/types/skills/web-search/multi-source-backend.d.ts +0 -23
  191. package/dist/types/skills/web-search/redis-source-cache.d.ts +0 -6
  192. package/dist/types/skills/web-search/search-svc-source.d.ts +0 -5
  193. package/dist/types/skills/web-search/searxng-source.d.ts +0 -4
  194. package/dist/types/skills/web-search/serper-source.d.ts +0 -3
  195. package/dist/types/skills/web-search/source-factory.d.ts +0 -6
  196. package/dist/types/skills/web-search/stability.d.ts +0 -26
  197. package/dist/types/skills/web-search/web-tunable-resolver.d.ts +0 -16
@@ -0,0 +1,24 @@
1
+ export type TextFileEncoding = "utf8" | "utf16le" | "utf16be";
2
+ export type TextFileEol = "\n" | "\r\n" | "\r";
3
+ export interface TextFileFormat {
4
+ encoding: TextFileEncoding;
5
+ bom: boolean;
6
+ eol: TextFileEol;
7
+ }
8
+ export interface TextFileSnapshot {
9
+ text: string;
10
+ /** SHA-256 of the exact on-disk bytes, including any BOM. */
11
+ contentHash: string;
12
+ format: TextFileFormat;
13
+ }
14
+ export interface TextFileWriteOptions {
15
+ /** Reject the write if the current on-disk byte hash differs. */
16
+ expectedHash?: string;
17
+ /** Atomically fail instead of replacing an existing destination. */
18
+ createOnly?: boolean;
19
+ /** Explicit output format, used when moving a file to a new path. */
20
+ format?: TextFileFormat;
21
+ }
22
+ export type TextFileReadResult = string | TextFileSnapshot;
23
+ export declare function textFromReadResult(result: TextFileReadResult): string;
24
+ export declare function snapshotFromReadResult(result: TextFileReadResult): TextFileSnapshot | undefined;
@@ -139,7 +139,7 @@ export interface LspToolDeps {
139
139
  character?: number;
140
140
  newName?: string;
141
141
  includeContext?: boolean;
142
- }): Promise<LspResult>;
142
+ }, signal?: AbortSignal): Promise<LspResult>;
143
143
  /** Check if file exists and get its size */
144
144
  statFile?(filePath: string): Promise<{
145
145
  exists: boolean;
@@ -1,4 +1,5 @@
1
1
  import type { PortableTool } from "../portable-tool.js";
2
+ import { type TextFileReadResult, type TextFileWriteOptions } from "./file-text-snapshot.js";
2
3
  export declare const PATCH_TOOL_NAME: "patch";
3
4
  export interface PatchToolParams {
4
5
  /** V4A unified diff or simple find-replace */
@@ -28,11 +29,17 @@ export interface PatchResult {
28
29
  errors: string[];
29
30
  }
30
31
  export interface PatchToolDeps {
31
- readFile(path: string): Promise<string>;
32
- writeFile(path: string, content: string): Promise<void>;
33
- deleteFile(path: string): Promise<void>;
32
+ readFile(path: string): Promise<TextFileReadResult>;
33
+ writeFile(path: string, content: string, options?: TextFileWriteOptions): Promise<void | {
34
+ contentHash: string;
35
+ }>;
36
+ deleteFile(path: string, options?: Pick<TextFileWriteOptions, "expectedHash">): Promise<void>;
34
37
  fileExists(path: string): Promise<boolean>;
35
38
  resolvePath(input: string): string;
39
+ /** Validate access to a resolved patch target. Null means allowed. */
40
+ validatePath?(path: string): string | null;
41
+ /** Reject stale explicit-read observations before parsing/mutating targets. */
42
+ checkConcurrentModification?(path: string): string | null;
36
43
  }
37
44
  export type MatchStrategy = "exact" | "line_trimmed" | "whitespace_normalized" | "indentation_flexible" | "escape_normalized" | "trimmed_boundary" | "unicode_normalized" | "block_anchor" | "context_aware";
38
45
  interface MatchResult {
@@ -4,6 +4,7 @@ export interface ReadToolParams {
4
4
  path: string;
5
5
  offset?: number;
6
6
  limit?: number;
7
+ includeMetadata?: boolean;
7
8
  }
8
9
  export declare const READ_TOOL_SCHEMA: {
9
10
  readonly type: "object";
@@ -20,6 +21,10 @@ export declare const READ_TOOL_SCHEMA: {
20
21
  readonly type: "number";
21
22
  readonly description: "Maximum number of lines to read. Default/max: 2000.";
22
23
  };
24
+ readonly includeMetadata: {
25
+ readonly type: "boolean";
26
+ readonly description: "Scan to EOF to return an exact totalLines and sha256 contentHash. Default false for low-latency large-file windows.";
27
+ };
23
28
  };
24
29
  readonly required: readonly ["path"];
25
30
  };
@@ -27,9 +32,26 @@ export type ReadResultType = "text" | "image" | "binary_rejected";
27
32
  /** Deps injected by the host runtime for file reading. */
28
33
  export interface ReadToolDeps {
29
34
  /** Read file content. Return string for text, image path for images, or rejection. */
30
- readFile(path: string): Promise<{
35
+ readFile(path: string, window?: {
36
+ offset: number;
37
+ limit: number;
38
+ maxBytes: number;
39
+ scanToEnd?: boolean;
40
+ }): Promise<{
31
41
  type: "text";
32
42
  text: string;
43
+ } | {
44
+ type: "text_window";
45
+ text: string;
46
+ totalLines?: number;
47
+ startLine: number;
48
+ endLine: number;
49
+ hasMore: boolean;
50
+ fileSizeBytes: number;
51
+ scannedBytes: number;
52
+ contentHash?: string;
53
+ metadataComplete: boolean;
54
+ truncatedByBytes: boolean;
33
55
  } | {
34
56
  type: "image";
35
57
  localPath: string;
@@ -0,0 +1,52 @@
1
+ import type { PortableTool } from "../portable-tool.js";
2
+ export declare const REPO_MAP_TOOL_NAME: "repo_map";
3
+ export type RepoMapRefreshMode = "full" | "incremental";
4
+ export type RepoMapSymbolKind = "class" | "function" | "interface" | "type" | "enum" | "constant";
5
+ export interface RepoMapSymbol {
6
+ kind: RepoMapSymbolKind;
7
+ name: string;
8
+ line: number;
9
+ }
10
+ export interface RepoMapFile {
11
+ path: string;
12
+ symbols: RepoMapSymbol[];
13
+ /** Conservative import/module specifiers; a lightweight navigation graph, not compiler resolution. */
14
+ dependencies?: string[];
15
+ }
16
+ export interface RepoMapMetadata {
17
+ mode: RepoMapRefreshMode;
18
+ scannedFiles: number;
19
+ changedFiles: number;
20
+ generation: number;
21
+ totalFiles: number;
22
+ matchedFiles: number;
23
+ truncated: boolean;
24
+ partial?: boolean;
25
+ stale?: boolean;
26
+ warning?: string;
27
+ }
28
+ export interface RepoMapResult {
29
+ files: RepoMapFile[];
30
+ metadata: RepoMapMetadata;
31
+ }
32
+ export interface RepoMapQuery {
33
+ query?: string;
34
+ path?: string;
35
+ maxFiles?: number;
36
+ forceFull?: boolean;
37
+ }
38
+ export interface RepoMapService {
39
+ getMap(query?: RepoMapQuery): Promise<RepoMapResult>;
40
+ }
41
+ export interface RepoMapToolParams {
42
+ query?: string;
43
+ path?: string;
44
+ maxFiles?: number;
45
+ refresh?: boolean;
46
+ }
47
+ export interface RepoMapToolDeps {
48
+ workspaceRoot: string;
49
+ repoMap: RepoMapService;
50
+ maxResultChars?: number;
51
+ }
52
+ export declare function createRepoMapTool(deps: RepoMapToolDeps): PortableTool<RepoMapToolParams>;
@@ -62,7 +62,9 @@ export interface SearchContentResult {
62
62
  }
63
63
  export interface SearchOutput {
64
64
  mode: SearchMode;
65
- totalMatches: number;
65
+ totalMatches?: number;
66
+ returnedMatches: number;
67
+ totalMatchesKnown: boolean;
66
68
  truncated: boolean;
67
69
  fileResults?: SearchFileResult[];
68
70
  contentResults?: SearchContentResult[];
@@ -78,9 +80,11 @@ export interface SearchToolDeps {
78
80
  glob(pattern: string, options: {
79
81
  cwd: string;
80
82
  limit: number;
83
+ offset?: number;
81
84
  }): Promise<{
82
85
  files: string[];
83
86
  truncated: boolean;
87
+ totalMatches?: number;
84
88
  }>;
85
89
  /**
86
90
  * Search file contents using regex.
@@ -105,6 +109,9 @@ export interface SearchToolDeps {
105
109
  contextAfter?: string[];
106
110
  }>;
107
111
  truncated: boolean;
112
+ /** Exact match count before pagination, omitted if the backend stopped early. */
113
+ totalMatches?: number;
114
+ totalMatchesKnown?: boolean;
108
115
  /**
109
116
  * Optional incompleteness note from the backend (e.g. the search process was
110
117
  * killed by timeout/output cap). Appended verbatim to the model-visible
@@ -114,5 +121,7 @@ export interface SearchToolDeps {
114
121
  }>;
115
122
  /** Resolve relative path to absolute. If omitted, cwd is used. */
116
123
  resolvePath?(input: string): string;
124
+ /** Validate access to the resolved search root. Null means allowed. */
125
+ validatePath?(path: string): string | null;
117
126
  }
118
127
  export declare function createSearchTool(deps: SearchToolDeps): PortableTool<SearchToolParams>;
@@ -10,9 +10,8 @@ export { getDestructiveCommandWarning, getPowerShellDestructiveCommandWarning, }
10
10
  export type { CommandSemanticResult } from "./command-semantics.js";
11
11
  export { interpretCommandResult } from "./command-semantics.js";
12
12
  export { TaskOutput, getTaskOutputDir, setTaskOutputDir, getTaskOutputPath, MAX_TASK_OUTPUT_BYTES, } from "./task-output.js";
13
- export type { ProgressCallback } from "./task-output.js";
14
13
  export type { ExecResult, ShellCommand } from "./shell-command.js";
15
14
  export { wrapSpawn, createAbortedCommand, createFailedCommand, } from "./shell-command.js";
16
15
  export { subprocessEnv } from "./subprocess-env.js";
17
- export { exec, getCwd, setCwd, initCwd, getOriginalCwd, setShellProvider, getShellProvider, getActiveShellInfo, } from "./shell-exec.js";
16
+ export { exec, getCwd, setCwd, initCwd, runWithCwd, getOriginalCwd, setShellProvider, getShellProvider, getActiveShellInfo, } from "./shell-exec.js";
18
17
  export type { ExecOptions } from "./shell-exec.js";
@@ -1,4 +1,4 @@
1
- import type { ChildProcess } from "node:child_process";
1
+ import { type ChildProcess } from "node:child_process";
2
2
  import { TaskOutput } from "./task-output.js";
3
3
  export interface ExecResult {
4
4
  stdout: string;
@@ -1,6 +1,5 @@
1
1
  import type { ShellProvider, ShellType } from "./shell-provider.js";
2
2
  import { type ShellCommand } from "./shell-command.js";
3
- import { type ProgressCallback } from "./task-output.js";
4
3
  import type { SandboxConfig } from "./sandbox/sandbox-types.js";
5
4
  export type { ExecResult } from "./shell-command.js";
6
5
  export declare function getCwd(): string;
@@ -9,9 +8,10 @@ export declare function setCwd(path: string, relativeTo?: string, opts?: {
9
8
  }): boolean;
10
9
  export declare function getOriginalCwd(): string;
11
10
  export declare function initCwd(cwd: string): void;
11
+ /** Bind shell and relative file-tool CWD state to one async turn. */
12
+ export declare function runWithCwd<T>(cwd: string, action: () => Promise<T>): Promise<T>;
12
13
  export interface ExecOptions {
13
14
  timeout?: number;
14
- onProgress?: ProgressCallback;
15
15
  /** When true, `cd` in the command does NOT update the session CWD. */
16
16
  preventCwdChanges?: boolean;
17
17
  shouldAutoBackground?: boolean;
@@ -1,5 +1,9 @@
1
- /** Progress callback — matches cc's signature. */
2
- export type ProgressCallback = (lastLines: string, allLines: string, totalLines: number, totalBytes: number, isIncomplete: boolean) => void;
1
+ export interface TaskOutputProgressSnapshot {
2
+ output: string;
3
+ totalBytes: number;
4
+ visibleLines: number;
5
+ truncated: boolean;
6
+ }
3
7
  /** Max output file on disk (background tasks). */
4
8
  export declare const MAX_TASK_OUTPUT_BYTES: number;
5
9
  export declare const MAX_TASK_OUTPUT_BYTES_DISPLAY = "5GB";
@@ -20,7 +24,7 @@ export declare class TaskOutput {
20
24
  readonly taskId: string;
21
25
  readonly path: string;
22
26
  readonly stdoutToFile: boolean;
23
- constructor(taskId: string, onProgress: ProgressCallback | null, stdoutToFile?: boolean, maxMemory?: number);
27
+ constructor(taskId: string, stdoutToFile?: boolean, maxMemory?: number);
24
28
  /** Write stdout data (pipe mode). */
25
29
  writeStdout(data: string): void;
26
30
  /** Write stderr data (pipe mode). */
@@ -36,6 +40,11 @@ export declare class TaskOutput {
36
40
  * cleanup), so it is measured before sanitizing.
37
41
  */
38
42
  getStdout(): Promise<string>;
43
+ /**
44
+ * Read a bounded live-output window for progress display. File-mode commands
45
+ * read only the tail window, so polling cost does not grow with command output.
46
+ */
47
+ getProgressSnapshot(maxBytes?: number): Promise<TaskOutputProgressSnapshot>;
39
48
  /** Get captured stderr. In file mode stderr is interleaved with stdout. */
40
49
  getStderr(): string;
41
50
  get outputFileSize(): number;
@@ -0,0 +1,15 @@
1
+ import type { PortableTool } from "../portable-tool.js";
2
+ export declare const SUBAGENT_DECISION_TOOL_NAME: "subagent_decision";
3
+ export type SubagentDecision = "adopted" | "partially_adopted" | "rejected";
4
+ export interface SubagentDecisionToolParams {
5
+ subagentId: string;
6
+ decision: SubagentDecision;
7
+ summary?: string;
8
+ }
9
+ export interface SubagentDecisionToolDeps {
10
+ readonly currentTurnId?: string;
11
+ readonly currentSessionId?: string;
12
+ getActiveProjectRoot?(): string;
13
+ sendNotification(method: string, params: Record<string, unknown>): void;
14
+ }
15
+ export declare function createSubagentDecisionTool(deps: SubagentDecisionToolDeps): PortableTool<SubagentDecisionToolParams>;
@@ -53,6 +53,8 @@ export interface TaskToolParams {
53
53
  action: TaskAction;
54
54
  id?: number;
55
55
  taskId?: string;
56
+ taskIds?: string[];
57
+ waitMs?: number;
56
58
  title?: string;
57
59
  description?: string;
58
60
  status?: TaskStatus;
@@ -76,6 +78,20 @@ export declare const TASK_TOOL_SCHEMA: {
76
78
  readonly type: "string";
77
79
  readonly description: "[output|cancel] Background task id (returned by agent background=true / exec background=true).";
78
80
  };
81
+ readonly taskIds: {
82
+ readonly type: "array";
83
+ readonly maxItems: 16;
84
+ readonly items: {
85
+ readonly type: "string";
86
+ };
87
+ readonly description: "[output] Several background task ids to check together. The wait delay is applied once, then all statuses are refreshed in parallel.";
88
+ };
89
+ readonly waitMs: {
90
+ readonly type: "number";
91
+ readonly minimum: 0;
92
+ readonly maximum: 10000;
93
+ readonly description: "[output] Optional one-time wait before refreshing running tasks. A timeout only reports current status; it never cancels or redelegates.";
94
+ };
79
95
  readonly title: {
80
96
  readonly type: "string";
81
97
  readonly description: "[create|update] Task title (3-7 words, imperative form).";
@@ -113,8 +129,6 @@ export declare const TASK_TOOL_SCHEMA: {
113
129
  export interface TaskToolOptions {
114
130
  /** Unique agent/session identifier for per-agent task isolation. */
115
131
  agentId?: string;
116
- /** Enable verification nudge (default: true). */
117
- verificationNudge?: boolean;
118
132
  }
119
133
  export interface TaskToolHooks {
120
134
  onTaskCreated?: (task: TaskItem) => void;
@@ -1,4 +1,5 @@
1
1
  import type { PortableTool } from "../portable-tool.js";
2
+ import type { TextFileWriteOptions } from "./file-text-snapshot.js";
2
3
  export declare const WRITE_TOOL_NAME: "write";
3
4
  export interface WriteToolParams {
4
5
  path: string;
@@ -21,7 +22,7 @@ export declare const WRITE_TOOL_SCHEMA: {
21
22
  /** Deps injected by the host runtime for file writing. */
22
23
  export interface WriteToolDeps {
23
24
  /** Write content to a file. Create parent dirs as needed. */
24
- writeFile(path: string, content: string): Promise<void>;
25
+ writeFile(path: string, content: string, options?: TextFileWriteOptions): Promise<void>;
25
26
  /** Check whether the resolved path already exists. */
26
27
  fileExists?(path: string): Promise<boolean> | boolean;
27
28
  /** Resolve a relative path to absolute. */
@@ -80,6 +80,7 @@ export interface AcpRequestHandler {
80
80
  handleAcpSoloSubscribe(params: Record<string, unknown>): Promise<unknown>;
81
81
  handleAcpSoloMessage(params: Record<string, unknown>): Promise<unknown>;
82
82
  handleAcpSoloEvaluate(params: Record<string, unknown>): Promise<unknown>;
83
+ handleAcpSoloDelete(params: Record<string, unknown>): Promise<unknown>;
83
84
  handleAcpSoloSpecChat(params: Record<string, unknown>): Promise<unknown>;
84
85
  handleAcpWorkflowChat(params: Record<string, unknown>): Promise<unknown>;
85
86
  handleAcpWorkflowMatchIntent(params: Record<string, unknown>): Promise<unknown>;
@@ -0,0 +1,10 @@
1
+ import type { HostRequestClient } from "./host-request-client.js";
2
+ export interface HostCloudAuthProbeResult {
3
+ ok: boolean;
4
+ status: number;
5
+ }
6
+ export declare class HostCloudAuthClient {
7
+ private readonly client;
8
+ constructor(client: Pick<HostRequestClient, "request">);
9
+ probeSession(): Promise<HostCloudAuthProbeResult>;
10
+ }
@@ -0,0 +1,8 @@
1
+ import type { HostRequestClient } from "./host-request-client.js";
2
+ export declare class HostCommunityClient {
3
+ private readonly client;
4
+ constructor(client: Pick<HostRequestClient, "request">);
5
+ resolveInstall(resourceId: string, version?: string): Promise<unknown>;
6
+ listResourceVersions(resourceId: string): Promise<unknown>;
7
+ resolveRuntime(id: string, platform: string): Promise<unknown>;
8
+ }
@@ -6,6 +6,12 @@ export declare class HostRunStateClient {
6
6
  private readonly requester;
7
7
  constructor(requester: HostRunStateRequester);
8
8
  open(runId: string, kind: "solo" | "product" | "goal", projectId: string, sessionId: string): Promise<string>;
9
+ /**
10
+ * Atomic open + first checkpoint. Prefer this over `open()` then `checkpoint()` whenever the first
11
+ * snapshot is already in hand: the two-call sequence can leave an addressable run with no checkpoint,
12
+ * and one such remnant permanently breaks the whole project's run-list projection.
13
+ */
14
+ openWithCheckpoint(runId: string, kind: "solo" | "product" | "goal", projectId: string, snapshot: unknown, sessionId: string, checkpointId?: string): Promise<string>;
9
15
  recordEvent(runId: string, event: Omit<RunEvent, "member">, sessionId: string): Promise<void>;
10
16
  checkpoint(runId: string, snapshot: unknown, sessionId: string, checkpointId?: string): Promise<void>;
11
17
  get(runId: string, sessionId: string): Promise<RunState>;
@@ -20,12 +20,19 @@ export { hostExecutors, HOST_BACKED_KINDS } from "./orchestration/workflow/host-
20
20
  export type { ExecutorHost } from "./orchestration/workflow/node-schema.js";
21
21
  export type { AgentHostRequest, ApprovalHostRequest, ChannelHostRequest, HttpHostRequest, McpHostRequest, MemoryHostRequest, SubworkflowHostRequest, WebhookWaitHostRequest, } from "./orchestration/workflow/node-schema.js";
22
22
  export { WorkflowRunHistoryStore } from "./orchestration/workflow/run-history-store.js";
23
+ export type { RecoverableWorkflowRun } from "./orchestration/workflow/run-history-store.js";
24
+ export type { WorkflowTriggerKind } from "./orchestration/workflow/budget-permission-gate.js";
23
25
  export { FileRunCheckpoint } from "./orchestration/workflow/run-checkpoint-store.js";
24
26
  export type { RunCheckpoint } from "./orchestration/workflow/run-checkpoint-store.js";
25
27
  export { WorkflowAuditStore } from "./orchestration/workflow/workflow-audit-store.js";
26
28
  export { applyPatch, PatchError } from "./orchestration/workflow/workflow-patch.js";
27
- export type { PatchEnvelope, WorkflowPatch } from "./orchestration/workflow/workflow-patch.js";
29
+ export type { ApplyResult, PatchEnvelope, WorkflowPatch, WorkflowPatchDiagnostic } from "./orchestration/workflow/workflow-patch.js";
30
+ export { builtinWorkflowCapabilities } from "./orchestration/workflow/builtin-capabilities.js";
31
+ export { buildWorkflowEditContextCapsule } from "./orchestration/workflow/workflow-edit-context.js";
32
+ export type { WorkflowEditContextCapsule, WorkflowRunEvidence } from "./orchestration/workflow/workflow-edit-context.js";
28
33
  export { fromWorkflowBundle, toWorkflowBundle } from "./orchestration/workflow/workflow-bundle.js";
29
34
  export type { ParsedBundle, WorkflowBundle } from "./orchestration/workflow/workflow-bundle.js";
35
+ export { applyWorkflowTemplateSetup, projectWorkflowTemplateSetup, validateWorkflowTemplateSetup, } from "./orchestration/workflow/workflow-template-setup.js";
36
+ export type { WorkflowTemplateSetupBinding, WorkflowTemplateSetupField, WorkflowTemplateSetupManifest, WorkflowTemplateSetupProjection, WorkflowTemplateSetupState, WorkflowTemplateSetupValue, } from "./orchestration/workflow/workflow-template-setup.js";
30
37
  export { renderWorkflow } from "./orchestration/workflow/workflow-render.js";
31
38
  export type { WorkflowDef } from "./orchestration/workflow/node-schema.js";