@oh-my-pi/pi-coding-agent 16.1.12 → 16.1.14
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 +27 -0
- package/dist/cli.js +5650 -2860
- package/dist/types/config/settings-schema.d.ts +44 -14
- package/dist/types/cursor.d.ts +9 -9
- package/dist/types/eval/__tests__/julia-prelude.test.d.ts +1 -0
- package/dist/types/eval/backend-helpers.d.ts +23 -0
- package/dist/types/eval/executor-base.d.ts +118 -0
- package/dist/types/eval/index.d.ts +2 -0
- package/dist/types/eval/jl/executor.d.ts +44 -0
- package/dist/types/eval/jl/index.d.ts +11 -0
- package/dist/types/eval/jl/kernel.d.ts +28 -0
- package/dist/types/eval/jl/prelude.d.ts +1 -0
- package/dist/types/eval/jl/runtime.d.ts +22 -0
- package/dist/types/eval/kernel-base.d.ts +105 -0
- package/dist/types/eval/py/kernel.d.ts +3 -61
- package/dist/types/eval/rb/executor.d.ts +77 -0
- package/dist/types/eval/rb/index.d.ts +11 -0
- package/dist/types/eval/rb/kernel.d.ts +31 -0
- package/dist/types/eval/rb/prelude.d.ts +1 -0
- package/dist/types/eval/rb/runtime.d.ts +23 -0
- package/dist/types/eval/runtime-env.d.ts +24 -0
- package/dist/types/eval/types.d.ts +3 -3
- package/dist/types/extensibility/extensions/runner.d.ts +2 -15
- package/dist/types/extensibility/hooks/loader.d.ts +1 -25
- package/dist/types/extensibility/session-handler-types.d.ts +23 -0
- package/dist/types/jsonrpc/message-framing.d.ts +35 -0
- package/dist/types/mnemopi/embed-client.d.ts +7 -24
- package/dist/types/modes/components/chat-transcript-builder.d.ts +1 -1
- package/dist/types/modes/components/custom-editor.d.ts +11 -0
- package/dist/types/modes/components/selector-helpers.d.ts +53 -0
- package/dist/types/modes/interactive-mode.d.ts +0 -2
- package/dist/types/modes/theme/theme.d.ts +8 -1
- package/dist/types/modes/types.d.ts +0 -2
- package/dist/types/modes/utils/copy-targets.d.ts +1 -1
- package/dist/types/modes/utils/interactive-context-helpers.d.ts +14 -0
- package/dist/types/modes/utils/transcript-render-helpers.d.ts +54 -0
- package/dist/types/sdk.d.ts +1 -1
- package/dist/types/session/agent-session.d.ts +2 -2
- package/dist/types/stt/asr-client.d.ts +3 -29
- package/dist/types/subprocess/worker-client.d.ts +149 -0
- package/dist/types/subprocess/worker-runtime.d.ts +107 -0
- package/dist/types/tiny/title-client.d.ts +14 -34
- package/dist/types/tools/eval-backends.d.ts +6 -3
- package/dist/types/tools/eval-render.d.ts +6 -5
- package/dist/types/tools/eval.d.ts +13 -15
- package/dist/types/tools/index.d.ts +3 -3
- package/dist/types/tts/tts-client.d.ts +3 -28
- package/dist/types/tui/code-cell.d.ts +7 -0
- package/dist/types/utils/file-display-mode.d.ts +1 -1
- package/dist/types/web/parallel.d.ts +6 -0
- package/package.json +12 -12
- package/src/config/settings-schema.ts +50 -18
- package/src/config/settings.ts +5 -0
- package/src/dap/client.ts +13 -107
- package/src/eval/__tests__/julia-prelude.test.ts +77 -0
- package/src/eval/backend-helpers.ts +48 -0
- package/src/eval/executor-base.ts +425 -0
- package/src/eval/index.ts +2 -0
- package/src/eval/jl/executor.ts +540 -0
- package/src/eval/jl/index.ts +54 -0
- package/src/eval/jl/kernel.ts +235 -0
- package/src/eval/jl/prelude.jl +930 -0
- package/src/eval/jl/prelude.ts +3 -0
- package/src/eval/jl/runner.jl +634 -0
- package/src/eval/jl/runtime.ts +118 -0
- package/src/eval/js/index.ts +3 -14
- package/src/eval/kernel-base.ts +569 -0
- package/src/eval/py/executor.ts +43 -252
- package/src/eval/py/index.ts +9 -20
- package/src/eval/py/kernel.ts +29 -544
- package/src/eval/rb/executor.ts +504 -0
- package/src/eval/rb/index.ts +54 -0
- package/src/eval/rb/kernel.ts +230 -0
- package/src/eval/rb/prelude.rb +721 -0
- package/src/eval/rb/prelude.ts +3 -0
- package/src/eval/rb/runner.rb +474 -0
- package/src/eval/rb/runtime.ts +132 -0
- package/src/eval/runtime-env.ts +104 -0
- package/src/eval/types.ts +3 -3
- package/src/extensibility/extensions/runner.ts +4 -11
- package/src/extensibility/hooks/loader.ts +3 -21
- package/src/extensibility/session-handler-types.ts +21 -0
- package/src/internal-urls/docs-index.generated.txt +1 -1
- package/src/jsonrpc/message-framing.ts +142 -0
- package/src/lsp/client.ts +13 -109
- package/src/mnemopi/embed-client.ts +43 -198
- package/src/modes/components/agent-dashboard.ts +17 -40
- package/src/modes/components/chat-transcript-builder.ts +18 -102
- package/src/modes/components/custom-editor.ts +19 -0
- package/src/modes/components/extensions/extension-dashboard.ts +4 -13
- package/src/modes/components/extensions/extension-list.ts +16 -44
- package/src/modes/components/history-search.ts +4 -16
- package/src/modes/components/selector-helpers.ts +129 -0
- package/src/modes/components/settings-selector.ts +7 -5
- package/src/modes/components/tree-selector.ts +13 -18
- package/src/modes/controllers/event-controller.ts +3 -9
- package/src/modes/controllers/input-controller.ts +32 -54
- package/src/modes/interactive-mode.ts +5 -7
- package/src/modes/theme/theme.ts +35 -0
- package/src/modes/types.ts +0 -2
- package/src/modes/utils/copy-targets.ts +3 -2
- package/src/modes/utils/interactive-context-helpers.ts +27 -0
- package/src/modes/utils/transcript-render-helpers.ts +157 -0
- package/src/modes/utils/ui-helpers.ts +21 -126
- package/src/prompts/system/system-prompt.md +10 -10
- package/src/prompts/tools/bash.md +0 -1
- package/src/prompts/tools/eval.md +6 -4
- package/src/prompts/tools/find.md +0 -4
- package/src/prompts/tools/read.md +1 -2
- package/src/prompts/tools/replace.md +1 -1
- package/src/prompts/tools/search.md +0 -1
- package/src/sdk.ts +13 -7
- package/src/session/agent-session.ts +9 -7
- package/src/stt/asr-client.ts +35 -215
- package/src/stt/asr-worker.ts +29 -181
- package/src/subprocess/worker-client.ts +297 -0
- package/src/subprocess/worker-runtime.ts +277 -0
- package/src/task/executor.ts +4 -4
- package/src/tiny/title-client.ts +53 -219
- package/src/tiny/worker.ts +29 -180
- package/src/tools/eval-backends.ts +10 -3
- package/src/tools/eval-render.ts +17 -8
- package/src/tools/eval.ts +187 -22
- package/src/tools/index.ts +51 -28
- package/src/tts/tts-client.ts +38 -206
- package/src/tts/tts-worker.ts +23 -97
- package/src/tui/code-cell.ts +12 -1
- package/src/utils/file-display-mode.ts +2 -3
- package/src/web/parallel.ts +43 -42
- package/src/web/search/providers/parallel.ts +10 -99
package/src/eval/types.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/** Runtime backend that an eval cell dispatches to. */
|
|
2
|
-
export type EvalLanguage = "python" | "js";
|
|
2
|
+
export type EvalLanguage = "python" | "js" | "ruby" | "julia";
|
|
3
3
|
|
|
4
4
|
import type { ImageContent } from "@oh-my-pi/pi-ai";
|
|
5
5
|
import type { OutputMeta } from "../tools/output-meta";
|
|
6
6
|
|
|
7
|
-
/** Status event emitted by prelude helpers
|
|
7
|
+
/** Status event emitted by eval prelude helpers for TUI rendering. */
|
|
8
8
|
export interface EvalStatusEvent {
|
|
9
9
|
op: string;
|
|
10
10
|
[key: string]: unknown;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
/** Display output captured during eval execution
|
|
13
|
+
/** Display output captured during eval execution across supported backends. */
|
|
14
14
|
export type EvalDisplayOutput =
|
|
15
15
|
| { type: "json"; data: unknown }
|
|
16
16
|
| { type: "image"; data: string; mimeType: string }
|
|
@@ -10,6 +10,7 @@ import type { Settings } from "../../config/settings";
|
|
|
10
10
|
import type { MemoryRuntimeContext } from "../../memory-backend";
|
|
11
11
|
import { type Theme, theme } from "../../modes/theme/theme";
|
|
12
12
|
import type { SessionManager } from "../../session/session-manager";
|
|
13
|
+
import type { BranchHandler, NavigateTreeHandler, NewSessionHandler } from "../session-handler-types";
|
|
13
14
|
import { createExtensionModelQuery } from "./model-api";
|
|
14
15
|
import type {
|
|
15
16
|
AfterProviderResponseEvent,
|
|
@@ -141,17 +142,9 @@ type RunnerEmitResult<TEvent extends RunnerEmitEvent> = TEvent extends { type: "
|
|
|
141
142
|
? SessionStopEventResult | undefined
|
|
142
143
|
: undefined;
|
|
143
144
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}) => Promise<{ cancelled: boolean }>;
|
|
148
|
-
|
|
149
|
-
export type BranchHandler = (entryId: string) => Promise<{ cancelled: boolean }>;
|
|
150
|
-
|
|
151
|
-
export type NavigateTreeHandler = (
|
|
152
|
-
targetId: string,
|
|
153
|
-
options?: { summarize?: boolean },
|
|
154
|
-
) => Promise<{ cancelled: boolean }>;
|
|
145
|
+
// Session-lifecycle handler types live once in session-handler-types (imported
|
|
146
|
+
// above for local use); re-exported here to keep this module's public API stable.
|
|
147
|
+
export type { BranchHandler, NavigateTreeHandler, NewSessionHandler };
|
|
155
148
|
|
|
156
149
|
export type SwitchSessionHandler = (sessionPath: string) => Promise<{ cancelled: boolean }>;
|
|
157
150
|
|
|
@@ -11,7 +11,6 @@ import { loadCapability } from "../../discovery";
|
|
|
11
11
|
// Runtime self-reference: dereference this namespace only inside loader functions to keep the index.ts cycle safe.
|
|
12
12
|
import * as PiCodingAgent from "../../index";
|
|
13
13
|
import type { HookMessage } from "../../session/messages";
|
|
14
|
-
import type { SessionManager } from "../../session/session-manager";
|
|
15
14
|
import * as typebox from "../typebox";
|
|
16
15
|
import { resolvePath } from "../utils";
|
|
17
16
|
import { execCommand } from "./runner";
|
|
@@ -35,26 +34,9 @@ export type SendMessageHandler = <T = unknown>(
|
|
|
35
34
|
*/
|
|
36
35
|
export type AppendEntryHandler = <T = unknown>(customType: string, data?: T) => void;
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
export type NewSessionHandler = (options?: {
|
|
42
|
-
parentSession?: string;
|
|
43
|
-
setup?: (sessionManager: SessionManager) => Promise<void>;
|
|
44
|
-
}) => Promise<{ cancelled: boolean }>;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Branch handler type for ctx.branch() in HookCommandContext.
|
|
48
|
-
*/
|
|
49
|
-
export type BranchHandler = (entryId: string) => Promise<{ cancelled: boolean }>;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Navigate tree handler type for ctx.navigateTree() in HookCommandContext.
|
|
53
|
-
*/
|
|
54
|
-
export type NavigateTreeHandler = (
|
|
55
|
-
targetId: string,
|
|
56
|
-
options?: { summarize?: boolean },
|
|
57
|
-
) => Promise<{ cancelled: boolean }>;
|
|
37
|
+
// Session-lifecycle handler types live once in session-handler-types; re-exported
|
|
38
|
+
// here because hooks/runner.ts imports them from this module.
|
|
39
|
+
export type { BranchHandler, NavigateTreeHandler, NewSessionHandler } from "../session-handler-types";
|
|
58
40
|
|
|
59
41
|
/**
|
|
60
42
|
* Registered handlers for a loaded hook.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session-lifecycle handler types shared by the extension runner and the hook
|
|
3
|
+
* loader/runner. Both surfaces wire the same new-session / branch / navigate
|
|
4
|
+
* handlers into their command contexts; this is the single source of truth.
|
|
5
|
+
*/
|
|
6
|
+
import type { SessionManager } from "../session/session-manager";
|
|
7
|
+
|
|
8
|
+
/** Handler for `ctx.newSession()` — creates (and optionally seeds) a session. */
|
|
9
|
+
export type NewSessionHandler = (options?: {
|
|
10
|
+
parentSession?: string;
|
|
11
|
+
setup?: (sessionManager: SessionManager) => Promise<void>;
|
|
12
|
+
}) => Promise<{ cancelled: boolean }>;
|
|
13
|
+
|
|
14
|
+
/** Handler for `ctx.branch()` — branches from a transcript entry. */
|
|
15
|
+
export type BranchHandler = (entryId: string) => Promise<{ cancelled: boolean }>;
|
|
16
|
+
|
|
17
|
+
/** Handler for `ctx.navigateTree()` — navigates the session tree. */
|
|
18
|
+
export type NavigateTreeHandler = (
|
|
19
|
+
targetId: string,
|
|
20
|
+
options?: { summarize?: boolean },
|
|
21
|
+
) => Promise<{ cancelled: boolean }>;
|