@dot-agent/cli 1.0.1 → 1.0.2

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/src/types.ts DELETED
@@ -1,128 +0,0 @@
1
- // Copyright 2026 Danilo Borges
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- export interface LintMessage {
16
- file: string
17
- line: number
18
- col: number
19
- severity: 'error' | 'warning'
20
- code: string
21
- message: string
22
- }
23
-
24
- export interface InitOptions {
25
- name?: string
26
- domain?: string
27
- dir?: string
28
- }
29
-
30
- export interface InitResult {
31
- dir: string
32
- files: string[]
33
- }
34
-
35
- export interface PackOptions {
36
- dir?: string
37
- out?: string
38
- commit?: string
39
- version?: string
40
- }
41
-
42
- export interface PackResult {
43
- path: string
44
- id: string
45
- warnings: LintMessage[]
46
- }
47
-
48
- export interface UnpackOptions {
49
- file: string
50
- out?: string
51
- force?: boolean
52
- }
53
-
54
- export interface UnpackResult {
55
- dir: string
56
- id: string
57
- files: string[]
58
- aboutme: AboutMe
59
- }
60
-
61
- export interface RunOptions {
62
- source: string
63
- }
64
-
65
- export interface FileEntry {
66
- path: string
67
- content: string
68
- }
69
-
70
- export interface AgentContext {
71
- id: string
72
- description: any
73
- behavior: any
74
- kernel: any
75
- files: {
76
- soul?: string
77
- guides: FileEntry[]
78
- knowledge: FileEntry[]
79
- behaviors: FileEntry[]
80
- }
81
- aboutme: AboutMe
82
- on(event: string, listener: (...args: any[]) => void): this
83
- emit(event: string, ...args: any[]): boolean
84
- }
85
-
86
- export interface Skill {
87
- id: string
88
- description: string
89
- }
90
-
91
- export interface Integrity {
92
- sha256: string
93
- types?: string
94
- files?: string
95
- }
96
-
97
- export interface AboutMe {
98
- schemaVersion: string
99
- id: string
100
- name: string
101
- description: string
102
- version: string
103
- domain: string
104
- license: string
105
- persona: string
106
- compiler: string
107
- commit?: string
108
- skills: Skill[]
109
- requires: string[]
110
- integrity: Integrity
111
- }
112
-
113
- export interface ParsedDescription {
114
- domain: string
115
- name: string
116
- version: string
117
- description: string
118
- capabilities: Array<{
119
- name: string
120
- type?: string
121
- description: string
122
- }>
123
- [key: string]: any
124
- }
125
-
126
- export interface ParsedBehavior {
127
- [key: string]: any
128
- }
@@ -1,24 +0,0 @@
1
- // Copyright 2026 Danilo Borges
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- declare module 'web-tree-sitter' {
16
- export class Parser {
17
- static init(): Promise<void>
18
- static Language: {
19
- load(path: string): Promise<any>
20
- }
21
- setLanguage(lang: any): void
22
- parse(text: string): any
23
- }
24
- }
@@ -1,76 +0,0 @@
1
- // Copyright 2026 Danilo Borges
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- import { describe, it, expect } from 'vitest'
16
- import { buildAboutme, parseAboutme, aboutmeToJson } from '../src/core/envelope.js'
17
-
18
- describe('envelope', () => {
19
- it('builds aboutme.json', () => {
20
- const aboutme = buildAboutme({
21
- id: 'example.com/test:v1.0~abc123',
22
- name: 'Test Agent',
23
- description: 'A test agent',
24
- version: 'v1.0',
25
- domain: 'example.com',
26
- persona: 'SOUL.md',
27
- compiler: 'dot-agent/1.0.0',
28
- integrity: {
29
- sha256: 'e3b0c44298fc1c149afbaf8b2b',
30
- files: '.agent/files.json',
31
- },
32
- })
33
-
34
- expect(aboutme.schemaVersion).toBe('dot-agent/1.0')
35
- expect(aboutme.id).toBe('example.com/test:v1.0~abc123')
36
- expect(aboutme.name).toBe('Test Agent')
37
- })
38
-
39
- it('parses aboutme.json', () => {
40
- const json = {
41
- schemaVersion: 'dot-agent/1.0',
42
- id: 'example.com/test:v1.0~abc123',
43
- name: 'Test Agent',
44
- description: 'A test agent',
45
- version: 'v1.0',
46
- domain: 'example.com',
47
- license: 'Apache-2.0',
48
- persona: 'SOUL.md',
49
- compiler: 'dot-agent/1.0.0',
50
- skills: [],
51
- requires: [],
52
- integrity: { sha256: 'abc123', files: '.agent/files.json' },
53
- }
54
-
55
- const parsed = parseAboutme(json)
56
- expect(parsed.name).toBe('Test Agent')
57
- expect(parsed.schemaVersion).toBe('dot-agent/1.0')
58
- })
59
-
60
- it('converts aboutme to JSON string', () => {
61
- const aboutme = buildAboutme({
62
- id: 'example.com/test:v1.0~abc123',
63
- name: 'Test Agent',
64
- description: 'A test agent',
65
- version: 'v1.0',
66
- domain: 'example.com',
67
- persona: 'SOUL.md',
68
- compiler: 'dot-agent/1.0.0',
69
- integrity: { sha256: 'abc123', files: '.agent/files.json' },
70
- })
71
-
72
- const json = aboutmeToJson(aboutme)
73
- expect(json).toContain('dot-agent/1.0')
74
- expect(json).toContain('Test Agent')
75
- })
76
- })
package/tests/id.test.ts DELETED
@@ -1,40 +0,0 @@
1
- // Copyright 2026 Danilo Borges
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- import { describe, it, expect } from 'vitest'
16
- import { parseId, buildId } from '../src/core/id.js'
17
-
18
- describe('id', () => {
19
- it('parses a valid agent ID', () => {
20
- const parts = parseId('entelekheia.ai/doctor:v1.0~a1b2c3d')
21
- expect(parts.namespace).toBe('entelekheia.ai')
22
- expect(parts.name).toBe('doctor')
23
- expect(parts.version).toBe('v1.0')
24
- expect(parts.digest).toBe('a1b2c3d')
25
- })
26
-
27
- it('builds an ID from parts', () => {
28
- const id = buildId({
29
- namespace: 'entelekheia.ai',
30
- name: 'doctor',
31
- version: 'v1.0',
32
- digest: 'a1b2c3d',
33
- })
34
- expect(id).toBe('entelekheia.ai/doctor:v1.0~a1b2c3d')
35
- })
36
-
37
- it('throws on invalid ID format', () => {
38
- expect(() => parseId('invalid')).toThrow()
39
- })
40
- })
package/tsconfig.json DELETED
@@ -1,21 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "lib": ["ES2022"],
5
- "module": "ESNext",
6
- "moduleResolution": "bundler",
7
- "resolveJsonModule": true,
8
- "declaration": true,
9
- "declarationMap": true,
10
- "sourceMap": true,
11
- "outDir": "./dist",
12
- "strict": true,
13
- "esModuleInterop": true,
14
- "skipLibCheck": true,
15
- "forceConsistentCasingInFileNames": true,
16
- "allowJs": false,
17
- "rootDir": "./src"
18
- },
19
- "include": ["src/**/*"],
20
- "exclude": ["node_modules", "dist", "tests"]
21
- }
package/tsup.config.ts DELETED
@@ -1,24 +0,0 @@
1
- // Copyright 2026 Danilo Borges
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- import { defineConfig } from 'tsup'
16
-
17
- export default defineConfig({
18
- entry: ['src/index.ts', 'src/cli.ts'],
19
- format: ['esm', 'cjs'],
20
- dts: true,
21
- shims: true,
22
- sourcemap: true,
23
- clean: true,
24
- })
package/vitest.config.ts DELETED
@@ -1,27 +0,0 @@
1
- // Copyright 2026 Danilo Borges
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- import { defineConfig } from 'vitest/config'
16
-
17
- export default defineConfig({
18
- test: {
19
- environment: 'node',
20
- pool: 'forks',
21
- poolOptions: {
22
- forks: {
23
- singleFork: true,
24
- },
25
- },
26
- },
27
- })