@carboncode/cli 0.1.0 → 0.1.2
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/README.md +15 -24
- package/README.zh-CN.md +13 -11
- package/dist/cli/{acp-35C4ME6Y.js → acp-6J54TVVC.js} +17 -16
- package/dist/cli/acp-6J54TVVC.js.map +1 -0
- package/dist/cli/{chat-A6UJDPGV.js → chat-636MFZ7W.js} +21 -21
- package/dist/cli/{chunk-JKGYMRX5.js → chunk-3N7FTZVE.js} +2 -2
- package/dist/cli/{chunk-4TVNJWMA.js → chunk-ACHQFKW2.js} +178 -18
- package/dist/cli/chunk-ACHQFKW2.js.map +1 -0
- package/dist/cli/{chunk-7L2WTRNU.js → chunk-ANVEA3RU.js} +2 -2
- package/dist/cli/{chunk-QVC75MR3.js → chunk-BXMMGFAL.js} +2 -2
- package/dist/cli/{chunk-UI66BH6D.js → chunk-COTWTQQZ.js} +2 -2
- package/dist/cli/{chunk-J5BYPUB5.js → chunk-CZCPIK5K.js} +1508 -1176
- package/dist/cli/chunk-CZCPIK5K.js.map +1 -0
- package/dist/cli/{chunk-XJ5SRLKK.js → chunk-D3ACJ6D5.js} +2 -2
- package/dist/cli/{chunk-WRN65TRD.js → chunk-DSQNSP7F.js} +2 -2
- package/dist/cli/{chunk-QJG7OF27.js → chunk-FKSYTVWZ.js} +27 -10
- package/dist/cli/chunk-FKSYTVWZ.js.map +1 -0
- package/dist/cli/{chunk-BSINVTTL.js → chunk-FXG7CSGY.js} +7 -7
- package/dist/cli/{chunk-4MQ3VURH.js → chunk-K43DXH3G.js} +52 -83
- package/dist/cli/chunk-K43DXH3G.js.map +1 -0
- package/dist/cli/{chunk-BSGCXZQN.js → chunk-LNU3CR7X.js} +2 -2
- package/dist/cli/{chunk-TH756VLN.js → chunk-MXUSER5C.js} +240 -191
- package/dist/cli/chunk-MXUSER5C.js.map +1 -0
- package/dist/cli/{chunk-3T6VBZCL.js → chunk-NQJYZKEU.js} +2 -2
- package/dist/cli/{chunk-IX6XI2RG.js → chunk-OB5XR5HG.js} +2 -2
- package/dist/cli/{chunk-ILJOIQ5W.js → chunk-OY5GGU6D.js} +2 -2
- package/dist/cli/{chunk-IAUOP25G.js → chunk-R677DIFU.js} +38 -22
- package/dist/cli/chunk-R677DIFU.js.map +1 -0
- package/dist/cli/{chunk-CPKCNHRR.js → chunk-RSQMO6CF.js} +5 -5
- package/dist/cli/{chunk-3OAR6NVL.js → chunk-RUPXIRNL.js} +2 -2
- package/dist/cli/{chunk-S2KIUQKQ.js → chunk-S4YD3N3X.js} +7 -6
- package/dist/cli/{chunk-S2KIUQKQ.js.map → chunk-S4YD3N3X.js.map} +1 -1
- package/dist/cli/{chunk-4IBIPQVB.js → chunk-T6SBUSG2.js} +3 -3
- package/dist/cli/{chunk-D5NFKRGO.js → chunk-UGPC4LPM.js} +2 -2
- package/dist/cli/{chunk-T5TQ4NDT.js → chunk-X4UJ6Q6M.js} +3 -3
- package/dist/cli/{code-4TUTAGO5.js → code-TBC3K5AZ.js} +24 -33
- package/dist/cli/code-TBC3K5AZ.js.map +1 -0
- package/dist/cli/{commands-KMOZEYCF.js → commands-HMQPRVNT.js} +4 -4
- package/dist/cli/{commit-DTFA56VQ.js → commit-WIY4B3X4.js} +3 -3
- package/dist/cli/{desktop-7N3MHNBD.js → desktop-MGOG3AWV.js} +17 -17
- package/dist/cli/{diff-E5OWTF4C.js → diff-57LRKCB7.js} +8 -8
- package/dist/cli/{doctor-IEJQRJMN.js → doctor-5FDRBIXE.js} +8 -8
- package/dist/cli/index.js +32 -32
- package/dist/cli/{mcp-PDI2PDLG.js → mcp-HJHTNRZF.js} +2 -2
- package/dist/cli/{mcp-browse-OSPXOFPZ.js → mcp-browse-C2PJRQBO.js} +2 -2
- package/dist/cli/{mcp-inspect-QRFVTHMF.js → mcp-inspect-JBFXV2II.js} +2 -2
- package/dist/cli/{prompt-3CDII3UO.js → prompt-U62OVZNY.js} +3 -3
- package/dist/cli/{replay-HYOSRQIV.js → replay-M3YKBVAM.js} +8 -8
- package/dist/cli/{run-2ZHADOUP.js → run-V6X5GXCR.js} +13 -13
- package/dist/cli/{server-X75PAZG5.js → server-5WVJQUOR.js} +10 -10
- package/dist/cli/{sessions-POOZA5CQ.js → sessions-B266WVM3.js} +12 -12
- package/dist/cli/{setup-YLPFI3OH.js → setup-SWX5E3W2.js} +5 -5
- package/dist/cli/{stats-NXJ3TO2D.js → stats-VPPKS6UF.js} +6 -6
- package/dist/cli/{version-NXXWE3WN.js → version-TVHAEHWY.js} +12 -12
- package/dist/index.d.ts +17 -2
- package/dist/index.js +360 -150
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/cli/acp-35C4ME6Y.js.map +0 -1
- package/dist/cli/chunk-4MQ3VURH.js.map +0 -1
- package/dist/cli/chunk-4TVNJWMA.js.map +0 -1
- package/dist/cli/chunk-IAUOP25G.js.map +0 -1
- package/dist/cli/chunk-J5BYPUB5.js.map +0 -1
- package/dist/cli/chunk-QJG7OF27.js.map +0 -1
- package/dist/cli/chunk-TH756VLN.js.map +0 -1
- package/dist/cli/code-4TUTAGO5.js.map +0 -1
- /package/dist/cli/{chat-A6UJDPGV.js.map → chat-636MFZ7W.js.map} +0 -0
- /package/dist/cli/{chunk-JKGYMRX5.js.map → chunk-3N7FTZVE.js.map} +0 -0
- /package/dist/cli/{chunk-7L2WTRNU.js.map → chunk-ANVEA3RU.js.map} +0 -0
- /package/dist/cli/{chunk-QVC75MR3.js.map → chunk-BXMMGFAL.js.map} +0 -0
- /package/dist/cli/{chunk-UI66BH6D.js.map → chunk-COTWTQQZ.js.map} +0 -0
- /package/dist/cli/{chunk-XJ5SRLKK.js.map → chunk-D3ACJ6D5.js.map} +0 -0
- /package/dist/cli/{chunk-WRN65TRD.js.map → chunk-DSQNSP7F.js.map} +0 -0
- /package/dist/cli/{chunk-BSINVTTL.js.map → chunk-FXG7CSGY.js.map} +0 -0
- /package/dist/cli/{chunk-BSGCXZQN.js.map → chunk-LNU3CR7X.js.map} +0 -0
- /package/dist/cli/{chunk-3T6VBZCL.js.map → chunk-NQJYZKEU.js.map} +0 -0
- /package/dist/cli/{chunk-IX6XI2RG.js.map → chunk-OB5XR5HG.js.map} +0 -0
- /package/dist/cli/{chunk-ILJOIQ5W.js.map → chunk-OY5GGU6D.js.map} +0 -0
- /package/dist/cli/{chunk-CPKCNHRR.js.map → chunk-RSQMO6CF.js.map} +0 -0
- /package/dist/cli/{chunk-3OAR6NVL.js.map → chunk-RUPXIRNL.js.map} +0 -0
- /package/dist/cli/{chunk-4IBIPQVB.js.map → chunk-T6SBUSG2.js.map} +0 -0
- /package/dist/cli/{chunk-D5NFKRGO.js.map → chunk-UGPC4LPM.js.map} +0 -0
- /package/dist/cli/{chunk-T5TQ4NDT.js.map → chunk-X4UJ6Q6M.js.map} +0 -0
- /package/dist/cli/{commands-KMOZEYCF.js.map → commands-HMQPRVNT.js.map} +0 -0
- /package/dist/cli/{commit-DTFA56VQ.js.map → commit-WIY4B3X4.js.map} +0 -0
- /package/dist/cli/{desktop-7N3MHNBD.js.map → desktop-MGOG3AWV.js.map} +0 -0
- /package/dist/cli/{diff-E5OWTF4C.js.map → diff-57LRKCB7.js.map} +0 -0
- /package/dist/cli/{doctor-IEJQRJMN.js.map → doctor-5FDRBIXE.js.map} +0 -0
- /package/dist/cli/{mcp-PDI2PDLG.js.map → mcp-HJHTNRZF.js.map} +0 -0
- /package/dist/cli/{mcp-browse-OSPXOFPZ.js.map → mcp-browse-C2PJRQBO.js.map} +0 -0
- /package/dist/cli/{mcp-inspect-QRFVTHMF.js.map → mcp-inspect-JBFXV2II.js.map} +0 -0
- /package/dist/cli/{prompt-3CDII3UO.js.map → prompt-U62OVZNY.js.map} +0 -0
- /package/dist/cli/{replay-HYOSRQIV.js.map → replay-M3YKBVAM.js.map} +0 -0
- /package/dist/cli/{run-2ZHADOUP.js.map → run-V6X5GXCR.js.map} +0 -0
- /package/dist/cli/{server-X75PAZG5.js.map → server-5WVJQUOR.js.map} +0 -0
- /package/dist/cli/{sessions-POOZA5CQ.js.map → sessions-B266WVM3.js.map} +0 -0
- /package/dist/cli/{setup-YLPFI3OH.js.map → setup-SWX5E3W2.js.map} +0 -0
- /package/dist/cli/{stats-NXJ3TO2D.js.map → stats-VPPKS6UF.js.map} +0 -0
- /package/dist/cli/{version-NXXWE3WN.js.map → version-TVHAEHWY.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -634,6 +634,8 @@ interface LoopEvent {
|
|
|
634
634
|
toolCallReadyCount?: number;
|
|
635
635
|
/** Stable id for tool_start / tool pairs — also the inflight-set key. UI uses this as the card id so it can derive `running` from `loop.inflight.has(callId)` instead of trusting end-event delivery. */
|
|
636
636
|
callId?: string;
|
|
637
|
+
/** Tool execution duration excluding interactive approval wait when available. */
|
|
638
|
+
elapsedMs?: number;
|
|
637
639
|
stats?: TurnStats;
|
|
638
640
|
repair?: RepairReport;
|
|
639
641
|
error?: string;
|
|
@@ -689,6 +691,8 @@ interface ToolCallContext {
|
|
|
689
691
|
signal?: AbortSignal;
|
|
690
692
|
/** Inject a mock PauseGate for tests. When absent, tools use the singleton. */
|
|
691
693
|
confirmationGate?: PauseGate;
|
|
694
|
+
/** Time spent waiting for interactive approval; UIs subtract this from tool runtime. */
|
|
695
|
+
onInteractiveWait?: (elapsedMs: number) => void;
|
|
692
696
|
}
|
|
693
697
|
interface ToolDefinition<A = any, R = any> {
|
|
694
698
|
name: string;
|
|
@@ -714,7 +718,7 @@ type ToolCallAuditEvent = {
|
|
|
714
718
|
};
|
|
715
719
|
type ToolCallAuditListener = (event: ToolCallAuditEvent) => void;
|
|
716
720
|
/** String return short-circuits dispatch; null/undefined falls through to the tool fn. */
|
|
717
|
-
type ToolInterceptor = (name: string, args: Record<string, unknown
|
|
721
|
+
type ToolInterceptor = (name: string, args: Record<string, unknown>, ctx?: ToolCallContext) => string | null | undefined | Promise<string | null | undefined>;
|
|
718
722
|
/** Final-stage post-processor — runs on every dispatch return (success and error paths) so callers can append context like a remaining-budget hint. Whatever it returns becomes the dispatch result. */
|
|
719
723
|
type ToolResultAugmenter = (name: string, args: Record<string, unknown>, result: string) => string;
|
|
720
724
|
declare class ToolRegistry {
|
|
@@ -755,6 +759,8 @@ declare class ToolRegistry {
|
|
|
755
759
|
maxResultTokens?: number;
|
|
756
760
|
/** Inject a mock PauseGate for tests. */
|
|
757
761
|
confirmationGate?: PauseGate;
|
|
762
|
+
/** Report modal / approval wait time so callers can keep runtime metrics honest. */
|
|
763
|
+
onInteractiveWait?: (elapsedMs: number) => void;
|
|
758
764
|
}): Promise<string>;
|
|
759
765
|
/** Records the failed call's fingerprint; on the 2nd consecutive identical malformed call to the same tool, returns a sharper error that tells the model to stop retrying. */
|
|
760
766
|
private _noteMalformed;
|
|
@@ -1139,6 +1145,8 @@ interface ReasonixConfig {
|
|
|
1139
1145
|
mouseClipboardHintShown?: boolean;
|
|
1140
1146
|
/** When false, skip the boot splash animation and show the main UI immediately. Default true. */
|
|
1141
1147
|
banner?: boolean;
|
|
1148
|
+
/** When false, skip the non-blocking npm latest check shown at startup. Default true. */
|
|
1149
|
+
updateCheck?: boolean;
|
|
1142
1150
|
reasoningEffort?: ReasoningEffort;
|
|
1143
1151
|
/** Default workspace root for the desktop client. CLI uses cwd. */
|
|
1144
1152
|
workspaceDir?: string;
|
|
@@ -1174,8 +1182,11 @@ interface ReasonixConfig {
|
|
|
1174
1182
|
/** Stable URL token (#968). If unset, a fresh token is minted each boot. Min 16 chars enforced at load time. */
|
|
1175
1183
|
token?: string;
|
|
1176
1184
|
};
|
|
1177
|
-
/** Per-field visibility toggles for the bottom status row.
|
|
1185
|
+
/** Per-field visibility toggles for the bottom status row. Codex-style defaults keep only turn cost and context visible. */
|
|
1178
1186
|
statusBar?: {
|
|
1187
|
+
showMode?: boolean;
|
|
1188
|
+
showPreset?: boolean;
|
|
1189
|
+
showSessionInfo?: boolean;
|
|
1179
1190
|
showBalance?: boolean;
|
|
1180
1191
|
showSessionCost?: boolean;
|
|
1181
1192
|
showTurnCost?: boolean;
|
|
@@ -1651,6 +1662,8 @@ declare function detectShellOperator(cmd: string): string | null;
|
|
|
1651
1662
|
declare function isAllowed(cmd: string, extra?: readonly string[], projectRoot?: string, sensitivePathConfig?: {
|
|
1652
1663
|
prefixes?: readonly string[];
|
|
1653
1664
|
patterns?: readonly string[];
|
|
1665
|
+
}, opts?: {
|
|
1666
|
+
includeBuiltin?: boolean;
|
|
1654
1667
|
}): boolean;
|
|
1655
1668
|
|
|
1656
1669
|
/** cwd pinned to root; non-allowlisted commands throw to a UI confirm gate; spawn is `shell: false`, tokenized argv only. */
|
|
@@ -1665,6 +1678,8 @@ interface ShellToolsOptions {
|
|
|
1665
1678
|
extraAllowed?: readonly string[] | (() => readonly string[]);
|
|
1666
1679
|
/** Getter form lets `editMode === "yolo"` flip mid-session without re-registering tools. */
|
|
1667
1680
|
allowAll?: boolean | (() => boolean);
|
|
1681
|
+
/** When true, built-in read/test/lint commands still go through the approval gate. Project allowlist entries still bypass it. */
|
|
1682
|
+
requireApprovalForBuiltin?: boolean;
|
|
1668
1683
|
jobs?: JobRegistry;
|
|
1669
1684
|
/** Fired after `run_background` / `stop_job` mutate the registry — used by the desktop popover for near-real-time updates without polling. */
|
|
1670
1685
|
onJobsChanged?: () => void;
|