Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .sdk-source.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"schemaVersion": 1,
"sourceCommit": "a7ac050030bc0a5bb06bf0a423db0f91cb82bfea",
"sourceCommit": "9bdddf7cd74217dcb7fc79ee83db55408060a80d",
"contract": "contracts/2026.07/public-sdk-contract.json",
"packages": [
"typescript"
Expand Down
91 changes: 89 additions & 2 deletions typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ TypeScript SDK for your licensed or self-hosted IgnitionRAG deployment. Zero dep
## Installation

```bash
npm install @ignitionai/sdk
npm install @ignitionai/sdk@next
# or
bun add @ignitionai/sdk
bun add @ignitionai/sdk@next
```

The `0.3.0-rc.3` release candidate is published under the `next` tag. The
`latest` tag remains on the stable `0.2.x` line until the official promotion.

## Setup

```typescript
Expand Down Expand Up @@ -170,6 +173,26 @@ for await (const event of stream) {
}
```

## Deep Research

Monitor and cancel a Deep Research run that was started by an agent. Closing
the stream only stops the local listener; call `cancel()` to stop the remote
execution.

```typescript
const current = await client.deepResearch.status("agent_xxxx");

if (current) {
console.log(current.execution.status, current.execution.tokenCount);
}

for await (const event of client.deepResearch.stream("agent_xxxx")) {
console.log(event.type, event.data);
}

await client.deepResearch.cancel("agent_xxxx");
```

## Agents

```typescript
Expand Down Expand Up @@ -216,6 +239,70 @@ await client.agents.delete("agent_xxxx");
await client.agents.delete("agent_xxxx", true);
```

## Workflows

```typescript
const validation = await client.workflows.validate("workflow_xxxx");
if (!validation.valid) {
console.error(validation.errors);
}

const run = await client.workflows.execute("workflow_xxxx", {
input: { question: "Summarize the latest customer feedback" },
});

const execution = await client.workflows.getExecution(run.executionId);
console.log(execution.status, execution.output);

const history = await client.workflows.listExecutions("workflow_xxxx", {
limit: 20,
});

if (execution.status === "running") {
await client.workflows.cancelExecution(execution.id);
}
```

Aborting the HTTP request does not cancel a remote workflow execution. Use
`cancelExecution()` when the execution itself must stop.

## Data Chat

Query collections and external data connectors through the same governed
request. Run the precheck first when you want to surface incompatible or
unavailable sources before execution.

```typescript
const resources = [
{ type: "collection" as const, id: "coll_xxxx" },
{ type: "data_connector" as const, id: "connector_xxxx" },
];

const precheck = await client.dataChat.precheck({
llmConfigId: "llm_xxxx",
resources,
});

if (!precheck.compatible) {
console.warn(precheck.resources.filter((resource) => !resource.compatible));
}

const response = await client.dataChat.send({
query: "Compare Q2 revenue with the signed customer reports",
llmConfigId: "llm_xxxx",
resources,
});

console.log(response.answer);
if (response.completeness === "partial") {
console.warn("Missing sources:", response.missingSources);
}
```

Every source reports its own outcome and provenance. A failed connector can
therefore produce an explicit partial response instead of hiding the failure or
discarding successful results from the other sources.

## Collections

```typescript
Expand Down
2 changes: 1 addition & 1 deletion typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ignitionai/sdk",
"version": "0.3.0-rc.2",
"version": "0.3.0-rc.3",
"description": "TypeScript SDK for licensed and self-hosted IgnitionRAG deployments",
"type": "module",
"main": "./dist/cjs/index.js",
Expand Down
2 changes: 1 addition & 1 deletion typescript/src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = "0.3.0-rc.2";
export const VERSION = "0.3.0-rc.3";
26 changes: 26 additions & 0 deletions typescript/tests/readme-contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ const readme = readFileSync(join(root, "README.md"), "utf8");
const clientSource = readFileSync(join(root, "src/client.ts"), "utf8");
const typesSource = readFileSync(join(root, "src/types.ts"), "utf8");
const mcpSource = readFileSync(join(root, "src/resources/mcp.ts"), "utf8");
const dataChatSource = readFileSync(join(root, "src/resources/data-chat.ts"), "utf8");
const workflowsSource = readFileSync(join(root, "src/resources/workflows.ts"), "utf8");
const deepResearchSource = readFileSync(join(root, "src/resources/deep-research.ts"), "utf8");

describe("README contract snippets", () => {
test("documents the SDK timeout default from source", () => {
Expand All @@ -22,4 +25,27 @@ describe("README contract snippets", () => {
expect(readme).toContain("MCP compatibility (deprecated)");
expect(readme).not.toContain("client.mcp.prompts");
});

test("documents the release-candidate install channel", () => {
expect(readme).toContain("npm install @ignitionai/sdk@next");
expect(readme).toContain("bun add @ignitionai/sdk@next");
expect(readme).toContain("`latest` tag remains on the stable `0.2.x` line");
});

test("documents every first-class execution surface", () => {
expect(dataChatSource).toContain("precheck(");
expect(dataChatSource).toContain("send(");
expect(workflowsSource).toContain("cancelExecution(");
expect(deepResearchSource).toContain("cancel(agentId:");

expect(readme).toContain("## Data Chat");
expect(readme).toContain("client.dataChat.precheck");
expect(readme).toContain("client.dataChat.send");
expect(readme).toContain('response.completeness === "partial"');
expect(readme).toContain("## Workflows");
expect(readme).toContain("client.workflows.cancelExecution");
expect(readme).toContain("## Deep Research");
expect(readme).toContain("client.deepResearch.stream");
expect(readme).toContain("client.deepResearch.cancel");
});
});