@oh-my-pi/pi-coding-agent 15.1.2 → 15.1.4
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 +60 -0
- package/dist/types/async/job-manager.d.ts +3 -2
- 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/main.d.ts +11 -2
- package/dist/types/modes/acp/acp-agent.d.ts +2 -1
- package/dist/types/modes/acp/acp-event-mapper.d.ts +13 -1
- package/dist/types/modes/acp/acp-mode.d.ts +3 -1
- 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 +10 -4
- package/dist/types/sdk.d.ts +10 -3
- package/dist/types/session/agent-session.d.ts +7 -3
- package/dist/types/session/auth-broker-config.d.ts +13 -0
- package/dist/types/session/auth-storage.d.ts +1 -1
- package/dist/types/session/client-bridge.d.ts +3 -0
- 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/async/job-manager.ts +111 -13
- 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/update-cli.ts +1 -5
- 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 +107 -2
- 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/extensibility/typebox.ts +44 -17
- 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 +216 -146
- package/src/mcp/tool-bridge.ts +3 -3
- package/src/modes/acp/acp-agent.ts +203 -57
- package/src/modes/acp/acp-client-bridge.ts +2 -1
- package/src/modes/acp/acp-event-mapper.ts +208 -32
- package/src/modes/acp/acp-mode.ts +11 -3
- 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/components/tree-selector.ts +26 -7
- 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 +30 -9
- package/src/prompts/system/system-prompt.md +1 -1
- package/src/prompts/system/ttsr-tool-reminder.md +5 -0
- package/src/prompts/tools/ask.md +4 -3
- 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 +81 -8
- package/src/session/agent-session.ts +362 -131
- 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/client-bridge.ts +3 -0
- 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
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,66 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [15.1.4] - 2026-05-19
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Fixed `normalizePlanTitle` rejecting plan titles that contain spaces or common punctuation (e.g. "My Feature Plan") — spaces are now converted to hyphens and other invalid characters are dropped, so models that produce natural-language plan titles no longer loop forever trying to call `resolve`. ([#1176](https://github.com/can1357/oh-my-pi/issues/1176))
|
|
10
|
+
- Fixed `ask` tool prompt example showing the legacy `question`/`options` top-level format instead of the current `questions: [{id, question, options}]` array format; models that closely followed the example generated calls that always failed schema validation. ([#1176](https://github.com/can1357/oh-my-pi/issues/1176))
|
|
11
|
+
|
|
12
|
+
- Fixed ACP command and custom tool-call notifications to carry the original tool arguments in replayed and final updates, so command text is preserved and raw input is no longer wrapped
|
|
13
|
+
- Fixed ACP async-job draining to be scoped by session owner so `getAsyncJobSnapshot` and `drainAsyncJobDeliveriesForAcp` no longer consume or expose jobs from other sessions
|
|
14
|
+
- Fixed async job status reporting to include in-flight completions so queued/delivering indicators remain accurate while callbacks are still running
|
|
15
|
+
- Fixed `deferAgentInitiatedTurns` handling during ACP async-job draining so background completion follow-up turns are delivered even when agent-initiated turns are deferred
|
|
16
|
+
- Fixed ACP ordinary file-editing calls (`edit`, `write`, `ast_edit`) incorrectly requesting `session/request_permission` before every call, while keeping permission prompts for edit operations that delete or move files; permission requests now report the gated tool call as `pending` so clients can render the approval UI instead of returning `Permission request cancelled` without a visible prompt. ([#1134](https://github.com/can1357/oh-my-pi/pull/1134) by [@jiwangyihao](https://github.com/jiwangyihao))
|
|
17
|
+
- Fixed the session tree selector to preserve a readable message column when deeply nested branch gutters would otherwise consume the viewport. ([#1144](https://github.com/can1357/oh-my-pi/issues/1144))
|
|
18
|
+
|
|
19
|
+
## [15.1.3] - 2026-05-17
|
|
20
|
+
### Breaking Changes
|
|
21
|
+
|
|
22
|
+
- Renamed the embedded-documentation internal URL scheme from `pi://` to `omp://`. `OmpProtocolHandler` replaces `PiProtocolHandler`; update any external references accordingly.
|
|
23
|
+
- Removed the `StringEnum` re-export from `@oh-my-pi/pi-coding-agent`. Custom tools and extensions should use `z.enum([...])` directly via the injected `pi.zod`.
|
|
24
|
+
- Replaced the `eval` tool's LARK-grammar `input` string with a structured `cells` array. Each cell is `{ language: "py" | "js", code, title?, timeout?, reset? }`. Removed the implicit/sniffed language path, the `*** Cell` / `*** End` / `*** Abort` markers, and the per-cell `t:<duration>` unit suffixes — `timeout` is now seconds (1-600).
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- Added `providers.<name>.transport: "pi-native"` to `models.yml`. When set, every model under that provider routes its streaming dispatch through the auth-gateway's `POST /v1/pi/stream` endpoint instead of the per-provider SDK. The provider's `baseUrl` must point at a compatible `omp auth-gateway` and `apiKey` must carry the gateway bearer. The slot's `models.json` still resolves locally for pricing/capabilities/thinking config; only the wire dispatch is redirected. Use case: containerized omp installs (robomp slots, swarm extension) where the slot must stay credential-free and a sidecar gateway holds the real provider tokens. Also surfaced as `transport` on `ProviderConfigInput` for extension-registered providers.
|
|
29
|
+
- Added optional backend push for the auto-QA grievance database (`dev.autoqaPush.enabled`, `dev.autoqaPush.endpoint`, `dev.autoqaPush.token`; env overrides `PI_AUTO_QA_PUSH`, `PI_AUTO_QA_PUSH_URL`, `PI_AUTO_QA_PUSH_TOKEN`). When enabled, every `report_tool_issue` call schedules a background flush that `POST`s pending rows to the configured endpoint and deletes them on HTTP 2xx. Each push carries a stable per-install UUID (`installId`) generated on first use and persisted at `~/.omp/install-id` via `getInstallId()` (new export from `@oh-my-pi/pi-utils`), so the receiver can dedup retries across host renames and `autoqa.db` wipes. Single-flight, 5s request timeout, 30s in-memory cooldown after failure, and a row-id watermark so rows inserted during an in-flight push survive and ship next time. Tool execution remains non-blocking and never throws.
|
|
30
|
+
- `ModelRegistry` now promotes `models.yml` `providers.<name>.apiKey` entries to `AuthStorage`'s new config-override tier (above OAuth, below `--api-key`). Pinning a bearer in `models.yml` was previously a no-op when the broker had an OAuth credential for the same provider — the OAuth access token won and got sent unmodified to whatever `baseUrl` you redirected to, which an auth-gateway in front of that endpoint rightly rejected with 401. The override is now honored, and is cleared/repopulated atomically on `models.yml` reload (`#reloadStaticModels` calls `clearConfigApiKeys` before re-parsing). Use case: route `anthropic` / `openai-codex` to `http://llm-gateway.internal:4000` with the gateway's own bearer.
|
|
31
|
+
- Added `omp auth-broker` subcommand for running and consuming a hosted credential vault.
|
|
32
|
+
- `serve [--bind=host:port]` — boots a local broker against the SQLite store at `$AGENT_DB_PATH`.
|
|
33
|
+
- `token [--regenerate]` — prints (and rotates) the bearer token stored at `~/.omp/auth-broker.token`.
|
|
34
|
+
- `login <provider> [--via=user@host] [--dry-run]` — drives the OAuth flow locally or via SSH `-L` tunnel into a remote broker (callback ports pinned per provider).
|
|
35
|
+
- `logout <provider>` — disables every credential for the given provider in the local SQLite store.
|
|
36
|
+
- `import <file|dir> [--provider=<id>] [--include-disabled] [--dry-run]` — imports CLIProxyAPI-style JSON credential dumps (`~/.cliproxy/auth/*.json`). When `OMP_AUTH_BROKER_URL` is configured, credentials are uploaded to the remote broker via `POST /v1/credential`; otherwise they go into the local SQLite store. JSON `type` is mapped to omp providers (`claude` → `anthropic`, `codex` → `openai-codex`, `gemini[-cli]` → `google-gemini-cli`, `antigravity` → `google-antigravity`); `--provider` overrides the mapping for unrecognized types.
|
|
37
|
+
- `status` — pings the configured remote broker (`OMP_AUTH_BROKER_URL`).
|
|
38
|
+
- Added remote credential vault support to `discoverAuthStorage`. Configure via env (`OMP_AUTH_BROKER_URL` / `OMP_AUTH_BROKER_TOKEN`) or by setting `auth.broker.url` and `auth.broker.token` in `~/.omp/agent/config.yml` (hidden from the settings UI; supports `!command` resolution). Falls back to `~/.omp/auth-broker.token` when no token is provided inline. Otherwise behavior is unchanged.
|
|
39
|
+
- Added `omp auth-broker migrate --from-local [--include-env] [--include-oauth] [--dry-run]` — uploads local SQLite credentials (and optionally env-var API keys) to the configured broker. Skips anything already on the broker via identity-key matching. OAuth is skipped by default (handled via `cliproxy` import). Idempotent on re-runs.
|
|
40
|
+
- Added `omp auth-gateway` subcommand for running a forward-proxy that hides access tokens from less-trusted clients:
|
|
41
|
+
- `serve [--bind=…]` — boots the gateway against the configured broker. Listens on `127.0.0.1:4000` by default.
|
|
42
|
+
- `token [--regenerate]` — manages the gateway bearer token at `~/.omp/auth-gateway.token` (separate from the broker bearer).
|
|
43
|
+
- `status` — verifies gateway config and authenticated broker readiness.
|
|
44
|
+
- One wire surface: `POST /v1/chat/completions` (OpenAI chat-completions), `POST /v1/messages` (Anthropic messages), `POST /v1/responses` (OpenAI Responses), `GET /v1/usage` (aggregated, 5-min per-credential cache), `GET /v1/models` (catalog). Model id in the request body selects which omp provider/model services it; the gateway translates wire format ↔ omp canonical `Context` and dispatches through `pi-ai` `streamSimple()`. Container deployments (robomp, etc.) get inference auth without ever holding access tokens or the broker bearer.
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
|
|
48
|
+
- Changed TTSR `interruptMode` semantics so a non-interrupting decision on a tool-source match now folds the rule reminder into that specific tool's `toolResult` content instead of queuing a loop-wide deferred follow-up turn. Text/thinking matches keep the previous deferred-injection behavior.
|
|
49
|
+
|
|
50
|
+
### Fixed
|
|
51
|
+
|
|
52
|
+
- Fixed streaming API requests to recover from provider auth errors by invalidating stale credentials and retrying with a fresh key
|
|
53
|
+
- Fixed `auth-broker` migration, `auth-gateway` startup, and `discoverAuthStorage` to fail fast with a clear error when the broker snapshot endpoint returns a non-200 response
|
|
54
|
+
- Fixed `omp auth-broker migrate` to skip local placeholder `<authenticated>` API credentials (not real keys) when exporting to a remote broker
|
|
55
|
+
- Fixed `auth-gateway` token initialization to avoid clobbering an existing token when multiple processes initialize it concurrently
|
|
56
|
+
- Fixed `omp auth-gateway` request handling to reject unsupported OpenAI/Anthropic protocol controls with 400 instead of accepting and ignoring them, propagate upstream error/abort terminal states as failures, preserve Responses reasoning and completed text items, accept string/system Responses messages, and keep Anthropic tool-result ordering valid.
|
|
57
|
+
- Fixed gateway usage reporting to include cached-token totals for OpenAI Chat/Responses and to serve the last good cached report during transient upstream usage fetch failures.
|
|
58
|
+
- Fixed auth-gateway request cancellation for requests that are already aborted before dispatch.
|
|
59
|
+
- Fixed `/login` and `/logout` provider selector overflowing tall provider lists off-screen on small terminals. The selector now scrolls a 10-item window centered on the highlighted entry, shows a `(n/total)` indicator when windowed, and accepts PageUp/PageDown for faster navigation.
|
|
60
|
+
|
|
61
|
+
### Fixed
|
|
62
|
+
|
|
63
|
+
- Fixed `.env` loading so malformed variable names and NUL-containing values are ignored before they can poison `Bun.env` and break bash/external process execution with `nul byte found in provided data`.
|
|
64
|
+
|
|
5
65
|
## [15.1.2] - 2026-05-15
|
|
6
66
|
### Fixed
|
|
7
67
|
|
|
@@ -65,8 +65,8 @@ export declare class AsyncJobManager {
|
|
|
65
65
|
getRunningJobs(filter?: AsyncJobFilter): AsyncJob[];
|
|
66
66
|
getRecentJobs(limit?: number, filter?: AsyncJobFilter): AsyncJob[];
|
|
67
67
|
getAllJobs(filter?: AsyncJobFilter): AsyncJob[];
|
|
68
|
-
getDeliveryState(): AsyncJobDeliveryState;
|
|
69
|
-
hasPendingDeliveries(): boolean;
|
|
68
|
+
getDeliveryState(filter?: AsyncJobFilter): AsyncJobDeliveryState;
|
|
69
|
+
hasPendingDeliveries(filter?: AsyncJobFilter): boolean;
|
|
70
70
|
watchJobs(jobIds: string[]): number;
|
|
71
71
|
unwatchJobs(jobIds: string[]): number;
|
|
72
72
|
acknowledgeDeliveries(jobIds: string[]): number;
|
|
@@ -79,6 +79,7 @@ export declare class AsyncJobManager {
|
|
|
79
79
|
waitForAll(): Promise<void>;
|
|
80
80
|
drainDeliveries(options?: {
|
|
81
81
|
timeoutMs?: number;
|
|
82
|
+
filter?: AsyncJobFilter;
|
|
82
83
|
}): Promise<boolean>;
|
|
83
84
|
dispose(options?: {
|
|
84
85
|
timeoutMs?: number;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type AuthBrokerAction = "serve" | "token" | "login" | "logout" | "status" | "import" | "migrate";
|
|
2
|
+
export interface AuthBrokerCommandArgs {
|
|
3
|
+
action: AuthBrokerAction;
|
|
4
|
+
flags: {
|
|
5
|
+
json?: boolean;
|
|
6
|
+
bind?: string;
|
|
7
|
+
regenerate?: boolean;
|
|
8
|
+
via?: string;
|
|
9
|
+
provider?: string;
|
|
10
|
+
dryRun?: boolean;
|
|
11
|
+
/** `login`/`logout`: provider id. `import`: filesystem path. */
|
|
12
|
+
source?: string;
|
|
13
|
+
/** `import`: keep credentials whose JSON had `disabled: true`. */
|
|
14
|
+
includeDisabled?: boolean;
|
|
15
|
+
/** `migrate`: also upload local OAuth (default: api_key only, since OAuth is via cliproxy import). */
|
|
16
|
+
includeOauth?: boolean;
|
|
17
|
+
/** `migrate`: also capture env-var API keys for providers not yet on broker. */
|
|
18
|
+
includeEnv?: boolean;
|
|
19
|
+
/** `migrate`: required `--from-local` source. Reserved for future sources. */
|
|
20
|
+
fromLocal?: boolean;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
declare const ACTIONS: readonly AuthBrokerAction[];
|
|
24
|
+
export declare function runAuthBrokerCommand(cmd: AuthBrokerCommandArgs): Promise<void>;
|
|
25
|
+
export { ACTIONS as AUTH_BROKER_ACTIONS };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type AuthGatewayAction = "serve" | "token" | "status";
|
|
2
|
+
export interface AuthGatewayCommandArgs {
|
|
3
|
+
action: AuthGatewayAction;
|
|
4
|
+
flags: {
|
|
5
|
+
json?: boolean;
|
|
6
|
+
bind?: string;
|
|
7
|
+
regenerate?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Disable bearer-token auth on inbound requests. Useful when the gateway
|
|
10
|
+
* is bound to loopback (the default `127.0.0.1:4000`) and you don't want
|
|
11
|
+
* to wire token-paste plumbing into every local client.
|
|
12
|
+
*/
|
|
13
|
+
noAuth?: boolean;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
declare const ACTIONS: readonly AuthGatewayAction[];
|
|
17
|
+
export declare function runAuthGatewayCommand(cmd: AuthGatewayCommandArgs): Promise<void>;
|
|
18
|
+
export { ACTIONS as AUTH_GATEWAY_ACTIONS };
|
|
@@ -13,6 +13,10 @@ export interface CleanGrievancesOptions {
|
|
|
13
13
|
/** Output the deletion count as JSON instead of a status message. */
|
|
14
14
|
json?: boolean;
|
|
15
15
|
}
|
|
16
|
+
export interface PushGrievancesOptions {
|
|
17
|
+
/** Emit the {@link FlushResult} as JSON instead of a status line. */
|
|
18
|
+
json?: boolean;
|
|
19
|
+
}
|
|
16
20
|
export declare function listGrievances(options: ListGrievancesOptions): Promise<void>;
|
|
17
21
|
/**
|
|
18
22
|
* Delete grievances from the auto-QA database.
|
|
@@ -23,3 +27,11 @@ export declare function listGrievances(options: ListGrievancesOptions): Promise<
|
|
|
23
27
|
* does not exist yet.
|
|
24
28
|
*/
|
|
25
29
|
export declare function cleanGrievances(options: CleanGrievancesOptions): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Manually drain every unpushed grievance to the configured backend,
|
|
32
|
+
* ignoring the user-facing consent gate (manual push is the user's
|
|
33
|
+
* explicit "yes ship these now" intent).
|
|
34
|
+
*
|
|
35
|
+
* Requires endpoint configuration (default `qa.omp.sh/v1/grievances`).
|
|
36
|
+
*/
|
|
37
|
+
export declare function pushGrievances(options: PushGrievancesOptions): Promise<void>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `omp auth-broker` — manage the omp credential vault.
|
|
3
|
+
*/
|
|
4
|
+
import { Command } from "@oh-my-pi/pi-utils/cli";
|
|
5
|
+
import { type AuthBrokerAction } from "../cli/auth-broker-cli";
|
|
6
|
+
export default class AuthBroker extends Command {
|
|
7
|
+
static description: string;
|
|
8
|
+
static args: {
|
|
9
|
+
action: import("@oh-my-pi/pi-utils/cli").ArgDescriptor & {
|
|
10
|
+
description: string;
|
|
11
|
+
required: false;
|
|
12
|
+
options: AuthBrokerAction[];
|
|
13
|
+
};
|
|
14
|
+
source: import("@oh-my-pi/pi-utils/cli").ArgDescriptor & {
|
|
15
|
+
description: string;
|
|
16
|
+
required: false;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
static flags: {
|
|
20
|
+
json: import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"boolean"> & {
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
bind: import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"string"> & {
|
|
24
|
+
description: string;
|
|
25
|
+
char: string;
|
|
26
|
+
};
|
|
27
|
+
regenerate: import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"boolean"> & {
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
via: import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"string"> & {
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
provider: import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"string"> & {
|
|
34
|
+
description: string;
|
|
35
|
+
};
|
|
36
|
+
"include-disabled": import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"boolean"> & {
|
|
37
|
+
description: string;
|
|
38
|
+
};
|
|
39
|
+
"from-local": import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"boolean"> & {
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
"include-env": import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"boolean"> & {
|
|
43
|
+
description: string;
|
|
44
|
+
};
|
|
45
|
+
"include-oauth": import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"boolean"> & {
|
|
46
|
+
description: string;
|
|
47
|
+
};
|
|
48
|
+
"dry-run": import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"boolean"> & {
|
|
49
|
+
description: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
static examples: string[];
|
|
53
|
+
run(): Promise<void>;
|
|
54
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `omp auth-gateway` — run a forward proxy that injects auth from the broker.
|
|
3
|
+
*/
|
|
4
|
+
import { Command } from "@oh-my-pi/pi-utils/cli";
|
|
5
|
+
import { type AuthGatewayAction } from "../cli/auth-gateway-cli";
|
|
6
|
+
export default class AuthGateway extends Command {
|
|
7
|
+
static description: string;
|
|
8
|
+
static args: {
|
|
9
|
+
action: import("@oh-my-pi/pi-utils/cli").ArgDescriptor & {
|
|
10
|
+
description: string;
|
|
11
|
+
required: false;
|
|
12
|
+
options: AuthGatewayAction[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
static flags: {
|
|
16
|
+
json: import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"boolean"> & {
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
bind: import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"string"> & {
|
|
20
|
+
description: string;
|
|
21
|
+
char: string;
|
|
22
|
+
};
|
|
23
|
+
regenerate: import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"boolean"> & {
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
"no-auth": import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"boolean"> & {
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
static examples: string[];
|
|
31
|
+
run(): Promise<void>;
|
|
32
|
+
}
|
|
@@ -19,7 +19,15 @@ declare const proposeCommitSchema: z.ZodObject<{
|
|
|
19
19
|
summary: z.ZodString;
|
|
20
20
|
details: z.ZodArray<z.ZodObject<{
|
|
21
21
|
text: z.ZodString;
|
|
22
|
-
changelog_category: z.ZodOptional<z.
|
|
22
|
+
changelog_category: z.ZodOptional<z.ZodEnum<{
|
|
23
|
+
Added: "Added";
|
|
24
|
+
"Breaking Changes": "Breaking Changes";
|
|
25
|
+
Changed: "Changed";
|
|
26
|
+
Deprecated: "Deprecated";
|
|
27
|
+
Fixed: "Fixed";
|
|
28
|
+
Removed: "Removed";
|
|
29
|
+
Security: "Security";
|
|
30
|
+
}>>;
|
|
23
31
|
user_visible: z.ZodOptional<z.ZodBoolean>;
|
|
24
32
|
}, z.core.$strip>>;
|
|
25
33
|
issue_refs: z.ZodArray<z.ZodString>;
|
|
@@ -14,6 +14,14 @@ export declare const commitTypeSchema: z.ZodEnum<{
|
|
|
14
14
|
}>;
|
|
15
15
|
export declare const detailSchema: z.ZodObject<{
|
|
16
16
|
text: z.ZodString;
|
|
17
|
-
changelog_category: z.ZodOptional<z.
|
|
17
|
+
changelog_category: z.ZodOptional<z.ZodEnum<{
|
|
18
|
+
Added: "Added";
|
|
19
|
+
"Breaking Changes": "Breaking Changes";
|
|
20
|
+
Changed: "Changed";
|
|
21
|
+
Deprecated: "Deprecated";
|
|
22
|
+
Fixed: "Fixed";
|
|
23
|
+
Removed: "Removed";
|
|
24
|
+
Security: "Security";
|
|
25
|
+
}>>;
|
|
18
26
|
user_visible: z.ZodOptional<z.ZodBoolean>;
|
|
19
27
|
}, z.core.$strip>;
|
|
@@ -33,7 +33,15 @@ declare const splitCommitSchema: z.ZodObject<{
|
|
|
33
33
|
summary: z.ZodString;
|
|
34
34
|
details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
35
35
|
text: z.ZodString;
|
|
36
|
-
changelog_category: z.ZodOptional<z.
|
|
36
|
+
changelog_category: z.ZodOptional<z.ZodEnum<{
|
|
37
|
+
Added: "Added";
|
|
38
|
+
"Breaking Changes": "Breaking Changes";
|
|
39
|
+
Changed: "Changed";
|
|
40
|
+
Deprecated: "Deprecated";
|
|
41
|
+
Fixed: "Fixed";
|
|
42
|
+
Removed: "Removed";
|
|
43
|
+
Security: "Security";
|
|
44
|
+
}>>;
|
|
37
45
|
user_visible: z.ZodOptional<z.ZodBoolean>;
|
|
38
46
|
}, z.core.$strip>>>;
|
|
39
47
|
issue_refs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -206,6 +206,7 @@ export declare const ModelsConfigFile: ConfigFile<{
|
|
|
206
206
|
contextPromotionTarget?: string | undefined;
|
|
207
207
|
}> | undefined;
|
|
208
208
|
disableStrictTools?: boolean | undefined;
|
|
209
|
+
transport?: "pi-native" | undefined;
|
|
209
210
|
}> | undefined;
|
|
210
211
|
equivalence?: {
|
|
211
212
|
overrides?: Record<string, string> | undefined;
|
|
@@ -329,6 +330,8 @@ export interface ProviderConfigInput {
|
|
|
329
330
|
headers?: Record<string, string>;
|
|
330
331
|
compat?: Model<Api>["compat"];
|
|
331
332
|
authHeader?: boolean;
|
|
333
|
+
/** Streaming transport override — see {@link Model.transport}. */
|
|
334
|
+
transport?: Model<Api>["transport"];
|
|
332
335
|
oauth?: {
|
|
333
336
|
name: string;
|
|
334
337
|
login(callbacks: OAuthLoginCallbacks): Promise<OAuthCredentials | string>;
|
|
@@ -493,6 +493,7 @@ export declare const ModelsConfigSchema: z.ZodObject<{
|
|
|
493
493
|
contextPromotionTarget: z.ZodOptional<z.ZodString>;
|
|
494
494
|
}, z.core.$strip>>>;
|
|
495
495
|
disableStrictTools: z.ZodOptional<z.ZodBoolean>;
|
|
496
|
+
transport: z.ZodOptional<z.ZodLiteral<"pi-native">>;
|
|
496
497
|
}, z.core.$strip>>>;
|
|
497
498
|
equivalence: z.ZodOptional<z.ZodObject<{
|
|
498
499
|
overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -105,6 +105,14 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
105
105
|
readonly type: "string";
|
|
106
106
|
readonly default: undefined;
|
|
107
107
|
};
|
|
108
|
+
readonly "auth.broker.url": {
|
|
109
|
+
readonly type: "string";
|
|
110
|
+
readonly default: undefined;
|
|
111
|
+
};
|
|
112
|
+
readonly "auth.broker.token": {
|
|
113
|
+
readonly type: "string";
|
|
114
|
+
readonly default: undefined;
|
|
115
|
+
};
|
|
108
116
|
readonly autoResume: {
|
|
109
117
|
readonly type: "boolean";
|
|
110
118
|
readonly default: false;
|
|
@@ -1066,6 +1074,15 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
1066
1074
|
}];
|
|
1067
1075
|
};
|
|
1068
1076
|
};
|
|
1077
|
+
readonly emojiAutocomplete: {
|
|
1078
|
+
readonly type: "boolean";
|
|
1079
|
+
readonly default: true;
|
|
1080
|
+
readonly ui: {
|
|
1081
|
+
readonly tab: "interaction";
|
|
1082
|
+
readonly label: "Emoji Autocomplete";
|
|
1083
|
+
readonly description: "Suggest emojis from `:name:` shortcodes and expand text emoticons like `:D` or `:-)`";
|
|
1084
|
+
};
|
|
1085
|
+
};
|
|
1069
1086
|
readonly "startup.quiet": {
|
|
1070
1087
|
readonly type: "boolean";
|
|
1071
1088
|
readonly default: false;
|
|
@@ -3115,6 +3132,35 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
3115
3132
|
readonly description: "Enable automated tool issue reporting (report_tool_issue) for all agents";
|
|
3116
3133
|
};
|
|
3117
3134
|
};
|
|
3135
|
+
readonly "dev.autoqaPush.endpoint": {
|
|
3136
|
+
readonly type: "string";
|
|
3137
|
+
readonly default: "https://qa.omp.sh/v1/grievances";
|
|
3138
|
+
readonly ui: {
|
|
3139
|
+
readonly tab: "tools";
|
|
3140
|
+
readonly label: "Auto QA Push Endpoint";
|
|
3141
|
+
readonly description: "Full URL that receives the JSON payload (default ships to https://qa.omp.sh/v1/grievances)";
|
|
3142
|
+
};
|
|
3143
|
+
};
|
|
3144
|
+
readonly "dev.autoqaPush.token": {
|
|
3145
|
+
readonly type: "string";
|
|
3146
|
+
readonly default: undefined;
|
|
3147
|
+
};
|
|
3148
|
+
/**
|
|
3149
|
+
* User decision on sharing automatic `report_tool_issue` grievances.
|
|
3150
|
+
*
|
|
3151
|
+
* - `"unset"` — never asked; the first `report_tool_issue` invocation
|
|
3152
|
+
* pops a consent dialog and persists the answer here.
|
|
3153
|
+
* - `"granted"` — record and (when push is configured) ship grievances.
|
|
3154
|
+
* - `"denied"` — silently no-op every `report_tool_issue` call.
|
|
3155
|
+
*
|
|
3156
|
+
* Owned by `packages/coding-agent/src/tools/report-tool-issue.ts` via the
|
|
3157
|
+
* process-global consent handler registered by `InteractiveMode`.
|
|
3158
|
+
*/
|
|
3159
|
+
readonly "dev.autoqa.consent": {
|
|
3160
|
+
readonly type: "enum";
|
|
3161
|
+
readonly values: readonly ["unset", "granted", "denied"];
|
|
3162
|
+
readonly default: "unset";
|
|
3163
|
+
};
|
|
3118
3164
|
readonly "thinkingBudgets.minimal": {
|
|
3119
3165
|
readonly type: "number";
|
|
3120
3166
|
readonly default: 1024;
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import type { LoadContext } from "../capability/types";
|
|
2
|
+
/**
|
|
3
|
+
* Project-level paths: walk up from cwd to repoRoot, returning `.agent/<segments>`
|
|
4
|
+
* and `.agents/<segments>` at each ancestor.
|
|
5
|
+
*
|
|
6
|
+
* The user home directory is skipped: `~/.agent[s]/` is by definition
|
|
7
|
+
* user-level config and is already enumerated by {@link getUserPathCandidates}.
|
|
8
|
+
* Without this guard, any cwd under `$HOME` (with no closer git repoRoot) would
|
|
9
|
+
* walk up to home and yield duplicate project+user entries for the same
|
|
10
|
+
* directory — see https://github.com/can1357/oh-my-pi/issues/1116.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getProjectPathCandidates(ctx: LoadContext, ...segments: string[]): string[];
|
|
@@ -6,7 +6,11 @@ import type { Theme } from "../../modes/theme/theme";
|
|
|
6
6
|
import type { ToolSession } from "../../tools";
|
|
7
7
|
import type { Goal, GoalToolDetails } from "../state";
|
|
8
8
|
declare const goalSchema: z.ZodObject<{
|
|
9
|
-
op: z.
|
|
9
|
+
op: z.ZodEnum<{
|
|
10
|
+
complete: "complete";
|
|
11
|
+
create: "create";
|
|
12
|
+
get: "get";
|
|
13
|
+
}>;
|
|
10
14
|
objective: z.ZodOptional<z.ZodString>;
|
|
11
15
|
token_budget: z.ZodOptional<z.ZodNumber>;
|
|
12
16
|
}, z.core.$strip>;
|
|
@@ -25,7 +29,11 @@ export declare class GoalTool implements AgentTool<typeof goalSchema, GoalToolDe
|
|
|
25
29
|
readonly label = "Goal";
|
|
26
30
|
readonly description: string;
|
|
27
31
|
readonly parameters: z.ZodObject<{
|
|
28
|
-
op: z.
|
|
32
|
+
op: z.ZodEnum<{
|
|
33
|
+
complete: "complete";
|
|
34
|
+
create: "create";
|
|
35
|
+
get: "get";
|
|
36
|
+
}>;
|
|
29
37
|
objective: z.ZodOptional<z.ZodString>;
|
|
30
38
|
token_budget: z.ZodOptional<z.ZodNumber>;
|
|
31
39
|
}, z.core.$strip>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { HookEditorComponent, HookInputComponent, HookSelectorComponent } from "./modes/components";
|
|
2
|
-
export { StringEnum } from "@oh-my-pi/pi-ai";
|
|
3
2
|
export { Container, Markdown, Spacer, Text } from "@oh-my-pi/pi-tui";
|
|
4
3
|
export { getAgentDir, logger, VERSION } from "@oh-my-pi/pi-utils";
|
|
5
4
|
export * from "./config/keybindings";
|
|
@@ -14,8 +14,8 @@ export * from "./json-query";
|
|
|
14
14
|
export * from "./local-protocol";
|
|
15
15
|
export * from "./mcp-protocol";
|
|
16
16
|
export * from "./memory-protocol";
|
|
17
|
+
export * from "./omp-protocol";
|
|
17
18
|
export * from "./parse";
|
|
18
|
-
export * from "./pi-protocol";
|
|
19
19
|
export * from "./router";
|
|
20
20
|
export * from "./rule-protocol";
|
|
21
21
|
export * from "./skill-protocol";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { InternalResource, InternalUrl, ProtocolHandler } from "./types";
|
|
2
2
|
/**
|
|
3
|
-
* Handler for
|
|
3
|
+
* Handler for omp:// URLs.
|
|
4
4
|
*
|
|
5
5
|
* Resolves documentation file names to their content, or lists available docs.
|
|
6
6
|
*/
|
|
7
|
-
export declare class
|
|
7
|
+
export declare class OmpProtocolHandler implements ProtocolHandler {
|
|
8
8
|
#private;
|
|
9
|
-
readonly scheme = "
|
|
9
|
+
readonly scheme = "omp";
|
|
10
10
|
readonly immutable = true;
|
|
11
11
|
resolve(url: InternalUrl): Promise<InternalResource>;
|
|
12
12
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Types for the internal URL routing system.
|
|
3
3
|
*
|
|
4
|
-
* Internal URLs (agent://, artifact://, memory://, skill://, rule://, mcp://,
|
|
4
|
+
* Internal URLs (agent://, artifact://, memory://, skill://, rule://, mcp://, omp://, local://) are resolved by tools like read,
|
|
5
5
|
* providing access to agent outputs and server resources without exposing filesystem paths.
|
|
6
6
|
*/
|
|
7
7
|
/**
|
package/dist/types/main.d.ts
CHANGED
|
@@ -5,13 +5,22 @@
|
|
|
5
5
|
* createAgentSession() options. The SDK does the heavy lifting.
|
|
6
6
|
*/
|
|
7
7
|
import type { Args } from "./cli/args";
|
|
8
|
-
import {
|
|
8
|
+
import { Settings } from "./config/settings";
|
|
9
|
+
import { InteractiveMode, runAcpMode } from "./modes";
|
|
9
10
|
import type { SubmittedUserInput } from "./modes/types";
|
|
11
|
+
import { createAgentSession, discoverAuthStorage } from "./sdk";
|
|
10
12
|
import type { AgentSession } from "./session/agent-session";
|
|
11
13
|
export interface InteractiveModeNotify {
|
|
12
14
|
kind: "warn" | "error" | "info";
|
|
13
15
|
message: string;
|
|
14
16
|
}
|
|
15
17
|
export declare function submitInteractiveInput(mode: Pick<InteractiveMode, "markPendingSubmissionStarted" | "finishPendingSubmission" | "showError" | "checkShutdownRequested">, session: Pick<AgentSession, "prompt" | "promptCustomMessage">, input: SubmittedUserInput): Promise<void>;
|
|
16
|
-
|
|
18
|
+
interface RunRootCommandDependencies {
|
|
19
|
+
createAgentSession?: typeof createAgentSession;
|
|
20
|
+
discoverAuthStorage?: typeof discoverAuthStorage;
|
|
21
|
+
runAcpMode?: typeof runAcpMode;
|
|
22
|
+
settings?: Settings;
|
|
23
|
+
}
|
|
24
|
+
export declare function runRootCommand(parsed: Args, rawArgs: string[], deps?: RunRootCommandDependencies): Promise<void>;
|
|
17
25
|
export declare function main(args: string[]): Promise<void>;
|
|
26
|
+
export {};
|
|
@@ -30,7 +30,8 @@ type CreateAcpSession = (cwd: string) => Promise<AgentSession>;
|
|
|
30
30
|
export declare function createAcpExtensionUiContext(connection: AgentSideConnection, getSessionId: () => string, clientCapabilities: ClientCapabilities | undefined): ExtensionUIContext;
|
|
31
31
|
export declare class AcpAgent implements Agent {
|
|
32
32
|
#private;
|
|
33
|
-
constructor(connection: AgentSideConnection,
|
|
33
|
+
constructor(connection: AgentSideConnection, createSession: CreateAcpSession, initialSession?: AgentSession);
|
|
34
|
+
setCancelCleanupTimeoutForTesting(timeoutMs: number): void;
|
|
34
35
|
initialize(params: InitializeRequest): Promise<InitializeResponse>;
|
|
35
36
|
authenticate(params: AuthenticateRequest): Promise<AuthenticateResponse>;
|
|
36
37
|
newSession(params: NewSessionRequest): Promise<NewSessionResponse>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SessionNotification, ToolKind } from "@agentclientprotocol/sdk";
|
|
1
|
+
import type { SessionNotification, SessionUpdate, ToolKind } from "@agentclientprotocol/sdk";
|
|
2
2
|
import type { AgentSessionEvent } from "../../session/agent-session";
|
|
3
3
|
interface MessageProgress {
|
|
4
4
|
textEmitted: boolean;
|
|
@@ -7,6 +7,7 @@ interface MessageProgress {
|
|
|
7
7
|
interface AcpEventMapperOptions {
|
|
8
8
|
getMessageId?: (message: unknown) => string | undefined;
|
|
9
9
|
getMessageProgress?: (message: unknown) => MessageProgress | undefined;
|
|
10
|
+
getToolArgs?: (toolCallId: string) => unknown;
|
|
10
11
|
/**
|
|
11
12
|
* Session cwd. Tool call locations sent to ACP clients must be absolute
|
|
12
13
|
* (the editor host needs them to open or focus files). When provided,
|
|
@@ -17,4 +18,15 @@ interface AcpEventMapperOptions {
|
|
|
17
18
|
}
|
|
18
19
|
export declare function mapToolKind(toolName: string): ToolKind;
|
|
19
20
|
export declare function mapAgentSessionEventToAcpSessionUpdates(event: AgentSessionEvent, sessionId: string, options?: AcpEventMapperOptions): SessionNotification[];
|
|
21
|
+
export declare function buildToolCallStartUpdate(input: {
|
|
22
|
+
toolCallId: string;
|
|
23
|
+
toolName: string;
|
|
24
|
+
args: unknown;
|
|
25
|
+
intent?: string;
|
|
26
|
+
cwd?: string;
|
|
27
|
+
status?: "pending" | "completed";
|
|
28
|
+
}): SessionUpdate;
|
|
29
|
+
export declare function normalizeReplayToolArguments(value: unknown): {
|
|
30
|
+
args: unknown;
|
|
31
|
+
};
|
|
20
32
|
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { AgentSideConnection, type Stream } from "@agentclientprotocol/sdk";
|
|
1
2
|
import type { AgentSession } from "../../session/agent-session";
|
|
2
3
|
export type AcpSessionFactory = (cwd: string) => Promise<AgentSession>;
|
|
3
|
-
export declare function
|
|
4
|
+
export declare function createAcpConnection(transport: Stream, createSession: AcpSessionFactory, initialSession?: AgentSession): AgentSideConnection;
|
|
5
|
+
export declare function runAcpMode(createSession: AcpSessionFactory, initialSession?: AgentSession): Promise<never>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AutocompleteItem } from "@oh-my-pi/pi-tui";
|
|
2
|
+
export declare function getEmojiSuggestions(textBeforeCursor: string): {
|
|
3
|
+
items: AutocompleteItem[];
|
|
4
|
+
prefix: string;
|
|
5
|
+
} | null;
|
|
6
|
+
export declare function applyEmojiCompletion(lines: string[], cursorLine: number, cursorCol: number, item: AutocompleteItem, prefix: string): {
|
|
7
|
+
lines: string[];
|
|
8
|
+
cursorLine: number;
|
|
9
|
+
cursorCol: number;
|
|
10
|
+
};
|
|
11
|
+
export declare function tryEmojiInlineReplace(textBeforeCursor: string): {
|
|
12
|
+
replaceLen: number;
|
|
13
|
+
insert: string;
|
|
14
|
+
} | null;
|
|
15
|
+
export declare function isEmojiPrefix(prefix: string): boolean;
|
|
16
|
+
export declare function expandEmoticons(text: string): string;
|
|
@@ -4,7 +4,7 @@ import { type AssistantMessage, type ImageContent, type Message, type UsageRepor
|
|
|
4
4
|
import type { Component, EditorTheme } from "@oh-my-pi/pi-tui";
|
|
5
5
|
import { Container, Loader, Spacer, Text, TUI } from "@oh-my-pi/pi-tui";
|
|
6
6
|
import { KeybindingsManager } from "../config/keybindings";
|
|
7
|
-
import {
|
|
7
|
+
import { Settings } from "../config/settings";
|
|
8
8
|
import type { ExtensionUIContext, ExtensionUIDialogOptions, ExtensionWidgetContent, ExtensionWidgetOptions } from "../extensibility/extensions";
|
|
9
9
|
import type { CompactOptions } from "../extensibility/extensions/types";
|
|
10
10
|
import { type PlanApprovalDetails } from "../plan-mode/approved-plan";
|
|
@@ -37,6 +37,10 @@ export declare class PromptActionAutocompleteProvider implements AutocompletePro
|
|
|
37
37
|
items: AutocompleteItem[];
|
|
38
38
|
prefix: string;
|
|
39
39
|
} | null;
|
|
40
|
+
trySyncInlineReplace(textBeforeCursor: string): {
|
|
41
|
+
replaceLen: number;
|
|
42
|
+
insert: string;
|
|
43
|
+
} | null;
|
|
40
44
|
}
|
|
41
45
|
export declare function createPromptActionAutocompleteProvider(options: PromptActionAutocompleteOptions): PromptActionAutocompleteProvider;
|
|
42
46
|
export {};
|