@jini-ai/platform 0.7.2 → 0.7.3-next.2

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 (169) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/README.md +16 -4
  3. package/dist/asset-cache.d.ts +13 -3
  4. package/dist/asset-cache.js +163 -154
  5. package/dist/blob-storage.d.ts +3 -32
  6. package/dist/blob-storage.js +1 -9
  7. package/dist/child-environment.d.ts +0 -16
  8. package/dist/child-environment.js +0 -25
  9. package/dist/command.d.ts +6 -11
  10. package/dist/command.js +8 -54
  11. package/dist/download-lock.d.ts +4 -0
  12. package/dist/download-lock.js +82 -0
  13. package/dist/download-maintenance.d.ts +5 -0
  14. package/dist/download-maintenance.js +82 -0
  15. package/dist/download-state.d.ts +8 -0
  16. package/dist/download-state.js +126 -0
  17. package/dist/download-store.d.ts +22 -0
  18. package/dist/download-store.js +174 -0
  19. package/dist/download-target.d.ts +10 -0
  20. package/dist/download-target.js +102 -0
  21. package/dist/download-transfer.d.ts +12 -0
  22. package/dist/download-transfer.js +174 -0
  23. package/dist/download-types.d.ts +162 -0
  24. package/dist/download-types.js +31 -0
  25. package/dist/download.d.ts +1 -89
  26. package/dist/download.js +8 -738
  27. package/dist/fetch-with-timeout.d.ts +7 -32
  28. package/dist/fetch-with-timeout.js +1 -77
  29. package/dist/fs/app-data-root.d.ts +28 -0
  30. package/dist/fs/app-data-root.js +35 -0
  31. package/dist/fs/atomic-write.js +1 -1
  32. package/dist/fs/boot-identity.d.ts +1 -4
  33. package/dist/fs/directory-delete-guard.d.ts +93 -0
  34. package/dist/fs/directory-delete-guard.js +148 -0
  35. package/dist/fs/directory-registry.js +45 -35
  36. package/dist/fs/directory-relocation.d.ts +82 -0
  37. package/dist/fs/directory-relocation.js +99 -0
  38. package/dist/fs/directory-running-lock.d.ts +1 -1
  39. package/dist/fs/directory-running-lock.js +24 -21
  40. package/dist/fs/directory-sync.js +1 -1
  41. package/dist/fs/directory-user-config.js +30 -3
  42. package/dist/fs/directory-workspace.d.ts +34 -30
  43. package/dist/fs/directory-workspace.js +70 -29
  44. package/dist/fs/durable-json.d.ts +6 -15
  45. package/dist/fs/durable-json.js +38 -35
  46. package/dist/fs/errno.d.ts +12 -3
  47. package/dist/fs/errno.js +5 -3
  48. package/dist/fs/file-lock.d.ts +3 -87
  49. package/dist/fs/file-lock.js +16 -30
  50. package/dist/fs/guarded-reader.js +335 -315
  51. package/dist/fs/index.d.ts +5 -0
  52. package/dist/fs/index.js +5 -0
  53. package/dist/fs/recent-directories.d.ts +46 -0
  54. package/dist/fs/recent-directories.js +68 -0
  55. package/dist/fs/remove-directory-tree.d.ts +20 -0
  56. package/dist/fs/remove-directory-tree.js +28 -0
  57. package/dist/fs/user-data-directories.js +2 -2
  58. package/dist/fs/workspace-directory.js +2 -1
  59. package/dist/fs.d.ts +16 -4
  60. package/dist/fs.js +4 -4
  61. package/dist/home-expansion.d.ts +7 -2
  62. package/dist/home-expansion.js +3 -3
  63. package/dist/http/guarded/client.d.ts +1 -2
  64. package/dist/http/guarded/client.js +2 -1
  65. package/dist/http/guarded/index.d.ts +0 -3
  66. package/dist/http/guarded/node-ports.d.ts +1 -1
  67. package/dist/http/guarded/transport.fetch.d.ts +2 -3
  68. package/dist/http/guarded/transport.fetch.js +64 -58
  69. package/dist/http.d.ts +3 -1
  70. package/dist/http.js +2 -2
  71. package/dist/index.d.ts +10 -11
  72. package/dist/index.js +7 -6
  73. package/dist/mail/activity/activity.d.ts +136 -0
  74. package/dist/mail/activity/activity.js +172 -0
  75. package/dist/mail/activity/ports.d.ts +113 -0
  76. package/dist/mail/activity/suppressions.d.ts +82 -0
  77. package/dist/mail/activity/suppressions.js +119 -0
  78. package/dist/mail/activity/vocabulary.d.ts +10 -0
  79. package/dist/mail/activity/vocabulary.js +8 -0
  80. package/dist/mail/builtin-providers.d.ts +12 -6
  81. package/dist/mail/builtin-providers.js +14 -11
  82. package/dist/mail/delivery-wrapper.js +2 -1
  83. package/dist/mail/email-sender-registry.d.ts +1 -1
  84. package/dist/mail/email-sender-registry.js +1 -1
  85. package/dist/mail/email-template-operations.d.ts +186 -0
  86. package/dist/mail/email-template-operations.js +226 -0
  87. package/dist/mail/email-template.d.ts +120 -0
  88. package/dist/mail/email-template.js +243 -0
  89. package/dist/mail/index.d.ts +4 -0
  90. package/dist/mail/index.js +3 -0
  91. package/dist/mail/prepare-sender-email.d.ts +1 -10
  92. package/dist/mail/prepare-sender-email.js +1 -11
  93. package/dist/mail/resolve-mailer.d.ts +2 -1
  94. package/dist/mail/resolve-mailer.js +5 -2
  95. package/dist/mail/senders.d.ts +0 -1
  96. package/dist/mail/senders.js +0 -1
  97. package/dist/mail/smtp.d.ts +1 -31
  98. package/dist/net/address.d.ts +1 -8
  99. package/dist/net/address.js +1 -18
  100. package/dist/net/index.d.ts +1 -1
  101. package/dist/net/index.js +1 -1
  102. package/dist/net/local-http-probe.js +1 -1
  103. package/dist/net/local-http-request.js +1 -1
  104. package/dist/process-probes.d.ts +36 -0
  105. package/dist/process-probes.js +151 -0
  106. package/dist/process-top-footprint.d.ts +7 -0
  107. package/dist/process-top-footprint.js +30 -0
  108. package/dist/process.d.ts +29 -31
  109. package/dist/process.js +18 -196
  110. package/dist/proxy-env.d.ts +12 -3
  111. package/dist/proxy-env.js +9 -8
  112. package/dist/resource-paths.d.ts +15 -3
  113. package/dist/resource-paths.js +7 -5
  114. package/dist/sandbox-env.d.ts +26 -5
  115. package/dist/sandbox-env.js +7 -7
  116. package/dist/secrets/credential-sets/contracts.d.ts +0 -1
  117. package/dist/secrets/credential-sets/contracts.js +0 -1
  118. package/dist/secrets/credential-sets/index.d.ts +2 -3
  119. package/dist/secrets/credential-sets/index.js +1 -1
  120. package/dist/secrets/credential-sets/provider-matches.d.ts +1 -1
  121. package/dist/secrets/credential-sets/provider-matches.js +1 -1
  122. package/dist/secrets/credential-sets/vault-archive.d.ts +1 -1
  123. package/dist/secrets/credential-sets/vault-archive.js +14 -8
  124. package/dist/secrets/credential-sets/vault.aad.d.ts +1 -1
  125. package/dist/secrets/credential-sets/vault.meta.d.ts +1 -1
  126. package/dist/secrets/credential-sets/vault.meta.js +1 -1
  127. package/dist/secrets/credential-sets/vault.repo.memory.d.ts +1 -1
  128. package/dist/secrets/credential-sets/vault.repo.memory.js +1 -1
  129. package/dist/secrets/credential-sets/vault.reseal-refused.d.ts +23 -0
  130. package/dist/secrets/credential-sets/vault.reseal-refused.js +36 -0
  131. package/dist/secrets/credential-sets/vault.service.d.ts +25 -5
  132. package/dist/secrets/credential-sets/vault.service.js +42 -8
  133. package/dist/secrets/index.d.ts +0 -3
  134. package/dist/secrets/index.js +5 -0
  135. package/dist/secrets/keyring.env.d.ts +1 -1
  136. package/dist/secrets/legacy-owner.d.ts +61 -0
  137. package/dist/secrets/legacy-owner.js +196 -0
  138. package/dist/secrets/root-key/decide.d.ts +89 -0
  139. package/dist/secrets/root-key/decide.js +60 -0
  140. package/dist/secrets/sealer-contract.d.ts +19 -0
  141. package/dist/secrets/sealer-contract.js +37 -0
  142. package/dist/secrets/secret-sealer.aesgcm.d.ts +1 -1
  143. package/dist/secrets/testing.d.ts +1 -0
  144. package/dist/secrets/testing.js +1 -0
  145. package/dist/shell.d.ts +4 -1
  146. package/dist/shell.js +1 -1
  147. package/dist/system.d.ts +6 -0
  148. package/dist/system.js +9 -0
  149. package/dist/terminal.d.ts +11 -96
  150. package/dist/terminal.js +80 -56
  151. package/dist/web/agent-tools.d.ts +107 -0
  152. package/dist/web/agent-tools.js +49 -0
  153. package/dist/web/index.d.ts +1 -0
  154. package/dist/web/index.js +1 -0
  155. package/package.json +39 -13
  156. package/dist/http/guarded/ports.d.ts +0 -56
  157. package/dist/http/guarded/types.d.ts +0 -8
  158. package/dist/http/guarded/types.js +0 -2
  159. package/dist/mail/email-sender.d.ts +0 -109
  160. package/dist/mail/email-sender.js +0 -10
  161. package/dist/net/endpoint-policy.d.ts +0 -39
  162. package/dist/net/endpoint-policy.js +0 -218
  163. package/dist/secrets/credential-sets/aad.d.ts +0 -7
  164. package/dist/secrets/credential-sets/aad.js +0 -7
  165. package/dist/secrets/credential-sets/repo.memory.d.ts +0 -44
  166. package/dist/secrets/credential-sets/repo.memory.js +0 -80
  167. package/dist/secrets/credential-sets/vault.types.d.ts +0 -27
  168. package/dist/secrets/credential-sets/vault.types.js +0 -49
  169. /package/dist/{http/guarded → mail/activity}/ports.js +0 -0
@@ -1,5 +1,6 @@
1
1
  export * from "../fs.js";
2
2
  export * from "./atomic-write.js";
3
+ export * from "./app-data-root.js";
3
4
  export * from "./env-text.js";
4
5
  export * from "./strict-containment.js";
5
6
  export * from "./guarded-reader.js";
@@ -14,4 +15,8 @@ export * from "./workspace-directory.js";
14
15
  export * from "./verified-directory-move.js";
15
16
  export * from "./reviewed-file.js";
16
17
  export { backupOriginalOnce } from './backup-once.js';
18
+ export * from "./directory-delete-guard.js";
19
+ export * from "./remove-directory-tree.js";
20
+ export * from "./directory-relocation.js";
21
+ export * from "./recent-directories.js";
17
22
  //# sourceMappingURL=index.d.ts.map
package/dist/fs/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  // Filesystem exports share atomic replacement and token/inode-owned lock primitives.
2
2
  export * from "../fs.js";
3
3
  export * from "./atomic-write.js";
4
+ export * from "./app-data-root.js";
4
5
  export * from "./env-text.js";
5
6
  export * from "./strict-containment.js";
6
7
  export * from "./guarded-reader.js";
@@ -15,4 +16,8 @@ export * from "./workspace-directory.js";
15
16
  export * from "./verified-directory-move.js";
16
17
  export * from "./reviewed-file.js";
17
18
  export { backupOriginalOnce } from './backup-once.js';
19
+ export * from "./directory-delete-guard.js";
20
+ export * from "./remove-directory-tree.js";
21
+ export * from "./directory-relocation.js";
22
+ export * from "./recent-directories.js";
18
23
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,46 @@
1
+ import type { DurableJsonFile, QuarantineNotice } from "./durable-json.js";
2
+ /**
3
+ * Read the persisted state, treating any unreadable or malformed file as "no state yet".
4
+ *
5
+ * Deliberately forgiving: this file holds a convenience list, and refusing to launch because a
6
+ * cache got truncated would trade a real failure for a cosmetic one. Unlike
7
+ * durable user records, nothing here is salvaged out of a damaged file: every dir this list holds is
8
+ * either already a tracked project or one folder-pick away, so recovering the cache would buy back
9
+ * the ordering of a menu, not anything the operator made.
10
+ *
11
+ * @complexity O(n) in file size.
12
+ */
13
+ export declare function readRecentDirectories({ file, field }: {
14
+ file: Pick<DurableJsonFile, "read">;
15
+ field: string;
16
+ }, { isEligible }?: {
17
+ isEligible?: (required: {
18
+ directory: string;
19
+ }) => boolean;
20
+ }): string[];
21
+ /**
22
+ * Move `directory` to the front of the MRU list, de-duplicated and capped.
23
+ *
24
+ * Runs inside the cross-process lock for this file, because several instances can be opening sites
25
+ * at once (the owner runs them on purpose) and two unlocked read-modify-writes lose whichever list
26
+ * was read before the other was written. One list shared by every window is the point of it: "Open
27
+ * Recent" should show what the operator opened, in whichever window they opened it.
28
+ *
29
+ * A damaged file is moved aside first, and the list starts over from this one dir — the policy that
30
+ * fits a cache, and deliberately NOT durable user records, which recover what they can because their
31
+ * file is the operator's own work. If it cannot be moved aside, nothing is written over it and the
32
+ * dir is simply not remembered: this runs after a site has already been created or opened, and
33
+ * failing that whole operation over an unwritable cache would be the cosmetic failure taking down
34
+ * the real one.
35
+ *
36
+ * @returns the new list, most-recent first — what was persisted, or what would have been.
37
+ * @complexity O(n) in the MRU length, plus the lock wait.
38
+ */
39
+ export declare function rememberRecentDirectory({ file, field, directory, maxEntries, notice }: {
40
+ file: Pick<DurableJsonFile, "read" | "write" | "quarantine" | "withLock">;
41
+ field: string;
42
+ directory: string;
43
+ maxEntries: number;
44
+ notice: QuarantineNotice;
45
+ }, _optional?: Record<string, never>): string[];
46
+ //# sourceMappingURL=recent-directories.d.ts.map
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Read the persisted state, treating any unreadable or malformed file as "no state yet".
3
+ *
4
+ * Deliberately forgiving: this file holds a convenience list, and refusing to launch because a
5
+ * cache got truncated would trade a real failure for a cosmetic one. Unlike
6
+ * durable user records, nothing here is salvaged out of a damaged file: every dir this list holds is
7
+ * either already a tracked project or one folder-pick away, so recovering the cache would buy back
8
+ * the ordering of a menu, not anything the operator made.
9
+ *
10
+ * @complexity O(n) in file size.
11
+ */
12
+ export function readRecentDirectories({ file, field }, { isEligible } = {}) {
13
+ const { directories } = readRecentDirectoriesState({ file, field });
14
+ return isEligible ? directories.filter((directory) => isEligible({ directory })) : directories;
15
+ }
16
+ /**
17
+ * {@link readRecentDirectories} plus the one fact a WRITER also needs: whether the file it is about to
18
+ * replace is damaged, and therefore must be moved aside rather than written over.
19
+ *
20
+ * @complexity O(n) in file size.
21
+ */
22
+ function readRecentDirectoriesState({ file, field }, _options = {}) {
23
+ const read = file.read({});
24
+ if (read.state === "missing")
25
+ return { directories: [], damaged: false };
26
+ const recent = (read.state === "ok" ? read.value : null);
27
+ if (!Array.isArray(recent?.[field]))
28
+ return { directories: [], damaged: true };
29
+ return { directories: recent[field].filter((entry) => typeof entry === "string"), damaged: false };
30
+ }
31
+ /**
32
+ * Move `directory` to the front of the MRU list, de-duplicated and capped.
33
+ *
34
+ * Runs inside the cross-process lock for this file, because several instances can be opening sites
35
+ * at once (the owner runs them on purpose) and two unlocked read-modify-writes lose whichever list
36
+ * was read before the other was written. One list shared by every window is the point of it: "Open
37
+ * Recent" should show what the operator opened, in whichever window they opened it.
38
+ *
39
+ * A damaged file is moved aside first, and the list starts over from this one dir — the policy that
40
+ * fits a cache, and deliberately NOT durable user records, which recover what they can because their
41
+ * file is the operator's own work. If it cannot be moved aside, nothing is written over it and the
42
+ * dir is simply not remembered: this runs after a site has already been created or opened, and
43
+ * failing that whole operation over an unwritable cache would be the cosmetic failure taking down
44
+ * the real one.
45
+ *
46
+ * @returns the new list, most-recent first — what was persisted, or what would have been.
47
+ * @complexity O(n) in the MRU length, plus the lock wait.
48
+ */
49
+ export function rememberRecentDirectory({ file, field, directory, maxEntries, notice }, _optional = {}) {
50
+ return file.withLock({ critical: () => {
51
+ const previous = readRecentDirectoriesState({ file, field });
52
+ const directories = [directory, ...previous.directories.filter((entry) => entry !== directory)].slice(0, maxEntries);
53
+ if (previous.damaged && !file.quarantine({ notice }))
54
+ return directories;
55
+ /**
56
+ * Replace the persisted state, atomically — a crash partway through leaves the previous file whole
57
+ * rather than a torn one that the next launch would read as an empty list and then persist as that
58
+ * (`durable-json.ts` for the full shape of that bug).
59
+ *
60
+ * A whole-value replace, so it takes no lock of its own; a caller that first READS this file holds
61
+ * the lock across both halves — see {@link rememberRecentDirectory}, the only one there is.
62
+ * @complexity O(n) in the MRU length.
63
+ */
64
+ file.write({ value: { [field]: directories } });
65
+ return directories;
66
+ } });
67
+ }
68
+ //# sourceMappingURL=recent-directories.js.map
@@ -0,0 +1,20 @@
1
+ import fs from 'node:fs';
2
+ export interface WritableTreePort {
3
+ lstatSync: (entry: string) => Pick<fs.Stats, 'mode' | 'isSymbolicLink' | 'isDirectory'>;
4
+ chmodSync: (entry: string, mode: number) => void;
5
+ readdirSync: (entry: string) => string[];
6
+ }
7
+ /** Immutable plugin packages need owner-write permission before unlinking their contents.
8
+ * Never follow links: a website may link to files outside the directory authorized for deletion. */
9
+ export declare function makeDirectoryTreeWritable({ root }: {
10
+ root: string;
11
+ }, { files }?: {
12
+ files?: WritableTreePort;
13
+ }): void;
14
+ export declare function removeDirectoryTree({ root }: {
15
+ root: string;
16
+ }, { files, remove }?: {
17
+ files?: WritableTreePort;
18
+ remove?: (entry: string) => Promise<void>;
19
+ }): Promise<void>;
20
+ //# sourceMappingURL=remove-directory-tree.d.ts.map
@@ -0,0 +1,28 @@
1
+ import fs from 'node:fs';
2
+ import fsp from 'node:fs/promises';
3
+ import path from 'node:path';
4
+ /** Immutable plugin packages need owner-write permission before unlinking their contents.
5
+ * Never follow links: a website may link to files outside the directory authorized for deletion. */
6
+ export function makeDirectoryTreeWritable({ root }, { files = fs } = {}) {
7
+ let stat;
8
+ try {
9
+ stat = files.lstatSync(root);
10
+ }
11
+ catch (error) {
12
+ if (error.code === 'ENOENT')
13
+ return;
14
+ throw error;
15
+ }
16
+ if (stat.isSymbolicLink())
17
+ return;
18
+ files.chmodSync(root, stat.mode | 0o200);
19
+ if (stat.isDirectory()) {
20
+ for (const child of files.readdirSync(root))
21
+ makeDirectoryTreeWritable({ root: path.join(root, child) }, { files });
22
+ }
23
+ }
24
+ export async function removeDirectoryTree({ root }, { files = fs, remove = (entry) => fsp.rm(entry, { recursive: true, force: true }) } = {}) {
25
+ makeDirectoryTreeWritable({ root }, { files });
26
+ await remove(root);
27
+ }
28
+ //# sourceMappingURL=remove-directory-tree.js.map
@@ -35,7 +35,7 @@ function windowsDirectories({ homeDir, appName, env, appDataDir, paths }, { wind
35
35
  }
36
36
  function xdgDirectories({ homeDir, appName, env, appDataDir, paths }, { readText }) {
37
37
  const userDirs = readText(paths.join(env.XDG_CONFIG_HOME ?? paths.join(homeDir, ".config"), "user-dirs.dirs"));
38
- const configured = /^XDG_DOCUMENTS_DIR="([^"\n]*)"/m.exec(userDirs ?? "")?.[1]?.replace(/\$HOME/g, homeDir);
38
+ const configured = /^XDG_DOCUMENTS_DIR="([^"\n]*)"/m.exec(userDirs ?? "")?.[1]?.replace(/\$HOME/g, () => homeDir);
39
39
  return { appData: appDataDir ?? paths.join(env.XDG_DATA_HOME ?? paths.join(homeDir, ".local", "share"), appName),
40
40
  documents: configured && paths.isAbsolute(configured) ? configured : paths.join(homeDir, "Documents") };
41
41
  }
@@ -45,7 +45,7 @@ export function readOptionalText({ file }, _options = {}) {
45
45
  return fs.readFileSync(file, "utf8");
46
46
  }
47
47
  catch (error) {
48
- return fallbackIfMissing(error, undefined);
48
+ return fallbackIfMissing({ error, fallback: undefined });
49
49
  }
50
50
  }
51
51
  function readWindowsDocuments() {
@@ -1,4 +1,5 @@
1
1
  import path from "node:path";
2
+ import { createConsoleLogger } from '@jini-ai/core/primitives';
2
3
  /** Shared selection policy for CLI/dev hosts. A registry ID disambiguates adopted paths;
3
4
  * a basename selects the home first. No initialized home site preserves the supplied fallback.
4
5
  * Hosts may probe availability to resolve an ambiguous name to its sole available directory.
@@ -7,7 +8,7 @@ import path from "node:path";
7
8
  * Offline records and explicit ID selection are preserved; probe failures propagate.
8
9
  * @complexity O(n log n) registered/child directories and validation probes.
9
10
  */
10
- export function selectWorkspaceDirectory({ home, entries, fallback, selected, roots = [home], listDirectories, isInitialized }, { isAvailable, report = ({ message }) => console.warn(message) } = {}) {
11
+ export function selectWorkspaceDirectory({ home, entries, fallback, selected, roots = [home], listDirectories, isInitialized }, { isAvailable, report = createConsoleLogger({ prefix: '' }).warn } = {}) {
11
12
  if (selected !== undefined) {
12
13
  const byId = entries.find((entry) => entry.id === selected);
13
14
  if (byId)
package/dist/fs.d.ts CHANGED
@@ -20,7 +20,10 @@ export type RemovePathBestEffortResult = {
20
20
  * @param target - The path to test for containment.
21
21
  * @returns `true` when `target` resolves to `root` or a descendant of it.
22
22
  */
23
- export declare function pathContains(root: string, target: string): boolean;
23
+ export declare function pathContains({ root, target }: {
24
+ root: string;
25
+ target: string;
26
+ }, _optional?: Record<string, never>): boolean;
24
27
  /**
25
28
  * Copy a file atomically by writing to a unique temp file in the destination
26
29
  * directory and renaming it into place, creating parent directories as needed.
@@ -33,7 +36,10 @@ export declare function pathContains(root: string, target: string): boolean;
33
36
  * @returns The bytes copied and whether an existing file was replaced.
34
37
  * @throws `EEXIST` when the destination exists and `overwrite` is not set.
35
38
  */
36
- export declare function atomicCopyFile(sourcePath: string, destinationPath: string, options?: AtomicCopyFileOptions): Promise<AtomicCopyFileResult>;
39
+ export declare function atomicCopyFile({ sourcePath, destinationPath }: {
40
+ sourcePath: string;
41
+ destinationPath: string;
42
+ }, options?: AtomicCopyFileOptions): Promise<AtomicCopyFileResult>;
37
43
  /**
38
44
  * Remove a path (recursively by default) without throwing, reporting success or
39
45
  * the failure message instead.
@@ -42,7 +48,9 @@ export declare function atomicCopyFile(sourcePath: string, destinationPath: stri
42
48
  * @param options - `recursive` to remove directory trees (default true).
43
49
  * @returns `{ removed: true }` on success, or `{ removed: false, error }` on failure.
44
50
  */
45
- export declare function removePathBestEffort(path: string, options?: RemovePathBestEffortOptions): Promise<RemovePathBestEffortResult>;
51
+ export declare function removePathBestEffort({ path }: {
52
+ path: string;
53
+ }, options?: RemovePathBestEffortOptions): Promise<RemovePathBestEffortResult>;
46
54
  /**
47
55
  * Read the last `maxLines` non-empty lines of a text file, returning an empty
48
56
  * array when the file is missing or unreadable.
@@ -51,5 +59,9 @@ export declare function removePathBestEffort(path: string, options?: RemovePathB
51
59
  * @param maxLines - The maximum number of trailing lines to return (default 80).
52
60
  * @returns The trailing non-empty lines (empty array on error).
53
61
  */
54
- export declare function readLogTail(filePath: string, maxLines?: number): Promise<string[]>;
62
+ export declare function readLogTail({ filePath }: {
63
+ filePath: string;
64
+ }, { maxLines }?: {
65
+ maxLines?: number | undefined;
66
+ }): Promise<string[]>;
55
67
  //# sourceMappingURL=fs.d.ts.map
package/dist/fs.js CHANGED
@@ -30,7 +30,7 @@ function errorMessage(error) {
30
30
  * @param target - The path to test for containment.
31
31
  * @returns `true` when `target` resolves to `root` or a descendant of it.
32
32
  */
33
- export function pathContains(root, target) {
33
+ export function pathContains({ root, target }, _optional = {}) {
34
34
  const resolvedRoot = resolve(root);
35
35
  const resolvedTarget = resolve(target);
36
36
  const rel = relative(resolvedRoot, resolvedTarget);
@@ -54,7 +54,7 @@ function destinationExistsError(destinationPath) {
54
54
  * @returns The bytes copied and whether an existing file was replaced.
55
55
  * @throws `EEXIST` when the destination exists and `overwrite` is not set.
56
56
  */
57
- export async function atomicCopyFile(sourcePath, destinationPath, options = {}) {
57
+ export async function atomicCopyFile({ sourcePath, destinationPath }, options = {}) {
58
58
  const source = resolve(sourcePath);
59
59
  const destination = resolve(destinationPath);
60
60
  if (source === destination) {
@@ -95,7 +95,7 @@ export async function atomicCopyFile(sourcePath, destinationPath, options = {})
95
95
  * @param options - `recursive` to remove directory trees (default true).
96
96
  * @returns `{ removed: true }` on success, or `{ removed: false, error }` on failure.
97
97
  */
98
- export async function removePathBestEffort(path, options = {}) {
98
+ export async function removePathBestEffort({ path }, options = {}) {
99
99
  try {
100
100
  await rm(path, { force: true, recursive: options.recursive ?? true });
101
101
  return { removed: true };
@@ -112,7 +112,7 @@ export async function removePathBestEffort(path, options = {}) {
112
112
  * @param maxLines - The maximum number of trailing lines to return (default 80).
113
113
  * @returns The trailing non-empty lines (empty array on error).
114
114
  */
115
- export async function readLogTail(filePath, maxLines = 80) {
115
+ export async function readLogTail({ filePath }, { maxLines = 80 } = {}) {
116
116
  try {
117
117
  const payload = await readFile(filePath, "utf8");
118
118
  return payload.split(/\r?\n/).filter((line) => line.length > 0).slice(-maxLines);
@@ -5,7 +5,9 @@
5
5
  * @param raw - The raw, possibly shorthand-prefixed path.
6
6
  * @returns The expanded path, or `raw` unchanged if it carried no shorthand.
7
7
  */
8
- export declare function expandHomePrefix(raw: string): string;
8
+ export declare function expandHomePrefix({ raw }: {
9
+ raw: string;
10
+ }, _optional?: Record<string, never>): string;
9
11
  /**
10
12
  * Expands a home-directory shorthand (see {@link expandHomePrefix}) and then
11
13
  * resolves the result against `projectRoot` if it is still relative.
@@ -14,5 +16,8 @@ export declare function expandHomePrefix(raw: string): string;
14
16
  * @param projectRoot - The root a relative `raw` is resolved against.
15
17
  * @returns An absolute path.
16
18
  */
17
- export declare function resolveProjectRelativePath(raw: string, projectRoot: string): string;
19
+ export declare function resolveProjectRelativePath({ raw, projectRoot }: {
20
+ raw: string;
21
+ projectRoot: string;
22
+ }, _optional?: Record<string, never>): string;
18
23
  //# sourceMappingURL=home-expansion.d.ts.map
@@ -30,7 +30,7 @@ const HOME_PREFIX_RE = /^(~|\$\{HOME\}|\$HOME)[/\\](.*)$/;
30
30
  * @param raw - The raw, possibly shorthand-prefixed path.
31
31
  * @returns The expanded path, or `raw` unchanged if it carried no shorthand.
32
32
  */
33
- export function expandHomePrefix(raw) {
33
+ export function expandHomePrefix({ raw }, _optional = {}) {
34
34
  const home = os.homedir();
35
35
  if (HOME_BARE_TOKENS.has(raw))
36
36
  return home;
@@ -51,8 +51,8 @@ export function expandHomePrefix(raw) {
51
51
  * @param projectRoot - The root a relative `raw` is resolved against.
52
52
  * @returns An absolute path.
53
53
  */
54
- export function resolveProjectRelativePath(raw, projectRoot) {
55
- const expanded = expandHomePrefix(raw);
54
+ export function resolveProjectRelativePath({ raw, projectRoot }, _optional = {}) {
55
+ const expanded = expandHomePrefix({ raw });
56
56
  return path.isAbsolute(expanded) ? expanded : path.resolve(projectRoot, expanded);
57
57
  }
58
58
  //# sourceMappingURL=home-expansion.js.map
@@ -1,7 +1,6 @@
1
1
  import { classifyIpAddress } from "../../net/address.js";
2
2
  import type { HttpClientPort } from "@jini-ai/core/primitives";
3
- import type { GuardedHttpRequired } from "./ports.js";
4
- export type { AddressClass } from "../../net/address.js";
3
+ import type { GuardedHttpRequired } from "@jini-ai/core/contracts/runtime";
5
4
  /** Uses the canonical net address validator; labels preserve the guarded refusal contract. */
6
5
  export declare const classifyAddress: typeof classifyIpAddress;
7
6
  /** Builds an adapter-friendly outbound port. Every hop is resolved, checked, and pinned before I/O.
@@ -1,6 +1,7 @@
1
1
  // Policy refusals use EgressRefusedError; DNS, connection and transport failures retain their
2
2
  // own errors because they are operational failures, not decisions that a different URL fixes.
3
- import { classifyIpAddress, isLoopbackHostname } from "../../net/address.js";
3
+ import { classifyIpAddress } from "../../net/address.js";
4
+ import { isLoopbackHostname } from "@jini-ai/core/net";
4
5
  import { effectivePort } from "../../core/effective-port.js";
5
6
  import { FetchTimeoutError } from "../../fetch-with-timeout.js";
6
7
  import { isIP } from "node:net";
@@ -1,12 +1,9 @@
1
1
  export { createHttpClient, classifyAddress } from "./client.js";
2
- export type { AddressClass } from "./client.js";
3
2
  export { EgressRefusedError } from "./errors.js";
4
3
  export { FetchHttpTransportAdapter } from "./transport.fetch.js";
5
4
  export { createNodeGuardedHttpPorts } from "./node-ports.js";
6
5
  export { guardedFetch } from "./fetch-adapter.js";
7
6
  export type { GuardedFetchOptions } from "./fetch-adapter.js";
8
- export type * from "./types.js";
9
- export type * from "./ports.js";
10
7
  export { defaultPlatformMessages } from "../../messages.js";
11
8
  export type { PlatformMessages } from "../../messages.js";
12
9
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { GuardedClock, DnsResolver, PinnedHttpTransport } from "./ports.js";
1
+ import type { GuardedClock, DnsResolver, PinnedHttpTransport } from "@jini-ai/core/contracts/runtime";
2
2
  /** Constructs native effect ports without resolving or connecting to any destination. */
3
3
  export declare function createNodeGuardedHttpPorts(_required: Record<string, never>): {
4
4
  dns: DnsResolver;
@@ -1,8 +1,7 @@
1
1
  import { type ClientRequest, type IncomingMessage } from "node:http";
2
2
  import { type RequestOptions } from "node:https";
3
3
  import type { HttpRequest, HttpResponse } from "@jini-ai/core/primitives";
4
- import type { PinnedPeer } from "./types.js";
5
- import type { HttpTransportAdapter } from "./ports.js";
4
+ import type { PinnedPeer, PinnedHttpTransport } from "@jini-ai/core/contracts/runtime";
6
5
  /** Native request effect port; peer pinning and TLS options remain owned by this adapter. */
7
6
  export interface NativeHttpTransportOptions {
8
7
  /** Like node:http, invoke onResponse asynchronously, after returning the request handle. */
@@ -12,7 +11,7 @@ export interface NativeHttpTransportOptions {
12
11
  onResponse: (response: IncomingMessage) => void;
13
12
  }, optional?: Record<string, never>) => ClientRequest;
14
13
  }
15
- export declare class FetchHttpTransportAdapter implements HttpTransportAdapter {
14
+ export declare class FetchHttpTransportAdapter implements PinnedHttpTransport {
16
15
  private readonly optional;
17
16
  constructor(_required: Record<string, never>, optional?: NativeHttpTransportOptions);
18
17
  requestPinned({ request: req, peer }: {
@@ -10,6 +10,68 @@ import { createBrotliDecompress, createGunzip, createInflate } from "node:zlib";
10
10
  */
11
11
  /** Decoded-byte bound when the caller has not supplied its own response policy. */
12
12
  const DEFAULT_MAX_BYTES = 100 * 1024 * 1024;
13
+ /** Request options that pin the connection to the vetted peer while keeping the caller's Host header. */
14
+ function buildPinnedRequestOptions({ req, peer, url, isHttps, idleTimeoutMs }) {
15
+ return {
16
+ method: req.method,
17
+ host: peer.ip,
18
+ port: peer.port,
19
+ path: `${url.pathname}${url.search}`,
20
+ headers: { ...req.headers, host: peer.authority },
21
+ // Node's timeout is per-socket inactivity, including the response body. Do not
22
+ // replace it with a timer over total transfer time: active large bodies can be slow.
23
+ timeout: idleTimeoutMs,
24
+ ...(req.signal ? { signal: req.signal } : {}),
25
+ // RFC 6066 forbids IP-literal SNI. Omit the option entirely when no hostname is supplied.
26
+ ...(isHttps && peer.tlsServerName ? { servername: peer.tlsServerName } : {}),
27
+ };
28
+ }
29
+ /** Read a (possibly compressed) pinned response into memory, enforcing the size cap; settles exactly once. */
30
+ function collectPinnedResponse({ req, res, clientRequest, resolve, reject }) {
31
+ // HEAD can advertise GET's compression but has no body to decompress.
32
+ const decoded = req.method === "HEAD" ? res : decodeBody(res.headers["content-encoding"], res);
33
+ const chunks = [];
34
+ let totalBytes = 0;
35
+ let settled = false;
36
+ const finish = (truncated) => {
37
+ if (settled)
38
+ return;
39
+ settled = true;
40
+ // Concatenate once: text is a lossy UTF-8 view, while binary consumers retain the same
41
+ // undecoded bytes. Buffer is a Uint8Array, so returning it needs no second byte copy.
42
+ const body = Buffer.concat(chunks);
43
+ chunks.length = 0;
44
+ resolve({
45
+ status: res.statusCode ?? 0,
46
+ headers: flattenHeaders(res.headers),
47
+ setCookies: res.headers["set-cookie"] ?? [],
48
+ bodyText: req.bodyAs === "bytes" ? "" : body.toString("utf8"), bodyBytes: body,
49
+ ...(truncated ? { bodyTruncated: true, bodyBytesTruncated: true } : {}),
50
+ });
51
+ };
52
+ const cap = req.maxResponseBytes ?? DEFAULT_MAX_BYTES;
53
+ decoded.on("data", (chunk) => {
54
+ if (settled)
55
+ return;
56
+ const remaining = cap - totalBytes;
57
+ if (chunk.length > remaining) {
58
+ if (req.maxResponseBytes === undefined) {
59
+ clientRequest().destroy(new Error("response exceeded the absolute size ceiling"));
60
+ return;
61
+ }
62
+ chunks.push(chunk.subarray(0, remaining));
63
+ finish(true);
64
+ decoded.destroy?.();
65
+ res.destroy();
66
+ clientRequest().destroy();
67
+ return;
68
+ }
69
+ totalBytes += chunk.length;
70
+ chunks.push(chunk);
71
+ });
72
+ decoded.on("end", () => finish(false));
73
+ decoded.on("error", reject);
74
+ }
13
75
  export class FetchHttpTransportAdapter {
14
76
  optional;
15
77
  constructor(_required, optional = {}) {
@@ -20,65 +82,9 @@ export class FetchHttpTransportAdapter {
20
82
  const isHttps = url.protocol === "https:";
21
83
  const requestFn = isHttps ? httpsRequest : httpRequest;
22
84
  const idleTimeoutMs = req.idleTimeoutMs ?? req.timeoutMs;
23
- const options = {
24
- method: req.method,
25
- host: peer.ip,
26
- port: peer.port,
27
- path: `${url.pathname}${url.search}`,
28
- headers: { ...req.headers, host: peer.authority },
29
- // Node's timeout is per-socket inactivity, including the response body. Do not
30
- // replace it with a timer over total transfer time: active large bodies can be slow.
31
- timeout: idleTimeoutMs,
32
- ...(req.signal ? { signal: req.signal } : {}),
33
- // RFC 6066 forbids IP-literal SNI. Omit the option entirely when no hostname is supplied.
34
- ...(isHttps && peer.tlsServerName ? { servername: peer.tlsServerName } : {}),
35
- };
85
+ const options = buildPinnedRequestOptions({ req, peer, url, isHttps, idleTimeoutMs });
36
86
  return new Promise((resolve, reject) => {
37
- const onResponse = (res) => {
38
- // HEAD can advertise GET's compression but has no body to decompress.
39
- const decoded = req.method === "HEAD" ? res : decodeBody(res.headers["content-encoding"], res);
40
- const chunks = [];
41
- let totalBytes = 0;
42
- let settled = false;
43
- const finish = (truncated) => {
44
- if (settled)
45
- return;
46
- settled = true;
47
- // Concatenate once: text is a lossy UTF-8 view, while binary consumers retain the same
48
- // undecoded bytes. Buffer is a Uint8Array, so returning it needs no second byte copy.
49
- const body = Buffer.concat(chunks);
50
- chunks.length = 0;
51
- resolve({
52
- status: res.statusCode ?? 0,
53
- headers: flattenHeaders(res.headers),
54
- setCookies: res.headers["set-cookie"] ?? [],
55
- bodyText: req.bodyAs === "bytes" ? "" : body.toString("utf8"), bodyBytes: body,
56
- ...(truncated ? { bodyTruncated: true, bodyBytesTruncated: true } : {}),
57
- });
58
- };
59
- const cap = req.maxResponseBytes ?? DEFAULT_MAX_BYTES;
60
- decoded.on("data", (chunk) => {
61
- if (settled)
62
- return;
63
- const remaining = cap - totalBytes;
64
- if (chunk.length > remaining) {
65
- if (req.maxResponseBytes === undefined) {
66
- clientRequest.destroy(new Error("response exceeded the absolute size ceiling"));
67
- return;
68
- }
69
- chunks.push(chunk.subarray(0, remaining));
70
- finish(true);
71
- decoded.destroy?.();
72
- res.destroy();
73
- clientRequest.destroy();
74
- return;
75
- }
76
- totalBytes += chunk.length;
77
- chunks.push(chunk);
78
- });
79
- decoded.on("end", () => finish(false));
80
- decoded.on("error", reject);
81
- };
87
+ const onResponse = (res) => collectPinnedResponse({ req, res, clientRequest: () => clientRequest, resolve, reject });
82
88
  const clientRequest = this.optional.request
83
89
  ? this.optional.request({ secure: isHttps, options, onResponse }, {})
84
90
  : requestFn(options, onResponse);
package/dist/http.d.ts CHANGED
@@ -17,5 +17,7 @@ export type HttpWaitOptions = {
17
17
  * @returns `true` once an OK response is received.
18
18
  * @throws When the timeout elapses without an OK response (message includes the last error).
19
19
  */
20
- export declare function waitForHttpOk(url: string, { timeoutMs, probe }?: HttpWaitOptions): Promise<true>;
20
+ export declare function waitForHttpOk({ url }: {
21
+ url: string;
22
+ }, { timeoutMs, probe }?: HttpWaitOptions): Promise<true>;
21
23
  //# sourceMappingURL=http.d.ts.map
package/dist/http.js CHANGED
@@ -13,7 +13,7 @@ import { fetchWithTimeout } from "./fetch-with-timeout.js";
13
13
  async function requestHttpOk({ url, timeoutMs }, { probe } = {}) {
14
14
  if (probe)
15
15
  return probe({ url, timeoutMs });
16
- const response = await fetchWithTimeout(url, { cache: "no-store" }, { timeoutMs });
16
+ const response = await fetchWithTimeout({ url, timeoutMs }, { init: { cache: "no-store" } });
17
17
  if (!response.ok)
18
18
  throw new Error(`HTTP ${response.status} from ${url}`);
19
19
  return true;
@@ -31,7 +31,7 @@ function errorMessage(error) {
31
31
  * @returns `true` once an OK response is received.
32
32
  * @throws When the timeout elapses without an OK response (message includes the last error).
33
33
  */
34
- export async function waitForHttpOk(url, { timeoutMs = 20000, probe } = {}) {
34
+ export async function waitForHttpOk({ url }, { timeoutMs = 20000, probe } = {}) {
35
35
  const startedAt = Date.now();
36
36
  let lastError = null;
37
37
  while (Date.now() - startedAt < timeoutMs) {
package/dist/index.d.ts CHANGED
@@ -31,19 +31,17 @@
31
31
  * configuration/credentials explicitly instead of inheriting product-prefixed environment names.
32
32
  * Filesystem/network storage and its SigV4 signing belong here, with no kernel SQL-port dependency.
33
33
  */
34
- export type { CommandInvocation, CommandInvocationRequest } from "./command.js";
35
34
  export { createCommandInvocation, createPackageManagerInvocation } from "./command.js";
36
- export { omitEnvironmentKeys } from "./child-environment.js";
37
35
  export type { ResolveSystemProxyEnvOptions, SystemProxyCommandRunner } from "./proxy-env.js";
38
36
  export { mergeProxyAwareEnv, parseMacosScutilProxyOutput, parseWindowsInternetSettingsProxyOutput, resolveSystemProxyEnv, } from "./proxy-env.js";
39
- export type { ProcessUsage, ProcessUsagePorts, ProcessUsageOptions, ProcessSnapshot, ProcessStampContract, ProcessStampField, ProcessStampShape, SpawnProcessRequest, StampedProcessMatchCriteria, StopProcessesResult, } from "./process.js";
40
- export { collectProcessTreePids, createProcessStampArgs, isProcessAlive, listProcessSnapshots, listProcessUsage, matchesProcessStamp, matchesStampedProcess, readFlagValue, readProcessStamp, readProcessStampFromCommand, spawnBackgroundProcess, spawnLoggedProcess, stopProcesses, waitForProcessExit, } from "./process.js";
37
+ export type { ProcessUsage, ProcessUsagePorts, ProcessUsageOptions, ProcessStampContract, ProcessStampField, ProcessStampShape, SpawnProcessRequest, StampedProcessMatchCriteria, } from "./process.js";
38
+ export { createProcessStampArgs, isProcessAlive, listProcessSnapshots, listProcessUsage, matchesProcessStamp, matchesStampedProcess, readFlagValue, readProcessStamp, readProcessStampFromCommand, spawnBackgroundProcess, spawnLoggedProcess, stopProcesses, waitForProcessExit, } from "./process.js";
41
39
  export type { AtomicCopyFileOptions, AtomicCopyFileResult, RemovePathBestEffortOptions, RemovePathBestEffortResult, } from "./fs.js";
42
40
  export { atomicCopyFile, pathContains, readLogTail, removePathBestEffort } from "./fs.js";
43
41
  export type { HttpWaitOptions } from "./http.js";
44
42
  export { waitForHttpOk } from "./http.js";
45
43
  export type { DeadlineSignalOptions, FetchWithTimeoutOptions } from "./fetch-with-timeout.js";
46
- export { FETCH_TIMEOUT_MS, FetchTimeoutError, ResponseLimitExceededError, createDeadlineSignal, fetchWithTimeout } from "./fetch-with-timeout.js";
44
+ export { FetchTimeoutError, ResponseLimitExceededError, createDeadlineSignal, fetchWithTimeout } from "./fetch-with-timeout.js";
47
45
  export type { WellKnownUserToolchainOptions } from "./toolchain.js";
48
46
  export { wellKnownUserToolchainBins } from "./toolchain.js";
49
47
  export type { BufferedCommandResult } from "./shell.js";
@@ -55,14 +53,15 @@ export type { SandboxEnvConfig, SandboxRuntimeConfig, SandboxRuntimeRoots } from
55
53
  export { applySandboxRuntimeEnv, ensureSandboxRuntimeDirs, isSandboxImportedProjectRootAllowed, isSandboxModeEnabled, resolveSandboxRuntimeConfig, resolveSandboxRuntimeConfigFromEnv, sandboxAgentProfilesConfigPath, sandboxImportAllowedRoots, sandboxImportedProjectRootUnavailableReason, } from "./sandbox-env.js";
56
54
  export type { ResolveDaemonPluginPreviewsDirOptions, ResolveDaemonResourceRootOptions, ResolveDataDirOptions, ResourcePathsConfig, } from "./resource-paths.js";
57
55
  export { resolveDaemonCliPath, resolveDaemonPluginPreviewsDir, resolveDaemonResourceDir, resolveDaemonResourceRoot, resolveDataDir, resolveProcessResourcesPath, } from "./resource-paths.js";
58
- export type { CreateTerminalOptions, CreateTerminalServiceOptions, PtyProcess, PtySpawn, PtySpawnOptions, TerminalEventData, TerminalEventRecord, TerminalService, TerminalSession, TerminalSseSink, } from "./terminal.js";
59
- export { createTerminalService, ensureSpawnHelperExecutable, resolveShell, spawnHelperCandidatePaths } from "./terminal.js";
60
- export type { DownloadCopyAndClearOptions, DownloadCopyAndClearResult, ManagedDownloadChecksum, ManagedDownloadErrorCode, ManagedDownloadInspection, ManagedDownloadOptions, ManagedDownloadPayload, ManagedDownloadProgress, ManagedDownloadResult, PruneManagedDownloadsOptions, PruneManagedDownloadsResult, RemoveManagedDownloadOptions, RemoveManagedDownloadResult, } from "./download.js";
61
- export { MANAGED_DOWNLOAD_ERROR_CODES, ManagedDownloadError, downloadCopyAndClear, inspectManagedDownload, managedDownload, pruneManagedDownloads, removeManagedDownload, } from "./download.js";
56
+ export { createTerminalService, ensureSpawnHelperExecutable, resolveShell, spawnHelperCandidatePaths, terminalSessionState } from "./terminal.js";
57
+ export type { DownloadCopyAndClearOptions, DownloadCopyAndClearResult, ManagedDownloadChecksum, ManagedDownloadErrorCode, ManagedDownloadInspection, ManagedDownloadOptions, ManagedDownloadPayload, ManagedDownloadProgress, ManagedDownloadResult, PruneManagedDownloadsOptions, PruneManagedDownloadsResult, RemoveManagedDownloadOptions, RemoveManagedDownloadResult } from "./download-types.js";
58
+ export { MANAGED_DOWNLOAD_ERROR_CODES, ManagedDownloadError } from "./download-types.js";
59
+ export { downloadCopyAndClear, managedDownload } from "./download.js";
60
+ export { inspectManagedDownload, pruneManagedDownloads, removeManagedDownload } from "./download-maintenance.js";
62
61
  export type { SigV4Credentials, SignSigV4Input, SignSigV4Result } from "./aws-sigv4.js";
63
62
  export { encodeS3PathSegment, signSigV4 } from "./aws-sigv4.js";
64
- export type { BlobFileMeta, BlobStorage, S3BlobStorageOptions } from "./blob-storage.js";
65
- export { LocalBlobStorage, S3BlobStorage, StorageError } from "./blob-storage.js";
63
+ export type { S3BlobStorageOptions } from "./blob-storage.js";
64
+ export { LocalBlobStorage, S3BlobStorage } from "./blob-storage.js";
66
65
  export * as filesystem from "./fs/index.js";
67
66
  export * as guardedHttp from "./http/guarded/index.js";
68
67
  export * as mail from "./mail/index.js";