npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@fabricorg/sdk

v0.8.5

Published

TypeScript SDK for the Fabric AI platform

Readme

@fabricorg/sdk

TypeScript client for Fabric's REST API, with resources for projects, saved agents, workflows, coding instructions and more.

Install

npm install @fabricorg/sdk
# Or
pnpm add @fabricorg/sdk

Client and authentication

createFabric(options) and new FabricClient(options) create the same client. Supply an API key as apiKey or set FABRIC_API_KEY in the calling process. The client sends it as a Bearer credential. Keep the key in server-side code or a local script.

import { createFabric } from "@fabricorg/sdk";

const fabric = createFabric({
  apiKey: process.env.FABRIC_API_KEY,
  baseUrl: "https://example.com",
  org: "example-org",
});

const identity = await fabric.auth.whoami();
const projects = await fabric.projects.list();

| Option | Default or behavior | | --- | --- | | apiKey | FABRIC_API_KEY. A missing key throws FabricAuthError. | | baseUrl | FABRIC_BASE_URL, then the default Fabric service. | | org | FABRIC_ORG. The default organization slug. | | project | FABRIC_PROJECT. The default project ID where the method accepts one. | | personal | Deprecated. Personal context is retired. The client still reads FABRIC_PERSONAL (1 or case-insensitive true) and throws INVALID_CONTEXT if an organization and personal context are both set. | | fetch | Global fetch. Supply a compatible implementation to customize requests. | | timeoutMs | 60,000 ms per attempt. | | retry | maxRetries defaults to 2, initialDelayMs to 250, multiplier to 2, and maxDelayMs to 5,000. Set maxRetries: 0 to disable retries. | | onEvent | Optional callback for request, response, retry and error events. | | userAgent | Optional User-Agent header. | | onUpgradeNotice | Optional callback receiving the X-Fabric-Cli-Upgrade response header value when present. |

withOrg(slug), withProject(projectId) and withoutContext() return new clients. Use withoutContext() to clear organization and personal defaults when the request's project determines its organization. Read the client’s project default through defaultProject.

withPersonal() is deprecated. Personal context is retired. Use withOrg(slug) for organization context, the only supported tenant context.

Resources

The SDK entry point also exports option, result and domain types. The linked resource files define method signatures.

| Namespace | Methods | | --- | --- | | auth | whoami, listKeys, createKey, revokeKey | | orgs | list | | projects | list, get, create, update, listCodeRepositories, listFeatures, getFeature, createFeature, updateFeature, assignFeature, listTasks, listDocuments, getDocument, createDocument, updateDocument, listInstructionSets, createInstructionSet, updateInstructionSet, deleteInstructionSet, getPluginName | | workflows | list, get, trigger, getExecution, listExecutions, cancelExecution | | prompts | list, get, create, update | | agents | list, get, invoke, invokeInstance, getInstanceExecution, execute (deprecated, use invoke) | | agentRuns | search, list, get, cancel, getSchedule, setSchedule | | skills | list, get | | mcp | listServers, listConfigs, getConfig, deleteConfig | | frames | list, get | | instructions | getPublished, getRepositoryState, listRepositoryFiles, readRepositoryFiles, getRepositoryFile, resolveCheckout, createDownloadUrl, createFileDownloadUrls, createVersionFileDownloadUrls, submitRepositoryChange, submitChange, getProposalPullRequest, getOpenProposals, publishChange | | contexts | linkedDocuments, linkWorkspaceDocument, unlinkWorkspaceDocument, readLinkedDocument, assemble, manifest, upsertSyncedFile, deleteSyncedFile, findMissingSyncedFiles, resetSyncedFiles | | contextQuality | inspectAgentResult, checkAgentResult, inspect, evaluate | | contextQuality.runs | capabilities, create, list, get, cancel, compare | | memory | getTargets, listFiles, getFile, createUploadUrls, submitWrite, getWrite | | workspaces | list, get, listDocuments, readDocument, query | | chats | list, get, create, rename, update, delete, sendMessage | | reports | listTemplates, getTemplate, listExecutions | | integrations | list, [slug].call(operation, args), and vendor operation paths such as slack.channels.list(). Vendor packages add types for their paths. | | channels | list, send | | approvals | list, approve, deny | | knowledge | getProjectTypes, search |

The root exports planPluginFiles, pluginPathFor, projectRulePathFor and PLUGIN_LEFT_OUT_REASONS for coding-tool file mapping, plus DOCUMENT_ERROR_CODES for document errors.

Errors

  • FabricError exposes status, optional code and optional structured data. Transport failures can use NETWORK_ERROR or TIMEOUT.
  • FabricAuthError covers missing API keys and HTTP 401.
  • FabricForbiddenError covers HTTP 403, including scope or access refusals.
  • FabricNotFoundError covers HTTP 404.
  • FabricContextConflictError exposes conflict for recognized synced-context file version conflicts (HTTP 409).

Related references

License

MIT.