🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@sapiom/cli

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sapiom/cli - npm Package Compare versions

Comparing version
1.0.2
to
1.0.3
+32
dist/__tests__/published-authoring-assets.test.js
import { readFileSync } from "node:fs";
import path from "node:path";
const PACKAGE_ROOT = path.resolve(__dirname, "..", "..");
const TEMPLATE_ROOT = path.join(PACKAGE_ROOT, "templates", "default");
const packageJson = JSON.parse(readFileSync(path.join(PACKAGE_ROOT, "package.json"), "utf8"));
describe("published authoring assets", () => {
it("keeps the legacy template in the published CLI boundary", () => {
expect(packageJson.files).toContain("templates");
});
it("uses Agent and Agent run terminology in legacy template prose", () => {
const prose = ["AGENTS.md", "CLAUDE.md", "README.md", "index.ts"]
.map((file) => readFileSync(path.join(TEMPLATE_ROOT, file), "utf8"))
.join("\n");
expect(prose).toContain("Sapiom agent");
expect(prose).toContain("agent run");
expect(prose).not.toMatch(/\b(?:workflow|workflows|orchestration|orchestrations)\b/i);
});
it("uses Agent terminology in npm metadata", () => {
expect(packageJson.description).toBe("The Sapiom command-line interface — scaffold, validate, and ship Sapiom agents.");
expect(packageJson.keywords).toEqual([
"sapiom",
"cli",
"agents",
"automation",
]);
});
it("uses the canonical public Agent command identifiers", () => {
const templatePackage = JSON.parse(readFileSync(path.join(TEMPLATE_ROOT, "package.json"), "utf8"));
expect(templatePackage.scripts.check).toBe("sapiom agents check");
expect(templatePackage.scripts.deploy).toBe("sapiom agents deploy");
});
});
+7
-7
{
"name": "@sapiom/cli",
"version": "1.0.2",
"description": "The Sapiom command-line interface — scaffold, validate, and ship Sapiom orchestrations.",
"version": "1.0.3",
"description": "The Sapiom command-line interface — scaffold, validate, and ship Sapiom agents.",
"license": "MIT",

@@ -16,4 +16,4 @@ "author": "Sapiom",

"cli",
"orchestration",
"workflows"
"agents",
"automation"
],

@@ -34,4 +34,4 @@ "bin": {

"zod": "^3.25.76",
"@sapiom/agent": "^0.9.0",
"@sapiom/agent-core": "^0.9.13",
"@sapiom/agent": "^0.9.1",
"@sapiom/agent-core": "^0.10.0",
"@sapiom/analytics-core": "^0.2.1",

@@ -41,3 +41,3 @@ "@sapiom/sandbox-preview": "^0.1.10"

"peerDependencies": {
"@sapiom/harness": ">=0.2.5"
"@sapiom/harness": ">=0.2.6"
},

@@ -44,0 +44,0 @@ "peerDependenciesMeta": {

@@ -1,8 +0,8 @@

# Working in this orchestration
# Working in this agent project
This project defines exactly one Sapiom orchestration in `index.ts`, authored against `@sapiom/agent`.
This project defines exactly one Sapiom agent in `index.ts`, authored against `@sapiom/agent`.
## The loop
1. Edit `index.ts`. An orchestration is `defineAgent({ entry, steps })`; each step is `defineStep({ name, next, run })`. Inside `run`, Sapiom capabilities are available pre-auth'd on `ctx.sapiom`.
1. Edit `index.ts`. An agent is `defineAgent({ entry, steps })`; each step is `defineStep({ name, next, run })`. Inside `run`, Sapiom capabilities are available pre-auth'd on `ctx.sapiom`.
2. `npm run check` — validate locally (bundles, builds the manifest, checks the step graph). Fast and offline; run it after every edit.

@@ -14,3 +14,3 @@ 3. `npm run deploy` — ship it.

- Use `npm run check` as the tight feedback loop — prefer it over reasoning about whether the graph is valid.
- For exact command options, run `sapiom orchestrations --help`, and pass `--json` to any command for machine-readable output. Don't hardcode capability lists or schemas — query them at runtime.
- For exact command options, run `sapiom agents --help`, and pass `--json` to any command for machine-readable output. Don't hardcode capability lists or schemas — query them at runtime.
- Keep exactly one `defineAgent(...)` export in `index.ts`.

@@ -1,1 +0,1 @@

See [AGENTS.md](./AGENTS.md) for how to work in this orchestration project.
See [AGENTS.md](./AGENTS.md) for how to work in this agent project.

@@ -7,4 +7,4 @@ {

"scripts": {
"check": "sapiom orchestrations check",
"deploy": "sapiom orchestrations deploy",
"check": "sapiom agents check",
"deploy": "sapiom agents deploy",
"typecheck": "tsc --noEmit",

@@ -11,0 +11,0 @@ "format": "prettier --write \"**/*.ts\"",

# __PROJECT_NAME__
A Sapiom orchestration, authored as code against [`@sapiom/agent`](https://www.npmjs.com/package/@sapiom/agent).
A Sapiom agent, authored as code against [`@sapiom/agent`](https://www.npmjs.com/package/@sapiom/agent).

@@ -11,3 +11,3 @@ ## Getting started

Then open `index.ts`. The orchestration is defined with `defineAgent({ steps })`; each step is a `defineStep({ name, next, run })`. The `run` body is ordinary code — and inside it, the full Sapiom tool catalog is available, pre-auth'd and tenant-scoped, on `ctx.sapiom`:
Then open `index.ts`. The agent is defined with `defineAgent({ steps })`; each step is a `defineStep({ name, next, run })`. The `run` body is ordinary code — and inside it, the full Sapiom tool catalog is available, pre-auth'd and tenant-scoped, on `ctx.sapiom`:

@@ -19,3 +19,3 @@ ```ts

No credentials to wire — a per-execution tenant credential is injected when your orchestration runs.
No credentials to wire — a per-execution tenant credential is injected for each agent run.

@@ -22,0 +22,0 @@ ## The loop