ovrule-lab 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/package.json +5 -3
- package/postinstall.js +39 -0
package/README.md
CHANGED
|
@@ -5,13 +5,13 @@ TypeScript client for Ovrule case-file classification, guardrails, and receipt v
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install ovrule
|
|
8
|
+
npm install ovrule-lab
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## 1. Simple classify
|
|
12
12
|
|
|
13
13
|
```ts
|
|
14
|
-
import { classify } from "ovrule";
|
|
14
|
+
import { classify } from "ovrule-lab";
|
|
15
15
|
|
|
16
16
|
const receipt = await classify("Support agent wants to refund $5,000 without manager approval.");
|
|
17
17
|
|
|
@@ -22,7 +22,7 @@ console.log(receipt.summary);
|
|
|
22
22
|
## 2. `guard()` around an agent tool call
|
|
23
23
|
|
|
24
24
|
```ts
|
|
25
|
-
import { guard } from "ovrule";
|
|
25
|
+
import { guard } from "ovrule-lab";
|
|
26
26
|
|
|
27
27
|
const result = await guard({
|
|
28
28
|
scenario: "Finance agent wants to wire $18,000 to a new vendor after bank details changed.",
|
|
@@ -40,7 +40,7 @@ await issueWireTransfer();
|
|
|
40
40
|
## 3. LangChain middleware integration
|
|
41
41
|
|
|
42
42
|
```ts
|
|
43
|
-
import { OvruleClient } from "ovrule";
|
|
43
|
+
import { OvruleClient } from "ovrule-lab";
|
|
44
44
|
|
|
45
45
|
const ovrule = new OvruleClient({ baseUrl: "https://your-ovrule-deployment.vercel.app" });
|
|
46
46
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ovrule-lab",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "TypeScript SDK for Ovrule case-file classification, guardrails, and receipt verification.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -14,12 +14,14 @@
|
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
16
|
"dist",
|
|
17
|
-
"README.md"
|
|
17
|
+
"README.md",
|
|
18
|
+
"postinstall.js"
|
|
18
19
|
],
|
|
19
20
|
"scripts": {
|
|
20
21
|
"build": "tsc -p tsconfig.json",
|
|
21
22
|
"clean": "rm -rf dist",
|
|
22
|
-
"prepublishOnly": "npm run clean && npm run build"
|
|
23
|
+
"prepublishOnly": "npm run clean && npm run build",
|
|
24
|
+
"postinstall": "node postinstall.js"
|
|
23
25
|
},
|
|
24
26
|
"keywords": [
|
|
25
27
|
"ovrule",
|
package/postinstall.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/* eslint-disable no-console */
|
|
3
|
+
|
|
4
|
+
// Skip banner when installed as a nested / transitive dependency
|
|
5
|
+
if (process.env.npm_config_global === "true") {
|
|
6
|
+
// still show
|
|
7
|
+
} else if (process.env.INIT_CWD && process.env.INIT_CWD !== process.cwd()) {
|
|
8
|
+
// installed as a dependency of another package — skip
|
|
9
|
+
process.exit(0);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const reset = "\x1b[0m";
|
|
13
|
+
const dim = "\x1b[2m";
|
|
14
|
+
const bold = "\x1b[1m";
|
|
15
|
+
const cyan = "\x1b[36m";
|
|
16
|
+
const magenta = "\x1b[35m";
|
|
17
|
+
const yellow = "\x1b[33m";
|
|
18
|
+
|
|
19
|
+
const lines = [
|
|
20
|
+
"",
|
|
21
|
+
`${bold}${cyan} ╔═══════════════════════════════════════════════╗${reset}`,
|
|
22
|
+
`${bold}${cyan} ║${reset} ${bold}O${reset}${magenta}━━${reset}${bold}V${reset} ${bold}Ovrule${reset} · SDK v0.1.1 ${bold}${cyan}║${reset}`,
|
|
23
|
+
`${bold}${cyan} ║${reset} ${dim}Auditable receipts for AI agents${reset} ${bold}${cyan}║${reset}`,
|
|
24
|
+
`${bold}${cyan} ╚═══════════════════════════════════════════════╝${reset}`,
|
|
25
|
+
"",
|
|
26
|
+
` ${bold}Quickstart${reset}`,
|
|
27
|
+
` ${dim}import { classify } from "ovrule-lab";${reset}`,
|
|
28
|
+
` ${dim}const receipt = await classify("your agent action", {${reset}`,
|
|
29
|
+
` ${dim} baseUrl: "https://decision-receipt-lab.vercel.app"${reset}`,
|
|
30
|
+
` ${dim}});${reset}`,
|
|
31
|
+
"",
|
|
32
|
+
` ${bold}Docs${reset} ${yellow}https://decision-receipt-lab.vercel.app/docs${reset}`,
|
|
33
|
+
` ${bold}GitHub${reset} ${yellow}https://github.com/elakumuk/decision-receipt-lab${reset}`,
|
|
34
|
+
"",
|
|
35
|
+
` ${dim}Built with Codex for the OpenAI Creator Challenge, April 2026.${reset}`,
|
|
36
|
+
"",
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
console.log(lines.join("\n"));
|