@oh-my-pi/pi-coding-agent 17.2.6 → 17.2.7
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 +17 -1
- package/dist/{CHANGELOG-gs76k6wc.md → CHANGELOG-1p8yvde7.md} +17 -1
- package/dist/cli.js +3645 -3689
- package/dist/types/advisor/advise-tool.d.ts +10 -4
- package/dist/types/autoresearch/tools/init-experiment.d.ts +19 -7
- package/dist/types/autoresearch/tools/log-experiment.d.ts +19 -11
- package/dist/types/autoresearch/tools/run-experiment.d.ts +4 -2
- package/dist/types/autoresearch/tools/update-notes.d.ts +5 -2
- package/dist/types/commit/agentic/tools/analyze-file.d.ts +5 -2
- package/dist/types/commit/agentic/tools/git-file-diff.d.ts +5 -2
- package/dist/types/commit/agentic/tools/git-hunk.d.ts +6 -2
- package/dist/types/commit/agentic/tools/git-overview.d.ts +5 -2
- package/dist/types/commit/agentic/tools/propose-changelog.d.ts +29 -7
- package/dist/types/commit/agentic/tools/propose-commit.d.ts +14 -4
- package/dist/types/commit/agentic/tools/recent-commits.d.ts +4 -2
- package/dist/types/commit/agentic/tools/schemas.d.ts +7 -3
- package/dist/types/commit/agentic/tools/split-commit.d.ts +37 -10
- package/dist/types/commit/changelog/generate.d.ts +13 -3
- package/dist/types/commit/shared-llm.d.ts +13 -4
- package/dist/types/config/config-file.d.ts +1 -1
- package/dist/types/config/models-config-schema-bundle.d.ts +1992 -981
- package/dist/types/config/models-config-schema.d.ts +1201 -580
- package/dist/types/config/models-config.d.ts +355 -371
- package/dist/types/edit/hashline/params.d.ts +4 -2
- package/dist/types/edit/modes/apply-patch.d.ts +4 -2
- package/dist/types/edit/modes/patch.d.ts +16 -5
- package/dist/types/edit/modes/replace.d.ts +8 -3
- package/dist/types/eval/bridge-timeout.d.ts +5 -2
- package/dist/types/eval/completion-bridge.d.ts +13 -0
- package/dist/types/eval/py/tool-bridge.d.ts +12 -0
- package/dist/types/extensibility/custom-commands/types.d.ts +4 -4
- package/dist/types/extensibility/custom-tools/types.d.ts +4 -4
- package/dist/types/extensibility/extensions/types.d.ts +4 -4
- package/dist/types/extensibility/hooks/types.d.ts +4 -4
- package/dist/types/extensibility/legacy-pi-ai-shim.d.ts +1 -1
- package/dist/types/extensibility/legacy-pi-coding-agent-shim.d.ts +1 -1
- package/dist/types/extensibility/legacy-typebox.d.ts +8 -0
- package/dist/types/extensibility/plugins/legacy-pi-compat.d.ts +6 -13
- package/dist/types/goals/tools/goal-tool.d.ts +12 -4
- package/dist/types/lsp/index.d.ts +15 -5
- package/dist/types/lsp/types.d.ts +15 -5
- package/dist/types/security/contracts/schemas.d.ts +985 -409
- package/dist/types/security/publication.d.ts +92 -34
- package/dist/types/session/agent-session-types.d.ts +1 -1
- package/dist/types/session/session-entries.d.ts +1 -1
- package/dist/types/session/session-manager.d.ts +1 -1
- package/dist/types/task/types.d.ts +63 -18
- package/dist/types/tools/ask.d.ts +34 -8
- package/dist/types/tools/ast-edit.d.ts +16 -4
- package/dist/types/tools/ast-grep.d.ts +12 -4
- package/dist/types/tools/bash.d.ts +20 -11
- package/dist/types/tools/browser.d.ts +64 -20
- package/dist/types/tools/checkpoint.d.ts +16 -8
- package/dist/types/tools/computer.d.ts +1 -1
- package/dist/types/tools/debug.d.ts +118 -48
- package/dist/types/tools/eval.d.ts +11 -5
- package/dist/types/tools/gh.d.ts +74 -26
- package/dist/types/tools/glob.d.ts +16 -6
- package/dist/types/tools/grep.d.ts +18 -6
- package/dist/types/tools/hub/index.d.ts +116 -46
- package/dist/types/tools/image-gen.d.ts +25 -8
- package/dist/types/tools/inspect-image.d.ts +10 -4
- package/dist/types/tools/learn.d.ts +26 -8
- package/dist/types/tools/manage-skill.d.ts +16 -6
- package/dist/types/tools/memory-edit.d.ts +18 -6
- package/dist/types/tools/memory-recall.d.ts +8 -4
- package/dist/types/tools/memory-reflect.d.ts +10 -4
- package/dist/types/tools/memory-retain.d.ts +14 -4
- package/dist/types/tools/read.d.ts +8 -4
- package/dist/types/tools/security-scan.d.ts +82 -30
- package/dist/types/tools/todo.d.ts +30 -10
- package/dist/types/tools/tts.d.ts +12 -5
- package/dist/types/tools/vibe.d.ts +42 -18
- package/dist/types/tools/write.d.ts +10 -4
- package/dist/types/web/search/index.d.ts +20 -6
- package/package.json +13 -13
- package/scripts/legacy-pi-virtual-module.ts +2 -2
- package/src/advisor/advise-tool.ts +1 -1
- package/src/advisor/config.ts +1 -1
- package/src/autoresearch/tools/init-experiment.ts +1 -2
- package/src/autoresearch/tools/log-experiment.ts +1 -2
- package/src/autoresearch/tools/run-experiment.ts +1 -1
- package/src/autoresearch/tools/update-notes.ts +1 -1
- package/src/commit/agentic/tools/analyze-file.ts +1 -1
- package/src/commit/agentic/tools/git-file-diff.ts +1 -1
- package/src/commit/agentic/tools/git-hunk.ts +1 -1
- package/src/commit/agentic/tools/git-overview.ts +1 -1
- package/src/commit/agentic/tools/propose-changelog.ts +1 -1
- package/src/commit/agentic/tools/propose-commit.ts +1 -1
- package/src/commit/agentic/tools/recent-commits.ts +1 -1
- package/src/commit/agentic/tools/schemas.ts +1 -1
- package/src/commit/agentic/tools/split-commit.ts +1 -1
- package/src/commit/analysis/summary.ts +1 -1
- package/src/commit/changelog/generate.ts +1 -1
- package/src/config/config-file.ts +2 -2
- package/src/config/models-config-schema-bundle.ts +1 -8
- package/src/discovery/codex.ts +22 -9
- package/src/edit/hashline/params.ts +1 -1
- package/src/edit/modes/apply-patch.ts +1 -1
- package/src/edit/modes/patch.ts +1 -1
- package/src/edit/modes/replace.ts +2 -1
- package/src/eval/agent-bridge.ts +4 -2
- package/src/eval/bridge-timeout.ts +5 -2
- package/src/eval/completion-bridge.ts +3 -2
- package/src/eval/executor-base.ts +20 -1
- package/src/eval/js/context-manager.ts +94 -6
- package/src/eval/py/tool-bridge.ts +29 -9
- package/src/extensibility/custom-commands/loader.ts +3 -3
- package/src/extensibility/custom-commands/types.ts +4 -4
- package/src/extensibility/custom-tools/loader.ts +3 -3
- package/src/extensibility/custom-tools/types.ts +5 -4
- package/src/extensibility/extensions/loader.ts +3 -3
- package/src/extensibility/extensions/types.ts +5 -4
- package/src/extensibility/hooks/loader.ts +3 -3
- package/src/extensibility/hooks/types.ts +4 -4
- package/src/extensibility/legacy-pi-ai-shim.ts +1 -1
- package/src/extensibility/legacy-pi-coding-agent-shim.ts +2 -2
- package/src/extensibility/legacy-typebox.ts +101 -0
- package/src/extensibility/plugins/legacy-pi-compat.ts +13 -22
- package/src/goals/tools/goal-tool.ts +1 -1
- package/src/lsp/types.ts +1 -1
- package/src/modes/theme/theme.ts +3 -3
- package/src/security/contracts/schemas.ts +1 -5
- package/src/security/contracts/validation.ts +1 -1
- package/src/security/publication.ts +1 -1
- package/src/session/agent-session-types.ts +1 -1
- package/src/session/agent-session.ts +1 -2
- package/src/session/session-context.ts +3 -3
- package/src/session/session-entries.ts +1 -1
- package/src/session/session-manager.ts +1 -1
- package/src/slash-commands/builtin-registry.ts +3 -4
- package/src/task/types.ts +1 -1
- package/src/tools/ask.ts +1 -1
- package/src/tools/ast-edit.ts +1 -1
- package/src/tools/ast-grep.ts +1 -1
- package/src/tools/bash.ts +61 -3
- package/src/tools/browser.ts +1 -1
- package/src/tools/checkpoint.ts +1 -1
- package/src/tools/computer.ts +1 -1
- package/src/tools/debug.ts +1 -1
- package/src/tools/eval.ts +1 -1
- package/src/tools/gh.ts +1 -2
- package/src/tools/glob.ts +1 -1
- package/src/tools/grep.ts +1 -1
- package/src/tools/hub/index.ts +1 -1
- package/src/tools/image-gen.ts +1 -1
- package/src/tools/inspect-image.ts +1 -1
- package/src/tools/learn.ts +1 -1
- package/src/tools/manage-skill.ts +1 -1
- package/src/tools/memory-edit.ts +1 -1
- package/src/tools/memory-recall.ts +1 -1
- package/src/tools/memory-reflect.ts +1 -1
- package/src/tools/memory-retain.ts +1 -1
- package/src/tools/read.ts +1 -1
- package/src/tools/security-scan.ts +1 -1
- package/src/tools/todo.ts +1 -1
- package/src/tools/tts.ts +1 -1
- package/src/tools/vibe.ts +2 -1
- package/src/tools/write.ts +1 -1
- package/src/web/search/index.ts +2 -1
- package/dist/types/extensibility/typebox.d.ts +0 -181
- package/src/extensibility/typebox.ts +0 -958
|
@@ -1,65 +1,123 @@
|
|
|
1
1
|
import type { ToolDefinition } from "../extensibility/extensions/index.js";
|
|
2
2
|
import type { SecurityScanBundle, SecurityScanPlan } from "./contracts/index.js";
|
|
3
3
|
import { type SecurityStore } from "./store.js";
|
|
4
|
-
export declare const securityPublishSchema: import("
|
|
4
|
+
export declare const securityPublishSchema: import("@oh-my-pi/omptype").FluentType<{
|
|
5
|
+
coverage: {
|
|
6
|
+
completeness: "complete" | "partial" | "unknown";
|
|
7
|
+
deferred?: {
|
|
8
|
+
paths?: string[] | undefined;
|
|
9
|
+
reason: string;
|
|
10
|
+
surface_ids?: string[] | undefined;
|
|
11
|
+
}[] | undefined;
|
|
12
|
+
explicit_exclusions?: {
|
|
13
|
+
pattern: string;
|
|
14
|
+
reason: string;
|
|
15
|
+
}[] | undefined;
|
|
16
|
+
open_questions?: {
|
|
17
|
+
follow_up_prompt?: string | undefined;
|
|
18
|
+
question: string;
|
|
19
|
+
}[] | undefined;
|
|
20
|
+
surfaces?: {
|
|
21
|
+
disposition: "needs_follow_up" | "no_issue_found" | "not_applicable" | "rejected" | "reported";
|
|
22
|
+
label: string;
|
|
23
|
+
notes?: string | undefined;
|
|
24
|
+
receipt_refs?: string[] | undefined;
|
|
25
|
+
risk_area?: string | undefined;
|
|
26
|
+
}[] | undefined;
|
|
27
|
+
};
|
|
5
28
|
findings: {
|
|
6
|
-
rule_id: string;
|
|
7
|
-
title: string;
|
|
8
|
-
summary: string;
|
|
9
|
-
severity: "critical" | "high" | "informational" | "low" | "medium";
|
|
10
|
-
confidence: "high" | "low" | "medium";
|
|
11
|
-
category: string;
|
|
12
29
|
anchor?: string | undefined;
|
|
30
|
+
category: string;
|
|
31
|
+
confidence: "high" | "low" | "medium";
|
|
13
32
|
cwe?: string[] | undefined;
|
|
14
|
-
locations: {
|
|
15
|
-
path: string;
|
|
16
|
-
start_line: number;
|
|
17
|
-
end_line?: number | undefined;
|
|
18
|
-
start_column?: number | undefined;
|
|
19
|
-
end_column?: number | undefined;
|
|
20
|
-
role?: string | undefined;
|
|
21
|
-
}[];
|
|
22
33
|
evidence?: {
|
|
23
|
-
label: string;
|
|
24
|
-
explanation: string;
|
|
25
34
|
excerpt?: string | undefined;
|
|
35
|
+
explanation: string;
|
|
36
|
+
label: string;
|
|
26
37
|
location?: {
|
|
27
|
-
path: string;
|
|
28
|
-
start_line: number;
|
|
29
|
-
end_line?: number | undefined;
|
|
30
|
-
start_column?: number | undefined;
|
|
31
38
|
end_column?: number | undefined;
|
|
39
|
+
end_line?: number | undefined;
|
|
40
|
+
path: string;
|
|
32
41
|
role?: string | undefined;
|
|
42
|
+
start_column?: number | undefined;
|
|
43
|
+
start_line: number;
|
|
33
44
|
} | undefined;
|
|
34
45
|
}[] | undefined;
|
|
46
|
+
locations: {
|
|
47
|
+
end_column?: number | undefined;
|
|
48
|
+
end_line?: number | undefined;
|
|
49
|
+
path: string;
|
|
50
|
+
role?: string | undefined;
|
|
51
|
+
start_column?: number | undefined;
|
|
52
|
+
start_line: number;
|
|
53
|
+
}[];
|
|
35
54
|
remediation?: string | undefined;
|
|
55
|
+
rule_id: string;
|
|
56
|
+
severity: "critical" | "high" | "informational" | "low" | "medium";
|
|
57
|
+
summary: string;
|
|
58
|
+
title: string;
|
|
36
59
|
validation?: "partial" | "unvalidated" | "validated" | undefined;
|
|
37
60
|
}[];
|
|
61
|
+
report: string;
|
|
62
|
+
}, {
|
|
38
63
|
coverage: {
|
|
39
64
|
completeness: "complete" | "partial" | "unknown";
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
notes?: string | undefined;
|
|
45
|
-
receipt_refs?: string[] | undefined;
|
|
65
|
+
deferred?: {
|
|
66
|
+
paths?: string[] | undefined;
|
|
67
|
+
reason: string;
|
|
68
|
+
surface_ids?: string[] | undefined;
|
|
46
69
|
}[] | undefined;
|
|
47
70
|
explicit_exclusions?: {
|
|
48
71
|
pattern: string;
|
|
49
72
|
reason: string;
|
|
50
73
|
}[] | undefined;
|
|
51
|
-
deferred?: {
|
|
52
|
-
reason: string;
|
|
53
|
-
paths?: string[] | undefined;
|
|
54
|
-
surface_ids?: string[] | undefined;
|
|
55
|
-
}[] | undefined;
|
|
56
74
|
open_questions?: {
|
|
57
|
-
question: string;
|
|
58
75
|
follow_up_prompt?: string | undefined;
|
|
76
|
+
question: string;
|
|
77
|
+
}[] | undefined;
|
|
78
|
+
surfaces?: {
|
|
79
|
+
disposition: "needs_follow_up" | "no_issue_found" | "not_applicable" | "rejected" | "reported";
|
|
80
|
+
label: string;
|
|
81
|
+
notes?: string | undefined;
|
|
82
|
+
receipt_refs?: string[] | undefined;
|
|
83
|
+
risk_area?: string | undefined;
|
|
59
84
|
}[] | undefined;
|
|
60
85
|
};
|
|
86
|
+
findings: {
|
|
87
|
+
anchor?: string | undefined;
|
|
88
|
+
category: string;
|
|
89
|
+
confidence: "high" | "low" | "medium";
|
|
90
|
+
cwe?: string[] | undefined;
|
|
91
|
+
evidence?: {
|
|
92
|
+
excerpt?: string | undefined;
|
|
93
|
+
explanation: string;
|
|
94
|
+
label: string;
|
|
95
|
+
location?: {
|
|
96
|
+
end_column?: number | undefined;
|
|
97
|
+
end_line?: number | undefined;
|
|
98
|
+
path: string;
|
|
99
|
+
role?: string | undefined;
|
|
100
|
+
start_column?: number | undefined;
|
|
101
|
+
start_line: number;
|
|
102
|
+
} | undefined;
|
|
103
|
+
}[] | undefined;
|
|
104
|
+
locations: {
|
|
105
|
+
end_column?: number | undefined;
|
|
106
|
+
end_line?: number | undefined;
|
|
107
|
+
path: string;
|
|
108
|
+
role?: string | undefined;
|
|
109
|
+
start_column?: number | undefined;
|
|
110
|
+
start_line: number;
|
|
111
|
+
}[];
|
|
112
|
+
remediation?: string | undefined;
|
|
113
|
+
rule_id: string;
|
|
114
|
+
severity: "critical" | "high" | "informational" | "low" | "medium";
|
|
115
|
+
summary: string;
|
|
116
|
+
title: string;
|
|
117
|
+
validation?: "partial" | "unvalidated" | "validated" | undefined;
|
|
118
|
+
}[];
|
|
61
119
|
report: string;
|
|
62
|
-
}
|
|
120
|
+
}>;
|
|
63
121
|
export type SecurityPublishParams = typeof securityPublishSchema.infer;
|
|
64
122
|
export interface SecurityPublishDetails {
|
|
65
123
|
scanId: string;
|
|
@@ -357,7 +357,7 @@ export interface FreshSessionResult {
|
|
|
357
357
|
sessionId: string;
|
|
358
358
|
closedProviderSessions: number;
|
|
359
359
|
}
|
|
360
|
-
/** Outcome of an in-place `/
|
|
360
|
+
/** Outcome of an in-place `/clear` conversation-context reset. */
|
|
361
361
|
export interface ResetSessionContextResult {
|
|
362
362
|
/** Number of live messages dropped from the model's context. */
|
|
363
363
|
droppedCount: number;
|
|
@@ -105,7 +105,7 @@ export interface BranchSummaryEntry<T = unknown> extends SessionEntryBase {
|
|
|
105
105
|
fromExtension?: boolean;
|
|
106
106
|
}
|
|
107
107
|
/**
|
|
108
|
-
* Pure marker entry recorded by `/
|
|
108
|
+
* Pure marker entry recorded by `/clear` (resetSessionContext). It carries no
|
|
109
109
|
* payload — its presence on the branch is a durable boundary the collapsed
|
|
110
110
|
* live transcript and the model-context rebuild start emission after, so a
|
|
111
111
|
* rebuild (theme change, focus attach, /shake, resume) does not resurrect the
|
|
@@ -234,7 +234,7 @@ export declare class SessionManager {
|
|
|
234
234
|
}): string;
|
|
235
235
|
appendCompaction<T = unknown>(summary: string, shortSummary: string | undefined, firstKeptEntryId: string, tokensBefore: number, details?: T, fromExtension?: boolean, preserveData?: Record<string, unknown>): string;
|
|
236
236
|
/**
|
|
237
|
-
* Append the durable conversation boundary recorded by `/
|
|
237
|
+
* Append the durable conversation boundary recorded by `/clear`. The
|
|
238
238
|
* collapsed live transcript and the model-context rebuild start after the
|
|
239
239
|
* latest one, while the full history stays on disk (the plain
|
|
240
240
|
* `transcript:true` export walks it unchanged).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { type BaseType } from "@oh-my-pi/omptype";
|
|
1
2
|
import type { Usage } from "@oh-my-pi/pi-ai";
|
|
2
|
-
import { type BaseType } from "arktype";
|
|
3
3
|
import type { AgentSessionEvent } from "../session/agent-session.js";
|
|
4
4
|
import type { ConfiguredThinkingLevel, TaskEffort } from "../thinking.js";
|
|
5
5
|
import type { NestedRepoPatch } from "./worktree.js";
|
|
@@ -79,13 +79,19 @@ export interface SubagentLifecyclePayload {
|
|
|
79
79
|
}
|
|
80
80
|
/** Display cap for a normalized one-line label (roster line, registry `displayName`, prompt field). */
|
|
81
81
|
export declare const LABEL_MAX = 80;
|
|
82
|
-
export declare const taskItemSchema: import("
|
|
82
|
+
export declare const taskItemSchema: import("@oh-my-pi/omptype").FluentType<{
|
|
83
|
+
agent: string;
|
|
83
84
|
name?: string | undefined;
|
|
84
|
-
|
|
85
|
+
outputSchema?: string | boolean | object | null | undefined;
|
|
86
|
+
schemaMode?: "permissive" | "strict" | undefined;
|
|
85
87
|
task: string;
|
|
88
|
+
}, {
|
|
89
|
+
agent?: string | undefined;
|
|
90
|
+
name?: string | undefined;
|
|
86
91
|
outputSchema?: string | boolean | object | null | undefined;
|
|
87
92
|
schemaMode?: "permissive" | "strict" | undefined;
|
|
88
|
-
|
|
93
|
+
task: string;
|
|
94
|
+
}>;
|
|
89
95
|
/** Single task item. Fields are optional defensively: args stream in token by token. */
|
|
90
96
|
export interface TaskItem {
|
|
91
97
|
/** Stable agent name; becomes the registry/IRC id. Default = generated AdjectiveNoun. */
|
|
@@ -103,47 +109,86 @@ export interface TaskItem {
|
|
|
103
109
|
/** Run this spawn in an isolated worktree (batch form; flat form carries it top-level). */
|
|
104
110
|
isolated?: boolean;
|
|
105
111
|
}
|
|
106
|
-
export declare const taskSchema: import("
|
|
112
|
+
export declare const taskSchema: import("@oh-my-pi/omptype").FluentType<{
|
|
113
|
+
agent: string;
|
|
114
|
+
isolated?: boolean | undefined;
|
|
107
115
|
name?: string | undefined;
|
|
108
|
-
agent: import("arktype/internal/attributes.ts").Default<string, "task">;
|
|
109
|
-
task: string;
|
|
110
116
|
outputSchema?: string | boolean | object | null | undefined;
|
|
111
117
|
schemaMode?: "permissive" | "strict" | undefined;
|
|
118
|
+
task: string;
|
|
119
|
+
}, {
|
|
120
|
+
agent?: string | undefined;
|
|
112
121
|
isolated?: boolean | undefined;
|
|
113
|
-
}, {}>;
|
|
114
|
-
declare const ALL_TASK_SCHEMAS: readonly [import("arktype/internal/variants/object.ts").ObjectType<{
|
|
115
122
|
name?: string | undefined;
|
|
116
|
-
|
|
123
|
+
outputSchema?: string | boolean | object | null | undefined;
|
|
124
|
+
schemaMode?: "permissive" | "strict" | undefined;
|
|
117
125
|
task: string;
|
|
126
|
+
}>;
|
|
127
|
+
declare const ALL_TASK_SCHEMAS: readonly [import("@oh-my-pi/omptype").FluentType<{
|
|
128
|
+
agent: string;
|
|
129
|
+
isolated?: boolean | undefined;
|
|
130
|
+
name?: string | undefined;
|
|
118
131
|
outputSchema?: string | boolean | object | null | undefined;
|
|
119
132
|
schemaMode?: "permissive" | "strict" | undefined;
|
|
133
|
+
task: string;
|
|
134
|
+
}, {
|
|
135
|
+
agent?: string | undefined;
|
|
120
136
|
isolated?: boolean | undefined;
|
|
121
|
-
}, {}>, import("arktype/internal/variants/object.ts").ObjectType<{
|
|
122
137
|
name?: string | undefined;
|
|
123
|
-
|
|
138
|
+
outputSchema?: string | boolean | object | null | undefined;
|
|
139
|
+
schemaMode?: "permissive" | "strict" | undefined;
|
|
124
140
|
task: string;
|
|
141
|
+
}>, import("@oh-my-pi/omptype").FluentType<{
|
|
142
|
+
agent: string;
|
|
143
|
+
name?: string | undefined;
|
|
125
144
|
outputSchema?: string | boolean | object | null | undefined;
|
|
126
145
|
schemaMode?: "permissive" | "strict" | undefined;
|
|
127
|
-
|
|
146
|
+
task: string;
|
|
147
|
+
}, {
|
|
148
|
+
agent?: string | undefined;
|
|
149
|
+
name?: string | undefined;
|
|
150
|
+
outputSchema?: string | boolean | object | null | undefined;
|
|
151
|
+
schemaMode?: "permissive" | "strict" | undefined;
|
|
152
|
+
task: string;
|
|
153
|
+
}>, import("@oh-my-pi/omptype").FluentType<{
|
|
128
154
|
context: string;
|
|
129
155
|
tasks: {
|
|
156
|
+
agent: string;
|
|
157
|
+
isolated?: boolean | undefined;
|
|
130
158
|
name?: string | undefined;
|
|
131
|
-
agent: import("arktype/internal/attributes.ts").Default<string, "task">;
|
|
132
|
-
task: string;
|
|
133
159
|
outputSchema?: string | boolean | object | null | undefined;
|
|
134
160
|
schemaMode?: "permissive" | "strict" | undefined;
|
|
161
|
+
task: string;
|
|
162
|
+
}[];
|
|
163
|
+
}, {
|
|
164
|
+
context: string;
|
|
165
|
+
tasks: {
|
|
166
|
+
agent?: string | undefined;
|
|
135
167
|
isolated?: boolean | undefined;
|
|
168
|
+
name?: string | undefined;
|
|
169
|
+
outputSchema?: string | boolean | object | null | undefined;
|
|
170
|
+
schemaMode?: "permissive" | "strict" | undefined;
|
|
171
|
+
task: string;
|
|
136
172
|
}[];
|
|
137
|
-
}
|
|
173
|
+
}>, import("@oh-my-pi/omptype").FluentType<{
|
|
138
174
|
context: string;
|
|
139
175
|
tasks: {
|
|
176
|
+
agent: string;
|
|
140
177
|
name?: string | undefined;
|
|
141
|
-
|
|
178
|
+
outputSchema?: string | boolean | object | null | undefined;
|
|
179
|
+
schemaMode?: "permissive" | "strict" | undefined;
|
|
142
180
|
task: string;
|
|
181
|
+
}[];
|
|
182
|
+
}, {
|
|
183
|
+
context: string;
|
|
184
|
+
tasks: {
|
|
185
|
+
agent?: string | undefined;
|
|
186
|
+
name?: string | undefined;
|
|
143
187
|
outputSchema?: string | boolean | object | null | undefined;
|
|
144
188
|
schemaMode?: "permissive" | "strict" | undefined;
|
|
189
|
+
task: string;
|
|
145
190
|
}[];
|
|
146
|
-
}
|
|
191
|
+
}>];
|
|
147
192
|
type DynamicTaskSchema = (typeof ALL_TASK_SCHEMAS)[number];
|
|
148
193
|
export type TaskSchema = typeof taskSchema;
|
|
149
194
|
/** Active task tool parameter schema for the current isolation / batch flags */
|
|
@@ -20,20 +20,33 @@ import { type Component } from "@oh-my-pi/pi-tui";
|
|
|
20
20
|
import type { RenderResultOptions } from "../extensibility/custom-tools/types.js";
|
|
21
21
|
import { type Theme } from "../modes/theme/theme.js";
|
|
22
22
|
import type { ToolSession } from "./index.js";
|
|
23
|
-
declare const askSchema: import("
|
|
23
|
+
declare const askSchema: import("@oh-my-pi/omptype").FluentType<{
|
|
24
24
|
questions: {
|
|
25
|
+
header?: string | undefined;
|
|
25
26
|
id: string;
|
|
27
|
+
multi?: boolean | undefined;
|
|
28
|
+
options: {
|
|
29
|
+
description?: string | undefined;
|
|
30
|
+
label: string;
|
|
31
|
+
preview?: string | undefined;
|
|
32
|
+
}[];
|
|
26
33
|
question: string;
|
|
34
|
+
recommended?: number | undefined;
|
|
35
|
+
}[];
|
|
36
|
+
}, {
|
|
37
|
+
questions: {
|
|
27
38
|
header?: string | undefined;
|
|
39
|
+
id: string;
|
|
40
|
+
multi?: boolean | undefined;
|
|
28
41
|
options: {
|
|
29
|
-
label: string;
|
|
30
42
|
description?: string | undefined;
|
|
43
|
+
label: string;
|
|
31
44
|
preview?: string | undefined;
|
|
32
45
|
}[];
|
|
33
|
-
|
|
46
|
+
question: string;
|
|
34
47
|
recommended?: number | undefined;
|
|
35
48
|
}[];
|
|
36
|
-
}
|
|
49
|
+
}>;
|
|
37
50
|
export type AskToolInput = typeof askSchema.infer;
|
|
38
51
|
/**
|
|
39
52
|
* Recover a validated `questions` payload from a persisted `ask` toolCall's
|
|
@@ -90,20 +103,33 @@ export declare class AskTool implements AgentTool<typeof askSchema, AskToolDetai
|
|
|
90
103
|
readonly label = "Ask";
|
|
91
104
|
readonly summary = "Ask the user a clarifying question";
|
|
92
105
|
readonly description: string;
|
|
93
|
-
readonly parameters: import("
|
|
106
|
+
readonly parameters: import("@oh-my-pi/omptype").FluentType<{
|
|
94
107
|
questions: {
|
|
108
|
+
header?: string | undefined;
|
|
95
109
|
id: string;
|
|
110
|
+
multi?: boolean | undefined;
|
|
111
|
+
options: {
|
|
112
|
+
description?: string | undefined;
|
|
113
|
+
label: string;
|
|
114
|
+
preview?: string | undefined;
|
|
115
|
+
}[];
|
|
96
116
|
question: string;
|
|
117
|
+
recommended?: number | undefined;
|
|
118
|
+
}[];
|
|
119
|
+
}, {
|
|
120
|
+
questions: {
|
|
97
121
|
header?: string | undefined;
|
|
122
|
+
id: string;
|
|
123
|
+
multi?: boolean | undefined;
|
|
98
124
|
options: {
|
|
99
|
-
label: string;
|
|
100
125
|
description?: string | undefined;
|
|
126
|
+
label: string;
|
|
101
127
|
preview?: string | undefined;
|
|
102
128
|
}[];
|
|
103
|
-
|
|
129
|
+
question: string;
|
|
104
130
|
recommended?: number | undefined;
|
|
105
131
|
}[];
|
|
106
|
-
}
|
|
132
|
+
}>;
|
|
107
133
|
readonly strict = true;
|
|
108
134
|
readonly examples: readonly ToolExample<typeof askSchema.infer>[];
|
|
109
135
|
readonly concurrency = "exclusive";
|
|
@@ -5,13 +5,19 @@ import type { RenderResultOptions } from "../extensibility/custom-tools/types.js
|
|
|
5
5
|
import type { Theme } from "../modes/theme/theme.js";
|
|
6
6
|
import type { ToolSession } from "./index.js";
|
|
7
7
|
import type { OutputMeta } from "./output-meta.js";
|
|
8
|
-
declare const astEditSchema: import("
|
|
8
|
+
declare const astEditSchema: import("@oh-my-pi/omptype").FluentType<{
|
|
9
9
|
ops: {
|
|
10
|
+
out: string;
|
|
10
11
|
pat: string;
|
|
12
|
+
}[];
|
|
13
|
+
paths: string[];
|
|
14
|
+
}, {
|
|
15
|
+
ops: {
|
|
11
16
|
out: string;
|
|
17
|
+
pat: string;
|
|
12
18
|
}[];
|
|
13
19
|
paths: string[];
|
|
14
|
-
}
|
|
20
|
+
}>;
|
|
15
21
|
export interface AstEditToolDetails {
|
|
16
22
|
totalReplacements: number;
|
|
17
23
|
filesTouched: number;
|
|
@@ -47,13 +53,19 @@ export declare class AstEditTool implements AgentTool<typeof astEditSchema, AstE
|
|
|
47
53
|
readonly label = "AST Edit";
|
|
48
54
|
readonly summary = "Perform AST-aware code edits (structural refactoring)";
|
|
49
55
|
readonly description: string;
|
|
50
|
-
readonly parameters: import("
|
|
56
|
+
readonly parameters: import("@oh-my-pi/omptype").FluentType<{
|
|
51
57
|
ops: {
|
|
58
|
+
out: string;
|
|
52
59
|
pat: string;
|
|
60
|
+
}[];
|
|
61
|
+
paths: string[];
|
|
62
|
+
}, {
|
|
63
|
+
ops: {
|
|
53
64
|
out: string;
|
|
65
|
+
pat: string;
|
|
54
66
|
}[];
|
|
55
67
|
paths: string[];
|
|
56
|
-
}
|
|
68
|
+
}>;
|
|
57
69
|
readonly strict = true;
|
|
58
70
|
readonly examples: readonly ToolExample<AstEditSchemaInfer>[];
|
|
59
71
|
readonly deferrable = true;
|
|
@@ -5,11 +5,15 @@ import type { RenderResultOptions } from "../extensibility/custom-tools/types.js
|
|
|
5
5
|
import type { Theme } from "../modes/theme/theme.js";
|
|
6
6
|
import type { ToolSession } from "./index.js";
|
|
7
7
|
import type { OutputMeta } from "./output-meta.js";
|
|
8
|
-
declare const astGrepSchema: import("
|
|
8
|
+
declare const astGrepSchema: import("@oh-my-pi/omptype").FluentType<{
|
|
9
9
|
pat: string;
|
|
10
10
|
path?: string | undefined;
|
|
11
11
|
skip?: number | undefined;
|
|
12
|
-
}, {
|
|
12
|
+
}, {
|
|
13
|
+
pat: string;
|
|
14
|
+
path?: string | undefined;
|
|
15
|
+
skip?: number | undefined;
|
|
16
|
+
}>;
|
|
13
17
|
export interface AstGrepToolDetails {
|
|
14
18
|
matchCount: number;
|
|
15
19
|
fileCount: number;
|
|
@@ -42,11 +46,15 @@ export declare class AstGrepTool implements AgentTool<typeof astGrepSchema, AstG
|
|
|
42
46
|
readonly label = "AST Grep";
|
|
43
47
|
readonly summary = "Search code with AST patterns (structural grep)";
|
|
44
48
|
get description(): string;
|
|
45
|
-
readonly parameters: import("
|
|
49
|
+
readonly parameters: import("@oh-my-pi/omptype").FluentType<{
|
|
46
50
|
pat: string;
|
|
47
51
|
path?: string | undefined;
|
|
48
52
|
skip?: number | undefined;
|
|
49
|
-
}, {
|
|
53
|
+
}, {
|
|
54
|
+
pat: string;
|
|
55
|
+
path?: string | undefined;
|
|
56
|
+
skip?: number | undefined;
|
|
57
|
+
}>;
|
|
50
58
|
readonly strict = true;
|
|
51
59
|
readonly examples: readonly ToolExample<typeof astGrepSchema.inferIn>[];
|
|
52
60
|
readonly loadMode = "discoverable";
|
|
@@ -41,25 +41,34 @@ export declare function wrapShellLineForClientTerminal(line: string, shellConfig
|
|
|
41
41
|
* New patterns should target shapes that are virtually never legitimate in automation.
|
|
42
42
|
*/
|
|
43
43
|
export declare const CRITICAL_BASH_PATTERNS: readonly [RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp];
|
|
44
|
-
declare const bashSchemaBase: import("
|
|
44
|
+
declare const bashSchemaBase: import("@oh-my-pi/omptype").FluentType<{
|
|
45
45
|
command: string;
|
|
46
|
-
env?: {
|
|
47
|
-
[x: string]: string;
|
|
48
|
-
} | undefined;
|
|
49
|
-
timeout?: number | undefined;
|
|
50
46
|
cwd?: string | undefined;
|
|
47
|
+
env?: Record<string, string> | undefined;
|
|
51
48
|
pty?: boolean | undefined;
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
timeout?: number | undefined;
|
|
50
|
+
}, {
|
|
54
51
|
command: string;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
cwd?: string | undefined;
|
|
53
|
+
env?: Record<string, string> | undefined;
|
|
54
|
+
pty?: boolean | undefined;
|
|
58
55
|
timeout?: number | undefined;
|
|
56
|
+
}>;
|
|
57
|
+
declare const bashSchemaWithAsync: import("@oh-my-pi/omptype").FluentType<{
|
|
58
|
+
async?: boolean | undefined;
|
|
59
|
+
command: string;
|
|
59
60
|
cwd?: string | undefined;
|
|
61
|
+
env?: Record<string, string> | undefined;
|
|
60
62
|
pty?: boolean | undefined;
|
|
63
|
+
timeout?: number | undefined;
|
|
64
|
+
}, {
|
|
61
65
|
async?: boolean | undefined;
|
|
62
|
-
|
|
66
|
+
command: string;
|
|
67
|
+
cwd?: string | undefined;
|
|
68
|
+
env?: Record<string, string> | undefined;
|
|
69
|
+
pty?: boolean | undefined;
|
|
70
|
+
timeout?: number | undefined;
|
|
71
|
+
}>;
|
|
63
72
|
type BashToolSchema = typeof bashSchemaBase | typeof bashSchemaWithAsync;
|
|
64
73
|
export interface BashToolInput {
|
|
65
74
|
command: string;
|
|
@@ -10,29 +10,51 @@ export { CmuxSocketClient } from "./browser/cmux/socket-client.js";
|
|
|
10
10
|
export { extractReadableFromHtml, type ReadableFormat, type ReadableResult } from "./browser/readable.js";
|
|
11
11
|
export { DEFAULT_RELAY_URL, type RelayKind, resolveRelayKind } from "./browser/relay/kind.js";
|
|
12
12
|
export type { Observation, ObservationEntry } from "./browser/tab-protocol.js";
|
|
13
|
-
declare const browserSchema: import("
|
|
13
|
+
declare const browserSchema: import("@oh-my-pi/omptype").FluentType<{
|
|
14
14
|
action: "close" | "open" | "run";
|
|
15
|
-
|
|
16
|
-
url?: string | undefined;
|
|
15
|
+
all?: boolean | undefined;
|
|
17
16
|
app?: {
|
|
18
|
-
|
|
17
|
+
args?: string[] | undefined;
|
|
19
18
|
cdp_url?: string | undefined;
|
|
19
|
+
path?: string | undefined;
|
|
20
20
|
relay?: boolean | undefined;
|
|
21
|
-
args?: string[] | undefined;
|
|
22
21
|
target?: string | undefined;
|
|
23
22
|
} | undefined;
|
|
23
|
+
code?: string | undefined;
|
|
24
|
+
dialogs?: "accept" | "dismiss" | undefined;
|
|
25
|
+
kill?: boolean | undefined;
|
|
26
|
+
name?: string | undefined;
|
|
27
|
+
timeout?: number | undefined;
|
|
28
|
+
url?: string | undefined;
|
|
24
29
|
viewport?: {
|
|
25
|
-
width: number;
|
|
26
30
|
height: number;
|
|
27
31
|
scale?: number | undefined;
|
|
32
|
+
width: number;
|
|
28
33
|
} | undefined;
|
|
29
34
|
wait_until?: "domcontentloaded" | "load" | "networkidle0" | "networkidle2" | undefined;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
timeout?: number | undefined;
|
|
35
|
+
}, {
|
|
36
|
+
action: "close" | "open" | "run";
|
|
33
37
|
all?: boolean | undefined;
|
|
38
|
+
app?: {
|
|
39
|
+
args?: string[] | undefined;
|
|
40
|
+
cdp_url?: string | undefined;
|
|
41
|
+
path?: string | undefined;
|
|
42
|
+
relay?: boolean | undefined;
|
|
43
|
+
target?: string | undefined;
|
|
44
|
+
} | undefined;
|
|
45
|
+
code?: string | undefined;
|
|
46
|
+
dialogs?: "accept" | "dismiss" | undefined;
|
|
34
47
|
kill?: boolean | undefined;
|
|
35
|
-
|
|
48
|
+
name?: string | undefined;
|
|
49
|
+
timeout?: number | undefined;
|
|
50
|
+
url?: string | undefined;
|
|
51
|
+
viewport?: {
|
|
52
|
+
height: number;
|
|
53
|
+
scale?: number | undefined;
|
|
54
|
+
width: number;
|
|
55
|
+
} | undefined;
|
|
56
|
+
wait_until?: "domcontentloaded" | "load" | "networkidle0" | "networkidle2" | undefined;
|
|
57
|
+
}>;
|
|
36
58
|
/** Input schema for the browser tool. */
|
|
37
59
|
export type BrowserParams = typeof browserSchema.infer;
|
|
38
60
|
/** Details describing a browser tool execution result (for renderers + transcript). */
|
|
@@ -66,29 +88,51 @@ export declare class BrowserTool implements AgentTool<typeof browserSchema, Brow
|
|
|
66
88
|
readonly label = "Browser";
|
|
67
89
|
readonly loadMode = "discoverable";
|
|
68
90
|
readonly summary = "Control a headless browser to navigate and interact with web pages";
|
|
69
|
-
readonly parameters: import("
|
|
91
|
+
readonly parameters: import("@oh-my-pi/omptype").FluentType<{
|
|
70
92
|
action: "close" | "open" | "run";
|
|
71
|
-
|
|
72
|
-
url?: string | undefined;
|
|
93
|
+
all?: boolean | undefined;
|
|
73
94
|
app?: {
|
|
74
|
-
|
|
95
|
+
args?: string[] | undefined;
|
|
75
96
|
cdp_url?: string | undefined;
|
|
97
|
+
path?: string | undefined;
|
|
76
98
|
relay?: boolean | undefined;
|
|
77
|
-
args?: string[] | undefined;
|
|
78
99
|
target?: string | undefined;
|
|
79
100
|
} | undefined;
|
|
101
|
+
code?: string | undefined;
|
|
102
|
+
dialogs?: "accept" | "dismiss" | undefined;
|
|
103
|
+
kill?: boolean | undefined;
|
|
104
|
+
name?: string | undefined;
|
|
105
|
+
timeout?: number | undefined;
|
|
106
|
+
url?: string | undefined;
|
|
80
107
|
viewport?: {
|
|
81
|
-
width: number;
|
|
82
108
|
height: number;
|
|
83
109
|
scale?: number | undefined;
|
|
110
|
+
width: number;
|
|
84
111
|
} | undefined;
|
|
85
112
|
wait_until?: "domcontentloaded" | "load" | "networkidle0" | "networkidle2" | undefined;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
timeout?: number | undefined;
|
|
113
|
+
}, {
|
|
114
|
+
action: "close" | "open" | "run";
|
|
89
115
|
all?: boolean | undefined;
|
|
116
|
+
app?: {
|
|
117
|
+
args?: string[] | undefined;
|
|
118
|
+
cdp_url?: string | undefined;
|
|
119
|
+
path?: string | undefined;
|
|
120
|
+
relay?: boolean | undefined;
|
|
121
|
+
target?: string | undefined;
|
|
122
|
+
} | undefined;
|
|
123
|
+
code?: string | undefined;
|
|
124
|
+
dialogs?: "accept" | "dismiss" | undefined;
|
|
90
125
|
kill?: boolean | undefined;
|
|
91
|
-
|
|
126
|
+
name?: string | undefined;
|
|
127
|
+
timeout?: number | undefined;
|
|
128
|
+
url?: string | undefined;
|
|
129
|
+
viewport?: {
|
|
130
|
+
height: number;
|
|
131
|
+
scale?: number | undefined;
|
|
132
|
+
width: number;
|
|
133
|
+
} | undefined;
|
|
134
|
+
wait_until?: "domcontentloaded" | "load" | "networkidle0" | "networkidle2" | undefined;
|
|
135
|
+
}>;
|
|
92
136
|
readonly strict = true;
|
|
93
137
|
readonly examples: readonly ToolExample<typeof browserSchema.infer>[];
|
|
94
138
|
constructor(session: ToolSession);
|