iosm-cli 0.2.9 → 0.2.10

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.
@@ -1 +1 @@
1
- {"version":3,"file":"slash-commands.d.ts","sourceRoot":"","sources":["../../src/core/slash-commands.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;AAElE,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;AAE/D,MAAM,WAAW,gBAAgB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,mBAAmB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,sBAAsB,EAAE,aAAa,CAAC,mBAAmB,CA0FrE,CAAC"}
1
+ {"version":3,"file":"slash-commands.d.ts","sourceRoot":"","sources":["../../src/core/slash-commands.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;AAElE,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;AAE/D,MAAM,WAAW,gBAAgB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,mBAAmB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,sBAAsB,EAAE,aAAa,CAAC,mBAAmB,CA+FrE,CAAC"}
@@ -47,6 +47,10 @@ export const BUILTIN_SLASH_COMMANDS = [
47
47
  name: "singular",
48
48
  description: "Feature feasibility analyzer: /singular <request> (builds implementation options and recommendations)",
49
49
  },
50
+ {
51
+ name: "ultrathink",
52
+ description: "Deep multi-iteration analysis mode: /ultrathink [-q N|--iterations N] [query] (strict read-only tools)",
53
+ },
50
54
  { name: "settings", description: "Open settings menu" },
51
55
  {
52
56
  name: "permissions",
@@ -1 +1 @@
1
- {"version":3,"file":"slash-commands.js","sourceRoot":"","sources":["../../src/core/slash-commands.ts"],"names":[],"mappings":"AAiBA,MAAM,CAAC,MAAM,sBAAsB,GAAuC;IACzE,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,0EAA0E,EAAE;IACzG;QACC,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,0FAA0F;KACvG;IACD;QACC,IAAI,EAAE,aAAa;QACnB,WAAW,EACV,uGAAuG;KACxG;IACD;QACC,IAAI,EAAE,OAAO;QACb,WAAW,EACV,uKAAuK;KACxK;IACD;QACC,IAAI,EAAE,QAAQ;QACd,WAAW,EACV,qHAAqH;KACtH;IACD,EAAE,IAAI,EAAE,eAAe,EAAE,WAAW,EAAE,qDAAqD,EAAE;IAC7F;QACC,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,yGAAyG;KACtH;IACD,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,gEAAgE,EAAE;IACpG,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,0EAA0E,EAAE;IAChH,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE;IACvD,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,oEAAoE,EAAE;IACzG,EAAE,IAAI,EAAE,cAAc,EAAE,WAAW,EAAE,kEAAkE,EAAE;IACzG,EAAE,IAAI,EAAE,cAAc,EAAE,WAAW,EA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,EAAE,6BAA6B,EAAE;IAC/D,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,2CAA2C,EAAE;IAC1E,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,yCAAyC,EAAE;IACxE,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,oEAAoE,EAAE;IACpG,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE;IACjD,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,mDAAmD,EAAE;IACpF,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE;IACnD,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE;IAChD,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,sCAAsC,EAAE;IACxE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,4BAA4B,EAAE;IAC7D,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,gDAAgD,EAAE;IACjF,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE;CAC1C,CAAC","sourcesContent":["export type SlashCommandSource = \"extension\" | \"prompt\" | \"skill\";\n\nexport type SlashCommandLocation = \"user\" | \"project\" | \"path\";\n\nexport interface SlashCommandInfo {\n\tname: string;\n\tdescription?: string;\n\tsource: SlashCommandSource;\n\tlocation?: SlashCommandLocation;\n\tpath?: string;\n}\n\nexport interface BuiltinSlashCommand {\n\tname: string;\n\tdescription: string;\n}\n\nexport const BUILTIN_SLASH_COMMANDS: ReadonlyArray<BuiltinSlashCommand> = [\n\t{ name: \"init\", description: \"Initialize iosm.yaml and .iosm scaffold in current (or target) directory\" },\n\t{\n\t\tname: \"iosm\",\n\t\tdescription: \"Run IOSM auto-improvement loop: /iosm [target-index] [--max-iterations N] [--force-init]\",\n\t},\n\t{\n\t\tname: \"orchestrate\",\n\t\tdescription:\n\t\t\t\"Manual legacy multi-agent orchestration: /orchestrate (--parallel|--sequential) --agents N ... <task>\",\n\t},\n\t{\n\t\tname: \"swarm\",\n\t\tdescription:\n\t\t\t\"Recommended multi-agent orchestration runtime for complex/risky tasks: /swarm run <task> | /swarm from-singular <run-id> --option <1|2|3> | /swarm watch|retry|resume\",\n\t},\n\t{\n\t\tname: \"agents\",\n\t\tdescription:\n\t\t\t\"Interactive agent menu: browse/use/create/edit/delete custom agents and inspect source precedence from .iosm/agents\",\n\t},\n\t{ name: \"subagent-runs\", description: \"List recent subagent runs from .iosm/subagents/runs\" },\n\t{\n\t\tname: \"subagent-resume\",\n\t\tdescription: \"Resume from prior subagent output: /subagent-resume [run-id] [extra instructions] (picker when omitted)\",\n\t},\n\t{ name: \"team-runs\", description: \"List recent team orchestration runs from .iosm/subagents/teams\" },\n\t{ name: \"team-status\", description: \"Show a team run status: /team-status [team-run-id] (picker when omitted)\" },\n\t{ name: \"cycle-list\", description: \"List IOSM cycles\" },\n\t{ name: \"cycle-plan\", description: \"Plan a new IOSM cycle: /cycle-plan [--id <id>] [--force] <goal...>\" },\n\t{ name: \"cycle-status\", description: \"Show IOSM cycle completeness and gates: /cycle-status [cycle-id]\" },\n\t{ name: \"cycle-report\", description: \"Show IOSM cycle report JSON: /cycle-report [cycle-id]\" },\n\t{\n\t\tname: \"mcp\",\n\t\tdescription:\n\t\t\t\"MCP server manager: /mcp (interactive UI), /mcp add <name> ..., /mcp list, /mcp tools [name], /mcp enable|disable|remove <name>\",\n\t},\n\t{\n\t\tname: \"memory\",\n\t\tdescription:\n\t\t\t\"Memory manager: /memory (interactive), /memory <text>, /memory edit <index> <text>, /memory rm <index>\",\n\t},\n\t{\n\t\tname: \"semantic\",\n\t\tdescription:\n\t\t\t\"Semantic search manager: /semantic (interactive UI), /semantic setup|auto-index|status|index|rebuild|query <text> [--top-k N]\",\n\t},\n\t{\n\t\tname: \"contract\",\n\t\tdescription:\n\t\t\t\"Engineering contract manager: /contract (interactive field editor), /contract show|edit|clear --scope <project|session>\",\n\t},\n\t{\n\t\tname: \"singular\",\n\t\tdescription:\n\t\t\t\"Feature feasibility analyzer: /singular <request> (builds implementation options and recommendations)\",\n\t},\n\t{ name: \"settings\", description: \"Open settings menu\" },\n\t{\n\t\tname: \"permissions\",\n\t\tdescription:\n\t\t\t\"Permission controls: /permissions (interactive menu) or /permissions [ask|auto|yolo|status|hooks] and /permissions [allow|deny] [list|add|remove] <tool:match>\",\n\t},\n\t{ name: \"yolo\", description: \"Toggle permission prompts: /yolo [on|off|status]\" },\n\t{ name: \"model\", description: \"Select model (provider-first selector UI)\" },\n\t{ name: \"scoped-models\", description: \"Enable/disable models for Ctrl+P cycling\" },\n\t{ name: \"export\", description: \"Export session to HTML file: /export [output-path] (wizard when omitted)\" },\n\t{ name: \"share\", description: \"Share session as a secret GitHub gist\" },\n\t{ name: \"copy\", description: \"Copy last agent message to clipboard\" },\n\t{ name: \"name\", description: \"Set session display name\" },\n\t{ name: \"session\", description: \"Show session info and stats\" },\n\t{\n\t\tname: \"doctor\",\n\t\tdescription: \"Run runtime diagnostics (model/auth/MCP/CLI tools/hooks/paths) with optional interactive fixes\",\n\t},\n\t{ name: \"checkpoint\", description: \"Create/list checkpoints for safe rollback\" },\n\t{ name: \"rollback\", description: \"Rollback session tree to a checkpoint (picker when omitted)\" },\n\t{ name: \"changelog\", description: \"Show changelog entries\" },\n\t{ name: \"hotkeys\", description: \"Show all keyboard shortcuts\" },\n\t{ name: \"fork\", description: \"Create a new fork from a previous message\" },\n\t{ name: \"tree\", description: \"Navigate session tree (switch branches)\" },\n\t{ name: \"login\", description: \"Authenticate with provider (OAuth incl. Qwen + OpenRouter API key)\" },\n\t{ name: \"auth\", description: \"Alias for /login\" },\n\t{ name: \"logout\", description: \"Remove saved provider credentials (OAuth/API key)\" },\n\t{ name: \"new\", description: \"Start a new session\" },\n\t{ name: \"clear\", description: \"Alias for /new\" },\n\t{ name: \"compact\", description: \"Manually compact the session context\" },\n\t{ name: \"resume\", description: \"Resume a different session\" },\n\t{ name: \"reload\", description: \"Reload extensions, skills, prompts, and themes\" },\n\t{ name: \"quit\", description: \"Quit iosm\" },\n];\n"]}
1
+ {"version":3,"file":"slash-commands.js","sourceRoot":"","sources":["../../src/core/slash-commands.ts"],"names":[],"mappings":"AAiBA,MAAM,CAAC,MAAM,sBAAsB,GAAuC;IACzE,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,0EAA0E,EAAE;IACzG;QACC,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,0FAA0F;KACvG;IACD;QACC,IAAI,EAAE,aAAa;QACnB,WAAW,EACV,uGAAuG;KACxG;IACD;QACC,IAAI,EAAE,OAAO;QACb,WAAW,EACV,uKAAuK;KACxK;IACD;QACC,IAAI,EAAE,QAAQ;QACd,WAAW,EACV,qHAAqH;KACtH;IACD,EAAE,IAAI,EAAE,eAAe,EAAE,WAAW,EAAE,qDAAqD,EAAE;IAC7F;QACC,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,yGAAyG;KACtH;IACD,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,gEAAgE,EAAE;IACpG,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,0EAA0E,EAAE;IAChH,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE;IACvD,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,oEAAoE,EAAE;IACzG,EAAE,IAAI,EAAE,cAAc,EAAE,WAAW,EAAE,kEAAkE,EAAE;IACzG,EAAE,IAAI,EAAE,cAAc,EAAE,WAAW,EAAE,uDAAuD,EAAE;IAC9F;QACC,IAAI,EAAE,KAAK;QACX,WAAW,EACV,iIAAiI;KAClI;IACD;QACC,IAAI,EAAE,QAAQ;QACd,WAAW,EACV,wGAAwG;KACzG;IACD;QACC,IAAI,EAAE,UAAU;QAChB,WAAW,EACV,+HAA+H;KAChI;IACD;QACC,IAAI,EAAE,UAAU;QAChB,WAA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AAO,EAAE,WAAW,EAAE,oEAAoE,EAAE;IACpG,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE;IACjD,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,mDAAmD,EAAE;IACpF,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE;IACnD,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE;IAChD,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,sCAAsC,EAAE;IACxE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,4BAA4B,EAAE;IAC7D,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,gDAAgD,EAAE;IACjF,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE;CAC1C,CAAC","sourcesContent":["export type SlashCommandSource = \"extension\" | \"prompt\" | \"skill\";\n\nexport type SlashCommandLocation = \"user\" | \"project\" | \"path\";\n\nexport interface SlashCommandInfo {\n\tname: string;\n\tdescription?: string;\n\tsource: SlashCommandSource;\n\tlocation?: SlashCommandLocation;\n\tpath?: string;\n}\n\nexport interface BuiltinSlashCommand {\n\tname: string;\n\tdescription: string;\n}\n\nexport const BUILTIN_SLASH_COMMANDS: ReadonlyArray<BuiltinSlashCommand> = [\n\t{ name: \"init\", description: \"Initialize iosm.yaml and .iosm scaffold in current (or target) directory\" },\n\t{\n\t\tname: \"iosm\",\n\t\tdescription: \"Run IOSM auto-improvement loop: /iosm [target-index] [--max-iterations N] [--force-init]\",\n\t},\n\t{\n\t\tname: \"orchestrate\",\n\t\tdescription:\n\t\t\t\"Manual legacy multi-agent orchestration: /orchestrate (--parallel|--sequential) --agents N ... <task>\",\n\t},\n\t{\n\t\tname: \"swarm\",\n\t\tdescription:\n\t\t\t\"Recommended multi-agent orchestration runtime for complex/risky tasks: /swarm run <task> | /swarm from-singular <run-id> --option <1|2|3> | /swarm watch|retry|resume\",\n\t},\n\t{\n\t\tname: \"agents\",\n\t\tdescription:\n\t\t\t\"Interactive agent menu: browse/use/create/edit/delete custom agents and inspect source precedence from .iosm/agents\",\n\t},\n\t{ name: \"subagent-runs\", description: \"List recent subagent runs from .iosm/subagents/runs\" },\n\t{\n\t\tname: \"subagent-resume\",\n\t\tdescription: \"Resume from prior subagent output: /subagent-resume [run-id] [extra instructions] (picker when omitted)\",\n\t},\n\t{ name: \"team-runs\", description: \"List recent team orchestration runs from .iosm/subagents/teams\" },\n\t{ name: \"team-status\", description: \"Show a team run status: /team-status [team-run-id] (picker when omitted)\" },\n\t{ name: \"cycle-list\", description: \"List IOSM cycles\" },\n\t{ name: \"cycle-plan\", description: \"Plan a new IOSM cycle: /cycle-plan [--id <id>] [--force] <goal...>\" },\n\t{ name: \"cycle-status\", description: \"Show IOSM cycle completeness and gates: /cycle-status [cycle-id]\" },\n\t{ name: \"cycle-report\", description: \"Show IOSM cycle report JSON: /cycle-report [cycle-id]\" },\n\t{\n\t\tname: \"mcp\",\n\t\tdescription:\n\t\t\t\"MCP server manager: /mcp (interactive UI), /mcp add <name> ..., /mcp list, /mcp tools [name], /mcp enable|disable|remove <name>\",\n\t},\n\t{\n\t\tname: \"memory\",\n\t\tdescription:\n\t\t\t\"Memory manager: /memory (interactive), /memory <text>, /memory edit <index> <text>, /memory rm <index>\",\n\t},\n\t{\n\t\tname: \"semantic\",\n\t\tdescription:\n\t\t\t\"Semantic search manager: /semantic (interactive UI), /semantic setup|auto-index|status|index|rebuild|query <text> [--top-k N]\",\n\t},\n\t{\n\t\tname: \"contract\",\n\t\tdescription:\n\t\t\t\"Engineering contract manager: /contract (interactive field editor), /contract show|edit|clear --scope <project|session>\",\n\t},\n\t{\n\t\tname: \"singular\",\n\t\tdescription:\n\t\t\t\"Feature feasibility analyzer: /singular <request> (builds implementation options and recommendations)\",\n\t},\n\t{\n\t\tname: \"ultrathink\",\n\t\tdescription:\n\t\t\t\"Deep multi-iteration analysis mode: /ultrathink [-q N|--iterations N] [query] (strict read-only tools)\",\n\t},\n\t{ name: \"settings\", description: \"Open settings menu\" },\n\t{\n\t\tname: \"permissions\",\n\t\tdescription:\n\t\t\t\"Permission controls: /permissions (interactive menu) or /permissions [ask|auto|yolo|status|hooks] and /permissions [allow|deny] [list|add|remove] <tool:match>\",\n\t},\n\t{ name: \"yolo\", description: \"Toggle permission prompts: /yolo [on|off|status]\" },\n\t{ name: \"model\", description: \"Select model (provider-first selector UI)\" },\n\t{ name: \"scoped-models\", description: \"Enable/disable models for Ctrl+P cycling\" },\n\t{ name: \"export\", description: \"Export session to HTML file: /export [output-path] (wizard when omitted)\" },\n\t{ name: \"share\", description: \"Share session as a secret GitHub gist\" },\n\t{ name: \"copy\", description: \"Copy last agent message to clipboard\" },\n\t{ name: \"name\", description: \"Set session display name\" },\n\t{ name: \"session\", description: \"Show session info and stats\" },\n\t{\n\t\tname: \"doctor\",\n\t\tdescription: \"Run runtime diagnostics (model/auth/MCP/CLI tools/hooks/paths) with optional interactive fixes\",\n\t},\n\t{ name: \"checkpoint\", description: \"Create/list checkpoints for safe rollback\" },\n\t{ name: \"rollback\", description: \"Rollback session tree to a checkpoint (picker when omitted)\" },\n\t{ name: \"changelog\", description: \"Show changelog entries\" },\n\t{ name: \"hotkeys\", description: \"Show all keyboard shortcuts\" },\n\t{ name: \"fork\", description: \"Create a new fork from a previous message\" },\n\t{ name: \"tree\", description: \"Navigate session tree (switch branches)\" },\n\t{ name: \"login\", description: \"Authenticate with provider (OAuth incl. Qwen + OpenRouter API key)\" },\n\t{ name: \"auth\", description: \"Alias for /login\" },\n\t{ name: \"logout\", description: \"Remove saved provider credentials (OAuth/API key)\" },\n\t{ name: \"new\", description: \"Start a new session\" },\n\t{ name: \"clear\", description: \"Alias for /new\" },\n\t{ name: \"compact\", description: \"Manually compact the session context\" },\n\t{ name: \"resume\", description: \"Resume a different session\" },\n\t{ name: \"reload\", description: \"Reload extensions, skills, prompts, and themes\" },\n\t{ name: \"quit\", description: \"Quit iosm\" },\n];\n"]}
@@ -0,0 +1,122 @@
1
+ import type { AgentMessage } from "@mariozechner/pi-agent-core";
2
+ export declare const ULTRATHINK_COMMAND = "ultrathink";
3
+ export declare const ULTRATHINK_DEFAULT_ITERATIONS = 5;
4
+ export declare const ULTRATHINK_MAX_ITERATIONS = 12;
5
+ export declare const ULTRATHINK_MAX_CHECKPOINT_CHARS = 2200;
6
+ export declare const ULTRATHINK_MAX_CONTEXT_MESSAGES = 8;
7
+ export declare const ULTRATHINK_MAX_CONTEXT_MESSAGE_CHARS = 260;
8
+ export declare const ULTRATHINK_MAX_EVIDENCE_ENTRIES = 12;
9
+ export declare const ULTRATHINK_VISIBLE_PROMPT_PREFIX = "Ultrathink iteration";
10
+ export declare const ULTRATHINK_NO_NEW_EVIDENCE_MARKER = "[NO_NEW_EVIDENCE_OK]";
11
+ export declare const ULTRATHINK_STAGNATION_LIMIT = 2;
12
+ export declare const ULTRATHINK_MAX_ITERATION_INPUT_TOKENS = 50000;
13
+ export declare const ULTRATHINK_MAX_RUN_INPUT_TOKENS = 180000;
14
+ export declare const ULTRATHINK_MAX_RUN_TOTAL_TOKENS = 220000;
15
+ export declare const ULTRATHINK_MAX_RUN_COST = 0.03;
16
+ export interface UltrathinkCommandConfig {
17
+ iterations: number;
18
+ query?: string;
19
+ }
20
+ export interface UltrathinkToolEvidence {
21
+ toolCallId: string;
22
+ toolName: string;
23
+ summary: string;
24
+ }
25
+ export interface UltrathinkEvidencePolicyResult {
26
+ hasNumericClaims: boolean;
27
+ hasEvidenceTags: boolean;
28
+ invalidEvidenceTags: string[];
29
+ missingEvidenceForNumbers: boolean;
30
+ needsNoNewEvidenceMarker: boolean;
31
+ hasNoNewEvidenceMarker: boolean;
32
+ }
33
+ export interface UltrathinkToolGroundingPolicyInput {
34
+ phase: UltrathinkPhase;
35
+ cumulativeEvidenceCount: number;
36
+ toolChecksThisIteration: number;
37
+ }
38
+ export type UltrathinkCommandParseResult = {
39
+ kind: "command";
40
+ command: UltrathinkCommandConfig;
41
+ } | {
42
+ kind: "error";
43
+ error: string;
44
+ usage: string;
45
+ };
46
+ export declare const ULTRATHINK_USAGE: string;
47
+ export type UltrathinkPhase = "Recon" | "Critique" | "Verify" | "Synthesis";
48
+ export declare const ULTRATHINK_CHECKPOINT_COMPRESSION_SYSTEM_PROMPT: string;
49
+ export declare function parseUltrathinkCommand(text: string): UltrathinkCommandParseResult | undefined;
50
+ export declare function getUltrathinkPhase(iteration: number, totalIterations: number): UltrathinkPhase;
51
+ export declare function resolveUltrathinkReadOnlyTools(activeToolNames: string[]): string[];
52
+ export declare function findLastMeaningfulUserIntent(messages: AgentMessage[]): string | undefined;
53
+ export declare function buildUltrathinkContextTail(messages: AgentMessage[]): string;
54
+ export declare function extractUltrathinkToolEvidence(messages: AgentMessage[]): UltrathinkToolEvidence[];
55
+ export declare function buildUltrathinkEvidenceCatalog(evidence: UltrathinkToolEvidence[]): string;
56
+ export declare function extractUltrathinkEvidenceTags(text: string): string[];
57
+ export declare function hasUltrathinkNoNewEvidenceMarker(text: string): boolean;
58
+ export declare function evaluateUltrathinkEvidencePolicy(input: {
59
+ text: string;
60
+ phase: UltrathinkPhase;
61
+ toolChecksThisIteration: number;
62
+ knownEvidenceIds: string[];
63
+ }): UltrathinkEvidencePolicyResult;
64
+ export declare function createInitialUltrathinkCheckpoint(objective: string): string;
65
+ export declare function normalizeUltrathinkCheckpoint(rawCheckpoint: string, objective: string): string;
66
+ export declare function truncateUltrathinkCheckpoint(checkpoint: string, maxChars: number): string;
67
+ export declare function extractUltrathinkIterationSummary(text: string): string;
68
+ export declare function extractUltrathinkCheckpoint(text: string): string | undefined;
69
+ export declare function buildUltrathinkIterationPrompt(input: {
70
+ iteration: number;
71
+ totalIterations: number;
72
+ phase: UltrathinkPhase;
73
+ objective: string;
74
+ checkpoint: string;
75
+ previousSummary?: string;
76
+ contextTail?: string;
77
+ evidenceCatalog?: string;
78
+ budgetStatus?: string;
79
+ }): string;
80
+ export declare function buildUltrathinkVisibleIterationPrompt(input: {
81
+ iteration: number;
82
+ totalIterations: number;
83
+ phase: UltrathinkPhase;
84
+ objective: string;
85
+ }): string;
86
+ export declare function buildUltrathinkBudgetStatusLine(input: {
87
+ accumulatedInputTokens: number;
88
+ accumulatedTotalTokens: number;
89
+ accumulatedCost: number;
90
+ }): string;
91
+ export declare function buildUltrathinkComplianceRepairPrompt(input: {
92
+ iteration: number;
93
+ totalIterations: number;
94
+ phase: UltrathinkPhase;
95
+ objective: string;
96
+ originalResponse: string;
97
+ issues: string[];
98
+ checkpoint: string;
99
+ evidenceCatalog?: string;
100
+ }): string;
101
+ export declare function shouldUltrathinkForceToolGrounding(input: UltrathinkToolGroundingPolicyInput): boolean;
102
+ export declare function buildUltrathinkToolGroundingPrompt(input: {
103
+ iteration: number;
104
+ totalIterations: number;
105
+ phase: UltrathinkPhase;
106
+ objective: string;
107
+ checkpoint: string;
108
+ availableReadOnlyTools: string[];
109
+ evidenceCatalog?: string;
110
+ }): string;
111
+ export declare function buildUltrathinkCheckpointCompressionPrompt(input: {
112
+ objective: string;
113
+ checkpoint: string;
114
+ maxChars: number;
115
+ }): string;
116
+ export declare function hasUltrathinkEvidenceViolations(policy: UltrathinkEvidencePolicyResult): boolean;
117
+ export declare function isUltrathinkStagnated(input: {
118
+ previousCheckpoint: string;
119
+ nextCheckpoint: string;
120
+ toolChecksThisIteration: number;
121
+ }): boolean;
122
+ //# sourceMappingURL=ultrathink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ultrathink.d.ts","sourceRoot":"","sources":["../../src/core/ultrathink.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAIhE,eAAO,MAAM,kBAAkB,eAAe,CAAC;AAC/C,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAC/C,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAC5C,eAAO,MAAM,+BAA+B,OAAO,CAAC;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