dialai 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 +55 -0
- package/README.md +89 -0
- package/dist/dialai/index.d.ts +10 -0
- package/dist/dialai/index.d.ts.map +1 -0
- package/dist/dialai/index.js +10 -0
- package/dist/dialai/index.js.map +1 -0
- package/package.json +57 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
Business Source License 1.1
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 DialAI Contributors
|
|
4
|
+
|
|
5
|
+
Licensor: DialAI Contributors
|
|
6
|
+
|
|
7
|
+
Licensed Work: DialAI
|
|
8
|
+
The Licensed Work is (c) 2025 DialAI Contributors
|
|
9
|
+
|
|
10
|
+
Additional Use Grant: You may not use the Licensed Work to provide a service to third parties, including but not limited to:
|
|
11
|
+
- Offering the Licensed Work as a hosted or managed service
|
|
12
|
+
- Using the Licensed Work in a production environment to provide services to third parties
|
|
13
|
+
- Using the Licensed Work as part of a commercial offering that competes with the Licensed Work
|
|
14
|
+
|
|
15
|
+
However, the following uses are permitted:
|
|
16
|
+
- Using the Licensed Work for development, testing, or evaluation purposes
|
|
17
|
+
- Using the Licensed Work in a non-production environment
|
|
18
|
+
- Using the Licensed Work internally within your organization
|
|
19
|
+
- Contributing to the Licensed Work
|
|
20
|
+
|
|
21
|
+
Change Date: 2029-01-01
|
|
22
|
+
|
|
23
|
+
Change License: Apache License 2.0
|
|
24
|
+
|
|
25
|
+
On the Change Date specified above, the Licensed Work will automatically convert to the Change License, and You may use the Licensed Work under the terms of the Change License.
|
|
26
|
+
|
|
27
|
+
NOTICE: The Business Source License is not an Open Source license. However, the Licensed Work will eventually be licensed under the Apache License 2.0 after the Change Date.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
Business Source License 1.1
|
|
32
|
+
|
|
33
|
+
Terms and Conditions
|
|
34
|
+
|
|
35
|
+
This Business Source License (this "License") applies to the Licensed Work. Each licensee is addressed as "you" or "Licensee."
|
|
36
|
+
|
|
37
|
+
"Licensor" means the individual or entity that creates or contributes to the creation of the Licensed Work.
|
|
38
|
+
|
|
39
|
+
"Licensed Work" means the work of authorship, whether in Source or Object form, made available under this License, as indicated by a copyright notice that is included in or attached to the work.
|
|
40
|
+
|
|
41
|
+
"Derivative Works" means any work, whether in Source or Object form, that is based on (or derived from) the Licensed Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship.
|
|
42
|
+
|
|
43
|
+
"Contribution" means any work of authorship, including the original version of the Licensed Work and any modifications or additions to that Licensed Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Licensed Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner.
|
|
44
|
+
|
|
45
|
+
"Grant of Copyright License" means each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Licensed Work and such Derivative Works in Source or Object form.
|
|
46
|
+
|
|
47
|
+
"Grant of Patent License" means each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Licensed Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Licensed Work to which such Contribution(s) was submitted.
|
|
48
|
+
|
|
49
|
+
Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Licensed Work and such Derivative Works in Source or Object form.
|
|
50
|
+
|
|
51
|
+
The above grant is subject to the Additional Use Grant specified in the header of this License.
|
|
52
|
+
|
|
53
|
+
If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Licensed Work or a Contribution incorporated within the Licensed Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Licensed Work shall terminate as of the date such litigation is filed.
|
|
54
|
+
|
|
55
|
+
THE LICENSED WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE LICENSED WORK OR THE USE OR OTHER DEALINGS IN THE LICENSED WORK.
|
package/README.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="website/static/img/logo.svg" alt="DIAL" width="120" height="120">
|
|
3
|
+
<h1>DIAL</h1>
|
|
4
|
+
<p><strong>Dynamic Integration between AI and Labor</strong></p>
|
|
5
|
+
<p>A coordination framework for AI and human specialists making<br>decisions together within state machines.</p>
|
|
6
|
+
<br>
|
|
7
|
+
<a href="https://eloquentanalytics.github.io/dialai/"><strong>Documentation</strong></a> · <a href="https://eloquentanalytics.github.io/dialai/docs/getting-started/installation"><strong>Get Started</strong></a> · <a href="https://github.com/eloquentanalytics/dialai/issues"><strong>Issues</strong></a>
|
|
8
|
+
<br><br>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
DialAI provides a framework for answering a fundamental question: *Given any task modeled as a state machine, how do you know — in dollars, time, and quality — exactly what it would cost to turn that task over to a minimally competent AI decision-maker?*
|
|
14
|
+
|
|
15
|
+
DialAI starts from a deliberately pessimistic assumption: **AI has no role.** LLM specialists begin with weight 0.0. The default assumption is that the task is too difficult for AI and only humans can navigate it. DialAI then provides the mechanism to prove otherwise, one decision at a time.
|
|
16
|
+
|
|
17
|
+
## Key Principles
|
|
18
|
+
|
|
19
|
+
- **Human Primacy**: The human is always right — not because humans are infallible, but because humans have context that AI cannot access.
|
|
20
|
+
- **Progressive Collapse**: Over repeated decision cycles, measuring how well AI predicts human choices causes the multi-agent deliberation structure to progressively collapse into deterministic execution.
|
|
21
|
+
- **Empirical Trust**: Trust is earned through demonstrated alignment with human decisions, not assumed.
|
|
22
|
+
|
|
23
|
+
## Quick Start
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install dialai
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
import { createSession, registerSpecialist } from "dialai";
|
|
31
|
+
|
|
32
|
+
// Create a session with a state machine
|
|
33
|
+
const session = createSession({
|
|
34
|
+
sessionTypeName: "my-task",
|
|
35
|
+
initialState: "idle"
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// Register an AI specialist
|
|
39
|
+
await registerSpecialist({
|
|
40
|
+
specialistId: "specialist.my-task.proposer.gpt-4",
|
|
41
|
+
sessionTypeName: "my-task",
|
|
42
|
+
specialistRole: "proposer",
|
|
43
|
+
modelId: "gpt-4"
|
|
44
|
+
});
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Documentation
|
|
48
|
+
|
|
49
|
+
Full documentation is available at [https://eloquentanalytics.github.io/dialai/](https://eloquentanalytics.github.io/dialai/).
|
|
50
|
+
|
|
51
|
+
## Development
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Install dependencies
|
|
55
|
+
npm install
|
|
56
|
+
|
|
57
|
+
# Run tests
|
|
58
|
+
npm test
|
|
59
|
+
|
|
60
|
+
# Build
|
|
61
|
+
npm run build
|
|
62
|
+
|
|
63
|
+
# Type check
|
|
64
|
+
npm run typecheck
|
|
65
|
+
|
|
66
|
+
# Lint
|
|
67
|
+
npm run lint
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## License
|
|
71
|
+
|
|
72
|
+
DialAI is licensed under the Business Source License 1.1 (BUSL-1.1). This license allows free use for development, testing, evaluation, and internal use, but restricts commercial use, particularly by cloud providers offering DialAI as a hosted or managed service.
|
|
73
|
+
|
|
74
|
+
**Key restrictions:**
|
|
75
|
+
- You may not use DialAI to provide a service to third parties
|
|
76
|
+
- You may not offer DialAI as a hosted or managed service
|
|
77
|
+
- You may not use DialAI in a production environment to provide services to third parties
|
|
78
|
+
|
|
79
|
+
**Permitted uses:**
|
|
80
|
+
- Development, testing, and evaluation
|
|
81
|
+
- Internal use within your organization
|
|
82
|
+
- Contributing to the project
|
|
83
|
+
|
|
84
|
+
**Change Date:** January 1, 2029
|
|
85
|
+
**Change License:** Apache License 2.0
|
|
86
|
+
|
|
87
|
+
On the Change Date, DialAI will automatically convert to the Apache License 2.0, making it fully open source. This approach protects the project from cloud provider exploitation while ensuring eventual open source availability.
|
|
88
|
+
|
|
89
|
+
See [LICENSE](LICENSE) for full terms.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dialai/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dialai/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dialai",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Dynamic Integration between AI and Labor - A coordination framework for AI and human specialists making decisions together within state machines",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsc -p tsconfig.build.json",
|
|
19
|
+
"dev": "tsc --watch -p tsconfig.build.json",
|
|
20
|
+
"test": "vitest",
|
|
21
|
+
"test:coverage": "vitest --coverage",
|
|
22
|
+
"lint": "eslint . --ext .ts",
|
|
23
|
+
"lint:fix": "eslint . --ext .ts --fix",
|
|
24
|
+
"format": "prettier --write \"**/*.{ts,tsx,md,json}\"",
|
|
25
|
+
"format:check": "prettier --check \"**/*.{ts,tsx,md,json}\"",
|
|
26
|
+
"typecheck": "tsc --noEmit"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [
|
|
29
|
+
"ai",
|
|
30
|
+
"state-machine",
|
|
31
|
+
"coordination",
|
|
32
|
+
"human-in-the-loop",
|
|
33
|
+
"multi-agent",
|
|
34
|
+
"decision-making",
|
|
35
|
+
"typescript"
|
|
36
|
+
],
|
|
37
|
+
"author": "",
|
|
38
|
+
"license": "BUSL-1.1",
|
|
39
|
+
"repository": {
|
|
40
|
+
"type": "git",
|
|
41
|
+
"url": "https://github.com/eloquentanalytics/dialai.git"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/node": "^20.10.0",
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^6.13.0",
|
|
46
|
+
"@typescript-eslint/parser": "^6.13.0",
|
|
47
|
+
"@vitest/coverage-v8": "^1.0.0",
|
|
48
|
+
"eslint": "^8.54.0",
|
|
49
|
+
"eslint-config-prettier": "^9.0.0",
|
|
50
|
+
"prettier": "^3.1.0",
|
|
51
|
+
"typescript": "^5.3.2",
|
|
52
|
+
"vitest": "^1.0.0"
|
|
53
|
+
},
|
|
54
|
+
"engines": {
|
|
55
|
+
"node": ">=18.0.0"
|
|
56
|
+
}
|
|
57
|
+
}
|