@fungi.computer/truffle 0.0.0-stage → 0.2.0

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 (207) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +542 -2
  3. package/computerd-loopback.cjs +16 -0
  4. package/dist/auth-cli.d.ts +46 -0
  5. package/dist/auth-cli.js +373 -0
  6. package/dist/fungi-account-command.d.ts +18 -0
  7. package/dist/fungi-account-command.js +95 -0
  8. package/dist/index.d.ts +27 -0
  9. package/dist/index.js +23 -0
  10. package/dist/internal/image-fit-metafile.json +106 -0
  11. package/dist/internal/local-image-fit-worker.mjs +960 -0
  12. package/dist/internal/private-workerd-sandbox-worker.mjs +27487 -0
  13. package/dist/internal/sandbox-metafile.json +6726 -0
  14. package/dist/linear-auth.d.ts +4 -0
  15. package/dist/linear-auth.js +72 -0
  16. package/dist/local-archive-handoff.d.ts +12 -0
  17. package/dist/local-archive-handoff.js +21 -0
  18. package/dist/local-extensions.d.ts +143 -0
  19. package/dist/local-extensions.js +624 -0
  20. package/dist/local-image-fit.d.ts +30 -0
  21. package/dist/local-image-fit.js +105 -0
  22. package/dist/local-login.d.ts +55 -0
  23. package/dist/local-login.js +167 -0
  24. package/dist/local-models.d.ts +16 -0
  25. package/dist/local-models.js +82 -0
  26. package/dist/local-session-archives.d.ts +8 -0
  27. package/dist/local-session-archives.js +152 -0
  28. package/dist/local-skill-source.d.ts +21 -0
  29. package/dist/local-skill-source.js +433 -0
  30. package/dist/log-event.d.ts +9 -0
  31. package/dist/log-event.js +13 -0
  32. package/dist/private-bounded-response.d.ts +2 -0
  33. package/dist/private-bounded-response.js +41 -0
  34. package/dist/private-bun-shiitake-host.d.ts +11 -0
  35. package/dist/private-bun-shiitake-host.js +66 -0
  36. package/dist/private-file-credential-store.d.ts +58 -0
  37. package/dist/private-file-credential-store.js +331 -0
  38. package/dist/private-files-patch.d.ts +4 -0
  39. package/dist/private-files-patch.js +104 -0
  40. package/dist/private-fungi-account.d.ts +252 -0
  41. package/dist/private-fungi-account.js +1329 -0
  42. package/dist/private-fungi-auth-error.d.ts +5 -0
  43. package/dist/private-fungi-auth-error.js +7 -0
  44. package/dist/private-fungi-mcp-connection.d.ts +26 -0
  45. package/dist/private-fungi-mcp-connection.js +162 -0
  46. package/dist/private-fungi-mcp-endpoint.d.ts +2 -0
  47. package/dist/private-fungi-mcp-endpoint.js +15 -0
  48. package/dist/private-fungi-mcp-selection-schema.d.ts +7 -0
  49. package/dist/private-fungi-mcp-selection-schema.js +15 -0
  50. package/dist/private-fungi-mcp-selection.d.ts +14 -0
  51. package/dist/private-fungi-mcp-selection.js +49 -0
  52. package/dist/private-fungi-model-api.d.ts +6 -0
  53. package/dist/private-fungi-model-api.js +125 -0
  54. package/dist/private-fungi-model-catalog.d.ts +16 -0
  55. package/dist/private-fungi-model-catalog.js +86 -0
  56. package/dist/private-fungi-model-provider.d.ts +6 -0
  57. package/dist/private-fungi-model-provider.js +51 -0
  58. package/dist/private-fungi-pending-logouts.d.ts +34 -0
  59. package/dist/private-fungi-pending-logouts.js +135 -0
  60. package/dist/private-fungi-service-logout.d.ts +44 -0
  61. package/dist/private-fungi-service-logout.js +59 -0
  62. package/dist/private-invocation-computer.d.ts +58 -0
  63. package/dist/private-invocation-computer.js +498 -0
  64. package/dist/private-invocation-files.d.ts +30 -0
  65. package/dist/private-invocation-files.js +520 -0
  66. package/dist/private-local-acp-stdio.d.ts +17 -0
  67. package/dist/private-local-acp-stdio.js +145 -0
  68. package/dist/private-local-admission-gate.d.ts +14 -0
  69. package/dist/private-local-admission-gate.js +52 -0
  70. package/dist/private-local-agent-control.d.ts +101 -0
  71. package/dist/private-local-agent-control.js +30 -0
  72. package/dist/private-local-agent-default-model.d.ts +12 -0
  73. package/dist/private-local-agent-default-model.js +31 -0
  74. package/dist/private-local-auth-rpc.d.ts +129 -0
  75. package/dist/private-local-auth-rpc.js +396 -0
  76. package/dist/private-local-bwrap.d.ts +13 -0
  77. package/dist/private-local-bwrap.js +70 -0
  78. package/dist/private-local-client-version.d.ts +5 -0
  79. package/dist/private-local-client-version.js +43 -0
  80. package/dist/private-local-computer-attach.d.ts +49 -0
  81. package/dist/private-local-computer-attach.js +230 -0
  82. package/dist/private-local-computer-backend.d.ts +282 -0
  83. package/dist/private-local-computer-backend.js +402 -0
  84. package/dist/private-local-computer-processes.d.ts +202 -0
  85. package/dist/private-local-computer-processes.js +613 -0
  86. package/dist/private-local-config-root.d.ts +21 -0
  87. package/dist/private-local-config-root.js +19 -0
  88. package/dist/private-local-containment.d.ts +51 -0
  89. package/dist/private-local-containment.js +161 -0
  90. package/dist/private-local-default-model.d.ts +11 -0
  91. package/dist/private-local-default-model.js +45 -0
  92. package/dist/private-local-delegation.d.ts +36 -0
  93. package/dist/private-local-delegation.js +133 -0
  94. package/dist/private-local-effective-model.d.ts +27 -0
  95. package/dist/private-local-effective-model.js +17 -0
  96. package/dist/private-local-exec-environment.d.ts +16 -0
  97. package/dist/private-local-exec-environment.js +11 -0
  98. package/dist/private-local-exec-launch.d.ts +41 -0
  99. package/dist/private-local-exec-launch.js +51 -0
  100. package/dist/private-local-exec-path.d.ts +6 -0
  101. package/dist/private-local-exec-path.js +40 -0
  102. package/dist/private-local-git-exclude.d.ts +2 -0
  103. package/dist/private-local-git-exclude.js +33 -0
  104. package/dist/private-local-http-dispatch.d.ts +5 -0
  105. package/dist/private-local-http-dispatch.js +14 -0
  106. package/dist/private-local-linux-sandbox.d.ts +8 -0
  107. package/dist/private-local-linux-sandbox.js +67 -0
  108. package/dist/private-local-mail.d.ts +13 -0
  109. package/dist/private-local-mail.js +77 -0
  110. package/dist/private-local-mesh-enrollment.d.ts +34 -0
  111. package/dist/private-local-mesh-enrollment.js +188 -0
  112. package/dist/private-local-mesh-links.d.ts +21 -0
  113. package/dist/private-local-mesh-links.js +229 -0
  114. package/dist/private-local-mesh-record.d.ts +120 -0
  115. package/dist/private-local-mesh-record.js +55 -0
  116. package/dist/private-local-process-identity.d.ts +20 -0
  117. package/dist/private-local-process-identity.js +40 -0
  118. package/dist/private-local-runtime-host.d.ts +192 -0
  119. package/dist/private-local-runtime-host.js +1177 -0
  120. package/dist/private-local-sandbox-policy.d.ts +21 -0
  121. package/dist/private-local-sandbox-policy.js +121 -0
  122. package/dist/private-local-sandbox.d.ts +37 -0
  123. package/dist/private-local-sandbox.js +114 -0
  124. package/dist/private-local-seatbelt.d.ts +24 -0
  125. package/dist/private-local-seatbelt.js +68 -0
  126. package/dist/private-local-service-contract.d.ts +170 -0
  127. package/dist/private-local-service-contract.js +1 -0
  128. package/dist/private-local-service-discovery.d.ts +217 -0
  129. package/dist/private-local-service-discovery.js +322 -0
  130. package/dist/private-local-service-ids.d.ts +3 -0
  131. package/dist/private-local-service-ids.js +8 -0
  132. package/dist/private-local-service-lease.d.ts +16 -0
  133. package/dist/private-local-service-lease.js +105 -0
  134. package/dist/private-local-service-listener.d.ts +22 -0
  135. package/dist/private-local-service-listener.js +407 -0
  136. package/dist/private-local-service-log.d.ts +128 -0
  137. package/dist/private-local-service-log.js +321 -0
  138. package/dist/private-local-service-owner.d.ts +135 -0
  139. package/dist/private-local-service-owner.js +1369 -0
  140. package/dist/private-local-service-process.d.ts +1 -0
  141. package/dist/private-local-service-process.js +8 -0
  142. package/dist/private-local-service-termination.d.ts +7 -0
  143. package/dist/private-local-service-termination.js +67 -0
  144. package/dist/private-local-service.d.ts +46 -0
  145. package/dist/private-local-service.js +606 -0
  146. package/dist/private-local-session-discovery.d.ts +66 -0
  147. package/dist/private-local-session-discovery.js +278 -0
  148. package/dist/private-local-shiitake-host.d.ts +44 -0
  149. package/dist/private-local-shiitake-host.js +143 -0
  150. package/dist/private-local-startup-model.d.ts +51 -0
  151. package/dist/private-local-startup-model.js +86 -0
  152. package/dist/private-local-stop-all.d.ts +27 -0
  153. package/dist/private-local-stop-all.js +26 -0
  154. package/dist/private-local-ui-attachment.d.ts +19 -0
  155. package/dist/private-local-ui-attachment.js +71 -0
  156. package/dist/private-local-worker-server.d.ts +16 -0
  157. package/dist/private-local-worker-server.js +144 -0
  158. package/dist/private-mcp-form-contract.d.ts +186 -0
  159. package/dist/private-mcp-form-contract.js +53 -0
  160. package/dist/private-mcp-form-elicitation.d.ts +18 -0
  161. package/dist/private-mcp-form-elicitation.js +97 -0
  162. package/dist/private-mcp-form-session.d.ts +172 -0
  163. package/dist/private-mcp-form-session.js +148 -0
  164. package/dist/private-openai-claims.d.ts +30 -0
  165. package/dist/private-openai-claims.js +69 -0
  166. package/dist/private-oyster-mcp-auth.d.ts +13 -0
  167. package/dist/private-oyster-mcp-auth.js +57 -0
  168. package/dist/private-provider-rejection.d.ts +15 -0
  169. package/dist/private-provider-rejection.js +24 -0
  170. package/dist/private-sqlite-owner.d.ts +39 -0
  171. package/dist/private-sqlite-owner.js +169 -0
  172. package/dist/private-team-computers.d.ts +38 -0
  173. package/dist/private-team-computers.js +110 -0
  174. package/dist/private-workerd-sandbox.d.ts +3 -0
  175. package/dist/private-workerd-sandbox.js +347 -0
  176. package/dist/seatbelt/safe-base.sbpl +79 -0
  177. package/dist/subscription-activation.d.ts +9 -0
  178. package/dist/subscription-activation.js +62 -0
  179. package/dist/subscription-identity.d.ts +23 -0
  180. package/dist/subscription-identity.js +124 -0
  181. package/dist/subscription-turn.d.ts +17 -0
  182. package/dist/subscription-turn.js +143 -0
  183. package/dist/team-apps.d.ts +24 -0
  184. package/dist/team-apps.js +128 -0
  185. package/dist/tracker-git-credential.d.ts +15 -0
  186. package/dist/tracker-git-credential.js +87 -0
  187. package/native/bin/LICENSE.bubblewrap +502 -0
  188. package/native/bin/LICENSE.libcap +112 -0
  189. package/native/bin/LICENSE.sandbox-runtime +201 -0
  190. package/native/bin/SOURCE.bubblewrap.tar.xz +0 -0
  191. package/native/bin/build.json +4037 -0
  192. package/native/bin/bwrap-build-source/Dockerfile +48 -0
  193. package/native/bin/bwrap-build-source/README.md +96 -0
  194. package/native/bin/bwrap-build-source/build.mjs +52 -0
  195. package/native/bin/bwrap-build-source/linux-arm64.ini +14 -0
  196. package/native/bin/bwrap-build-source/pin.mjs +21 -0
  197. package/native/bin/bwrap-build-source/record.mjs +74 -0
  198. package/native/bin/bwrap-build-source/vendor/LICENSE.sandbox-runtime +201 -0
  199. package/native/bin/bwrap-build-source/vendor/README.md +23 -0
  200. package/native/bin/bwrap-build-source/vendor/seccomp-unix-block.c +280 -0
  201. package/native/bin/bwrap-build.json +44 -0
  202. package/native/bin/fungi-apply-patch +0 -0
  203. package/native/bin/fungi-bwrap +0 -0
  204. package/native/bin/fungi-bwrap.sha256 +1 -0
  205. package/native/bin/fungi-seccomp.bpf +0 -0
  206. package/native/bin/fungi-seccomp.bpf.sha256 +1 -0
  207. package/package.json +161 -3
@@ -0,0 +1,4 @@
1
+ import { Cli } from "@fungi.computer/lantern";
2
+ import type { AuthInteraction } from "@earendil-works/pi-ai";
3
+ /** Pi owns provider flows and credentials; Clack owns only their presentation. */
4
+ export declare function linearAuthInteraction(interactive: boolean, cli?: Cli): AuthInteraction;
@@ -0,0 +1,72 @@
1
+ import { Cli, isCancel, } from "@fungi.computer/lantern";
2
+ const defaultAuthUrlInstructions = "Waiting for the browser… If it doesn't return, paste the final redirect URL here.";
3
+ /** Pi owns provider flows and credentials; Clack owns only their presentation. */
4
+ export function linearAuthInteraction(interactive, cli = new Cli({ brand: "fungi-local-auth", interactive })) {
5
+ return {
6
+ async prompt(prompt) {
7
+ if (!interactive)
8
+ throw new Error("This choice needs an interactive terminal; pass --provider <id> instead. No credentials were changed.");
9
+ const options = {
10
+ message: prompt.message,
11
+ };
12
+ if (prompt.signal !== undefined)
13
+ options.signal = prompt.signal;
14
+ let answer;
15
+ if (prompt.type === "select") {
16
+ answer = await cli.select({
17
+ ...options,
18
+ options: prompt.options.map((option) => {
19
+ const choice = {
20
+ value: option.id,
21
+ label: option.label,
22
+ };
23
+ if (option.description !== undefined)
24
+ choice.hint = option.description;
25
+ return choice;
26
+ }),
27
+ });
28
+ }
29
+ else if (prompt.type === "secret" || prompt.type === "manual_code") {
30
+ answer = await cli.password(options);
31
+ }
32
+ else {
33
+ const textOptions = { ...options };
34
+ if (prompt.placeholder !== undefined)
35
+ textOptions.placeholder = prompt.placeholder;
36
+ answer = await cli.text(textOptions);
37
+ }
38
+ if (isCancel(answer))
39
+ throw new Error("Login cancelled.");
40
+ return answer;
41
+ },
42
+ notify(event) {
43
+ switch (event.type) {
44
+ case "auth_url": {
45
+ const heading = event.providerLabel === undefined
46
+ ? "Sign in"
47
+ : `Sign in to ${event.providerLabel}`;
48
+ // The hyperlink line carries the whole URL in its OSC 8 escape; the
49
+ // URL itself follows as one framed, unbroken line for copying.
50
+ cli.info(heading);
51
+ cli.info(cli.link("Open sign-in page", event.url));
52
+ cli.url(event.url);
53
+ cli.info(event.instructions === undefined
54
+ ? defaultAuthUrlInstructions
55
+ : `Waiting for the browser… ${event.instructions}`);
56
+ break;
57
+ }
58
+ case "device_code":
59
+ cli.info(`Open ${event.verificationUri}\nEnter code: ${event.userCode}`);
60
+ break;
61
+ case "info":
62
+ cli.info([
63
+ event.message,
64
+ ...(event.links ?? []).map((link) => link.url),
65
+ ].join("\n"));
66
+ break;
67
+ case "progress":
68
+ cli.step(event.message);
69
+ }
70
+ },
71
+ };
72
+ }
@@ -0,0 +1,12 @@
1
+ import type { ExtensionGrantV0, RosteredExtensionV0 } from "@fungi.computer/shiitake/extensions";
2
+ /** What the Local roster gains for the compaction archive. */
3
+ export type LocalArchiveHandoff = Readonly<{
4
+ roster: readonly RosteredExtensionV0[];
5
+ grants: readonly ExtensionGrantV0[];
6
+ }>;
7
+ /**
8
+ * Zookeeper's compaction handoff over files beside the Agent store. An
9
+ * installed extension the owner chose keeps the single `compaction_handoff`
10
+ * slot: Zookeeper is then skipped and the skip is reported, never a failure.
11
+ */
12
+ export declare function localArchiveHandoff(storeDirectory: string, installedGrants: readonly ExtensionGrantV0[], report?: (operation: string, cause: unknown) => void): LocalArchiveHandoff;
@@ -0,0 +1,21 @@
1
+ import { zookeeperCompaction, zookeeperCompactionGrant, } from "@fungi.computer/zookeeper";
2
+ import { logEvent } from "./log-event.js";
3
+ import { localArchiveWriter } from "./local-session-archives.js";
4
+ /**
5
+ * Zookeeper's compaction handoff over files beside the Agent store. An
6
+ * installed extension the owner chose keeps the single `compaction_handoff`
7
+ * slot: Zookeeper is then skipped and the skip is reported, never a failure.
8
+ */
9
+ export function localArchiveHandoff(storeDirectory, installedGrants, report = logEvent) {
10
+ const holder = installedGrants.find(({ capabilities }) => capabilities.includes("compaction_handoff"));
11
+ if (holder !== undefined) {
12
+ report("local-zookeeper-skipped", new Error(`Installed extension ${holder.id} holds the compaction handoff; Zookeeper archives are off for this Agent`));
13
+ return { roster: [], grants: [] };
14
+ }
15
+ return {
16
+ roster: [
17
+ zookeeperCompaction({ writer: localArchiveWriter(storeDirectory) }),
18
+ ],
19
+ grants: [zookeeperCompactionGrant],
20
+ };
21
+ }
@@ -0,0 +1,143 @@
1
+ import { Mycelium } from "@fungi.computer/mycelium";
2
+ import { defineExtension, type ExtensionCapabilityV0, type ExtensionGrantV0, type RosteredExtensionV0 } from "@fungi.computer/shiitake/extensions";
3
+ import { z } from "zod";
4
+ import { type ExtensionSkillFolder } from "./local-skill-source.js";
5
+ export type LocalExtensionFailureReason = "install" | "manifest" | "artifact" | "not-installed" | "not-enabled" | "no-tools" | "no-skills" | "not-held" | "load";
6
+ /** A typed refusal from the extension owner; never reported as usable. */
7
+ export declare class LocalExtensionError extends Error {
8
+ readonly name = "LocalExtensionError";
9
+ readonly reason: LocalExtensionFailureReason;
10
+ constructor(reason: LocalExtensionFailureReason, message: string, options?: ErrorOptions);
11
+ }
12
+ /**
13
+ * The host port an installed extension's `./host` factory receives: the
14
+ * host's own extension SDK instances and this project's private runtime
15
+ * directory, which its terminal programs also receive.
16
+ */
17
+ export type LocalExtensionHostV1 = Readonly<{
18
+ runtimeDirectory: string;
19
+ defineExtension: typeof defineExtension;
20
+ Mycelium: typeof Mycelium;
21
+ z: typeof z;
22
+ }>;
23
+ /** What an installed package's `./host` entry exports by default. */
24
+ export type LocalExtensionFactoryV1 = (host: LocalExtensionHostV1) => RosteredExtensionV0 | Promise<RosteredExtensionV0>;
25
+ /** What `add` reports: the summary plus the names of the skills it ships. */
26
+ export type LocalInstalledExtension = LocalExtensionSummary & Readonly<{
27
+ skills: readonly string[];
28
+ }>;
29
+ export type LocalExtensionSummary = Readonly<{
30
+ id: string;
31
+ revision: string;
32
+ version: string;
33
+ source: string;
34
+ commit: string | null;
35
+ capabilities: readonly ExtensionCapabilityV0[];
36
+ terminals: readonly string[];
37
+ }>;
38
+ /** One program a project-enabled extension may open in a terminal pane. */
39
+ export type LocalExtensionTerminal = Readonly<{
40
+ extensionId: string;
41
+ terminalId: string;
42
+ name: string;
43
+ description: string;
44
+ /** Absolute executable followed by its arguments. */
45
+ command: readonly string[];
46
+ cwd: string;
47
+ env: Readonly<Record<string, string>>;
48
+ }>;
49
+ export type LocalProjectExtensions = Readonly<{
50
+ /** Absolute client entries for the ordinary client-extension loader. */
51
+ clients: readonly string[];
52
+ terminals: readonly LocalExtensionTerminal[];
53
+ diagnostics: readonly Error[];
54
+ }>;
55
+ export type LocalAgentExtensions = Readonly<{
56
+ roster: readonly RosteredExtensionV0[];
57
+ grants: readonly ExtensionGrantV0[];
58
+ /** Skills folders of extensions this Agent opted into, read in place. */
59
+ skills: readonly ExtensionSkillFolder[];
60
+ /** Extensions left out of this Agent's roster, and why. */
61
+ diagnostics: readonly Readonly<{
62
+ extensionId: string;
63
+ error: Error;
64
+ }>[];
65
+ }>;
66
+ export type LocalExtensionsOptions = Readonly<{
67
+ /** The selected user home that owns `.fungi/extensions`. */
68
+ home: string;
69
+ }>;
70
+ /** Open the one extension owner for a user home. */
71
+ export declare function localExtensions(options: LocalExtensionsOptions): {
72
+ root: string;
73
+ /**
74
+ * Install a package with the shipped Bun package manager (lifecycle
75
+ * scripts disabled) and record the exact resolved revision. A Git source
76
+ * is pinned to the commit Bun's lockfile resolved; updating is another
77
+ * explicit `add`. Missing declared artifacts are a refusal.
78
+ */
79
+ add(source: string): Promise<LocalInstalledExtension>;
80
+ /** Remove the package and every activation that references it. */
81
+ remove(id: string): Promise<boolean>;
82
+ list(): Promise<readonly LocalExtensionSummary[]>;
83
+ /** Enable the current revision's client part and programs for a project. */
84
+ enableProject(projectRoot: string, id: string): Promise<string>;
85
+ disableProject(projectRoot: string, id: string): Promise<boolean>;
86
+ /**
87
+ * The one check that an Agent holds an extension: refuses with
88
+ * `not-held`, naming every id it lacks. Callers needing a whole request
89
+ * judged before any effect call this first; `enableAgent` applies it too.
90
+ */
91
+ assertHeldByAgent(agentStoreDirectory: string, ids: readonly string[]): Promise<void>;
92
+ /**
93
+ * Grant one Agent store the current revision's declared capabilities.
94
+ * Running work keeps its captured roster; the Agent applies this when it
95
+ * next opens. A human (the CLI) names no requester. When an Agent asks, it
96
+ * must hold the extension itself.
97
+ */
98
+ enableAgent(storeDirectory: string, id: string, requester?: Readonly<{
99
+ agentStoreDirectory: string;
100
+ }>): Promise<{
101
+ revision: string;
102
+ capabilities: ("state" | "attention" | "settled" | "send" | "timers" | "commands" | "projection" | "run_tools" | "files" | "prompt" | "compaction_handoff")[];
103
+ skills: boolean;
104
+ }>;
105
+ /**
106
+ * Opt one Agent store into the skills the extension ships, without
107
+ * granting any tools. An existing activation keeps its revision and its
108
+ * capabilities; a new one carries none.
109
+ */
110
+ enableAgentSkills(storeDirectory: string, id: string): Promise<string>;
111
+ /**
112
+ * Turn only the skills off. Tools stay granted; an activation left with
113
+ * neither is removed.
114
+ */
115
+ disableAgentSkills(storeDirectory: string, id: string): Promise<boolean>;
116
+ disableAgent(storeDirectory: string, id: string): Promise<boolean>;
117
+ /** The project's enabled client entries and program launchers. */
118
+ project(projectRoot: string): Promise<LocalProjectExtensions>;
119
+ /** Capture validated records so one reload cannot mix file generations. */
120
+ captureAgent(): Promise<(storeDirectory: string, projectRoot: string) => Promise<Readonly<{
121
+ roster: readonly RosteredExtensionV0[];
122
+ grants: readonly ExtensionGrantV0[];
123
+ /** Skills folders of extensions this Agent opted into, read in place. */
124
+ skills: readonly ExtensionSkillFolder[];
125
+ /** Extensions left out of this Agent's roster, and why. */
126
+ diagnostics: readonly Readonly<{
127
+ extensionId: string;
128
+ error: Error;
129
+ }>[];
130
+ }>>>;
131
+ agent(storeDirectory: string, projectRoot: string): Promise<Readonly<{
132
+ roster: readonly RosteredExtensionV0[];
133
+ grants: readonly ExtensionGrantV0[];
134
+ /** Skills folders of extensions this Agent opted into, read in place. */
135
+ skills: readonly ExtensionSkillFolder[];
136
+ /** Extensions left out of this Agent's roster, and why. */
137
+ diagnostics: readonly Readonly<{
138
+ extensionId: string;
139
+ error: Error;
140
+ }>[];
141
+ }>>;
142
+ };
143
+ export type LocalExtensions = ReturnType<typeof localExtensions>;