@sequenceholdings/artifact-studio
v0.3.1
Published
SDK types and CLI library for building Artifact Studio apps. Driven via `seq-studio artifact <sub>` (@sequenceholdings/studio-cli), which runs the `./cli` runCli export.
Keywords
Readme
Artifact Studio SDK
@sequenceholdings/artifact-studio exposes the host-provided seq client. Runtime
requests use the current user's normal permissions.
Artifact Studio is a workflow-agnostic platform primitive. The host, SDK, and deployer provide generic application capabilities; each deployed artifact owns its product behavior. Primitive code must not branch on an artifact ID or import an application's services. See Platform primitive boundaries.
Grouping calls into a trace
The Artifact host supplies tracing context automatically for supported platform requests. Use an explicit action scope to correlate several calls from one UI action and supply a readable intent key:
import { withTraceAction } from '@sequenceholdings/artifact-studio'
await withTraceAction(
{ key: 'application.refresh' },
async ({ api, functions }) => {
await functions.invoke('my-function', { refresh: true })
await api.get('/api/my-application/summary')
},
)Use a stable operation label, never an identifier, customer value or payload. Each
scope gets its own correlation ID, so concurrent actions remain separate. The
helper scopes JSON api.fetch/get/post/put/patch/delete and functions.invoke;
streaming and file-transfer helpers retain their ordinary host tracing behavior.
Tracing does not grant permissions, change service-account behavior or guarantee
that every transport is instrumented. Traces availability depends on the deployed
platform version and your app/resource permissions.
