@papert-code/papert-code 0.3.92 → 0.3.93

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 (50) hide show
  1. package/README.md +99 -3
  2. package/dist/chunks/{chunk-G2NP25TN.js → chunk-2MUETKKX.js} +18 -1
  3. package/dist/chunks/{chunk-P4DPKRC2.js → chunk-423NGIST.js} +18 -1
  4. package/dist/chunks/{chunk-OVTXUA3U.js → chunk-4YLWLT76.js} +135 -119
  5. package/dist/chunks/{chunk-3CUI2HDG.js → chunk-5E2G77WW.js} +18 -1
  6. package/dist/chunks/{chunk-EM5S27RC.js → chunk-B4UTHNG5.js} +18 -1
  7. package/dist/chunks/chunk-BMT6LRT3.js +52 -0
  8. package/dist/chunks/{chunk-7FXB5MJS.js → chunk-F77EGXST.js} +18 -1
  9. package/dist/chunks/{chunk-FS5UPVZW.js → chunk-FJQLUUKC.js} +18 -1
  10. package/dist/chunks/{chunk-MO6BWZQC.js → chunk-JATIVKZP.js} +72 -6
  11. package/dist/chunks/{chunk-IV6H2XE4.js → chunk-K5KJBM44.js} +19 -2
  12. package/dist/chunks/{chunk-W6O2LWN4.js → chunk-MEXE5SYY.js} +18 -1
  13. package/dist/chunks/{chunk-THDY5NFO.js → chunk-MHFXK3XK.js} +18 -1
  14. package/dist/chunks/{chunk-4HTLIVVR.js → chunk-NCFEMX7E.js} +17 -0
  15. package/dist/chunks/{chunk-ICOYQZHB.js → chunk-PGKEXZYI.js} +26 -9
  16. package/dist/chunks/{chunk-VTNP3O6A.js → chunk-TQNFJUNM.js} +29069 -37287
  17. package/dist/chunks/{chunk-2AKGZQ4A.js → chunk-ZHTGXQAR.js} +19 -2
  18. package/dist/chunks/{devtools-2MFFCPCG.js → devtools-AE6I2IJN.js} +20 -3
  19. package/dist/chunks/{devtools-ITROVIMB.js → devtools-IPZOX54X.js} +20 -3
  20. package/dist/chunks/dist-3BATS3LO.js +24 -0
  21. package/dist/chunks/{en-TX2CGKV3.js → en-N5RDRPST.js} +18 -1
  22. package/dist/chunks/{gemini-7AQ6BAIN.js → gemini-GXD4BGSD.js} +2266 -1447
  23. package/dist/chunks/{getMachineId-bsd-2RCFHEOM.js → getMachineId-bsd-4WX5XJ3I.js} +20 -3
  24. package/dist/chunks/{getMachineId-darwin-BBFRQYU6.js → getMachineId-darwin-URXQ2X3N.js} +20 -3
  25. package/dist/chunks/{getMachineId-linux-UPET74JV.js → getMachineId-linux-4Y2DTNAA.js} +19 -2
  26. package/dist/chunks/{getMachineId-unsupported-VIGKLEW5.js → getMachineId-unsupported-A5RT6P2V.js} +19 -2
  27. package/dist/chunks/{getMachineId-win-AYPIIM5S.js → getMachineId-win-HIFMWK2N.js} +20 -3
  28. package/dist/chunks/{keychain-token-storage-WM6GUOMH.js → keychain-token-storage-EPJEI2HJ.js} +19 -2
  29. package/dist/chunks/node-fetch-HP6CZCEV.js +28 -0
  30. package/dist/chunks/openaiContentGenerator-RS2GU6IS.js +51 -0
  31. package/dist/chunks/{papertContentGenerator-FYBOOJV3.js → papertContentGenerator-RYRJQVBF.js} +30 -12
  32. package/dist/chunks/papertOAuth2-4I4JYPZW.js +51 -0
  33. package/dist/chunks/pluginSystem-5MM7PDLU.js +26 -0
  34. package/dist/chunks/server-N2U4FF55.js +26 -0
  35. package/dist/chunks/sharedTokenManager-GSQ3FULT.js +31 -0
  36. package/dist/chunks/undici-FJNCTQAO.js +24 -0
  37. package/dist/chunks/{zh-ACGEBTQR.js → zh-S2V7TL6B.js} +18 -1
  38. package/dist/cli.js +25 -17
  39. package/package.json +1 -1
  40. package/dist/chunks/chunk-BR7CCFAR.js +0 -5151
  41. package/dist/chunks/chunk-RMKGXYYI.js +0 -265
  42. package/dist/chunks/dist-L6NNW4TJ.js +0 -7
  43. package/dist/chunks/multipart-parser-IMIWHGMY.js +0 -381
  44. package/dist/chunks/openaiContentGenerator-WFZAEDJG.js +0 -33
  45. package/dist/chunks/papertOAuth2-JNUOPD7M.js +0 -34
  46. package/dist/chunks/pluginSystem-3V7KBDEE.js +0 -9
  47. package/dist/chunks/server-3DEIAIVB.js +0 -9
  48. package/dist/chunks/sharedTokenManager-Z6PG3UKZ.js +0 -14
  49. package/dist/chunks/src-ERBEIN35.js +0 -1445
  50. package/dist/chunks/undici-EPWKVH6H.js +0 -7
@@ -1,15 +1,84 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
+ const __papertOriginalEmitWarning = process.emitWarning.bind(process);
4
+ process.emitWarning = function patchedEmitWarning(warning, ...args) {
5
+ if (!process.env.PAPERT_SHOW_NODE_DEPRECATIONS) {
6
+ const warningCode =
7
+ (warning && typeof warning === 'object' && 'code' in warning && warning.code) ||
8
+ (args.length > 1 && typeof args[1] === 'string' && args[1]) ||
9
+ (args.length > 0 &&
10
+ args[0] &&
11
+ typeof args[0] === 'object' &&
12
+ 'code' in args[0] &&
13
+ args[0].code);
14
+ if (warningCode === 'DEP0040' || warningCode === 'DEP0169') {
15
+ return;
16
+ }
17
+ }
18
+ return __papertOriginalEmitWarning(warning, ...args);
19
+ };
3
20
  import {
4
21
  __name,
5
22
  init_esbuild_shims
6
- } from "./chunk-4HTLIVVR.js";
23
+ } from "./chunk-NCFEMX7E.js";
7
24
 
8
25
  // packages/cli/src/commands/server.ts
9
26
  init_esbuild_shims();
10
27
  import { spawn } from "node:child_process";
11
28
  import * as fs from "node:fs";
12
29
  import * as path from "node:path";
30
+ import { fileURLToPath } from "node:url";
31
+ import { createRequire } from "node:module";
32
+ function resolveA2aServerEntrypoint() {
33
+ const candidates = [];
34
+ const commandFile = fileURLToPath(import.meta.url);
35
+ const commandDir = path.dirname(commandFile);
36
+ const papertEntrypoint = process.argv[1];
37
+ candidates.push(
38
+ path.resolve(process.cwd(), "packages/a2a-server/dist/src/http/server.js")
39
+ );
40
+ candidates.push(
41
+ path.resolve(
42
+ commandDir,
43
+ "../../../../packages/a2a-server/dist/src/http/server.js"
44
+ )
45
+ );
46
+ candidates.push(
47
+ path.resolve(
48
+ commandDir,
49
+ "../../../../../packages/a2a-server/dist/src/http/server.js"
50
+ )
51
+ );
52
+ if (papertEntrypoint) {
53
+ candidates.push(
54
+ path.resolve(
55
+ path.dirname(papertEntrypoint),
56
+ "../packages/a2a-server/dist/src/http/server.js"
57
+ )
58
+ );
59
+ candidates.push(
60
+ path.resolve(
61
+ path.dirname(papertEntrypoint),
62
+ "../../packages/a2a-server/dist/src/http/server.js"
63
+ )
64
+ );
65
+ }
66
+ try {
67
+ const require2 = createRequire(import.meta.url);
68
+ const resolved = require2.resolve(
69
+ "@papert-code/papert-code-a2a-server/dist/src/http/server.js"
70
+ );
71
+ candidates.push(resolved);
72
+ } catch {
73
+ }
74
+ for (const candidate of candidates) {
75
+ if (fs.existsSync(candidate)) {
76
+ return candidate;
77
+ }
78
+ }
79
+ return void 0;
80
+ }
81
+ __name(resolveA2aServerEntrypoint, "resolveA2aServerEntrypoint");
13
82
  var serverCommand = {
14
83
  command: "server",
15
84
  describe: "Run Papert Code daemon (remote driving server).",
@@ -52,11 +121,8 @@ var serverCommand = {
52
121
  token: ${env.PAPERT_REMOTE_SERVER_TOKEN}
53
122
  cmd: papert-a2a-server`
54
123
  );
55
- const localServerEntrypoint = path.resolve(
56
- process.cwd(),
57
- "packages/a2a-server/dist/src/http/server.js"
58
- );
59
- const spawnCommand = fs.existsSync(localServerEntrypoint) ? {
124
+ const localServerEntrypoint = resolveA2aServerEntrypoint();
125
+ const spawnCommand = localServerEntrypoint ? {
60
126
  command: process.execPath,
61
127
  args: [localServerEntrypoint],
62
128
  display: `${process.execPath} ${localServerEntrypoint}`
@@ -1,13 +1,30 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
+ const __papertOriginalEmitWarning = process.emitWarning.bind(process);
4
+ process.emitWarning = function patchedEmitWarning(warning, ...args) {
5
+ if (!process.env.PAPERT_SHOW_NODE_DEPRECATIONS) {
6
+ const warningCode =
7
+ (warning && typeof warning === 'object' && 'code' in warning && warning.code) ||
8
+ (args.length > 1 && typeof args[1] === 'string' && args[1]) ||
9
+ (args.length > 0 &&
10
+ args[0] &&
11
+ typeof args[0] === 'object' &&
12
+ 'code' in args[0] &&
13
+ args[0].code);
14
+ if (warningCode === 'DEP0040' || warningCode === 'DEP0169') {
15
+ return;
16
+ }
17
+ }
18
+ return __papertOriginalEmitWarning(warning, ...args);
19
+ };
3
20
  import {
4
21
  isNodeError,
5
22
  open_default
6
- } from "./chunk-OVTXUA3U.js";
23
+ } from "./chunk-4YLWLT76.js";
7
24
  import {
8
25
  __name,
9
26
  init_esbuild_shims
10
- } from "./chunk-4HTLIVVR.js";
27
+ } from "./chunk-NCFEMX7E.js";
11
28
 
12
29
  // packages/core/dist/src/papert/papertOAuth2.js
13
30
  init_esbuild_shims();
@@ -1,10 +1,27 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
+ const __papertOriginalEmitWarning = process.emitWarning.bind(process);
4
+ process.emitWarning = function patchedEmitWarning(warning, ...args) {
5
+ if (!process.env.PAPERT_SHOW_NODE_DEPRECATIONS) {
6
+ const warningCode =
7
+ (warning && typeof warning === 'object' && 'code' in warning && warning.code) ||
8
+ (args.length > 1 && typeof args[1] === 'string' && args[1]) ||
9
+ (args.length > 0 &&
10
+ args[0] &&
11
+ typeof args[0] === 'object' &&
12
+ 'code' in args[0] &&
13
+ args[0].code);
14
+ if (warningCode === 'DEP0040' || warningCode === 'DEP0169') {
15
+ return;
16
+ }
17
+ }
18
+ return __papertOriginalEmitWarning(warning, ...args);
19
+ };
3
20
  import {
4
21
  __commonJS,
5
22
  __require,
6
23
  init_esbuild_shims
7
- } from "./chunk-4HTLIVVR.js";
24
+ } from "./chunk-NCFEMX7E.js";
8
25
 
9
26
  // node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/execAsync.js
10
27
  var require_execAsync = __commonJS({
@@ -1,11 +1,28 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
+ const __papertOriginalEmitWarning = process.emitWarning.bind(process);
4
+ process.emitWarning = function patchedEmitWarning(warning, ...args) {
5
+ if (!process.env.PAPERT_SHOW_NODE_DEPRECATIONS) {
6
+ const warningCode =
7
+ (warning && typeof warning === 'object' && 'code' in warning && warning.code) ||
8
+ (args.length > 1 && typeof args[1] === 'string' && args[1]) ||
9
+ (args.length > 0 &&
10
+ args[0] &&
11
+ typeof args[0] === 'object' &&
12
+ 'code' in args[0] &&
13
+ args[0].code);
14
+ if (warningCode === 'DEP0040' || warningCode === 'DEP0169') {
15
+ return;
16
+ }
17
+ }
18
+ return __papertOriginalEmitWarning(warning, ...args);
19
+ };
3
20
  import {
4
21
  __commonJS,
5
22
  __name,
6
23
  __require,
7
24
  init_esbuild_shims
8
- } from "./chunk-4HTLIVVR.js";
25
+ } from "./chunk-NCFEMX7E.js";
9
26
 
10
27
  // node_modules/ms/index.js
11
28
  var require_ms = __commonJS({
@@ -1,5 +1,22 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
+ const __papertOriginalEmitWarning = process.emitWarning.bind(process);
4
+ process.emitWarning = function patchedEmitWarning(warning, ...args) {
5
+ if (!process.env.PAPERT_SHOW_NODE_DEPRECATIONS) {
6
+ const warningCode =
7
+ (warning && typeof warning === 'object' && 'code' in warning && warning.code) ||
8
+ (args.length > 1 && typeof args[1] === 'string' && args[1]) ||
9
+ (args.length > 0 &&
10
+ args[0] &&
11
+ typeof args[0] === 'object' &&
12
+ 'code' in args[0] &&
13
+ args[0].code);
14
+ if (warningCode === 'DEP0040' || warningCode === 'DEP0169') {
15
+ return;
16
+ }
17
+ }
18
+ return __papertOriginalEmitWarning(warning, ...args);
19
+ };
3
20
  var __create = Object.create;
4
21
  var __defProp = Object.defineProperty;
5
22
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,5 +1,22 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
+ const __papertOriginalEmitWarning = process.emitWarning.bind(process);
4
+ process.emitWarning = function patchedEmitWarning(warning, ...args) {
5
+ if (!process.env.PAPERT_SHOW_NODE_DEPRECATIONS) {
6
+ const warningCode =
7
+ (warning && typeof warning === 'object' && 'code' in warning && warning.code) ||
8
+ (args.length > 1 && typeof args[1] === 'string' && args[1]) ||
9
+ (args.length > 0 &&
10
+ args[0] &&
11
+ typeof args[0] === 'object' &&
12
+ 'code' in args[0] &&
13
+ args[0].code);
14
+ if (warningCode === 'DEP0040' || warningCode === 'DEP0169') {
15
+ return;
16
+ }
17
+ }
18
+ return __papertOriginalEmitWarning(warning, ...args);
19
+ };
3
20
  import {
4
21
  ApiError,
5
22
  AuthType,
@@ -97,19 +114,19 @@ import {
97
114
  supportsMultimodalFunctionResponse,
98
115
  tokenLimit,
99
116
  uiTelemetryService
100
- } from "./chunk-VTNP3O6A.js";
117
+ } from "./chunk-TQNFJUNM.js";
101
118
  import {
102
119
  escape,
103
120
  glob,
104
121
  globStream,
105
122
  globSync
106
- } from "./chunk-EM5S27RC.js";
123
+ } from "./chunk-B4UTHNG5.js";
107
124
  import {
108
125
  require_undici
109
- } from "./chunk-P4DPKRC2.js";
126
+ } from "./chunk-423NGIST.js";
110
127
  import {
111
128
  require_src
112
- } from "./chunk-THDY5NFO.js";
129
+ } from "./chunk-MHFXK3XK.js";
113
130
  import {
114
131
  PAPERT_DIR,
115
132
  getProjectHash,
@@ -119,14 +136,14 @@ import {
119
136
  shortenPath,
120
137
  tildeifyPath,
121
138
  unescapePath
122
- } from "./chunk-IV6H2XE4.js";
139
+ } from "./chunk-K5KJBM44.js";
123
140
  import {
124
141
  FatalConfigError,
125
142
  UnauthorizedError,
126
143
  getErrorMessage,
127
144
  isNodeError,
128
145
  toFriendlyError
129
- } from "./chunk-OVTXUA3U.js";
146
+ } from "./chunk-4YLWLT76.js";
130
147
  import {
131
148
  __commonJS,
132
149
  __esm,
@@ -135,7 +152,7 @@ import {
135
152
  __require,
136
153
  __toESM,
137
154
  init_esbuild_shims
138
- } from "./chunk-4HTLIVVR.js";
155
+ } from "./chunk-NCFEMX7E.js";
139
156
 
140
157
  // node_modules/shell-quote/quote.js
141
158
  var require_quote = __commonJS({
@@ -49247,7 +49264,7 @@ var IdeClient = class _IdeClient {
49247
49264
  const agent = new import_undici.EnvHttpProxyAgent({
49248
49265
  noProxy: [existingNoProxy, "127.0.0.1"].filter(Boolean).join(",")
49249
49266
  });
49250
- const undiciPromise = import("./undici-EPWKVH6H.js");
49267
+ const undiciPromise = import("./undici-FJNCTQAO.js");
49251
49268
  return async (url2, init) => {
49252
49269
  const { fetch: fetchFn } = await undiciPromise;
49253
49270
  const fetchOptions = {
@@ -69219,7 +69236,7 @@ var Config = class {
69219
69236
  await this.hookSystem.initialize();
69220
69237
  }
69221
69238
  if (this.enablePlugins) {
69222
- const { PluginSystem } = await import("./pluginSystem-3V7KBDEE.js");
69239
+ const { PluginSystem } = await import("./pluginSystem-5MM7PDLU.js");
69223
69240
  this.pluginSystem = new PluginSystem(this);
69224
69241
  await this.pluginSystem.initialize();
69225
69242
  }