Putnami
DocsGitHub

Licensed under FSL-1.1-MIT

Getting Started
Concepts
How To
Build A Web App
Build An Api Service
Share Code Between Projects
Configure Your App
Add Persistence
Add Authentication
Add Background Jobs
Principles
Tooling & Workspace
Workspace Overview
Cli
Jobs & Commands
SDK
Error Handling
Extensions
Typescript
Go
Python
Docker
Ci
Frameworks
Typescript
OverviewWebReact RoutingForms And ActionsStatic FilesApiErrors And ResponsesConfigurationLoggingHttp And MiddlewareDependency InjectionPlugins And LifecycleSessionsAuthPersistenceEventsStorageCachingWebsocketsTestingHealth ChecksTelemetryProto GrpcSmart Client
Go
OverviewHttpDependency InjectionPlugins And LifecycleConfigurationSecurityPersistenceErrorsEventsStorageCachingLoggingTelemetryGrpcService ClientsValidationOpenapiTesting
Platform
  1. DocsSeparator
  2. Tooling & WorkspaceSeparator
  3. SDK

SDK

Note: @putnami/sdk has been removed. Extensions now use the Go-based extension SDK (tooling/extension-sdk/). Hook utilities (event emission, context parsing) have been moved to @putnami/utils.

What changed

The TypeScript SDK was originally built when extensions were TypeScript-based. Now all extensions (Go, Python, CI, TypeScript) are Go binaries that use the Go extension SDK for the CLI-extension protocol.

The ~12 exports that still had external consumers were moved to @putnami/utils:

Package.json utilities

import { readPackageJson, updatePackageJson, resolvePackageExportPath, clearPackageJsonCache } from '@putnami/utils';

Hook protocol (JSONL event emission)

import {
  emitLog, emitProgress, emitArtifact, emitSummary, emitError,
  createEvent, emitEvent, parseEvent,
  type HookContext, type HookResult, HookExitCodes,
} from '@putnami/utils';

Hook command runner

import { runHookCommand, standardHookModel, readHookContext } from '@putnami/utils';

Project configuration

import { readProjectConfigFile, type ProjectConfig } from '@putnami/utils';

For extension authors

See the Extensions guide for how to build extensions using the Go SDK.

On this page

  • SDK
  • What changed
  • Package.json utilities
  • Hook protocol (JSONL event emission)
  • Hook command runner
  • Project configuration
  • For extension authors