@oh-my-pi/pi-coding-agent 16.2.7 → 16.2.9
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 +53 -0
- package/dist/cli.js +3661 -3482
- package/dist/types/config/settings-schema.d.ts +97 -13
- package/dist/types/edit/hashline/filesystem.d.ts +1 -0
- package/dist/types/modes/components/mcp-add-wizard.d.ts +8 -0
- package/dist/types/modes/controllers/mcp-command-controller.d.ts +9 -0
- package/dist/types/session/agent-session.d.ts +1 -1
- package/dist/types/session/session-context.d.ts +0 -5
- package/dist/types/session/settings-stream-fn.d.ts +2 -2
- package/dist/types/stt/index.d.ts +1 -0
- package/dist/types/stt/stt-controller.d.ts +2 -0
- package/dist/types/stt/submit-trigger.d.ts +30 -0
- package/dist/types/task/index.d.ts +1 -1
- package/dist/types/task/types.d.ts +6 -6
- package/dist/types/tiny/models.d.ts +22 -8
- package/dist/types/tools/output-schema-validator.d.ts +10 -0
- package/package.json +12 -12
- package/src/commit/agentic/agent.ts +1 -1
- package/src/commit/agentic/prompts/system.md +1 -1
- package/src/commit/agentic/tools/analyze-file.ts +2 -2
- package/src/config/settings-schema.ts +54 -2
- package/src/debug/profiler.ts +7 -1
- package/src/discovery/builtin-rules/go-add-cleanup.md +32 -0
- package/src/discovery/builtin-rules/go-bench-loop.md +36 -0
- package/src/discovery/builtin-rules/go-exp-promoted.md +39 -0
- package/src/discovery/builtin-rules/go-ioutil.md +36 -0
- package/src/discovery/builtin-rules/go-join-hostport.md +29 -0
- package/src/discovery/builtin-rules/go-new-expr.md +44 -0
- package/src/discovery/builtin-rules/go-rand-v2.md +40 -0
- package/src/discovery/builtin-rules/go-range-int.md +45 -0
- package/src/discovery/builtin-rules/index.ts +16 -0
- package/src/edit/hashline/filesystem.ts +12 -0
- package/src/internal-urls/docs-index.generated.txt +1 -1
- package/src/mcp/oauth-flow.ts +35 -8
- package/src/modes/components/mcp-add-wizard.ts +43 -3
- package/src/modes/components/model-selector.ts +21 -9
- package/src/modes/controllers/event-controller.ts +9 -0
- package/src/modes/controllers/mcp-command-controller.ts +84 -3
- package/src/modes/controllers/tool-args-reveal.ts +1 -1
- package/src/modes/interactive-mode.ts +5 -4
- package/src/prompts/agents/tester.md +107 -0
- package/src/prompts/system/orchestrate-notice.md +2 -2
- package/src/prompts/system/system-prompt.md +2 -5
- package/src/prompts/system/thinking-loop-redirect.md +10 -0
- package/src/prompts/system/workflow-notice.md +1 -1
- package/src/prompts/tools/bash.md +1 -4
- package/src/prompts/tools/task.md +2 -9
- package/src/session/agent-session.ts +161 -24
- package/src/session/session-context.ts +13 -2
- package/src/session/settings-stream-fn.ts +12 -2
- package/src/stt/index.ts +1 -0
- package/src/stt/stt-controller.ts +31 -2
- package/src/stt/submit-trigger.ts +74 -0
- package/src/task/agents.ts +4 -4
- package/src/task/executor.ts +1 -1
- package/src/task/index.ts +18 -5
- package/src/task/types.ts +5 -5
- package/src/tiny/models.ts +10 -0
- package/src/tools/grep.ts +19 -1
- package/src/tools/output-schema-validator.ts +38 -0
- package/src/tools/yield.ts +52 -15
- package/src/prompts/agents/oracle.md +0 -54
|
@@ -1813,6 +1813,34 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
1813
1813
|
}[];
|
|
1814
1814
|
};
|
|
1815
1815
|
};
|
|
1816
|
+
readonly "stt.submitTrigger": {
|
|
1817
|
+
readonly type: "enum";
|
|
1818
|
+
readonly values: readonly ["never", "release", "release-complete", "say-submit"];
|
|
1819
|
+
readonly default: "never";
|
|
1820
|
+
readonly ui: {
|
|
1821
|
+
readonly tab: "interaction";
|
|
1822
|
+
readonly group: "Speech";
|
|
1823
|
+
readonly label: "Speech-to-Text Submit Trigger";
|
|
1824
|
+
readonly description: "Choose when speech dictation automatically submits: Never, Release (2+ words), Release with complete sentence, or When I Say Submit.";
|
|
1825
|
+
readonly options: ({
|
|
1826
|
+
value: "never";
|
|
1827
|
+
label: string;
|
|
1828
|
+
description: string;
|
|
1829
|
+
} | {
|
|
1830
|
+
value: "release";
|
|
1831
|
+
label: string;
|
|
1832
|
+
description: string;
|
|
1833
|
+
} | {
|
|
1834
|
+
value: "release-complete";
|
|
1835
|
+
label: string;
|
|
1836
|
+
description: string;
|
|
1837
|
+
} | {
|
|
1838
|
+
value: "say-submit";
|
|
1839
|
+
label: string;
|
|
1840
|
+
description: string;
|
|
1841
|
+
})[];
|
|
1842
|
+
};
|
|
1843
|
+
};
|
|
1816
1844
|
readonly "contextPromotion.enabled": {
|
|
1817
1845
|
readonly type: "boolean";
|
|
1818
1846
|
readonly default: false;
|
|
@@ -4228,7 +4256,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
4228
4256
|
readonly tab: "tasks";
|
|
4229
4257
|
readonly group: "Subagents";
|
|
4230
4258
|
readonly label: "Soft Subagent Request Budget";
|
|
4231
|
-
readonly description: "Soft per-subagent request budget (assistant requests per run). Crossing it injects one steering notice asking the subagent to wrap up; at 1.5x the budget the run is aborted gracefully, salvaging partial output. 0 disables the guard. Bundled explore/
|
|
4259
|
+
readonly description: "Soft per-subagent request budget (assistant requests per run). Crossing it injects one steering notice asking the subagent to wrap up; at 1.5x the budget the run is aborted gracefully, salvaging partial output. 0 disables the guard. Bundled explore/sonic agents use a lower built-in budget.";
|
|
4232
4260
|
readonly options: readonly [{
|
|
4233
4261
|
readonly value: "0";
|
|
4234
4262
|
readonly label: "Disabled";
|
|
@@ -4847,7 +4875,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
4847
4875
|
};
|
|
4848
4876
|
readonly "providers.memoryModel": {
|
|
4849
4877
|
readonly type: "enum";
|
|
4850
|
-
readonly values: readonly ["online", "qwen3-1.7b", "gemma-3-1b", "qwen2.5-1.5b", "lfm2-1.2b"];
|
|
4878
|
+
readonly values: readonly ["online", "qwen3-1.7b", "llama3.2:3b", "gemma-3-1b", "qwen2.5-1.5b", "lfm2-1.2b"];
|
|
4851
4879
|
readonly default: "online";
|
|
4852
4880
|
readonly ui: {
|
|
4853
4881
|
readonly tab: "memory";
|
|
@@ -4860,15 +4888,15 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
4860
4888
|
label: string;
|
|
4861
4889
|
description: string;
|
|
4862
4890
|
} | {
|
|
4863
|
-
value: "gemma-3-1b" | "lfm2-1.2b" | "qwen2.5-1.5b" | "qwen3-1.7b";
|
|
4864
|
-
label: "Gemma 3 1B" | "LFM2 1.2B" | "Qwen2.5 1.5B" | "Qwen3 1.7B";
|
|
4865
|
-
description: "Best consolidation/dedup; lighter footprint, but leaks small talk during extraction." | "Best extraction granularity (atomic facts); weaker consolidation." | "Disabled for local inference: onnxruntime-node cannot run this ONNX export's RotaryEmbedding cache updates." | "Fastest load; solid all-rounder, slightly noisier extraction labels.";
|
|
4891
|
+
value: "gemma-3-1b" | "lfm2-1.2b" | "llama3.2:3b" | "qwen2.5-1.5b" | "qwen3-1.7b";
|
|
4892
|
+
label: "Gemma 3 1B" | "LFM2 1.2B" | "Llama 3.2 3B" | "Qwen2.5 1.5B" | "Qwen3 1.7B";
|
|
4893
|
+
description: "Best consolidation/dedup; lighter footprint, but leaks small talk during extraction." | "Best extraction granularity (atomic facts); weaker consolidation." | "Disabled for local inference: onnxruntime-node cannot run this ONNX export's RotaryEmbedding cache updates." | "Fastest load; solid all-rounder, slightly noisier extraction labels." | "Larger Llama 3.2 option for local memory/classifier tasks; higher quality potential at higher disk/RAM/latency cost.";
|
|
4866
4894
|
})[];
|
|
4867
4895
|
};
|
|
4868
4896
|
};
|
|
4869
4897
|
readonly "providers.autoThinkingModel": {
|
|
4870
4898
|
readonly type: "enum";
|
|
4871
|
-
readonly values: readonly ["online", "qwen3-1.7b", "gemma-3-1b", "qwen2.5-1.5b", "lfm2-1.2b"];
|
|
4899
|
+
readonly values: readonly ["online", "qwen3-1.7b", "llama3.2:3b", "gemma-3-1b", "qwen2.5-1.5b", "lfm2-1.2b"];
|
|
4872
4900
|
readonly default: "online";
|
|
4873
4901
|
readonly ui: {
|
|
4874
4902
|
readonly tab: "model";
|
|
@@ -4881,9 +4909,9 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
4881
4909
|
label: string;
|
|
4882
4910
|
description: string;
|
|
4883
4911
|
} | {
|
|
4884
|
-
value: "gemma-3-1b" | "lfm2-1.2b" | "qwen2.5-1.5b" | "qwen3-1.7b";
|
|
4885
|
-
label: "Gemma 3 1B" | "LFM2 1.2B" | "Qwen2.5 1.5B" | "Qwen3 1.7B";
|
|
4886
|
-
description: "Best consolidation/dedup; lighter footprint, but leaks small talk during extraction." | "Best extraction granularity (atomic facts); weaker consolidation." | "Disabled for local inference: onnxruntime-node cannot run this ONNX export's RotaryEmbedding cache updates." | "Fastest load; solid all-rounder, slightly noisier extraction labels.";
|
|
4912
|
+
value: "gemma-3-1b" | "lfm2-1.2b" | "llama3.2:3b" | "qwen2.5-1.5b" | "qwen3-1.7b";
|
|
4913
|
+
label: "Gemma 3 1B" | "LFM2 1.2B" | "Llama 3.2 3B" | "Qwen2.5 1.5B" | "Qwen3 1.7B";
|
|
4914
|
+
description: "Best consolidation/dedup; lighter footprint, but leaks small talk during extraction." | "Best extraction granularity (atomic facts); weaker consolidation." | "Disabled for local inference: onnxruntime-node cannot run this ONNX export's RotaryEmbedding cache updates." | "Fastest load; solid all-rounder, slightly noisier extraction labels." | "Larger Llama 3.2 option for local memory/classifier tasks; higher quality potential at higher disk/RAM/latency cost.";
|
|
4887
4915
|
})[];
|
|
4888
4916
|
};
|
|
4889
4917
|
};
|
|
@@ -4899,7 +4927,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
4899
4927
|
};
|
|
4900
4928
|
readonly "providers.unexpectedStopModel": {
|
|
4901
4929
|
readonly type: "enum";
|
|
4902
|
-
readonly values: readonly ["online", "qwen3-1.7b", "gemma-3-1b", "qwen2.5-1.5b", "lfm2-1.2b"];
|
|
4930
|
+
readonly values: readonly ["online", "qwen3-1.7b", "llama3.2:3b", "gemma-3-1b", "qwen2.5-1.5b", "lfm2-1.2b"];
|
|
4903
4931
|
readonly default: "online";
|
|
4904
4932
|
readonly ui: {
|
|
4905
4933
|
readonly tab: "providers";
|
|
@@ -4912,9 +4940,9 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
4912
4940
|
label: string;
|
|
4913
4941
|
description: string;
|
|
4914
4942
|
} | {
|
|
4915
|
-
value: "gemma-3-1b" | "lfm2-1.2b" | "qwen2.5-1.5b" | "qwen3-1.7b";
|
|
4916
|
-
label: "Gemma 3 1B" | "LFM2 1.2B" | "Qwen2.5 1.5B" | "Qwen3 1.7B";
|
|
4917
|
-
description: "Best consolidation/dedup; lighter footprint, but leaks small talk during extraction." | "Best extraction granularity (atomic facts); weaker consolidation." | "Disabled for local inference: onnxruntime-node cannot run this ONNX export's RotaryEmbedding cache updates." | "Fastest load; solid all-rounder, slightly noisier extraction labels.";
|
|
4943
|
+
value: "gemma-3-1b" | "lfm2-1.2b" | "llama3.2:3b" | "qwen2.5-1.5b" | "qwen3-1.7b";
|
|
4944
|
+
label: "Gemma 3 1B" | "LFM2 1.2B" | "Llama 3.2 3B" | "Qwen2.5 1.5B" | "Qwen3 1.7B";
|
|
4945
|
+
description: "Best consolidation/dedup; lighter footprint, but leaks small talk during extraction." | "Best extraction granularity (atomic facts); weaker consolidation." | "Disabled for local inference: onnxruntime-node cannot run this ONNX export's RotaryEmbedding cache updates." | "Fastest load; solid all-rounder, slightly noisier extraction labels." | "Larger Llama 3.2 option for local memory/classifier tasks; higher quality potential at higher disk/RAM/latency cost.";
|
|
4918
4946
|
})[];
|
|
4919
4947
|
};
|
|
4920
4948
|
};
|
|
@@ -4962,6 +4990,62 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
4962
4990
|
}];
|
|
4963
4991
|
};
|
|
4964
4992
|
};
|
|
4993
|
+
readonly "providers.streamFirstEventTimeoutSeconds": {
|
|
4994
|
+
readonly type: "number";
|
|
4995
|
+
readonly default: -1;
|
|
4996
|
+
readonly ui: {
|
|
4997
|
+
readonly tab: "providers";
|
|
4998
|
+
readonly group: "Timeouts";
|
|
4999
|
+
readonly label: "Stream First Event Timeout";
|
|
5000
|
+
readonly description: "Seconds to wait for the first model stream event; -1 uses provider/env defaults, 0 disables the watchdog";
|
|
5001
|
+
readonly options: readonly [{
|
|
5002
|
+
readonly value: "-1";
|
|
5003
|
+
readonly label: "Auto";
|
|
5004
|
+
readonly description: "Use provider defaults and PI_* timeout env vars";
|
|
5005
|
+
}, {
|
|
5006
|
+
readonly value: "0";
|
|
5007
|
+
readonly label: "Off";
|
|
5008
|
+
readonly description: "Disable first-event timeout";
|
|
5009
|
+
}, {
|
|
5010
|
+
readonly value: "300";
|
|
5011
|
+
readonly label: "5 minutes";
|
|
5012
|
+
}, {
|
|
5013
|
+
readonly value: "600";
|
|
5014
|
+
readonly label: "10 minutes";
|
|
5015
|
+
}, {
|
|
5016
|
+
readonly value: "1800";
|
|
5017
|
+
readonly label: "30 minutes";
|
|
5018
|
+
}];
|
|
5019
|
+
};
|
|
5020
|
+
};
|
|
5021
|
+
readonly "providers.streamIdleTimeoutSeconds": {
|
|
5022
|
+
readonly type: "number";
|
|
5023
|
+
readonly default: -1;
|
|
5024
|
+
readonly ui: {
|
|
5025
|
+
readonly tab: "providers";
|
|
5026
|
+
readonly group: "Timeouts";
|
|
5027
|
+
readonly label: "Stream Idle Timeout";
|
|
5028
|
+
readonly description: "Seconds a model stream may stay silent between events; -1 uses provider/env defaults, 0 disables the watchdog";
|
|
5029
|
+
readonly options: readonly [{
|
|
5030
|
+
readonly value: "-1";
|
|
5031
|
+
readonly label: "Auto";
|
|
5032
|
+
readonly description: "Use provider defaults and PI_* timeout env vars";
|
|
5033
|
+
}, {
|
|
5034
|
+
readonly value: "0";
|
|
5035
|
+
readonly label: "Off";
|
|
5036
|
+
readonly description: "Disable idle timeout";
|
|
5037
|
+
}, {
|
|
5038
|
+
readonly value: "300";
|
|
5039
|
+
readonly label: "5 minutes";
|
|
5040
|
+
}, {
|
|
5041
|
+
readonly value: "600";
|
|
5042
|
+
readonly label: "10 minutes";
|
|
5043
|
+
}, {
|
|
5044
|
+
readonly value: "1800";
|
|
5045
|
+
readonly label: "30 minutes";
|
|
5046
|
+
}];
|
|
5047
|
+
};
|
|
5048
|
+
};
|
|
4965
5049
|
readonly "providers.openrouterVariant": {
|
|
4966
5050
|
readonly type: "enum";
|
|
4967
5051
|
readonly values: readonly ["default", "nitro", "floor", "online", "exacto"];
|
|
@@ -34,6 +34,7 @@ export declare class HashlineFilesystem extends Filesystem {
|
|
|
34
34
|
canonicalPath(relativePath: string): string;
|
|
35
35
|
allowTagPathRecovery(authoredPath: string, resolvedPath: string): boolean;
|
|
36
36
|
readText(relativePath: string): Promise<string>;
|
|
37
|
+
readBinary(relativePath: string): Promise<Uint8Array | undefined>;
|
|
37
38
|
preflightWrite(relativePath: string, options?: PreflightWriteOptions): Promise<void>;
|
|
38
39
|
delete(relativePath: string): Promise<void>;
|
|
39
40
|
move(fromRelative: string, toRelative: string, content?: string): Promise<void>;
|
|
@@ -21,6 +21,14 @@ export interface MCPAddWizardOAuthResult {
|
|
|
21
21
|
interface MCPAddWizardOAuthOptions {
|
|
22
22
|
serverUrl?: string;
|
|
23
23
|
resource?: string;
|
|
24
|
+
/**
|
|
25
|
+
* External cancellation source. Aborting it tears down the in-flight OAuth
|
|
26
|
+
* flow and surfaces a neutral cancellation error. The wizard wires its own
|
|
27
|
+
* controller here so Esc cancels the OAuth wait instead of stepping back
|
|
28
|
+
* through the form (the wizard is focused, so the editor's Esc hook does
|
|
29
|
+
* not fire).
|
|
30
|
+
*/
|
|
31
|
+
abortSignal?: AbortSignal;
|
|
24
32
|
}
|
|
25
33
|
export declare class MCPAddWizard extends Container {
|
|
26
34
|
#private;
|
|
@@ -7,6 +7,15 @@ export declare class MCPAuthorizationLinkPrompt implements Component {
|
|
|
7
7
|
invalidate(): void;
|
|
8
8
|
render(_width: number): readonly string[];
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Thrown by {@link MCPCommandController}'s OAuth handler when the user (or a
|
|
12
|
+
* caller-supplied {@link AbortSignal}) cancels the in-flight flow. Distinct
|
|
13
|
+
* from network/timeout failures so callers can surface a neutral
|
|
14
|
+
* "cancelled" status instead of an error banner.
|
|
15
|
+
*/
|
|
16
|
+
export declare class MCPOAuthCancelledError extends Error {
|
|
17
|
+
constructor(message?: string);
|
|
18
|
+
}
|
|
10
19
|
export declare class MCPCommandController {
|
|
11
20
|
#private;
|
|
12
21
|
private ctx;
|
|
@@ -871,7 +871,7 @@ export declare class AgentSession {
|
|
|
871
871
|
* log but NOT to settings.
|
|
872
872
|
* @throws Error if no API key available for the model
|
|
873
873
|
*/
|
|
874
|
-
setModelTemporary(model: Model, thinkingLevel?:
|
|
874
|
+
setModelTemporary(model: Model, thinkingLevel?: ConfiguredThinkingLevel, options?: {
|
|
875
875
|
ephemeral?: boolean;
|
|
876
876
|
}): Promise<void>;
|
|
877
877
|
/**
|
|
@@ -41,9 +41,4 @@ export interface BuildSessionContextOptions {
|
|
|
41
41
|
/** In transcript mode, elide entries replaced by the latest compaction. */
|
|
42
42
|
collapseCompactedHistory?: boolean;
|
|
43
43
|
}
|
|
44
|
-
/**
|
|
45
|
-
* Build the session context from entries using tree traversal.
|
|
46
|
-
* If leafId is provided, walks from that entry to root.
|
|
47
|
-
* Handles compaction and branch summaries along the path.
|
|
48
|
-
*/
|
|
49
44
|
export declare function buildSessionContext(entries: SessionEntry[], leafId?: string | null, byId?: Map<string, SessionEntry>, options?: BuildSessionContextOptions): SessionContext;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Settings-aware stream wrapper shared by the main agent (sdk.ts) and the
|
|
3
3
|
* advisor agent (AgentSession.#buildAdvisorRuntime).
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* verbosity, stream watchdog budgets, per-provider in-flight caps, and the loop
|
|
6
|
+
* guard out of `Settings`
|
|
7
7
|
* per request, layering them onto whatever options the caller passed. Before
|
|
8
8
|
* this helper existed, advisor turns called bare `streamSimple` while the main
|
|
9
9
|
* turn went through an inline closure that read these settings — so an advisor on
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TTS/STT Submit Trigger options and evaluation logic.
|
|
3
|
+
*/
|
|
4
|
+
export declare const STT_SUBMIT_TRIGGER_VALUES: readonly ["never", "release", "release-complete", "say-submit"];
|
|
5
|
+
export type SttSubmitTrigger = (typeof STT_SUBMIT_TRIGGER_VALUES)[number];
|
|
6
|
+
export declare const STT_SUBMIT_TRIGGER_OPTIONS: ({
|
|
7
|
+
value: "never";
|
|
8
|
+
label: string;
|
|
9
|
+
description: string;
|
|
10
|
+
} | {
|
|
11
|
+
value: "release";
|
|
12
|
+
label: string;
|
|
13
|
+
description: string;
|
|
14
|
+
} | {
|
|
15
|
+
value: "release-complete";
|
|
16
|
+
label: string;
|
|
17
|
+
description: string;
|
|
18
|
+
} | {
|
|
19
|
+
value: "say-submit";
|
|
20
|
+
label: string;
|
|
21
|
+
description: string;
|
|
22
|
+
})[];
|
|
23
|
+
/**
|
|
24
|
+
* Evaluate the submit trigger against a transcribed utterance.
|
|
25
|
+
* Returns whether to submit, and the number of characters to trim from the end of the utterance.
|
|
26
|
+
*/
|
|
27
|
+
export declare function evaluateSubmitTrigger(utterance: string, trigger: SttSubmitTrigger): {
|
|
28
|
+
submit: boolean;
|
|
29
|
+
trimTrailing: number;
|
|
30
|
+
};
|
|
@@ -22,7 +22,7 @@ export declare function formatResultOutputFallback(result: Pick<SingleResult, "o
|
|
|
22
22
|
* Advisory — never a rejection — nudging the spawner toward tailored
|
|
23
23
|
* specialists when it spawns generic role-less workers and still holds spawn
|
|
24
24
|
* capacity (DepthCapacity: it currently has the `task` tool). Fires when a
|
|
25
|
-
* generic `task`/`
|
|
25
|
+
* generic `task`/`sonic` spawn carries no `role`, or when one call clones
|
|
26
26
|
* the same agent ≥2× all without roles. Returns undefined when no nudge applies.
|
|
27
27
|
*/
|
|
28
28
|
export declare function buildSpecializationAdvisory(agentName: string | undefined, items: TaskItem[], depthCapacity: boolean): string | undefined;
|
|
@@ -74,7 +74,7 @@ export interface TaskItem {
|
|
|
74
74
|
isolated?: boolean;
|
|
75
75
|
}
|
|
76
76
|
export declare const taskSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
77
|
-
agent: string
|
|
77
|
+
agent: import("arktype/internal/attributes.ts").Default<string, "task">;
|
|
78
78
|
id?: string | undefined;
|
|
79
79
|
description?: string | undefined;
|
|
80
80
|
role?: string | undefined;
|
|
@@ -82,20 +82,20 @@ export declare const taskSchema: import("arktype/internal/variants/object.ts").O
|
|
|
82
82
|
isolated?: boolean | undefined;
|
|
83
83
|
}, {}>;
|
|
84
84
|
declare const ALL_TASK_SCHEMAS: readonly [import("arktype/internal/variants/object.ts").ObjectType<{
|
|
85
|
-
agent: string
|
|
85
|
+
agent: import("arktype/internal/attributes.ts").Default<string, "task">;
|
|
86
86
|
id?: string | undefined;
|
|
87
87
|
description?: string | undefined;
|
|
88
88
|
role?: string | undefined;
|
|
89
89
|
assignment: string;
|
|
90
90
|
isolated?: boolean | undefined;
|
|
91
91
|
}, {}>, import("arktype/internal/variants/object.ts").ObjectType<{
|
|
92
|
-
agent: string
|
|
92
|
+
agent: import("arktype/internal/attributes.ts").Default<string, "task">;
|
|
93
93
|
id?: string | undefined;
|
|
94
94
|
description?: string | undefined;
|
|
95
95
|
role?: string | undefined;
|
|
96
96
|
assignment: string;
|
|
97
97
|
}, {}>, import("arktype/internal/variants/object.ts").ObjectType<{
|
|
98
|
-
agent: string
|
|
98
|
+
agent: import("arktype/internal/attributes.ts").Default<string, "task">;
|
|
99
99
|
context: string;
|
|
100
100
|
tasks: {
|
|
101
101
|
id?: string | undefined;
|
|
@@ -105,7 +105,7 @@ declare const ALL_TASK_SCHEMAS: readonly [import("arktype/internal/variants/obje
|
|
|
105
105
|
isolated?: boolean | undefined;
|
|
106
106
|
}[];
|
|
107
107
|
}, {}>, import("arktype/internal/variants/object.ts").ObjectType<{
|
|
108
|
-
agent: string
|
|
108
|
+
agent: import("arktype/internal/attributes.ts").Default<string, "task">;
|
|
109
109
|
context: string;
|
|
110
110
|
tasks: {
|
|
111
111
|
id?: string | undefined;
|
|
@@ -129,7 +129,7 @@ export declare function getTaskSchema(options: {
|
|
|
129
129
|
* transcripts using the flat form keep working under either setting.
|
|
130
130
|
*/
|
|
131
131
|
export interface TaskParams {
|
|
132
|
-
/** Agent type;
|
|
132
|
+
/** Agent type to spawn; defaults to `"task"` (the general-purpose worker) when omitted. */
|
|
133
133
|
agent?: string;
|
|
134
134
|
/** Stable agent id (flat form); default = generated AdjectiveNoun. */
|
|
135
135
|
id?: string;
|
|
@@ -84,6 +84,13 @@ export declare const TINY_MEMORY_LOCAL_MODELS: readonly [{
|
|
|
84
84
|
readonly contextNote: "Blocked before load to avoid the unsupported RotaryEmbedding runtime path.";
|
|
85
85
|
readonly reasoning: true;
|
|
86
86
|
readonly unsupportedReason: "onnxruntime-node does not support Qwen3 RotaryEmbedding cache updates in onnx-community/Qwen3-1.7B-ONNX";
|
|
87
|
+
}, {
|
|
88
|
+
readonly key: "llama3.2:3b";
|
|
89
|
+
readonly repo: "onnx-community/Llama-3.2-3B-Instruct-ONNX";
|
|
90
|
+
readonly dtype: "q4";
|
|
91
|
+
readonly label: "Llama 3.2 3B";
|
|
92
|
+
readonly description: "Larger Llama 3.2 option for local memory/classifier tasks; higher quality potential at higher disk/RAM/latency cost.";
|
|
93
|
+
readonly contextNote: "Use when larger model capacity is preferred over faster load times.";
|
|
87
94
|
}, {
|
|
88
95
|
readonly key: "gemma-3-1b";
|
|
89
96
|
readonly repo: "onnx-community/gemma-3-1b-it-ONNX";
|
|
@@ -106,7 +113,7 @@ export declare const TINY_MEMORY_LOCAL_MODELS: readonly [{
|
|
|
106
113
|
readonly description: "Fastest load; solid all-rounder, slightly noisier extraction labels.";
|
|
107
114
|
readonly contextNote: "Use when local startup cost is the priority.";
|
|
108
115
|
}];
|
|
109
|
-
export declare const TINY_MEMORY_MODEL_VALUES: readonly ["online", "qwen3-1.7b", "gemma-3-1b", "qwen2.5-1.5b", "lfm2-1.2b"];
|
|
116
|
+
export declare const TINY_MEMORY_MODEL_VALUES: readonly ["online", "qwen3-1.7b", "llama3.2:3b", "gemma-3-1b", "qwen2.5-1.5b", "lfm2-1.2b"];
|
|
110
117
|
export type TinyMemoryModelKey = (typeof TINY_MEMORY_MODEL_VALUES)[number];
|
|
111
118
|
export type TinyMemoryLocalModelKey = (typeof TINY_MEMORY_LOCAL_MODELS)[number]["key"];
|
|
112
119
|
export declare const TINY_MEMORY_MODEL_OPTIONS: ({
|
|
@@ -114,9 +121,9 @@ export declare const TINY_MEMORY_MODEL_OPTIONS: ({
|
|
|
114
121
|
label: string;
|
|
115
122
|
description: string;
|
|
116
123
|
} | {
|
|
117
|
-
value: "gemma-3-1b" | "lfm2-1.2b" | "qwen2.5-1.5b" | "qwen3-1.7b";
|
|
118
|
-
label: "Gemma 3 1B" | "LFM2 1.2B" | "Qwen2.5 1.5B" | "Qwen3 1.7B";
|
|
119
|
-
description: "Best consolidation/dedup; lighter footprint, but leaks small talk during extraction." | "Best extraction granularity (atomic facts); weaker consolidation." | "Disabled for local inference: onnxruntime-node cannot run this ONNX export's RotaryEmbedding cache updates." | "Fastest load; solid all-rounder, slightly noisier extraction labels.";
|
|
124
|
+
value: "gemma-3-1b" | "lfm2-1.2b" | "llama3.2:3b" | "qwen2.5-1.5b" | "qwen3-1.7b";
|
|
125
|
+
label: "Gemma 3 1B" | "LFM2 1.2B" | "Llama 3.2 3B" | "Qwen2.5 1.5B" | "Qwen3 1.7B";
|
|
126
|
+
description: "Best consolidation/dedup; lighter footprint, but leaks small talk during extraction." | "Best extraction granularity (atomic facts); weaker consolidation." | "Disabled for local inference: onnxruntime-node cannot run this ONNX export's RotaryEmbedding cache updates." | "Fastest load; solid all-rounder, slightly noisier extraction labels." | "Larger Llama 3.2 option for local memory/classifier tasks; higher quality potential at higher disk/RAM/latency cost.";
|
|
120
127
|
})[];
|
|
121
128
|
export declare function isTinyMemoryLocalModelKey(value: string): value is TinyMemoryLocalModelKey;
|
|
122
129
|
export declare function getTinyMemoryModelSpec(key: TinyMemoryLocalModelKey): (typeof TINY_MEMORY_LOCAL_MODELS)[number];
|
|
@@ -173,6 +180,13 @@ export declare const TINY_LOCAL_MODELS: readonly [{
|
|
|
173
180
|
readonly contextNote: "Blocked before load to avoid the unsupported RotaryEmbedding runtime path.";
|
|
174
181
|
readonly reasoning: true;
|
|
175
182
|
readonly unsupportedReason: "onnxruntime-node does not support Qwen3 RotaryEmbedding cache updates in onnx-community/Qwen3-1.7B-ONNX";
|
|
183
|
+
}, {
|
|
184
|
+
readonly key: "llama3.2:3b";
|
|
185
|
+
readonly repo: "onnx-community/Llama-3.2-3B-Instruct-ONNX";
|
|
186
|
+
readonly dtype: "q4";
|
|
187
|
+
readonly label: "Llama 3.2 3B";
|
|
188
|
+
readonly description: "Larger Llama 3.2 option for local memory/classifier tasks; higher quality potential at higher disk/RAM/latency cost.";
|
|
189
|
+
readonly contextNote: "Use when larger model capacity is preferred over faster load times.";
|
|
176
190
|
}, {
|
|
177
191
|
readonly key: "gemma-3-1b";
|
|
178
192
|
readonly repo: "onnx-community/gemma-3-1b-it-ONNX";
|
|
@@ -203,14 +217,14 @@ export declare const TINY_LOCAL_MODELS: readonly [{
|
|
|
203
217
|
* sub-1B title models.
|
|
204
218
|
*/
|
|
205
219
|
export declare const ONLINE_AUTO_THINKING_MODEL_KEY = "online";
|
|
206
|
-
export declare const AUTO_THINKING_MODEL_VALUES: readonly ["online", "qwen3-1.7b", "gemma-3-1b", "qwen2.5-1.5b", "lfm2-1.2b"];
|
|
220
|
+
export declare const AUTO_THINKING_MODEL_VALUES: readonly ["online", "qwen3-1.7b", "llama3.2:3b", "gemma-3-1b", "qwen2.5-1.5b", "lfm2-1.2b"];
|
|
207
221
|
export type AutoThinkingModelKey = TinyMemoryModelKey;
|
|
208
222
|
export declare const AUTO_THINKING_MODEL_OPTIONS: ({
|
|
209
223
|
value: "online";
|
|
210
224
|
label: string;
|
|
211
225
|
description: string;
|
|
212
226
|
} | {
|
|
213
|
-
value: "gemma-3-1b" | "lfm2-1.2b" | "qwen2.5-1.5b" | "qwen3-1.7b";
|
|
214
|
-
label: "Gemma 3 1B" | "LFM2 1.2B" | "Qwen2.5 1.5B" | "Qwen3 1.7B";
|
|
215
|
-
description: "Best consolidation/dedup; lighter footprint, but leaks small talk during extraction." | "Best extraction granularity (atomic facts); weaker consolidation." | "Disabled for local inference: onnxruntime-node cannot run this ONNX export's RotaryEmbedding cache updates." | "Fastest load; solid all-rounder, slightly noisier extraction labels.";
|
|
227
|
+
value: "gemma-3-1b" | "lfm2-1.2b" | "llama3.2:3b" | "qwen2.5-1.5b" | "qwen3-1.7b";
|
|
228
|
+
label: "Gemma 3 1B" | "LFM2 1.2B" | "Llama 3.2 3B" | "Qwen2.5 1.5B" | "Qwen3 1.7B";
|
|
229
|
+
description: "Best consolidation/dedup; lighter footprint, but leaks small talk during extraction." | "Best extraction granularity (atomic facts); weaker consolidation." | "Disabled for local inference: onnxruntime-node cannot run this ONNX export's RotaryEmbedding cache updates." | "Fastest load; solid all-rounder, slightly noisier extraction labels." | "Larger Llama 3.2 option for local memory/classifier tasks; higher quality potential at higher disk/RAM/latency cost.";
|
|
216
230
|
})[];
|
|
@@ -14,6 +14,16 @@ export interface OutputValidator {
|
|
|
14
14
|
validate(value: unknown): JsonSchemaValidationResult;
|
|
15
15
|
/** Top-level required property names. Empty if the schema has no `required` array at root. */
|
|
16
16
|
readonly requiredFields: readonly string[];
|
|
17
|
+
/**
|
|
18
|
+
* Per-label validators for incremental yields (`type: ["<label>"]`). Each entry validates the
|
|
19
|
+
* `data` payload of a single section against the matching top-level property's sub-schema —
|
|
20
|
+
* array-typed properties (e.g. `findings`) use the items schema since each yield contributes
|
|
21
|
+
* one element, while scalar properties use the property schema directly. Unknown labels (not
|
|
22
|
+
* top-level properties) have no entry and skip per-call validation. Lets the yield tool give
|
|
23
|
+
* the model retry feedback on a section as soon as it arrives, instead of deferring every
|
|
24
|
+
* mismatch to the parent's post-mortem `schema_violation`.
|
|
25
|
+
*/
|
|
26
|
+
readonly validateSection: ReadonlyMap<string, (value: unknown) => JsonSchemaValidationResult>;
|
|
17
27
|
}
|
|
18
28
|
export interface BuildOutputValidatorResult {
|
|
19
29
|
/** Present when the schema produced a usable validator (i.e. constraining schemas). Absent for missing/unconstrained schemas. */
|
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.2.
|
|
4
|
+
"version": "16.2.9",
|
|
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",
|
|
@@ -55,17 +55,17 @@
|
|
|
55
55
|
"@agentclientprotocol/sdk": "0.25.0",
|
|
56
56
|
"@babel/parser": "^7.29.7",
|
|
57
57
|
"@mozilla/readability": "^0.6.0",
|
|
58
|
-
"@oh-my-pi/hashline": "16.2.
|
|
59
|
-
"@oh-my-pi/omp-stats": "16.2.
|
|
60
|
-
"@oh-my-pi/pi-agent-core": "16.2.
|
|
61
|
-
"@oh-my-pi/pi-ai": "16.2.
|
|
62
|
-
"@oh-my-pi/pi-catalog": "16.2.
|
|
63
|
-
"@oh-my-pi/pi-mnemopi": "16.2.
|
|
64
|
-
"@oh-my-pi/pi-natives": "16.2.
|
|
65
|
-
"@oh-my-pi/pi-tui": "16.2.
|
|
66
|
-
"@oh-my-pi/pi-utils": "16.2.
|
|
67
|
-
"@oh-my-pi/pi-wire": "16.2.
|
|
68
|
-
"@oh-my-pi/snapcompact": "16.2.
|
|
58
|
+
"@oh-my-pi/hashline": "16.2.9",
|
|
59
|
+
"@oh-my-pi/omp-stats": "16.2.9",
|
|
60
|
+
"@oh-my-pi/pi-agent-core": "16.2.9",
|
|
61
|
+
"@oh-my-pi/pi-ai": "16.2.9",
|
|
62
|
+
"@oh-my-pi/pi-catalog": "16.2.9",
|
|
63
|
+
"@oh-my-pi/pi-mnemopi": "16.2.9",
|
|
64
|
+
"@oh-my-pi/pi-natives": "16.2.9",
|
|
65
|
+
"@oh-my-pi/pi-tui": "16.2.9",
|
|
66
|
+
"@oh-my-pi/pi-utils": "16.2.9",
|
|
67
|
+
"@oh-my-pi/pi-wire": "16.2.9",
|
|
68
|
+
"@oh-my-pi/snapcompact": "16.2.9",
|
|
69
69
|
"@opentelemetry/api": "^1.9.1",
|
|
70
70
|
"@opentelemetry/context-async-hooks": "^2.7.1",
|
|
71
71
|
"@opentelemetry/exporter-trace-otlp-proto": "^0.218.0",
|
|
@@ -42,7 +42,7 @@ export async function runCommitAgentSession(input: CommitAgentInput): Promise<Co
|
|
|
42
42
|
types_description: typesDescription,
|
|
43
43
|
});
|
|
44
44
|
const state: CommitAgentState = { diffText: input.diffText };
|
|
45
|
-
const spawns = "
|
|
45
|
+
const spawns = "sonic";
|
|
46
46
|
const tools = createCommitTools({
|
|
47
47
|
cwd: input.cwd,
|
|
48
48
|
authStorage: input.authStorage,
|
|
@@ -27,7 +27,7 @@ Tool guidance:
|
|
|
27
27
|
- git_file_diff: diff for specific files
|
|
28
28
|
- git_hunk: specific hunks for large diffs
|
|
29
29
|
- recent_commits: recent commit subjects + style stats
|
|
30
|
-
- analyze_files: spawn
|
|
30
|
+
- analyze_files: spawn sonic subagents in parallel for analysis
|
|
31
31
|
- propose_changelog: provide changelog entries for each changelog target
|
|
32
32
|
- propose_commit: submit final commit proposal and run validation
|
|
33
33
|
- split_commit: propose multiple commit groups (no overlapping files; all staged files covered)
|
|
@@ -63,7 +63,7 @@ export function createAnalyzeFileTool(options: {
|
|
|
63
63
|
return {
|
|
64
64
|
name: "analyze_files",
|
|
65
65
|
label: "Analyze Files",
|
|
66
|
-
description: "Spawn
|
|
66
|
+
description: "Spawn sonic agents to analyze files.",
|
|
67
67
|
parameters: analyzeFileSchema,
|
|
68
68
|
async execute(toolCallId, params, _onUpdate, ctx, signal) {
|
|
69
69
|
const toolSession = buildToolSession(ctx, options);
|
|
@@ -83,7 +83,7 @@ export function createAnalyzeFileTool(options: {
|
|
|
83
83
|
related_files: relatedFiles,
|
|
84
84
|
});
|
|
85
85
|
const taskParams: TaskParams = {
|
|
86
|
-
agent: "
|
|
86
|
+
agent: "sonic",
|
|
87
87
|
id: `AnalyzeFile${index + 1}`,
|
|
88
88
|
description: `Analyze ${file}`,
|
|
89
89
|
assignment,
|
|
@@ -3,6 +3,7 @@ import { DEFAULT_SHARE_URL } from "@oh-my-pi/pi-wire";
|
|
|
3
3
|
import { SHAPE_VARIANT_NAMES } from "@oh-my-pi/snapcompact";
|
|
4
4
|
import { DEFAULT_RELAY_URL } from "../collab/protocol";
|
|
5
5
|
import { DEFAULT_STT_MODEL_KEY, STT_MODEL_OPTIONS, STT_MODEL_VALUES } from "../stt/models";
|
|
6
|
+
import { STT_SUBMIT_TRIGGER_OPTIONS, STT_SUBMIT_TRIGGER_VALUES } from "../stt/submit-trigger";
|
|
6
7
|
import { AUTO_THINKING, getConfiguredThinkingLevelMetadata, getThinkingLevelMetadata } from "../thinking";
|
|
7
8
|
import {
|
|
8
9
|
TINY_MODEL_DEVICE_DEFAULT,
|
|
@@ -144,7 +145,7 @@ export const TAB_GROUPS: Record<SettingTab, readonly string[]> = {
|
|
|
144
145
|
"Developer",
|
|
145
146
|
],
|
|
146
147
|
tasks: ["Modes", "Subagents", "Isolation", "Commands & Skills"],
|
|
147
|
-
providers: ["Services", "Fireworks", "Tiny Model", "Protocol", "Privacy"],
|
|
148
|
+
providers: ["Services", "Fireworks", "Tiny Model", "Protocol", "Timeouts", "Privacy"],
|
|
148
149
|
};
|
|
149
150
|
|
|
150
151
|
/** Status line segment identifiers */
|
|
@@ -1794,6 +1795,19 @@ export const SETTINGS_SCHEMA = {
|
|
|
1794
1795
|
options: STT_MODEL_OPTIONS,
|
|
1795
1796
|
},
|
|
1796
1797
|
},
|
|
1798
|
+
"stt.submitTrigger": {
|
|
1799
|
+
type: "enum",
|
|
1800
|
+
values: STT_SUBMIT_TRIGGER_VALUES,
|
|
1801
|
+
default: "never",
|
|
1802
|
+
ui: {
|
|
1803
|
+
tab: "interaction",
|
|
1804
|
+
group: "Speech",
|
|
1805
|
+
label: "Speech-to-Text Submit Trigger",
|
|
1806
|
+
description:
|
|
1807
|
+
"Choose when speech dictation automatically submits: Never, Release (2+ words), Release with complete sentence, or When I Say Submit.",
|
|
1808
|
+
options: STT_SUBMIT_TRIGGER_OPTIONS,
|
|
1809
|
+
},
|
|
1810
|
+
},
|
|
1797
1811
|
|
|
1798
1812
|
// ────────────────────────────────────────────────────────────────────────
|
|
1799
1813
|
// Context
|
|
@@ -4081,7 +4095,7 @@ export const SETTINGS_SCHEMA = {
|
|
|
4081
4095
|
group: "Subagents",
|
|
4082
4096
|
label: "Soft Subagent Request Budget",
|
|
4083
4097
|
description:
|
|
4084
|
-
"Soft per-subagent request budget (assistant requests per run). Crossing it injects one steering notice asking the subagent to wrap up; at 1.5x the budget the run is aborted gracefully, salvaging partial output. 0 disables the guard. Bundled explore/
|
|
4098
|
+
"Soft per-subagent request budget (assistant requests per run). Crossing it injects one steering notice asking the subagent to wrap up; at 1.5x the budget the run is aborted gracefully, salvaging partial output. 0 disables the guard. Bundled explore/sonic agents use a lower built-in budget.",
|
|
4085
4099
|
options: [
|
|
4086
4100
|
{ value: "0", label: "Disabled" },
|
|
4087
4101
|
{ value: "40", label: "40 requests" },
|
|
@@ -4554,6 +4568,44 @@ export const SETTINGS_SCHEMA = {
|
|
|
4554
4568
|
},
|
|
4555
4569
|
},
|
|
4556
4570
|
|
|
4571
|
+
"providers.streamFirstEventTimeoutSeconds": {
|
|
4572
|
+
type: "number",
|
|
4573
|
+
default: -1,
|
|
4574
|
+
ui: {
|
|
4575
|
+
tab: "providers",
|
|
4576
|
+
group: "Timeouts",
|
|
4577
|
+
label: "Stream First Event Timeout",
|
|
4578
|
+
description:
|
|
4579
|
+
"Seconds to wait for the first model stream event; -1 uses provider/env defaults, 0 disables the watchdog",
|
|
4580
|
+
options: [
|
|
4581
|
+
{ value: "-1", label: "Auto", description: "Use provider defaults and PI_* timeout env vars" },
|
|
4582
|
+
{ value: "0", label: "Off", description: "Disable first-event timeout" },
|
|
4583
|
+
{ value: "300", label: "5 minutes" },
|
|
4584
|
+
{ value: "600", label: "10 minutes" },
|
|
4585
|
+
{ value: "1800", label: "30 minutes" },
|
|
4586
|
+
],
|
|
4587
|
+
},
|
|
4588
|
+
},
|
|
4589
|
+
|
|
4590
|
+
"providers.streamIdleTimeoutSeconds": {
|
|
4591
|
+
type: "number",
|
|
4592
|
+
default: -1,
|
|
4593
|
+
ui: {
|
|
4594
|
+
tab: "providers",
|
|
4595
|
+
group: "Timeouts",
|
|
4596
|
+
label: "Stream Idle Timeout",
|
|
4597
|
+
description:
|
|
4598
|
+
"Seconds a model stream may stay silent between events; -1 uses provider/env defaults, 0 disables the watchdog",
|
|
4599
|
+
options: [
|
|
4600
|
+
{ value: "-1", label: "Auto", description: "Use provider defaults and PI_* timeout env vars" },
|
|
4601
|
+
{ value: "0", label: "Off", description: "Disable idle timeout" },
|
|
4602
|
+
{ value: "300", label: "5 minutes" },
|
|
4603
|
+
{ value: "600", label: "10 minutes" },
|
|
4604
|
+
{ value: "1800", label: "30 minutes" },
|
|
4605
|
+
],
|
|
4606
|
+
},
|
|
4607
|
+
},
|
|
4608
|
+
|
|
4557
4609
|
"providers.openrouterVariant": {
|
|
4558
4610
|
type: "enum",
|
|
4559
4611
|
values: ["default", "nitro", "floor", "online", "exacto"] as const,
|
package/src/debug/profiler.ts
CHANGED
|
@@ -114,7 +114,13 @@ function formatProfileAsMarkdown(profileJson: string): string {
|
|
|
114
114
|
*/
|
|
115
115
|
export async function startCpuProfile(): Promise<ProfilerSession> {
|
|
116
116
|
const v8 = await import("node:v8");
|
|
117
|
-
|
|
117
|
+
try {
|
|
118
|
+
// Enables `%GetOptimizationStatus` and friends when V8 natives are needed
|
|
119
|
+
// for ad-hoc profiling. Best-effort: Bun does not implement
|
|
120
|
+
// `setFlagsFromString` (oven-sh/bun#1702) but the CPU profiler itself
|
|
121
|
+
// works without it, so swallow the error and continue.
|
|
122
|
+
v8.setFlagsFromString("--allow-natives-syntax");
|
|
123
|
+
} catch {}
|
|
118
124
|
|
|
119
125
|
const { Session } = await import("node:inspector/promises");
|
|
120
126
|
const session = new Session();
|