@struct-ai/sdk 0.1.2 → 0.2.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 (177) hide show
  1. package/README.md +46 -3
  2. package/dist/commonjs/core.js +8 -1
  3. package/dist/commonjs/integrations/langchain-callback.js +40 -5
  4. package/dist/esm/core.js +8 -1
  5. package/dist/esm/integrations/langchain-callback.js +40 -5
  6. package/package.json +16 -13
  7. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/content-capture.d.ts +0 -10
  8. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/context.d.ts +0 -30
  9. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/core.d.ts +0 -120
  10. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/events.d.ts +0 -12
  11. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/index.d.ts +0 -6
  12. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/integrations/anthropic-content.d.ts +0 -24
  13. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/integrations/anthropic.d.ts +0 -34
  14. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/integrations/index.d.ts +0 -5
  15. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/integrations/langchain-callback.d.ts +0 -134
  16. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/integrations/langchain-content.d.ts +0 -35
  17. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/integrations/langchain.d.ts +0 -11
  18. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/package.json +0 -3
  19. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/semconv.d.ts +0 -54
  20. package/dist/node_modules/@struct-ai/sdk/dist/commonjs/truncation.d.ts +0 -10
  21. package/dist/node_modules/@struct-ai/sdk/dist/esm/content-capture.d.ts +0 -10
  22. package/dist/node_modules/@struct-ai/sdk/dist/esm/context.d.ts +0 -30
  23. package/dist/node_modules/@struct-ai/sdk/dist/esm/core.d.ts +0 -120
  24. package/dist/node_modules/@struct-ai/sdk/dist/esm/events.d.ts +0 -12
  25. package/dist/node_modules/@struct-ai/sdk/dist/esm/index.d.ts +0 -6
  26. package/dist/node_modules/@struct-ai/sdk/dist/esm/integrations/anthropic-content.d.ts +0 -24
  27. package/dist/node_modules/@struct-ai/sdk/dist/esm/integrations/anthropic.d.ts +0 -34
  28. package/dist/node_modules/@struct-ai/sdk/dist/esm/integrations/index.d.ts +0 -5
  29. package/dist/node_modules/@struct-ai/sdk/dist/esm/integrations/langchain-callback.d.ts +0 -134
  30. package/dist/node_modules/@struct-ai/sdk/dist/esm/integrations/langchain-content.d.ts +0 -35
  31. package/dist/node_modules/@struct-ai/sdk/dist/esm/integrations/langchain.d.ts +0 -11
  32. package/dist/node_modules/@struct-ai/sdk/dist/esm/package.json +0 -3
  33. package/dist/node_modules/@struct-ai/sdk/dist/esm/semconv.d.ts +0 -54
  34. package/dist/node_modules/@struct-ai/sdk/dist/esm/truncation.d.ts +0 -10
  35. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/dist/commonjs/package.json +0 -3
  36. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/dist/esm/package.json +0 -3
  37. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/package.json +0 -100
  38. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@anthropic-ai/sdk/package.json +0 -103
  39. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/anthropic/package.json +0 -118
  40. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/package.json +0 -916
  41. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/langgraph/package.json +0 -188
  42. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/api/package.json +0 -96
  43. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/api-logs/package.json +0 -91
  44. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/core/package.json +0 -96
  45. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/exporter-logs-otlp-proto/package.json +0 -108
  46. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/exporter-trace-otlp-proto/package.json +0 -105
  47. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/resources/package.json +0 -100
  48. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/sdk-logs/package.json +0 -109
  49. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/sdk-trace-base/package.json +0 -100
  50. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/sdk-trace-node/package.json +0 -76
  51. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/package.json +0 -140
  52. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/nock/package.json +0 -89
  53. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/tshy/package.json +0 -81
  54. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/typescript/package.json +0 -120
  55. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/node_modules/vitest/package.json +0 -239
  56. package/dist/node_modules/@struct-ai/sdk/dist/node_modules/@struct-ai/sdk/package.json +0 -100
  57. package/dist/node_modules/@struct-ai/sdk/node_modules/@anthropic-ai/sdk/core.d.ts +0 -244
  58. package/dist/node_modules/@struct-ai/sdk/node_modules/@anthropic-ai/sdk/error.d.ts +0 -54
  59. package/dist/node_modules/@struct-ai/sdk/node_modules/@anthropic-ai/sdk/index.d.ts +0 -188
  60. package/dist/node_modules/@struct-ai/sdk/node_modules/@anthropic-ai/sdk/package.json +0 -103
  61. package/dist/node_modules/@struct-ai/sdk/node_modules/@anthropic-ai/sdk/pagination.d.ts +0 -26
  62. package/dist/node_modules/@struct-ai/sdk/node_modules/@anthropic-ai/sdk/resource.d.ts +0 -6
  63. package/dist/node_modules/@struct-ai/sdk/node_modules/@anthropic-ai/sdk/streaming.d.ts +0 -41
  64. package/dist/node_modules/@struct-ai/sdk/node_modules/@anthropic-ai/sdk/uploads.d.ts +0 -75
  65. package/dist/node_modules/@struct-ai/sdk/node_modules/@anthropic-ai/sdk/version.d.ts +0 -2
  66. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/anthropic/experimental.d.ts +0 -1
  67. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/anthropic/index.d.ts +0 -1
  68. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/anthropic/package.json +0 -118
  69. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/agents.d.ts +0 -1
  70. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/caches.d.ts +0 -1
  71. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/chat_history.d.ts +0 -1
  72. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/context.d.ts +0 -1
  73. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/documents.d.ts +0 -1
  74. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/embeddings.d.ts +0 -1
  75. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/example_selectors.d.ts +0 -1
  76. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/index.d.ts +0 -1
  77. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/indexing.d.ts +0 -1
  78. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/load.d.ts +0 -1
  79. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/memory.d.ts +0 -1
  80. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/messages.d.ts +0 -1
  81. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/output_parsers.d.ts +0 -1
  82. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/outputs.d.ts +0 -1
  83. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/package.json +0 -916
  84. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/prompt_values.d.ts +0 -1
  85. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/prompts.d.ts +0 -1
  86. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/retrievers.d.ts +0 -1
  87. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/runnables.d.ts +0 -1
  88. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/singletons.d.ts +0 -1
  89. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/stores.d.ts +0 -1
  90. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/structured_query.d.ts +0 -1
  91. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/tools.d.ts +0 -1
  92. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/core/vectorstores.d.ts +0 -1
  93. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/langgraph/index.d.ts +0 -1
  94. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/langgraph/package.json +0 -188
  95. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/langgraph/prebuilt.d.ts +0 -1
  96. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/langgraph/pregel.d.ts +0 -1
  97. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/langgraph/remote.d.ts +0 -1
  98. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/langgraph/web.d.ts +0 -1
  99. package/dist/node_modules/@struct-ai/sdk/node_modules/@langchain/langgraph/zod.d.ts +0 -1
  100. package/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/api/package.json +0 -96
  101. package/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/api-logs/package.json +0 -91
  102. package/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/core/package.json +0 -96
  103. package/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/exporter-logs-otlp-proto/package.json +0 -108
  104. package/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/exporter-trace-otlp-proto/package.json +0 -105
  105. package/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/resources/package.json +0 -100
  106. package/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/sdk-logs/package.json +0 -109
  107. package/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/sdk-trace-base/package.json +0 -100
  108. package/dist/node_modules/@struct-ai/sdk/node_modules/@opentelemetry/sdk-trace-node/package.json +0 -76
  109. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/assert.d.ts +0 -1062
  110. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/async_hooks.d.ts +0 -605
  111. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/buffer.buffer.d.ts +0 -471
  112. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/buffer.d.ts +0 -1936
  113. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/child_process.d.ts +0 -1475
  114. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/cluster.d.ts +0 -577
  115. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/console.d.ts +0 -452
  116. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/constants.d.ts +0 -21
  117. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/crypto.d.ts +0 -4590
  118. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/dgram.d.ts +0 -597
  119. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/diagnostics_channel.d.ts +0 -578
  120. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/dns.d.ts +0 -871
  121. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/domain.d.ts +0 -170
  122. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/events.d.ts +0 -977
  123. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/fs.d.ts +0 -4375
  124. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/globals.d.ts +0 -172
  125. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/globals.typedarray.d.ts +0 -38
  126. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/http.d.ts +0 -2049
  127. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/http2.d.ts +0 -2631
  128. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/https.d.ts +0 -578
  129. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/index.d.ts +0 -93
  130. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/inspector.generated.d.ts +0 -3966
  131. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/module.d.ts +0 -539
  132. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/net.d.ts +0 -1031
  133. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/os.d.ts +0 -506
  134. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/package.json +0 -140
  135. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/path.d.ts +0 -200
  136. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/perf_hooks.d.ts +0 -961
  137. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/process.d.ts +0 -1961
  138. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/punycode.d.ts +0 -117
  139. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/querystring.d.ts +0 -152
  140. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/readline.d.ts +0 -589
  141. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/repl.d.ts +0 -430
  142. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/sea.d.ts +0 -153
  143. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/stream.d.ts +0 -1698
  144. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/string_decoder.d.ts +0 -67
  145. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/test.d.ts +0 -1787
  146. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/timers.d.ts +0 -286
  147. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/tls.d.ts +0 -1259
  148. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/trace_events.d.ts +0 -197
  149. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/tty.d.ts +0 -208
  150. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/url.d.ts +0 -964
  151. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/util.d.ts +0 -2331
  152. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/v8.d.ts +0 -809
  153. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/vm.d.ts +0 -1001
  154. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/wasi.d.ts +0 -181
  155. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/worker_threads.d.ts +0 -715
  156. package/dist/node_modules/@struct-ai/sdk/node_modules/@types/node/zlib.d.ts +0 -598
  157. package/dist/node_modules/@struct-ai/sdk/node_modules/nock/package.json +0 -89
  158. package/dist/node_modules/@struct-ai/sdk/node_modules/tshy/package.json +0 -81
  159. package/dist/node_modules/@struct-ai/sdk/node_modules/typescript/package.json +0 -120
  160. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/config.d.ts +0 -3
  161. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/coverage.d.ts +0 -1
  162. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/environments.d.ts +0 -1
  163. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/globals.d.ts +0 -22
  164. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/import-meta.d.ts +0 -5
  165. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/importMeta.d.ts +0 -4
  166. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/jsdom.d.ts +0 -6
  167. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/mocker.d.ts +0 -1
  168. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/node.d.ts +0 -1
  169. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/optional-runtime-types.d.ts +0 -6
  170. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/optional-types.d.ts +0 -7
  171. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/package.json +0 -239
  172. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/reporters.d.ts +0 -1
  173. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/runners.d.ts +0 -1
  174. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/snapshot.d.ts +0 -1
  175. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/suite.d.ts +0 -1
  176. package/dist/node_modules/@struct-ai/sdk/node_modules/vitest/worker.d.ts +0 -1
  177. package/dist/node_modules/@struct-ai/sdk/package.json +0 -100
@@ -1,506 +0,0 @@
1
- /**
2
- * The `node:os` module provides operating system-related utility methods and
3
- * properties. It can be accessed using:
4
- *
5
- * ```js
6
- * import os from 'node:os';
7
- * ```
8
- * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/os.js)
9
- */
10
- declare module "os" {
11
- import { NonSharedBuffer } from "buffer";
12
- interface CpuInfo {
13
- model: string;
14
- speed: number;
15
- times: {
16
- /** The number of milliseconds the CPU has spent in user mode. */
17
- user: number;
18
- /** The number of milliseconds the CPU has spent in nice mode. */
19
- nice: number;
20
- /** The number of milliseconds the CPU has spent in sys mode. */
21
- sys: number;
22
- /** The number of milliseconds the CPU has spent in idle mode. */
23
- idle: number;
24
- /** The number of milliseconds the CPU has spent in irq mode. */
25
- irq: number;
26
- };
27
- }
28
- interface NetworkInterfaceBase {
29
- address: string;
30
- netmask: string;
31
- mac: string;
32
- internal: boolean;
33
- cidr: string | null;
34
- scopeid?: number;
35
- }
36
- interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase {
37
- family: "IPv4";
38
- }
39
- interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase {
40
- family: "IPv6";
41
- scopeid: number;
42
- }
43
- interface UserInfo<T> {
44
- username: T;
45
- uid: number;
46
- gid: number;
47
- shell: T | null;
48
- homedir: T;
49
- }
50
- type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6;
51
- /**
52
- * Returns the host name of the operating system as a string.
53
- * @since v0.3.3
54
- */
55
- function hostname(): string;
56
- /**
57
- * Returns an array containing the 1, 5, and 15 minute load averages.
58
- *
59
- * The load average is a measure of system activity calculated by the operating
60
- * system and expressed as a fractional number.
61
- *
62
- * The load average is a Unix-specific concept. On Windows, the return value is
63
- * always `[0, 0, 0]`.
64
- * @since v0.3.3
65
- */
66
- function loadavg(): number[];
67
- /**
68
- * Returns the system uptime in number of seconds.
69
- * @since v0.3.3
70
- */
71
- function uptime(): number;
72
- /**
73
- * Returns the amount of free system memory in bytes as an integer.
74
- * @since v0.3.3
75
- */
76
- function freemem(): number;
77
- /**
78
- * Returns the total amount of system memory in bytes as an integer.
79
- * @since v0.3.3
80
- */
81
- function totalmem(): number;
82
- /**
83
- * Returns an array of objects containing information about each logical CPU core.
84
- * The array will be empty if no CPU information is available, such as if the `/proc` file system is unavailable.
85
- *
86
- * The properties included on each object include:
87
- *
88
- * ```js
89
- * [
90
- * {
91
- * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
92
- * speed: 2926,
93
- * times: {
94
- * user: 252020,
95
- * nice: 0,
96
- * sys: 30340,
97
- * idle: 1070356870,
98
- * irq: 0,
99
- * },
100
- * },
101
- * {
102
- * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
103
- * speed: 2926,
104
- * times: {
105
- * user: 306960,
106
- * nice: 0,
107
- * sys: 26980,
108
- * idle: 1071569080,
109
- * irq: 0,
110
- * },
111
- * },
112
- * {
113
- * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
114
- * speed: 2926,
115
- * times: {
116
- * user: 248450,
117
- * nice: 0,
118
- * sys: 21750,
119
- * idle: 1070919370,
120
- * irq: 0,
121
- * },
122
- * },
123
- * {
124
- * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz',
125
- * speed: 2926,
126
- * times: {
127
- * user: 256880,
128
- * nice: 0,
129
- * sys: 19430,
130
- * idle: 1070905480,
131
- * irq: 20,
132
- * },
133
- * },
134
- * ]
135
- * ```
136
- *
137
- * `nice` values are POSIX-only. On Windows, the `nice` values of all processors
138
- * are always 0.
139
- *
140
- * `os.cpus().length` should not be used to calculate the amount of parallelism
141
- * available to an application. Use {@link availableParallelism} for this purpose.
142
- * @since v0.3.3
143
- */
144
- function cpus(): CpuInfo[];
145
- /**
146
- * Returns an estimate of the default amount of parallelism a program should use.
147
- * Always returns a value greater than zero.
148
- *
149
- * This function is a small wrapper about libuv's [`uv_available_parallelism()`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_available_parallelism).
150
- * @since v19.4.0, v18.14.0
151
- */
152
- function availableParallelism(): number;
153
- /**
154
- * Returns the operating system name as returned by [`uname(3)`](https://linux.die.net/man/3/uname). For example, it
155
- * returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows.
156
- *
157
- * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for additional information
158
- * about the output of running [`uname(3)`](https://linux.die.net/man/3/uname) on various operating systems.
159
- * @since v0.3.3
160
- */
161
- function type(): string;
162
- /**
163
- * Returns the operating system as a string.
164
- *
165
- * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `GetVersionExW()` is used. See
166
- * [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
167
- * @since v0.3.3
168
- */
169
- function release(): string;
170
- /**
171
- * Returns an object containing network interfaces that have been assigned a
172
- * network address.
173
- *
174
- * Each key on the returned object identifies a network interface. The associated
175
- * value is an array of objects that each describe an assigned network address.
176
- *
177
- * The properties available on the assigned network address object include:
178
- *
179
- * ```js
180
- * {
181
- * lo: [
182
- * {
183
- * address: '127.0.0.1',
184
- * netmask: '255.0.0.0',
185
- * family: 'IPv4',
186
- * mac: '00:00:00:00:00:00',
187
- * internal: true,
188
- * cidr: '127.0.0.1/8'
189
- * },
190
- * {
191
- * address: '::1',
192
- * netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff',
193
- * family: 'IPv6',
194
- * mac: '00:00:00:00:00:00',
195
- * scopeid: 0,
196
- * internal: true,
197
- * cidr: '::1/128'
198
- * }
199
- * ],
200
- * eth0: [
201
- * {
202
- * address: '192.168.1.108',
203
- * netmask: '255.255.255.0',
204
- * family: 'IPv4',
205
- * mac: '01:02:03:0a:0b:0c',
206
- * internal: false,
207
- * cidr: '192.168.1.108/24'
208
- * },
209
- * {
210
- * address: 'fe80::a00:27ff:fe4e:66a1',
211
- * netmask: 'ffff:ffff:ffff:ffff::',
212
- * family: 'IPv6',
213
- * mac: '01:02:03:0a:0b:0c',
214
- * scopeid: 1,
215
- * internal: false,
216
- * cidr: 'fe80::a00:27ff:fe4e:66a1/64'
217
- * }
218
- * ]
219
- * }
220
- * ```
221
- * @since v0.6.0
222
- */
223
- function networkInterfaces(): NodeJS.Dict<NetworkInterfaceInfo[]>;
224
- /**
225
- * Returns the string path of the current user's home directory.
226
- *
227
- * On POSIX, it uses the `$HOME` environment variable if defined. Otherwise it
228
- * uses the [effective UID](https://en.wikipedia.org/wiki/User_identifier#Effective_user_ID) to look up the user's home directory.
229
- *
230
- * On Windows, it uses the `USERPROFILE` environment variable if defined.
231
- * Otherwise it uses the path to the profile directory of the current user.
232
- * @since v2.3.0
233
- */
234
- function homedir(): string;
235
- interface UserInfoOptions {
236
- encoding?: BufferEncoding | "buffer" | undefined;
237
- }
238
- interface UserInfoOptionsWithBufferEncoding extends UserInfoOptions {
239
- encoding: "buffer";
240
- }
241
- interface UserInfoOptionsWithStringEncoding extends UserInfoOptions {
242
- encoding?: BufferEncoding | undefined;
243
- }
244
- /**
245
- * Returns information about the currently effective user. On POSIX platforms,
246
- * this is typically a subset of the password file. The returned object includes
247
- * the `username`, `uid`, `gid`, `shell`, and `homedir`. On Windows, the `uid` and `gid` fields are `-1`, and `shell` is `null`.
248
- *
249
- * The value of `homedir` returned by `os.userInfo()` is provided by the operating
250
- * system. This differs from the result of `os.homedir()`, which queries
251
- * environment variables for the home directory before falling back to the
252
- * operating system response.
253
- *
254
- * Throws a [`SystemError`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-systemerror) if a user has no `username` or `homedir`.
255
- * @since v6.0.0
256
- */
257
- function userInfo(options?: UserInfoOptionsWithStringEncoding): UserInfo<string>;
258
- function userInfo(options: UserInfoOptionsWithBufferEncoding): UserInfo<NonSharedBuffer>;
259
- function userInfo(options: UserInfoOptions): UserInfo<string | NonSharedBuffer>;
260
- type SignalConstants = {
261
- [key in NodeJS.Signals]: number;
262
- };
263
- namespace constants {
264
- const UV_UDP_REUSEADDR: number;
265
- namespace signals {}
266
- const signals: SignalConstants;
267
- namespace errno {
268
- const E2BIG: number;
269
- const EACCES: number;
270
- const EADDRINUSE: number;
271
- const EADDRNOTAVAIL: number;
272
- const EAFNOSUPPORT: number;
273
- const EAGAIN: number;
274
- const EALREADY: number;
275
- const EBADF: number;
276
- const EBADMSG: number;
277
- const EBUSY: number;
278
- const ECANCELED: number;
279
- const ECHILD: number;
280
- const ECONNABORTED: number;
281
- const ECONNREFUSED: number;
282
- const ECONNRESET: number;
283
- const EDEADLK: number;
284
- const EDESTADDRREQ: number;
285
- const EDOM: number;
286
- const EDQUOT: number;
287
- const EEXIST: number;
288
- const EFAULT: number;
289
- const EFBIG: number;
290
- const EHOSTUNREACH: number;
291
- const EIDRM: number;
292
- const EILSEQ: number;
293
- const EINPROGRESS: number;
294
- const EINTR: number;
295
- const EINVAL: number;
296
- const EIO: number;
297
- const EISCONN: number;
298
- const EISDIR: number;
299
- const ELOOP: number;
300
- const EMFILE: number;
301
- const EMLINK: number;
302
- const EMSGSIZE: number;
303
- const EMULTIHOP: number;
304
- const ENAMETOOLONG: number;
305
- const ENETDOWN: number;
306
- const ENETRESET: number;
307
- const ENETUNREACH: number;
308
- const ENFILE: number;
309
- const ENOBUFS: number;
310
- const ENODATA: number;
311
- const ENODEV: number;
312
- const ENOENT: number;
313
- const ENOEXEC: number;
314
- const ENOLCK: number;
315
- const ENOLINK: number;
316
- const ENOMEM: number;
317
- const ENOMSG: number;
318
- const ENOPROTOOPT: number;
319
- const ENOSPC: number;
320
- const ENOSR: number;
321
- const ENOSTR: number;
322
- const ENOSYS: number;
323
- const ENOTCONN: number;
324
- const ENOTDIR: number;
325
- const ENOTEMPTY: number;
326
- const ENOTSOCK: number;
327
- const ENOTSUP: number;
328
- const ENOTTY: number;
329
- const ENXIO: number;
330
- const EOPNOTSUPP: number;
331
- const EOVERFLOW: number;
332
- const EPERM: number;
333
- const EPIPE: number;
334
- const EPROTO: number;
335
- const EPROTONOSUPPORT: number;
336
- const EPROTOTYPE: number;
337
- const ERANGE: number;
338
- const EROFS: number;
339
- const ESPIPE: number;
340
- const ESRCH: number;
341
- const ESTALE: number;
342
- const ETIME: number;
343
- const ETIMEDOUT: number;
344
- const ETXTBSY: number;
345
- const EWOULDBLOCK: number;
346
- const EXDEV: number;
347
- const WSAEINTR: number;
348
- const WSAEBADF: number;
349
- const WSAEACCES: number;
350
- const WSAEFAULT: number;
351
- const WSAEINVAL: number;
352
- const WSAEMFILE: number;
353
- const WSAEWOULDBLOCK: number;
354
- const WSAEINPROGRESS: number;
355
- const WSAEALREADY: number;
356
- const WSAENOTSOCK: number;
357
- const WSAEDESTADDRREQ: number;
358
- const WSAEMSGSIZE: number;
359
- const WSAEPROTOTYPE: number;
360
- const WSAENOPROTOOPT: number;
361
- const WSAEPROTONOSUPPORT: number;
362
- const WSAESOCKTNOSUPPORT: number;
363
- const WSAEOPNOTSUPP: number;
364
- const WSAEPFNOSUPPORT: number;
365
- const WSAEAFNOSUPPORT: number;
366
- const WSAEADDRINUSE: number;
367
- const WSAEADDRNOTAVAIL: number;
368
- const WSAENETDOWN: number;
369
- const WSAENETUNREACH: number;
370
- const WSAENETRESET: number;
371
- const WSAECONNABORTED: number;
372
- const WSAECONNRESET: number;
373
- const WSAENOBUFS: number;
374
- const WSAEISCONN: number;
375
- const WSAENOTCONN: number;
376
- const WSAESHUTDOWN: number;
377
- const WSAETOOMANYREFS: number;
378
- const WSAETIMEDOUT: number;
379
- const WSAECONNREFUSED: number;
380
- const WSAELOOP: number;
381
- const WSAENAMETOOLONG: number;
382
- const WSAEHOSTDOWN: number;
383
- const WSAEHOSTUNREACH: number;
384
- const WSAENOTEMPTY: number;
385
- const WSAEPROCLIM: number;
386
- const WSAEUSERS: number;
387
- const WSAEDQUOT: number;
388
- const WSAESTALE: number;
389
- const WSAEREMOTE: number;
390
- const WSASYSNOTREADY: number;
391
- const WSAVERNOTSUPPORTED: number;
392
- const WSANOTINITIALISED: number;
393
- const WSAEDISCON: number;
394
- const WSAENOMORE: number;
395
- const WSAECANCELLED: number;
396
- const WSAEINVALIDPROCTABLE: number;
397
- const WSAEINVALIDPROVIDER: number;
398
- const WSAEPROVIDERFAILEDINIT: number;
399
- const WSASYSCALLFAILURE: number;
400
- const WSASERVICE_NOT_FOUND: number;
401
- const WSATYPE_NOT_FOUND: number;
402
- const WSA_E_NO_MORE: number;
403
- const WSA_E_CANCELLED: number;
404
- const WSAEREFUSED: number;
405
- }
406
- namespace dlopen {
407
- const RTLD_LAZY: number;
408
- const RTLD_NOW: number;
409
- const RTLD_GLOBAL: number;
410
- const RTLD_LOCAL: number;
411
- const RTLD_DEEPBIND: number;
412
- }
413
- namespace priority {
414
- const PRIORITY_LOW: number;
415
- const PRIORITY_BELOW_NORMAL: number;
416
- const PRIORITY_NORMAL: number;
417
- const PRIORITY_ABOVE_NORMAL: number;
418
- const PRIORITY_HIGH: number;
419
- const PRIORITY_HIGHEST: number;
420
- }
421
- }
422
- const devNull: string;
423
- /**
424
- * The operating system-specific end-of-line marker.
425
- * * `\n` on POSIX
426
- * * `\r\n` on Windows
427
- */
428
- const EOL: string;
429
- /**
430
- * Returns the operating system CPU architecture for which the Node.js binary was
431
- * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`, `'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`,
432
- * and `'x64'`.
433
- *
434
- * The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v20.x/api/process.html#processarch).
435
- * @since v0.5.0
436
- */
437
- function arch(): string;
438
- /**
439
- * Returns a string identifying the kernel version.
440
- *
441
- * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not
442
- * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
443
- * @since v13.11.0, v12.17.0
444
- */
445
- function version(): string;
446
- /**
447
- * Returns a string identifying the operating system platform for which
448
- * the Node.js binary was compiled. The value is set at compile time.
449
- * Possible values are `'aix'`, `'darwin'`, `'freebsd'`, `'linux'`, `'openbsd'`, `'sunos'`, and `'win32'`.
450
- *
451
- * The return value is equivalent to `process.platform`.
452
- *
453
- * The value `'android'` may also be returned if Node.js is built on the Android
454
- * operating system. [Android support is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os).
455
- * @since v0.5.0
456
- */
457
- function platform(): NodeJS.Platform;
458
- /**
459
- * Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`, `mips`, `mips64`, `ppc64`, `ppc64le`, `s390`, `s390x`, `i386`, `i686`, `x86_64`.
460
- *
461
- * On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not
462
- * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
463
- * @since v18.9.0, v16.18.0
464
- */
465
- function machine(): string;
466
- /**
467
- * Returns the operating system's default directory for temporary files as a
468
- * string.
469
- * @since v0.9.9
470
- */
471
- function tmpdir(): string;
472
- /**
473
- * Returns a string identifying the endianness of the CPU for which the Node.js
474
- * binary was compiled.
475
- *
476
- * Possible values are `'BE'` for big endian and `'LE'` for little endian.
477
- * @since v0.9.4
478
- */
479
- function endianness(): "BE" | "LE";
480
- /**
481
- * Returns the scheduling priority for the process specified by `pid`. If `pid` is
482
- * not provided or is `0`, the priority of the current process is returned.
483
- * @since v10.10.0
484
- * @param [pid=0] The process ID to retrieve scheduling priority for.
485
- */
486
- function getPriority(pid?: number): number;
487
- /**
488
- * Attempts to set the scheduling priority for the process specified by `pid`. If `pid` is not provided or is `0`, the process ID of the current process is used.
489
- *
490
- * The `priority` input must be an integer between `-20` (high priority) and `19` (low priority). Due to differences between Unix priority levels and Windows
491
- * priority classes, `priority` is mapped to one of six priority constants in `os.constants.priority`. When retrieving a process priority level, this range
492
- * mapping may cause the return value to be slightly different on Windows. To avoid
493
- * confusion, set `priority` to one of the priority constants.
494
- *
495
- * On Windows, setting priority to `PRIORITY_HIGHEST` requires elevated user
496
- * privileges. Otherwise the set priority will be silently reduced to `PRIORITY_HIGH`.
497
- * @since v10.10.0
498
- * @param [pid=0] The process ID to set scheduling priority for.
499
- * @param priority The scheduling priority to assign to the process.
500
- */
501
- function setPriority(priority: number): void;
502
- function setPriority(pid: number, priority: number): void;
503
- }
504
- declare module "node:os" {
505
- export * from "os";
506
- }
@@ -1,140 +0,0 @@
1
- {
2
- "name": "@types/node",
3
- "version": "20.19.39",
4
- "description": "TypeScript definitions for node",
5
- "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
- "license": "MIT",
7
- "contributors": [
8
- {
9
- "name": "Microsoft TypeScript",
10
- "githubUsername": "Microsoft",
11
- "url": "https://github.com/Microsoft"
12
- },
13
- {
14
- "name": "Alberto Schiabel",
15
- "githubUsername": "jkomyno",
16
- "url": "https://github.com/jkomyno"
17
- },
18
- {
19
- "name": "Andrew Makarov",
20
- "githubUsername": "r3nya",
21
- "url": "https://github.com/r3nya"
22
- },
23
- {
24
- "name": "Benjamin Toueg",
25
- "githubUsername": "btoueg",
26
- "url": "https://github.com/btoueg"
27
- },
28
- {
29
- "name": "David Junger",
30
- "githubUsername": "touffy",
31
- "url": "https://github.com/touffy"
32
- },
33
- {
34
- "name": "Mohsen Azimi",
35
- "githubUsername": "mohsen1",
36
- "url": "https://github.com/mohsen1"
37
- },
38
- {
39
- "name": "Nikita Galkin",
40
- "githubUsername": "galkin",
41
- "url": "https://github.com/galkin"
42
- },
43
- {
44
- "name": "Sebastian Silbermann",
45
- "githubUsername": "eps1lon",
46
- "url": "https://github.com/eps1lon"
47
- },
48
- {
49
- "name": "Wilco Bakker",
50
- "githubUsername": "WilcoBakker",
51
- "url": "https://github.com/WilcoBakker"
52
- },
53
- {
54
- "name": "Marcin Kopacz",
55
- "githubUsername": "chyzwar",
56
- "url": "https://github.com/chyzwar"
57
- },
58
- {
59
- "name": "Trivikram Kamat",
60
- "githubUsername": "trivikr",
61
- "url": "https://github.com/trivikr"
62
- },
63
- {
64
- "name": "Junxiao Shi",
65
- "githubUsername": "yoursunny",
66
- "url": "https://github.com/yoursunny"
67
- },
68
- {
69
- "name": "Ilia Baryshnikov",
70
- "githubUsername": "qwelias",
71
- "url": "https://github.com/qwelias"
72
- },
73
- {
74
- "name": "ExE Boss",
75
- "githubUsername": "ExE-Boss",
76
- "url": "https://github.com/ExE-Boss"
77
- },
78
- {
79
- "name": "Piotr Błażejewicz",
80
- "githubUsername": "peterblazejewicz",
81
- "url": "https://github.com/peterblazejewicz"
82
- },
83
- {
84
- "name": "Anna Henningsen",
85
- "githubUsername": "addaleax",
86
- "url": "https://github.com/addaleax"
87
- },
88
- {
89
- "name": "Victor Perin",
90
- "githubUsername": "victorperin",
91
- "url": "https://github.com/victorperin"
92
- },
93
- {
94
- "name": "NodeJS Contributors",
95
- "githubUsername": "NodeJS",
96
- "url": "https://github.com/NodeJS"
97
- },
98
- {
99
- "name": "Linus Unnebäck",
100
- "githubUsername": "LinusU",
101
- "url": "https://github.com/LinusU"
102
- },
103
- {
104
- "name": "wafuwafu13",
105
- "githubUsername": "wafuwafu13",
106
- "url": "https://github.com/wafuwafu13"
107
- },
108
- {
109
- "name": "Matteo Collina",
110
- "githubUsername": "mcollina",
111
- "url": "https://github.com/mcollina"
112
- },
113
- {
114
- "name": "Dmitry Semigradsky",
115
- "githubUsername": "Semigradsky",
116
- "url": "https://github.com/Semigradsky"
117
- }
118
- ],
119
- "main": "",
120
- "types": "index.d.ts",
121
- "typesVersions": {
122
- "<=5.6": {
123
- "*": [
124
- "ts5.6/*"
125
- ]
126
- }
127
- },
128
- "repository": {
129
- "type": "git",
130
- "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
131
- "directory": "types/node"
132
- },
133
- "scripts": {},
134
- "dependencies": {
135
- "undici-types": "~6.21.0"
136
- },
137
- "peerDependencies": {},
138
- "typesPublisherContentHash": "871323d2249864178e2cf14d45e1136232baed800bb0184748818383371a02fb",
139
- "typeScriptVersion": "5.3"
140
- }