@thyn-ai/sqai 0.1.0
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/LICENSE +202 -0
- package/dist/index.cjs +1965 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +555 -0
- package/dist/index.d.ts +555 -0
- package/dist/index.js +1925 -0
- package/dist/index.js.map +1 -0
- package/dist/unsafe.cjs +38 -0
- package/dist/unsafe.cjs.map +1 -0
- package/dist/unsafe.d.cts +20 -0
- package/dist/unsafe.d.ts +20 -0
- package/dist/unsafe.js +13 -0
- package/dist/unsafe.js.map +1 -0
- package/package.json +60 -0
package/dist/unsafe.cjs
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/unsafe.ts
|
|
21
|
+
var unsafe_exports = {};
|
|
22
|
+
__export(unsafe_exports, {
|
|
23
|
+
getUnsafeAlgentaRuntime: () => getUnsafeAlgentaRuntime
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(unsafe_exports);
|
|
26
|
+
var import_algenta_sdk = require("algenta-sdk");
|
|
27
|
+
function getUnsafeAlgentaRuntime(options = {}) {
|
|
28
|
+
return new import_algenta_sdk.Runtime({
|
|
29
|
+
mode: options.mode ?? "local",
|
|
30
|
+
...options.apiKey ? { apiKey: options.apiKey } : {},
|
|
31
|
+
...options.baseUrl ? { baseUrl: options.baseUrl } : {}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
35
|
+
0 && (module.exports = {
|
|
36
|
+
getUnsafeAlgentaRuntime
|
|
37
|
+
});
|
|
38
|
+
//# sourceMappingURL=unsafe.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/unsafe.ts"],"sourcesContent":["/** Explicit escape hatch — NOT part of the SQAI contract.\n *\n * The read-only, deterministic, policy, provenance, and compatibility\n * guarantees apply only to the SQAI public methods. The unsafe Algenta\n * runtime returned here bypasses the capability contract, policy allow-lists,\n * seed enforcement, and the parity matrix, and is never available through\n * @thyn-ai/sqai-ai-sdk. Import from \"@thyn-ai/sqai/unsafe\" only when you own the\n * consequences.\n */\n\nimport { Runtime } from \"algenta-sdk\";\n\nexport interface UnsafeRuntimeOptions {\n mode?: \"local\" | \"api\" | \"self_hosted\";\n apiKey?: string;\n baseUrl?: string;\n}\n\nexport function getUnsafeAlgentaRuntime(options: UnsafeRuntimeOptions = {}): Runtime {\n return new Runtime({\n mode: options.mode ?? \"local\",\n ...(options.apiKey ? { apiKey: options.apiKey } : {}),\n ...(options.baseUrl ? { baseUrl: options.baseUrl } : {}),\n } as ConstructorParameters<typeof Runtime>[0]);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,yBAAwB;AAQjB,SAAS,wBAAwB,UAAgC,CAAC,GAAY;AACnF,SAAO,IAAI,2BAAQ;AAAA,IACjB,MAAM,QAAQ,QAAQ;AAAA,IACtB,GAAI,QAAQ,SAAS,EAAE,QAAQ,QAAQ,OAAO,IAAI,CAAC;AAAA,IACnD,GAAI,QAAQ,UAAU,EAAE,SAAS,QAAQ,QAAQ,IAAI,CAAC;AAAA,EACxD,CAA6C;AAC/C;","names":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Runtime } from 'algenta-sdk';
|
|
2
|
+
|
|
3
|
+
/** Explicit escape hatch — NOT part of the SQAI contract.
|
|
4
|
+
*
|
|
5
|
+
* The read-only, deterministic, policy, provenance, and compatibility
|
|
6
|
+
* guarantees apply only to the SQAI public methods. The unsafe Algenta
|
|
7
|
+
* runtime returned here bypasses the capability contract, policy allow-lists,
|
|
8
|
+
* seed enforcement, and the parity matrix, and is never available through
|
|
9
|
+
* @thyn-ai/sqai-ai-sdk. Import from "@thyn-ai/sqai/unsafe" only when you own the
|
|
10
|
+
* consequences.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
interface UnsafeRuntimeOptions {
|
|
14
|
+
mode?: "local" | "api" | "self_hosted";
|
|
15
|
+
apiKey?: string;
|
|
16
|
+
baseUrl?: string;
|
|
17
|
+
}
|
|
18
|
+
declare function getUnsafeAlgentaRuntime(options?: UnsafeRuntimeOptions): Runtime;
|
|
19
|
+
|
|
20
|
+
export { type UnsafeRuntimeOptions, getUnsafeAlgentaRuntime };
|
package/dist/unsafe.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Runtime } from 'algenta-sdk';
|
|
2
|
+
|
|
3
|
+
/** Explicit escape hatch — NOT part of the SQAI contract.
|
|
4
|
+
*
|
|
5
|
+
* The read-only, deterministic, policy, provenance, and compatibility
|
|
6
|
+
* guarantees apply only to the SQAI public methods. The unsafe Algenta
|
|
7
|
+
* runtime returned here bypasses the capability contract, policy allow-lists,
|
|
8
|
+
* seed enforcement, and the parity matrix, and is never available through
|
|
9
|
+
* @thyn-ai/sqai-ai-sdk. Import from "@thyn-ai/sqai/unsafe" only when you own the
|
|
10
|
+
* consequences.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
interface UnsafeRuntimeOptions {
|
|
14
|
+
mode?: "local" | "api" | "self_hosted";
|
|
15
|
+
apiKey?: string;
|
|
16
|
+
baseUrl?: string;
|
|
17
|
+
}
|
|
18
|
+
declare function getUnsafeAlgentaRuntime(options?: UnsafeRuntimeOptions): Runtime;
|
|
19
|
+
|
|
20
|
+
export { type UnsafeRuntimeOptions, getUnsafeAlgentaRuntime };
|
package/dist/unsafe.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// src/unsafe.ts
|
|
2
|
+
import { Runtime } from "algenta-sdk";
|
|
3
|
+
function getUnsafeAlgentaRuntime(options = {}) {
|
|
4
|
+
return new Runtime({
|
|
5
|
+
mode: options.mode ?? "local",
|
|
6
|
+
...options.apiKey ? { apiKey: options.apiKey } : {},
|
|
7
|
+
...options.baseUrl ? { baseUrl: options.baseUrl } : {}
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
getUnsafeAlgentaRuntime
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=unsafe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/unsafe.ts"],"sourcesContent":["/** Explicit escape hatch — NOT part of the SQAI contract.\n *\n * The read-only, deterministic, policy, provenance, and compatibility\n * guarantees apply only to the SQAI public methods. The unsafe Algenta\n * runtime returned here bypasses the capability contract, policy allow-lists,\n * seed enforcement, and the parity matrix, and is never available through\n * @thyn-ai/sqai-ai-sdk. Import from \"@thyn-ai/sqai/unsafe\" only when you own the\n * consequences.\n */\n\nimport { Runtime } from \"algenta-sdk\";\n\nexport interface UnsafeRuntimeOptions {\n mode?: \"local\" | \"api\" | \"self_hosted\";\n apiKey?: string;\n baseUrl?: string;\n}\n\nexport function getUnsafeAlgentaRuntime(options: UnsafeRuntimeOptions = {}): Runtime {\n return new Runtime({\n mode: options.mode ?? \"local\",\n ...(options.apiKey ? { apiKey: options.apiKey } : {}),\n ...(options.baseUrl ? { baseUrl: options.baseUrl } : {}),\n } as ConstructorParameters<typeof Runtime>[0]);\n}\n"],"mappings":";AAUA,SAAS,eAAe;AAQjB,SAAS,wBAAwB,UAAgC,CAAC,GAAY;AACnF,SAAO,IAAI,QAAQ;AAAA,IACjB,MAAM,QAAQ,QAAQ;AAAA,IACtB,GAAI,QAAQ,SAAS,EAAE,QAAQ,QAAQ,OAAO,IAAI,CAAC;AAAA,IACnD,GAAI,QAAQ,UAAU,EAAE,SAAS,QAAQ,QAAQ,IAAI,CAAC;AAAA,EACxD,CAA6C;AAC/C;","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@thyn-ai/sqai",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "SQAI — the deterministic, read-only structured-data SDK for AI agents, powered by Algenta execution and provenance.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=20"
|
|
9
|
+
},
|
|
10
|
+
"main": "./dist/index.cjs",
|
|
11
|
+
"module": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/index.js",
|
|
17
|
+
"require": "./dist/index.cjs"
|
|
18
|
+
},
|
|
19
|
+
"./unsafe": {
|
|
20
|
+
"types": "./dist/unsafe.d.ts",
|
|
21
|
+
"import": "./dist/unsafe.js",
|
|
22
|
+
"require": "./dist/unsafe.cjs"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"dist",
|
|
27
|
+
"README.md",
|
|
28
|
+
"LICENSE",
|
|
29
|
+
"NOTICE"
|
|
30
|
+
],
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"algenta-sdk": "1.0.5"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@types/node": "^22.10.2",
|
|
36
|
+
"tsup": "^8.3.5",
|
|
37
|
+
"typescript": "~5.6.3",
|
|
38
|
+
"vitest": "^3.2.4"
|
|
39
|
+
},
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "https://github.com/thyn-ai/sqai.git",
|
|
43
|
+
"directory": "packages/sdk"
|
|
44
|
+
},
|
|
45
|
+
"homepage": "https://sqai.com",
|
|
46
|
+
"keywords": [
|
|
47
|
+
"ai",
|
|
48
|
+
"agents",
|
|
49
|
+
"structured-data",
|
|
50
|
+
"deterministic",
|
|
51
|
+
"read-only",
|
|
52
|
+
"algenta",
|
|
53
|
+
"sqai"
|
|
54
|
+
],
|
|
55
|
+
"scripts": {
|
|
56
|
+
"build": "tsup",
|
|
57
|
+
"test": "vitest run",
|
|
58
|
+
"lint": "tsc --noEmit"
|
|
59
|
+
}
|
|
60
|
+
}
|