totemlayer 0.1.44 → 0.1.63

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 (46) hide show
  1. package/README.md +48 -11
  2. package/bin/agent-memory.mjs +255 -0
  3. package/bin/agent-profile.mjs +42 -5
  4. package/bin/agent-runner.mjs +55 -12
  5. package/bin/agent-setup.mjs +136 -50
  6. package/bin/automatic-runtime.mjs +26 -7
  7. package/bin/chat-prompt-limit.mjs +67 -0
  8. package/bin/codex-chat-bridge.mjs +36 -8
  9. package/bin/codex-chat-readiness.mjs +7 -0
  10. package/bin/codex-human-chat-bridge.mjs +209 -0
  11. package/bin/collaboration-listener.mjs +2 -1
  12. package/bin/connected-agent-service.mjs +4 -1
  13. package/bin/inbox-queue.mjs +2 -1
  14. package/bin/inference-broker.mjs +361 -0
  15. package/bin/installation.mjs +92 -60
  16. package/bin/isolated-agent-entry.mjs +35 -0
  17. package/bin/local-mcp.mjs +43 -4
  18. package/bin/mcp-config.d.mts +11 -0
  19. package/bin/mcp-config.mjs +56 -0
  20. package/bin/mcp-install.mjs +143 -12
  21. package/bin/mcp-listener.d.mts +22 -0
  22. package/bin/mcp-listener.mjs +4 -0
  23. package/bin/mcp-runtime.mjs +3 -1
  24. package/bin/mcp.mjs +331 -94
  25. package/bin/mission-agent-service.mjs +2 -1
  26. package/bin/mission-worker.mjs +13 -2
  27. package/bin/model-adapter.mjs +245 -107
  28. package/bin/network-contract.mjs +254 -0
  29. package/bin/network-runtime.mjs +162 -47
  30. package/bin/network.mjs +32 -7
  31. package/bin/platform-client.mjs +25 -3
  32. package/bin/process-isolation.mjs +214 -0
  33. package/bin/provider-detection.mjs +1 -4
  34. package/bin/runtime-diagnostics.mjs +1 -0
  35. package/bin/sdk/index.d.ts +50 -6
  36. package/bin/sdk/index.js +1 -1
  37. package/bin/sdk/inspector.js +1 -1
  38. package/bin/sdk/listener.d.ts +57 -0
  39. package/bin/sdk/listener.js +1 -0
  40. package/bin/sdk/types.d.ts +62 -0
  41. package/bin/startup-diagnostics.mjs +168 -0
  42. package/bin/totem.mjs +17 -3
  43. package/bin/worker-core/adapters.mjs +30 -13
  44. package/bin/worker-core/errors.mjs +4 -0
  45. package/package.json +1 -1
  46. package/scripts/prepare.mjs +28 -8
@@ -1,3 +1,39 @@
1
+ export interface AgentMemoryControls {
2
+ enabled: boolean;
3
+ knowledgeRetentionDays: number;
4
+ workingRetentionDays: number;
5
+ }
6
+ export interface AgentMemoryEntry {
7
+ id: string;
8
+ section: "notes" | "workingMemory";
9
+ text: string;
10
+ reinforcedAt: string;
11
+ pinned: boolean;
12
+ expiresAt: string | null;
13
+ sourceKey?: string;
14
+ sourceEventId?: string;
15
+ }
16
+
17
+ export interface AgentMemory {
18
+ agentId: string;
19
+ notes: string;
20
+ workingMemory: string;
21
+ version: number;
22
+ updatedAt: string | null;
23
+ updatedBy: string | null;
24
+ controls: AgentMemoryControls;
25
+ entries: AgentMemoryEntry[];
26
+ forgottenCount: number;
27
+ active: { pendingMessages: number; queuedChats: number; openTasks: number };
28
+ }
29
+
30
+ export interface AgentProfileInput {
31
+ name: string;
32
+ localPart: string;
33
+ description?: string;
34
+ creationContext: { background?: string; decisions?: string; nextSteps?: string };
35
+ }
36
+
1
37
  export type Metadata = Record<string, unknown>;
2
38
  export type JsonValue = null | boolean | number | string | JsonValue[] | {
3
39
  [key: string]: JsonValue;
@@ -22,6 +58,8 @@ export interface AgentRuntimeStatus {
22
58
  }
23
59
 
24
60
  export interface Agent {
61
+ /** Own authenticated identity only; automatically loaded at connection. */
62
+ memory?: AgentMemory;
25
63
  /** Absent from public discovery; a connected MCP client alone is not a ready listener. */
26
64
  runtime?: AgentRuntimeStatus;
27
65
  actionMode?: "ask_me" | "full_access";
@@ -652,6 +690,7 @@ export type MessageHandler = (message: IncomingMessage) => void | Promise<void>;
652
690
  export interface ListenOptions {
653
691
  /** Customer-side policy. Screens message/file plaintext before invoking the handler. */
654
692
  inspector?: import("./inspector.js").LocalInspector;
693
+ /** Healthy inbox checks default to 5000 ms; an explicit host override is preserved. */
655
694
  pollIntervalMs?: number;
656
695
  /** Receives handler and transport failures; polling continues afterward. */
657
696
  onError?: (error: Error) => void;
@@ -703,6 +742,8 @@ export interface ChatDetail {
703
742
  previousCursor?: string | null;
704
743
  }
705
744
  export interface RuntimeHeartbeat {
745
+ listenerReady?: boolean;
746
+ listenerKind?: "mcp" | "runtime";
706
747
  operationalStatesSupported?: boolean;
707
748
  ready?: boolean;
708
749
  state?: string;
@@ -726,3 +767,24 @@ export interface NetworkActivityPage extends Page<NetworkActivity> {
726
767
  actionMode: "ask_me" | "full_access";
727
768
  actionModeVersion: number;
728
769
  }
770
+
771
+ export interface AgentMemorySearch {
772
+ query?: string;
773
+ includeHistory?: boolean;
774
+ before?: number;
775
+ limit?: number;
776
+ }
777
+ export interface AgentMemoryHistory {
778
+ data: Array<{
779
+ id: string;
780
+ version: number;
781
+ notes: string;
782
+ workingMemory: string;
783
+ source: string;
784
+ sourceEventId: string | null;
785
+ createdAt: string;
786
+ current: boolean;
787
+ excerpt: string;
788
+ }>;
789
+ nextCursor: string | null;
790
+ }
@@ -0,0 +1,168 @@
1
+ // Public diagnostics contain fixed descriptions only. Never log exception messages,
2
+ // provider output, command arguments, paths, or credentials from a failed startup.
3
+ export const HOST_APPROVAL_RECOVERY =
4
+ "Stop retrying. Ask the owner to inspect this command in the host app's approval or automatic review controls. If no approval path is available, contact the host's support with the denial. Resume once after the owner resolves it; do not bypass the policy or change agents.";
5
+
6
+ const causes = {
7
+ HOST_APPROVAL_DENIED: [
8
+ "The host denied approval to execute the startup command.",
9
+ HOST_APPROVAL_RECOVERY,
10
+ false,
11
+ ],
12
+ EADDRINUSE: [
13
+ "The listener could not bind because its port or socket is already in use.",
14
+ "Inspect the process using the configured port or socket; stop a duplicate listener or choose an available endpoint before starting this profile again.",
15
+ ],
16
+ EACCES: [
17
+ "The operating system denied access to a startup resource.",
18
+ "Check the owner's access to the executable, private state directory, and configured port; repair the specific permission before restarting.",
19
+ ],
20
+ EPERM: [
21
+ "The operating system denied the startup operation.",
22
+ "Inspect the host's process and filesystem restrictions and have the owner resolve the denied operation before restarting.",
23
+ ],
24
+ ENOENT: [
25
+ "A required startup executable or file was not found.",
26
+ "Check the selected executable and private configuration paths; install or restore the missing resource before restarting.",
27
+ ],
28
+ ECONNREFUSED: [
29
+ "The configured service refused the connection.",
30
+ "Start the configured model or service and check its endpoint before restarting this profile.",
31
+ ],
32
+ ENOTFOUND: [
33
+ "The configured service hostname could not be resolved.",
34
+ "Check the configured hostname and network DNS, then restart this profile.",
35
+ ],
36
+ ETIMEDOUT: [
37
+ "The startup connection timed out.",
38
+ "Check the service endpoint and network availability before restarting this profile.",
39
+ ],
40
+ RUN_TIMEOUT: [
41
+ "The executor did not finish the controlled readiness reply before its deadline.",
42
+ "Check the selected executor and model availability before restarting this profile.",
43
+ ],
44
+ PROVIDER_AUTH_REQUIRED: [
45
+ "The selected inference provider credential is missing or unavailable.",
46
+ "Restore the selected provider credential in this host's secret environment before restarting. Never copy another agent's key.",
47
+ ],
48
+ RUNTIME_AUTHORIZATION_REJECTED: [
49
+ "Totem rejected the profile's credential or access.",
50
+ "Reauthorize this agent with totem login --reauthorize. Never copy another agent's key.",
51
+ ],
52
+ AGENT_IDENTITY_MISMATCH: [
53
+ "The authenticated agent does not match the saved profile.",
54
+ "Inspect this profile's agent and origin; reconnect the intended agent without replacing another agent's configuration.",
55
+ ],
56
+ ISOLATION_UNAVAILABLE: [
57
+ "The selected executor's required process isolation is unavailable.",
58
+ "Repair the supported isolation backend on this host before restarting; do not disable containment.",
59
+ ],
60
+ PRIVACY_BOUNDARY_UNAVAILABLE: [
61
+ "The executor's required privacy boundary is unavailable.",
62
+ "Repair the configured privacy boundary before restarting; do not bypass it.",
63
+ ],
64
+ AGENT_AUTH_REQUIRED: [
65
+ "The selected agent client is not authenticated.",
66
+ "Sign in to the selected client on this host, then explicitly start this profile once.",
67
+ ],
68
+ AGENT_QUOTA_EXCEEDED: [
69
+ "The selected agent provider rejected startup because its usage quota is exhausted.",
70
+ "Inspect the selected provider's usage limits and resume once capacity is available.",
71
+ ],
72
+ AGENT_CLI_INCOMPATIBLE: [
73
+ "The installed agent CLI does not support the required startup contract.",
74
+ "Install a supported version of the selected client, then start this profile once.",
75
+ ],
76
+ HARNESS_SETUP_REQUIRED: [
77
+ "The selected host has not completed its native receiver setup.",
78
+ "Complete the selected host's supported setup and inspect its approval controls before starting this profile.",
79
+ ],
80
+ READINESS_UNSUPPORTED: [
81
+ "The installed adapter cannot verify the controlled readiness check.",
82
+ "Update the selected adapter to a version that supports receive, wake, and reply verification before claiming readiness.",
83
+ ],
84
+ AGENT_NOT_INSTALLED: [
85
+ "The selected agent executable is not installed or cannot be located.",
86
+ "Install the selected agent client and check this host's executable path before restarting.",
87
+ ],
88
+ AGENT_START_FAILED: [
89
+ "The executor process could not be launched.",
90
+ "Check that the selected executable exists and the owner can run it on this host.",
91
+ ],
92
+ AGENT_EXIT_FAILED: [
93
+ "The executor exited with a nonzero status during startup.",
94
+ "Inspect the selected executor's local diagnostics and sign-in state before restarting; do not share credentials or raw provider output.",
95
+ ],
96
+ INVALID_AGENT_RESULT: [
97
+ "The executor returned an invalid readiness response.",
98
+ "Check the selected adapter's response format and configured model before restarting.",
99
+ ],
100
+ READINESS_CHALLENGE_FAILED: [
101
+ "Totem could not supply a valid controlled readiness challenge.",
102
+ "Check Totem connectivity and the installed receiver version before restarting this profile.",
103
+ ],
104
+ READINESS_GENERATION_FAILED: [
105
+ "The selected executor failed while generating the controlled readiness reply; it supplied no recognized cause.",
106
+ "Inspect the selected executor's local diagnostics and authorization before restarting this profile.",
107
+ ],
108
+ READINESS_REPLY_REJECTED: [
109
+ "Totem did not accept the controlled readiness reply.",
110
+ "Check that the selected executor returns the exact readiness challenge response and that the runtime session is current before restarting.",
111
+ ],
112
+ READINESS_REPLY_INVALID: [
113
+ "The executor did not return the exact controlled readiness response.",
114
+ "Check the selected adapter's output contract and repeat the readiness check once after repair.",
115
+ ],
116
+ READINESS_EXPIRED: [
117
+ "The controlled readiness challenge expired before it completed.",
118
+ "Check executor latency and start a fresh runtime session to obtain a new challenge.",
119
+ ],
120
+ RUNTIME_SUPERSEDED: [
121
+ "Another runtime session owns this connection credential.",
122
+ "Inspect the existing listener and use its session; stop it explicitly before replacing it. Do not start duplicate workers.",
123
+ ],
124
+ BACKGROUND_START_TIMEOUT: [
125
+ "The background worker did not confirm startup before its deadline.",
126
+ "Inspect totem status for this profile and the selected executor's local diagnostics before starting it again.",
127
+ ],
128
+ STARTUP_CAUSE_UNAVAILABLE: [
129
+ "Startup failed without a recognized underlying cause.",
130
+ "Inspect this profile with totem status and the selected executor's local diagnostics before restarting. Share error codes, not credentials or raw provider output.",
131
+ ],
132
+ };
133
+
134
+ const known = (code) => typeof code === "string" && Object.hasOwn(causes, code);
135
+
136
+ export function startupDiagnostic(error) {
137
+ const chain = [];
138
+ const seen = new Set();
139
+ for (
140
+ let item = error;
141
+ item && typeof item === "object" && chain.length < 8 && !seen.has(item);
142
+ item = item.cause
143
+ ) {
144
+ seen.add(item);
145
+ chain.push(item);
146
+ }
147
+ const denied = chain.some(
148
+ (item) =>
149
+ ["HOST_APPROVAL_DENIED", "APPROVAL_DENIED", "POLICY_DENIED"].includes(item.code) ||
150
+ /(?:rejected:\s*)?blocked by policy|automatic (?:approval )?review rejected|approval (?:was )?denied/i.test(
151
+ String(item.message ?? ""),
152
+ ),
153
+ );
154
+ const match = chain
155
+ .toReversed()
156
+ .find((item) => known(item.code) || known(item.causeCode) || [401, 403].includes(item.status));
157
+ const causeCode = denied
158
+ ? "HOST_APPROVAL_DENIED"
159
+ : match
160
+ ? known(match.code)
161
+ ? match.code
162
+ : known(match.causeCode)
163
+ ? match.causeCode
164
+ : "RUNTIME_AUTHORIZATION_REJECTED"
165
+ : "STARTUP_CAUSE_UNAVAILABLE";
166
+ const [cause, recovery, retryable = true] = causes[causeCode];
167
+ return { causeCode, cause, recovery, retryable };
168
+ }
package/bin/totem.mjs CHANGED
@@ -239,9 +239,9 @@ function compactDigest(value) {
239
239
  function help() {
240
240
  writeBrand();
241
241
  writeHelpBody(`Start here
242
- Install once npm install --global https://totemlayer.com/downloads/totemlayer-0.1.44.tgz
242
+ Install once npm install --global https://totemlayer.com/downloads/totemlayer-0.1.63.tgz
243
243
  Confirm installation totem --version
244
- Run one-off npx --yes --package https://totemlayer.com/downloads/totemlayer-0.1.44.tgz totem --help
244
+ Run one-off npx --yes --package https://totemlayer.com/downloads/totemlayer-0.1.63.tgz totem --help
245
245
 
246
246
  Connect once and receive messages and approved Mission work
247
247
  Select Codex, Claude, a local model, or an owner-configured CLI/HTTP agent.
@@ -255,7 +255,9 @@ Agent messaging and local runtime
255
255
  totem network --help
256
256
  totem network run --provider qwen-local --model qwen3.5-9b
257
257
 
258
- Connect an AI app through MCP
258
+ Connect any AI agent or personal assistant through MCP
259
+ totem mcp config
260
+ totem mcp config --transport stdio --key-file /absolute/path/to/agent.key
259
261
  totem mcp
260
262
 
261
263
  Authorization handshake
@@ -1781,6 +1783,18 @@ async function main() {
1781
1783
  return;
1782
1784
  }
1783
1785
  if (process.argv[2] === "mcp") {
1786
+ if (process.argv[3] === "config") {
1787
+ const { configureTotemMcp } = await import("./mcp-install.mjs");
1788
+ try {
1789
+ process.stdout.write(await configureTotemMcp(process.argv.slice(4)));
1790
+ } catch (error) {
1791
+ process.stderr.write(
1792
+ `${error instanceof Error ? error.message : "Could not export MCP settings."}\n`,
1793
+ );
1794
+ process.exitCode = 1;
1795
+ }
1796
+ return;
1797
+ }
1784
1798
  if (process.argv[3] === "install" || process.argv[3] === "--help" || process.argv[3] === "-h") {
1785
1799
  const { installTotemMcp } = await import("./mcp-install.mjs");
1786
1800
  try {
@@ -27,9 +27,9 @@ function integer(value, fallback, maximum) {
27
27
  return result;
28
28
  }
29
29
 
30
- function childEnvironment(values) {
30
+ function childEnvironment(values, inheritSystemEnvironment = true) {
31
31
  const environment = {};
32
- for (const key of SYSTEM_ENV) {
32
+ for (const key of inheritSystemEnvironment ? SYSTEM_ENV : []) {
33
33
  if (process.env[key] !== undefined) environment[key] = process.env[key];
34
34
  }
35
35
  for (const [key, value] of Object.entries(values ?? {})) {
@@ -58,7 +58,7 @@ export function createCommandAdapter(config) {
58
58
  throw new WorkerError("INVALID_ADAPTER_CONFIG");
59
59
  }
60
60
  const args = [...(config.args ?? [])];
61
- const env = childEnvironment(config.env);
61
+ const env = childEnvironment(config.env, config.inheritSystemEnvironment !== false);
62
62
  const timeoutMs = integer(config.timeoutMs, 15 * 60_000, 24 * 60 * 60_000);
63
63
  const maxOutputBytes = integer(config.maxOutputBytes, 1024 * 1024, 16 * 1024 * 1024);
64
64
  const parseResult = config.parseResult ?? ((output) => ({ status: "completed", output }));
@@ -82,7 +82,12 @@ export function createCommandAdapter(config) {
82
82
  const diagnosticFailure = (error, exitCode) => {
83
83
  if (config.captureFailure)
84
84
  Object.defineProperty(error, "privateProviderDiagnostic", {
85
- value: { command: config.command, exitCode, stderr: diagnosticOutput, stdout: output },
85
+ value: {
86
+ command: config.command,
87
+ exitCode,
88
+ stderr: diagnosticOutput,
89
+ stdout: output,
90
+ },
86
91
  enumerable: false,
87
92
  });
88
93
  return error;
@@ -127,8 +132,8 @@ export function createCommandAdapter(config) {
127
132
  windowsHide: true,
128
133
  stdio: ["pipe", "pipe", "pipe"],
129
134
  });
130
- } catch {
131
- reject(new WorkerError("AGENT_START_FAILED"));
135
+ } catch (error) {
136
+ reject(Object.assign(new WorkerError("AGENT_START_FAILED"), { cause: error }));
132
137
  return;
133
138
  }
134
139
  const timeout = setTimeout(() => stop("RUN_TIMEOUT"), timeoutMs);
@@ -144,18 +149,21 @@ export function createCommandAdapter(config) {
144
149
  child.stderr.on("data", (chunk) => {
145
150
  bytes += chunk.length;
146
151
  if (bytes > maxOutputBytes) stop("OUTPUT_LIMIT_EXCEEDED");
147
- else if (config.classifyFailure || config.captureFailure) diagnosticOutput += chunk.toString("utf8");
152
+ else if (config.classifyFailure || config.captureFailure)
153
+ diagnosticOutput += chunk.toString("utf8");
148
154
  });
149
155
  child.stdin.on("error", () => {
150
156
  /* A failed child can close stdin early. */
151
157
  });
152
- child.on("error", () => {
153
- failure ??= new WorkerError("AGENT_START_FAILED");
158
+ child.on("error", (error) => {
159
+ failure ??= Object.assign(new WorkerError("AGENT_START_FAILED"), { cause: error });
154
160
  });
155
161
  child.on("close", (code) => {
156
162
  clearTimeout(timeout);
157
163
  clearTimeout(killTimer);
158
164
  signal?.removeEventListener("abort", cancel);
165
+ // A successful foreground turn cannot leave background tools behind.
166
+ if (config.inheritSystemEnvironment === false) kill("SIGKILL");
159
167
  if (failure) {
160
168
  kill("SIGKILL");
161
169
  return reject(diagnosticFailure(failure, code));
@@ -163,9 +171,13 @@ export function createCommandAdapter(config) {
163
171
  if (code !== 0) {
164
172
  try {
165
173
  return reject(
166
- diagnosticFailure(new WorkerError(
167
- config.classifyFailure?.(`${diagnosticOutput}\n${output}`) ?? "AGENT_EXIT_FAILED",
168
- ), code),
174
+ diagnosticFailure(
175
+ new WorkerError(
176
+ config.classifyFailure?.(`${diagnosticOutput}\n${output}`) ??
177
+ "AGENT_EXIT_FAILED",
178
+ ),
179
+ code,
180
+ ),
169
181
  );
170
182
  } catch {
171
183
  return reject(diagnosticFailure(new WorkerError("AGENT_EXIT_FAILED"), code));
@@ -174,7 +186,12 @@ export function createCommandAdapter(config) {
174
186
  try {
175
187
  resolve(validateResult(parseResult(output)));
176
188
  } catch (error) {
177
- reject(diagnosticFailure(error instanceof WorkerError ? error : new WorkerError("INVALID_AGENT_RESULT"), code));
189
+ reject(
190
+ diagnosticFailure(
191
+ error instanceof WorkerError ? error : new WorkerError("INVALID_AGENT_RESULT"),
192
+ code,
193
+ ),
194
+ );
178
195
  }
179
196
  });
180
197
  // Prompts cannot become argv, executable names, paths, or shell syntax.
@@ -1,5 +1,9 @@
1
1
  const SAFE_CODES = new Set([
2
2
  "INTERNAL_ERROR",
3
+ "PRIVACY_REVIEW_REQUIRED",
4
+ "ISOLATION_UNAVAILABLE",
5
+ "PROVIDER_AUTH_REQUIRED",
6
+ "AGENT_NOT_INSTALLED",
3
7
  "INVALID_AGENT_RESULT",
4
8
  "INVALID_ADAPTER_ENV",
5
9
  "INVALID_RUNNER_ARGUMENTS",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "totemlayer",
3
- "version": "0.1.44",
3
+ "version": "0.1.63",
4
4
  "description": "Cross-platform CLI for TotemLayer agent identity and authorization",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,13 +1,27 @@
1
1
  import { access, readdir, readFile, writeFile } from "node:fs/promises";
2
2
  import { transform } from "esbuild";
3
+ import { generateNetworkContract } from "../../../scripts/generate-network-contract.mjs";
4
+ await generateNetworkContract();
3
5
  // This candidate rebases coordination on the immutable published 0.1.21 bundle.
4
6
  // Its bundled SDK is the release source; do not rebuild it from an older sibling checkout.
5
7
  for (const name of [
6
- "totem.mjs", "mission-worker.mjs", "mission-coordination.mjs",
7
- "sdk/index.js", "sdk/index.d.ts", "sdk/types.d.ts",
8
- "network-retry.mjs", "runtime-diagnostics.mjs", "codex-chat-bridge.mjs",
9
- "worker-core/adapters.mjs", "worker-core/errors.mjs",
10
- ]) await access(new URL(`../bin/${name}`, import.meta.url));
8
+ "totem.mjs",
9
+ "mission-worker.mjs",
10
+ "mission-coordination.mjs",
11
+ "sdk/index.js",
12
+ "sdk/index.d.ts",
13
+ "sdk/listener.js",
14
+ "sdk/listener.d.ts",
15
+ "sdk/types.d.ts",
16
+ "network-retry.mjs",
17
+ "runtime-diagnostics.mjs",
18
+ "codex-chat-bridge.mjs",
19
+ "codex-human-chat-bridge.mjs",
20
+ "chat-prompt-limit.mjs",
21
+ "worker-core/adapters.mjs",
22
+ "worker-core/errors.mjs",
23
+ ])
24
+ await access(new URL(`../bin/${name}`, import.meta.url));
11
25
 
12
26
  // Compact the release SDK without rebuilding it from an older sibling source.
13
27
  // Retain every module, export, name and declaration; no feature code is removed.
@@ -16,9 +30,15 @@ for (const name of await readdir(sdk)) {
16
30
  if (!name.endsWith(".js")) continue;
17
31
  const path = new URL(name, sdk);
18
32
  const result = await transform(await readFile(path, "utf8"), {
19
- loader: "js", target: "es2022", format: "esm",
20
- minifyWhitespace: true, minifyIdentifiers: false, minifySyntax: false,
21
- treeShaking: false, keepNames: false, legalComments: "eof",
33
+ loader: "js",
34
+ target: "es2022",
35
+ format: "esm",
36
+ minifyWhitespace: true,
37
+ minifyIdentifiers: false,
38
+ minifySyntax: false,
39
+ treeShaking: false,
40
+ keepNames: false,
41
+ legalComments: "eof",
22
42
  });
23
43
  await writeFile(path, result.code);
24
44
  }