devframe 0.9.0 → 0.9.1

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 (64) hide show
  1. package/dist/{_shared-CbZ_yhbz.mjs → _shared-BM3PdYli.mjs} +1 -1
  2. package/dist/{_shared-BPmX9fqK.d.mts → _shared-DqbKCAew.d.mts} +1 -1
  3. package/dist/adapters/build.d.mts +1 -1
  4. package/dist/adapters/build.mjs +8 -6
  5. package/dist/adapters/cac.d.mts +1 -1
  6. package/dist/adapters/cac.mjs +4 -3
  7. package/dist/adapters/dev.d.mts +3 -3
  8. package/dist/adapters/dev.mjs +2 -2
  9. package/dist/adapters/embedded.d.mts +1 -1
  10. package/dist/adapters/embedded.mjs +1 -0
  11. package/dist/adapters/initiate.d.mts +2 -2
  12. package/dist/adapters/initiate.mjs +1 -1
  13. package/dist/adapters/mcp.d.mts +1 -1
  14. package/dist/adapters/mcp.mjs +1 -1
  15. package/dist/cli/main.mjs +2 -2
  16. package/dist/client/index.d.mts +48 -2
  17. package/dist/client/index.mjs +131 -21
  18. package/dist/constants.d.mts +74 -2
  19. package/dist/constants.mjs +9 -2
  20. package/dist/{context-CEe4PBz1.mjs → context-Bdkakk8S.mjs} +319 -21
  21. package/dist/{context-xdynGSLP.mjs → context-CXhjygJU.mjs} +2 -2
  22. package/dist/{context-B3YUu_95.d.mts → context-dqyXS6o3.d.mts} +1 -1
  23. package/dist/{dev--rAPzbvO.mjs → dev-C8VHtuPP.mjs} +12 -9
  24. package/dist/{devframe-DJMg0WLe.d.mts → devframe-BlLEZR-x.d.mts} +741 -588
  25. package/dist/{diagnostics-DOQPnQmX.mjs → diagnostics-Di8ytitn.mjs} +24 -0
  26. package/dist/{dist-eNI9qM_I.mjs → dist-CZXfGEkd.mjs} +1 -1
  27. package/dist/events-DKfSmoTj.mjs +65 -0
  28. package/dist/{host-agent-xLCSe65D.mjs → host-agent-BDdcOXhG.mjs} +14 -13
  29. package/dist/{http-DYpK0cUi.mjs → http-BbHCU5Zs.mjs} +8 -5
  30. package/dist/{index-CB-fSUyn.d.mts → index-BKFT9-jA.d.mts} +2 -2
  31. package/dist/index.d.mts +2 -2
  32. package/dist/{instance-registry-WvQkt42E.mjs → instance-registry-CHunhMi5.mjs} +4 -4
  33. package/dist/{instance-shell-CljiKq1c.d.mts → instance-shell-0iw-cQ5V.d.mts} +2 -2
  34. package/dist/{instance-shell-CMFyszWJ.mjs → instance-shell-DbDoozNM.mjs} +5 -5
  35. package/dist/internal/index.d.mts +46 -4
  36. package/dist/internal/index.mjs +7 -7
  37. package/dist/node/auth.d.mts +2 -2
  38. package/dist/node/auth.mjs +2 -2
  39. package/dist/node/hub-internals.d.mts +2 -2
  40. package/dist/node/hub-internals.mjs +2 -2
  41. package/dist/node/index.d.mts +1 -1
  42. package/dist/node/index.mjs +2 -2
  43. package/dist/recipes/common-rpc-functions.d.mts +1 -1
  44. package/dist/recipes/interactive-auth.d.mts +2 -2
  45. package/dist/recipes/interactive-auth.mjs +2 -2
  46. package/dist/{remote-assets-nTTxY2MU.mjs → remote-assets-DRfY2RjX.mjs} +6 -5
  47. package/dist/{revoke-DZbJ7Cl0.mjs → revoke-3Q6aDKWk.mjs} +2 -1
  48. package/dist/{rolldown-runtime-JspESFgx.mjs → rolldown-runtime-B4iAMlE-.mjs} +1 -1
  49. package/dist/rpc/transports/ws-bun.d.mts +1 -1
  50. package/dist/{rpc-core-Cc4lucI0.d.mts → rpc-core-CR8o34O9.d.mts} +2 -2
  51. package/dist/{rpc-core-DMTe-hLo.mjs → rpc-core-Dru9uoM0.mjs} +11 -4
  52. package/dist/{state-Cc1IeSmQ.mjs → state-CK9LjrnT.mjs} +1 -1
  53. package/dist/{storage-CYye7P7L.mjs → storage-D4a99Ung.mjs} +3 -3
  54. package/dist/types/index.d.mts +2 -2
  55. package/dist/utils/events.d.mts +1 -1
  56. package/dist/utils/get-port.mjs +1 -1
  57. package/dist/utils/launch-editor.mjs +12 -11
  58. package/dist/utils/open.mjs +1 -1
  59. package/dist/utils/remote-assets.mjs +1 -1
  60. package/dist/utils/serve-static.mjs +6 -5
  61. package/dist/utils/shared-state.d.mts +1 -1
  62. package/dist/utils/streaming-channel.d.mts +1 -1
  63. package/package.json +1 -1
  64. package/dist/{host-h3-Crkzm42q.mjs → host-h3-fRbF9yor.mjs} +1 -1
@@ -1,6 +1,6 @@
1
- import { A as ScopedServerFunctions, B as RpcFunctionsHost, C as DevframeScopedStreamingHost, Ct as DevframeAgentHost, D as ScopedBroadcastOptions, Dt as EventsMap, E as DevframeSettingsStore, Et as EventUnsubscribe, F as DevframeStorageScope, G as RpcStreamingHost, H as RpcSharedStateHost, I as DevframeDiagnosticsHost, J as DevframeRpcSharedStates, K as DevframeRpcClientFunctions, L as DevframeDiagnosticsLogger, M as SettingsForNamespace, N as DevframeViewHost, O as ScopedClientFunctions, P as DevframeHost, R as DevframeNodeRpcSession, S as DevframeScopedNodeRpc, St as AgentToolProviderHandle, T as DevframeSettingsRegistry, Tt as EventEmitter, U as RpcStreamingChannel, V as RpcSharedStateGetOptions, W as RpcStreamingChannelOptions, _ as DevframeServiceId, _t as AgentResourceContent, a as DevframeDuplicationStrategy, b as DevframeServicesRegistry, bt as AgentToolInput, c as DevframeWsOptions, d as ConnectionMeta, f as ConnectionMetaSse, g as DevframeNodeContext, gt as AgentResource, h as DevframeConnectionConfigsRegistry, ht as AgentManifest, i as DevframeDockDefaults, j as ScopedSharedStates, k as ScopedRpcFn, l as McpRouteOptions, m as DevframeCapabilities, mt as AgentHandle, n as DevframeDefinition, o as DevframeSetupInfo, p as ConnectionMetaWebsocket, q as DevframeRpcServerFunctions, r as DevframeDeploymentKind, s as DevframeSseOptions, t as DevframeCliOptions, v as DevframeServiceOf, vt as AgentResourceInput, w as DevframeSettings, wt as DevframeAgentHostEvents, x as DevframeScopedNodeContext, xt as AgentToolProvider, y as DevframeServicesHost, yt as AgentTool, z as RpcBroadcastOptions } from "../devframe-DJMg0WLe.mjs";
1
+ import { $ as DevframeStorageScope, A as DevframeServiceId, At as DevframeAgentHost, B as DevframeScopedNodeRpc, C as RpcStreamingChannelOptions, Ct as AgentResource, D as DevframeRpcSharedStates, Dt as AgentToolInput, E as DevframeRpcServerFunctions, Et as AgentTool, F as DevframeServicesHost, G as ScopedBroadcastOptions, H as DevframeSettings, I as DevframeServicesRegistry, J as ScopedServerFunctions, K as ScopedClientFunctions, L as DevframeServicesScopeRegistry, M as DevframeServiceMeta, Mt as EventEmitter, N as DevframeServiceOf, Nt as EventUnsubscribe, O as DevframeServiceDefinition, Ot as AgentToolProvider, P as DevframeServiceScopeOf, Pt as EventsMap, Q as DevframeHost, R as DevframeServicesState, S as RpcStreamingChannel, St as AgentManifest, T as DevframeRpcClientFunctions, Tt as AgentResourceInput, U as DevframeSettingsRegistry, V as DevframeScopedStreamingHost, W as DevframeSettingsStore, X as SettingsForNamespace, Y as ScopedSharedStates, Z as DevframeViewHost, _ as DevframeNodeRpcSession, a as DevframeDuplicationStrategy, b as RpcSharedStateGetOptions, c as DevframeWsOptions, d as ConnectionMeta, et as DevframeDiagnosticsHost, f as ConnectionMetaSse, g as DevframeNodeContext, h as DevframeConnectionConfigsRegistry, i as DevframeDockDefaults, j as DevframeServiceInput, jt as DevframeAgentHostEvents, k as DevframeServiceDescriptor, kt as AgentToolProviderHandle, l as McpRouteOptions, m as DevframeCapabilities, n as DevframeDefinition, o as DevframeSetupInfo, p as ConnectionMetaWebsocket, q as ScopedRpcFn, r as DevframeDeploymentKind, s as DevframeSseOptions, t as DevframeCliOptions, tt as DevframeDiagnosticsLogger, v as RpcBroadcastOptions, w as RpcStreamingHost, wt as AgentResourceContent, x as RpcSharedStateHost, xt as AgentHandle, y as RpcFunctionsHost, z as DevframeScopedNodeContext } from "../devframe-BlLEZR-x.mjs";
2
2
  import { g as RpcFunctionAgentOptions } from "../types-Djq7CBXh.mjs";
3
3
  import { d as DevframeRpcConnection, f as DevframeRpcConnectionRequest, p as DevframeRpcTransportKind, u as DevframeNodeRpcSessionMeta } from "../ws-server-D1d3QM9f.mjs";
4
4
  import { i as DevframeDefineDiagnosticsOptions } from "../nostics-SPGDgHEP.mjs";
5
5
  import { a as RemoteAssetsStore, i as RemoteAssetsProviderCustom, n as RemoteAssetsErrorMessage, o as StaticAssetsSource, r as RemoteAssetsProvider, t as RemoteAssets } from "../remote-assets-Bg4gCUZ_.mjs";
6
- export { AgentHandle, AgentManifest, AgentResource, AgentResourceContent, AgentResourceInput, AgentTool, AgentToolInput, AgentToolProvider, AgentToolProviderHandle, ConnectionMeta, ConnectionMetaSse, ConnectionMetaWebsocket, DevframeAgentHost, DevframeAgentHostEvents, DevframeCapabilities, DevframeCliOptions, DevframeConnectionConfigsRegistry, type DevframeDefineDiagnosticsOptions, DevframeDefinition, DevframeDeploymentKind, DevframeDiagnosticsHost, DevframeDiagnosticsLogger, DevframeDockDefaults, DevframeDuplicationStrategy, DevframeHost, DevframeNodeContext, DevframeNodeRpcSession, type DevframeNodeRpcSessionMeta, DevframeRpcClientFunctions, type DevframeRpcConnection, type DevframeRpcConnectionRequest, DevframeRpcServerFunctions, DevframeRpcSharedStates, type DevframeRpcTransportKind, DevframeScopedNodeContext, DevframeScopedNodeRpc, DevframeScopedStreamingHost, DevframeServiceId, DevframeServiceOf, DevframeServicesHost, DevframeServicesRegistry, DevframeSettings, DevframeSettingsRegistry, DevframeSettingsStore, DevframeSetupInfo, DevframeSseOptions, DevframeStorageScope, DevframeViewHost, DevframeWsOptions, EventEmitter, EventUnsubscribe, EventsMap, McpRouteOptions, RemoteAssets, RemoteAssetsErrorMessage, RemoteAssetsProvider, RemoteAssetsProviderCustom, RemoteAssetsStore, RpcBroadcastOptions, type RpcFunctionAgentOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost, ScopedBroadcastOptions, ScopedClientFunctions, ScopedRpcFn, ScopedServerFunctions, ScopedSharedStates, SettingsForNamespace, StaticAssetsSource };
6
+ export { AgentHandle, AgentManifest, AgentResource, AgentResourceContent, AgentResourceInput, AgentTool, AgentToolInput, AgentToolProvider, AgentToolProviderHandle, ConnectionMeta, ConnectionMetaSse, ConnectionMetaWebsocket, DevframeAgentHost, DevframeAgentHostEvents, DevframeCapabilities, DevframeCliOptions, DevframeConnectionConfigsRegistry, type DevframeDefineDiagnosticsOptions, DevframeDefinition, DevframeDeploymentKind, DevframeDiagnosticsHost, DevframeDiagnosticsLogger, DevframeDockDefaults, DevframeDuplicationStrategy, DevframeHost, DevframeNodeContext, DevframeNodeRpcSession, type DevframeNodeRpcSessionMeta, DevframeRpcClientFunctions, type DevframeRpcConnection, type DevframeRpcConnectionRequest, DevframeRpcServerFunctions, DevframeRpcSharedStates, type DevframeRpcTransportKind, DevframeScopedNodeContext, DevframeScopedNodeRpc, DevframeScopedStreamingHost, DevframeServiceDefinition, DevframeServiceDescriptor, DevframeServiceId, DevframeServiceInput, DevframeServiceMeta, DevframeServiceOf, DevframeServiceScopeOf, DevframeServicesHost, DevframeServicesRegistry, DevframeServicesScopeRegistry, DevframeServicesState, DevframeSettings, DevframeSettingsRegistry, DevframeSettingsStore, DevframeSetupInfo, DevframeSseOptions, DevframeStorageScope, DevframeViewHost, DevframeWsOptions, EventEmitter, EventUnsubscribe, EventsMap, McpRouteOptions, RemoteAssets, RemoteAssetsErrorMessage, RemoteAssetsProvider, RemoteAssetsProviderCustom, RemoteAssetsStore, RpcBroadcastOptions, type RpcFunctionAgentOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost, ScopedBroadcastOptions, ScopedClientFunctions, ScopedRpcFn, ScopedServerFunctions, ScopedSharedStates, SettingsForNamespace, StaticAssetsSource };
@@ -1,4 +1,4 @@
1
- import { Dt as EventsMap, Tt as EventEmitter } from "../devframe-DJMg0WLe.mjs";
1
+ import { Mt as EventEmitter, Pt as EventsMap } from "../devframe-BlLEZR-x.mjs";
2
2
  //#region src/utils/events.d.ts
3
3
  /**
4
4
  * Create event emitter.
@@ -1,2 +1,2 @@
1
- import { n as getPort } from "../dist-eNI9qM_I.mjs";
1
+ import { n as getPort } from "../dist-CZXfGEkd.mjs";
2
2
  export { getPort };
@@ -1,4 +1,4 @@
1
- import { i as __toESM, r as __require, t as __commonJSMin } from "../rolldown-runtime-JspESFgx.mjs";
1
+ import { i as __toESM, r as __require, t as __commonJSMin } from "../rolldown-runtime-B4iAMlE-.mjs";
2
2
  //#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
3
3
  var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4
4
  let p = process || {};
@@ -269,16 +269,17 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
269
269
  if (esc) {
270
270
  out += c;
271
271
  esc = false;
272
- } else if (quote) if (c === quote) quote = false;
273
- else if (quote == SQ) out += c;
274
- else if (c === BS) {
275
- i += 1;
276
- c = s.charAt(i);
277
- if (c === DQ || c === BS || c === DS) out += c;
278
- else out += BS + c;
279
- } else if (c === DS) out += parseEnvVar();
280
- else out += c;
281
- else if (c === DQ || c === SQ) {
272
+ } else if (quote) {
273
+ if (c === quote) quote = false;
274
+ else if (quote == SQ) out += c;
275
+ else if (c === BS) {
276
+ i += 1;
277
+ c = s.charAt(i);
278
+ if (c === DQ || c === BS || c === DS) out += c;
279
+ else out += BS + c;
280
+ } else if (c === DS) out += parseEnvVar();
281
+ else out += c;
282
+ } else if (c === DQ || c === SQ) {
282
283
  quote = c;
283
284
  sawQuote = true;
284
285
  } else if (controlRE.test(c)) return { op: s };
@@ -1,5 +1,5 @@
1
- import fs from "node:fs";
2
1
  import process from "node:process";
2
+ import fs from "node:fs";
3
3
  import { spawn } from "node:child_process";
4
4
  //#region src/utils/open.ts
5
5
  /**
@@ -1,2 +1,2 @@
1
- import { t as resolveStaticAssetsSource } from "../remote-assets-nTTxY2MU.mjs";
1
+ import { t as resolveStaticAssetsSource } from "../remote-assets-DRfY2RjX.mjs";
2
2
  export { resolveStaticAssetsSource };
@@ -1,9 +1,9 @@
1
- import { DEVFRAME_REMOTE_ASSETS_ERROR_MESSAGE_TYPE } from "../constants.mjs";
1
+ import { t as DEVFRAME_EVENTS } from "../events-DKfSmoTj.mjs";
2
+ import { extname, join, normalize, resolve, sep } from "pathe";
2
3
  import { createReadStream } from "node:fs";
3
4
  import { stat } from "node:fs/promises";
4
5
  import { Readable } from "node:stream";
5
6
  import { lookup } from "mrmime";
6
- import { extname, join, normalize, resolve, sep } from "pathe";
7
7
  import { H3, defineHandler } from "h3";
8
8
  //#region src/utils/serve-static.ts
9
9
  const HTML_EXTENSIONS = [".html", ".htm"];
@@ -231,12 +231,13 @@ function remoteErrorPage(pkg, version, reason) {
231
231
  const esc = (s) => s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
232
232
  const name = esc(pkg);
233
233
  const ver = esc(version);
234
- const payload = JSON.stringify({
235
- type: DEVFRAME_REMOTE_ASSETS_ERROR_MESSAGE_TYPE,
234
+ const message = {
235
+ type: DEVFRAME_EVENTS.postMessage.remoteAssetsError,
236
236
  package: pkg,
237
237
  version,
238
238
  reason
239
- }).replace(/</g, "\\u003c");
239
+ };
240
+ const payload = JSON.stringify(message).replace(/</g, "\\u003c");
240
241
  return `<!doctype html>
241
242
  <html lang="en">
242
243
  <head>
@@ -1,2 +1,2 @@
1
- import { at as ImmutableArray, ct as ImmutableSet, dt as SharedStateOptions, ft as SharedStatePatch, it as Immutable, lt as SharedState, ot as ImmutableMap, pt as createSharedState, st as ImmutableObject, ut as SharedStateEvents } from "../devframe-DJMg0WLe.mjs";
1
+ import { _t as SharedStateEvents, bt as createSharedState, dt as Immutable, ft as ImmutableArray, gt as SharedState, ht as ImmutableSet, mt as ImmutableObject, pt as ImmutableMap, vt as SharedStateOptions, yt as SharedStatePatch } from "../devframe-BlLEZR-x.mjs";
2
2
  export { Immutable, ImmutableArray, ImmutableMap, ImmutableObject, ImmutableSet, SharedState, SharedStateEvents, SharedStateOptions, SharedStatePatch, createSharedState };
@@ -1,2 +1,2 @@
1
- import { $ as StreamReader, Q as StreamErrorPayload, X as CreateStreamReaderOptions, Y as BufferedChunk, Z as CreateStreamSinkOptions, et as StreamSink, nt as createStreamReader, rt as createStreamSink, tt as StreamSinkEvents } from "../devframe-DJMg0WLe.mjs";
1
+ import { at as StreamErrorPayload, ct as StreamSinkEvents, it as CreateStreamSinkOptions, lt as createStreamReader, nt as BufferedChunk, ot as StreamReader, rt as CreateStreamReaderOptions, st as StreamSink, ut as createStreamSink } from "../devframe-BlLEZR-x.mjs";
2
2
  export { BufferedChunk, CreateStreamReaderOptions, CreateStreamSinkOptions, StreamErrorPayload, StreamReader, StreamSink, StreamSinkEvents, createStreamReader, createStreamSink };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "devframe",
3
3
  "type": "module",
4
- "version": "0.9.0",
4
+ "version": "0.9.1",
5
5
  "description": "Framework for building one portable devtool integration that runs in any viewer.",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -1,5 +1,5 @@
1
- import { join } from "pathe";
2
1
  import process from "node:process";
2
+ import { join } from "pathe";
3
3
  import { homedir } from "node:os";
4
4
  //#region src/node/host-h3.ts
5
5
  /**