@oh-my-pi/pi-coding-agent 16.5.0 → 16.5.1
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 +26 -0
- package/dist/cli.js +3336 -3318
- package/dist/types/advisor/advise-tool.d.ts +12 -1
- package/dist/types/advisor/runtime.d.ts +41 -1
- package/dist/types/cli/args.d.ts +2 -0
- package/dist/types/cli/update-cli.d.ts +4 -1
- package/dist/types/cli/usage-cli.d.ts +3 -0
- package/dist/types/cli/usage-error.d.ts +4 -0
- package/dist/types/config/api-key-resolver.d.ts +2 -2
- package/dist/types/config/model-registry.d.ts +3 -3
- package/dist/types/config/model-resolver.d.ts +8 -1
- package/dist/types/config/models-config.d.ts +1 -1
- package/dist/types/eval/__tests__/process-entry-import.test.d.ts +1 -0
- package/dist/types/eval/bridge-timeout.d.ts +9 -1
- package/dist/types/eval/js/context-manager.d.ts +5 -3
- package/dist/types/eval/js/process-entry.d.ts +6 -0
- package/dist/types/eval/js/worker-core.d.ts +15 -1
- package/dist/types/eval/py/spawn-options.d.ts +10 -0
- package/dist/types/eval/py/tool-bridge.d.ts +1 -0
- package/dist/types/extensibility/custom-tools/types.d.ts +3 -0
- package/dist/types/extensibility/extensions/runner.d.ts +3 -1
- package/dist/types/extensibility/extensions/types.d.ts +3 -0
- package/dist/types/internal-urls/memory-protocol.d.ts +6 -7
- package/dist/types/main.d.ts +1 -0
- package/dist/types/modes/components/transcript-container.d.ts +3 -2
- package/dist/types/modes/magic-keyword-boundary.d.ts +9 -0
- package/dist/types/modes/orchestrate.d.ts +1 -1
- package/dist/types/modes/rpc/host-tools.d.ts +2 -0
- package/dist/types/modes/rpc/rpc-mode.d.ts +26 -6
- package/dist/types/modes/ultrathink.d.ts +1 -1
- package/dist/types/modes/utils/transcript-render-helpers.d.ts +12 -0
- package/dist/types/modes/workflow.d.ts +1 -1
- package/dist/types/session/agent-session.d.ts +6 -0
- package/dist/types/session/exit-diagnostics.d.ts +11 -0
- package/dist/types/slash-commands/helpers/active-oauth-account.d.ts +11 -0
- package/dist/types/subprocess/worker-client.d.ts +6 -0
- package/dist/types/tools/bash-skill-urls.d.ts +1 -0
- package/dist/types/web/search/provider.d.ts +10 -3
- package/dist/types/web/search/providers/codex.d.ts +5 -4
- package/package.json +12 -12
- package/src/advisor/__tests__/advisor.test.ts +830 -42
- package/src/advisor/advise-tool.ts +17 -1
- package/src/advisor/runtime.ts +288 -67
- package/src/autolearn/controller.ts +15 -3
- package/src/cli/args.ts +12 -0
- package/src/cli/auth-broker-cli.ts +30 -11
- package/src/cli/auth-gateway-cli.ts +5 -1
- package/src/cli/dry-balance-cli.ts +14 -4
- package/src/cli/flag-tables.ts +21 -7
- package/src/cli/update-cli.ts +62 -11
- package/src/cli/usage-cli.ts +58 -5
- package/src/cli/usage-error.ts +7 -0
- package/src/cli.ts +23 -1
- package/src/commands/acp.ts +11 -2
- package/src/commands/launch.ts +12 -3
- package/src/commands/token.ts +3 -1
- package/src/config/api-key-resolver.ts +12 -3
- package/src/config/config-file.ts +30 -12
- package/src/config/model-registry.ts +7 -7
- package/src/config/model-resolver.ts +21 -7
- package/src/config/models-config.ts +1 -1
- package/src/eval/__tests__/agent-bridge.test.ts +19 -14
- package/src/eval/__tests__/bridge-timeout.test.ts +106 -0
- package/src/eval/__tests__/js-context-manager.test.ts +158 -1
- package/src/eval/__tests__/kernel-spawn.test.ts +12 -0
- package/src/eval/__tests__/process-entry-import.test.ts +27 -0
- package/src/eval/agent-bridge.ts +121 -116
- package/src/eval/bridge-timeout.ts +20 -2
- package/src/eval/executor-base.ts +85 -7
- package/src/eval/jl/kernel.ts +2 -1
- package/src/eval/js/context-manager.ts +109 -32
- package/src/eval/js/process-entry.ts +27 -0
- package/src/eval/js/shared/runtime.ts +1 -1
- package/src/eval/js/worker-core.ts +70 -9
- package/src/eval/js/worker-entry.ts +1 -1
- package/src/eval/py/kernel.ts +2 -1
- package/src/eval/py/spawn-options.ts +13 -0
- package/src/eval/py/tool-bridge.ts +13 -14
- package/src/eval/rb/kernel.ts +2 -1
- package/src/extensibility/custom-tools/types.ts +3 -0
- package/src/extensibility/extensions/runner.ts +3 -0
- package/src/extensibility/extensions/types.ts +3 -0
- package/src/extensibility/plugins/manager.ts +21 -0
- package/src/internal-urls/memory-protocol.ts +13 -9
- package/src/lsp/client.ts +7 -1
- package/src/main.ts +29 -0
- package/src/mcp/tool-bridge.ts +57 -6
- package/src/modes/components/chat-transcript-builder.ts +22 -1
- package/src/modes/components/status-line/component.ts +10 -1
- package/src/modes/components/transcript-container.ts +110 -7
- package/src/modes/controllers/command-controller.ts +12 -4
- package/src/modes/controllers/event-controller.ts +80 -15
- package/src/modes/controllers/selector-controller.ts +15 -3
- package/src/modes/magic-keyword-boundary.ts +23 -0
- package/src/modes/orchestrate.ts +6 -5
- package/src/modes/print-mode.ts +9 -0
- package/src/modes/rpc/host-tools.ts +15 -0
- package/src/modes/rpc/rpc-mode.ts +123 -48
- package/src/modes/ultrathink.ts +6 -5
- package/src/modes/utils/transcript-render-helpers.ts +54 -0
- package/src/modes/utils/ui-helpers.ts +27 -1
- package/src/modes/workflow.ts +6 -5
- package/src/prompts/advisor/system.md +1 -0
- package/src/sdk.ts +33 -3
- package/src/session/agent-session.ts +239 -17
- package/src/session/exit-diagnostics.ts +108 -0
- package/src/session/streaming-output.ts +40 -12
- package/src/slash-commands/helpers/active-oauth-account.ts +22 -2
- package/src/slash-commands/helpers/logout.ts +23 -3
- package/src/slash-commands/helpers/usage-report.ts +14 -2
- package/src/subprocess/worker-client.ts +9 -2
- package/src/task/executor.ts +8 -0
- package/src/task/render.test.ts +36 -0
- package/src/task/render.ts +55 -43
- package/src/tools/bash-skill-urls.ts +4 -1
- package/src/tools/bash.ts +1 -0
- package/src/tools/write.ts +82 -9
- package/src/tools/yield.ts +29 -1
- package/src/web/search/index.ts +39 -22
- package/src/web/search/provider.ts +33 -16
- package/src/web/search/providers/codex.ts +68 -21
|
@@ -4,6 +4,17 @@ import type { OAuthAccountIdentity } from "../../session/auth-storage.js";
|
|
|
4
4
|
* True when a single usage-limit column belongs to the given OAuth identity.
|
|
5
5
|
*
|
|
6
6
|
* Single definition of the matching rules for both `/usage` renderers:
|
|
7
|
+
* - `orgId` ↔ report metadata `orgId` — a GATE that QUALIFIES the base
|
|
8
|
+
* identity, never a replacement for it. Mismatched org presence or
|
|
9
|
+
* different orgs never match: two subscriptions (orgs) can share one
|
|
10
|
+
* email, so an org-scoped identity matches only its own org's reports and
|
|
11
|
+
* an org-less legacy identity never claims an org-attributed report via
|
|
12
|
+
* the shared email. A SHARED org still requires the base-identity match
|
|
13
|
+
* below — Anthropic Team seats have per-user pools yet share the org id
|
|
14
|
+
* in report metadata. Only an org-only identity (no base identifiers
|
|
15
|
+
* recovered at all) matches on the org alone. When neither side carries
|
|
16
|
+
* an org, the base fallback applies unchanged (providers without orgs
|
|
17
|
+
* keep their former behavior).
|
|
7
18
|
* - `accountId` ↔ report metadata `accountId`/`account_id` or `limit.scope.accountId`
|
|
8
19
|
* - `email` ↔ report metadata `email`
|
|
9
20
|
* - `projectId` ↔ report metadata `projectId` or `limit.scope.projectId`
|
|
@@ -118,6 +118,12 @@ export declare function createWorkerSubprocess<Outbound>(options: {
|
|
|
118
118
|
spawnCommand: WorkerSpawnCommand;
|
|
119
119
|
env: Record<string, string>;
|
|
120
120
|
exitLabel: string;
|
|
121
|
+
/** Start the child as a new process-group/session leader where Bun supports it. */
|
|
122
|
+
detached?: boolean;
|
|
123
|
+
/** Treat exit code 0 as unexpected; eval cells can call process.exit(0). */
|
|
124
|
+
reportCleanExit?: boolean;
|
|
125
|
+
/** Whether an idle worker should stop keeping the parent event loop alive. */
|
|
126
|
+
unref?: boolean;
|
|
121
127
|
}): SpawnedSubprocess<Outbound>;
|
|
122
128
|
/**
|
|
123
129
|
* Wrap a {@link SpawnedSubprocess} as a {@link WorkerHandle}. The `send`
|
|
@@ -24,9 +24,16 @@ export declare function setPreferredSearchProvider(provider: SearchProviderId |
|
|
|
24
24
|
export declare function setExcludedSearchProviders(providers: readonly SearchProviderId[]): void;
|
|
25
25
|
/** `true` when settings exclude `id` from web search (auto chain and the Public Web fan-out). */
|
|
26
26
|
export declare function isSearchProviderExcluded(id: SearchProviderId): boolean;
|
|
27
|
+
export interface SearchProviderCandidate {
|
|
28
|
+
id: SearchProviderId;
|
|
29
|
+
explicit: boolean;
|
|
30
|
+
}
|
|
31
|
+
/** Return provider candidates in fallback order without loading their modules. */
|
|
32
|
+
export declare function resolveProviderCandidates(preferredProvider?: SearchProviderId | "auto"): SearchProviderCandidate[];
|
|
27
33
|
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
34
|
+
* Resolve the complete available provider chain.
|
|
35
|
+
*
|
|
36
|
+
* This compatibility helper loads every candidate. Search execution should use
|
|
37
|
+
* {@link resolveProviderCandidates} so fallback modules load only when reached.
|
|
31
38
|
*/
|
|
32
39
|
export declare function resolveProviderChain(authStorage: AuthStorage, preferredProvider?: SearchProviderId | "auto"): Promise<SearchProvider[]>;
|
|
@@ -17,10 +17,11 @@ export interface CodexSearchParams {
|
|
|
17
17
|
* Default-model behavior:
|
|
18
18
|
* - If `PI_CODEX_WEB_SEARCH_MODEL` is set, use it exactly once and surface any
|
|
19
19
|
* upstream error verbatim.
|
|
20
|
-
* - Otherwise prefer ChatGPT-account-safe bundled defaults (GPT-5.
|
|
21
|
-
*
|
|
22
|
-
* known 400 "model is not supported" family. This avoids
|
|
23
|
-
* `gpt-5-codex-mini` first on ChatGPT accounts, which OpenAI
|
|
20
|
+
* - Otherwise prefer ChatGPT-account-safe bundled defaults (GPT-5.6 Luna,
|
|
21
|
+
* Terra, Sol, GPT-5.5, …) and retry the next candidate only when Codex
|
|
22
|
+
* returns the known 400 "model is not supported" family. This avoids
|
|
23
|
+
* selecting `gpt-5-codex-mini` first on ChatGPT accounts, which OpenAI
|
|
24
|
+
* rejects.
|
|
24
25
|
*/
|
|
25
26
|
export declare function searchCodex(params: SearchParams): Promise<SearchResponse>;
|
|
26
27
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-coding-agent",
|
|
4
|
-
"version": "16.5.
|
|
4
|
+
"version": "16.5.1",
|
|
5
5
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -52,17 +52,17 @@
|
|
|
52
52
|
"@agentclientprotocol/sdk": "1.2.1",
|
|
53
53
|
"@babel/parser": "^7.29.7",
|
|
54
54
|
"@mozilla/readability": "^0.6.0",
|
|
55
|
-
"@oh-my-pi/hashline": "16.5.
|
|
56
|
-
"@oh-my-pi/omp-stats": "16.5.
|
|
57
|
-
"@oh-my-pi/pi-agent-core": "16.5.
|
|
58
|
-
"@oh-my-pi/pi-ai": "16.5.
|
|
59
|
-
"@oh-my-pi/pi-catalog": "16.5.
|
|
60
|
-
"@oh-my-pi/pi-mnemopi": "16.5.
|
|
61
|
-
"@oh-my-pi/pi-natives": "16.5.
|
|
62
|
-
"@oh-my-pi/pi-tui": "16.5.
|
|
63
|
-
"@oh-my-pi/pi-utils": "16.5.
|
|
64
|
-
"@oh-my-pi/pi-wire": "16.5.
|
|
65
|
-
"@oh-my-pi/snapcompact": "16.5.
|
|
55
|
+
"@oh-my-pi/hashline": "16.5.1",
|
|
56
|
+
"@oh-my-pi/omp-stats": "16.5.1",
|
|
57
|
+
"@oh-my-pi/pi-agent-core": "16.5.1",
|
|
58
|
+
"@oh-my-pi/pi-ai": "16.5.1",
|
|
59
|
+
"@oh-my-pi/pi-catalog": "16.5.1",
|
|
60
|
+
"@oh-my-pi/pi-mnemopi": "16.5.1",
|
|
61
|
+
"@oh-my-pi/pi-natives": "16.5.1",
|
|
62
|
+
"@oh-my-pi/pi-tui": "16.5.1",
|
|
63
|
+
"@oh-my-pi/pi-utils": "16.5.1",
|
|
64
|
+
"@oh-my-pi/pi-wire": "16.5.1",
|
|
65
|
+
"@oh-my-pi/snapcompact": "16.5.1",
|
|
66
66
|
"@opentelemetry/api": "^1.9.1",
|
|
67
67
|
"@opentelemetry/context-async-hooks": "^2.7.1",
|
|
68
68
|
"@opentelemetry/exporter-trace-otlp-proto": "^0.220.0",
|