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

@indx-workspace/contracts

v0.6.9

Published

The Agent Workspace API contracts: Zod schemas, route catalogue and the contracts version every client and server share.

Readme

@indx-workspace/contracts

The wire contracts of the Agent Workspace control-plane API, as Zod schemas with derived TypeScript types. This is the package a client validates responses against and a server tests its serializers against; @indx-workspace/sdk is built on it.

It depends on zod and nothing else — no database, no framework, no Node API — so it can be imported from a browser bundle, a Node service, or an edge runtime.

Entry points

| Import | Contents | | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | @indx-workspace/contracts | ApiProblemSchema (the one error envelope), COMMON_PROBLEM_CODES, UuidSchema, IsoDateTimeSchema | | @indx-workspace/contracts/agents | AgentResourceSchema, permissions, resource assignments, list envelope, input types | | @indx-workspace/contracts/runs | RunResourceSchema, StartRunRequestSchema, StartRunResponseSchema, RunListResponseSchema, enums and bounds | | @indx-workspace/contracts/run-events | The GET /api/runs/:id/events vocabulary: control frames, run.status, relayed event names, frame data schemas | | @indx-workspace/contracts/sessions | SessionResourceSchema, envelopes, UpdateSessionPatch | | @indx-workspace/contracts/projects | ProjectResourceSchema, envelopes, ProjectSessionResponseSchema, input types | | @indx-workspace/contracts/workspaces | WorkspaceResourceSchema, WorkspaceMembershipViewSchema, envelopes, input types | | @indx-workspace/contracts/team | MEMBERSHIP_ROLES, MembershipResourceSchema, list envelope | | @indx-workspace/contracts/invitations | InvitationResourceSchema, IssuedInvitationResponseSchema, list envelope | | @indx-workspace/contracts/project-file | ProjectDocumentSchema (agent-workspace.yaml v2: engine, models, connectors, policy), readProjectDocument, DeploymentDocumentV1Schema | | @indx-workspace/contracts/setup | SETUP_QUESTIONS, SETUP_THEMES, THEME_RECOMMENDATIONS, setupQuestionApplies, the answer schemas, withRecommendedAnswers | | @indx-workspace/contracts/local-runtime | The local runtime IPC messages: LocalRuntimeMessageSchema, the per-direction unions, start policy and withheld | | @indx-workspace/contracts/policy-ceiling | ProjectPolicySchema (the project policy ceiling), policyWidenings, meetPolicyCeiling, PolicyWidening | | @indx-workspace/contracts/secret-reference | SecretReferenceSchema ({ secret: NAME }, never a value), SecretNameSchema, RESERVED_SECRET_NAMES, isReservedSecretName | | @indx-workspace/contracts/surfaces | SurfaceDefinitionSchema (rung 1 look and rung 2 layout and parts), SurfaceThemeSchema, SurfacePartsSchema, enums and bounds | | @indx-workspace/contracts/agent-versions | AgentVersionBodySchema, version draft, resource, pointer and list schemas, create-from-version, AGENT_VERSION_PROBLEM_CODES | | @indx-workspace/contracts/connectors | ConnectorResourceSchema (kinds mcp, openapi, postgres), connectorKindOf, body caps per kind, MCP inputs | | @indx-workspace/contracts/tool-connectors | Tool connector create bodies, allow rules, selectAllowedOperations, toolServerKey, connectorServerKey, GATEWAY_TOOL_ROUTE, GATEWAY_TOOL_SANDBOX_ROUTE | | @indx-workspace/contracts/feedback | RunFeedbackRequestSchema ({ rating: 'up' \| 'down', comment? }, C19), RUN_FEEDBACK_RATINGS, RUN_FEEDBACK_COMMENT_MAX_LENGTH | | @indx-workspace/contracts/evaluations | EvalCaseFileSchema (evals/<agent>.yaml), CreateEvaluationRequestSchema, EvaluationResourceSchema, EVALUATION_PROBLEM_CODES |

Reading a response

import { ApiProblemSchema } from '@indx-workspace/contracts';
import { RunResourceSchema } from '@indx-workspace/contracts/runs';

const response = await fetch(`${baseUrl}/api/runs/${runId}`, {
  headers: { authorization: `Bearer ${apiKey}`, accept: 'application/json' },
});
const body: unknown = await response.json();
if (!response.ok) {
  const { error } = ApiProblemSchema.parse(body);
  throw new Error(`${String(response.status)} ${error.code}: ${error.message}`);
}
const { run } = z.object({ run: RunResourceSchema }).parse(body);

Rules the schemas follow

  • Owned resources are .strict(): an unknown key is drift, not data. A control-plane release that adds a response field ships a new minor of this package; pin the version to the release you deploy against.
  • Dates are ISO-8601 strings; ids are UUIDs; money is a decimal string; bigint never appears.
  • Request input shapes (CreateAgentInput, ProjectPatchInput, …) are types, not schemas: the server validates them and answers field-specific problems.
  • Nothing here carries a credential. A response that would (an API key at mint time, an invitation token) is documented as shown-once on its own schema.

The design, the migration plan and the feature map are in the repository's docs/sdk/.