@oh-my-pi/pi-coding-agent 17.2.10 → 17.2.11
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 +40 -0
- package/dist/{CHANGELOG-rhwzpexa.md → CHANGELOG-d9xenpn9.md} +40 -0
- package/dist/cli.js +3025 -3016
- package/dist/types/capability/mcp.d.ts +11 -0
- package/dist/types/capability/skill.d.ts +6 -0
- package/dist/types/cli/command-help.d.ts +3 -0
- package/dist/types/commands/share.d.ts +25 -0
- package/dist/types/commit/agentic/index.d.ts +3 -1
- package/dist/types/commit/execute.d.ts +32 -0
- package/dist/types/commit/index.d.ts +2 -1
- package/dist/types/commit/pipeline.d.ts +7 -1
- package/dist/types/config/model-registry.d.ts +4 -0
- package/dist/types/config/settings-schema.d.ts +1 -34
- package/dist/types/discovery/agent-plugin-format.d.ts +143 -0
- package/dist/types/discovery/agent-plugins.d.ts +1 -0
- package/dist/types/discovery/contained-path.d.ts +34 -0
- package/dist/types/discovery/index.d.ts +1 -0
- package/dist/types/extensibility/custom-tools/types.d.ts +2 -2
- package/dist/types/extensibility/extensions/loader.d.ts +7 -0
- package/dist/types/extensibility/extensions/types.d.ts +11 -0
- package/dist/types/extensibility/shared-events.d.ts +3 -2
- package/dist/types/extensibility/skills.d.ts +5 -0
- package/dist/types/mcp/transports/header-policy.d.ts +45 -0
- package/dist/types/mcp/types.d.ts +15 -0
- package/dist/types/modes/components/agent-hub.d.ts +2 -0
- package/dist/types/modes/components/agent-transcript-viewer.d.ts +2 -0
- package/dist/types/modes/components/chat-transcript-builder.d.ts +2 -0
- package/dist/types/modes/components/custom-editor.d.ts +1 -2
- package/dist/types/modes/components/status-line/types.d.ts +2 -0
- package/dist/types/modes/components/tool-execution.d.ts +2 -0
- package/dist/types/modes/utils/transcript-render-helpers.d.ts +3 -2
- package/dist/types/secrets/index.d.ts +23 -1
- package/dist/types/session/agent-session-events.d.ts +2 -2
- package/dist/types/session/agent-session.d.ts +1 -1
- package/dist/types/session/messages.d.ts +1 -0
- package/dist/types/session/prewalk.d.ts +3 -1
- package/dist/types/session/session-tools.d.ts +8 -0
- package/dist/types/session/turn-recovery.d.ts +7 -2
- package/dist/types/task/index.d.ts +2 -0
- package/dist/types/tools/shell-tokenize.d.ts +16 -0
- package/package.json +13 -13
- package/scripts/legacy-pi-virtual-module.ts +4 -1
- package/src/capability/mcp.ts +11 -0
- package/src/capability/skill.ts +6 -0
- package/src/cli/command-help.ts +4 -0
- package/src/cli/gallery-cli.ts +1 -1
- package/src/cli-commands.ts +5 -0
- package/src/commands/commit.ts +16 -3
- package/src/commands/share.ts +71 -0
- package/src/commit/agentic/index.ts +39 -21
- package/src/commit/execute.ts +56 -0
- package/src/commit/index.ts +2 -1
- package/src/commit/pipeline.ts +20 -7
- package/src/config/model-discovery.ts +1 -1
- package/src/config/model-registry.ts +21 -1
- package/src/config/settings-schema.ts +2 -33
- package/src/config/settings.ts +46 -0
- package/src/discovery/agent-plugin-format.ts +551 -0
- package/src/discovery/agent-plugins.ts +341 -0
- package/src/discovery/claude-plugins.ts +21 -5
- package/src/discovery/contained-path.ts +78 -0
- package/src/discovery/helpers.ts +23 -9
- package/src/discovery/index.ts +1 -0
- package/src/discovery/omp-plugins.ts +20 -7
- package/src/exec/non-interactive-env.ts +1 -0
- package/src/extensibility/custom-tools/types.ts +2 -2
- package/src/extensibility/extensions/loader.ts +78 -14
- package/src/extensibility/extensions/runner.ts +6 -0
- package/src/extensibility/extensions/types.ts +12 -0
- package/src/extensibility/plugins/marketplace/manager.ts +2 -1
- package/src/extensibility/shared-events.ts +3 -2
- package/src/extensibility/skills.ts +9 -0
- package/src/internal-urls/skill-protocol.ts +14 -0
- package/src/internal-urls/vault-protocol.ts +2 -2
- package/src/launch/client.ts +11 -1
- package/src/launch/protocol.ts +7 -2
- package/src/main.ts +3 -2
- package/src/mcp/config.ts +3 -0
- package/src/mcp/manager.ts +12 -9
- package/src/mcp/transports/header-policy.ts +95 -0
- package/src/mcp/transports/http.ts +35 -52
- package/src/mcp/transports/sse.ts +20 -27
- package/src/mcp/types.ts +15 -0
- package/src/modes/acp/acp-agent.ts +15 -4
- package/src/modes/components/agent-dashboard.ts +2 -0
- package/src/modes/components/agent-hub.ts +5 -0
- package/src/modes/components/agent-transcript-viewer.ts +3 -0
- package/src/modes/components/chat-transcript-builder.ts +3 -0
- package/src/modes/components/custom-editor.ts +0 -9
- package/src/modes/components/status-line/component.ts +1 -0
- package/src/modes/components/status-line/segments.ts +6 -4
- package/src/modes/components/status-line/types.ts +2 -0
- package/src/modes/components/tool-execution.ts +13 -16
- package/src/modes/components/tree-selector.ts +62 -3
- package/src/modes/controllers/command-controller.ts +4 -1
- package/src/modes/controllers/event-controller.ts +15 -15
- package/src/modes/controllers/input-controller.ts +20 -2
- package/src/modes/controllers/selector-controller.ts +1 -0
- package/src/modes/utils/transcript-render-helpers.ts +4 -2
- package/src/modes/utils/ui-helpers.ts +1 -0
- package/src/sdk.ts +6 -49
- package/src/secrets/index.ts +52 -1
- package/src/session/agent-session-events.ts +2 -2
- package/src/session/agent-session.ts +33 -14
- package/src/session/messages.ts +1 -0
- package/src/session/prewalk.ts +57 -17
- package/src/session/session-context.ts +3 -5
- package/src/session/session-handoff.ts +5 -1
- package/src/session/session-tools.ts +37 -3
- package/src/session/todo-tracker.ts +11 -1
- package/src/session/turn-recovery.ts +94 -72
- package/src/slash-commands/builtin-registry.ts +12 -8
- package/src/task/index.ts +21 -6
- package/src/tools/bash-skill-urls.ts +15 -0
- package/src/tools/bash.ts +10 -11
- package/src/tools/debug.ts +1 -1
- package/src/tools/jtd-to-json-schema.ts +123 -21
- package/src/tools/read.ts +5 -4
- package/src/tools/shell-tokenize.ts +98 -0
- package/src/web/search/providers/exa.ts +1 -1
package/src/commit/pipeline.ts
CHANGED
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
validateSummary,
|
|
17
17
|
} from "./analysis";
|
|
18
18
|
import { runChangelogFlow } from "./changelog";
|
|
19
|
+
import { abortOnGitFailure, pushOrAbort } from "./execute";
|
|
19
20
|
import { runMapReduceAnalysis, shouldUseMapReduce } from "./map-reduce";
|
|
20
21
|
import { formatCommitMessage } from "./message";
|
|
21
22
|
import { resolvePrimaryModel, resolveSmolModel } from "./model-selection";
|
|
@@ -30,10 +31,15 @@ const TYPES_DESCRIPTION = (): string => (typesDescription ??= prompt.render(type
|
|
|
30
31
|
|
|
31
32
|
/**
|
|
32
33
|
* Execute the omp commit pipeline for staged changes.
|
|
34
|
+
*
|
|
35
|
+
* Returns whether the commit was generated by the mechanical fallback rather
|
|
36
|
+
* than by the commit agent, so callers can signal a degraded outcome (issue
|
|
37
|
+
* #7835). The legacy pipeline has no fallback: model failures throw.
|
|
33
38
|
*/
|
|
34
|
-
export async function runCommitCommand(args: CommitCommandArgs): Promise<
|
|
39
|
+
export async function runCommitCommand(args: CommitCommandArgs): Promise<{ usedFallback: boolean }> {
|
|
35
40
|
if (args.legacy) {
|
|
36
|
-
|
|
41
|
+
await runLegacyCommitCommand(args);
|
|
42
|
+
return { usedFallback: false };
|
|
37
43
|
}
|
|
38
44
|
return runAgenticCommit(args);
|
|
39
45
|
}
|
|
@@ -65,6 +71,11 @@ async function runLegacyCommitCommand(args: CommitCommandArgs): Promise<void> {
|
|
|
65
71
|
stagedFiles = await git.diff.changedFiles(cwd, { cached: true });
|
|
66
72
|
}
|
|
67
73
|
if (stagedFiles.length === 0) {
|
|
74
|
+
if (args.push) {
|
|
75
|
+
process.stdout.write("No changes to commit; pushing existing commits...\n");
|
|
76
|
+
await pushOrAbort(cwd);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
68
79
|
process.stderr.write("No changes to commit.\n");
|
|
69
80
|
return;
|
|
70
81
|
}
|
|
@@ -130,12 +141,14 @@ async function runLegacyCommitCommand(args: CommitCommandArgs): Promise<void> {
|
|
|
130
141
|
return;
|
|
131
142
|
}
|
|
132
143
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
144
|
+
try {
|
|
145
|
+
await git.commit(cwd, commitMessage);
|
|
146
|
+
} catch (error) {
|
|
147
|
+
if (error instanceof git.GitCommandError) abortOnGitFailure("Commit failed", error);
|
|
148
|
+
throw error;
|
|
138
149
|
}
|
|
150
|
+
process.stdout.write("Commit created.\n");
|
|
151
|
+
if (args.push) await pushOrAbort(cwd);
|
|
139
152
|
}
|
|
140
153
|
|
|
141
154
|
async function generateAnalysis(input: {
|
|
@@ -974,8 +974,8 @@ export async function discoverProxyModels(
|
|
|
974
974
|
const reference = resolveModelReference(id, getBundledModelReferenceIndex());
|
|
975
975
|
const discoveryName = typeof item.name === "string" ? item.name.trim() : "";
|
|
976
976
|
const displayName =
|
|
977
|
-
reference?.name ??
|
|
978
977
|
(discoveryName && discoveryName !== id ? discoveryName : undefined) ??
|
|
978
|
+
reference?.name ??
|
|
979
979
|
stripBracketedModelIdAffixes(id) ??
|
|
980
980
|
id;
|
|
981
981
|
discovered.push(
|
|
@@ -65,7 +65,7 @@ const BUILT_IN_DISCOVERY_CACHE_TTL_MS = 2 * 60 * 60 * 1000;
|
|
|
65
65
|
const BUILT_IN_DISCOVERY_NON_AUTHORITATIVE_RETRY_MS = 5 * 60 * 1000;
|
|
66
66
|
|
|
67
67
|
import type { ApiKeyResolver, FetchImpl } from "@oh-my-pi/pi-ai";
|
|
68
|
-
import { registerOAuthProvider, unregisterOAuthProviders } from "@oh-my-pi/pi-ai/oauth";
|
|
68
|
+
import { registerOAuthProvider, unregisterOAuthProvider, unregisterOAuthProviders } from "@oh-my-pi/pi-ai/oauth";
|
|
69
69
|
import type { OAuthCredentials, OAuthLoginCallbacks } from "@oh-my-pi/pi-ai/oauth/types";
|
|
70
70
|
import { setCodexAttestationProvider } from "@oh-my-pi/pi-ai/providers/openai-codex-responses";
|
|
71
71
|
import { getProviderDefinition } from "@oh-my-pi/pi-ai/registry";
|
|
@@ -2514,6 +2514,26 @@ export class ModelRegistry {
|
|
|
2514
2514
|
this.#reloadStaticModels();
|
|
2515
2515
|
}
|
|
2516
2516
|
|
|
2517
|
+
/**
|
|
2518
|
+
* Remove one extension-registered provider and restore its static models.
|
|
2519
|
+
*/
|
|
2520
|
+
unregisterProvider(providerName: string): void {
|
|
2521
|
+
const sourceId = this.#runtimeProviderSourceByName.get(providerName);
|
|
2522
|
+
if (sourceId) {
|
|
2523
|
+
const sourceProviders = this.#runtimeProvidersBySource.get(sourceId);
|
|
2524
|
+
sourceProviders?.delete(providerName);
|
|
2525
|
+
if (sourceProviders?.size === 0) {
|
|
2526
|
+
this.#runtimeProvidersBySource.delete(sourceId);
|
|
2527
|
+
}
|
|
2528
|
+
this.#runtimeProviderSourceByName.delete(providerName);
|
|
2529
|
+
}
|
|
2530
|
+
unregisterOAuthProvider(providerName);
|
|
2531
|
+
this.#ensureFullSnapshot();
|
|
2532
|
+
this.#clearRuntimeProviderState(providerName);
|
|
2533
|
+
this.#lastStaticLoadMtime = null;
|
|
2534
|
+
this.#reloadStaticModels();
|
|
2535
|
+
}
|
|
2536
|
+
|
|
2517
2537
|
/**
|
|
2518
2538
|
* Remove registrations for extension sources that are no longer active.
|
|
2519
2539
|
*/
|
|
@@ -5406,19 +5406,13 @@ export const SETTINGS_SCHEMA = {
|
|
|
5406
5406
|
|
|
5407
5407
|
// Exa
|
|
5408
5408
|
"exa.enabled": {
|
|
5409
|
-
type: "boolean",
|
|
5410
|
-
default: true,
|
|
5411
|
-
ui: { tab: "providers", group: "Services", label: "Exa", description: "Master toggle for all Exa search tools" },
|
|
5412
|
-
},
|
|
5413
|
-
|
|
5414
|
-
"exa.enableSearch": {
|
|
5415
5409
|
type: "boolean",
|
|
5416
5410
|
default: true,
|
|
5417
5411
|
ui: {
|
|
5418
5412
|
tab: "providers",
|
|
5419
5413
|
group: "Services",
|
|
5420
|
-
label: "Exa
|
|
5421
|
-
description: "Enable Exa
|
|
5414
|
+
label: "Exa",
|
|
5415
|
+
description: "Enable the Exa web search provider",
|
|
5422
5416
|
},
|
|
5423
5417
|
},
|
|
5424
5418
|
|
|
@@ -5433,28 +5427,6 @@ export const SETTINGS_SCHEMA = {
|
|
|
5433
5427
|
},
|
|
5434
5428
|
},
|
|
5435
5429
|
|
|
5436
|
-
"exa.enableResearcher": {
|
|
5437
|
-
type: "boolean",
|
|
5438
|
-
default: false,
|
|
5439
|
-
ui: {
|
|
5440
|
-
tab: "providers",
|
|
5441
|
-
group: "Services",
|
|
5442
|
-
label: "Exa Researcher",
|
|
5443
|
-
description: "Enable the Exa researcher tool for AI-powered deep research",
|
|
5444
|
-
},
|
|
5445
|
-
},
|
|
5446
|
-
|
|
5447
|
-
"exa.enableWebsets": {
|
|
5448
|
-
type: "boolean",
|
|
5449
|
-
default: false,
|
|
5450
|
-
ui: {
|
|
5451
|
-
tab: "providers",
|
|
5452
|
-
group: "Services",
|
|
5453
|
-
label: "Exa Websets",
|
|
5454
|
-
description: "Enable Exa webset management and enrichment tools",
|
|
5455
|
-
},
|
|
5456
|
-
},
|
|
5457
|
-
|
|
5458
5430
|
// SearXNG
|
|
5459
5431
|
"searxng.endpoint": {
|
|
5460
5432
|
type: "string",
|
|
@@ -5794,10 +5766,7 @@ export interface TtsrSettings {
|
|
|
5794
5766
|
|
|
5795
5767
|
export interface ExaSettings {
|
|
5796
5768
|
enabled: boolean;
|
|
5797
|
-
enableSearch: boolean;
|
|
5798
5769
|
searchDelayMs: number;
|
|
5799
|
-
enableResearcher: boolean;
|
|
5800
|
-
enableWebsets: boolean;
|
|
5801
5770
|
}
|
|
5802
5771
|
|
|
5803
5772
|
export interface StatusLineSettings {
|
package/src/config/settings.ts
CHANGED
|
@@ -1860,6 +1860,52 @@ export class Settings {
|
|
|
1860
1860
|
: undefined,
|
|
1861
1861
|
);
|
|
1862
1862
|
|
|
1863
|
+
// Consolidate the retired Exa suite toggles onto the sole remaining
|
|
1864
|
+
// provider switch. The old runtime required both `enabled` and
|
|
1865
|
+
// `enableSearch`, so preserve that AND semantics when both are present.
|
|
1866
|
+
// Researcher and Websets were removed with the standalone Exa tools.
|
|
1867
|
+
const exaObj = isRecord(raw.exa) ? raw.exa : undefined;
|
|
1868
|
+
const exaEnabledValues = [
|
|
1869
|
+
exaObj?.enabled,
|
|
1870
|
+
raw["exa.enabled"],
|
|
1871
|
+
exaObj?.enableSearch,
|
|
1872
|
+
raw["exa.enableSearch"],
|
|
1873
|
+
].filter((value): value is boolean => typeof value === "boolean");
|
|
1874
|
+
const hasFlatExaSetting =
|
|
1875
|
+
"exa.enabled" in raw ||
|
|
1876
|
+
"exa.enableSearch" in raw ||
|
|
1877
|
+
"exa.enableResearcher" in raw ||
|
|
1878
|
+
"exa.enableWebsets" in raw;
|
|
1879
|
+
if (exaObj || hasFlatExaSetting) {
|
|
1880
|
+
const exaRoot = exaObj ?? {};
|
|
1881
|
+
if (exaEnabledValues.length > 0) {
|
|
1882
|
+
exaRoot.enabled = exaEnabledValues.every(Boolean);
|
|
1883
|
+
}
|
|
1884
|
+
delete exaRoot.enableSearch;
|
|
1885
|
+
delete exaRoot.enableResearcher;
|
|
1886
|
+
delete exaRoot.enableWebsets;
|
|
1887
|
+
if (Object.keys(exaRoot).length > 0) {
|
|
1888
|
+
raw.exa = exaRoot;
|
|
1889
|
+
} else {
|
|
1890
|
+
delete raw.exa;
|
|
1891
|
+
}
|
|
1892
|
+
delete raw["exa.enabled"];
|
|
1893
|
+
delete raw["exa.enableSearch"];
|
|
1894
|
+
delete raw["exa.enableResearcher"];
|
|
1895
|
+
delete raw["exa.enableWebsets"];
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
// computer.backend and model-specific controller routing were removed
|
|
1899
|
+
// when the computer tool moved to one native desktop implementation.
|
|
1900
|
+
const computerObj = isRecord(raw.computer) ? raw.computer : undefined;
|
|
1901
|
+
if (computerObj && "backend" in computerObj) {
|
|
1902
|
+
delete computerObj.backend;
|
|
1903
|
+
if (Object.keys(computerObj).length === 0) {
|
|
1904
|
+
delete raw.computer;
|
|
1905
|
+
}
|
|
1906
|
+
}
|
|
1907
|
+
delete raw["computer.backend"];
|
|
1908
|
+
|
|
1863
1909
|
return raw;
|
|
1864
1910
|
}
|
|
1865
1911
|
|