Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@fungi.computer/truffle

Latest version: v0.22.2

Overview

Last scanned
23 Nov 2026
Published
23 Nov 2026
npm package Publisher: liltechnomancer
93 Versions
17.2K Downloads

Scan summary

@fungi.computer/truffle was last scanned on 23 Nov 2026 at version 0.22.2. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 93 versions; the latest 5 were published on 23 Nov 2026.
  • Findings: No rules fired in version 0.22.2.
  • Downloads: 17,183 downloads.

Versions

93 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.22.2 LATEST 23 Nov 2026 No rules fired
0.22.1 23 Nov 2026 No rules fired
0.22.0 23 Nov 2026 No rules fired
0.21.6 23 Nov 2026 Not shown
0.21.5 23 Nov 2026 Not shown

No rules fired in 0.22.2

Findings

Findings for v0.22.2. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.22.2; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

Truffle (@fungi.computer/truffle)

Truffle is the local runtime behind Spore's fungi command. It runs Shiitake Agents and their saved Sessions on your own machine as a background service, and owns their SQLite storage, model credentials, project files and shell tools. The terminal and editor clients are only views onto it.

Use it

Install Spore; it bundles Truffle:

npm install -g @fungi.computer/spore
fungi

Truffle is published so Spore can depend on it. Its entry points are the contract between Spore's clients and the local service, not a separate product to embed.

Subscription sign-in

To change your ChatGPT subscription account, log out and log in:

fungi logout --provider openai
fungi login --provider openai --auth-type oauth

Local does not import subscription credentials from another account manager.

An installed extension can fill a subscription sign-in slot Fungi does not provide (see Installed extensions). When no extension fills a slot, a saved subscription sign-in stays in the credential file untouched and fungi status reports it as kept and inactive; fungi logout --provider <id> removes it, and installing an extension that provides it brings it back. fungi login --provider <id> --auth-type oauth for such a slot says an extension is needed instead of "does not offer".

Fungi remains the credential refresher. Local pins the Anthropic/OpenAI account at the accepted turn boundary, including all subsequent tool iterations. Pi refreshes that same account under the existing store lock while it remains active; refreshed tokens do not change the pinned identity. The next turn picks up the new login without restarting the service.

Pi's openai provider uses the ChatGPT direct-token flow, not the legacy openai-codex flow. Its credentials contain clientId and scopes, but do not add accountId. Local decodes the access token with jose; only its issuer and person sub identify the OpenAI subscription. Same-person refreshes are adopted; a different issuer or subject is not. Workspace metadata is not identity. An OpenAI grant without a provable person cannot establish turn continuity. An already-started refresh is committed under Pi's existing lock before Local decides whether the turn can adopt it; refusal or cancellation must not discard the rotated refresh token or restore a released pin.

After logging out of A and into B, the current turn may continue using A's still-valid token, but never refreshes inactive A. If A expires, its next request ends the turn with the typed, redacted account-switched-during-turn refusal: retry on the next turn using B. Completed tool results remain in the Session.

OpenAI uses unpatched Pi OAuth: Local neither intercepts the code exchange nor reads its ID token. After Pi returns a grant, Local requires a usable issuer and subject in the access token before storage. No OpenAI workspace accountId is captured or retained across refresh. Failures expose identity-unavailable and bounded claim names, never token or claim values, and preserve the prior entry. A turn detects a different OpenAI person by issuer and subject and refuses as account-switched-during-turn.

Auth tests inject a fixture ChatGPT OAuth provider through openPrivateModels and pass the resulting collection to runLocalAuthCli. They do not start Pi's callback server or bind an OAuth port. Explicit temporary credential paths and real-file size/mtime guards prevent touching the person's credentials. After building Truffle's dependencies, pnpm --dir runtimes/local proof:unpatched-login packs Truffle with npm and signs in through that fixture in an external npm consumer using registry pi-ai 1.3.0. This qualifies the local seam and stored person identity, not a live OpenAI authorization.

A provider HTTP refusal is reported as provider_rejected with its status code only, never the response body. Use Fungi's ordinary login flow in a private temporary HOME for additional accounts. External vault managers must reconcile the live credential before switching and treat activation conflicts as failures, not overwrite permission. This contract does not authorize a live import, login change or cutover.

Host and Session lifetime

openPrivateLocalRuntimeHost captures the canonical project root and opens the Agent's SQLite store, Shiitake owner, model source and tool resources. A fresh Agent store lives under the project's .fungi/agents/. Reopening a store retains its Agent identity and Sessions. Corrupt, unreadable or already-owned stores remain explicit failures, not reasons to silently create a replacement.

openPrivateLocalShiitakeHost mounts the ordinary Shiitake HTTP routes through an injected loopback server opener and returns the neutral client and main Session. Closing it releases the client, transport and owner. The worker-batch variant owns several named routes on one server. Closing the batch closes their resources.

The service manager discovers or starts the same user's shared background service. It selects project stores and creates or resumes Sessions through that owner. Closing a client connection does not stop the service or erase its Session. The CLI's fungi stop sends the service SIGTERM, which drains its owners; a service still running 5 s later is SIGKILLed, and its service.json and owner lock are removed either way. A SIGKILL ends only the service process: the shell and exec commands its Agents started run detached in their own process groups and can keep running after it (client-surfaces-v1-79). Interrupted turns resume when the service next starts.

The service releases an Agent nothing is using. It counts each request and each open Session watch on that Agent, and every mail or control operation that reaches it. An unused Agent with no running or waiting Session, Watchdog job, scheduled wake, reply still owed a delivery attempt or running background process is closed after two consecutive idle checks (one per minute). Delivered reply receipts and dead letters stay in the outbox but owe nothing. Work an Agent delegated is owed by its child, whose reply mail reopens the parent. It is then dropped from ~/.fungi/service/owners.json. The next request, mail or send reopens it. Shutdown keeps only Agents with work in that file, so a restart reopens just those. A released Agent's per-Session client PATH binding and exited background-process logs end with it.

~/.fungi/service/service.json and the service's status route record its version (the packed CLI's content hash, or source) and protocol (the client-service wire contract). Every TUI or CLI start ensures its own build: it reuses a service of the same version, and otherwise stops the registered one as fungi stop does and starts its own. A window that has already reached a service never replaces one: it keeps a newer build that speaks its protocol, and for another protocol shows only "The Fungi service was updated. Restart this window." Saved Sessions remain on disk throughout.

Version policy: a fresh launch of a different build replaces the running service, so use one installed build per service directory (~/.fungi/service). Every source checkout counts as the same source version, so restart the service (fungi stop) after editing the source.

Service diagnostics candidate

private-local-service-log.ts owns the service's JSON record contract, native file sink and always-on five-minute sampler. It retains all maintained bun:jsc type counts when the encoded record fits 32 KiB. If not, it emits an explicit map omission summary rather than selecting a top-N subset or truncating JSON. Counts include uncollected allocations; they are not retained-root evidence. Unavailable statistics are explicit, never zero substitutes.

CTO ruling dc105 selects the runtime's own filesystem primitives, owned by this same module. The sink opens append with mode 0600 and verifies the descriptor without chmod repair, checks byte counts on every write, and rotates using checked native renames. No logger framework, worker, retry loop or second store is part of this contract.

The candidate policy is one active 1 MiB file plus three 1 MiB backups, not a four-backup policy. Disposal must precede the existing owner lease release. No inspector, environment debug switch, forced GC or memory-leak fix is implied. The separate 4,096-cycle memory experiment did not reproduce the reported sustained growth.

Stall evidence

The ordinary service process and bundled CLI run the existing listener in one worker. Their main thread runs the watchdog in private-local-service-supervisor.ts; the listener still owns the same process PID, SQLite lease, Agent owners and discovery record. An embedded listener is still available directly from its private module for hosts supplying their own runtime ports. The service-process entry exports runPrivateLocalServiceProcess and its LocalServiceProcessOptions type. Options may tighten the stall/startup bounds; a supplied worker and shared heartbeat must be provided together.

After readiness, the worker increments a shared heartbeat counter every second. The watchdog times changes with its own monotonic clock. Thirty seconds without a heartbeat produces watchdog-exit.json with the typed event-loop-stall reason, bound, observed lag, PID and build version. Startup has a separate 60-second deadline; requested shutdown keeps a 4.5-second outer drain budget. The watchdog arms an unconditional exit timer before starting asynchronous evidence I/O. Capture has at most 200 ms to finish; the process exits with status 1 on completion or budget expiry, without waiting for I/O or worker cleanup. This ends a blocked worker without depending on its timers or signals. Ordinary SIGTERM still drains the listener and exits normally. The existing start/supervisor mechanism owns replacement.

The listener records normalized text, thinking and tool-call deltas before forwarding them. Raw events pass through a small Zod output projection: selected Responses text, reasoning and function-call argument deltas retain only their type, delta and output/content indices. Every unselected field is discarded; created/completed response objects and unsupported wire events produce omission metadata instead. Response configuration, including echoed instructions, never reaches the trace serializer. service-stream.jsonl uses the same checked native writer as the regular log, with one 1 MiB file and three backups, all mode 0600. String fields are bounded before serialization, including raw deltas; a large event is never serialized merely to discover its size. Each trace record is at most 8 KiB after UTF-8/JSON encoding; larger events get explicit omission records. Request IDs join the bounded records without retaining growing partial-message copies. No unbounded in-memory trace or IPC queue is introduced. These private artifacts contain provider output, including thinking; prompts and authentication headers are not recorded by this observer.

On a stall, the watchdog attempts to freeze the last 4 MiB of stream records into watchdog-stream.jsonl, flush the files, and record whether capture succeeded, was empty, or failed within the 200 ms window. A pending manifest means capture was incomplete when the process exited; it does not promise a durable snapshot. A failed or stuck filesystem may leave no evidence at all. Incident files are replaced in place, so an interrupted capture can be partial. Normal logging after a restart does not overwrite that snapshot. The next watchdog incident replaces the two fixed incident files, so incident storage is bounded too. A failed capture cannot prevent process exit and is never reported as a successful snapshot. This is stream evidence, not a heap snapshot or a fix for the unresolved string-growth cause.

The same main-thread watchdog bounds memory. It samples process RSS about once a second; when RSS stays above rssLimitBytes for rssSustainMs (defaults: the smaller of 4 GiB and half the machine's memory, sustained 60 seconds) it writes watchdog-exit.json with the rss-bound reason, the limit, the last 32 RSS samples, the open descriptor count and the uptime, then exits with status 75 (1 remains the stall code). Nothing supervises the service as a daemon: the next client request restarts it through the ordinary start path, so a runaway can only repeat after another sustained minute over the bound.

Every command the service starts is also recorded as a process group (<home>/.fungi/process-groups/<id>.json: group id, leader start time, owning service pid and start time). A graceful stop ends commands through the owner drain. After a SIGKILL, watchdog exit or crash, fungi stop and the next service start SIGKILL the recorded groups of dead owners. A record whose leader PID now has a different start time is skipped, and a live owner's groups are never touched. Linux reads /proc start ticks; macOS reads ps -o lstart= (one-second resolution, used only for these records, not as service signal authority); other platforms record nothing.

pnpm --dir runtimes/local test:service-watchdog deliberately blocks the real listener's event loop, verifies signal-free status-1 exit and replayable provider records, reopens the same service directory, checks normal heartbeat/SIGTERM behavior, injects an evidence-write failure, and reuses the review's native six-second fsync delay to prove I/O cannot hold exit. The ordinary Bun batch includes this test. The Node suite also checks record omission and bounded trace rotation.

The diagnostics resource records startup/ready and observed stop reasons and owns only its sampler/writer. Both entry paths use the existing listener owner, which disposes diagnostics before registration removal and lease release. Diagnostics I/O faults do not stop the service, turns or normal shutdown.

Native fixtures allocate only under this worktree's ignored .botanical/service-log-fixtures/; child HOME and TMPDIR are fixture-owned. Primitive-only native tests use the diagnostics resource directly; later service/CLI/doctor proofs load the real consumer closure separately. Short-count injection controls the maintained SDK return value; it is not an OS-generated short-write claim. Rename-fault tests use an actual filesystem collision.

CTO decision ee8f5320e0de selects continued service operation with explicit failed diagnostics. The first sink fault latches a bounded code and stable first-failure ISO timestamp, stops the sampler and attempts writer disposal once. Later requests read that current resource state, not the startup connection snapshot. Opening/writing/closing failures are distinct; a failed heap read emits memory-unavailable, never zero statistics. No retries, separate journal or store, environment switch or new runtime owner is added.

Protocol 2 requires diagnostics on live /status and /inspect responses; the registration file remains identity-only. The maintained Zod live decoder rejects missing diagnostics rather than assuming ACTIVE. fungi doctor performs only the manager's live status read and prints FAILED <code> since <timestamp> (or ACTIVE). It never starts/restarts the service.

The earlier LogTape probe was rejected on native mode and swallowed-rename failures; it is not an adoption option. Its old candidate tests are superseded by native-fs tests, with the historical probe preserved separately. Dependency removal uses the maintained package operation, not hand-edited lock state. Focused native tests do not qualify the service/CLI/doctor consumer closure or authorize production enablement; those remain subject to the built-dependency merge gate.

The service acquires its SQLite owner row and writes its PID and process-start identity in the same transaction. service.json is only a pointer to that row; a matching file or HTTP handshake alone does not authorize a signal. Before stopping, the client requires the file to match the live lease owner and checks that process's start identity (Linux /proc/<pid>/stat starttime). It checks the process identity again before each signal. These are separate reads and kill calls: a residual read-to-signal PID-reuse window remains; this is not an atomic kernel process handle.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @fungi.computer/truffle

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

PHP2Shell, Day 5 93.6% of Measurable Instances Still Unpatched (1)
Vulnerability Insights

PHP2Shell, Day 5: The Panic Hasn’t Turned Into Patching

Frame 2085668439 (1)
Group 1261154229