@oh-my-pi/pi-coding-agent 15.1.2 → 15.1.3
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 +42 -0
- package/dist/types/cli/auth-broker-cli.d.ts +25 -0
- package/dist/types/cli/auth-gateway-cli.d.ts +18 -0
- package/dist/types/cli/grievances-cli.d.ts +12 -0
- package/dist/types/commands/auth-broker.d.ts +54 -0
- package/dist/types/commands/auth-gateway.d.ts +32 -0
- package/dist/types/commands/grievances.d.ts +1 -1
- package/dist/types/commit/agentic/tools/propose-commit.d.ts +9 -1
- package/dist/types/commit/agentic/tools/schemas.d.ts +9 -1
- package/dist/types/commit/agentic/tools/split-commit.d.ts +9 -1
- package/dist/types/config/model-registry.d.ts +3 -0
- package/dist/types/config/models-config-schema.d.ts +1 -0
- package/dist/types/config/settings-schema.d.ts +46 -0
- package/dist/types/discovery/agents.d.ts +12 -1
- package/dist/types/edit/renderer.d.ts +3 -0
- package/dist/types/eval/index.d.ts +0 -2
- package/dist/types/goals/tools/goal-tool.d.ts +10 -2
- package/dist/types/index.d.ts +0 -1
- package/dist/types/internal-urls/index.d.ts +1 -1
- package/dist/types/internal-urls/{pi-protocol.d.ts → omp-protocol.d.ts} +3 -3
- package/dist/types/internal-urls/types.d.ts +1 -1
- package/dist/types/modes/acp/acp-agent.d.ts +1 -0
- package/dist/types/modes/emoji-autocomplete.d.ts +16 -0
- package/dist/types/modes/interactive-mode.d.ts +1 -1
- package/dist/types/modes/prompt-action-autocomplete.d.ts +4 -0
- package/dist/types/plan-mode/approved-plan.d.ts +4 -0
- package/dist/types/sdk.d.ts +10 -3
- package/dist/types/session/agent-session.d.ts +1 -1
- package/dist/types/session/auth-broker-config.d.ts +13 -0
- package/dist/types/session/auth-storage.d.ts +1 -1
- package/dist/types/tools/eval.d.ts +41 -7
- package/dist/types/tools/irc.d.ts +8 -2
- package/dist/types/tools/report-tool-issue.d.ts +118 -1
- package/dist/types/tools/resolve.d.ts +8 -2
- package/examples/custom-tools/README.md +3 -12
- package/examples/extensions/README.md +2 -15
- package/examples/extensions/api-demo.ts +1 -7
- package/package.json +7 -7
- package/src/autoresearch/tools/init-experiment.ts +11 -33
- package/src/autoresearch/tools/log-experiment.ts +10 -24
- package/src/autoresearch/tools/run-experiment.ts +1 -1
- package/src/autoresearch/tools/update-notes.ts +2 -9
- package/src/cli/auth-broker-cli.ts +746 -0
- package/src/cli/auth-gateway-cli.ts +342 -0
- package/src/cli/grievances-cli.ts +109 -16
- package/src/cli.ts +4 -2
- package/src/commands/auth-broker.ts +96 -0
- package/src/commands/auth-gateway.ts +61 -0
- package/src/commands/grievances.ts +13 -8
- package/src/commands/launch.ts +1 -1
- package/src/commit/agentic/agent.ts +2 -0
- package/src/commit/agentic/tools/analyze-file.ts +2 -2
- package/src/commit/agentic/tools/git-file-diff.ts +2 -2
- package/src/commit/agentic/tools/git-hunk.ts +3 -3
- package/src/commit/agentic/tools/git-overview.ts +2 -2
- package/src/commit/agentic/tools/propose-changelog.ts +1 -3
- package/src/commit/agentic/tools/recent-commits.ts +1 -1
- package/src/commit/agentic/tools/schemas.ts +1 -9
- package/src/config/model-equivalence.ts +279 -174
- package/src/config/model-registry.ts +37 -6
- package/src/config/model-resolver.ts +13 -8
- package/src/config/models-config-schema.ts +8 -0
- package/src/config/settings-schema.ts +52 -0
- package/src/cursor.ts +1 -1
- package/src/debug/log-formatting.ts +1 -1
- package/src/debug/log-viewer.ts +1 -1
- package/src/debug/profiler.ts +4 -0
- package/src/debug/raw-sse-buffer.ts +100 -59
- package/src/debug/raw-sse.ts +1 -1
- package/src/discovery/agents.ts +15 -4
- package/src/edit/modes/apply-patch.ts +1 -5
- package/src/edit/modes/patch.ts +5 -5
- package/src/edit/modes/replace.ts +5 -5
- package/src/edit/renderer.ts +2 -1
- package/src/edit/streaming.ts +1 -1
- package/src/eval/index.ts +0 -2
- package/src/eval/js/shared/runtime.ts +25 -0
- package/src/eval/py/kernel.ts +1 -1
- package/src/exa/researcher.ts +4 -4
- package/src/exa/search.ts +10 -22
- package/src/exa/websets.ts +33 -33
- package/src/goals/tools/goal-tool.ts +3 -3
- package/src/index.ts +0 -3
- package/src/internal-urls/docs-index.generated.ts +21 -18
- package/src/internal-urls/index.ts +1 -1
- package/src/internal-urls/{pi-protocol.ts → omp-protocol.ts} +10 -10
- package/src/internal-urls/router.ts +3 -3
- package/src/internal-urls/types.ts +1 -1
- package/src/lsp/types.ts +8 -11
- package/src/main.ts +3 -0
- package/src/mcp/tool-bridge.ts +3 -3
- package/src/modes/acp/acp-agent.ts +88 -25
- package/src/modes/components/bash-execution.ts +1 -1
- package/src/modes/components/diff.ts +1 -2
- package/src/modes/components/eval-execution.ts +1 -1
- package/src/modes/components/oauth-selector.ts +38 -2
- package/src/modes/components/tool-execution.ts +1 -2
- package/src/modes/controllers/command-controller.ts +95 -34
- package/src/modes/controllers/input-controller.ts +4 -3
- package/src/modes/data/emojis.json +1 -0
- package/src/modes/emoji-autocomplete.ts +285 -0
- package/src/modes/interactive-mode.ts +92 -19
- package/src/modes/print-mode.ts +3 -3
- package/src/modes/prompt-action-autocomplete.ts +14 -0
- package/src/plan-mode/approved-plan.ts +9 -0
- package/src/prompts/system/system-prompt.md +1 -1
- package/src/prompts/system/ttsr-tool-reminder.md +5 -0
- package/src/prompts/tools/eval.md +25 -26
- package/src/prompts/tools/read.md +1 -1
- package/src/prompts/tools/resolve.md +1 -1
- package/src/prompts/tools/search.md +1 -1
- package/src/prompts/tools/web-search.md +1 -1
- package/src/sdk.ts +78 -7
- package/src/session/agent-session.ts +176 -77
- package/src/session/agent-storage.ts +7 -2
- package/src/session/auth-broker-config.ts +102 -0
- package/src/session/auth-storage.ts +7 -1
- package/src/session/streaming-output.ts +1 -1
- package/src/task/types.ts +10 -35
- package/src/tools/bash-interactive.ts +4 -1
- package/src/tools/bash-pty-selection.ts +2 -2
- package/src/tools/browser.ts +12 -20
- package/src/tools/eval.ts +77 -100
- package/src/tools/gh.ts +21 -45
- package/src/tools/hindsight-recall.ts +1 -1
- package/src/tools/hindsight-reflect.ts +2 -2
- package/src/tools/hindsight-retain.ts +3 -7
- package/src/tools/index.ts +8 -1
- package/src/tools/inspect-image.ts +4 -1
- package/src/tools/irc.ts +4 -12
- package/src/tools/job.ts +3 -11
- package/src/tools/report-tool-issue.ts +462 -17
- package/src/tools/resolve.ts +2 -7
- package/src/tools/todo-write.ts +8 -15
- package/src/utils/title-generator.ts +3 -0
- package/src/web/search/index.ts +6 -6
- package/dist/types/eval/parse.d.ts +0 -28
- package/dist/types/eval/sniff.d.ts +0 -11
- package/src/eval/eval.lark +0 -36
- package/src/eval/parse.ts +0 -407
- package/src/eval/sniff.ts +0 -28
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* View and
|
|
2
|
+
* View, clean, and push reported tool issues from automated QA.
|
|
3
3
|
*/
|
|
4
4
|
import { Args, Command, Flags } from "@oh-my-pi/pi-utils/cli";
|
|
5
|
-
import { cleanGrievances, listGrievances } from "../cli/grievances-cli";
|
|
5
|
+
import { cleanGrievances, listGrievances, pushGrievances } from "../cli/grievances-cli";
|
|
6
6
|
|
|
7
7
|
export default class Grievances extends Command {
|
|
8
|
-
static description = "View or
|
|
8
|
+
static description = "View, clean, or push reported tool issues (auto-QA grievances)";
|
|
9
9
|
|
|
10
10
|
static args = {
|
|
11
|
-
// Positional action: "list" (default) or "
|
|
12
|
-
// the historical `omp grievances` invocation working unchanged
|
|
13
|
-
// reusing the same command surface for the
|
|
11
|
+
// Positional action: "list" (default), "clean", or "push". A positional
|
|
12
|
+
// arg keeps the historical `omp grievances` invocation working unchanged
|
|
13
|
+
// while reusing the same command surface for the clean/push verbs.
|
|
14
14
|
action: Args.string({
|
|
15
|
-
description: "list (default) or
|
|
15
|
+
description: "list (default), clean, or push",
|
|
16
16
|
required: false,
|
|
17
|
-
options: ["list", "clean"],
|
|
17
|
+
options: ["list", "clean", "push"],
|
|
18
18
|
default: "list",
|
|
19
19
|
}),
|
|
20
20
|
};
|
|
@@ -33,6 +33,7 @@ export default class Grievances extends Command {
|
|
|
33
33
|
"omp grievances clean --id 209",
|
|
34
34
|
"omp grievances clean --tool find",
|
|
35
35
|
"omp grievances clean --all",
|
|
36
|
+
"omp grievances push",
|
|
36
37
|
];
|
|
37
38
|
|
|
38
39
|
async run(): Promise<void> {
|
|
@@ -41,6 +42,10 @@ export default class Grievances extends Command {
|
|
|
41
42
|
await cleanGrievances({ id: flags.id, tool: flags.tool, all: flags.all, json: flags.json });
|
|
42
43
|
return;
|
|
43
44
|
}
|
|
45
|
+
if (args.action === "push") {
|
|
46
|
+
await pushGrievances({ json: flags.json });
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
44
49
|
await listGrievances({ limit: flags.limit, tool: flags.tool, json: flags.json });
|
|
45
50
|
}
|
|
46
51
|
}
|
package/src/commands/launch.ts
CHANGED
|
@@ -23,7 +23,7 @@ export default class Index extends Command {
|
|
|
23
23
|
|
|
24
24
|
static flags = {
|
|
25
25
|
model: Flags.string({
|
|
26
|
-
description: 'Model to use (fuzzy match: "opus", "gpt-5.2", or "
|
|
26
|
+
description: 'Model to use (fuzzy match: "opus", "gpt-5.2", or "openai/gpt-5.2")',
|
|
27
27
|
}),
|
|
28
28
|
smol: Flags.string({
|
|
29
29
|
description: "Smol/fast model for lightweight tasks (or PI_SMOL_MODEL env)",
|
|
@@ -79,12 +79,14 @@ export async function runCommitAgentSession(input: CommitAgentInput): Promise<Co
|
|
|
79
79
|
let thinkingLineActive = false;
|
|
80
80
|
const toolArgsById = new Map<string, { name: string; args?: Record<string, unknown> }>();
|
|
81
81
|
const writeThinkingLine = (text: string) => {
|
|
82
|
+
if (!process.stdout.isTTY) return;
|
|
82
83
|
const line = chalk.dim(`… ${text}`);
|
|
83
84
|
process.stdout.write(`\r\x1b[2K${line}`);
|
|
84
85
|
thinkingLineActive = true;
|
|
85
86
|
};
|
|
86
87
|
const clearThinkingLine = () => {
|
|
87
88
|
if (!thinkingLineActive) return;
|
|
89
|
+
if (!process.stdout.isTTY) return;
|
|
88
90
|
process.stdout.write("\r\x1b[2K");
|
|
89
91
|
thinkingLineActive = false;
|
|
90
92
|
};
|
|
@@ -13,8 +13,8 @@ import type { ToolSession } from "../../../tools";
|
|
|
13
13
|
import { getFilePriority } from "./git-file-diff";
|
|
14
14
|
|
|
15
15
|
const analyzeFileSchema = z.object({
|
|
16
|
-
files: z.array(z.string().describe("
|
|
17
|
-
goal: z.string().describe("
|
|
16
|
+
files: z.array(z.string().describe("file path")).min(1),
|
|
17
|
+
goal: z.string().describe("analysis focus").optional(),
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
const analyzeFileOutputSchema = {
|
|
@@ -132,8 +132,8 @@ function processDiffs(files: string[], diffs: Map<string, string>): { result: st
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
const gitFileDiffSchema = z.object({
|
|
135
|
-
files: z.array(z.string().describe("
|
|
136
|
-
staged: z.boolean().describe("
|
|
135
|
+
files: z.array(z.string().describe("file to diff")).min(1).max(10),
|
|
136
|
+
staged: z.boolean().describe("use staged changes (default true)").optional(),
|
|
137
137
|
});
|
|
138
138
|
|
|
139
139
|
export function createGitFileDiffTool(cwd: string, state: CommitAgentState): CustomTool<typeof gitFileDiffSchema> {
|
|
@@ -4,9 +4,9 @@ import type { CustomTool } from "../../../extensibility/custom-tools/types";
|
|
|
4
4
|
import * as git from "../../../utils/git";
|
|
5
5
|
|
|
6
6
|
const gitHunkSchema = z.object({
|
|
7
|
-
file: z.string().describe("
|
|
8
|
-
hunks: z.array(z.number().describe("1-based hunk
|
|
9
|
-
staged: z.boolean().describe("
|
|
7
|
+
file: z.string().describe("file path"),
|
|
8
|
+
hunks: z.array(z.number().describe("1-based hunk index")).min(1).optional(),
|
|
9
|
+
staged: z.boolean().describe("use staged changes (default true)").optional(),
|
|
10
10
|
});
|
|
11
11
|
|
|
12
12
|
function selectHunks(fileHunks: FileHunks, requested?: number[]): DiffHunk[] {
|
|
@@ -43,8 +43,8 @@ function filterExcludedFiles(files: string[]): { filtered: string[]; excluded: s
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
const gitOverviewSchema = z.object({
|
|
46
|
-
staged: z.boolean().describe("
|
|
47
|
-
include_untracked: z.boolean().describe("
|
|
46
|
+
staged: z.boolean().describe("use staged changes (default true)").optional(),
|
|
47
|
+
include_untracked: z.boolean().describe("include untracked when unstaged").optional(),
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
export function createGitOverviewTool(cwd: string, state: CommitAgentState): CustomTool<typeof gitOverviewSchema> {
|
|
@@ -12,9 +12,7 @@ const changelogEntryProperties = CHANGELOG_CATEGORIES.reduce<Record<ChangelogCat
|
|
|
12
12
|
);
|
|
13
13
|
|
|
14
14
|
const changelogEntriesSchema = z.object(changelogEntryProperties);
|
|
15
|
-
const changelogDeletionsSchema = z
|
|
16
|
-
.object(changelogEntryProperties)
|
|
17
|
-
.describe("Entries to remove from existing changelog sections (case-insensitive match)");
|
|
15
|
+
const changelogDeletionsSchema = z.object(changelogEntryProperties).describe("entries to remove");
|
|
18
16
|
|
|
19
17
|
const changelogEntrySchema = z.object({
|
|
20
18
|
path: z.string(),
|
|
@@ -3,7 +3,7 @@ import type { CustomTool } from "../../../extensibility/custom-tools/types";
|
|
|
3
3
|
import * as git from "../../../utils/git";
|
|
4
4
|
|
|
5
5
|
const recentCommitsSchema = z.object({
|
|
6
|
-
count: z.number().min(1).max(50).describe("
|
|
6
|
+
count: z.number().min(1).max(50).describe("commit count").optional(),
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
interface RecentCommitStats {
|
|
@@ -17,15 +17,7 @@ export const commitTypeSchema = z.enum([
|
|
|
17
17
|
export const detailSchema = z.object({
|
|
18
18
|
text: z.string(),
|
|
19
19
|
changelog_category: z
|
|
20
|
-
.
|
|
21
|
-
z.literal("Added"),
|
|
22
|
-
z.literal("Changed"),
|
|
23
|
-
z.literal("Fixed"),
|
|
24
|
-
z.literal("Deprecated"),
|
|
25
|
-
z.literal("Removed"),
|
|
26
|
-
z.literal("Security"),
|
|
27
|
-
z.literal("Breaking Changes"),
|
|
28
|
-
])
|
|
20
|
+
.enum(["Added", "Changed", "Fixed", "Deprecated", "Removed", "Security", "Breaking Changes"])
|
|
29
21
|
.optional(),
|
|
30
22
|
user_visible: z.boolean().optional(),
|
|
31
23
|
});
|