@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.
Files changed (141) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/types/cli/auth-broker-cli.d.ts +25 -0
  3. package/dist/types/cli/auth-gateway-cli.d.ts +18 -0
  4. package/dist/types/cli/grievances-cli.d.ts +12 -0
  5. package/dist/types/commands/auth-broker.d.ts +54 -0
  6. package/dist/types/commands/auth-gateway.d.ts +32 -0
  7. package/dist/types/commands/grievances.d.ts +1 -1
  8. package/dist/types/commit/agentic/tools/propose-commit.d.ts +9 -1
  9. package/dist/types/commit/agentic/tools/schemas.d.ts +9 -1
  10. package/dist/types/commit/agentic/tools/split-commit.d.ts +9 -1
  11. package/dist/types/config/model-registry.d.ts +3 -0
  12. package/dist/types/config/models-config-schema.d.ts +1 -0
  13. package/dist/types/config/settings-schema.d.ts +46 -0
  14. package/dist/types/discovery/agents.d.ts +12 -1
  15. package/dist/types/edit/renderer.d.ts +3 -0
  16. package/dist/types/eval/index.d.ts +0 -2
  17. package/dist/types/goals/tools/goal-tool.d.ts +10 -2
  18. package/dist/types/index.d.ts +0 -1
  19. package/dist/types/internal-urls/index.d.ts +1 -1
  20. package/dist/types/internal-urls/{pi-protocol.d.ts → omp-protocol.d.ts} +3 -3
  21. package/dist/types/internal-urls/types.d.ts +1 -1
  22. package/dist/types/modes/acp/acp-agent.d.ts +1 -0
  23. package/dist/types/modes/emoji-autocomplete.d.ts +16 -0
  24. package/dist/types/modes/interactive-mode.d.ts +1 -1
  25. package/dist/types/modes/prompt-action-autocomplete.d.ts +4 -0
  26. package/dist/types/plan-mode/approved-plan.d.ts +4 -0
  27. package/dist/types/sdk.d.ts +10 -3
  28. package/dist/types/session/agent-session.d.ts +1 -1
  29. package/dist/types/session/auth-broker-config.d.ts +13 -0
  30. package/dist/types/session/auth-storage.d.ts +1 -1
  31. package/dist/types/tools/eval.d.ts +41 -7
  32. package/dist/types/tools/irc.d.ts +8 -2
  33. package/dist/types/tools/report-tool-issue.d.ts +118 -1
  34. package/dist/types/tools/resolve.d.ts +8 -2
  35. package/examples/custom-tools/README.md +3 -12
  36. package/examples/extensions/README.md +2 -15
  37. package/examples/extensions/api-demo.ts +1 -7
  38. package/package.json +7 -7
  39. package/src/autoresearch/tools/init-experiment.ts +11 -33
  40. package/src/autoresearch/tools/log-experiment.ts +10 -24
  41. package/src/autoresearch/tools/run-experiment.ts +1 -1
  42. package/src/autoresearch/tools/update-notes.ts +2 -9
  43. package/src/cli/auth-broker-cli.ts +746 -0
  44. package/src/cli/auth-gateway-cli.ts +342 -0
  45. package/src/cli/grievances-cli.ts +109 -16
  46. package/src/cli.ts +4 -2
  47. package/src/commands/auth-broker.ts +96 -0
  48. package/src/commands/auth-gateway.ts +61 -0
  49. package/src/commands/grievances.ts +13 -8
  50. package/src/commands/launch.ts +1 -1
  51. package/src/commit/agentic/agent.ts +2 -0
  52. package/src/commit/agentic/tools/analyze-file.ts +2 -2
  53. package/src/commit/agentic/tools/git-file-diff.ts +2 -2
  54. package/src/commit/agentic/tools/git-hunk.ts +3 -3
  55. package/src/commit/agentic/tools/git-overview.ts +2 -2
  56. package/src/commit/agentic/tools/propose-changelog.ts +1 -3
  57. package/src/commit/agentic/tools/recent-commits.ts +1 -1
  58. package/src/commit/agentic/tools/schemas.ts +1 -9
  59. package/src/config/model-equivalence.ts +279 -174
  60. package/src/config/model-registry.ts +37 -6
  61. package/src/config/model-resolver.ts +13 -8
  62. package/src/config/models-config-schema.ts +8 -0
  63. package/src/config/settings-schema.ts +52 -0
  64. package/src/cursor.ts +1 -1
  65. package/src/debug/log-formatting.ts +1 -1
  66. package/src/debug/log-viewer.ts +1 -1
  67. package/src/debug/profiler.ts +4 -0
  68. package/src/debug/raw-sse-buffer.ts +100 -59
  69. package/src/debug/raw-sse.ts +1 -1
  70. package/src/discovery/agents.ts +15 -4
  71. package/src/edit/modes/apply-patch.ts +1 -5
  72. package/src/edit/modes/patch.ts +5 -5
  73. package/src/edit/modes/replace.ts +5 -5
  74. package/src/edit/renderer.ts +2 -1
  75. package/src/edit/streaming.ts +1 -1
  76. package/src/eval/index.ts +0 -2
  77. package/src/eval/js/shared/runtime.ts +25 -0
  78. package/src/eval/py/kernel.ts +1 -1
  79. package/src/exa/researcher.ts +4 -4
  80. package/src/exa/search.ts +10 -22
  81. package/src/exa/websets.ts +33 -33
  82. package/src/goals/tools/goal-tool.ts +3 -3
  83. package/src/index.ts +0 -3
  84. package/src/internal-urls/docs-index.generated.ts +21 -18
  85. package/src/internal-urls/index.ts +1 -1
  86. package/src/internal-urls/{pi-protocol.ts → omp-protocol.ts} +10 -10
  87. package/src/internal-urls/router.ts +3 -3
  88. package/src/internal-urls/types.ts +1 -1
  89. package/src/lsp/types.ts +8 -11
  90. package/src/main.ts +3 -0
  91. package/src/mcp/tool-bridge.ts +3 -3
  92. package/src/modes/acp/acp-agent.ts +88 -25
  93. package/src/modes/components/bash-execution.ts +1 -1
  94. package/src/modes/components/diff.ts +1 -2
  95. package/src/modes/components/eval-execution.ts +1 -1
  96. package/src/modes/components/oauth-selector.ts +38 -2
  97. package/src/modes/components/tool-execution.ts +1 -2
  98. package/src/modes/controllers/command-controller.ts +95 -34
  99. package/src/modes/controllers/input-controller.ts +4 -3
  100. package/src/modes/data/emojis.json +1 -0
  101. package/src/modes/emoji-autocomplete.ts +285 -0
  102. package/src/modes/interactive-mode.ts +92 -19
  103. package/src/modes/print-mode.ts +3 -3
  104. package/src/modes/prompt-action-autocomplete.ts +14 -0
  105. package/src/plan-mode/approved-plan.ts +9 -0
  106. package/src/prompts/system/system-prompt.md +1 -1
  107. package/src/prompts/system/ttsr-tool-reminder.md +5 -0
  108. package/src/prompts/tools/eval.md +25 -26
  109. package/src/prompts/tools/read.md +1 -1
  110. package/src/prompts/tools/resolve.md +1 -1
  111. package/src/prompts/tools/search.md +1 -1
  112. package/src/prompts/tools/web-search.md +1 -1
  113. package/src/sdk.ts +78 -7
  114. package/src/session/agent-session.ts +176 -77
  115. package/src/session/agent-storage.ts +7 -2
  116. package/src/session/auth-broker-config.ts +102 -0
  117. package/src/session/auth-storage.ts +7 -1
  118. package/src/session/streaming-output.ts +1 -1
  119. package/src/task/types.ts +10 -35
  120. package/src/tools/bash-interactive.ts +4 -1
  121. package/src/tools/bash-pty-selection.ts +2 -2
  122. package/src/tools/browser.ts +12 -20
  123. package/src/tools/eval.ts +77 -100
  124. package/src/tools/gh.ts +21 -45
  125. package/src/tools/hindsight-recall.ts +1 -1
  126. package/src/tools/hindsight-reflect.ts +2 -2
  127. package/src/tools/hindsight-retain.ts +3 -7
  128. package/src/tools/index.ts +8 -1
  129. package/src/tools/inspect-image.ts +4 -1
  130. package/src/tools/irc.ts +4 -12
  131. package/src/tools/job.ts +3 -11
  132. package/src/tools/report-tool-issue.ts +462 -17
  133. package/src/tools/resolve.ts +2 -7
  134. package/src/tools/todo-write.ts +8 -15
  135. package/src/utils/title-generator.ts +3 -0
  136. package/src/web/search/index.ts +6 -6
  137. package/dist/types/eval/parse.d.ts +0 -28
  138. package/dist/types/eval/sniff.d.ts +0 -11
  139. package/src/eval/eval.lark +0 -36
  140. package/src/eval/parse.ts +0 -407
  141. package/src/eval/sniff.ts +0 -28
@@ -1,20 +1,20 @@
1
1
  /**
2
- * View and clean recently reported tool issues from automated QA.
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 clean reported tool issues (auto-QA grievances)";
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 "clean". A positional arg keeps
12
- // the historical `omp grievances` invocation working unchanged while
13
- // reusing the same command surface for the new clean sub-action.
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 clean",
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
  }
@@ -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 "p-openai/gpt-5.2")',
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("File path")).min(1),
17
- goal: z.string().describe("Optional analysis focus").optional(),
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("Files to diff")).min(1).max(10),
136
- staged: z.boolean().describe("Use staged changes (default: true)").optional(),
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("File path"),
8
- hunks: z.array(z.number().describe("1-based hunk indices")).min(1).optional(),
9
- staged: z.boolean().describe("Use staged changes (default: true)").optional(),
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("Use staged changes (default: true)").optional(),
47
- include_untracked: z.boolean().describe("Include untracked files when staged=false").optional(),
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("Number of commits to fetch").optional(),
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
- .union([
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
  });