@fungi.computer/truffle 0.1.1 → 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.
- package/README.md +282 -34
- package/dist/auth-cli.d.ts +10 -0
- package/dist/auth-cli.js +36 -14
- package/dist/fungi-account-command.d.ts +1 -1
- package/dist/fungi-account-command.js +6 -3
- package/dist/index.d.ts +10 -2
- package/dist/index.js +8 -2
- package/dist/internal/image-fit-metafile.json +106 -0
- package/dist/internal/local-image-fit-worker.mjs +960 -0
- package/dist/internal/private-workerd-sandbox-worker.mjs +11 -12
- package/dist/internal/sandbox-metafile.json +7 -7
- package/dist/local-archive-handoff.d.ts +12 -0
- package/dist/local-archive-handoff.js +21 -0
- package/dist/local-extensions.d.ts +58 -12
- package/dist/local-extensions.js +195 -55
- package/dist/local-image-fit.d.ts +30 -0
- package/dist/local-image-fit.js +105 -0
- package/dist/local-models.d.ts +4 -2
- package/dist/local-models.js +11 -6
- package/dist/local-session-archives.d.ts +8 -0
- package/dist/local-session-archives.js +152 -0
- package/dist/local-skill-source.d.ts +18 -3
- package/dist/local-skill-source.js +216 -140
- package/dist/log-event.d.ts +7 -0
- package/dist/log-event.js +8 -4
- package/dist/private-bounded-response.d.ts +2 -0
- package/dist/private-bounded-response.js +41 -0
- package/dist/private-file-credential-store.d.ts +28 -3
- package/dist/private-file-credential-store.js +57 -9
- package/dist/private-files-patch.d.ts +2 -1
- package/dist/private-files-patch.js +21 -3
- package/dist/private-fungi-account.d.ts +40 -23
- package/dist/private-fungi-account.js +201 -21
- package/dist/private-fungi-mcp-connection.d.ts +4 -0
- package/dist/private-fungi-mcp-connection.js +25 -6
- package/dist/private-fungi-mcp-selection-schema.d.ts +7 -0
- package/dist/private-fungi-mcp-selection-schema.js +15 -0
- package/dist/private-fungi-mcp-selection.d.ts +6 -6
- package/dist/private-fungi-mcp-selection.js +29 -16
- package/dist/private-fungi-model-api.js +4 -4
- package/dist/private-fungi-model-catalog.d.ts +10 -0
- package/dist/private-fungi-model-catalog.js +10 -2
- package/dist/private-fungi-model-provider.d.ts +1 -1
- package/dist/private-fungi-model-provider.js +6 -1
- package/dist/private-fungi-pending-logouts.d.ts +1 -1
- package/dist/private-fungi-pending-logouts.js +1 -2
- package/dist/private-fungi-service-logout.d.ts +44 -0
- package/dist/private-fungi-service-logout.js +59 -0
- package/dist/private-invocation-computer.d.ts +24 -3
- package/dist/private-invocation-computer.js +101 -62
- package/dist/private-invocation-files.d.ts +16 -1
- package/dist/private-invocation-files.js +154 -83
- package/dist/private-local-acp-stdio.js +3 -0
- package/dist/private-local-admission-gate.d.ts +14 -0
- package/dist/private-local-admission-gate.js +52 -0
- package/dist/private-local-agent-control.d.ts +101 -0
- package/dist/private-local-agent-control.js +30 -0
- package/dist/private-local-agent-default-model.d.ts +12 -0
- package/dist/private-local-agent-default-model.js +31 -0
- package/dist/private-local-auth-rpc.d.ts +67 -7
- package/dist/private-local-auth-rpc.js +140 -17
- package/dist/private-local-bwrap.d.ts +13 -0
- package/dist/private-local-bwrap.js +70 -0
- package/dist/private-local-client-version.d.ts +5 -0
- package/dist/private-local-client-version.js +43 -0
- package/dist/private-local-computer-attach.d.ts +3 -3
- package/dist/private-local-computer-attach.js +17 -3
- package/dist/private-local-computer-processes.d.ts +6 -3
- package/dist/private-local-computer-processes.js +55 -31
- package/dist/private-local-config-root.d.ts +21 -0
- package/dist/private-local-config-root.js +19 -0
- package/dist/private-local-containment.d.ts +51 -0
- package/dist/private-local-containment.js +161 -0
- package/dist/private-local-delegation.d.ts +10 -3
- package/dist/private-local-delegation.js +70 -15
- package/dist/private-local-effective-model.d.ts +9 -1
- package/dist/private-local-effective-model.js +3 -0
- package/dist/private-local-exec-environment.d.ts +16 -0
- package/dist/private-local-exec-environment.js +11 -0
- package/dist/private-local-linux-sandbox.d.ts +8 -0
- package/dist/private-local-linux-sandbox.js +67 -0
- package/dist/private-local-mail.d.ts +4 -2
- package/dist/private-local-mail.js +41 -33
- package/dist/private-local-mesh-enrollment.d.ts +34 -0
- package/dist/private-local-mesh-enrollment.js +188 -0
- package/dist/private-local-mesh-links.d.ts +21 -0
- package/dist/private-local-mesh-links.js +229 -0
- package/dist/private-local-mesh-record.d.ts +120 -0
- package/dist/private-local-mesh-record.js +55 -0
- package/dist/private-local-process-identity.d.ts +20 -0
- package/dist/private-local-process-identity.js +40 -0
- package/dist/private-local-runtime-host.d.ts +64 -13
- package/dist/private-local-runtime-host.js +361 -172
- package/dist/private-local-sandbox-policy.d.ts +21 -0
- package/dist/private-local-sandbox-policy.js +121 -0
- package/dist/private-local-sandbox.d.ts +37 -0
- package/dist/private-local-sandbox.js +114 -0
- package/dist/private-local-seatbelt.d.ts +24 -0
- package/dist/private-local-seatbelt.js +68 -0
- package/dist/private-local-service-contract.d.ts +91 -11
- package/dist/private-local-service-discovery.d.ts +129 -13
- package/dist/private-local-service-discovery.js +148 -47
- package/dist/private-local-service-lease.d.ts +16 -0
- package/dist/private-local-service-lease.js +105 -0
- package/dist/private-local-service-listener.d.ts +9 -2
- package/dist/private-local-service-listener.js +260 -64
- package/dist/private-local-service-log.d.ts +128 -0
- package/dist/private-local-service-log.js +321 -0
- package/dist/private-local-service-owner.d.ts +87 -1519
- package/dist/private-local-service-owner.js +1069 -71
- package/dist/private-local-service-process.js +3 -1
- package/dist/private-local-service-termination.d.ts +7 -0
- package/dist/private-local-service-termination.js +67 -0
- package/dist/private-local-service.d.ts +31 -2
- package/dist/private-local-service.js +402 -126
- package/dist/private-local-session-discovery.d.ts +52 -5
- package/dist/private-local-session-discovery.js +132 -11
- package/dist/private-local-shiitake-host.js +2 -2
- package/dist/private-local-startup-model.d.ts +51 -0
- package/dist/private-local-startup-model.js +86 -0
- package/dist/private-local-stop-all.d.ts +27 -0
- package/dist/private-local-stop-all.js +26 -0
- package/dist/private-local-ui-attachment.d.ts +19 -0
- package/dist/private-local-ui-attachment.js +71 -0
- package/dist/private-local-worker-server.d.ts +1 -0
- package/dist/private-local-worker-server.js +13 -5
- package/dist/private-mcp-form-contract.d.ts +186 -0
- package/dist/private-mcp-form-contract.js +53 -0
- package/dist/private-mcp-form-elicitation.d.ts +18 -0
- package/dist/private-mcp-form-elicitation.js +97 -0
- package/dist/private-mcp-form-session.d.ts +172 -0
- package/dist/private-mcp-form-session.js +148 -0
- package/dist/private-openai-claims.d.ts +30 -0
- package/dist/private-openai-claims.js +69 -0
- package/dist/private-oyster-mcp-auth.d.ts +13 -0
- package/dist/private-oyster-mcp-auth.js +57 -0
- package/dist/private-provider-rejection.d.ts +15 -0
- package/dist/private-provider-rejection.js +24 -0
- package/dist/private-sqlite-owner.d.ts +34 -2
- package/dist/private-sqlite-owner.js +103 -37
- package/dist/private-team-computers.d.ts +4 -4
- package/dist/private-team-computers.js +11 -2
- package/dist/seatbelt/safe-base.sbpl +79 -0
- package/dist/subscription-activation.d.ts +9 -0
- package/dist/subscription-activation.js +62 -0
- package/dist/subscription-identity.d.ts +23 -0
- package/dist/subscription-identity.js +124 -0
- package/dist/subscription-turn.d.ts +17 -0
- package/dist/subscription-turn.js +143 -0
- package/dist/team-apps.d.ts +2 -2
- package/dist/team-apps.js +7 -2
- package/native/bin/LICENSE.bubblewrap +502 -0
- package/native/bin/LICENSE.libcap +112 -0
- package/native/bin/LICENSE.sandbox-runtime +201 -0
- package/native/bin/SOURCE.bubblewrap.tar.xz +0 -0
- package/native/bin/bwrap-build-source/Dockerfile +48 -0
- package/native/bin/bwrap-build-source/README.md +96 -0
- package/native/bin/bwrap-build-source/build.mjs +52 -0
- package/native/bin/bwrap-build-source/linux-arm64.ini +14 -0
- package/native/bin/bwrap-build-source/pin.mjs +21 -0
- package/native/bin/bwrap-build-source/record.mjs +74 -0
- package/native/bin/bwrap-build-source/vendor/LICENSE.sandbox-runtime +201 -0
- package/native/bin/bwrap-build-source/vendor/README.md +23 -0
- package/native/bin/bwrap-build-source/vendor/seccomp-unix-block.c +280 -0
- package/native/bin/bwrap-build.json +44 -0
- package/native/bin/fungi-bwrap +0 -0
- package/native/bin/fungi-bwrap.sha256 +1 -0
- package/native/bin/fungi-seccomp.bpf +0 -0
- package/native/bin/fungi-seccomp.bpf.sha256 +1 -0
- package/package.json +44 -31
- package/dist/private-local-model-settings.d.ts +0 -5
- package/dist/private-local-model-settings.js +0 -31
- package/dist/private-local-subagents.d.ts +0 -27
- package/dist/private-local-subagents.js +0 -77
package/README.md
CHANGED
|
@@ -42,13 +42,110 @@ server. Closing the batch closes their resources.
|
|
|
42
42
|
The [service manager](src/private-local-service.ts) discovers or starts the same
|
|
43
43
|
user's shared background service. It selects project stores and creates or
|
|
44
44
|
resumes Sessions through that owner. Closing a client connection does not stop
|
|
45
|
-
the service or erase its Session.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
service
|
|
45
|
+
the service or erase its Session. The CLI's `fungi stop` sends the service
|
|
46
|
+
SIGTERM, which drains its owners; a service still running 5 s later is
|
|
47
|
+
SIGKILLed, and its `service.json` and owner lock are removed either way. A
|
|
48
|
+
SIGKILL ends only the service process: the shell and exec commands its Agents
|
|
49
|
+
started run detached in their own process groups and can keep running after it
|
|
50
|
+
([client-surfaces-v1-79](../../issues/client-surfaces-v1/79-stop-the-service-process-groups-on-fungi-stop.md)).
|
|
51
|
+
Interrupted turns resume when the service next starts.
|
|
52
|
+
|
|
53
|
+
The service releases an Agent nothing is using. It counts each request and each
|
|
54
|
+
open Session watch on that Agent, and every mail or control operation that
|
|
55
|
+
reaches it. An unused Agent with no running or waiting Session, Watchdog job,
|
|
56
|
+
scheduled wake, reply still owed a delivery attempt or running background
|
|
57
|
+
process is closed after two consecutive idle checks (one per minute). Delivered
|
|
58
|
+
reply receipts and dead letters stay in the outbox but owe nothing. Work an
|
|
59
|
+
Agent delegated is owed by its child, whose reply mail reopens the parent. It is
|
|
60
|
+
then dropped from `~/.fungi/service/owners.json`. The next request, mail or send
|
|
61
|
+
reopens it. Shutdown keeps only Agents with work in that file, so a restart
|
|
62
|
+
reopens just those. A released Agent's per-Session client PATH binding and
|
|
63
|
+
exited background-process logs end with it.
|
|
64
|
+
|
|
65
|
+
`~/.fungi/service/service.json` and the service's `status` route record its
|
|
66
|
+
`version` (the packed CLI's content hash, or `source`) and `protocol` (the
|
|
67
|
+
client-service wire contract). Every TUI or CLI start ensures its own build: it
|
|
68
|
+
reuses a service of the same version, and otherwise stops the registered one as
|
|
69
|
+
`fungi stop` does and starts its own. A window that has already reached a
|
|
70
|
+
service never replaces one: it keeps a newer build that speaks its protocol, and
|
|
71
|
+
for another protocol shows only "The Fungi service was updated. Restart this
|
|
72
|
+
window." Saved Sessions remain on disk throughout.
|
|
73
|
+
|
|
74
|
+
Version policy: a fresh launch of a different build replaces the running
|
|
75
|
+
service, so use one installed build per service directory (`~/.fungi/service`).
|
|
76
|
+
Every source checkout counts as the same `source` version, so restart the
|
|
77
|
+
service (`fungi stop`) after editing the source.
|
|
78
|
+
|
|
79
|
+
### Service diagnostics candidate
|
|
80
|
+
|
|
81
|
+
`private-local-service-log.ts` owns the service's JSON record contract, native
|
|
82
|
+
file sink and always-on five-minute sampler. It retains all maintained `bun:jsc`
|
|
83
|
+
type counts when the encoded record fits 32 KiB. If not, it emits an explicit
|
|
84
|
+
map omission summary rather than selecting a top-N subset or truncating JSON.
|
|
85
|
+
Counts include uncollected allocations; they are not retained-root evidence.
|
|
86
|
+
Unavailable statistics are explicit, never zero substitutes.
|
|
87
|
+
|
|
88
|
+
CTO ruling `dc105` selects the runtime's own filesystem primitives, owned by
|
|
89
|
+
this same module. The sink opens append with mode `0600` and verifies the
|
|
90
|
+
descriptor without chmod repair, checks byte counts on every write, and rotates
|
|
91
|
+
using checked native renames. No logger framework, worker, retry loop or second
|
|
92
|
+
store is part of this contract.
|
|
93
|
+
|
|
94
|
+
The candidate policy is one active 1 MiB file plus three 1 MiB backups, not a
|
|
95
|
+
four-backup policy. Disposal must precede the existing owner lease release. No
|
|
96
|
+
inspector, environment debug switch, forced GC, new service supervisor or
|
|
97
|
+
memory-leak fix is implied. The separate 4,096-cycle memory experiment did not
|
|
98
|
+
reproduce the reported sustained growth.
|
|
99
|
+
|
|
100
|
+
The diagnostics resource records startup/ready and observed stop reasons and
|
|
101
|
+
owns only its sampler/writer. Both entry paths use the existing listener owner,
|
|
102
|
+
which disposes diagnostics before registration removal and lease release.
|
|
103
|
+
Diagnostics I/O faults do not stop the service, turns or normal shutdown.
|
|
104
|
+
|
|
105
|
+
Native fixtures allocate only under this worktree's ignored
|
|
106
|
+
`.botanical/service-log-fixtures/`; child HOME and TMPDIR are fixture-owned.
|
|
107
|
+
Primitive-only native tests use the diagnostics resource directly; later
|
|
108
|
+
service/CLI/doctor proofs load the real consumer closure separately. Short-count
|
|
109
|
+
injection controls the maintained SDK return value; it is not an OS-generated
|
|
110
|
+
short-write claim. Rename-fault tests use an actual filesystem collision.
|
|
111
|
+
|
|
112
|
+
CTO decision `ee8f5320e0de` selects continued service operation with explicit
|
|
113
|
+
failed diagnostics. The first sink fault latches a bounded code and stable
|
|
114
|
+
first-failure ISO timestamp, stops the sampler and attempts writer disposal
|
|
115
|
+
once. Later requests read that current resource state, not the startup
|
|
116
|
+
connection snapshot. Opening/writing/closing failures are distinct; a failed
|
|
117
|
+
heap read emits `memory-unavailable`, never zero statistics. No retries,
|
|
118
|
+
separate journal or store, environment switch or new runtime owner is added.
|
|
119
|
+
|
|
120
|
+
Protocol 2 requires diagnostics on live `/status` and `/inspect` responses; the
|
|
121
|
+
registration file remains identity-only. The maintained Zod live decoder rejects
|
|
122
|
+
missing diagnostics rather than assuming ACTIVE. `fungi doctor` performs only
|
|
123
|
+
the manager's live status read and prints `FAILED <code> since <timestamp>` (or
|
|
124
|
+
ACTIVE). It never starts/restarts the service.
|
|
125
|
+
|
|
126
|
+
The earlier LogTape probe was rejected on native mode and swallowed-rename
|
|
127
|
+
failures; it is not an adoption option. Its old candidate tests are superseded
|
|
128
|
+
by native-fs tests, with the historical probe preserved separately. Dependency
|
|
129
|
+
removal uses the maintained package operation, not hand-edited lock state.
|
|
130
|
+
Focused native tests do not qualify the service/CLI/doctor consumer closure or
|
|
131
|
+
authorize production enablement; those remain subject to the built-dependency
|
|
132
|
+
merge gate.
|
|
133
|
+
|
|
134
|
+
The service acquires its SQLite owner row and writes its PID and process-start
|
|
135
|
+
identity in the same transaction. `service.json` is only a pointer to that row;
|
|
136
|
+
a matching file or HTTP handshake alone does not authorize a signal. Before
|
|
137
|
+
stopping, the client requires the file to match the live lease owner and checks
|
|
138
|
+
that process's start identity (Linux `/proc/<pid>/stat` `starttime`). It checks
|
|
139
|
+
the process identity again before each signal. These are separate reads and
|
|
140
|
+
`kill` calls: a residual read-to-signal PID-reuse window remains; this is not an
|
|
141
|
+
atomic kernel process handle.
|
|
142
|
+
|
|
143
|
+
On macOS, `ps lstart` has only one-second resolution. No sub-second macOS reader
|
|
144
|
+
is implemented, so `fungi stop` and automatic build replacement **refuse to
|
|
145
|
+
signal** there with an actionable message. Close the service manually before
|
|
146
|
+
launching another build. A possibly live lease is retained conservatively on
|
|
147
|
+
platforms without verifiable start identity, even if its PID may have been
|
|
148
|
+
reused.
|
|
52
149
|
|
|
53
150
|
A Session keeps its invoking client's validated executable PATH while its owner
|
|
54
151
|
is live. Reconnecting the same live Session with a different PATH is a conflict.
|
|
@@ -58,12 +155,12 @@ toolchain. Other caller environment variables are not imported.
|
|
|
58
155
|
## Files, tools and models
|
|
59
156
|
|
|
60
157
|
The local Computer is explicit in execute: `env.computers.local.exec(...)` and
|
|
61
|
-
`env.computers.local.files.read/
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
158
|
+
`env.computers.local.files.read/find/edit(...)`. There is no shared `files`
|
|
159
|
+
module or Computer role named Home. The host grants the product Home extension
|
|
160
|
+
its already-rooted port; Home adopts the single local attachment and supplies
|
|
161
|
+
direct `read`, `list`, `glob`, `grep` and native `apply_patch` tools. The same
|
|
162
|
+
tool gate admits each direct call. `/home local` is a human command; there is no
|
|
163
|
+
model operation that changes Home.
|
|
67
164
|
|
|
68
165
|
- [Files](src/private-invocation-files.ts) captures the project root and rejects
|
|
69
166
|
path or symlink escapes. Native patch follows its own stricter rooted
|
|
@@ -95,20 +192,42 @@ there is no model operation that changes Home.
|
|
|
95
192
|
separately from the native command's result.
|
|
96
193
|
- [Models](src/local-models.ts) uses Pi's registry and Veil's allowed login
|
|
97
194
|
methods with the local credential store. Fungi's provider reads its hosted
|
|
98
|
-
catalog through the selected Team and uses Hub billing. Model choice follows
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
Agent
|
|
195
|
+
catalog through the selected Team and uses Hub billing. Model choice follows a
|
|
196
|
+
Session override, then the Agent's default, then an available provider login;
|
|
197
|
+
there is no per-person remembered model. `/model` in a chat sets that Agent's
|
|
198
|
+
default and thinking level and clears the Session override, so the running
|
|
199
|
+
chat and every new chat with that Agent use it; another Agent is unaffected.
|
|
200
|
+
Agent defaults stay in their Agent store.
|
|
201
|
+
[One resolver](src/private-local-startup-model.ts) decides a new chat's model
|
|
202
|
+
for both a fresh Session and the landing, reading the stored default through
|
|
203
|
+
the same reader as Agent discovery (a store that predates the schema fails
|
|
204
|
+
loudly). The host validates offered models and supported thinking levels.
|
|
104
205
|
`agents.models` lists the `provider/model` addresses offered by signed-in or
|
|
105
|
-
configured providers. `agents.create` accepts an optional
|
|
106
|
-
list
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
206
|
+
configured providers. `agents.create` accepts an optional name, an optional
|
|
207
|
+
address from that list and an optional thinking level; the new Agent works in
|
|
208
|
+
the project folder and the result returns it with the resolved model.
|
|
209
|
+
`agents.setModel` changes the Agent's default, optionally with a thinking
|
|
210
|
+
level, without replacing Session overrides. An address Local does not offer
|
|
211
|
+
fails as a typed `model:rejected` capability failure and changes nothing.
|
|
212
|
+
Creation and sends refuse missing provider login; failed runs keep a safe,
|
|
213
|
+
actionable diagnostic for `agents.wait`. A hosted Team's key-source choice
|
|
214
|
+
remains an explicit restriction, including when a manual model is selected.
|
|
215
|
+
- Archiving tidies a folder's Agents without deleting any. The archived flag
|
|
216
|
+
lives in the Agent's own store next to `created_by`, so the store, its
|
|
217
|
+
Sessions and files stay. An Agent can `agents.archive` and `agents.unarchive`
|
|
218
|
+
an Agent it created, never another Agent or itself; a person runs
|
|
219
|
+
`fungi agents archive|unarchive <id>` for any Agent or presses `a` on the
|
|
220
|
+
landing Agent picker. An archived Agent leaves `agents.list`, discovery (the
|
|
221
|
+
picker and newest-Session resolution) and delegation: `agents.send` to it
|
|
222
|
+
fails as `archive:archived`. `agents.list` with `archived: true`, or
|
|
223
|
+
`fungi agents list --archived`, finds it to restore. Archiving is refused,
|
|
224
|
+
naming the running command, while any Session of the Agent has queued or
|
|
225
|
+
running work, or while it still waits for work it delegated
|
|
226
|
+
(`archive:pending`); the Agent cancels or waits first. Archive and admission
|
|
227
|
+
are serialized per Agent, so a send racing an archive either runs first (and
|
|
228
|
+
the archive is refused) or is refused as archived. A store written before the
|
|
229
|
+
flag reads as unreadable, with the phrase to move it aside; archiving it fails
|
|
230
|
+
as `archive:unreadable`.
|
|
112
231
|
- [Delegation](src/private-local-delegation.ts) gives each project Agent the
|
|
113
232
|
Hub's `followUp` delegation over its own store. `agents.send` freezes BirdDog
|
|
114
233
|
mail through `fleet.start` and returns the child's `commandId`. The
|
|
@@ -171,9 +290,23 @@ starts disabled.
|
|
|
171
290
|
whose declared `./host` entry or terminal program is not built is refused.
|
|
172
291
|
- `enableProject(root, id)` turns on the extension's client entry and programs
|
|
173
292
|
for that folder, whichever Agent is selected.
|
|
174
|
-
- `enableAgent(store, id)` grants one Agent store the capabilities
|
|
175
|
-
revision declares. The Agent keeps an older accepted revision
|
|
176
|
-
enabled again, so an upgrade never widens it silently.
|
|
293
|
+
- `enableAgent(store, id, requester?)` grants one Agent store the capabilities
|
|
294
|
+
the current revision declares. The Agent keeps an older accepted revision
|
|
295
|
+
until it is enabled again, so an upgrade never widens it silently. A human
|
|
296
|
+
(the CLI) names no requester. When an Agent is the requester it must hold the
|
|
297
|
+
extension itself (granted tools, not only its skills), or the call is refused
|
|
298
|
+
with reason `not-held`.
|
|
299
|
+
- `assertHeldByAgent(store, ids)` is that one held-check: it rejects with
|
|
300
|
+
`not-held`, naming every id the Agent lacks. An Agent creating an Agent is
|
|
301
|
+
judged by it before anything exists, so a created Agent never holds more than
|
|
302
|
+
its creator, and a refused request creates nothing.
|
|
303
|
+
- `enableAgentSkills(store, id)` opts one Agent store into the skills folder the
|
|
304
|
+
package declares with `fungi.skills` (for example `"./skills"`), with no tools
|
|
305
|
+
granted; a package with no `./host` can be skills-only. The folder is read in
|
|
306
|
+
place from the installed package, ranks below project and personal skills (so
|
|
307
|
+
yours win), and shows as "from <id>". `disableAgentSkills`, `disableAgent` and
|
|
308
|
+
`remove` take it away. Local installed extensions only; Hub-hosted extensions
|
|
309
|
+
are not covered.
|
|
177
310
|
- `remove(id)` deletes the package and every activation that references it.
|
|
178
311
|
|
|
179
312
|
The package declares itself in `package.json`:
|
|
@@ -206,6 +339,50 @@ repository and calls its tools through the real workerd `execute`.
|
|
|
206
339
|
A Team MCP connection adds admitted hosted Computer tools to a local Agent. It
|
|
207
340
|
does not move the local Files root or Session storage into the Hub.
|
|
208
341
|
|
|
342
|
+
Local's host-only `presentApproval(sessionId, pending, approvals)` port binds a
|
|
343
|
+
genuine canonical `PendingApproval` and member-bound `Approvals` capability to
|
|
344
|
+
the requesting Session. `mcpFormApprovalContract` uses the existing Session
|
|
345
|
+
extension channel: `pending` contains `{id, approval}`, where `id` is ephemeral
|
|
346
|
+
and `approval` is the canonical `ApprovalView`, including host-computed rights.
|
|
347
|
+
Optional evidence descriptors pass through with that view. They remain untrusted
|
|
348
|
+
display-only metadata, never form input, model input or instructions; this port
|
|
349
|
+
does not fetch or decode images.
|
|
350
|
+
|
|
351
|
+
The Session `answer` command takes `{id, decision, expectedRevision}` with
|
|
352
|
+
`decision: "approve" | "deny"`. Only a live selected-Session UI attachment can
|
|
353
|
+
schedule a decision. After the Session command commits and the attachment is
|
|
354
|
+
rechecked, the client awaits canonical `capability.answer`; that capability
|
|
355
|
+
authorizes the answer and its native host owns durable apply/result delivery.
|
|
356
|
+
The form id, UI attachment and display data cannot grant operation rights. There
|
|
357
|
+
is no second dispatch through MCP `accept`, and no suspended Agent turn. Closing
|
|
358
|
+
or rebinding a UI releases its route, not the durable approval record.
|
|
359
|
+
|
|
360
|
+
This binding is not a TUI renderer or a second ledger. Production submit/apply
|
|
361
|
+
composition still needs the canonical ledger/producer owner and host-attested
|
|
362
|
+
identity, fence and idempotency facts. The legacy boolean MCP form cannot supply
|
|
363
|
+
those facts and is not connected to this Session decision port.
|
|
364
|
+
|
|
365
|
+
**Pending approvals-bundle join:** boorsr owns the canonical ledger/producer
|
|
366
|
+
composition. Local's `observePrivateSqliteOwner(owner, onFailure)` wraps a
|
|
367
|
+
supplied owner without choosing transactions or closing its connection. Local
|
|
368
|
+
selects the actual driver's maintained transaction API: Watchdog's
|
|
369
|
+
`fromNodeSqlite` savepoints for a real Node `DatabaseSync`, and native
|
|
370
|
+
`bun:sqlite` `Database.transaction(...)` for the Bun wrapper. The Node adapter
|
|
371
|
+
is never passed the Bun wrapper; Bun retains native `close(true)` to finalize
|
|
372
|
+
held statements. No savepoint machinery is copied into Local, and the old
|
|
373
|
+
non-nestable `BEGIN` adapter is removed.
|
|
374
|
+
|
|
375
|
+
The same driver laws run through the production opener under Node and Bun:
|
|
376
|
+
nested commit/rollback, native failure classification and cause preservation,
|
|
377
|
+
host-owned connection lifetime, held-statement finalization, and reopen of
|
|
378
|
+
committed data. The canonical submit/get projection tracer also runs against
|
|
379
|
+
both actual Local drivers. Additional approvals-bundle driver tests exercise
|
|
380
|
+
canonical answer/apply, atomic intent rollback and effect replay across reopen
|
|
381
|
+
through unchanged invokeModuleOperation on both drivers. These checks do not
|
|
382
|
+
prove production identity/fences, restart result delivery or producer wiring.
|
|
383
|
+
The form binding and SQLite adapter ride as consumers in boorsr's approvals
|
|
384
|
+
bundle, not as a separate production approval owner.
|
|
385
|
+
|
|
209
386
|
[Fungi account custody](src/private-fungi-account.ts) supplies the same OAuth
|
|
210
387
|
login and locked refresh to MCP and models. `fungi login --provider fungi` opens
|
|
211
388
|
browser sign-in and selects a current Team for model billing. The Local model
|
|
@@ -264,7 +441,12 @@ pnpm --filter @fungi.computer/truffle test:full
|
|
|
264
441
|
```
|
|
265
442
|
|
|
266
443
|
[Runtime-host tests](test/private-local-runtime-host.test.ts) exercise native
|
|
267
|
-
SQLite, provider fixtures, instruction snapshots, replay and close.
|
|
444
|
+
SQLite, provider fixtures, instruction snapshots, replay and close. On Linux
|
|
445
|
+
with Bun, `pnpm --dir runtimes/local run proof:sqlite-close` also checks
|
|
446
|
+
`/proc/self/fd` immediately after closing an Agent, its create receipt and a
|
|
447
|
+
service lease, without requesting garbage collection. This native descriptor
|
|
448
|
+
proof is Linux-specific; the ordinary Node suite also checks the writable
|
|
449
|
+
adapter's timeout, foreign keys, transaction state and changed rows.
|
|
268
450
|
[Computer tests](test/private-invocation-computer.test.ts) cover process-group
|
|
269
451
|
cleanup and deadlines.
|
|
270
452
|
[Background-process tests](test/private-local-computer-processes.test.ts) cover
|
|
@@ -289,7 +471,73 @@ transport uses the Local OAuth door and the same Team/resource capability rule
|
|
|
289
471
|
as browser Sessions. Closing a Session client releases observation; it does not
|
|
290
472
|
cancel durable work.
|
|
291
473
|
|
|
292
|
-
The directory grammar lives in `@fungi.computer/
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
474
|
+
The directory grammar lives in `@fungi.computer/nacre/app-directory`. UI handoff
|
|
475
|
+
resolves the selected App's published surface on the saved Hub origin, without
|
|
476
|
+
putting an access token in the URL. A later account/Team selection retires this
|
|
477
|
+
client; open a new client for the new selection.
|
|
478
|
+
|
|
479
|
+
## Subscription credential activation
|
|
480
|
+
|
|
481
|
+
`fungi account use-credential --provider anthropic|openai --from-file -` accepts
|
|
482
|
+
bounded JSON on stdin:
|
|
483
|
+
`{ "expected": <OAuth credential or null>, "credential": <replacement OAuth credential> }`.
|
|
484
|
+
Tokens never travel in arguments or replies. Under the credential store's
|
|
485
|
+
existing refresh lock, the owner compares the expected provider entry
|
|
486
|
+
semantically, preserves every other provider, and atomically persists a 0600
|
|
487
|
+
replacement. A stale comparison fails closed with the fixed `conflict` category.
|
|
488
|
+
Input and filesystem failures expose only `invalid-input` or `store-failure`,
|
|
489
|
+
never parser diagnostics or causes. The machine-readable success is
|
|
490
|
+
`{"ok":true}`; failure also writes a bounded
|
|
491
|
+
`{"ok":false,"error":{"category":"..."}}` reply and exits nonzero.
|
|
492
|
+
|
|
493
|
+
Fungi remains the credential refresher. Local pins the Anthropic/OpenAI account
|
|
494
|
+
at the accepted turn boundary, including all subsequent tool iterations. Pi
|
|
495
|
+
refreshes that same account under the existing store lock while it remains
|
|
496
|
+
active; refreshed tokens do not change the pinned identity. The next turn picks
|
|
497
|
+
up an activated account without restarting the service.
|
|
498
|
+
|
|
499
|
+
Pi's `openai` provider uses the ChatGPT direct-token flow, not the legacy
|
|
500
|
+
`openai-codex` flow. Its credentials contain `clientId` and `scopes`, but do not
|
|
501
|
+
add `accountId`. Local decodes the access token with `jose`; only its issuer and
|
|
502
|
+
person `sub` identify the OpenAI subscription. Same-person refreshes are
|
|
503
|
+
adopted; a different issuer or subject is not. Workspace metadata is not
|
|
504
|
+
identity. An OpenAI grant without a provable person cannot establish turn
|
|
505
|
+
continuity. An already-started refresh is committed under Pi's existing lock
|
|
506
|
+
before Local decides whether the turn can adopt it; refusal or cancellation must
|
|
507
|
+
not discard the rotated refresh token or restore a released pin.
|
|
508
|
+
|
|
509
|
+
After switching A to B, the current turn may continue using A's still-valid
|
|
510
|
+
token, but never refreshes inactive A. If A expires, its next request ends the
|
|
511
|
+
turn with the typed, redacted `account-switched-during-turn` refusal: retry on
|
|
512
|
+
the next turn using B. Completed tool results remain in the Session. A's durable
|
|
513
|
+
inactive credential belongs to the external vault; Local creates no second
|
|
514
|
+
inactive-credential authority and does not rotate it behind the vault's back.
|
|
515
|
+
|
|
516
|
+
For vault capture, `fungi account prepare-credential --provider anthropic`
|
|
517
|
+
enriches a fresh Fungi login with Anthropic's OAuth profile account UUID. OpenAI
|
|
518
|
+
uses unpatched Pi OAuth: Local neither intercepts the code exchange nor reads
|
|
519
|
+
its ID token. After Pi returns a grant, Local requires a usable issuer and
|
|
520
|
+
subject in the access token before storage. No OpenAI workspace `accountId` is
|
|
521
|
+
captured or retained across refresh. Anthropic still retains its profile
|
|
522
|
+
account. `fungi account prepare-credential --provider openai` confirms only the
|
|
523
|
+
access token's issuer and subject, without a request or token change. Failures
|
|
524
|
+
expose `identity-unavailable` and bounded claim names, never token or claim
|
|
525
|
+
values, and preserve the prior entry. A turn detects a different OpenAI person
|
|
526
|
+
by issuer and subject and refuses as `account-switched-during-turn`.
|
|
527
|
+
|
|
528
|
+
Auth tests inject a fixture ChatGPT OAuth provider through `createPrivateModels`
|
|
529
|
+
and pass the resulting collection to `runLocalAuthCli`. They do not start Pi's
|
|
530
|
+
callback server or bind an OAuth port. Explicit temporary credential paths and
|
|
531
|
+
real-file size/mtime guards prevent touching the person's credentials. After
|
|
532
|
+
building Truffle's dependencies,
|
|
533
|
+
`pnpm --dir runtimes/local proof:unpatched-login` packs Truffle with npm and
|
|
534
|
+
signs in through that fixture in an external npm consumer using registry pi-ai
|
|
535
|
+
1.3.0. This qualifies the local seam and stored person identity, not a live
|
|
536
|
+
OpenAI authorization.
|
|
537
|
+
|
|
538
|
+
A provider HTTP refusal is reported as `provider_rejected` with its status code
|
|
539
|
+
only, never the response body. Use Fungi's ordinary login flow in a private
|
|
540
|
+
temporary HOME for additional accounts. External vault managers must reconcile
|
|
541
|
+
the live credential before switching and treat activation conflicts as failures,
|
|
542
|
+
not overwrite permission. This contract does not authorize a live import, login
|
|
543
|
+
change or cutover.
|
package/dist/auth-cli.d.ts
CHANGED
|
@@ -20,11 +20,21 @@ export type LocalAuthResult = Readonly<{
|
|
|
20
20
|
kind: "status";
|
|
21
21
|
providers: readonly LocalAuthStatus[];
|
|
22
22
|
}>;
|
|
23
|
+
/**
|
|
24
|
+
* A blank API key was entered. Its message is fixed by the type, never
|
|
25
|
+
* provider output or credential material, so it is safe to show verbatim
|
|
26
|
+
* wherever the login surfaces (including across the Local service).
|
|
27
|
+
*/
|
|
28
|
+
export declare class LocalAuthRefusal extends Error {
|
|
29
|
+
constructor();
|
|
30
|
+
}
|
|
23
31
|
export type SignalProcess = {
|
|
24
32
|
once(signal: NodeJS.Signals, listener: () => void): void;
|
|
25
33
|
removeListener(signal: NodeJS.Signals, listener: () => void): void;
|
|
26
34
|
};
|
|
27
35
|
export type LocalAuthCliOptions = {
|
|
36
|
+
/** Credential/device custody selected by the host before presenting auth. */
|
|
37
|
+
credentialPath?: string;
|
|
28
38
|
models?: LocalAuthModels;
|
|
29
39
|
input?: NodeJS.ReadableStream;
|
|
30
40
|
output?: NodeJS.WritableStream;
|
package/dist/auth-cli.js
CHANGED
|
@@ -7,7 +7,19 @@ import { parseArgs } from "node:util";
|
|
|
7
7
|
import { localLoginProviders } from "./local-login.js";
|
|
8
8
|
import { createPrivateModels } from "./local-models.js";
|
|
9
9
|
import { createPrivateCredentialStore } from "./private-file-credential-store.js";
|
|
10
|
+
import { capturePrivateLocalConfigRoot } from "./private-local-config-root.js";
|
|
10
11
|
export { maximumCredentialStringLength as localAuthInputLimit } from "./private-file-credential-store.js";
|
|
12
|
+
/**
|
|
13
|
+
* A blank API key was entered. Its message is fixed by the type, never
|
|
14
|
+
* provider output or credential material, so it is safe to show verbatim
|
|
15
|
+
* wherever the login surfaces (including across the Local service).
|
|
16
|
+
*/
|
|
17
|
+
export class LocalAuthRefusal extends Error {
|
|
18
|
+
constructor() {
|
|
19
|
+
super("No key entered");
|
|
20
|
+
this.name = "LocalAuthRefusal";
|
|
21
|
+
}
|
|
22
|
+
}
|
|
11
23
|
function usage() {
|
|
12
24
|
return "Usage: fungi-local-auth <login|status|logout> [--provider <id>] [--auth-type oauth|api_key] [--method <id>]";
|
|
13
25
|
}
|
|
@@ -86,10 +98,15 @@ providerLabel) {
|
|
|
86
98
|
const promptSignal = prompt.signal === undefined
|
|
87
99
|
? signal
|
|
88
100
|
: AbortSignal.any([signal, prompt.signal]);
|
|
89
|
-
|
|
101
|
+
const answer = await (supplied ?? terminalInteraction(input, output)).prompt({
|
|
90
102
|
...prompt,
|
|
91
103
|
signal: promptSignal,
|
|
92
104
|
});
|
|
105
|
+
// A blank key would be stored as a credential and report success while
|
|
106
|
+
// every model call then fails; refuse it where the key is read.
|
|
107
|
+
if (prompt.type === "secret" && answer.trim() === "")
|
|
108
|
+
throw new LocalAuthRefusal();
|
|
109
|
+
return answer;
|
|
93
110
|
},
|
|
94
111
|
notify: (event) => {
|
|
95
112
|
const augmented = providerLabel === undefined || event.type !== "auth_url"
|
|
@@ -152,7 +169,7 @@ async function chooseAuthType(provider, requested, signal, input, output, suppli
|
|
|
152
169
|
throw new Error(`Unknown login method: ${id}`);
|
|
153
170
|
return selected.id;
|
|
154
171
|
}
|
|
155
|
-
async function login(models, command, signal, input, output,
|
|
172
|
+
async function login(models, command, signal, input, output, host, supplied) {
|
|
156
173
|
const provider = await chooseProvider(models.getProviders(), command.provider, signal, input, output, supplied);
|
|
157
174
|
const authType = await chooseAuthType(provider, command.authType, signal, input, output, supplied);
|
|
158
175
|
if (authType === "api_key" && provider.auth.apiKey?.login === undefined) {
|
|
@@ -167,17 +184,20 @@ async function login(models, command, signal, input, output, getDeviceId, suppli
|
|
|
167
184
|
: provider.name;
|
|
168
185
|
const interaction = interactionFor(signal, input, output, supplied, command.method, signInLabel);
|
|
169
186
|
// Sign in with ChatGPT needs a stable installation UUID in its authorize
|
|
170
|
-
// URL (`ext_agent_host_id`)
|
|
171
|
-
//
|
|
172
|
-
//
|
|
173
|
-
// first and hand it a
|
|
187
|
+
// URL (`ext_agent_host_id`) and shows `agentName` on OpenAI's consent page
|
|
188
|
+
// (Levi, 2026-10-16: Shiitake, Fungi's agent). Pass both at this one call
|
|
189
|
+
// site, the way Pi's own coding-agent does. Pi's device-ID option is
|
|
190
|
+
// synchronous, so resolve our (async, disk-backed) ID first and hand it a
|
|
191
|
+
// closure over the resolved value.
|
|
174
192
|
if (provider.id === "openai" && authType === "oauth") {
|
|
175
193
|
signal.throwIfAborted();
|
|
176
|
-
const deviceId = await getDeviceId();
|
|
194
|
+
const deviceId = await host.getDeviceId();
|
|
177
195
|
signal.throwIfAborted();
|
|
178
|
-
|
|
196
|
+
const loginOptions = {
|
|
197
|
+
agentName: "Shiitake",
|
|
179
198
|
getDeviceId: () => deviceId,
|
|
180
|
-
}
|
|
199
|
+
};
|
|
200
|
+
await models.login(provider.id, authType, interaction, loginOptions);
|
|
181
201
|
}
|
|
182
202
|
else {
|
|
183
203
|
await models.login(provider.id, authType, interaction);
|
|
@@ -250,11 +270,11 @@ async function signedInProviders(models, providers, signal) {
|
|
|
250
270
|
signedIn.push(provider);
|
|
251
271
|
return signedIn;
|
|
252
272
|
}
|
|
253
|
-
async function runCommand(command, models, signal, input, output,
|
|
273
|
+
async function runCommand(command, models, signal, input, output, host, interaction) {
|
|
254
274
|
if (command.type === "status")
|
|
255
275
|
return status(models, command.provider, signal, output, interaction);
|
|
256
276
|
if (command.type === "login") {
|
|
257
|
-
await login(models, command, signal, input, output,
|
|
277
|
+
await login(models, command, signal, input, output, host, interaction);
|
|
258
278
|
return { kind: "completed" };
|
|
259
279
|
}
|
|
260
280
|
const providers = models.getProviders();
|
|
@@ -319,6 +339,7 @@ export async function runLocalAuthCli(argv, options = {}) {
|
|
|
319
339
|
output.write(`${usage()}\n`);
|
|
320
340
|
return { kind: "completed" };
|
|
321
341
|
}
|
|
342
|
+
const credentialPath = options.credentialPath ?? capturePrivateLocalConfigRoot().credentialPath;
|
|
322
343
|
const controller = new AbortController();
|
|
323
344
|
const signals = options.signals ?? process;
|
|
324
345
|
const abort = () => {
|
|
@@ -326,11 +347,12 @@ export async function runLocalAuthCli(argv, options = {}) {
|
|
|
326
347
|
};
|
|
327
348
|
signals.once("SIGINT", abort);
|
|
328
349
|
signals.once("SIGTERM", abort);
|
|
329
|
-
const getDeviceId = options.getDeviceId ??
|
|
350
|
+
const getDeviceId = options.getDeviceId ??
|
|
351
|
+
(() => createPrivateCredentialStore(credentialPath).getDeviceId());
|
|
330
352
|
try {
|
|
331
|
-
return await runCommand(command, options.models ?? createPrivateModels(), options.interaction?.signal === undefined
|
|
353
|
+
return await runCommand(command, options.models ?? createPrivateModels(credentialPath), options.interaction?.signal === undefined
|
|
332
354
|
? controller.signal
|
|
333
|
-
: AbortSignal.any([controller.signal, options.interaction.signal]), options.input ?? process.stdin, output, getDeviceId, options.interaction);
|
|
355
|
+
: AbortSignal.any([controller.signal, options.interaction.signal]), options.input ?? process.stdin, output, { getDeviceId }, options.interaction);
|
|
334
356
|
}
|
|
335
357
|
finally {
|
|
336
358
|
signals.removeListener("SIGINT", abort);
|
|
@@ -13,6 +13,6 @@ export type FungiAccountCommandOptions = Readonly<{
|
|
|
13
13
|
credentialPath?: string | undefined;
|
|
14
14
|
fetch?: FetchLike | undefined;
|
|
15
15
|
}>;
|
|
16
|
-
export declare const fungiAccountCommandHelp = "Usage: fungi account [--json]\n fungi account teams [--json]\n fungi account use-team <team-id>\n fungi account balance [--json]\n\nRead the signed-in Fungi account without exposing its credentials. The plain\ncommand shows the Hub and the Team that pays for models; teams lists your\ncurrent memberships; use-team selects one of them (the prior Team is kept when\nyou are not a current member); balance reads that Team's credit when you may\nsee its billing.\n";
|
|
16
|
+
export declare const fungiAccountCommandHelp = "Usage: fungi account [--json]\n fungi account teams [--json]\n fungi account use-team <team-id>\n fungi account balance [--json]\n fungi account prepare-credential --provider anthropic|openai\n fungi account use-credential --provider anthropic|openai --from-file -\n\nRead the signed-in Fungi account without exposing its credentials. The plain\ncommand shows the Hub and the Team that pays for models; teams lists your\ncurrent memberships; use-team selects one of them (the prior Team is kept when\nyou are not a current member); balance reads that Team's credit when you may\nsee its billing.\n";
|
|
17
17
|
/** `fungi account`: non-secret reads over Local's one Fungi account owner. */
|
|
18
18
|
export declare function runFungiAccountCommand(command: FungiAccountCommand, options: FungiAccountCommandOptions): Promise<void>;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { capturePrivateLocalConfigRoot } from "./private-local-config-root.js";
|
|
1
2
|
import { readFungiAccountStatus, readFungiAccountTeams, readFungiTeamBalance, switchFungiAccountTeam, } from "./private-fungi-account.js";
|
|
2
3
|
export const fungiAccountCommandHelp = `Usage: fungi account [--json]
|
|
3
4
|
fungi account teams [--json]
|
|
4
5
|
fungi account use-team <team-id>
|
|
5
6
|
fungi account balance [--json]
|
|
7
|
+
fungi account prepare-credential --provider anthropic|openai
|
|
8
|
+
fungi account use-credential --provider anthropic|openai --from-file -
|
|
6
9
|
|
|
7
10
|
Read the signed-in Fungi account without exposing its credentials. The plain
|
|
8
11
|
command shows the Hub and the Team that pays for models; teams lists your
|
|
@@ -15,9 +18,9 @@ function teamFields({ teamId, handle, name }) {
|
|
|
15
18
|
}
|
|
16
19
|
/** `fungi account`: non-secret reads over Local's one Fungi account owner. */
|
|
17
20
|
export async function runFungiAccountCommand(command, options) {
|
|
18
|
-
const owner = {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
const owner = {
|
|
22
|
+
credentialPath: options.credentialPath ?? capturePrivateLocalConfigRoot().credentialPath,
|
|
23
|
+
};
|
|
21
24
|
if (options.fetch !== undefined)
|
|
22
25
|
owner.fetch = options.fetch;
|
|
23
26
|
const emit = (reply, text) => {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export { createPrivateCredentialStore, resolveDefaultCredentialPath, } from "./private-file-credential-store.js";
|
|
2
|
+
export type { McpFormApprovalRequest, McpFormApprovalDecision, McpFormAnswerResult, } from "./private-mcp-form-contract.js";
|
|
3
|
+
export { McpFormApprovalRequestSchema, mcpFormApprovalContract, } from "./private-mcp-form-contract.js";
|
|
4
|
+
export type { McpFormApprovalRefusal, RequestMcpFormApproval, } from "./private-mcp-form-elicitation.js";
|
|
2
5
|
export type { PrivateCredentialStore } from "./private-file-credential-store.js";
|
|
3
6
|
export { createPrivateModels, registerPrivateBundledModelOAuthFlows, listPrivateModels, type PrivateLocalModelChoice, } from "./local-models.js";
|
|
4
|
-
export {
|
|
7
|
+
export { resolveAgentStartupModel, type LocalStartupModel, type LocalStartupModelSource, } from "./private-local-startup-model.js";
|
|
5
8
|
export { createPrivateInvocationFilesPort } from "./private-invocation-files.js";
|
|
6
9
|
export { createPrivateInvocationComputer } from "./private-invocation-computer.js";
|
|
7
10
|
export { ensurePrivateLocalGitExclude } from "./private-local-git-exclude.js";
|
|
@@ -10,10 +13,15 @@ export { signInFungiAccount, launchPlatformBrowser, signOutFungiAccount, readFun
|
|
|
10
13
|
export { fungiAccountCommandHelp, runFungiAccountCommand, type FungiAccountCommand, } from "./fungi-account-command.js";
|
|
11
14
|
export type { PrivateFungiMcpConnectionOptions } from "./private-fungi-mcp-connection.js";
|
|
12
15
|
export { parseFungiMcpEndpoint } from "./private-fungi-mcp-endpoint.js";
|
|
16
|
+
export { readProjectFungiMcpSelection } from "./private-fungi-mcp-selection.js";
|
|
17
|
+
export { fungiMcpSelectionSchema, type PrivateFungiMcpSelection, } from "./private-fungi-mcp-selection-schema.js";
|
|
18
|
+
export { saveOysterMcpKey, OysterMcpKeyRejectedError, } from "./private-oyster-mcp-auth.js";
|
|
13
19
|
export { attachPrivateLocalComputer, detachPrivateLocalComputer, listPrivateLocalComputers, runPrivateLocalComputer, type PrivateLocalComputerAttachResult, type PrivateLocalComputerDetachResult, } from "./private-local-computer-attach.js";
|
|
14
20
|
export { openPrivateLocalRuntimeHost, type PrivateLocalRuntimeHost, type PrivateLocalRuntimeHostOptions, } from "./private-local-runtime-host.js";
|
|
15
21
|
export { openPrivateLocalShiitakeHost, openPrivateLocalShiitakeWorkerBatch, type PrivateLocalShiitakeHost, type PrivateLocalShiitakeHostOpener, type PrivateLocalShiitakeServer, type PrivateLocalShiitakeServerOpener, type PrivateLocalShiitakeWorkerBatch, type PrivateLocalShiitakeWorkerInput, type PrivateLocalShiitakeWorkerRoute, } from "./private-local-shiitake-host.js";
|
|
16
|
-
export { createPrivateLocalServiceManager, LocalSessionPathConflict, runPrivateLocalWorkerServer, type PrivateLocalServiceConnection, type PrivateLocalServiceManager, type PrivateLocalServiceRequestOptions, type PrivateLocalServiceSelection, type PrivateLocalServiceStatus, type PrivateLocalSessionChoice, type PrivateLocalSessionDiscovery, type PrivateLocalSessionInspection, type PrivateLocalSessionProblem, type PrivateLocalWorkerServerIo, } from "./private-local-service.js";
|
|
22
|
+
export { createPrivateLocalServiceManager, LocalAgentSelectionAmbiguous, LocalServiceUnreadableResponse, LocalSessionPathConflict, runPrivateLocalWorkerServer, type PrivateLocalServiceConnection, type PrivateLocalServiceManager, type PrivateLocalServiceRequestOptions, type PrivateLocalDiscoveryOptions, type PrivateLocalArchiveRequest, type PrivateLocalServiceSelection, type PrivateLocalServiceStatus, type ServiceDiagnosticsStatus, type ServiceDiagnosticsFailureCode, type PrivateLocalAgentChoice, type PrivateLocalSessionChoice, type PrivateLocalSessionDiscovery, type PrivateLocalSessionInspection, type PrivateLocalSessionProblem, type PrivateLocalWorkerServerIo, } from "./private-local-service.js";
|
|
17
23
|
export { createPrivateLocalAcpAgent, runPrivateLocalAcpStdio, type LocalAcpStdioOptions, } from "./private-local-acp-stdio.js";
|
|
18
24
|
export { listPrivateTeamComputers, startPrivateTeamComputer, } from "./private-team-computers.js";
|
|
19
25
|
export { runTrackerGitCredential } from "./tracker-git-credential.js";
|
|
26
|
+
export { activateSubscriptionCredential, CredentialActivationError, } from "./subscription-activation.js";
|
|
27
|
+
export { prepareSubscriptionIdentity } from "./subscription-identity.js";
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { createPrivateCredentialStore, resolveDefaultCredentialPath, } from "./private-file-credential-store.js";
|
|
2
|
+
export { McpFormApprovalRequestSchema, mcpFormApprovalContract, } from "./private-mcp-form-contract.js";
|
|
2
3
|
export { createPrivateModels, registerPrivateBundledModelOAuthFlows, listPrivateModels, } from "./local-models.js";
|
|
3
|
-
export {
|
|
4
|
+
export { resolveAgentStartupModel, } from "./private-local-startup-model.js";
|
|
4
5
|
export { createPrivateInvocationFilesPort } from "./private-invocation-files.js";
|
|
5
6
|
export { createPrivateInvocationComputer } from "./private-invocation-computer.js";
|
|
6
7
|
export { ensurePrivateLocalGitExclude } from "./private-local-git-exclude.js";
|
|
@@ -8,10 +9,15 @@ export { createPrivateWorkerdSandbox } from "./private-workerd-sandbox.js";
|
|
|
8
9
|
export { signInFungiAccount, launchPlatformBrowser, signOutFungiAccount, readFungiAccountStatus, switchFungiAccountTeam, freshFungiAccess, createFungiAccountOAuth, createFungiAccountCredentialStore, } from "./private-fungi-account.js";
|
|
9
10
|
export { fungiAccountCommandHelp, runFungiAccountCommand, } from "./fungi-account-command.js";
|
|
10
11
|
export { parseFungiMcpEndpoint } from "./private-fungi-mcp-endpoint.js";
|
|
12
|
+
export { readProjectFungiMcpSelection } from "./private-fungi-mcp-selection.js";
|
|
13
|
+
export { fungiMcpSelectionSchema, } from "./private-fungi-mcp-selection-schema.js";
|
|
14
|
+
export { saveOysterMcpKey, OysterMcpKeyRejectedError, } from "./private-oyster-mcp-auth.js";
|
|
11
15
|
export { attachPrivateLocalComputer, detachPrivateLocalComputer, listPrivateLocalComputers, runPrivateLocalComputer, } from "./private-local-computer-attach.js";
|
|
12
16
|
export { openPrivateLocalRuntimeHost, } from "./private-local-runtime-host.js";
|
|
13
17
|
export { openPrivateLocalShiitakeHost, openPrivateLocalShiitakeWorkerBatch, } from "./private-local-shiitake-host.js";
|
|
14
|
-
export { createPrivateLocalServiceManager, LocalSessionPathConflict, runPrivateLocalWorkerServer, } from "./private-local-service.js";
|
|
18
|
+
export { createPrivateLocalServiceManager, LocalAgentSelectionAmbiguous, LocalServiceUnreadableResponse, LocalSessionPathConflict, runPrivateLocalWorkerServer, } from "./private-local-service.js";
|
|
15
19
|
export { createPrivateLocalAcpAgent, runPrivateLocalAcpStdio, } from "./private-local-acp-stdio.js";
|
|
16
20
|
export { listPrivateTeamComputers, startPrivateTeamComputer, } from "./private-team-computers.js";
|
|
17
21
|
export { runTrackerGitCredential } from "./tracker-git-credential.js";
|
|
22
|
+
export { activateSubscriptionCredential, CredentialActivationError, } from "./subscription-activation.js";
|
|
23
|
+
export { prepareSubscriptionIdentity } from "./subscription-identity.js";
|