@parallelworks/code 0.0.0-stage → 0.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.
@@ -0,0 +1,215 @@
1
+ export type PwCodeSessionStatus = 'idle' | 'running' | 'awaiting_approval' | 'live_elsewhere';
2
+ export type PwCodeHistoryKind = 'user' | 'assistant' | 'thinking' | 'tool_call' | 'tool_result' | 'notice' | 'warning' | 'error' | 'plan_view' | 'goal_view' | 'goal_progress' | 'turn_end' | 'recap' | 'compaction';
3
+ export interface PwCodePasteView {
4
+ placeholder: string;
5
+ id: number;
6
+ lines: number;
7
+ bytes: number;
8
+ inline?: boolean;
9
+ text?: string;
10
+ }
11
+ /** How a call that needed an answer was settled, as pw code records it. */
12
+ export interface PwCodeToolDecision {
13
+ callId: string;
14
+ by: 'user' | 'auto-reviewer';
15
+ username?: string;
16
+ status: 'reviewing' | 'approved' | 'denied' | 'timed_out' | 'failed' | 'aborted';
17
+ note?: string;
18
+ rationale?: string;
19
+ /** What was decided on, such as the command, in the decider's words. */
20
+ action?: string;
21
+ at: string;
22
+ answers?: PwCodeAskAnswer[] | null;
23
+ }
24
+ /** One question's answer: the options picked, the user's own words, and their notes on a question with previews. */
25
+ export interface PwCodeAskAnswer {
26
+ question?: string;
27
+ picked?: string[] | null;
28
+ text?: string;
29
+ notes?: string;
30
+ }
31
+ export interface PwCodeHistoryItem {
32
+ kind: PwCodeHistoryKind;
33
+ text?: string;
34
+ turnId?: string;
35
+ toolName?: string;
36
+ toolArgs?: string;
37
+ callId?: string;
38
+ decision?: PwCodeToolDecision;
39
+ planBody?: string;
40
+ fromMain?: boolean;
41
+ pastes?: PwCodePasteView[] | null;
42
+ images?: PwCodeImage[] | null;
43
+ turnEnd?: PwCodeTurnEnd;
44
+ /** On an EditFile call: the line its hunk begins on, as a live tool_start carries it. */
45
+ startLine?: number;
46
+ }
47
+ /** A preview of an image a message carried, base64-encoded; ref names the
48
+ * full-size image when the daemon can serve it, and originalMime and
49
+ * originalSize describe that image. */
50
+ export interface PwCodeImage {
51
+ mime: string;
52
+ data: string;
53
+ ref?: string;
54
+ originalMime?: string;
55
+ originalSize?: number;
56
+ }
57
+ /** An image the session saved, sent with the message that names its placeholder. */
58
+ export interface PwCodeImageRef {
59
+ placeholder: string;
60
+ path: string;
61
+ mime: 'image/png' | 'image/jpeg' | 'image/gif' | 'image/webp';
62
+ }
63
+ export interface PwCodeAskOption {
64
+ label: string;
65
+ description?: string;
66
+ preview?: string;
67
+ }
68
+ export interface PwCodeAskQuestion {
69
+ question: string;
70
+ header?: string;
71
+ multiSelect?: boolean;
72
+ options?: PwCodeAskOption[] | null;
73
+ }
74
+ export interface PwCodeApprovalRequest {
75
+ id: string;
76
+ kind: 'confirm' | 'ask' | 'plan';
77
+ createdAt: string;
78
+ agent?: string;
79
+ callId?: string;
80
+ tool?: string;
81
+ command?: string;
82
+ mode?: string;
83
+ plan?: string;
84
+ planPath?: string;
85
+ questions?: PwCodeAskQuestion[] | null;
86
+ reason?: string;
87
+ subagentId?: string;
88
+ /** The directory "Yes, and allow this directory for the session" would open. */
89
+ allowDir?: PwCodeAllowedDirectory;
90
+ }
91
+ /** A directory open to the file tools besides the working directory; its
92
+ * scopes name the settings files listing it, none meaning this session only. */
93
+ export interface PwCodeAddedDirectory {
94
+ path: string;
95
+ scopes?: string[] | null;
96
+ }
97
+ /** A directory an approval opened for the session: only that directory
98
+ * without `subtree`, and for reading only without `edit`. */
99
+ export interface PwCodeAllowedDirectory {
100
+ path: string;
101
+ subtree?: boolean;
102
+ edit?: boolean;
103
+ }
104
+ /** The settings a session reports on its state frames, as far as a
105
+ * transcript's host reads them back. */
106
+ export interface PwCodeSessionState {
107
+ name?: string;
108
+ autoName?: string;
109
+ claudeAccount?: string;
110
+ model: string;
111
+ /** The names to show in place of model IDs; an ID it leaves out has none. */
112
+ modelNames?: Record<string, string>;
113
+ /** Empty for the model's own default. */
114
+ effort?: string;
115
+ allocation?: string;
116
+ permissionMode?: string;
117
+ inputTokens?: number;
118
+ outputTokens?: number;
119
+ /** Pastes up to this size reach the model inline; unset from a daemon that
120
+ * cannot store pastes. */
121
+ pasteInlineMaxBytes?: number;
122
+ goal?: PwCodeGoalStatus;
123
+ /** The directories open to the file tools besides the working directory. */
124
+ addDirs?: PwCodeAddedDirectory[] | null;
125
+ /** The directories approvals opened for the session. */
126
+ allowedDirs?: PwCodeAllowedDirectory[] | null;
127
+ /** The session's directory in the git worktree it moved into; unset while it works where it launched. */
128
+ worktree?: string;
129
+ }
130
+ /** Where a session's /goal loop stands; unset when it has no goal. */
131
+ export interface PwCodeGoalStatus {
132
+ active?: boolean;
133
+ paused?: boolean;
134
+ /** An evaluation is in flight, which spends tokens with no turn to show. */
135
+ checking?: boolean;
136
+ }
137
+ /** One step of a /goal loop, as the daemon files and announces it. */
138
+ export interface PwCodeGoalProgress {
139
+ turns?: number;
140
+ condition?: string;
141
+ reason?: string;
142
+ outcome?: string;
143
+ err?: string;
144
+ /** Set when a usage limit stopped the check; the goal is checked again then. */
145
+ resumeAt?: string;
146
+ elapsedMs?: number;
147
+ tokens?: number;
148
+ }
149
+ /** The line a main-conversation turn ends with. */
150
+ export interface PwCodeTurnEnd {
151
+ durationMs: number;
152
+ endedAt: string;
153
+ pendingAgents?: number;
154
+ }
155
+ export interface PwCodeStreamEvent {
156
+ seq: number;
157
+ type: string;
158
+ agentType?: string;
159
+ goalProgress?: PwCodeGoalProgress;
160
+ /** On the frame that ends a main-conversation turn nobody stopped. */
161
+ turnEnd?: PwCodeTurnEnd;
162
+ approval?: PwCodeApprovalRequest;
163
+ approvalId?: string;
164
+ args?: string;
165
+ callId?: string;
166
+ decision?: PwCodeToolDecision;
167
+ background?: boolean;
168
+ color?: string;
169
+ content?: string;
170
+ id?: string;
171
+ /** On the error that ends a turn someone stopped. */
172
+ interrupted?: boolean;
173
+ /** On a notice or warning the session's history also holds. */
174
+ recorded?: boolean;
175
+ isError?: boolean;
176
+ name?: string;
177
+ newId?: string;
178
+ result?: string;
179
+ startLine?: number;
180
+ state?: PwCodeSessionState;
181
+ turnId?: string;
182
+ pastes?: PwCodePasteView[] | null;
183
+ images?: PwCodeImage[] | null;
184
+ /** On a usage_limit_wait that starts a wait: when the limit resets. */
185
+ resumeAt?: string;
186
+ /** On subagent_delivered: the line the main conversation was handed. */
187
+ notice?: string;
188
+ }
189
+ export interface PwCodeSessionDetail {
190
+ status: PwCodeSessionStatus;
191
+ history?: PwCodeHistoryItem[] | null;
192
+ approvals?: PwCodeApprovalRequest[] | null;
193
+ lastSeq?: number;
194
+ /** The turn in flight as of lastSeq, cleared with that turn's last frame. */
195
+ turnId?: string;
196
+ /** When the running turn began; only the daemon knows for a turn that was
197
+ * already running when the session was opened. */
198
+ turnStartedAt?: string;
199
+ /** The running turn is waiting for a usage limit to reset. */
200
+ waitingForUsageLimit?: boolean;
201
+ /** When that usage limit resets. */
202
+ usageLimitResumeAt?: string;
203
+ goal?: PwCodeGoalStatus;
204
+ addDirs?: PwCodeAddedDirectory[] | null;
205
+ allowedDirs?: PwCodeAllowedDirectory[] | null;
206
+ }
207
+ /** The body the daemon accepts as the answer to an approval. */
208
+ export interface PwCodeApprovalAnswer {
209
+ allowed?: boolean;
210
+ allowDir?: boolean;
211
+ denyMessage?: string;
212
+ /** One per question, its picks, text and notes only: the platform takes free text in just those fields. */
213
+ answers?: Pick<PwCodeAskAnswer, 'picked' | 'text' | 'notes'>[];
214
+ chat?: boolean;
215
+ }
@@ -0,0 +1,60 @@
1
+ import { type CompactionNotice, type GoalNotice, type ImageUrl, type RecapNotice, type TranscriptWords, type StreamEffect, type TranscriptState } from './transcript.js';
2
+ import type { PwCodeImage, PwCodeImageRef, PwCodeSessionDetail, PwCodeStreamEvent } from './types.js';
3
+ import type { MessagePaste } from '@parallelworks/ui/ai/headless';
4
+ export type PwCodeSendResult = {
5
+ turnId?: string | undefined;
6
+ queued?: boolean | undefined;
7
+ } | {
8
+ error: string;
9
+ };
10
+ /** lost: no answer came, so the direction may have reached the turn. */
11
+ export type PwCodeSteerResult = {
12
+ delivered: boolean;
13
+ } | {
14
+ error: string;
15
+ } | {
16
+ lost: string;
17
+ };
18
+ export type PwCodeWithdrawResult = {
19
+ error?: string;
20
+ };
21
+ interface SendOptions {
22
+ steer?: boolean;
23
+ pastes?: MessagePaste[] | undefined;
24
+ images?: PwCodeImageRef[] | undefined;
25
+ /** Drawn on the message until its echo brings the daemon's; a note can wait a whole tool call for that. */
26
+ previews?: PwCodeImage[] | undefined;
27
+ }
28
+ /** Holds the live transcript for one session. The host still owns the socket
29
+ * and the fetch: it feeds events to `onEvent` and posts through `send`. */
30
+ export declare function usePwCodeTranscript({ sessionId, detail, send, steer, withdraw, onEffect, goalNotice, compactionNotice, recapNotice, words, imageUrl, }: {
31
+ /** The session shown, so frames from the conversation it cleared are dropped. */
32
+ sessionId?: string | undefined;
33
+ detail: PwCodeSessionDetail | undefined;
34
+ send: (text: string, pastes?: MessagePaste[], images?: PwCodeImageRef[]) => Promise<PwCodeSendResult>;
35
+ /** Hands text to the running turn, as typing into a busy terminal does. */
36
+ steer?: (text: string, pastes?: MessagePaste[], images?: PwCodeImageRef[]) => Promise<PwCodeSteerResult>;
37
+ /** Takes back a queued message, by the turn it was accepted as. */
38
+ withdraw?: (turnId: string) => Promise<PwCodeWithdrawResult>;
39
+ onEffect: (effect: StreamEffect) => void;
40
+ goalNotice?: GoalNotice;
41
+ compactionNotice?: CompactionNotice;
42
+ recapNotice?: RecapNotice;
43
+ words?: TranscriptWords;
44
+ imageUrl?: ImageUrl;
45
+ }): {
46
+ transcript: TranscriptState | null;
47
+ sending: boolean;
48
+ onEvent: (ev: PwCodeStreamEvent) => void;
49
+ /** Resolves to the refusal, or null once accepted; `steer: false` queues it. */
50
+ sendMessage: (text: string, options?: SendOptions) => Promise<string | null>;
51
+ resolveApproval: (approvalId: string) => void;
52
+ noteShellRun: (command: string, output: string) => void;
53
+ /** Queued messages the daemon has named a turn for can be taken back. */
54
+ canRemoveQueued: (id: string) => boolean;
55
+ /** Resolves to the refusal, or null once the message is gone. */
56
+ removeQueued: (id: string) => Promise<string | null>;
57
+ /** Where a reconnect resumes from: the last seq applied, read outside render. */
58
+ cursor: () => number;
59
+ };
60
+ export {};
@@ -0,0 +1,200 @@
1
+ import { appendOwnMessage, appendShellRun, appendSteeredMessage, applyStreamEvent, dropMessage, initialTranscript, markQueued, pendingMessages, resolveApprovalEverywhere, turnRunning } from "./transcript.js";
2
+ import { useCallback, useEffect, useRef, useState } from "react";
3
+ // src/useTranscript.ts
4
+ var MAX_REPLAY_FRAMES = 5e3;
5
+ /** Matches the way the echo is recognised: by turn once the send has named it,
6
+ * by text before then. */
7
+ function echoedSend(unechoed, ev) {
8
+ if (ev.type !== "user_message" && ev.type !== "user_note") return;
9
+ const steered = ev.type === "user_note";
10
+ for (const [localId, sent] of unechoed) {
11
+ if (!!sent.steered !== steered) continue;
12
+ if (sent.turnId ? sent.turnId === ev.turnId : sent.text === ev.content) return localId;
13
+ }
14
+ }
15
+ /** Discarded, or placed by an older daemon's turn end: no echo is coming. */
16
+ function forgetSettled(unechoed, before, after) {
17
+ const count = (s) => s.notes.length + s.steered.length + s.queued.length;
18
+ if (count(after) >= count(before)) return;
19
+ const still = new Set(pendingMessages(after).map((m) => m.id));
20
+ for (const m of pendingMessages(before)) if (!still.has(m.id)) unechoed.delete(m.id);
21
+ }
22
+ /** Holds the live transcript for one session. The host still owns the socket
23
+ * and the fetch: it feeds events to `onEvent` and posts through `send`. */
24
+ function usePwCodeTranscript({ sessionId, detail, send, steer, withdraw, onEffect, goalNotice, compactionNotice, recapNotice, words, imageUrl }) {
25
+ const [transcript, setTranscript] = useState(null);
26
+ const transcriptRef = useRef(null);
27
+ const [sending, setSending] = useState(false);
28
+ const ownTurnIds = useRef(/* @__PURE__ */ new Set());
29
+ const ownTexts = useRef(/* @__PURE__ */ new Set());
30
+ const ownSeq = useRef(0);
31
+ const unechoed = useRef(/* @__PURE__ */ new Map());
32
+ const appliedSinceSeed = useRef([]);
33
+ const sendRef = useRef(send);
34
+ const steerRef = useRef(steer);
35
+ const withdrawRef = useRef(withdraw);
36
+ const onEffectRef = useRef(onEffect);
37
+ sendRef.current = send;
38
+ steerRef.current = steer;
39
+ withdrawRef.current = withdraw;
40
+ onEffectRef.current = onEffect;
41
+ const goalNoticeRef = useRef(goalNotice);
42
+ goalNoticeRef.current = goalNotice;
43
+ const compactionNoticeRef = useRef(compactionNotice);
44
+ compactionNoticeRef.current = compactionNotice;
45
+ const recapNoticeRef = useRef(recapNotice);
46
+ recapNoticeRef.current = recapNotice;
47
+ const wordsRef = useRef(words);
48
+ wordsRef.current = words;
49
+ const imageUrlRef = useRef(imageUrl);
50
+ imageUrlRef.current = imageUrl;
51
+ useEffect(() => {
52
+ if (!detail) return;
53
+ const { lastSeq } = detail;
54
+ if (lastSeq === void 0 && appliedSinceSeed.current.length > 0) {
55
+ appliedSinceSeed.current = [];
56
+ onEffectRef.current({ type: "refetch" });
57
+ return;
58
+ }
59
+ let next = initialTranscript(detail, {
60
+ goalNotice: goalNoticeRef.current,
61
+ compactionNotice: compactionNoticeRef.current,
62
+ recapNotice: recapNoticeRef.current,
63
+ words: wordsRef.current,
64
+ imageUrl: imageUrlRef.current
65
+ });
66
+ const replay = appliedSinceSeed.current.filter((ev) => ev.seq > (lastSeq ?? 0));
67
+ appliedSinceSeed.current = replay;
68
+ for (const ev of replay) next = applyStreamEvent(next, ev, {
69
+ goalNotice: goalNoticeRef.current,
70
+ recapNotice: recapNoticeRef.current,
71
+ words: wordsRef.current,
72
+ imageUrl: imageUrlRef.current
73
+ }).state;
74
+ for (const [localId, sent] of unechoed.current) {
75
+ const { text, pastes, previews, steered } = sent;
76
+ next = steered ? appendSteeredMessage(next, text, localId, pastes, previews) : appendOwnMessage(next, text, localId, pastes, previews);
77
+ }
78
+ const cursor = Math.max(next.cursor, transcriptRef.current?.cursor ?? 0);
79
+ next = cursor === next.cursor ? next : {
80
+ ...next,
81
+ cursor
82
+ };
83
+ transcriptRef.current = next;
84
+ setTranscript(next);
85
+ }, [detail]);
86
+ const apply = useCallback((change) => {
87
+ const current = transcriptRef.current;
88
+ if (!current) return;
89
+ const next = change(current);
90
+ transcriptRef.current = next;
91
+ setTranscript(next);
92
+ }, []);
93
+ const onEvent = useCallback((ev) => {
94
+ const current = transcriptRef.current;
95
+ if (!current) return;
96
+ const echoOf = echoedSend(unechoed.current, ev);
97
+ const { state, effects } = applyStreamEvent(current, ev, {
98
+ ownTurnIds: ownTurnIds.current,
99
+ ownTexts: ownTexts.current,
100
+ sessionId,
101
+ echoOf,
102
+ goalNotice: goalNoticeRef.current,
103
+ recapNotice: recapNoticeRef.current,
104
+ words: wordsRef.current,
105
+ imageUrl: imageUrlRef.current
106
+ });
107
+ if (ev.type === "replay_truncated") appliedSinceSeed.current = [];
108
+ else if (state.cursor > current.cursor) {
109
+ appliedSinceSeed.current.push(ev);
110
+ if (appliedSinceSeed.current.length > MAX_REPLAY_FRAMES) appliedSinceSeed.current.shift();
111
+ if (echoOf) unechoed.current.delete(echoOf);
112
+ forgetSettled(unechoed.current, current, state);
113
+ }
114
+ apply(() => state);
115
+ for (const effect of effects) onEffectRef.current(effect);
116
+ }, [apply, sessionId]);
117
+ /** True once the running turn took the text, or the refusal if it may have.
118
+ * Commands and shell escapes change the next turn, so like the TUI they wait. */
119
+ const trySteer = useCallback(async (text, { pastes, images, previews }) => {
120
+ const steerTo = steerRef.current;
121
+ if (!steerTo || !turnRunning(transcriptRef.current) || /^[/!]/.test(text.trimStart())) return false;
122
+ ownSeq.current += 1;
123
+ const localId = `own-${ownSeq.current}`;
124
+ unechoed.current.set(localId, {
125
+ text,
126
+ pastes,
127
+ previews,
128
+ steered: true
129
+ });
130
+ apply((state) => appendSteeredMessage(state, text, localId, pastes, previews));
131
+ const result = await steerTo(text, pastes, images);
132
+ if ("delivered" in result && result.delivered) return true;
133
+ unechoed.current.delete(localId);
134
+ apply((state) => dropMessage(state, localId));
135
+ return "lost" in result ? result.lost : false;
136
+ }, [apply]);
137
+ const sendMessage = useCallback(async (text, options = {}) => {
138
+ const { pastes, images, previews } = options;
139
+ setSending(true);
140
+ const steered = options.steer !== false && await trySteer(text, options);
141
+ if (steered) {
142
+ setSending(false);
143
+ return steered === true ? null : steered;
144
+ }
145
+ ownTexts.current.add(text);
146
+ ownSeq.current += 1;
147
+ const localId = `own-${ownSeq.current}`;
148
+ unechoed.current.set(localId, {
149
+ text,
150
+ pastes,
151
+ previews
152
+ });
153
+ apply((state) => appendOwnMessage(state, text, localId, pastes, previews));
154
+ const result = await sendRef.current(text, pastes, images);
155
+ setSending(false);
156
+ if ("error" in result) {
157
+ ownTexts.current.delete(text);
158
+ unechoed.current.delete(localId);
159
+ apply((state) => dropMessage(state, localId));
160
+ return result.error;
161
+ }
162
+ if (result.queued && unechoed.current.has(localId)) apply((state) => markQueued(state, localId));
163
+ if (result.turnId) {
164
+ ownTurnIds.current.add(result.turnId);
165
+ ownTexts.current.delete(text);
166
+ const pending = unechoed.current.get(localId);
167
+ if (pending) pending.turnId = result.turnId;
168
+ }
169
+ return null;
170
+ }, [apply, trySteer]);
171
+ const resolveApproval = useCallback((approvalId) => apply((state) => resolveApprovalEverywhere(state, approvalId)), [apply]);
172
+ const noteShellRun = useCallback((command, output) => apply((state) => appendShellRun(state, command, output)), [apply]);
173
+ const queuedTurn = (id) => {
174
+ const sent = unechoed.current.get(id);
175
+ const queued = transcriptRef.current?.queued.some((m) => m.id === id);
176
+ return sent && !sent.steered && queued ? sent.turnId : void 0;
177
+ };
178
+ return {
179
+ transcript,
180
+ sending,
181
+ onEvent,
182
+ sendMessage,
183
+ resolveApproval,
184
+ noteShellRun,
185
+ canRemoveQueued: useCallback((id) => !!withdrawRef.current && !!queuedTurn(id), []),
186
+ removeQueued: useCallback(async (id) => {
187
+ const turnId = queuedTurn(id);
188
+ const withdrawFrom = withdrawRef.current;
189
+ if (!turnId || !withdrawFrom) return null;
190
+ const result = await withdrawFrom(turnId);
191
+ if (result.error) return result.error;
192
+ unechoed.current.delete(id);
193
+ ownTurnIds.current.delete(turnId);
194
+ apply((state) => dropMessage(state, id));
195
+ return null;
196
+ }, [apply]),
197
+ cursor: useCallback(() => transcriptRef.current?.cursor ?? 0, [])
198
+ };
199
+ }
200
+ export { usePwCodeTranscript };
package/package.json CHANGED
@@ -1,6 +1,56 @@
1
1
  {
2
2
  "name": "@parallelworks/code",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0",
4
+ "description": "Shared client logic for pw code sessions on Parallel Works ACTIVATE: the session wire types, and the transcript a session's history and event stream reduce to",
5
+ "license": "Apache-2.0",
6
+ "author": "Parallel Works <support@parallelworks.com>",
7
+ "homepage": "https://parallelworks.com/docs",
8
+ "type": "module",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "dependencies": {
19
+ "luxon": "^3.7.2"
20
+ },
21
+ "peerDependencies": {
22
+ "@parallelworks/ui": ">=0.130.0 <1",
23
+ "react": "^19.0.0"
24
+ },
25
+ "devDependencies": {
26
+ "@arethetypeswrong/cli": "^0.18.5",
27
+ "@parallelworks/ui": "^0.130.0",
28
+ "@testing-library/dom": "^10.4.2",
29
+ "@testing-library/react": "^16.3.3",
30
+ "@types/luxon": "^3.7.6",
31
+ "@types/node": "^26.6.6",
32
+ "@types/react": "19.3.0",
33
+ "@types/react-dom": "19.3.0",
34
+ "jsdom": "^26.1.0",
35
+ "publint": "^0.3.25",
36
+ "react": "19.3.1",
37
+ "react-dom": "19.3.1",
38
+ "typescript": "^7.0.2",
39
+ "vite": "^8.3.5",
40
+ "vitest": "^5.0.5"
41
+ },
42
+ "publishConfig": {
43
+ "registry": "https://registry.npmjs.org"
44
+ },
45
+ "scripts": {
46
+ "build": "vite build && pnpm build:types",
47
+ "build:types": "tsc -p tsconfig.build.json && node scripts/declaration-extensions.mjs",
48
+ "clean": "rm -rf dist",
49
+ "check-types": "tsc --noEmit",
50
+ "test": "vitest run",
51
+ "lint:package": "publint --strict",
52
+ "verify:pack": "node scripts/verify-pack.mjs"
53
+ },
54
+ "main": "./dist/index.js",
55
+ "types": "./dist/index.d.ts"
6
56
  }