@providerprotocol/agents 0.0.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/.claude/settings.local.json +27 -0
- package/AGENTS.md +681 -0
- package/CLAUDE.md +681 -0
- package/README.md +15 -0
- package/bun.lock +472 -0
- package/eslint.config.js +75 -0
- package/index.ts +1 -0
- package/llms.md +796 -0
- package/package.json +37 -0
- package/specs/UAP-1.0.md +2355 -0
- package/src/agent/index.ts +384 -0
- package/src/agent/types.ts +91 -0
- package/src/checkpoint/file.ts +126 -0
- package/src/checkpoint/index.ts +40 -0
- package/src/checkpoint/types.ts +95 -0
- package/src/execution/index.ts +37 -0
- package/src/execution/loop.ts +310 -0
- package/src/execution/plan.ts +497 -0
- package/src/execution/react.ts +340 -0
- package/src/execution/tool-ordering.ts +186 -0
- package/src/execution/types.ts +315 -0
- package/src/index.ts +80 -0
- package/src/middleware/index.ts +7 -0
- package/src/middleware/logging.ts +123 -0
- package/src/middleware/types.ts +69 -0
- package/src/state/index.ts +301 -0
- package/src/state/types.ts +173 -0
- package/src/thread-tree/index.ts +249 -0
- package/src/thread-tree/types.ts +29 -0
- package/src/utils/uuid.ts +7 -0
- package/tests/live/agent-anthropic.test.ts +288 -0
- package/tests/live/agent-strategy-hooks.test.ts +268 -0
- package/tests/live/checkpoint.test.ts +243 -0
- package/tests/live/execution-strategies.test.ts +255 -0
- package/tests/live/plan-strategy.test.ts +160 -0
- package/tests/live/subagent-events.live.test.ts +249 -0
- package/tests/live/thread-tree.test.ts +186 -0
- package/tests/unit/agent.test.ts +703 -0
- package/tests/unit/checkpoint.test.ts +232 -0
- package/tests/unit/execution/equivalence.test.ts +402 -0
- package/tests/unit/execution/loop.test.ts +437 -0
- package/tests/unit/execution/plan.test.ts +590 -0
- package/tests/unit/execution/react.test.ts +604 -0
- package/tests/unit/execution/subagent-events.test.ts +235 -0
- package/tests/unit/execution/tool-ordering.test.ts +310 -0
- package/tests/unit/middleware/logging.test.ts +276 -0
- package/tests/unit/state.test.ts +573 -0
- package/tests/unit/thread-tree.test.ts +249 -0
- package/tsconfig.json +29 -0
package/eslint.config.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import eslint from '@eslint/js';
|
|
2
|
+
import tseslint from '@typescript-eslint/eslint-plugin';
|
|
3
|
+
import tsparser from '@typescript-eslint/parser';
|
|
4
|
+
import importPlugin from 'eslint-plugin-import';
|
|
5
|
+
|
|
6
|
+
export default [
|
|
7
|
+
eslint.configs.recommended,
|
|
8
|
+
{
|
|
9
|
+
files: ['src/**/*.ts', 'tests/**/*.ts', 'examples/**/*.ts', 'examples/**/*.tsx'],
|
|
10
|
+
languageOptions: {
|
|
11
|
+
parser: tsparser,
|
|
12
|
+
parserOptions: {
|
|
13
|
+
project: './tsconfig.json',
|
|
14
|
+
ecmaVersion: 'latest',
|
|
15
|
+
sourceType: 'module',
|
|
16
|
+
ecmaFeatures: {
|
|
17
|
+
jsx: true,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
globals: {
|
|
21
|
+
console: 'readonly',
|
|
22
|
+
process: 'readonly',
|
|
23
|
+
setTimeout: 'readonly',
|
|
24
|
+
clearTimeout: 'readonly',
|
|
25
|
+
AbortSignal: 'readonly',
|
|
26
|
+
AbortController: 'readonly',
|
|
27
|
+
React: 'readonly',
|
|
28
|
+
Bun: 'readonly',
|
|
29
|
+
Buffer: 'readonly',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
plugins: {
|
|
33
|
+
'@typescript-eslint': tseslint,
|
|
34
|
+
import: importPlugin,
|
|
35
|
+
},
|
|
36
|
+
rules: {
|
|
37
|
+
// TypeScript strict rules
|
|
38
|
+
'@typescript-eslint/no-explicit-any': 'error',
|
|
39
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
40
|
+
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
|
41
|
+
'@typescript-eslint/no-non-null-assertion': 'error',
|
|
42
|
+
|
|
43
|
+
// AirBnB style rules
|
|
44
|
+
'no-console': 'off',
|
|
45
|
+
'import/prefer-default-export': 'off',
|
|
46
|
+
'import/extensions': 'off',
|
|
47
|
+
'no-use-before-define': 'off',
|
|
48
|
+
'@typescript-eslint/no-use-before-define': ['error', { functions: false }],
|
|
49
|
+
'no-shadow': 'off',
|
|
50
|
+
'@typescript-eslint/no-shadow': 'error',
|
|
51
|
+
'no-unused-vars': 'off',
|
|
52
|
+
'max-classes-per-file': 'off',
|
|
53
|
+
'class-methods-use-this': 'off',
|
|
54
|
+
'no-continue': 'off',
|
|
55
|
+
'no-await-in-loop': 'off',
|
|
56
|
+
'no-restricted-syntax': 'off',
|
|
57
|
+
'no-plusplus': 'off',
|
|
58
|
+
|
|
59
|
+
// General best practices
|
|
60
|
+
'prefer-const': 'error',
|
|
61
|
+
'no-var': 'error',
|
|
62
|
+
'object-shorthand': 'error',
|
|
63
|
+
'prefer-template': 'error',
|
|
64
|
+
'prefer-spread': 'error',
|
|
65
|
+
'prefer-rest-params': 'error',
|
|
66
|
+
'no-param-reassign': ['error', { props: false }],
|
|
67
|
+
|
|
68
|
+
// Allow ANSI escape codes in regex for terminal output
|
|
69
|
+
'no-control-regex': 'off',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
ignores: ['node_modules/**', 'dist/**', '*.js'],
|
|
74
|
+
},
|
|
75
|
+
];
|
package/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
console.log("Hello via Bun!");
|