@noppu-labs/opencode-permission-reviewer 3.0.0 → 3.1.0
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 +130 -0
- package/MIGRATION.md +2 -1
- package/README.md +15 -6
- package/dist/explain.d.ts +3 -4
- package/dist/explain.js +9219 -5219
- package/dist/index.d.ts +1011 -863
- package/dist/index.js +17490 -12843
- package/dist/rpc.d.ts +38 -38
- package/dist/rpc.js +30 -21
- package/dist/tui/config/loader.ts +14 -1
- package/dist/tui/config/trust-boundary-keys.ts +2 -0
- package/dist/tui/config/trust-boundary.ts +13 -0
- package/dist/tui/config-fields.ts +21 -1
- package/dist/tui/config.ts +12 -2
- package/dist/tui/failure-kind.ts +28 -0
- package/dist/tui/system-one-routing.ts +110 -0
- package/dist/tui/tui.tsx +19 -9
- package/dist/tui/types.ts +39 -2
- package/dist/tui/ui/action-fit.ts +161 -0
- package/dist/tui/ui/action-spans.tsx +60 -0
- package/dist/tui/ui/attribution.ts +113 -0
- package/dist/tui/ui/components.tsx +41 -5
- package/dist/tui/ui/config-notices.ts +137 -0
- package/dist/tui/ui/fit-parts.ts +76 -0
- package/dist/tui/ui/manual-toast.ts +87 -0
- package/dist/tui/ui/review-feed.ts +30 -5
- package/dist/tui/ui/review-overlay.tsx +33 -5
- package/dist/tui/ui/review-result.tsx +23 -5
- package/dist/tui/ui/review-theme.ts +8 -1
- package/dist/tui/ui/v1-host.ts +37 -10
- package/dist/tui/ui/v2.tsx +17 -1
- package/dist/tui/ui-protocol.ts +63 -20
- package/dist/tui/ui-state.ts +16 -1
- package/dist/tui/ui-status-extras.ts +165 -0
- package/dist/tui/ui-status-parse.ts +60 -2
- package/dist/tui/ui-text-elide.ts +89 -0
- package/package.json +11 -11
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
// Bounds the routing and config fields, then fits the whole status to the TUI
|
|
2
|
+
// command cap. Oversized identifiers are not cut, so they can still overflow it.
|
|
3
|
+
import type { HandoffInfo } from "./system-one/backend.ts";
|
|
4
|
+
import type { ManualResolution, ReviewDecision } from "./types.ts";
|
|
5
|
+
|
|
6
|
+
const MAX_LIST_ENTRIES = 5;
|
|
7
|
+
const MAX_ENTRY_CHARS = 200;
|
|
8
|
+
const MAX_MODEL_CHARS = 200;
|
|
9
|
+
const MAX_FAILURE_KIND_CHARS = 40;
|
|
10
|
+
|
|
11
|
+
/** Collapses whitespace and cuts `value` to `max` characters, ending in "…"
|
|
12
|
+
* when it was longer. */
|
|
13
|
+
export function boundedText(value: string, max: number): string {
|
|
14
|
+
const compact = value.replace(/\s+/g, " ").trim();
|
|
15
|
+
if (compact.length <= max) return compact;
|
|
16
|
+
return `${compact.slice(0, Math.max(0, max - 1))}…`;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface StatusExtrasOptions {
|
|
20
|
+
handoff?: HandoffInfo;
|
|
21
|
+
resolution?: ManualResolution;
|
|
22
|
+
decidedBy?: string;
|
|
23
|
+
configWarnings?: readonly string[];
|
|
24
|
+
configDegraded?: readonly string[];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface StatusExtras {
|
|
28
|
+
handoff?: HandoffInfo;
|
|
29
|
+
resolution?: ManualResolution;
|
|
30
|
+
decidedBy?: string;
|
|
31
|
+
configWarnings?: string[];
|
|
32
|
+
configDegraded?: string[];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function boundedList(values: readonly string[] | undefined): string[] {
|
|
36
|
+
return (values ?? [])
|
|
37
|
+
.slice(0, MAX_LIST_ENTRIES)
|
|
38
|
+
.map((entry) => boundedText(entry, MAX_ENTRY_CHARS))
|
|
39
|
+
.filter((entry) => entry.length > 0);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function boundedHandoff(handoff: HandoffInfo): HandoffInfo {
|
|
43
|
+
const { failureKind } = handoff;
|
|
44
|
+
return {
|
|
45
|
+
from: boundedText(handoff.from, MAX_MODEL_CHARS),
|
|
46
|
+
to: boundedText(handoff.to, MAX_MODEL_CHARS),
|
|
47
|
+
trigger: handoff.trigger,
|
|
48
|
+
...(failureKind === undefined
|
|
49
|
+
? {}
|
|
50
|
+
: { failureKind: boundedText(failureKind, MAX_FAILURE_KIND_CHARS) }),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** The hand-off, resolution, deciding model and config lists a status
|
|
55
|
+
* carries; an empty list is left out. */
|
|
56
|
+
export function statusExtras(options: StatusExtrasOptions): StatusExtras {
|
|
57
|
+
const configWarnings = boundedList(options.configWarnings);
|
|
58
|
+
const configDegraded = boundedList(options.configDegraded);
|
|
59
|
+
return {
|
|
60
|
+
...(options.handoff === undefined
|
|
61
|
+
? {}
|
|
62
|
+
: { handoff: boundedHandoff(options.handoff) }),
|
|
63
|
+
...(options.resolution === undefined
|
|
64
|
+
? {}
|
|
65
|
+
: { resolution: options.resolution }),
|
|
66
|
+
...(options.decidedBy === undefined
|
|
67
|
+
? {}
|
|
68
|
+
: { decidedBy: boundedText(options.decidedBy, MAX_MODEL_CHARS) }),
|
|
69
|
+
...(configWarnings.length === 0 ? {} : { configWarnings }),
|
|
70
|
+
...(configDegraded.length === 0 ? {} : { configDegraded }),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** The JSON byte size whose base64url encoding fits the 16000-character cap
|
|
75
|
+
* `decodeUiStatus` enforces. */
|
|
76
|
+
export const MAX_STATUS_BYTES = 12_000;
|
|
77
|
+
|
|
78
|
+
function withoutLastEntry<T extends StatusExtras>(status: T): T | undefined {
|
|
79
|
+
const key =
|
|
80
|
+
(status.configWarnings?.length ?? 0) > 0
|
|
81
|
+
? "configWarnings"
|
|
82
|
+
: (status.configDegraded?.length ?? 0) > 0
|
|
83
|
+
? "configDegraded"
|
|
84
|
+
: undefined;
|
|
85
|
+
if (key === undefined) return;
|
|
86
|
+
const { [key]: list, ...rest } = status;
|
|
87
|
+
const kept = (list ?? []).slice(0, -1);
|
|
88
|
+
return (kept.length === 0 ? rest : { ...rest, [key]: kept }) as T;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** The config lists the fit drops and the texts it shortens. */
|
|
92
|
+
interface FittableStatus extends StatusExtras {
|
|
93
|
+
reason?: string;
|
|
94
|
+
decision?: Pick<ReviewDecision, "rationale" | "script_analysis">;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const FITTABLE_FIELDS = ["rationale", "script_analysis", "reason"] as const;
|
|
98
|
+
type FittableField = (typeof FITTABLE_FIELDS)[number];
|
|
99
|
+
|
|
100
|
+
const ELLIPSIS = "…";
|
|
101
|
+
|
|
102
|
+
function jsonBytes(value: unknown): number {
|
|
103
|
+
return Buffer.byteLength(JSON.stringify(value), "utf8");
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** Drops config list entries, warnings before degraded reasons and the last
|
|
107
|
+
* first, until the encoded status fits the cap. */
|
|
108
|
+
function fitConfigLists<T extends StatusExtras>(status: T): T {
|
|
109
|
+
let fitted = status;
|
|
110
|
+
while (jsonBytes(fitted) > MAX_STATUS_BYTES) {
|
|
111
|
+
const next = withoutLastEntry(fitted);
|
|
112
|
+
if (next === undefined) break;
|
|
113
|
+
fitted = next;
|
|
114
|
+
}
|
|
115
|
+
return fitted;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** Cuts on a code-point boundary so the JSON form, "…" included, is at least
|
|
119
|
+
* `excess` bytes smaller; "…" alone when even the whole text is not enough. */
|
|
120
|
+
function shortenedBy(text: string, excess: number): string {
|
|
121
|
+
if (jsonBytes(text) <= jsonBytes(ELLIPSIS)) return text;
|
|
122
|
+
let room = jsonBytes(text) - excess - jsonBytes(ELLIPSIS);
|
|
123
|
+
let end = 0;
|
|
124
|
+
for (const char of text) {
|
|
125
|
+
room -= jsonBytes(char) - 2;
|
|
126
|
+
if (room < 0) break;
|
|
127
|
+
end += char.length;
|
|
128
|
+
}
|
|
129
|
+
return `${text.slice(0, end)}${ELLIPSIS}`;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function withShorter<T extends FittableStatus>(
|
|
133
|
+
status: T,
|
|
134
|
+
field: FittableField,
|
|
135
|
+
excess: number,
|
|
136
|
+
): T {
|
|
137
|
+
if (field === "reason") {
|
|
138
|
+
const { reason } = status;
|
|
139
|
+
return reason === undefined
|
|
140
|
+
? status
|
|
141
|
+
: { ...status, reason: shortenedBy(reason, excess) };
|
|
142
|
+
}
|
|
143
|
+
const { decision } = status;
|
|
144
|
+
const text = decision?.[field];
|
|
145
|
+
return decision === undefined || text === undefined
|
|
146
|
+
? status
|
|
147
|
+
: {
|
|
148
|
+
...status,
|
|
149
|
+
decision: { ...decision, [field]: shortenedBy(text, excess) },
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/** Drops config entries, then shortens fields in FITTABLE_FIELDS order. The
|
|
154
|
+
* TUI shows only reason, and the gate paths copy the rationale into it, so the
|
|
155
|
+
* hidden fields go first. A status under the cap comes back as the same
|
|
156
|
+
* object. */
|
|
157
|
+
export function fitStatus<T extends FittableStatus>(status: T): T {
|
|
158
|
+
let fitted = fitConfigLists(status);
|
|
159
|
+
for (const field of FITTABLE_FIELDS) {
|
|
160
|
+
const excess = jsonBytes(fitted) - MAX_STATUS_BYTES;
|
|
161
|
+
if (excess <= 0) break;
|
|
162
|
+
fitted = withShorter(fitted, field, excess);
|
|
163
|
+
}
|
|
164
|
+
return fitted;
|
|
165
|
+
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { isRecord } from "./is-record.ts";
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { HandoffInfo } from "./system-one/backend.ts";
|
|
3
|
+
import type {
|
|
4
|
+
HandoffTrigger,
|
|
5
|
+
ManualResolution,
|
|
6
|
+
ReviewDecision,
|
|
7
|
+
} from "./types.ts";
|
|
8
|
+
import type { ActionSegment, ReviewUiStatus } from "./ui-protocol.ts";
|
|
4
9
|
|
|
5
10
|
// Structural checks for a decoded UI status payload. A payload passes only
|
|
6
11
|
// when every field holds a value the protocol defines; it is then returned
|
|
@@ -41,6 +46,53 @@ function isDecision(value: unknown): value is ReviewDecision {
|
|
|
41
46
|
return isRecord(value) && fieldsPass(value, DECISION_CHECKS);
|
|
42
47
|
}
|
|
43
48
|
|
|
49
|
+
// Keyed records, so a trigger or resolution added to the union without a
|
|
50
|
+
// check here fails to compile.
|
|
51
|
+
const HANDOFF_TRIGGERS: Record<HandoffTrigger, true> = {
|
|
52
|
+
"jev-escalate": true,
|
|
53
|
+
"jev-uncertain-allow": true,
|
|
54
|
+
"jev-gate": true,
|
|
55
|
+
"jev-invalid": true,
|
|
56
|
+
"jev-failure": true,
|
|
57
|
+
"jev-uncertain-deny": true,
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const RESOLUTIONS: Record<ManualResolution, true> = {
|
|
61
|
+
reviewer: true,
|
|
62
|
+
"reasoning-escalated": true,
|
|
63
|
+
"reasoning-unavailable": true,
|
|
64
|
+
"budget-exhausted": true,
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const isStringList: Check = (value: unknown): boolean =>
|
|
68
|
+
Array.isArray(value) && value.every((entry) => typeof entry === "string");
|
|
69
|
+
|
|
70
|
+
const HANDOFF_CHECKS: Record<keyof HandoffInfo, Check> = {
|
|
71
|
+
from: isString,
|
|
72
|
+
to: isString,
|
|
73
|
+
trigger: oneOf(Object.keys(HANDOFF_TRIGGERS)),
|
|
74
|
+
failureKind: optional(isString),
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const isHandoff: Check = (value: unknown): boolean =>
|
|
78
|
+
isRecord(value) && fieldsPass(value, HANDOFF_CHECKS);
|
|
79
|
+
|
|
80
|
+
const SEGMENT_CHECKS: Record<keyof ActionSegment, Check> = {
|
|
81
|
+
text: isString,
|
|
82
|
+
separator: optional(oneOf(["|", "||", "&&", ";", "&"])),
|
|
83
|
+
heredocLines: optional(
|
|
84
|
+
(value: unknown): boolean =>
|
|
85
|
+
isFiniteNumber(value) && Number.isInteger(value) && value >= 0,
|
|
86
|
+
),
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
const isActionSegments: Check = (value: unknown): boolean =>
|
|
90
|
+
Array.isArray(value) &&
|
|
91
|
+
value.every(
|
|
92
|
+
(segment: unknown): boolean =>
|
|
93
|
+
isRecord(segment) && fieldsPass(segment, SEGMENT_CHECKS),
|
|
94
|
+
);
|
|
95
|
+
|
|
44
96
|
const STATUS_CHECKS: Record<keyof ReviewUiStatus, Check> = {
|
|
45
97
|
version: (value: unknown): boolean => value === 1,
|
|
46
98
|
requestID: isString,
|
|
@@ -66,6 +118,12 @@ const STATUS_CHECKS: Record<keyof ReviewUiStatus, Check> = {
|
|
|
66
118
|
"unknown",
|
|
67
119
|
]),
|
|
68
120
|
),
|
|
121
|
+
handoff: optional(isHandoff),
|
|
122
|
+
resolution: optional(oneOf(Object.keys(RESOLUTIONS))),
|
|
123
|
+
decidedBy: optional(isString),
|
|
124
|
+
configWarnings: optional(isStringList),
|
|
125
|
+
configDegraded: optional(isStringList),
|
|
126
|
+
actionSegments: optional(isActionSegments),
|
|
69
127
|
};
|
|
70
128
|
|
|
71
129
|
export function parseUiStatus(value: unknown): ReviewUiStatus | undefined {
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// Ships to the TUI (the action fit) and runs on the server (the bounded action
|
|
2
|
+
// and segment texts), so it must not import a server-only module.
|
|
3
|
+
|
|
4
|
+
export const ELISION: string = " ⋯ ";
|
|
5
|
+
export const LINE_BREAK: string = "⏎";
|
|
6
|
+
const ELISION_COLUMNS: number = Array.from(ELISION).length;
|
|
7
|
+
const ESCAPED =
|
|
8
|
+
// Each member matches one code point on its own, so no adjacent pair
|
|
9
|
+
// should read as a combined character; the combining grapheme joiner is
|
|
10
|
+
// therefore listed first.
|
|
11
|
+
// biome-ignore lint/suspicious/noControlCharactersInRegex: action text renders C0/C1, bidi, format and non-ASCII space code points as visible escapes
|
|
12
|
+
// biome-ignore lint/suspicious/noMisleadingCharacterClass: intentional per-code-point match for variation selectors, joiners and combining grapheme joiner
|
|
13
|
+
/[\u034f\u0000-\u0008\u000b-\u001f\u007f-\u00a0\u00ad\u061c\u1680\u180e\u2000-\u200f\u2028-\u202f\u205f-\u206f\u21b5\u22ef\u23ce\u3000\ud800-\udfff\ufe00-\ufe0f\ufeff\ufff9-\ufffb\u{e0000}-\u{e007f}\u{e0100}-\u{e01ef}]/gu;
|
|
14
|
+
|
|
15
|
+
function escapeChar(char: string): string {
|
|
16
|
+
const code = char.codePointAt(0) ?? 0;
|
|
17
|
+
if (code <= 0xff) return `\\x${code.toString(16).padStart(2, "0")}`;
|
|
18
|
+
if (code <= 0xffff) return `\\u${code.toString(16).padStart(4, "0")}`;
|
|
19
|
+
return `\\u{${code.toString(16)}}`;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** `value` with invisible, directional, control and marker characters escaped,
|
|
23
|
+
* line continuations marked with `\⏎`, line breaks marked with `⏎`, and runs
|
|
24
|
+
* of spaces and tabs collapsed. */
|
|
25
|
+
export function renderActionText(value: string): string {
|
|
26
|
+
return value
|
|
27
|
+
.replace(ESCAPED, escapeChar)
|
|
28
|
+
.replace(/\\\n/g, `\\${LINE_BREAK}`)
|
|
29
|
+
.replace(/\n/g, ` ${LINE_BREAK} `)
|
|
30
|
+
.replace(/[ \t]+/g, " ")
|
|
31
|
+
.trim();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** Whether whole words of `kept` code points use at least half of `max`, so
|
|
35
|
+
* the cut may fall between words rather than inside one. */
|
|
36
|
+
const wordCut = (kept: number, max: number): boolean =>
|
|
37
|
+
kept > 0 && kept * 2 >= max;
|
|
38
|
+
|
|
39
|
+
/** The longest prefix of `text` made of whole words within `max` code
|
|
40
|
+
* points; a hard cut at `max` when those words would use less than half of
|
|
41
|
+
* it. Always a prefix of `text` (trailing spaces trimmed). */
|
|
42
|
+
export function keepHead(text: string, max: number): string {
|
|
43
|
+
const chars = Array.from(text);
|
|
44
|
+
if (chars.length <= max) return text;
|
|
45
|
+
let end = max;
|
|
46
|
+
while (end > 0 && chars[end] !== " ") end -= 1;
|
|
47
|
+
const head = wordCut(end, max)
|
|
48
|
+
? chars.slice(0, end)
|
|
49
|
+
: chars.slice(0, Math.max(0, max));
|
|
50
|
+
return head.join("").trimEnd();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** The longest suffix of `text` made of whole words within `max` code
|
|
54
|
+
* points; a hard cut at `max` when those words would use less than half of
|
|
55
|
+
* it. Always a suffix of `text` (leading spaces trimmed). */
|
|
56
|
+
export function keepTail(text: string, max: number): string {
|
|
57
|
+
if (max <= 0) return "";
|
|
58
|
+
const chars = Array.from(text);
|
|
59
|
+
if (chars.length <= max) return text;
|
|
60
|
+
let start = chars.length - max;
|
|
61
|
+
while (start < chars.length && chars[start - 1] !== " ") start += 1;
|
|
62
|
+
const tail = wordCut(chars.length - start, max)
|
|
63
|
+
? chars.slice(start)
|
|
64
|
+
: chars.slice(chars.length - max);
|
|
65
|
+
return tail.join("").trimStart();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** `text` split into a head and a tail that fit `max` code points together
|
|
69
|
+
* with " ⋯ " between them, the head taking at most half; undefined when
|
|
70
|
+
* `text` already fits. */
|
|
71
|
+
export function elideMiddle(
|
|
72
|
+
text: string,
|
|
73
|
+
max: number,
|
|
74
|
+
): { head: string; tail: string } | undefined {
|
|
75
|
+
if (Array.from(text).length <= max) return undefined;
|
|
76
|
+
const budget = Math.max(0, max - ELISION_COLUMNS);
|
|
77
|
+
const head = keepHead(text, Math.ceil(budget / 2));
|
|
78
|
+
return { head, tail: keepTail(text, budget - Array.from(head).length) };
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** `value` on one line with escapes and line-break markers applied and at most
|
|
82
|
+
* `max` code points: its middle elided around " ⋯ " when it is longer. */
|
|
83
|
+
export function boundedHeadTail(value: string, max: number): string {
|
|
84
|
+
const compact = renderActionText(value);
|
|
85
|
+
const elided = elideMiddle(compact, max);
|
|
86
|
+
return elided === undefined
|
|
87
|
+
? compact
|
|
88
|
+
: `${elided.head}${ELISION}${elided.tail}`;
|
|
89
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noppu-labs/opencode-permission-reviewer",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Policy-aware permission reviewer for OpenCode V1 and V2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -89,19 +89,18 @@
|
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
91
|
"@biomejs/biome": "2.5.15",
|
|
92
|
-
"@opencode-ai/plugin": "1.
|
|
93
|
-
"@opencode-ai/sdk": "1.
|
|
94
|
-
"@opencode/plugin": "2.
|
|
92
|
+
"@opencode-ai/plugin": "1.19.3",
|
|
93
|
+
"@opencode-ai/sdk": "1.19.3",
|
|
94
|
+
"@opencode/plugin": "2.1.1",
|
|
95
95
|
"@types/bun": "^1.3.0",
|
|
96
96
|
"@types/semver": "7.8.0",
|
|
97
97
|
"fta-cli": "3.1.0",
|
|
98
98
|
"knip": "6.41.0",
|
|
99
|
-
"
|
|
100
|
-
"typescript": "
|
|
99
|
+
"tsdown": "0.23.1",
|
|
100
|
+
"typescript": "7.0.2"
|
|
101
101
|
},
|
|
102
102
|
"overrides": {
|
|
103
|
-
"@babel/core": "7.29.7"
|
|
104
|
-
"esbuild": "^0.28.2"
|
|
103
|
+
"@babel/core": "7.29.7"
|
|
105
104
|
},
|
|
106
105
|
"scripts": {
|
|
107
106
|
"lint": "biome check --error-on-warnings .",
|
|
@@ -111,21 +110,22 @@
|
|
|
111
110
|
"fta": "fta .",
|
|
112
111
|
"knip": "knip",
|
|
113
112
|
"audit": "bun audit --ignore GHSA-ch52-4w7c-c8xp --ignore GHSA-p6vx-979v-rg4c --ignore GHSA-jp82-f5mq-hwhp",
|
|
114
|
-
"build": "
|
|
113
|
+
"build": "rm -rf dist && tsdown && bun scripts/copy-tui.ts",
|
|
115
114
|
"test": "bun test",
|
|
116
115
|
"test:stress": "bun test tests/stress.test.ts --timeout 30000",
|
|
117
116
|
"test:package": "bun test tests/package-smoke.test.ts --timeout 120000",
|
|
118
117
|
"test:coverage": "bun test --coverage --coverage-reporter lcov --coverage-dir ./coverage && bun scripts/check-coverage.ts",
|
|
118
|
+
"docs:screens": "bun scripts/capture-tui.ts --all",
|
|
119
119
|
"check": "bun run build && bun run typecheck && uv run --frozen pre-commit run --all-files && uv run --frozen pre-commit run --hook-stage manual gitleaks-tree --all-files && bun test"
|
|
120
120
|
},
|
|
121
121
|
"dependencies": {
|
|
122
122
|
"@typesafe-ai/sdk": "0.6.0",
|
|
123
|
-
"@opencode/client": "2.
|
|
123
|
+
"@opencode/client": "2.1.1",
|
|
124
124
|
"jsonc-parser": "3.3.1",
|
|
125
125
|
"semver": "7.8.5",
|
|
126
126
|
"@opentui/core": "0.5.11",
|
|
127
127
|
"@opentui/solid": "0.5.11",
|
|
128
128
|
"solid-js": "1.9.12",
|
|
129
|
-
"zod": "4.6.
|
|
129
|
+
"zod": "4.6.7"
|
|
130
130
|
}
|
|
131
131
|
}
|