devframe 0.1.20 → 0.1.22

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.
Files changed (95) hide show
  1. package/README.md +41 -18
  2. package/dist/{_shared-S-Ujqz_L.mjs → _shared-DcJX9-Az.mjs} +4 -4
  3. package/dist/adapters/build.d.mts +7 -7
  4. package/dist/adapters/build.mjs +15 -14
  5. package/dist/adapters/cli.d.mts +2 -2
  6. package/dist/adapters/cli.mjs +5 -5
  7. package/dist/adapters/dev.d.mts +18 -9
  8. package/dist/adapters/dev.mjs +1 -1
  9. package/dist/adapters/embedded.d.mts +6 -6
  10. package/dist/adapters/embedded.mjs +3 -3
  11. package/dist/adapters/mcp.d.mts +3 -3
  12. package/dist/adapters/mcp.mjs +6 -5
  13. package/dist/adapters/vite.d.mts +46 -12
  14. package/dist/adapters/vite.mjs +81 -17
  15. package/dist/chunk-e9Ob2GDo.mjs +26 -0
  16. package/dist/client/index.d.mts +19 -144
  17. package/dist/client/index.mjs +20 -20
  18. package/dist/colors-Bl4W18Mh.mjs +123 -0
  19. package/dist/constants.d.mts +12 -15
  20. package/dist/constants.mjs +12 -29
  21. package/dist/context-DBd794Rn.d.mts +51 -0
  22. package/dist/context-DUibxhrR.mjs +1034 -0
  23. package/dist/{dev-B8i_CBlQ.mjs → dev-BGpTpYiR.mjs} +20 -21
  24. package/dist/{devtool-Bm6zZAw5.d.mts → devframe-DulcIxwu.d.mts} +59 -569
  25. package/dist/diagnostics-BFhNNmST.mjs +56 -0
  26. package/dist/hash-BHZbo80D.mjs +126 -0
  27. package/dist/{human-id-CHS0s28X.mjs → human-id-adtUWQLr.mjs} +12 -4
  28. package/dist/{index-BCo03GEF.d.mts → index-DB2Ie0Or.d.mts} +2 -3
  29. package/dist/index.d.mts +4 -6
  30. package/dist/index.mjs +2 -8
  31. package/dist/launch-editor-KA_21J1T.mjs +581 -0
  32. package/dist/node/auth.d.mts +44 -0
  33. package/dist/node/auth.mjs +55 -0
  34. package/dist/node/index.d.mts +14 -187
  35. package/dist/node/index.mjs +6 -61
  36. package/dist/node/internal.d.mts +16 -0
  37. package/dist/node/internal.mjs +50 -0
  38. package/dist/{open-BtOOEldu.mjs → open-DmFp0qZA.mjs} +15 -6
  39. package/dist/recipes/open-helpers.d.mts +4 -9
  40. package/dist/recipes/open-helpers.mjs +7 -12
  41. package/dist/revoke-DIMz1r7-.mjs +35 -0
  42. package/dist/rpc/index.d.mts +3 -3
  43. package/dist/rpc/index.mjs +4 -4
  44. package/dist/rpc/transports/ws-client.d.mts +1 -1
  45. package/dist/rpc/transports/ws-client.mjs +2 -1
  46. package/dist/rpc/transports/ws-server.d.mts +1 -1
  47. package/dist/rpc/transports/ws-server.mjs +2 -1
  48. package/dist/{rpc-INbWfHoX.mjs → rpc-CkZuoz-m.mjs} +3 -2
  49. package/dist/{serialization-DwKi05Pn.mjs → serialization-CwO31axa.mjs} +1 -2
  50. package/dist/{server-qRRM8t3v.mjs → server-ma8-ZVyX.mjs} +1 -1
  51. package/dist/{server-DksyT-um.d.mts → server-zKEDxgqD.d.mts} +4 -3
  52. package/dist/shared-state-DCDs0e7y.mjs +928 -0
  53. package/dist/{static-dump-C1aVSwxY.mjs → static-dump-D7AvjrgL.mjs} +1 -1
  54. package/dist/storage-CNC38eU-.mjs +117 -0
  55. package/dist/structured-clone-DcDc2Dds.mjs +221 -0
  56. package/dist/types/index.d.mts +4 -4
  57. package/dist/types/index.mjs +11 -2
  58. package/dist/utils/colors.d.mts +28 -0
  59. package/dist/utils/colors.mjs +2 -0
  60. package/dist/utils/events.d.mts +1 -1
  61. package/dist/utils/hash.d.mts +7 -0
  62. package/dist/utils/hash.mjs +2 -0
  63. package/dist/utils/human-id.d.mts +6 -8
  64. package/dist/utils/human-id.mjs +1 -2
  65. package/dist/utils/launch-editor.d.mts +13 -0
  66. package/dist/utils/launch-editor.mjs +2 -0
  67. package/dist/utils/open.d.mts +16 -0
  68. package/dist/utils/open.mjs +2 -0
  69. package/dist/utils/serve-static.d.mts +30 -0
  70. package/dist/utils/serve-static.mjs +152 -0
  71. package/dist/utils/shared-state.d.mts +1 -1
  72. package/dist/utils/shared-state.mjs +1 -35
  73. package/dist/utils/streaming-channel.d.mts +1 -1
  74. package/dist/utils/structured-clone.d.mts +21 -0
  75. package/dist/utils/structured-clone.mjs +2 -0
  76. package/dist/utils/when.d.mts +384 -2
  77. package/dist/utils/when.mjs +20 -2
  78. package/dist/{ws-client-DQySVfF_.d.mts → ws-client-Bavoya6-.d.mts} +1 -1
  79. package/dist/{ws-server-VQqESKAs.d.mts → ws-server-DjvlwLuM.d.mts} +1 -1
  80. package/package.json +23 -13
  81. package/skills/devframe/SKILL.md +93 -117
  82. package/skills/devframe/templates/{counter-devtool.ts → counter-devframe.ts} +5 -10
  83. package/skills/devframe/templates/{spa-devtool.ts → spa-devframe.ts} +5 -10
  84. package/skills/devframe/templates/vite-client.ts +2 -2
  85. package/dist/adapters/kit.d.mts +0 -23
  86. package/dist/adapters/kit.mjs +0 -16
  87. package/dist/context-BfvbAyGk.mjs +0 -7215
  88. package/dist/main-DpINGndA.mjs +0 -601
  89. package/dist/utils/state.d.mts +0 -50
  90. package/dist/utils/state.mjs +0 -26
  91. package/dist/when-aBBXAEh5.d.mts +0 -401
  92. package/dist/{define-Bb4zh-Dc.mjs → define-CW9gLnyG.mjs} +0 -0
  93. package/dist/{host-h3-BMvrFzIJ.mjs → host-h3-Dz8YnFgu.mjs} +2 -2
  94. /package/dist/{transports-BPUzHhI2.mjs → transports-BnCs4rj9.mjs} +0 -0
  95. /package/dist/{types-ag029cAe.d.mts → types-4rdUEi2R.d.mts} +0 -0
@@ -1,4 +1,4 @@
1
- import { n as dumpFunctions, s as getRpcHandler } from "./rpc-INbWfHoX.mjs";
1
+ import { n as dumpFunctions, s as getRpcHandler } from "./rpc-CkZuoz-m.mjs";
2
2
  import { DEVTOOLS_RPC_DUMP_DIRNAME } from "./constants.mjs";
3
3
  //#region src/node/static-dump.ts
4
4
  function makeDumpKey(name) {
@@ -0,0 +1,117 @@
1
+ import { n as logger } from "./diagnostics-BFhNNmST.mjs";
2
+ import { t as createSharedState } from "./shared-state-DCDs0e7y.mjs";
3
+ import fs from "node:fs";
4
+ import { dirname } from "pathe";
5
+ //#region ../../../node_modules/.pnpm/perfect-debounce@2.1.0/node_modules/perfect-debounce/dist/index.mjs
6
+ const DEBOUNCE_DEFAULTS = { trailing: true };
7
+ /**
8
+ Debounce functions
9
+ @param fn - Promise-returning/async function to debounce.
10
+ @param wait - Milliseconds to wait before calling `fn`. Default value is 25ms
11
+ @returns A function that delays calling `fn` until after `wait` milliseconds have elapsed since the last time it was called.
12
+ @example
13
+ ```
14
+ import { debounce } from 'perfect-debounce';
15
+ const expensiveCall = async input => input;
16
+ const debouncedFn = debounce(expensiveCall, 200);
17
+ for (const number of [1, 2, 3]) {
18
+ console.log(await debouncedFn(number));
19
+ }
20
+ //=> 1
21
+ //=> 2
22
+ //=> 3
23
+ ```
24
+ */
25
+ function debounce(fn, wait = 25, options = {}) {
26
+ options = {
27
+ ...DEBOUNCE_DEFAULTS,
28
+ ...options
29
+ };
30
+ if (!Number.isFinite(wait)) throw new TypeError("Expected `wait` to be a finite number");
31
+ let leadingValue;
32
+ let timeout;
33
+ let resolveList = [];
34
+ let currentPromise;
35
+ let trailingArgs;
36
+ const applyFn = (_this, args) => {
37
+ currentPromise = _applyPromised(fn, _this, args);
38
+ currentPromise.finally(() => {
39
+ currentPromise = null;
40
+ if (options.trailing && trailingArgs && !timeout) {
41
+ const promise = applyFn(_this, trailingArgs);
42
+ trailingArgs = null;
43
+ return promise;
44
+ }
45
+ });
46
+ return currentPromise;
47
+ };
48
+ const debounced = function(...args) {
49
+ if (options.trailing) trailingArgs = args;
50
+ if (currentPromise) return currentPromise;
51
+ return new Promise((resolve) => {
52
+ const shouldCallNow = !timeout && options.leading;
53
+ clearTimeout(timeout);
54
+ timeout = setTimeout(() => {
55
+ timeout = null;
56
+ const promise = options.leading ? leadingValue : applyFn(this, args);
57
+ trailingArgs = null;
58
+ for (const _resolve of resolveList) _resolve(promise);
59
+ resolveList = [];
60
+ }, wait);
61
+ if (shouldCallNow) {
62
+ leadingValue = applyFn(this, args);
63
+ resolve(leadingValue);
64
+ } else resolveList.push(resolve);
65
+ });
66
+ };
67
+ const _clearTimeout = (timer) => {
68
+ if (timer) {
69
+ clearTimeout(timer);
70
+ timeout = null;
71
+ }
72
+ };
73
+ debounced.isPending = () => !!timeout;
74
+ debounced.cancel = () => {
75
+ _clearTimeout(timeout);
76
+ resolveList = [];
77
+ trailingArgs = null;
78
+ };
79
+ debounced.flush = () => {
80
+ _clearTimeout(timeout);
81
+ if (!trailingArgs || currentPromise) return;
82
+ const args = trailingArgs;
83
+ trailingArgs = null;
84
+ return applyFn(this, args);
85
+ };
86
+ return debounced;
87
+ }
88
+ async function _applyPromised(fn, _this, args) {
89
+ return await fn.apply(_this, args);
90
+ }
91
+ //#endregion
92
+ //#region src/node/storage.ts
93
+ function createStorage(options) {
94
+ const { mergeInitialValue = (initialValue, savedValue) => ({
95
+ ...initialValue,
96
+ ...savedValue
97
+ }), debounce: debounceTime = 100 } = options;
98
+ let initialValue = options.initialValue;
99
+ if (fs.existsSync(options.filepath)) try {
100
+ const savedValue = JSON.parse(fs.readFileSync(options.filepath, "utf-8"));
101
+ initialValue = mergeInitialValue ? mergeInitialValue(options.initialValue, savedValue) : savedValue;
102
+ } catch (error) {
103
+ logger.DF0012({ filepath: options.filepath }, { cause: error }).log();
104
+ initialValue = options.initialValue;
105
+ }
106
+ const state = createSharedState({
107
+ initialValue,
108
+ enablePatches: false
109
+ });
110
+ state.on("updated", debounce((newState) => {
111
+ fs.mkdirSync(dirname(options.filepath), { recursive: true });
112
+ fs.writeFileSync(options.filepath, `${JSON.stringify(newState, null, 2)}\n`);
113
+ }, debounceTime));
114
+ return state;
115
+ }
116
+ //#endregion
117
+ export { createStorage as t };
@@ -0,0 +1,221 @@
1
+ //#region ../../../node_modules/.pnpm/structured-clone-es@2.0.0/node_modules/structured-clone-es/dist/index.mjs
2
+ const env = typeof self === "object" ? self : globalThis;
3
+ function deserializer($, _) {
4
+ const as = (out, index) => {
5
+ $.set(index, out);
6
+ return out;
7
+ };
8
+ const unpair = (index) => {
9
+ if ($.has(index)) return $.get(index);
10
+ const [type, value] = _[index];
11
+ switch (type) {
12
+ case 0:
13
+ case -1: return as(value, index);
14
+ case 1: {
15
+ const arr = as([], index);
16
+ for (const index of value) arr.push(unpair(index));
17
+ return arr;
18
+ }
19
+ case 2: {
20
+ const object = as({}, index);
21
+ for (const [key, index] of value) object[unpair(key)] = unpair(index);
22
+ return object;
23
+ }
24
+ case 3: return as(new Date(value), index);
25
+ case 4: {
26
+ const { source, flags } = value;
27
+ return as(new RegExp(source, flags), index);
28
+ }
29
+ case 5: {
30
+ const map = as(/* @__PURE__ */ new Map(), index);
31
+ for (const [key, index] of value) map.set(unpair(key), unpair(index));
32
+ return map;
33
+ }
34
+ case 6: {
35
+ const set = as(/* @__PURE__ */ new Set(), index);
36
+ for (const index of value) set.add(unpair(index));
37
+ return set;
38
+ }
39
+ case 7: {
40
+ const { name, message } = value;
41
+ return as(new env[name](message), index);
42
+ }
43
+ case 8: return as(BigInt(value), index);
44
+ case "BigInt": return as(Object(BigInt(value)), index);
45
+ case "ArrayBuffer": return as(new Uint8Array(value).buffer, value);
46
+ case "DataView": {
47
+ const { buffer } = new Uint8Array(value);
48
+ return as(new DataView(buffer), value);
49
+ }
50
+ }
51
+ return as(new env[type](value), index);
52
+ };
53
+ return unpair;
54
+ }
55
+ /**
56
+ * Returns a deserialized value from a serialized array of Records.
57
+ * @param serialized a previously serialized value.
58
+ */
59
+ function deserialize(serialized) {
60
+ return deserializer(/* @__PURE__ */ new Map(), serialized)(0);
61
+ }
62
+ const EMPTY = "";
63
+ const { toString } = {};
64
+ const { keys } = Object;
65
+ function typeOf(value) {
66
+ const type = typeof value;
67
+ if (type !== "object" || !value) return [0, type];
68
+ const asString = toString.call(value).slice(8, -1);
69
+ switch (asString) {
70
+ case "Array": return [1, EMPTY];
71
+ case "Object": return [2, EMPTY];
72
+ case "Date": return [3, EMPTY];
73
+ case "RegExp": return [4, EMPTY];
74
+ case "Map": return [5, EMPTY];
75
+ case "Set": return [6, EMPTY];
76
+ case "DataView": return [1, asString];
77
+ }
78
+ if (asString.includes("Array")) return [1, asString];
79
+ if (asString.includes("Error")) return [7, asString];
80
+ return [2, asString];
81
+ }
82
+ function shouldSkip([TYPE, type]) {
83
+ return TYPE === 0 && (type === "function" || type === "symbol");
84
+ }
85
+ function serializer(strict, json, $, _) {
86
+ const as = (out, value) => {
87
+ const index = _.push(out) - 1;
88
+ $.set(value, index);
89
+ return index;
90
+ };
91
+ const pair = (value) => {
92
+ if ($.has(value)) return $.get(value);
93
+ let [TYPE, type] = typeOf(value);
94
+ switch (TYPE) {
95
+ case 0: {
96
+ let entry = value;
97
+ switch (type) {
98
+ case "bigint":
99
+ TYPE = 8;
100
+ entry = value.toString();
101
+ break;
102
+ case "function":
103
+ case "symbol":
104
+ if (strict) throw new TypeError(`unable to serialize ${type}`);
105
+ entry = null;
106
+ break;
107
+ case "undefined": return as([-1], value);
108
+ }
109
+ return as([TYPE, entry], value);
110
+ }
111
+ case 1: {
112
+ if (type) {
113
+ let spread = value;
114
+ if (type === "DataView") spread = new Uint8Array(value.buffer);
115
+ else if (type === "ArrayBuffer") spread = new Uint8Array(value);
116
+ return as([type, [...spread]], value);
117
+ }
118
+ const arr = [];
119
+ const index = as([TYPE, arr], value);
120
+ for (const entry of value) arr.push(pair(entry));
121
+ return index;
122
+ }
123
+ case 2: {
124
+ if (type) switch (type) {
125
+ case "BigInt": return as([type, value.toString()], value);
126
+ case "Boolean":
127
+ case "Number":
128
+ case "String": return as([type, value.valueOf()], value);
129
+ }
130
+ if (json && "toJSON" in value) return pair(value.toJSON());
131
+ const entries = [];
132
+ const index = as([TYPE, entries], value);
133
+ for (const key of keys(value)) if (strict || !shouldSkip(typeOf(value[key]))) entries.push([pair(key), pair(value[key])]);
134
+ return index;
135
+ }
136
+ case 3: return as([TYPE, value.toISOString()], value);
137
+ case 4: {
138
+ const { source, flags } = value;
139
+ return as([TYPE, {
140
+ source,
141
+ flags
142
+ }], value);
143
+ }
144
+ case 5: {
145
+ const entries = [];
146
+ const index = as([TYPE, entries], value);
147
+ for (const [key, entry] of value) if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry)))) entries.push([pair(key), pair(entry)]);
148
+ return index;
149
+ }
150
+ case 6: {
151
+ const entries = [];
152
+ const index = as([TYPE, entries], value);
153
+ for (const entry of value) if (strict || !shouldSkip(typeOf(entry))) entries.push(pair(entry));
154
+ return index;
155
+ }
156
+ }
157
+ const { message } = value;
158
+ return as([TYPE, {
159
+ name: type,
160
+ message
161
+ }], value);
162
+ };
163
+ return pair;
164
+ }
165
+ /**
166
+ * Returns an array of serialized Records.
167
+ */
168
+ function serialize(value, options = {}) {
169
+ const _ = [];
170
+ serializer(!(options.json || options.lossy), !!options.json, /* @__PURE__ */ new Map(), _)(value);
171
+ return _;
172
+ }
173
+ const { parse: $parse, stringify: $stringify } = JSON;
174
+ const options = {
175
+ json: true,
176
+ lossy: true
177
+ };
178
+ /**
179
+ * Revive a previously stringified structured clone.
180
+ * @param str previously stringified data as string.
181
+ */
182
+ function parse(str) {
183
+ return deserialize($parse(str));
184
+ }
185
+ /**
186
+ * Represent a structured clone value as string.
187
+ * @param any some clone-able value to stringify.
188
+ */
189
+ function stringify(any) {
190
+ return $stringify(serialize(any, options));
191
+ }
192
+ //#endregion
193
+ //#region src/utils/structured-clone.ts
194
+ /**
195
+ * Serialize a structured-cloneable value (`Map`, `Set`, `Date`, `BigInt`,
196
+ * cycles, class instances, …) into a JSON-safe records array.
197
+ */
198
+ function structuredCloneSerialize(value) {
199
+ return serialize(value);
200
+ }
201
+ /**
202
+ * Inverse of {@link structuredCloneSerialize}.
203
+ */
204
+ function structuredCloneDeserialize(value) {
205
+ return deserialize(value);
206
+ }
207
+ /**
208
+ * Serialize a structured-cloneable value to a single string. Equivalent
209
+ * to `JSON.stringify(structuredCloneSerialize(value))`.
210
+ */
211
+ function structuredCloneStringify(value) {
212
+ return stringify(value);
213
+ }
214
+ /**
215
+ * Inverse of {@link structuredCloneStringify}.
216
+ */
217
+ function structuredCloneParse(value) {
218
+ return parse(value);
219
+ }
220
+ //#endregion
221
+ export { structuredCloneStringify as i, structuredCloneParse as n, structuredCloneSerialize as r, structuredCloneDeserialize as t };
@@ -1,4 +1,4 @@
1
- import { $ as DevToolsRpcServerFunctions, $t as AgentManifest, At as DevToolsViewCustomRender, Bt as DevToolsDiagnosticsHost, Ct as DevToolsDockEntryBase, Dt as DevToolsDockUserEntry, Et as DevToolsDockHost, Ft as JsonRenderElement, G as DevToolsChildProcessExecuteOptions, Gt as DevToolsCommandHandle, H as EntriesToObject, Ht as DevToolsClientCommand, It as JsonRenderSpec, J as DevToolsTerminalSession, Jt as DevToolsCommandsHost, K as DevToolsChildProcessTerminalSession, Kt as DevToolsCommandKeybinding, Lt as JsonRenderer, Mt as DevToolsViewJsonRender, Nt as DevToolsViewLauncher, Ot as DevToolsViewAction, Pt as DevToolsViewLauncherStatus, Q as DevToolsRpcClientFunctions, Qt as AgentHandle, Rt as RemoteDockOptions, St as DevToolsDockEntry, Tt as DevToolsDockEntryIcon, U as PartialWithoutId, Ut as DevToolsCommandBase, V as DevToolsViewHost, Vt as DevToolsDiagnosticsLogger, W as Thenable, Wt as DevToolsCommandEntry, X as DevToolsTerminalStatus, Xt as DevToolsServerCommandEntry, Y as DevToolsTerminalSessionBase, Yt as DevToolsCommandsHostEvents, Z as DevToolsDocksUserSettings, Zt as DevToolsServerCommandInput, _ as RpcSharedStateGetOptions, _t as DevToolsMessagesClient, a as DevtoolRuntime, an as DevToolsAgentHost, at as DevToolsLogFilePosition, b as RpcStreamingChannelOptions, bt as ClientScriptEntry, c as defineDevtool, cn as EventUnsubscribe, ct as DevToolsLogsClient, d as DevToolsNodeContext, dt as DevToolsMessageEntry, en as AgentResource, et as DevToolsRpcSharedStates, f as DevToolsNodeUtils, ft as DevToolsMessageEntryFrom, g as RpcFunctionsHost, gt as DevToolsMessageLevel, h as RpcBroadcastOptions, ht as DevToolsMessageHandle, i as DevtoolDeploymentKind, in as AgentToolInput, it as DevToolsLogEntryInput, jt as DevToolsViewIframe, kt as DevToolsViewBuiltin, l as ConnectionMeta, ln as EventsMap, lt as DevToolsLogsHost, m as DevToolsNodeRpcSession, mt as DevToolsMessageFilePosition, n as DevtoolCliOptions, nn as AgentResourceInput, nt as DevToolsLogEntry, o as DevtoolSetupInfo, on as DevToolsAgentHostEvents, ot as DevToolsLogHandle, p as RemoteConnectionInfo, pt as DevToolsMessageEntryInput, q as DevToolsTerminalHost, qt as DevToolsCommandShortcutOverrides, r as DevtoolDefinition, rn as AgentTool, rt as DevToolsLogEntryFrom, s as DevtoolSpaOptions, sn as EventEmitter, st as DevToolsLogLevel, t as DevtoolBrowserContext, tn as AgentResourceContent, tt as DevToolsLogElementPosition, u as DevToolsCapabilities, ut as DevToolsMessageElementPosition, v as RpcSharedStateHost, vt as DevToolsMessagesHost, wt as DevToolsDockEntryCategory, x as RpcStreamingHost, xt as DevToolsDockEntriesGrouped, y as RpcStreamingChannel, yt as DevToolsHost, zt as DevToolsDiagnosticsDefinition } from "../devtool-Bm6zZAw5.mjs";
2
- import { m as RpcFunctionAgentOptions } from "../types-ag029cAe.mjs";
3
- import { t as DevToolsNodeRpcSessionMeta } from "../ws-server-VQqESKAs.mjs";
4
- export { AgentHandle, AgentManifest, AgentResource, AgentResourceContent, AgentResourceInput, AgentTool, AgentToolInput, ClientScriptEntry, ConnectionMeta, DevToolsAgentHost, DevToolsAgentHostEvents, DevToolsCapabilities, DevToolsChildProcessExecuteOptions, DevToolsChildProcessTerminalSession, DevToolsClientCommand, DevToolsCommandBase, DevToolsCommandEntry, DevToolsCommandHandle, DevToolsCommandKeybinding, DevToolsCommandShortcutOverrides, DevToolsCommandsHost, DevToolsCommandsHostEvents, DevToolsDiagnosticsDefinition, DevToolsDiagnosticsHost, DevToolsDiagnosticsLogger, DevToolsDockEntriesGrouped, DevToolsDockEntry, DevToolsDockEntryBase, DevToolsDockEntryCategory, DevToolsDockEntryIcon, DevToolsDockHost, DevToolsDockUserEntry, DevToolsDocksUserSettings, DevToolsHost, DevToolsLogElementPosition, DevToolsLogEntry, DevToolsLogEntryFrom, DevToolsLogEntryInput, DevToolsLogFilePosition, DevToolsLogHandle, DevToolsLogLevel, DevToolsLogsClient, DevToolsLogsHost, DevToolsMessageElementPosition, DevToolsMessageEntry, DevToolsMessageEntryFrom, DevToolsMessageEntryInput, DevToolsMessageFilePosition, DevToolsMessageHandle, DevToolsMessageLevel, DevToolsMessagesClient, DevToolsMessagesHost, DevToolsNodeContext, DevToolsNodeRpcSession, DevToolsNodeRpcSessionMeta, DevToolsNodeUtils, DevToolsRpcClientFunctions, DevToolsRpcServerFunctions, DevToolsRpcSharedStates, DevToolsServerCommandEntry, DevToolsServerCommandInput, DevToolsTerminalHost, DevToolsTerminalSession, DevToolsTerminalSessionBase, DevToolsTerminalStatus, DevToolsViewAction, DevToolsViewBuiltin, DevToolsViewCustomRender, DevToolsViewHost, DevToolsViewIframe, DevToolsViewJsonRender, DevToolsViewLauncher, DevToolsViewLauncherStatus, DevtoolBrowserContext, DevtoolCliOptions, DevtoolDefinition, DevtoolDeploymentKind, DevtoolRuntime, DevtoolSetupInfo, DevtoolSpaOptions, EntriesToObject, EventEmitter, EventUnsubscribe, EventsMap, JsonRenderElement, JsonRenderSpec, JsonRenderer, PartialWithoutId, RemoteConnectionInfo, RemoteDockOptions, RpcBroadcastOptions, RpcFunctionAgentOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost, Thenable, defineDevtool };
1
+ import { $ as DevToolsRpcSharedStates, C as RpcSharedStateGetOptions, D as RpcStreamingHost, E as RpcStreamingChannelOptions, J as EntriesToObject, Q as DevToolsRpcServerFunctions, S as RpcFunctionsHost, T as RpcStreamingChannel, X as Thenable, Y as PartialWithoutId, Z as DevToolsRpcClientFunctions, _ as ConnectionMeta, a as DevframeRuntime, at as AgentManifest, b as DevToolsNodeRpcSession, c as DevtoolBrowserContext, ct as AgentResourceInput, d as DevtoolDeploymentKind, dt as DevToolsAgentHost, et as DevToolsHost, f as DevtoolRuntime, ft as DevToolsAgentHostEvents, g as defineDevtool, h as defineDevframe, ht as EventsMap, i as DevframeDeploymentKind, it as AgentHandle, l as DevtoolCliOptions, lt as AgentTool, m as DevtoolSpaOptions, mt as EventUnsubscribe, n as DevframeCliOptions, nt as DevToolsDiagnosticsHost, o as DevframeSetupInfo, ot as AgentResource, p as DevtoolSetupInfo, pt as EventEmitter, q as DevToolsViewHost, r as DevframeDefinition, rt as DevToolsDiagnosticsLogger, s as DevframeSpaOptions, st as AgentResourceContent, t as DevframeBrowserContext, tt as DevToolsDiagnosticsDefinition, u as DevtoolDefinition, ut as AgentToolInput, v as DevToolsCapabilities, w as RpcSharedStateHost, x as RpcBroadcastOptions, y as DevToolsNodeContext } from "../devframe-DulcIxwu.mjs";
2
+ import { m as RpcFunctionAgentOptions } from "../types-4rdUEi2R.mjs";
3
+ import { t as DevToolsNodeRpcSessionMeta } from "../ws-server-DjvlwLuM.mjs";
4
+ export { AgentHandle, AgentManifest, AgentResource, AgentResourceContent, AgentResourceInput, AgentTool, AgentToolInput, ConnectionMeta, DevToolsAgentHost, DevToolsAgentHostEvents, DevToolsCapabilities, DevToolsDiagnosticsDefinition, DevToolsDiagnosticsHost, DevToolsDiagnosticsLogger, DevToolsHost, DevToolsNodeContext, DevToolsNodeRpcSession, DevToolsNodeRpcSessionMeta, DevToolsRpcClientFunctions, DevToolsRpcServerFunctions, DevToolsRpcSharedStates, DevToolsViewHost, DevframeBrowserContext, DevframeCliOptions, DevframeDefinition, DevframeDeploymentKind, DevframeRuntime, DevframeSetupInfo, DevframeSpaOptions, DevtoolBrowserContext, DevtoolCliOptions, DevtoolDefinition, DevtoolDeploymentKind, DevtoolRuntime, DevtoolSetupInfo, DevtoolSpaOptions, EntriesToObject, EventEmitter, EventUnsubscribe, EventsMap, PartialWithoutId, RpcBroadcastOptions, RpcFunctionAgentOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost, Thenable, defineDevframe, defineDevtool };
@@ -1,6 +1,15 @@
1
- //#region src/types/devtool.ts
1
+ //#region src/types/devframe.ts
2
+ function defineDevframe(d) {
3
+ return d;
4
+ }
5
+ let warnedDefineDevtool = false;
6
+ /** @deprecated Use `defineDevframe`. */
2
7
  function defineDevtool(d) {
8
+ if (!warnedDefineDevtool) {
9
+ warnedDefineDevtool = true;
10
+ console.warn("[devframe] `defineDevtool` is deprecated; use `defineDevframe` instead.");
11
+ }
3
12
  return d;
4
13
  }
5
14
  //#endregion
6
- export { defineDevtool };
15
+ export { defineDevframe, defineDevtool };
@@ -0,0 +1,28 @@
1
+ //#region src/utils/colors.d.ts
2
+ /**
3
+ * A colorizer — callable as a function (`colors.red('foo')`) or as a
4
+ * tagged template (``colors.red`foo ${bar}` ``).
5
+ */
6
+ interface ColorFn {
7
+ (text: unknown): string;
8
+ (template: TemplateStringsArray, ...values: unknown[]): string;
9
+ }
10
+ /**
11
+ * Minimal terminal color palette. Each entry is callable as both a
12
+ * plain function and a tagged template.
13
+ */
14
+ interface Colors {
15
+ blue: ColorFn;
16
+ cyan: ColorFn;
17
+ gray: ColorFn;
18
+ green: ColorFn;
19
+ red: ColorFn;
20
+ yellow: ColorFn;
21
+ bold: ColorFn;
22
+ dim: ColorFn;
23
+ reset: ColorFn;
24
+ underline: ColorFn;
25
+ }
26
+ declare const colors: Colors;
27
+ //#endregion
28
+ export { ColorFn, Colors, colors };
@@ -0,0 +1,2 @@
1
+ import { t as colors } from "../colors-Bl4W18Mh.mjs";
2
+ export { colors };
@@ -1,4 +1,4 @@
1
- import { ln as EventsMap, sn as EventEmitter } from "../devtool-Bm6zZAw5.mjs";
1
+ import { ht as EventsMap, pt as EventEmitter } from "../devframe-DulcIxwu.mjs";
2
2
 
3
3
  //#region src/utils/events.d.ts
4
4
  /**
@@ -0,0 +1,7 @@
1
+ //#region src/utils/hash.d.ts
2
+ /**
3
+ * Stable, deterministic hash of any structured-cloneable value.
4
+ */
5
+ declare function hash(value: unknown): string;
6
+ //#endregion
7
+ export { hash };
@@ -0,0 +1,2 @@
1
+ import { t as hash } from "../hash-BHZbo80D.mjs";
2
+ export { hash };
@@ -1,10 +1,8 @@
1
- //#region ../../../node_modules/.pnpm/human-id@4.1.3/node_modules/human-id/dist/index.d.ts
2
- interface Options {
3
- separator?: string;
4
- capitalize?: boolean;
5
- adjectiveCount?: number;
6
- addAdverb?: boolean;
7
- }
8
- declare function humanId(options?: Options | string | boolean): string;
1
+ //#region src/utils/human-id.d.ts
2
+ /**
3
+ * Generate a human-readable, lowercase, dash-separated random ID
4
+ * (e.g. `bright-orange-tiger`).
5
+ */
6
+ declare function humanId(): string;
9
7
  //#endregion
10
8
  export { humanId };
@@ -1,3 +1,2 @@
1
- import { t as import_dist } from "../human-id-CHS0s28X.mjs";
2
- var humanId = import_dist.humanId;
1
+ import { t as humanId } from "../human-id-adtUWQLr.mjs";
3
2
  export { humanId };
@@ -0,0 +1,13 @@
1
+ //#region src/utils/launch-editor.d.ts
2
+ /**
3
+ * Open a file in the user's editor.
4
+ *
5
+ * `target` may be a plain path, `file:line`, or `file:line:column`.
6
+ *
7
+ * If `editor` is provided, it is used as the editor command (e.g. `'code'`,
8
+ * `'subl'`) or absolute binary path. Otherwise the editor is auto-detected
9
+ * via the `LAUNCH_EDITOR` env var with a fallback to common defaults.
10
+ */
11
+ declare function launchEditor(target: string, editor?: string): void;
12
+ //#endregion
13
+ export { launchEditor };
@@ -0,0 +1,2 @@
1
+ import { t as launchEditor } from "../launch-editor-KA_21J1T.mjs";
2
+ export { launchEditor };
@@ -0,0 +1,16 @@
1
+ //#region src/utils/open.d.ts
2
+ interface OpenOptions {
3
+ /**
4
+ * Resolve only after the launched app exits.
5
+ *
6
+ * @default false
7
+ */
8
+ wait?: boolean;
9
+ }
10
+ /**
11
+ * Open a URL, file, or other target in its default OS handler
12
+ * (browser for URLs, Finder/Explorer for paths, etc.).
13
+ */
14
+ declare function open(target: string, options?: OpenOptions): Promise<void>;
15
+ //#endregion
16
+ export { OpenOptions, open };
@@ -0,0 +1,2 @@
1
+ import { t as open } from "../open-DmFp0qZA.mjs";
2
+ export { open };
@@ -0,0 +1,30 @@
1
+ import { IncomingMessage, ServerResponse } from "node:http";
2
+ import { EventHandler, EventHandlerRequest } from "h3";
3
+
4
+ //#region src/utils/serve-static.d.ts
5
+ interface ServeStaticOptions {
6
+ /** Default: `['index.html']`. */
7
+ indexNames?: string[];
8
+ /** SPA fallback to `indexNames[0]` on miss. Default: `true`. */
9
+ single?: boolean;
10
+ }
11
+ /**
12
+ * h3 event handler that serves files from `dir` with SPA fallback.
13
+ *
14
+ * Drop-in replacement for `fromNodeMiddleware(sirv(dir, { dev: true, single: true }))`
15
+ * when the surrounding server is an h3 app — no `Cache-Control` beyond
16
+ * `no-store`, `Content-Type` resolved via `mrmime`, and a miss with no
17
+ * file extension falls back to `<dir>/index.html` so client-side routing
18
+ * works.
19
+ */
20
+ declare function serveStaticHandler(dir: string, options?: ServeStaticOptions): EventHandler<EventHandlerRequest>;
21
+ /**
22
+ * Connect/Express-style Node middleware variant of {@link serveStaticHandler}.
23
+ *
24
+ * Use when mounting onto `viteServer.middlewares.use(base, …)` or any other
25
+ * Connect stack — avoids forcing the host package to depend on h3 just to
26
+ * adapt an event handler back into Node middleware.
27
+ */
28
+ declare function serveStaticNodeMiddleware(dir: string, options?: ServeStaticOptions): (req: IncomingMessage, res: ServerResponse, next?: (err?: Error) => void) => void;
29
+ //#endregion
30
+ export { ServeStaticOptions, serveStaticHandler, serveStaticNodeMiddleware };