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 sentienceapi
Release v${{ steps.version.outputs.version }} of @predicatelabs/sdk

## Installation
```bash
npm install sentienceapi@${{ steps.version.outputs.version }}
npm install @predicatelabs/sdk@${{ steps.version.outputs.version }}
```
draft: false
prerelease: false
Expand Down
22 changes: 11 additions & 11 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 sentienceapi
npm install @predicatelabs/sdk
npx playwright install chromium
```

Expand All @@ -41,9 +41,9 @@ npx playwright install chromium
## Quickstart: a verification-first loop

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

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

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

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

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

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

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

const registry = new ToolRegistry();
registerDefaultTools(registry);
Expand All @@ -185,8 +185,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 { SentienceBrowser } from 'sentienceapi';
import type { PermissionPolicy } from 'sentienceapi';
import { SentienceBrowser } from '@predicatelabs/sdk';
import type { PermissionPolicy } from '@predicatelabs/sdk';

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

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

runtime.assert(downloadCompleted('report.csv'), 'download_ok', true);
```
Expand All @@ -230,7 +230,7 @@ runtime.assert(downloadCompleted('report.csv'), 'download_ok', true);
- **Manual driver CLI**:

```bash
npx sentience driver --url https://example.com
npx predicate driver --url https://example.com
```

- **Verification + artifacts + debugging with time-travel traces (Sentience Studio demo)**:
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 'sentienceapi';
import { createTracer } from 'sentienceapi';
} from '@predicatelabs/sdk';
import { createTracer } from '@predicatelabs/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 sentienceapi @langchain/core zod
npm install @predicatelabs/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 sentienceapi @langchain/core zod
* npm install @predicatelabs/sdk @langchain/core zod
*
* Run:
* npx ts-node examples/lang-chain/sentience-tools-demo.ts
Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "sentienceapi",
"name": "@predicatelabs/sdk",
"version": "0.99.7",
"description": "TypeScript SDK for Sentience AI Agent Browser Automation",
"main": "dist/index.js",
Expand Down Expand Up @@ -27,7 +27,7 @@
"cli": "ts-node src/cli.ts"
},
"bin": {
"sentience": "./dist/cli.js"
"predicate": "./dist/cli.js"
},
"dependencies": {
"canvas": "^3.2.1",
Expand Down
2 changes: 1 addition & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ async function main() {
' sentience record --proxy http://user:pass@proxy.com:8000 --url https://example.com'
);
console.log(' sentience gen trace.json --lang py --output script.py');
console.log(' sentience driver --url https://example.com');
console.log(' predicate driver --url https://example.com');
process.exit(1);
}
}
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('sentienceapi') || [];
const modulePaths = require.resolve.paths('@predicatelabs/sdk') || [];
for (const modulePath of modulePaths) {
const potentialPlayground = path.join(modulePath, '..', 'playground', 'images');
if (fs.existsSync(path.dirname(potentialPlayground))) {
Expand Down
Loading