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
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ jobs:
tag_name: v${{ steps.version.outputs.version }}
name: Release v${{ steps.version.outputs.version }}
body: |
Release v${{ steps.version.outputs.version }} of @predicatelabs/sdk
Release v${{ steps.version.outputs.version }} of @predicate/sdk

## Installation
```bash
npm install @predicatelabs/sdk@${{ steps.version.outputs.version }}
npm install @predicate/sdk@${{ steps.version.outputs.version }}
```
draft: false
prerelease: false
Expand Down
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

All notable changes to `@predicatelabs/sdk` will be documented in this file.
All notable changes to `@predicate/sdk` will be documented in this file.

## Unreleased

Expand All @@ -24,7 +24,7 @@ import {
PredicateBrowserAgent,
type RuntimeStep,
LocalLLMProvider, // or OpenAIProvider / AnthropicProvider / DeepInfraProvider
} from '@predicatelabs/sdk';
} from '@predicate/sdk';

const runtime = new AgentRuntime(browserLike, page, tracer);
const llm = new LocalLLMProvider({ model: 'qwen2.5:7b', baseUrl: 'http://localhost:11434/v1' });
Expand Down Expand Up @@ -65,7 +65,7 @@ const agent = new PredicateBrowserAgent({
If you set `captcha.policy="callback"`, you must provide a handler. The SDK does **not** include a public CAPTCHA solver.

```ts
import { HumanHandoffSolver } from '@predicatelabs/sdk';
import { HumanHandoffSolver } from '@predicate/sdk';

const agent = new PredicateBrowserAgent({
runtime,
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The core loop is:
## Install

```bash
npm install @predicatelabs/sdk
npm install @predicate/sdk
npx playwright install chromium
```

Expand All @@ -51,9 +51,9 @@ Use the new `Predicate*` class names for all new code:
## Quickstart: a verification-first loop

```ts
import { PredicateBrowser, AgentRuntime } from '@predicatelabs/sdk';
import { JsonlTraceSink, Tracer } from '@predicatelabs/sdk';
import { exists, urlContains } from '@predicatelabs/sdk';
import { PredicateBrowser, AgentRuntime } from '@predicate/sdk';
import { JsonlTraceSink, Tracer } from '@predicate/sdk';
import { exists, urlContains } from '@predicate/sdk';
import type { Page } from 'playwright';

async function main(): Promise<void> {
Expand Down Expand Up @@ -96,7 +96,7 @@ Key idea: your agent still executes actions — Predicate **snapshots and verifi

```ts
import type { Page } from 'playwright';
import { PredicateDebugger, Tracer, JsonlTraceSink, exists, urlContains } from '@predicatelabs/sdk';
import { PredicateDebugger, Tracer, JsonlTraceSink, exists, urlContains } from '@predicate/sdk';

async function runExistingAgent(page: Page): Promise<void> {
const tracer = new Tracer('run-123', new JsonlTraceSink('trace.jsonl'));
Expand All @@ -123,7 +123,7 @@ async function runExistingAgent(page: Page): Promise<void> {
If you want Predicate to drive the loop end-to-end, you can use the SDK primitives directly: take a snapshot, select elements, act, then verify.

```ts
import { PredicateBrowser, snapshot, find, typeText, click, waitFor } from '@predicatelabs/sdk';
import { PredicateBrowser, snapshot, find, typeText, click, waitFor } from '@predicate/sdk';

async function loginExample(): Promise<void> {
const browser = new PredicateBrowser();
Expand Down Expand Up @@ -201,7 +201,7 @@ if (!ok) {
## ToolRegistry (LLM-callable tools)

```ts
import { ToolRegistry, registerDefaultTools } from '@predicatelabs/sdk';
import { ToolRegistry, registerDefaultTools } from '@predicate/sdk';

const registry = new ToolRegistry();
registerDefaultTools(registry);
Expand All @@ -213,8 +213,8 @@ const toolsForLLM = registry.llmTools();
Chrome permission prompts are outside the DOM and can be invisible to snapshots. Prefer setting a policy **before navigation**.

```ts
import { PredicateBrowser } from '@predicatelabs/sdk';
import type { PermissionPolicy } from '@predicatelabs/sdk';
import { PredicateBrowser } from '@predicate/sdk';
import type { PermissionPolicy } from '@predicate/sdk';

const policy: PermissionPolicy = {
default: 'clear',
Expand Down Expand Up @@ -248,7 +248,7 @@ If your backend supports it, you can also use ToolRegistry permission tools (`gr
## Downloads (verification predicate)

```ts
import { downloadCompleted } from '@predicatelabs/sdk';
import { downloadCompleted } from '@predicate/sdk';

runtime.assert(downloadCompleted('report.csv'), 'download_ok', true);
```
Expand Down
4 changes: 2 additions & 2 deletions examples/agent-runtime-captcha-strategies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
HumanHandoffSolver,
SentienceBrowser,
VisionSolver,
} from '@predicatelabs/sdk';
import { createTracer } from '@predicatelabs/sdk';
} from '@predicate/sdk';
import { createTracer } from '@predicate/sdk';

async function notifyWebhook(ctx: any): Promise<void> {
console.log(`[captcha] external resolver notified: url=${ctx.url} run_id=${ctx.runId}`);
Expand Down
2 changes: 1 addition & 1 deletion examples/lang-chain/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ These examples show how to wrap Sentience TS SDK primitives as LangChain JS tool
Install (example):

```bash
npm install @predicatelabs/sdk @langchain/core zod
npm install @predicate/sdk @langchain/core zod
```

Run:
Expand Down
2 changes: 1 addition & 1 deletion examples/lang-chain/sentience-tools-demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Example: Wrap Sentience TS SDK primitives as LangChain JS tools.
*
* Install (example):
* npm install @predicatelabs/sdk @langchain/core zod
* npm install @predicate/sdk @langchain/core zod
*
* Run:
* npx ts-node examples/lang-chain/sentience-tools-demo.ts
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@predicatelabs/sdk",
"name": "@predicate/sdk",
"version": "1.0.5",
"description": "TypeScript SDK for Sentience AI Agent Browser Automation",
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/visual-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ Return ONLY the integer ID number from the label, nothing else.`;
playgroundPath = path.join(cwd, 'playground', 'images');
} else {
// Check if we're in a playground context via module path
const modulePaths = require.resolve.paths('@predicatelabs/sdk') || [];
const modulePaths = require.resolve.paths('@predicate/sdk') || [];
for (const modulePath of modulePaths) {
const potentialPlayground = path.join(modulePath, '..', 'playground', 'images');
if (fs.existsSync(path.dirname(potentialPlayground))) {
Expand Down
Loading