@wrongstack/tools 0.319.1 → 1.0.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.
- package/dist/_danger-detect.d.ts +8 -0
- package/dist/_syntax-check.d.ts +1 -2
- package/dist/audit.d.ts +4 -5
- package/dist/audit.js +8 -8
- package/dist/auto-proceed-loop-guard.js +9 -160
- package/dist/bash-kill-guard.d.ts +2 -3
- package/dist/bash.d.ts +2 -3
- package/dist/bash.js +6 -6
- package/dist/batch-tool-use.d.ts +2 -3
- package/dist/batch-tool-use.js +1 -1
- package/dist/browser/index.d.ts +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/tools.d.ts +56 -45
- package/dist/builtin.js +55 -55
- package/dist/{chunk-RJZQWEMS.js → chunk-24T5XIJU.js} +3 -2
- package/dist/{chunk-DTQ75VBC.js → chunk-2CTZW6JQ.js} +2 -2
- package/dist/chunk-37QKUQ2Z.js +171 -0
- package/dist/{chunk-LOBRWKCR.js → chunk-3D5DJWOE.js} +3 -3
- package/dist/{chunk-YOKD4GWJ.js → chunk-4ERMPDHV.js} +14 -8
- package/dist/{chunk-5EUJF3WC.js → chunk-4WPBS45A.js} +4 -5
- package/dist/{chunk-42BHI7TN.js → chunk-5ITQPCLC.js} +2 -2
- package/dist/{chunk-B4HTSV6Z.js → chunk-5KS24LTS.js} +11 -11
- package/dist/{chunk-QPNYDH5B.js → chunk-62OAECEQ.js} +29 -7
- package/dist/{chunk-IYKXK356.js → chunk-6GOZTS6F.js} +4 -4
- package/dist/{chunk-OG2BEUBY.js → chunk-7HL23T3T.js} +73 -16
- package/dist/{chunk-HFXSNKCV.js → chunk-7JJFC6CT.js} +1 -1
- package/dist/{chunk-TTZOK6IY.js → chunk-7N5U2RAU.js} +2 -2
- package/dist/{chunk-QBV725YG.js → chunk-7ODZTPCU.js} +2 -2
- package/dist/{chunk-OTINMOKK.js → chunk-AB2CAUOP.js} +66 -55
- package/dist/{chunk-6AAOT4PW.js → chunk-AQ5YBURX.js} +16 -4
- package/dist/{chunk-JDPQOR7C.js → chunk-ASEXQRA7.js} +19 -19
- package/dist/{chunk-FRN7TIAA.js → chunk-B3MGJBFI.js} +1 -1
- package/dist/{chunk-IWS56OY7.js → chunk-CGXTR34H.js} +63 -4
- package/dist/{chunk-IU4DV2PA.js → chunk-CHEK3ASV.js} +6 -3
- package/dist/{chunk-GOIZNNOA.js → chunk-DJYLI7EW.js} +1 -1
- package/dist/{chunk-CFLJFDYV.js → chunk-DK4J2WMH.js} +14 -11
- package/dist/{chunk-ZHH3BEWU.js → chunk-DRRY6SCM.js} +49 -22
- package/dist/{chunk-BK732J7I.js → chunk-FBUP524S.js} +4 -4
- package/dist/{chunk-WHIIIREL.js → chunk-FVM3O4JQ.js} +7 -3
- package/dist/chunk-FYDBUVQD.js +244 -0
- package/dist/{chunk-UDVKRX5R.js → chunk-GDDXX27P.js} +50 -50
- package/dist/{chunk-O44IMQCN.js → chunk-GKSG5CPH.js} +6 -6
- package/dist/{chunk-3PVYQFRQ.js → chunk-HDYUBRMF.js} +5 -3
- package/dist/{chunk-ELRRTWNP.js → chunk-IXIS7RSG.js} +2 -2
- package/dist/{chunk-X5FOFGXX.js → chunk-IYH4OHBP.js} +6 -6
- package/dist/{chunk-MNP3GE7H.js → chunk-JDOO4P6Z.js} +21 -16
- package/dist/{chunk-BSJSNVGA.js → chunk-KDEXUQY7.js} +24 -11
- package/dist/{chunk-V43EQ6VR.js → chunk-KE7A76VC.js} +3 -2
- package/dist/{chunk-2OXHS3KZ.js → chunk-KLJZ4WV4.js} +4 -3
- package/dist/{chunk-3M7LLN7W.js → chunk-LQSOU63Z.js} +12 -11
- package/dist/{chunk-DC4KMPJO.js → chunk-M6UV67BH.js} +2 -2
- package/dist/{chunk-C2DQKVLO.js → chunk-MJSJWXBF.js} +1 -1
- package/dist/{chunk-RNWUCZ2U.js → chunk-MK2JK35J.js} +29 -12
- package/dist/{chunk-FQZOHLG3.js → chunk-MSOAX3GC.js} +3 -2
- package/dist/{chunk-KY4PXYSO.js → chunk-N3K2SFEI.js} +534 -494
- package/dist/{chunk-EADULOZV.js → chunk-NJX2RXKJ.js} +50 -7
- package/dist/{chunk-AKHYMB4V.js → chunk-NN2SNP2R.js} +6 -6
- package/dist/{chunk-CMOUCKGC.js → chunk-NU2IZ72J.js} +6 -6
- package/dist/{chunk-RLMX75EM.js → chunk-O6BY43ZB.js} +29 -8
- package/dist/{chunk-NKNOBUBU.js → chunk-PVCB7RUZ.js} +2 -2
- package/dist/{chunk-UQQS3VNT.js → chunk-QA6IASYX.js} +8 -8
- package/dist/{chunk-VPALDFYM.js → chunk-RV7BVTDG.js} +1 -1
- package/dist/chunk-S57CDR2H.js +288 -0
- package/dist/{chunk-2VSZC6QM.js → chunk-SCMRM6NL.js} +6 -4
- package/dist/{chunk-W2CECGTG.js → chunk-SMARDKAC.js} +1 -1
- package/dist/{chunk-45JPRMC2.js → chunk-SOR7OCYP.js} +7 -3
- package/dist/{chunk-ATSKPZUK.js → chunk-T3SMFF5Q.js} +11 -5
- package/dist/{chunk-4BHUSMNL.js → chunk-UI3ZJIG3.js} +1 -1
- package/dist/{chunk-WXJY3BKV.js → chunk-VBF2YXUW.js} +2 -2
- package/dist/{chunk-FQNXYA6W.js → chunk-VU3QBYL4.js} +36 -5
- package/dist/{chunk-IIF5HIVF.js → chunk-VVZPQPTY.js} +2 -2
- package/dist/{chunk-VD2LV5WO.js → chunk-VZGPASGD.js} +37 -12
- package/dist/{chunk-64VIJPFV.js → chunk-WEEVSWQB.js} +17 -6
- package/dist/chunk-XXRMF2BC.js +186 -0
- package/dist/{chunk-RTZWBNTY.js → chunk-YEISRT4S.js} +7 -12
- package/dist/{chunk-Q5JPPCZC.js → chunk-YJTXRH5Y.js} +3 -2
- package/dist/{chunk-GMZYW52L.js → chunk-YULVUTK5.js} +6 -3
- package/dist/{chunk-NWZ6XGBJ.js → chunk-ZBMANLYH.js} +5 -3
- package/dist/{chunk-DP6CXMJZ.js → chunk-ZTCJCYLN.js} +3 -3
- package/dist/circuit-breaker.d.ts +1 -0
- package/dist/circuit-breaker.js +1 -1
- package/dist/clarify.d.ts +1 -0
- package/dist/codebase-index/codebase-ast-replace-tool.d.ts +2 -3
- package/dist/codebase-index/codebase-impact-analysis-tool.d.ts +5 -4
- package/dist/codebase-index/codebase-incoming-calls-tool.d.ts +4 -3
- package/dist/codebase-index/codebase-index-tool.d.ts +2 -3
- package/dist/codebase-index/codebase-invariant-check-tool.d.ts +2 -3
- package/dist/codebase-index/codebase-outgoing-calls-tool.d.ts +4 -3
- package/dist/codebase-index/codebase-repo-map-tool.d.ts +2 -3
- package/dist/codebase-index/codebase-search-tool.d.ts +2 -3
- package/dist/codebase-index/codebase-skeleton-tool.d.ts +2 -3
- package/dist/codebase-index/codebase-stats-tool.d.ts +9 -3
- package/dist/codebase-index/codebase-targeted-test-tool.d.ts +4 -3
- package/dist/codebase-index/index.d.ts +11 -11
- package/dist/codebase-index/index.js +12 -12
- package/dist/codebase-index/parser-worker-script.js +3 -3
- package/dist/codebase-index/project-server-framing.d.ts +29 -0
- package/dist/codebase-index/project-server-lifecycle.d.ts +20 -0
- package/dist/codebase-index/project-server-operations.d.ts +37 -0
- package/dist/codebase-index/project-server-types.d.ts +30 -0
- package/dist/codebase-index/project-server-watcher.d.ts +25 -0
- package/dist/codebase-index/project-server.js +451 -394
- package/dist/codebase-index/worker.js +5 -5
- package/dist/codebase-index/writer-init.d.ts +13 -0
- package/dist/codebase-index/writer-maintenance.d.ts +14 -0
- package/dist/codebase-index/writer.d.ts +0 -15
- package/dist/design.d.ts +2 -2
- package/dist/design.js +1 -1
- package/dist/diff.d.ts +4 -4
- package/dist/diff.js +2 -2
- package/dist/document.d.ts +3 -4
- package/dist/document.js +1 -1
- package/dist/e2e.d.ts +1 -1
- package/dist/e2e.js +1 -1
- package/dist/edit.d.ts +3 -3
- package/dist/edit.js +9 -9
- package/dist/exec.d.ts +2 -3
- package/dist/exec.js +6 -6
- package/dist/fetch.d.ts +4 -3
- package/dist/fetch.js +1 -1
- package/dist/format.d.ts +17 -45
- package/dist/format.js +14 -10
- package/dist/git.d.ts +3 -3
- package/dist/git.js +1 -1
- package/dist/glob.d.ts +2 -3
- package/dist/glob.js +3 -3
- package/dist/{go-parser-IKHW67WE.js → go-parser-D7ELWQ7F.js} +2 -2
- package/dist/grep.d.ts +7 -5
- package/dist/grep.js +4 -4
- package/dist/index.d.ts +54 -45
- package/dist/index.js +122 -63
- package/dist/install.d.ts +7 -55
- package/dist/install.js +8 -8
- package/dist/{json-parser-2EOVP5MR.js → json-parser-34DHYCPW.js} +1 -18
- package/dist/json.d.ts +3 -4
- package/dist/json.js +2 -2
- package/dist/kanban-tool-types.d.ts +1 -2
- package/dist/kanban.d.ts +3 -19
- package/dist/kanban.js +1 -1
- package/dist/languages/execute-tool.d.ts +2 -3
- package/dist/languages/index.d.ts +2 -2
- package/dist/languages/index.js +6 -6
- package/dist/languages/tool.d.ts +3 -4
- package/dist/legacy-bridge-YXANP5QB.js +18 -0
- package/dist/lint.d.ts +5 -4
- package/dist/lint.js +8 -8
- package/dist/logs.d.ts +3 -4
- package/dist/logs.js +2 -2
- package/dist/memory.d.ts +7 -8
- package/dist/memory.js +1 -1
- package/dist/mode.d.ts +3 -4
- package/dist/mode.js +1 -1
- package/dist/next-steps-tool.d.ts +2 -3
- package/dist/next-steps.d.ts +11 -0
- package/dist/next-steps.js +10 -132
- package/dist/outdated.d.ts +5 -29
- package/dist/outdated.js +4 -4
- package/dist/pack.js +56 -56
- package/dist/{parser-dispatch-QGC4HSP5.js → parser-dispatch-BDVCJXTV.js} +4 -4
- package/dist/patch.d.ts +2 -3
- package/dist/patch.js +8 -8
- package/dist/plan.d.ts +4 -4
- package/dist/plan.js +3 -3
- package/dist/process-registry.js +2 -2
- package/dist/ps-slash.js +4 -4
- package/dist/pwsh.d.ts +1 -0
- package/dist/{py-parser-RFWG2HYI.js → py-parser-QC6MR4GB.js} +3 -3
- package/dist/read.d.ts +5 -5
- package/dist/read.js +8 -8
- package/dist/replace.d.ts +2 -3
- package/dist/replace.js +10 -10
- package/dist/scaffold.d.ts +7 -3
- package/dist/scaffold.js +3 -1
- package/dist/search.d.ts +17 -3
- package/dist/search.js +5 -1
- package/dist/set-working-dir.d.ts +2 -3
- package/dist/skill.d.ts +4 -5
- package/dist/skill.js +1 -1
- package/dist/task.d.ts +6 -6
- package/dist/task.js +3 -3
- package/dist/test.d.ts +5 -4
- package/dist/test.js +8 -8
- package/dist/todo.d.ts +8 -8
- package/dist/todo.js +2 -2
- package/dist/tool-diff.js +11 -230
- package/dist/tool-help.d.ts +2 -3
- package/dist/tool-help.js +1 -1
- package/dist/tool-search.d.ts +2 -3
- package/dist/tool-search.js +1 -1
- package/dist/tool-summary.js +5 -281
- package/dist/tool-tier.js +57 -57
- package/dist/tool-use.d.ts +2 -3
- package/dist/tool-use.js +1 -1
- package/dist/tree.d.ts +5 -3
- package/dist/tree.js +5 -1
- package/dist/typecheck.d.ts +3 -3
- package/dist/typecheck.js +8 -8
- package/dist/win32.js +1 -1
- package/dist/write.d.ts +2 -3
- package/dist/write.js +9 -9
- package/package.json +5 -5
- package/dist/legacy-bridge-3T7SR4SK.js +0 -18
- package/dist/spawn-background.d.ts +0 -80
|
@@ -158,23 +158,6 @@ function regexParse(opts) {
|
|
|
158
158
|
);
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
const defsRegex = /"\$defs"\s*:|"\$defs"\s*:/g;
|
|
162
|
-
const defsMatch = defsRegex.exec(content);
|
|
163
|
-
if (defsMatch !== null) {
|
|
164
|
-
const offset = expectDefined(defsMatch.index);
|
|
165
|
-
const line = lineFromOffset(offset);
|
|
166
|
-
pushSymbol(
|
|
167
|
-
makeSymbol({
|
|
168
|
-
name: "$defs",
|
|
169
|
-
kind: "property",
|
|
170
|
-
line,
|
|
171
|
-
col: offset - (lineOffsets[line - 1] ?? 0),
|
|
172
|
-
signature: '"$defs": { ... }',
|
|
173
|
-
file,
|
|
174
|
-
lang
|
|
175
|
-
})
|
|
176
|
-
);
|
|
177
|
-
}
|
|
178
161
|
const defsPatterns = [
|
|
179
162
|
/"\$defs"\s*:/g,
|
|
180
163
|
/"definitions"\s*:/g,
|
|
@@ -276,4 +259,4 @@ export {
|
|
|
276
259
|
detectLang,
|
|
277
260
|
parseSymbols
|
|
278
261
|
};
|
|
279
|
-
//# sourceMappingURL=json-parser-
|
|
262
|
+
//# sourceMappingURL=json-parser-34DHYCPW.js.map
|
package/dist/json.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Tool } from '@wrongstack/core/types';
|
|
2
|
-
type JsonAction = 'parse' | 'query' | 'validate' | 'transform' | 'merge';
|
|
3
|
-
interface JsonInput {
|
|
2
|
+
export type JsonAction = 'parse' | 'query' | 'validate' | 'transform' | 'merge';
|
|
3
|
+
export interface JsonInput {
|
|
4
4
|
/** Operation to perform. Defaults to 'parse'. */
|
|
5
5
|
action?: JsonAction | undefined;
|
|
6
6
|
/** Path to JSON/JSON5/YAML file (alternative to `data`). */
|
|
@@ -23,7 +23,7 @@ interface JsonInput {
|
|
|
23
23
|
/** Merge conflict resolution: 'prefer-patch' (default) or 'prefer-base'. */
|
|
24
24
|
conflictResolution?: 'prefer-base' | 'prefer-patch' | undefined;
|
|
25
25
|
}
|
|
26
|
-
interface JsonOutput {
|
|
26
|
+
export interface JsonOutput {
|
|
27
27
|
data: unknown;
|
|
28
28
|
formatted: string;
|
|
29
29
|
type: string;
|
|
@@ -40,5 +40,4 @@ interface JsonOutput {
|
|
|
40
40
|
error?: string | undefined;
|
|
41
41
|
}
|
|
42
42
|
export declare const jsonTool: Tool<JsonInput, JsonOutput>;
|
|
43
|
-
export {};
|
|
44
43
|
//# sourceMappingURL=json.d.ts.map
|
package/dist/json.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SerializedTaskGraph } from '@wrongstack/core/types';
|
|
2
2
|
import type { AssignKanbanTaskInput, KanbanAgentRunStatus, KanbanBoard, KanbanBoardSummary, KanbanCompletionGateEnforcement, KanbanContractEdgeType, KanbanContractEnforcement, KanbanContractGraph, KanbanContractGraphEnforcement, KanbanContractGraphEvaluation, KanbanContractNodeKind, KanbanContractNodeState, KanbanDecompositionSubtask, KanbanEvent, KanbanLifecycleStage, KanbanOrchestrationSnapshot, KanbanQueueHealth, KanbanSearchResult, KanbanTask, KanbanTaskPriority, KanbanTaskStatus, KanbanTaskType, KanbanVerificationReport, KanbanWorkbenchSnapshot } from '@wrongstack/kanban';
|
|
3
|
-
type KanbanAction = 'list_boards' | 'get_board' | 'create_board' | 'duplicate_board' | 'update_board' | 'adopt_managed_lifecycle' | 'release_managed_lifecycle' | 'delete_board' | 'generate_board' | 'export_markdown' | 'export_task_graph' | 'sync_task_graph' | 'create_from_graph' | 'import_session_tasks' | 'search_tasks' | 'ready_tasks' | 'snapshot' | 'workbench' | 'add_task' | 'split_task' | 'merge_tasks' | 'copy_task' | 'transfer_task' | 'get_task' | 'start_task' | 'update_task' | 'transition_task' | 'repair_managed_projection' | 'move_task' | 'delete_task' | 'set_chain' | 'get_chain' | 'claim_task' | 'release_task' | 'assign_task' | 'mark_assignment' | 'heartbeat_assignment' | 'recover_stale' | 'events' | 'queue_health' | 'add_dependency' | 'add_goal_metric' | 'update_goal_metric' | 'add_check' | 'update_check' | 'remove_check' | 'add_note' | 'add_link' | 'verify_completion' | 'split_atomic' | 'assess_atomicity' | 'propose_decomposition' | 'get_contract_graph' | 'configure_contract_graph' | 'upsert_contract_node' | 'remove_contract_node' | 'add_contract_edge' | 'remove_contract_edge';
|
|
3
|
+
export type KanbanAction = 'list_boards' | 'get_board' | 'create_board' | 'duplicate_board' | 'update_board' | 'adopt_managed_lifecycle' | 'release_managed_lifecycle' | 'delete_board' | 'generate_board' | 'export_markdown' | 'export_task_graph' | 'sync_task_graph' | 'create_from_graph' | 'import_session_tasks' | 'search_tasks' | 'ready_tasks' | 'snapshot' | 'workbench' | 'add_task' | 'split_task' | 'merge_tasks' | 'copy_task' | 'transfer_task' | 'get_task' | 'start_task' | 'update_task' | 'transition_task' | 'repair_managed_projection' | 'move_task' | 'delete_task' | 'set_chain' | 'get_chain' | 'claim_task' | 'release_task' | 'assign_task' | 'mark_assignment' | 'heartbeat_assignment' | 'recover_stale' | 'events' | 'queue_health' | 'add_dependency' | 'add_goal_metric' | 'update_goal_metric' | 'add_check' | 'update_check' | 'remove_check' | 'add_note' | 'add_link' | 'verify_completion' | 'split_atomic' | 'assess_atomicity' | 'propose_decomposition' | 'get_contract_graph' | 'configure_contract_graph' | 'upsert_contract_node' | 'remove_contract_node' | 'add_contract_edge' | 'remove_contract_edge';
|
|
4
4
|
export interface KanbanToolInput extends Omit<AssignKanbanTaskInput, 'status'> {
|
|
5
5
|
action: KanbanAction;
|
|
6
6
|
boardId?: string | undefined;
|
|
@@ -178,5 +178,4 @@ export interface KanbanToolOutput {
|
|
|
178
178
|
contractGraph?: KanbanContractGraph | null | undefined;
|
|
179
179
|
contractEvaluation?: KanbanContractGraphEvaluation | undefined;
|
|
180
180
|
}
|
|
181
|
-
export {};
|
|
182
181
|
//# sourceMappingURL=kanban-tool-types.d.ts.map
|
package/dist/kanban.d.ts
CHANGED
|
@@ -1,22 +1,6 @@
|
|
|
1
1
|
import type { Tool } from '@wrongstack/core/types';
|
|
2
2
|
import type { KanbanToolInput, KanbanToolOutput } from './kanban-tool-types.js';
|
|
3
|
-
type KanbanContext = Parameters<Tool<KanbanToolInput, KanbanToolOutput>['execute']>[1];
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
category: string;
|
|
7
|
-
description: string;
|
|
8
|
-
usageHint: string;
|
|
9
|
-
permission: "confirm";
|
|
10
|
-
subjectKey: string;
|
|
11
|
-
mutating: true;
|
|
12
|
-
capabilities: string[];
|
|
13
|
-
icon: "task";
|
|
14
|
-
timeoutMs: number;
|
|
15
|
-
inputSchema: import("@wrongstack/core/types").JSONSchema;
|
|
16
|
-
execute(input: KanbanToolInput, ctx: KanbanContext, _opts?: {
|
|
17
|
-
signal: AbortSignal;
|
|
18
|
-
}): Promise<KanbanToolOutput>;
|
|
19
|
-
serialize(output: KanbanToolOutput, input: KanbanToolInput): string;
|
|
20
|
-
};
|
|
21
|
-
export {};
|
|
3
|
+
export type KanbanContext = Parameters<Tool<KanbanToolInput, KanbanToolOutput>['execute']>[1];
|
|
4
|
+
export type { KanbanAction, KanbanToolInput, KanbanToolOutput } from './kanban-tool-types.js';
|
|
5
|
+
export declare const kanbanTool: Tool<KanbanToolInput, KanbanToolOutput>;
|
|
22
6
|
//# sourceMappingURL=kanban.d.ts.map
|
package/dist/kanban.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Tool } from '@wrongstack/core/types';
|
|
2
2
|
import type { LanguageDiagnostic, LanguageProfileId, LanguageRunResult } from './types.js';
|
|
3
|
-
interface LanguageToolInput {
|
|
3
|
+
export interface LanguageToolInput {
|
|
4
4
|
action: 'check' | 'lint' | 'format' | 'test' | 'build' | 'debug';
|
|
5
5
|
cwd?: string | undefined;
|
|
6
6
|
target?: string | undefined;
|
|
@@ -14,7 +14,7 @@ interface LanguageToolInput {
|
|
|
14
14
|
noRun?: boolean | undefined;
|
|
15
15
|
debug?: 'compile' | 'test' | 'runtime' | 'race' | undefined;
|
|
16
16
|
}
|
|
17
|
-
interface LanguageToolOutput {
|
|
17
|
+
export interface LanguageToolOutput {
|
|
18
18
|
status: 'passed' | 'failed' | 'unavailable' | 'cancelled' | 'timed_out';
|
|
19
19
|
language?: LanguageProfileId | undefined;
|
|
20
20
|
workspace?: string | undefined;
|
|
@@ -30,5 +30,4 @@ interface LanguageToolOutput {
|
|
|
30
30
|
output: string;
|
|
31
31
|
}
|
|
32
32
|
export declare const languageTool: Tool<LanguageToolInput, LanguageToolOutput>;
|
|
33
|
-
export {};
|
|
34
33
|
//# sourceMappingURL=execute-tool.d.ts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export { detectLanguageWorkspaces } from './detect.js';
|
|
2
2
|
export { diagnosticsForInternalSyntax, type ParsedPackageReports, parseLanguageDiagnostics, parsePackageReports, } from './diagnostics.js';
|
|
3
3
|
export { type ExecuteLanguagePlanOptions, type ExecutePackagePlanOptions, executeLanguagePlan, executePackagePlan, } from './execute.js';
|
|
4
|
-
export { languageTool } from './execute-tool.js';
|
|
4
|
+
export { languageTool, type LanguageToolInput, type LanguageToolOutput, } from './execute-tool.js';
|
|
5
5
|
export { type LanguagePackageInput, type LanguagePackageToolOutput, languagePackageTool, } from './package-tool.js';
|
|
6
6
|
export { planLanguageOperation, validateCommandPlan } from './plan.js';
|
|
7
7
|
export { ADDITIONAL_LANGUAGE_PROFILES } from './profiles/additional.js';
|
|
8
8
|
export { PRIMARY_LANGUAGE_PROFILES } from './profiles/primary.js';
|
|
9
9
|
export { LanguageProfileRegistry, languageProfileRegistry, validateLanguageProfile, } from './registry.js';
|
|
10
|
-
export { languageInfoTool } from './tool.js';
|
|
10
|
+
export { languageInfoTool, type LanguageCapabilitiesOutput, type LanguageInfoInput, type LanguageInfoOutput, } from './tool.js';
|
|
11
11
|
export type { CommandPlan, DetectedWorkspace, DetectionLimits, DetectionResult, DetectLanguageOptions, DetectorRule, EvidenceKind, LanguageDiagnostic, LanguageDiagnosticPosition, LanguageEvidence, LanguageOperation, LanguageOperationOptions, LanguagePackageMutation, LanguagePackageOutcome, LanguagePackageVulnerability, LanguageProfile, LanguageProfileId, LanguageRunResult, LanguageRunSummary, PackageMutation, PackageRead, PlanLanguageOptions, PlanLanguageResult, ProfileContext, UnavailableOperation, } from './types.js';
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/languages/index.js
CHANGED
|
@@ -15,12 +15,12 @@ import {
|
|
|
15
15
|
planLanguageOperation,
|
|
16
16
|
validateCommandPlan,
|
|
17
17
|
validateLanguageProfile
|
|
18
|
-
} from "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
18
|
+
} from "../chunk-7N5U2RAU.js";
|
|
19
|
+
import "../chunk-DRRY6SCM.js";
|
|
20
|
+
import "../chunk-SCMRM6NL.js";
|
|
21
|
+
import "../chunk-HDYUBRMF.js";
|
|
22
|
+
import "../chunk-7JJFC6CT.js";
|
|
23
|
+
import "../chunk-KE7A76VC.js";
|
|
24
24
|
import "../chunk-ZUFHAHTE.js";
|
|
25
25
|
export {
|
|
26
26
|
ADDITIONAL_LANGUAGE_PROFILES,
|
package/dist/languages/tool.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Tool } from '@wrongstack/core/types';
|
|
|
2
2
|
import { detectLanguageWorkspaces } from './detect.js';
|
|
3
3
|
import { planLanguageOperation } from './plan.js';
|
|
4
4
|
import type { LanguageOperation, LanguageOperationOptions, LanguageProfileId } from './types.js';
|
|
5
|
-
interface LanguageInfoInput {
|
|
5
|
+
export interface LanguageInfoInput {
|
|
6
6
|
action: 'detect' | 'plan' | 'capabilities';
|
|
7
7
|
cwd?: string | undefined;
|
|
8
8
|
target?: string | undefined;
|
|
@@ -12,7 +12,7 @@ interface LanguageInfoInput {
|
|
|
12
12
|
mode?: 'fast' | 'standard' | 'thorough' | undefined;
|
|
13
13
|
options?: LanguageOperationOptions | undefined;
|
|
14
14
|
}
|
|
15
|
-
interface LanguageCapabilitiesOutput {
|
|
15
|
+
export interface LanguageCapabilitiesOutput {
|
|
16
16
|
action: 'capabilities';
|
|
17
17
|
profiles: Array<{
|
|
18
18
|
id: LanguageProfileId;
|
|
@@ -22,11 +22,10 @@ interface LanguageCapabilitiesOutput {
|
|
|
22
22
|
packageManagers: readonly string[];
|
|
23
23
|
}>;
|
|
24
24
|
}
|
|
25
|
-
type LanguageInfoOutput = ({
|
|
25
|
+
export type LanguageInfoOutput = ({
|
|
26
26
|
action: 'detect';
|
|
27
27
|
} & Awaited<ReturnType<typeof detectLanguageWorkspaces>>) | ({
|
|
28
28
|
action: 'plan';
|
|
29
29
|
} & Awaited<ReturnType<typeof planLanguageOperation>>) | LanguageCapabilitiesOutput;
|
|
30
30
|
export declare const languageInfoTool: Tool<LanguageInfoInput, LanguageInfoOutput>;
|
|
31
|
-
export {};
|
|
32
31
|
//# sourceMappingURL=tool.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
detectNonJsEcosystem,
|
|
3
|
+
tryLegacyCodeOperation,
|
|
4
|
+
tryLegacyPackageOperation
|
|
5
|
+
} from "./chunk-T3SMFF5Q.js";
|
|
6
|
+
import "./chunk-7N5U2RAU.js";
|
|
7
|
+
import "./chunk-DRRY6SCM.js";
|
|
8
|
+
import "./chunk-SCMRM6NL.js";
|
|
9
|
+
import "./chunk-HDYUBRMF.js";
|
|
10
|
+
import "./chunk-7JJFC6CT.js";
|
|
11
|
+
import "./chunk-KE7A76VC.js";
|
|
12
|
+
import "./chunk-ZUFHAHTE.js";
|
|
13
|
+
export {
|
|
14
|
+
detectNonJsEcosystem,
|
|
15
|
+
tryLegacyCodeOperation,
|
|
16
|
+
tryLegacyPackageOperation
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=legacy-bridge-YXANP5QB.js.map
|
package/dist/lint.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { Tool } from '@wrongstack/core/types';
|
|
2
|
-
|
|
2
|
+
export type LinterName = 'biome' | 'eslint' | 'tslint' | 'auto';
|
|
3
|
+
export interface LintInput {
|
|
3
4
|
files?: string | string[] | undefined;
|
|
4
5
|
fix?: boolean | undefined;
|
|
5
|
-
linter?:
|
|
6
|
+
linter?: LinterName | undefined;
|
|
6
7
|
cwd?: string | undefined;
|
|
7
8
|
}
|
|
8
|
-
interface LintOutput {
|
|
9
|
+
export interface LintOutput {
|
|
9
10
|
linter: string;
|
|
10
11
|
files_checked: number;
|
|
11
12
|
errors: number;
|
|
@@ -14,6 +15,6 @@ interface LintOutput {
|
|
|
14
15
|
fix_applied: boolean;
|
|
15
16
|
truncated: boolean;
|
|
16
17
|
}
|
|
18
|
+
export type LintContext = Parameters<Tool<LintInput, LintOutput>['execute']>[1];
|
|
17
19
|
export declare const lintTool: Tool<LintInput, LintOutput>;
|
|
18
|
-
export {};
|
|
19
20
|
//# sourceMappingURL=lint.d.ts.map
|
package/dist/lint.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
lintTool
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-3D5DJWOE.js";
|
|
4
|
+
import "./chunk-T3SMFF5Q.js";
|
|
5
|
+
import "./chunk-7N5U2RAU.js";
|
|
6
|
+
import "./chunk-DRRY6SCM.js";
|
|
7
|
+
import "./chunk-SCMRM6NL.js";
|
|
8
|
+
import "./chunk-HDYUBRMF.js";
|
|
9
|
+
import "./chunk-7JJFC6CT.js";
|
|
10
|
+
import "./chunk-KE7A76VC.js";
|
|
11
11
|
import "./chunk-ZUFHAHTE.js";
|
|
12
12
|
export {
|
|
13
13
|
lintTool
|
package/dist/logs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Tool } from '@wrongstack/core/types';
|
|
2
|
-
interface LogsInput {
|
|
2
|
+
export interface LogsInput {
|
|
3
3
|
service?: string | undefined;
|
|
4
4
|
path?: string | undefined;
|
|
5
5
|
lines?: number | undefined;
|
|
@@ -7,13 +7,13 @@ interface LogsInput {
|
|
|
7
7
|
since?: '1h' | '6h' | '24h' | 'all' | undefined;
|
|
8
8
|
cwd?: string | undefined;
|
|
9
9
|
}
|
|
10
|
-
interface LogEntry {
|
|
10
|
+
export interface LogEntry {
|
|
11
11
|
timestamp: string;
|
|
12
12
|
level: string;
|
|
13
13
|
message: string;
|
|
14
14
|
source?: string | undefined;
|
|
15
15
|
}
|
|
16
|
-
interface LogsOutput {
|
|
16
|
+
export interface LogsOutput {
|
|
17
17
|
source: string;
|
|
18
18
|
entries: LogEntry[];
|
|
19
19
|
total: number;
|
|
@@ -21,5 +21,4 @@ interface LogsOutput {
|
|
|
21
21
|
stream_mode: boolean;
|
|
22
22
|
}
|
|
23
23
|
export declare const logsTool: Tool<LogsInput, LogsOutput>;
|
|
24
|
-
export {};
|
|
25
24
|
//# sourceMappingURL=logs.d.ts.map
|
package/dist/logs.js
CHANGED
package/dist/memory.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { MemoryScope, MemoryStore, Tool } from '@wrongstack/core/types';
|
|
2
|
-
interface RememberInput {
|
|
2
|
+
export interface RememberInput {
|
|
3
3
|
text: string;
|
|
4
4
|
scope?: MemoryScope | undefined;
|
|
5
5
|
/** Memory type for categorization. */
|
|
@@ -9,17 +9,17 @@ interface RememberInput {
|
|
|
9
9
|
/** Priority level — critical entries always injected into context. */
|
|
10
10
|
priority?: 'critical' | 'high' | 'medium' | 'low' | undefined;
|
|
11
11
|
}
|
|
12
|
-
interface RememberOutput {
|
|
12
|
+
export interface RememberOutput {
|
|
13
13
|
ok: true;
|
|
14
14
|
scope: MemoryScope;
|
|
15
15
|
}
|
|
16
|
-
interface ForgetInput {
|
|
16
|
+
export interface ForgetInput {
|
|
17
17
|
query: string;
|
|
18
18
|
scope?: MemoryScope | undefined;
|
|
19
19
|
/** Preview: list what WOULD be deleted without deleting anything. */
|
|
20
20
|
dry_run?: boolean | undefined;
|
|
21
21
|
}
|
|
22
|
-
interface ForgetOutput {
|
|
22
|
+
export interface ForgetOutput {
|
|
23
23
|
removed: number;
|
|
24
24
|
scope: MemoryScope;
|
|
25
25
|
/** True when this was a preview run — nothing was deleted. */
|
|
@@ -31,12 +31,12 @@ interface ForgetOutput {
|
|
|
31
31
|
}
|
|
32
32
|
export declare function rememberTool(memory: MemoryStore): Tool<RememberInput, RememberOutput>;
|
|
33
33
|
export declare function forgetTool(memory: MemoryStore): Tool<ForgetInput, ForgetOutput>;
|
|
34
|
-
interface SearchMemoryInput {
|
|
34
|
+
export interface SearchMemoryInput {
|
|
35
35
|
query: string;
|
|
36
36
|
scope?: MemoryScope | undefined;
|
|
37
37
|
limit?: number | undefined;
|
|
38
38
|
}
|
|
39
|
-
interface SearchMemoryOutput {
|
|
39
|
+
export interface SearchMemoryOutput {
|
|
40
40
|
results: Array<{
|
|
41
41
|
text: string;
|
|
42
42
|
ts: string;
|
|
@@ -47,11 +47,10 @@ interface SearchMemoryOutput {
|
|
|
47
47
|
}>;
|
|
48
48
|
}
|
|
49
49
|
export declare function searchMemoryTool(memory: MemoryStore): Tool<SearchMemoryInput, SearchMemoryOutput>;
|
|
50
|
-
interface RelatedMemoryInput {
|
|
50
|
+
export interface RelatedMemoryInput {
|
|
51
51
|
text: string;
|
|
52
52
|
scope?: MemoryScope | undefined;
|
|
53
53
|
limit?: number | undefined;
|
|
54
54
|
}
|
|
55
55
|
export declare function relatedMemoryTool(memory: MemoryStore): Tool<RelatedMemoryInput, SearchMemoryOutput>;
|
|
56
|
-
export {};
|
|
57
56
|
//# sourceMappingURL=memory.d.ts.map
|
package/dist/memory.js
CHANGED
package/dist/mode.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { ModeStore, Tool } from '@wrongstack/core/types';
|
|
2
|
-
interface ModeInput {
|
|
2
|
+
export interface ModeInput {
|
|
3
3
|
action: 'get' | 'list' | 'set' | 'clear';
|
|
4
4
|
mode?: string | undefined;
|
|
5
5
|
}
|
|
6
|
-
type ModeFamily = 'lite' | 'deep' | 'balanced' | 'custom';
|
|
7
|
-
interface ModeOutput {
|
|
6
|
+
export type ModeFamily = 'lite' | 'deep' | 'balanced' | 'custom';
|
|
7
|
+
export interface ModeOutput {
|
|
8
8
|
action: string;
|
|
9
9
|
currentMode?: string | undefined;
|
|
10
10
|
modes?: {
|
|
@@ -18,5 +18,4 @@ interface ModeOutput {
|
|
|
18
18
|
message: string;
|
|
19
19
|
}
|
|
20
20
|
export declare function createModeTool(modeStore: ModeStore): Tool<ModeInput, ModeOutput>;
|
|
21
|
-
export {};
|
|
22
21
|
//# sourceMappingURL=mode.d.ts.map
|
package/dist/mode.js
CHANGED
|
@@ -11,16 +11,15 @@ import type { Tool } from '@wrongstack/core/types';
|
|
|
11
11
|
*
|
|
12
12
|
* Opt-in via `tools.nextsteps.enabled`; registered for the leader only.
|
|
13
13
|
*/
|
|
14
|
-
interface NextStepsInput {
|
|
14
|
+
export interface NextStepsInput {
|
|
15
15
|
steps: Array<{
|
|
16
16
|
text: string;
|
|
17
17
|
auto?: boolean;
|
|
18
18
|
}>;
|
|
19
19
|
}
|
|
20
|
-
interface NextStepsOutput {
|
|
20
|
+
export interface NextStepsOutput {
|
|
21
21
|
accepted: number;
|
|
22
22
|
auto: boolean;
|
|
23
23
|
}
|
|
24
24
|
export declare const nextStepsTool: Tool<NextStepsInput, NextStepsOutput>;
|
|
25
|
-
export {};
|
|
26
25
|
//# sourceMappingURL=next-steps-tool.d.ts.map
|
package/dist/next-steps.d.ts
CHANGED
|
@@ -33,6 +33,9 @@ export interface ParsedNextStep {
|
|
|
33
33
|
/** Whether the first item has auto="true" for YOLO+auto autonomy mode. */
|
|
34
34
|
auto?: boolean;
|
|
35
35
|
}
|
|
36
|
+
export interface ParseNextStepsOptions {
|
|
37
|
+
requireHeading?: boolean;
|
|
38
|
+
}
|
|
36
39
|
export interface ParseNextStepsResult {
|
|
37
40
|
/** Matched steps with their original index and stripped text. */
|
|
38
41
|
steps: ParsedNextStep[];
|
|
@@ -77,6 +80,8 @@ export declare function projectNextStepsToolInput(input: unknown): ParsedNextSte
|
|
|
77
80
|
* carried one keep their suggestions.
|
|
78
81
|
*/
|
|
79
82
|
export declare function isFinalTurnStopReason(stopReason: string | undefined): boolean;
|
|
83
|
+
/** Whether `index` falls inside a fenced code block of `content`. */
|
|
84
|
+
export declare function indexInsideCodeFence(content: string, index: number): boolean;
|
|
80
85
|
/**
|
|
81
86
|
* Parse canonical "<nextsteps>" blocks from assistant output (or raw numbered lines).
|
|
82
87
|
*
|
|
@@ -94,6 +99,12 @@ export declare function parseNextSteps(content: string, requireHeading?: boolean
|
|
|
94
99
|
*
|
|
95
100
|
* Also strips the legacy `<next_steps>` spelling that older persisted
|
|
96
101
|
* subagent output may contain (WebUI parity).
|
|
102
|
+
*
|
|
103
|
+
* Code-fence aware: a <nextsteps> example inside a fenced code block is
|
|
104
|
+
* documentation and must survive verbatim. Only tags (and their blocks)
|
|
105
|
+
* outside fences are removed; an unpaired open tag outside a fence is
|
|
106
|
+
* reduced to nothing so raw XML never reaches the user.
|
|
97
107
|
*/
|
|
98
108
|
export declare function stripNextStepsBlock(text: string): string;
|
|
109
|
+
export declare const stripNextSteps: typeof stripNextStepsBlock;
|
|
99
110
|
//# sourceMappingURL=next-steps.d.ts.map
|
package/dist/next-steps.js
CHANGED
|
@@ -1,139 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const text = candidate["text"];
|
|
10
|
-
if (typeof text !== "string" || !text.trim()) continue;
|
|
11
|
-
const auto = steps.length === 0 && candidate["auto"] === true;
|
|
12
|
-
steps.push(
|
|
13
|
-
auto ? { index: steps.length + 1, text: text.trim(), auto: true } : { index: steps.length + 1, text: text.trim() }
|
|
14
|
-
);
|
|
15
|
-
if (steps.length >= MAX_STEPS) break;
|
|
16
|
-
}
|
|
17
|
-
return steps;
|
|
18
|
-
}
|
|
19
|
-
function isFinalTurnStopReason(stopReason) {
|
|
20
|
-
return stopReason !== "tool_use" && stopReason !== "tool_call";
|
|
21
|
-
}
|
|
22
|
-
var NEXT_STEPS_TAG_RE = /<nextsteps\b[^>]*>\s*\n+/i;
|
|
23
|
-
var ITEM_RE = /^(?:(\d+)[.)]\s*|[-*•]\s*)(.+?)(\s+auto="true")?$/;
|
|
24
|
-
var MAX_STEPS = 6;
|
|
25
|
-
function parseNextSteps(content, requireHeading = true) {
|
|
26
|
-
if (requireHeading) {
|
|
27
|
-
return parseWithHeading(content);
|
|
28
|
-
}
|
|
29
|
-
return parseRawNumbered(content);
|
|
30
|
-
}
|
|
31
|
-
function pushStep(steps, index, text, hasAuto) {
|
|
32
|
-
steps.push(hasAuto ? { index, text, auto: true } : { index, text });
|
|
33
|
-
}
|
|
34
|
-
function parseRawNumbered(content) {
|
|
35
|
-
const lines = content.split("\n");
|
|
36
|
-
const steps = [];
|
|
37
|
-
const seenNumbers = /* @__PURE__ */ new Set();
|
|
38
|
-
for (const rawLine of lines) {
|
|
39
|
-
const line = rawLine.trim();
|
|
40
|
-
if (!line) continue;
|
|
41
|
-
const m = ITEM_RE.exec(line);
|
|
42
|
-
if (!m) continue;
|
|
43
|
-
const numPart = m[1];
|
|
44
|
-
const text = m[2].trim();
|
|
45
|
-
let index;
|
|
46
|
-
if (numPart !== void 0) {
|
|
47
|
-
index = Number.parseInt(numPart, 10);
|
|
48
|
-
} else {
|
|
49
|
-
index = steps.length + 1;
|
|
50
|
-
}
|
|
51
|
-
if (seenNumbers.has(index)) continue;
|
|
52
|
-
seenNumbers.add(index);
|
|
53
|
-
const hasAuto = !!m[3] && steps.length === 0 && index === 1;
|
|
54
|
-
pushStep(steps, index, text, hasAuto);
|
|
55
|
-
if (steps.length >= MAX_STEPS) break;
|
|
56
|
-
}
|
|
57
|
-
return {
|
|
58
|
-
steps,
|
|
59
|
-
texts: steps.map((s) => s.text),
|
|
60
|
-
stripped: content,
|
|
61
|
-
autoTexts: steps.filter((s) => s.auto).map((s) => s.text)
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
function parseWithHeading(content) {
|
|
65
|
-
const headingMatch = NEXT_STEPS_TAG_RE.exec(content);
|
|
66
|
-
if (!headingMatch) {
|
|
67
|
-
return { steps: [], texts: [], stripped: content, autoTexts: [] };
|
|
68
|
-
}
|
|
69
|
-
const headingEnd = headingMatch.index + headingMatch[0].length;
|
|
70
|
-
const afterHeading = content.slice(headingEnd);
|
|
71
|
-
const lines = afterHeading.split("\n");
|
|
72
|
-
const steps = [];
|
|
73
|
-
const seenNumbers = /* @__PURE__ */ new Set();
|
|
74
|
-
for (const rawLine of lines) {
|
|
75
|
-
const line = rawLine.trim();
|
|
76
|
-
if (!line) continue;
|
|
77
|
-
const m = ITEM_RE.exec(line);
|
|
78
|
-
if (!m) break;
|
|
79
|
-
const numPart = m[1];
|
|
80
|
-
const text = m[2].trim();
|
|
81
|
-
let index;
|
|
82
|
-
if (numPart !== void 0) {
|
|
83
|
-
index = Number.parseInt(numPart, 10);
|
|
84
|
-
} else {
|
|
85
|
-
index = steps.length + 1;
|
|
86
|
-
}
|
|
87
|
-
if (seenNumbers.has(index)) continue;
|
|
88
|
-
seenNumbers.add(index);
|
|
89
|
-
const hasAuto = !!m[3] && steps.length === 0 && index === 1;
|
|
90
|
-
pushStep(steps, index, text, hasAuto);
|
|
91
|
-
if (steps.length >= MAX_STEPS) break;
|
|
92
|
-
}
|
|
93
|
-
if (steps.length === 0) {
|
|
94
|
-
return { steps: [], texts: [], stripped: content, autoTexts: [] };
|
|
95
|
-
}
|
|
96
|
-
if (!afterHeading.includes("</nextsteps>")) {
|
|
97
|
-
return { steps: [], texts: [], stripped: content, autoTexts: [] };
|
|
98
|
-
}
|
|
99
|
-
const texts = steps.map((s) => s.text);
|
|
100
|
-
const autoTexts = steps.filter((s) => s.auto).map((s) => s.text);
|
|
101
|
-
const blockStart = headingMatch.index;
|
|
102
|
-
const blockEnd = headingMatch[0].length + findBlockEnd(afterHeading, steps.length);
|
|
103
|
-
const stripped = (content.slice(0, blockStart) + content.slice(blockStart + blockEnd)).replace(/\n{3,}/g, "\n\n").trim();
|
|
104
|
-
return { steps, texts, stripped, autoTexts };
|
|
105
|
-
}
|
|
106
|
-
function findBlockEnd(afterHeading, stepCount) {
|
|
107
|
-
const closeIdx = afterHeading.indexOf("</nextsteps>");
|
|
108
|
-
if (closeIdx !== -1) {
|
|
109
|
-
let end = closeIdx + "</nextsteps>".length;
|
|
110
|
-
if (afterHeading[end] === "\n") end += 1;
|
|
111
|
-
return end;
|
|
112
|
-
}
|
|
113
|
-
const lines = afterHeading.split("\n");
|
|
114
|
-
let consumed = 0;
|
|
115
|
-
let found = 0;
|
|
116
|
-
for (const rawLine of lines) {
|
|
117
|
-
const line = rawLine.trim();
|
|
118
|
-
if (!line) break;
|
|
119
|
-
const m = ITEM_RE.exec(line);
|
|
120
|
-
if (!m) break;
|
|
121
|
-
consumed += rawLine.length + 1;
|
|
122
|
-
found++;
|
|
123
|
-
if (found >= stepCount) {
|
|
124
|
-
consumed -= 1;
|
|
125
|
-
break;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
return consumed;
|
|
129
|
-
}
|
|
130
|
-
function stripNextStepsBlock(text) {
|
|
131
|
-
return text.replace(/<next_?steps\b[^>]*>[\s\S]*?<\/next_?steps>/gi, "").replace(/<next_?steps\b[^>]*\/?>/gi, "").replace(/\n{3,}/g, "\n\n").trim();
|
|
132
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
indexInsideCodeFence,
|
|
3
|
+
isFinalTurnStopReason,
|
|
4
|
+
parseNextSteps,
|
|
5
|
+
projectNextStepsToolInput,
|
|
6
|
+
stripNextSteps,
|
|
7
|
+
stripNextStepsBlock
|
|
8
|
+
} from "./chunk-XXRMF2BC.js";
|
|
133
9
|
export {
|
|
10
|
+
indexInsideCodeFence,
|
|
134
11
|
isFinalTurnStopReason,
|
|
135
12
|
parseNextSteps,
|
|
136
13
|
projectNextStepsToolInput,
|
|
14
|
+
stripNextSteps,
|
|
137
15
|
stripNextStepsBlock
|
|
138
16
|
};
|
|
139
17
|
//# sourceMappingURL=next-steps.js.map
|