@oh-my-pi/pi-coding-agent 16.0.5 → 16.0.6
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/CHANGELOG.md +53 -0
- package/dist/cli.js +1927 -1376
- package/dist/types/advisor/advise-tool.d.ts +22 -19
- package/dist/types/autoresearch/tools/init-experiment.d.ts +13 -17
- package/dist/types/autoresearch/tools/log-experiment.d.ts +17 -19
- package/dist/types/autoresearch/tools/run-experiment.d.ts +3 -4
- package/dist/types/autoresearch/tools/update-notes.d.ts +4 -5
- package/dist/types/cli/ttsr-cli.d.ts +39 -0
- package/dist/types/commands/ttsr.d.ts +57 -0
- package/dist/types/commit/agentic/tools/analyze-file.d.ts +4 -5
- package/dist/types/commit/agentic/tools/git-file-diff.d.ts +4 -5
- package/dist/types/commit/agentic/tools/git-hunk.d.ts +5 -6
- package/dist/types/commit/agentic/tools/git-overview.d.ts +4 -5
- package/dist/types/commit/agentic/tools/propose-changelog.d.ts +23 -24
- package/dist/types/commit/agentic/tools/propose-commit.d.ts +11 -32
- package/dist/types/commit/agentic/tools/recent-commits.d.ts +3 -4
- package/dist/types/commit/agentic/tools/schemas.d.ts +6 -27
- package/dist/types/commit/agentic/tools/split-commit.d.ts +28 -49
- package/dist/types/commit/changelog/generate.d.ts +12 -13
- package/dist/types/commit/shared-llm.d.ts +10 -37
- package/dist/types/config/config-file.d.ts +4 -4
- package/dist/types/config/keybindings.d.ts +5 -0
- package/dist/types/config/models-config-schema.d.ts +625 -990
- package/dist/types/config/models-config.d.ts +229 -217
- package/dist/types/config/settings-schema.d.ts +53 -23
- package/dist/types/edit/hashline/params.d.ts +7 -11
- package/dist/types/edit/index.d.ts +2 -1
- package/dist/types/edit/modes/apply-patch.d.ts +4 -5
- package/dist/types/edit/modes/patch.d.ts +15 -24
- package/dist/types/edit/modes/replace.d.ts +16 -17
- package/dist/types/eval/js/index.d.ts +1 -0
- package/dist/types/extensibility/custom-commands/types.d.ts +6 -3
- package/dist/types/extensibility/custom-tools/types.d.ts +8 -5
- package/dist/types/extensibility/extensions/types.d.ts +6 -3
- package/dist/types/extensibility/hooks/types.d.ts +7 -4
- package/dist/types/extensibility/legacy-pi-ai-shim.d.ts +13 -5
- package/dist/types/extensibility/legacy-pi-coding-agent-shim.d.ts +17 -0
- package/dist/types/extensibility/typebox.d.ts +80 -58
- package/dist/types/goals/tools/goal-tool.d.ts +11 -24
- package/dist/types/index.d.ts +2 -0
- package/dist/types/lsp/index.d.ts +11 -26
- package/dist/types/lsp/types.d.ts +12 -28
- package/dist/types/mcp/client.d.ts +8 -0
- package/dist/types/modes/components/btw-panel.d.ts +1 -0
- package/dist/types/modes/components/custom-editor.d.ts +3 -1
- package/dist/types/modes/controllers/btw-controller.d.ts +2 -0
- package/dist/types/modes/controllers/input-controller.d.ts +1 -0
- package/dist/types/modes/interactive-mode.d.ts +3 -0
- package/dist/types/modes/setup-wizard/index.d.ts +1 -0
- package/dist/types/modes/setup-wizard/startup-splash.d.ts +7 -0
- package/dist/types/modes/theme/theme.d.ts +1 -1
- package/dist/types/modes/types.d.ts +3 -0
- package/dist/types/sdk.d.ts +5 -0
- package/dist/types/session/agent-session.d.ts +4 -0
- package/dist/types/startup-splash.d.ts +12 -0
- package/dist/types/task/types.d.ts +47 -48
- package/dist/types/tools/ask.d.ts +26 -27
- package/dist/types/tools/ast-edit.d.ts +17 -17
- package/dist/types/tools/ast-grep.d.ts +12 -13
- package/dist/types/tools/bash.d.ts +20 -17
- package/dist/types/tools/browser.d.ts +46 -71
- package/dist/types/tools/checkpoint.d.ts +14 -15
- package/dist/types/tools/debug.d.ts +82 -145
- package/dist/types/tools/eval.d.ts +30 -40
- package/dist/types/tools/find.d.ts +17 -18
- package/dist/types/tools/gh.d.ts +49 -78
- package/dist/types/tools/image-gen.d.ts +20 -36
- package/dist/types/tools/inspect-image.d.ts +10 -11
- package/dist/types/tools/irc.d.ts +22 -33
- package/dist/types/tools/job.d.ts +11 -12
- package/dist/types/tools/learn.d.ts +21 -28
- package/dist/types/tools/manage-skill.d.ts +13 -22
- package/dist/types/tools/memory-edit.d.ts +15 -24
- package/dist/types/tools/memory-recall.d.ts +7 -8
- package/dist/types/tools/memory-reflect.d.ts +9 -10
- package/dist/types/tools/memory-retain.d.ts +13 -14
- package/dist/types/tools/read.d.ts +7 -8
- package/dist/types/tools/resolve.d.ts +11 -18
- package/dist/types/tools/review.d.ts +9 -15
- package/dist/types/tools/search-tool-bm25.d.ts +9 -10
- package/dist/types/tools/search.d.ts +16 -17
- package/dist/types/tools/ssh.d.ts +14 -15
- package/dist/types/tools/todo.d.ts +27 -43
- package/dist/types/tools/tts.d.ts +8 -9
- package/dist/types/tools/write.d.ts +9 -10
- package/dist/types/tui/index.d.ts +1 -0
- package/dist/types/tui/width-aware-text.d.ts +23 -0
- package/dist/types/utils/markit.d.ts +10 -1
- package/dist/types/web/search/index.d.ts +17 -28
- package/dist/types/web/search/providers/perplexity.d.ts +0 -2
- package/dist/types/web/search/types.d.ts +32 -26
- package/package.json +14 -13
- package/scripts/omp +1 -1
- package/src/advisor/__tests__/advisor.test.ts +44 -1
- package/src/advisor/advise-tool.ts +34 -11
- package/src/autoresearch/tools/init-experiment.ts +13 -16
- package/src/autoresearch/tools/log-experiment.ts +15 -18
- package/src/autoresearch/tools/run-experiment.ts +3 -3
- package/src/autoresearch/tools/update-notes.ts +4 -4
- package/src/cli/ttsr-cli.ts +995 -0
- package/src/cli-commands.ts +1 -0
- package/src/cli.ts +7 -1
- package/src/commands/ttsr.ts +125 -0
- package/src/commit/agentic/tools/analyze-file.ts +4 -4
- package/src/commit/agentic/tools/git-file-diff.ts +4 -4
- package/src/commit/agentic/tools/git-hunk.ts +7 -5
- package/src/commit/agentic/tools/git-overview.ts +4 -4
- package/src/commit/agentic/tools/propose-changelog.ts +18 -15
- package/src/commit/agentic/tools/propose-commit.ts +6 -6
- package/src/commit/agentic/tools/recent-commits.ts +3 -3
- package/src/commit/agentic/tools/schemas.ts +8 -20
- package/src/commit/agentic/tools/split-commit.ts +19 -23
- package/src/commit/analysis/summary.ts +7 -5
- package/src/commit/changelog/generate.ts +15 -11
- package/src/commit/shared-llm.ts +17 -24
- package/src/config/config-file.ts +13 -15
- package/src/config/keybindings.ts +6 -0
- package/src/config/models-config-schema.ts +206 -179
- package/src/config/settings-schema.ts +34 -0
- package/src/discovery/builtin-rules/index.ts +2 -0
- package/src/discovery/builtin-rules/ts-import-type.md +2 -2
- package/src/discovery/builtin-rules/ts-no-any.md +11 -2
- package/src/discovery/builtin-rules/ts-no-inline-cast-access.md +55 -0
- package/src/edit/hashline/params.ts +12 -11
- package/src/edit/index.ts +5 -4
- package/src/edit/modes/apply-patch.ts +4 -4
- package/src/edit/modes/patch.ts +15 -18
- package/src/edit/modes/replace.ts +13 -17
- package/src/edit/renderer.ts +0 -1
- package/src/eval/agent-bridge.ts +11 -13
- package/src/eval/completion-bridge.ts +25 -17
- package/src/eval/js/context-manager.ts +17 -2
- package/src/eval/js/index.ts +1 -1
- package/src/eval/py/executor.ts +2 -2
- package/src/extensibility/custom-commands/loader.ts +5 -3
- package/src/extensibility/custom-commands/types.ts +6 -3
- package/src/extensibility/custom-tools/loader.ts +4 -2
- package/src/extensibility/custom-tools/types.ts +8 -5
- package/src/extensibility/extensions/loader.ts +4 -2
- package/src/extensibility/extensions/types.ts +6 -3
- package/src/extensibility/hooks/loader.ts +5 -2
- package/src/extensibility/hooks/types.ts +7 -4
- package/src/extensibility/legacy-pi-ai-shim.ts +42 -5
- package/src/extensibility/legacy-pi-coding-agent-shim.ts +113 -0
- package/src/extensibility/plugins/legacy-pi-compat.ts +13 -13
- package/src/extensibility/tool-proxy.ts +4 -1
- package/src/extensibility/typebox.ts +778 -251
- package/src/goals/guided-setup.ts +12 -3
- package/src/goals/tools/goal-tool.ts +6 -6
- package/src/index.ts +2 -0
- package/src/internal-urls/docs-index.generated.ts +11 -9
- package/src/lsp/types.ts +13 -27
- package/src/main.ts +19 -18
- package/src/mcp/client.ts +38 -13
- package/src/mcp/render.ts +102 -89
- package/src/modes/components/agent-hub.ts +11 -4
- package/src/modes/components/btw-panel.ts +5 -1
- package/src/modes/components/custom-editor.ts +18 -0
- package/src/modes/components/status-line/component.ts +8 -1
- package/src/modes/components/tool-execution.ts +17 -10
- package/src/modes/controllers/btw-controller.ts +69 -1
- package/src/modes/controllers/input-controller.ts +29 -0
- package/src/modes/interactive-mode.ts +38 -8
- package/src/modes/setup-wizard/index.ts +1 -0
- package/src/modes/setup-wizard/scenes/sign-in.ts +77 -5
- package/src/modes/setup-wizard/startup-splash.ts +107 -0
- package/src/modes/theme/theme.ts +133 -143
- package/src/modes/types.ts +3 -0
- package/src/modes/utils/context-usage.ts +9 -5
- package/src/modes/utils/hotkeys-markdown.ts +1 -0
- package/src/prompts/system/system-prompt.md +1 -0
- package/src/sdk.ts +21 -4
- package/src/session/agent-session.ts +160 -33
- package/src/session/session-history-format.ts +11 -2
- package/src/session/snapcompact-inline.ts +1 -1
- package/src/slash-commands/builtin-registry.ts +4 -11
- package/src/startup-splash.ts +19 -0
- package/src/task/executor.ts +11 -6
- package/src/task/types.ts +44 -41
- package/src/tool-discovery/tool-index.ts +17 -4
- package/src/tools/ask.ts +14 -14
- package/src/tools/ast-edit.ts +17 -14
- package/src/tools/ast-grep.ts +10 -9
- package/src/tools/bash.ts +15 -10
- package/src/tools/browser/launch.ts +13 -0
- package/src/tools/browser.ts +26 -32
- package/src/tools/checkpoint.ts +7 -7
- package/src/tools/debug.ts +72 -69
- package/src/tools/eval.ts +18 -19
- package/src/tools/find.ts +20 -13
- package/src/tools/gh.ts +29 -49
- package/src/tools/image-gen.ts +27 -32
- package/src/tools/inspect-image.ts +8 -9
- package/src/tools/irc.ts +12 -12
- package/src/tools/job.ts +6 -6
- package/src/tools/learn.ts +11 -14
- package/src/tools/manage-skill.ts +19 -23
- package/src/tools/memory-edit.ts +8 -8
- package/src/tools/memory-recall.ts +4 -4
- package/src/tools/memory-reflect.ts +5 -5
- package/src/tools/memory-retain.ts +9 -11
- package/src/tools/puppeteer/02_stealth_hairline.txt +1 -1
- package/src/tools/puppeteer/04_stealth_iframe.txt +4 -4
- package/src/tools/puppeteer/05_stealth_webgl.txt +1 -1
- package/src/tools/puppeteer/10_stealth_plugins.txt +6 -4
- package/src/tools/puppeteer/12_stealth_codecs.txt +2 -2
- package/src/tools/puppeteer/13_stealth_worker.txt +1 -1
- package/src/tools/read.ts +169 -13
- package/src/tools/report-tool-issue.ts +6 -6
- package/src/tools/resolve.ts +6 -6
- package/src/tools/review.ts +10 -12
- package/src/tools/search-tool-bm25.ts +5 -5
- package/src/tools/search.ts +20 -29
- package/src/tools/ssh.ts +8 -8
- package/src/tools/todo.ts +16 -19
- package/src/tools/tts.ts +16 -15
- package/src/tools/write.ts +5 -5
- package/src/tui/index.ts +1 -0
- package/src/tui/width-aware-text.ts +58 -0
- package/src/utils/markit.ts +17 -2
- package/src/web/search/index.ts +9 -9
- package/src/web/search/providers/perplexity.ts +373 -126
- package/src/web/search/types.ts +28 -48
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
concern: "concern";
|
|
8
|
-
nit: "nit";
|
|
9
|
-
}>>;
|
|
10
|
-
}, z.core.$strip>;
|
|
11
|
-
export type AdviseParams = z.infer<typeof adviseSchema>;
|
|
1
|
+
import type { AgentIdentity, AgentTelemetryConfig, AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
|
|
2
|
+
declare const adviseSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
3
|
+
note: string;
|
|
4
|
+
severity?: "blocker" | "concern" | "nit" | undefined;
|
|
5
|
+
}, {}>;
|
|
6
|
+
export type AdviseParams = typeof adviseSchema.infer;
|
|
12
7
|
export type AdvisorSeverity = "nit" | "concern" | "blocker";
|
|
13
8
|
export interface AdviseDetails {
|
|
14
9
|
note: string;
|
|
@@ -70,6 +65,18 @@ export declare function resolveAdvisorDeliveryChannel(opts: {
|
|
|
70
65
|
aborting: boolean;
|
|
71
66
|
interruptImmuneTurnActive?: boolean;
|
|
72
67
|
}): AdvisorDeliveryChannel;
|
|
68
|
+
/**
|
|
69
|
+
* Derive the advisor loop's telemetry from the primary session's config so the
|
|
70
|
+
* advisor model's GenAI spans and usage/cost hooks (onChatUsage, onCostDelta,
|
|
71
|
+
* costEstimator) fire under the same pipeline as every other model call —
|
|
72
|
+
* stamped with the advisor's own agent identity. `conversationId` is cleared so
|
|
73
|
+
* the advisor loop falls back to its own `-advisor` session id for
|
|
74
|
+
* `gen_ai.conversation.id` instead of inheriting the primary's conversation.
|
|
75
|
+
*
|
|
76
|
+
* Returns undefined when the primary has no telemetry (instrumentation off), so
|
|
77
|
+
* the advisor `Agent` stays a zero-overhead no-op as well.
|
|
78
|
+
*/
|
|
79
|
+
export declare function deriveAdvisorTelemetry(primaryTelemetry: AgentTelemetryConfig | undefined, identity: AgentIdentity): AgentTelemetryConfig | undefined;
|
|
73
80
|
/**
|
|
74
81
|
* Side-effect-free investigation tools handed to the advisor agent so it can
|
|
75
82
|
* inspect the workspace before weighing in. Names match the primary session's
|
|
@@ -81,14 +88,10 @@ export declare class AdviseTool implements AgentTool<typeof adviseSchema, Advise
|
|
|
81
88
|
readonly name = "advise";
|
|
82
89
|
readonly label = "Advise";
|
|
83
90
|
readonly description: string;
|
|
84
|
-
readonly parameters:
|
|
85
|
-
note:
|
|
86
|
-
severity
|
|
87
|
-
|
|
88
|
-
concern: "concern";
|
|
89
|
-
nit: "nit";
|
|
90
|
-
}>>;
|
|
91
|
-
}, z.core.$strip>;
|
|
91
|
+
readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
92
|
+
note: string;
|
|
93
|
+
severity?: "blocker" | "concern" | "nit" | undefined;
|
|
94
|
+
}, {}>;
|
|
92
95
|
readonly intent: "omit";
|
|
93
96
|
constructor(onAdvice: (note: string, severity?: AdviseDetails["severity"]) => void);
|
|
94
97
|
execute(_toolCallId: string, args: AdviseParams, _signal?: AbortSignal, _onUpdate?: AgentToolUpdateCallback<AdviseDetails>, _context?: AgentToolContext): Promise<AgentToolResult<AdviseDetails>>;
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
1
|
import type { ToolDefinition } from "../../extensibility/extensions";
|
|
3
2
|
import type { AutoresearchToolFactoryOptions, ExperimentState } from "../types";
|
|
4
3
|
export declare const HARNESS_FILENAME = "autoresearch.sh";
|
|
5
4
|
export declare const DEFAULT_HARNESS_COMMAND = "bash autoresearch.sh";
|
|
6
|
-
declare const initExperimentSchema:
|
|
7
|
-
name:
|
|
8
|
-
goal
|
|
9
|
-
primary_metric:
|
|
10
|
-
metric_unit
|
|
11
|
-
direction
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
max_iterations: z.ZodOptional<z.ZodNumber>;
|
|
20
|
-
new_segment: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
-
}, z.core.$strip>;
|
|
5
|
+
declare const initExperimentSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
6
|
+
name: string;
|
|
7
|
+
goal?: string | undefined;
|
|
8
|
+
primary_metric: string;
|
|
9
|
+
metric_unit?: string | undefined;
|
|
10
|
+
direction?: "higher" | "lower" | undefined;
|
|
11
|
+
secondary_metrics?: string[] | undefined;
|
|
12
|
+
scope_paths?: string[] | undefined;
|
|
13
|
+
off_limits?: string[] | undefined;
|
|
14
|
+
constraints?: string[] | undefined;
|
|
15
|
+
max_iterations?: number | undefined;
|
|
16
|
+
new_segment?: boolean | undefined;
|
|
17
|
+
}, {}>;
|
|
22
18
|
interface InitExperimentDetails {
|
|
23
19
|
state: ExperimentState;
|
|
24
20
|
createdSession: boolean;
|
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
1
|
import type { ToolDefinition } from "../../extensibility/extensions";
|
|
3
2
|
import type { AutoresearchToolFactoryOptions, LogDetails } from "../types";
|
|
4
|
-
declare const logExperimentSchema:
|
|
5
|
-
metric:
|
|
6
|
-
status:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}, z.core.$strip>;
|
|
3
|
+
declare const logExperimentSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
4
|
+
metric: number;
|
|
5
|
+
status: "checks_failed" | "crash" | "discard" | "keep";
|
|
6
|
+
description: string;
|
|
7
|
+
metrics?: {
|
|
8
|
+
[x: string]: number;
|
|
9
|
+
} | undefined;
|
|
10
|
+
asi?: {
|
|
11
|
+
[x: string]: unknown;
|
|
12
|
+
} | undefined;
|
|
13
|
+
commit?: string | undefined;
|
|
14
|
+
justification?: string | undefined;
|
|
15
|
+
flag_runs?: {
|
|
16
|
+
run_id: number;
|
|
17
|
+
reason: string;
|
|
18
|
+
}[] | undefined;
|
|
19
|
+
}, {}>;
|
|
22
20
|
export declare function createLogExperimentTool(options: AutoresearchToolFactoryOptions): ToolDefinition<typeof logExperimentSchema, LogDetails>;
|
|
23
21
|
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
1
|
import type { ToolDefinition } from "../../extensibility/extensions";
|
|
3
2
|
import type { AutoresearchToolFactoryOptions, RunDetails, RunExperimentProgressDetails } from "../types";
|
|
4
|
-
declare const runExperimentSchema:
|
|
5
|
-
timeout_seconds
|
|
6
|
-
},
|
|
3
|
+
declare const runExperimentSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
4
|
+
timeout_seconds?: number | undefined;
|
|
5
|
+
}, {}>;
|
|
7
6
|
export declare function createRunExperimentTool(options: AutoresearchToolFactoryOptions): ToolDefinition<typeof runExperimentSchema, RunDetails | RunExperimentProgressDetails>;
|
|
8
7
|
export {};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
1
|
import type { ToolDefinition } from "../../extensibility/extensions";
|
|
3
2
|
import type { AutoresearchToolFactoryOptions } from "../types";
|
|
4
|
-
declare const updateNotesSchema:
|
|
5
|
-
body:
|
|
6
|
-
append_idea
|
|
7
|
-
},
|
|
3
|
+
declare const updateNotesSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
4
|
+
body: string;
|
|
5
|
+
append_idea?: string | undefined;
|
|
6
|
+
}, {}>;
|
|
8
7
|
interface UpdateNotesDetails {
|
|
9
8
|
notes: string;
|
|
10
9
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export type TtsrAction = "test" | "list" | "scan";
|
|
2
|
+
export declare const TTSR_ACTIONS: TtsrAction[];
|
|
3
|
+
export declare const TTSR_SOURCES: TtsrMatchSource[];
|
|
4
|
+
export type TtsrMatchSource = "text" | "thinking" | "tool";
|
|
5
|
+
export interface TtsrTestArgs {
|
|
6
|
+
/** Inline snippet text. */
|
|
7
|
+
snippet?: string;
|
|
8
|
+
/** Snippet file path, or `-` for stdin. */
|
|
9
|
+
file?: string;
|
|
10
|
+
/** Path to a rule markdown file to test in isolation (skips project loading). */
|
|
11
|
+
rule?: string;
|
|
12
|
+
/** TTSR match source; when omitted, inferred from --file (tool for source files, text otherwise). */
|
|
13
|
+
source?: TtsrMatchSource;
|
|
14
|
+
/** Tool name when `source === "tool"` (e.g. "edit", "write"). */
|
|
15
|
+
tool?: string;
|
|
16
|
+
/** Candidate file path used for scope/glob matching and AST language inference. */
|
|
17
|
+
filePath?: string;
|
|
18
|
+
/** Show every evaluated rule, not just triggered ones. */
|
|
19
|
+
verbose?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface TtsrScanArgs {
|
|
22
|
+
/** Directory to glob and scan files in. */
|
|
23
|
+
directory?: string;
|
|
24
|
+
/** Path to a rule markdown file to test in isolation (skips project loading). */
|
|
25
|
+
rule?: string;
|
|
26
|
+
/** Respect gitignore files while discovering scan candidates. Defaults to true. */
|
|
27
|
+
gitignore?: boolean;
|
|
28
|
+
/** Maximum file size to scan in bytes; 0 disables the limit. */
|
|
29
|
+
maxBytes?: number;
|
|
30
|
+
/** Show details. */
|
|
31
|
+
verbose?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface TtsrCommandArgs {
|
|
34
|
+
action: TtsrAction;
|
|
35
|
+
test?: TtsrTestArgs;
|
|
36
|
+
scan?: TtsrScanArgs;
|
|
37
|
+
json?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export declare function runTtsrCommand(cmd: TtsrCommandArgs): Promise<void>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `omp ttsr` — inspect and test Time-Traveling Stream Rules.
|
|
3
|
+
*
|
|
4
|
+
* `omp ttsr test` feeds a snippet (inline, --file, or stdin) through the real
|
|
5
|
+
* TTSR matching pipeline and reports which rules would trigger. `omp ttsr list`
|
|
6
|
+
* shows every TTSR-registered rule the current project/user config would load.
|
|
7
|
+
*/
|
|
8
|
+
import { Command } from "@oh-my-pi/pi-utils/cli";
|
|
9
|
+
export default class Ttsr extends Command {
|
|
10
|
+
static description: string;
|
|
11
|
+
static args: {
|
|
12
|
+
action: import("@oh-my-pi/pi-utils/cli").ArgDescriptor & {
|
|
13
|
+
description: string;
|
|
14
|
+
required: false;
|
|
15
|
+
options: import("../cli/ttsr-cli").TtsrAction[];
|
|
16
|
+
};
|
|
17
|
+
snippet: import("@oh-my-pi/pi-utils/cli").ArgDescriptor & {
|
|
18
|
+
description: string;
|
|
19
|
+
required: false;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
static flags: {
|
|
23
|
+
file: import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"string"> & {
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
rule: import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"string"> & {
|
|
27
|
+
char: string;
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
source: import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"string"> & {
|
|
31
|
+
description: string;
|
|
32
|
+
options: import("../cli/ttsr-cli").TtsrMatchSource[];
|
|
33
|
+
};
|
|
34
|
+
tool: import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"string"> & {
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
path: import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"string"> & {
|
|
38
|
+
char: string;
|
|
39
|
+
description: string;
|
|
40
|
+
};
|
|
41
|
+
verbose: import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"boolean"> & {
|
|
42
|
+
char: string;
|
|
43
|
+
description: string;
|
|
44
|
+
};
|
|
45
|
+
json: import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"boolean"> & {
|
|
46
|
+
description: string;
|
|
47
|
+
};
|
|
48
|
+
"no-gitignore": import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"boolean"> & {
|
|
49
|
+
description: string;
|
|
50
|
+
};
|
|
51
|
+
"max-bytes": import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"integer"> & {
|
|
52
|
+
description: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
static examples: string[];
|
|
56
|
+
run(): Promise<void>;
|
|
57
|
+
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
1
|
import type { CommitAgentState } from "../../../commit/agentic/state";
|
|
3
2
|
import type { ModelRegistry } from "../../../config/model-registry";
|
|
4
3
|
import type { Settings } from "../../../config/settings";
|
|
5
4
|
import type { CustomTool } from "../../../extensibility/custom-tools/types";
|
|
6
5
|
import type { AuthStorage } from "../../../session/auth-storage";
|
|
7
|
-
declare const analyzeFileSchema:
|
|
8
|
-
files:
|
|
9
|
-
goal
|
|
10
|
-
},
|
|
6
|
+
declare const analyzeFileSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
7
|
+
files: string[];
|
|
8
|
+
goal?: string | undefined;
|
|
9
|
+
}, {}>;
|
|
11
10
|
export declare function createAnalyzeFileTool(options: {
|
|
12
11
|
cwd: string;
|
|
13
12
|
authStorage: AuthStorage;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
1
|
import type { CommitAgentState } from "../../../commit/agentic/state";
|
|
3
2
|
import type { CustomTool } from "../../../extensibility/custom-tools/types";
|
|
4
3
|
export declare function getFilePriority(filename: string): number;
|
|
5
|
-
declare const gitFileDiffSchema:
|
|
6
|
-
files:
|
|
7
|
-
staged
|
|
8
|
-
},
|
|
4
|
+
declare const gitFileDiffSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
5
|
+
files: string[];
|
|
6
|
+
staged?: boolean | undefined;
|
|
7
|
+
}, {}>;
|
|
9
8
|
export declare function createGitFileDiffTool(cwd: string, state: CommitAgentState): CustomTool<typeof gitFileDiffSchema>;
|
|
10
9
|
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
1
|
import type { CustomTool } from "../../../extensibility/custom-tools/types";
|
|
3
|
-
declare const gitHunkSchema:
|
|
4
|
-
file:
|
|
5
|
-
hunks
|
|
6
|
-
staged
|
|
7
|
-
},
|
|
2
|
+
declare const gitHunkSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
3
|
+
file: string;
|
|
4
|
+
hunks?: number[] | undefined;
|
|
5
|
+
staged?: boolean | undefined;
|
|
6
|
+
}, {}>;
|
|
8
7
|
export declare function createGitHunkTool(cwd: string): CustomTool<typeof gitHunkSchema>;
|
|
9
8
|
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
1
|
import type { CommitAgentState } from "../../../commit/agentic/state";
|
|
3
2
|
import type { CustomTool } from "../../../extensibility/custom-tools/types";
|
|
4
|
-
declare const gitOverviewSchema:
|
|
5
|
-
staged
|
|
6
|
-
include_untracked
|
|
7
|
-
},
|
|
3
|
+
declare const gitOverviewSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
4
|
+
staged?: boolean | undefined;
|
|
5
|
+
include_untracked?: boolean | undefined;
|
|
6
|
+
}, {}>;
|
|
8
7
|
export declare function createGitOverviewTool(cwd: string, state: CommitAgentState): CustomTool<typeof gitOverviewSchema>;
|
|
9
8
|
export {};
|
|
@@ -1,28 +1,27 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
1
|
import type { CommitAgentState } from "../../../commit/agentic/state";
|
|
3
2
|
import type { CustomTool } from "../../../extensibility/custom-tools/types";
|
|
4
|
-
declare const proposeChangelogSchema:
|
|
5
|
-
entries:
|
|
6
|
-
path:
|
|
7
|
-
entries:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Changed
|
|
11
|
-
Deprecated
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
Security
|
|
15
|
-
}
|
|
16
|
-
deletions
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Changed
|
|
20
|
-
Deprecated
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Security
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
},
|
|
3
|
+
declare const proposeChangelogSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
4
|
+
entries: {
|
|
5
|
+
path: string;
|
|
6
|
+
entries: {
|
|
7
|
+
"Breaking Changes"?: string[] | undefined;
|
|
8
|
+
Added?: string[] | undefined;
|
|
9
|
+
Changed?: string[] | undefined;
|
|
10
|
+
Deprecated?: string[] | undefined;
|
|
11
|
+
Removed?: string[] | undefined;
|
|
12
|
+
Fixed?: string[] | undefined;
|
|
13
|
+
Security?: string[] | undefined;
|
|
14
|
+
};
|
|
15
|
+
deletions?: {
|
|
16
|
+
"Breaking Changes"?: string[] | undefined;
|
|
17
|
+
Added?: string[] | undefined;
|
|
18
|
+
Changed?: string[] | undefined;
|
|
19
|
+
Deprecated?: string[] | undefined;
|
|
20
|
+
Removed?: string[] | undefined;
|
|
21
|
+
Fixed?: string[] | undefined;
|
|
22
|
+
Security?: string[] | undefined;
|
|
23
|
+
} | undefined;
|
|
24
|
+
}[];
|
|
25
|
+
}, {}>;
|
|
27
26
|
export declare function createProposeChangelogTool(state: CommitAgentState, changelogTargets: string[]): CustomTool<typeof proposeChangelogSchema>;
|
|
28
27
|
export {};
|
|
@@ -1,36 +1,15 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
1
|
import type { CommitAgentState } from "../../../commit/agentic/state";
|
|
3
2
|
import type { CustomTool } from "../../../extensibility/custom-tools/types";
|
|
4
|
-
declare const proposeCommitSchema:
|
|
5
|
-
type:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
style: "style";
|
|
16
|
-
test: "test";
|
|
17
|
-
}>;
|
|
18
|
-
scope: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
19
|
-
summary: z.ZodString;
|
|
20
|
-
details: z.ZodArray<z.ZodObject<{
|
|
21
|
-
text: z.ZodString;
|
|
22
|
-
changelog_category: z.ZodOptional<z.ZodEnum<{
|
|
23
|
-
Added: "Added";
|
|
24
|
-
"Breaking Changes": "Breaking Changes";
|
|
25
|
-
Changed: "Changed";
|
|
26
|
-
Deprecated: "Deprecated";
|
|
27
|
-
Fixed: "Fixed";
|
|
28
|
-
Removed: "Removed";
|
|
29
|
-
Security: "Security";
|
|
30
|
-
}>>;
|
|
31
|
-
user_visible: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
-
}, z.core.$strip>>;
|
|
33
|
-
issue_refs: z.ZodArray<z.ZodString>;
|
|
34
|
-
}, z.core.$strip>;
|
|
3
|
+
declare const proposeCommitSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
4
|
+
type: "build" | "chore" | "ci" | "docs" | "feat" | "fix" | "perf" | "refactor" | "revert" | "style" | "test";
|
|
5
|
+
scope: string | null;
|
|
6
|
+
summary: string;
|
|
7
|
+
details: {
|
|
8
|
+
text: string;
|
|
9
|
+
changelog_category?: "Added" | "Breaking Changes" | "Changed" | "Deprecated" | "Fixed" | "Removed" | "Security" | undefined;
|
|
10
|
+
user_visible?: boolean | undefined;
|
|
11
|
+
}[];
|
|
12
|
+
issue_refs: string[];
|
|
13
|
+
}, {}>;
|
|
35
14
|
export declare function createProposeCommitTool(cwd: string, state: CommitAgentState): CustomTool<typeof proposeCommitSchema>;
|
|
36
15
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
1
|
import type { CustomTool } from "../../../extensibility/custom-tools/types";
|
|
3
|
-
declare const recentCommitsSchema:
|
|
4
|
-
count
|
|
5
|
-
},
|
|
2
|
+
declare const recentCommitsSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
3
|
+
count?: number | undefined;
|
|
4
|
+
}, {}>;
|
|
6
5
|
export declare function createRecentCommitsTool(cwd: string): CustomTool<typeof recentCommitsSchema>;
|
|
7
6
|
export {};
|
|
@@ -1,27 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
feat: "feat";
|
|
8
|
-
fix: "fix";
|
|
9
|
-
perf: "perf";
|
|
10
|
-
refactor: "refactor";
|
|
11
|
-
revert: "revert";
|
|
12
|
-
style: "style";
|
|
13
|
-
test: "test";
|
|
14
|
-
}>;
|
|
15
|
-
export declare const detailSchema: z.ZodObject<{
|
|
16
|
-
text: z.ZodString;
|
|
17
|
-
changelog_category: z.ZodOptional<z.ZodEnum<{
|
|
18
|
-
Added: "Added";
|
|
19
|
-
"Breaking Changes": "Breaking Changes";
|
|
20
|
-
Changed: "Changed";
|
|
21
|
-
Deprecated: "Deprecated";
|
|
22
|
-
Fixed: "Fixed";
|
|
23
|
-
Removed: "Removed";
|
|
24
|
-
Security: "Security";
|
|
25
|
-
}>>;
|
|
26
|
-
user_visible: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
-
}, z.core.$strip>;
|
|
1
|
+
export declare const commitTypeSchema: import("arktype/internal/variants/string.ts").StringType<"build" | "chore" | "ci" | "docs" | "feat" | "fix" | "perf" | "refactor" | "revert" | "style" | "test", {}>;
|
|
2
|
+
export declare const detailSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
3
|
+
text: string;
|
|
4
|
+
changelog_category?: "Added" | "Breaking Changes" | "Changed" | "Deprecated" | "Fixed" | "Removed" | "Security" | undefined;
|
|
5
|
+
user_visible?: boolean | undefined;
|
|
6
|
+
}, {}>;
|
|
@@ -1,53 +1,32 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
1
|
import type { CommitAgentState } from "../../../commit/agentic/state";
|
|
3
2
|
import type { CustomTool } from "../../../extensibility/custom-tools/types";
|
|
4
|
-
declare const splitCommitSchema:
|
|
5
|
-
commits:
|
|
6
|
-
changes:
|
|
7
|
-
path:
|
|
8
|
-
hunks:
|
|
9
|
-
type:
|
|
10
|
-
}
|
|
11
|
-
type:
|
|
12
|
-
indices:
|
|
13
|
-
}
|
|
14
|
-
type:
|
|
15
|
-
start:
|
|
16
|
-
end:
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
type:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
scope: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
33
|
-
summary: z.ZodString;
|
|
34
|
-
details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
35
|
-
text: z.ZodString;
|
|
36
|
-
changelog_category: z.ZodOptional<z.ZodEnum<{
|
|
37
|
-
Added: "Added";
|
|
38
|
-
"Breaking Changes": "Breaking Changes";
|
|
39
|
-
Changed: "Changed";
|
|
40
|
-
Deprecated: "Deprecated";
|
|
41
|
-
Fixed: "Fixed";
|
|
42
|
-
Removed: "Removed";
|
|
43
|
-
Security: "Security";
|
|
44
|
-
}>>;
|
|
45
|
-
user_visible: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
-
}, z.core.$strip>>>;
|
|
47
|
-
issue_refs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
48
|
-
rationale: z.ZodOptional<z.ZodString>;
|
|
49
|
-
dependencies: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
50
|
-
}, z.core.$strip>>;
|
|
51
|
-
}, z.core.$strip>;
|
|
3
|
+
declare const splitCommitSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
4
|
+
commits: {
|
|
5
|
+
changes: {
|
|
6
|
+
path: string;
|
|
7
|
+
hunks: {
|
|
8
|
+
type: "all";
|
|
9
|
+
} | {
|
|
10
|
+
type: "indices";
|
|
11
|
+
indices: number[];
|
|
12
|
+
} | {
|
|
13
|
+
type: "lines";
|
|
14
|
+
start: number;
|
|
15
|
+
end: number;
|
|
16
|
+
};
|
|
17
|
+
}[];
|
|
18
|
+
type: "build" | "chore" | "ci" | "docs" | "feat" | "fix" | "perf" | "refactor" | "revert" | "style" | "test";
|
|
19
|
+
scope: string | null;
|
|
20
|
+
summary: string;
|
|
21
|
+
details?: {
|
|
22
|
+
text: string;
|
|
23
|
+
changelog_category?: "Added" | "Breaking Changes" | "Changed" | "Deprecated" | "Fixed" | "Removed" | "Security" | undefined;
|
|
24
|
+
user_visible?: boolean | undefined;
|
|
25
|
+
}[] | undefined;
|
|
26
|
+
issue_refs?: string[] | undefined;
|
|
27
|
+
rationale?: string | undefined;
|
|
28
|
+
dependencies?: number[] | undefined;
|
|
29
|
+
}[];
|
|
30
|
+
}, {}>;
|
|
52
31
|
export declare function createSplitCommitTool(cwd: string, state: CommitAgentState, changelogTargets: string[]): CustomTool<typeof splitCommitSchema>;
|
|
53
32
|
export {};
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import type { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
|
|
2
2
|
import type { Api, ApiKey, Model } from "@oh-my-pi/pi-ai";
|
|
3
|
-
import {
|
|
4
|
-
import { type ChangelogGenerationResult } from "../../commit/types";
|
|
3
|
+
import type { ChangelogGenerationResult } from "../../commit/types";
|
|
5
4
|
export declare const changelogTool: {
|
|
6
5
|
name: string;
|
|
7
6
|
description: string;
|
|
8
|
-
parameters:
|
|
9
|
-
entries:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
Changed
|
|
13
|
-
Deprecated
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Security
|
|
17
|
-
}
|
|
18
|
-
},
|
|
7
|
+
parameters: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
8
|
+
entries: {
|
|
9
|
+
"Breaking Changes"?: string[] | undefined;
|
|
10
|
+
Added?: string[] | undefined;
|
|
11
|
+
Changed?: string[] | undefined;
|
|
12
|
+
Deprecated?: string[] | undefined;
|
|
13
|
+
Removed?: string[] | undefined;
|
|
14
|
+
Fixed?: string[] | undefined;
|
|
15
|
+
Security?: string[] | undefined;
|
|
16
|
+
};
|
|
17
|
+
}, {}>;
|
|
19
18
|
};
|
|
20
19
|
export interface ChangelogPromptInput {
|
|
21
20
|
model: Model<Api>;
|