@agent-workspace/core 0.2.1 → 0.5.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.
Files changed (39) hide show
  1. package/dist/constants.d.ts +23 -3
  2. package/dist/constants.d.ts.map +1 -1
  3. package/dist/constants.js +35 -7
  4. package/dist/constants.js.map +1 -1
  5. package/dist/constants.test.d.ts +2 -0
  6. package/dist/constants.test.d.ts.map +1 -0
  7. package/dist/constants.test.js +73 -0
  8. package/dist/constants.test.js.map +1 -0
  9. package/dist/index.d.ts +7 -3
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +3 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/types/contract.d.ts +49 -0
  14. package/dist/types/contract.d.ts.map +1 -0
  15. package/dist/types/contract.js +2 -0
  16. package/dist/types/contract.js.map +1 -0
  17. package/dist/types/project.d.ts +49 -0
  18. package/dist/types/project.d.ts.map +1 -0
  19. package/dist/types/project.js +2 -0
  20. package/dist/types/project.js.map +1 -0
  21. package/dist/types/reputation.d.ts +60 -0
  22. package/dist/types/reputation.d.ts.map +1 -0
  23. package/dist/types/reputation.js +2 -0
  24. package/dist/types/reputation.js.map +1 -0
  25. package/dist/types/swarm.d.ts +55 -0
  26. package/dist/types/swarm.d.ts.map +1 -0
  27. package/dist/types/swarm.js +2 -0
  28. package/dist/types/swarm.js.map +1 -0
  29. package/dist/types/workspace.d.ts +68 -7
  30. package/dist/types/workspace.d.ts.map +1 -1
  31. package/package.json +6 -1
  32. package/schemas/delegation-contract.schema.json +139 -0
  33. package/schemas/experiment.schema.json +223 -0
  34. package/schemas/manifesto.schema.json +214 -0
  35. package/schemas/project.schema.json +106 -0
  36. package/schemas/reputation-profile.schema.json +132 -0
  37. package/schemas/society.schema.json +190 -0
  38. package/schemas/swarm.schema.json +126 -0
  39. package/schemas/task.schema.json +90 -0
@@ -0,0 +1,126 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://awp.dev/schemas/swarm.schema.json",
4
+ "title": "AWP Swarm",
5
+ "description": "Schema for AWP swarm frontmatter (CDP v1.0) - Multi-agent composition with dynamic role recruitment",
6
+ "type": "object",
7
+ "required": ["awp", "cdp", "type", "id", "name", "goal", "status", "created", "roles"],
8
+ "properties": {
9
+ "awp": {
10
+ "type": "string",
11
+ "pattern": "^\\d+\\.\\d+\\.\\d+$",
12
+ "description": "AWP specification version"
13
+ },
14
+ "cdp": {
15
+ "type": "string",
16
+ "description": "CDP specification version"
17
+ },
18
+ "type": {
19
+ "type": "string",
20
+ "const": "swarm"
21
+ },
22
+ "id": {
23
+ "type": "string",
24
+ "pattern": "^swarm:[a-z0-9][a-z0-9-]*$",
25
+ "description": "Unique identifier (swarm:<slug>)"
26
+ },
27
+ "name": {
28
+ "type": "string",
29
+ "description": "Human-readable swarm name"
30
+ },
31
+ "goal": {
32
+ "type": "string",
33
+ "description": "The objective this swarm is working toward"
34
+ },
35
+ "status": {
36
+ "type": "string",
37
+ "enum": ["recruiting", "active", "completed", "disbanded"],
38
+ "description": "Swarm lifecycle state"
39
+ },
40
+ "created": {
41
+ "type": "string",
42
+ "format": "date-time",
43
+ "description": "Swarm creation timestamp"
44
+ },
45
+ "governance": {
46
+ "$ref": "#/$defs/swarmGovernance",
47
+ "description": "Optional human governance settings"
48
+ },
49
+ "roles": {
50
+ "type": "array",
51
+ "description": "Roles needed for this swarm with reputation requirements",
52
+ "items": {
53
+ "$ref": "#/$defs/swarmRole"
54
+ },
55
+ "minItems": 1
56
+ },
57
+ "projectId": {
58
+ "type": "string",
59
+ "pattern": "^project:[a-z0-9][a-z0-9-]*$",
60
+ "description": "Optional linked project ID"
61
+ },
62
+ "tags": {
63
+ "type": "array",
64
+ "items": { "type": "string" },
65
+ "description": "Classification tags"
66
+ }
67
+ },
68
+ "additionalProperties": true,
69
+ "$defs": {
70
+ "swarmGovernance": {
71
+ "type": "object",
72
+ "properties": {
73
+ "humanLead": {
74
+ "type": "string",
75
+ "description": "User ID of the human lead (e.g., 'user:marc')"
76
+ },
77
+ "vetoPower": {
78
+ "type": "boolean",
79
+ "description": "Whether the human lead can veto decisions"
80
+ },
81
+ "escalationThreshold": {
82
+ "type": "number",
83
+ "minimum": 0,
84
+ "maximum": 1,
85
+ "description": "Auto-escalate to human if confidence below this threshold"
86
+ }
87
+ },
88
+ "additionalProperties": true
89
+ },
90
+ "swarmRole": {
91
+ "type": "object",
92
+ "required": ["name", "count", "assigned"],
93
+ "properties": {
94
+ "name": {
95
+ "type": "string",
96
+ "description": "Role name (e.g., 'researcher', 'writer')"
97
+ },
98
+ "count": {
99
+ "type": "integer",
100
+ "minimum": 1,
101
+ "description": "Number of agents needed for this role"
102
+ },
103
+ "minReputation": {
104
+ "type": "object",
105
+ "description": "Map of dimension/domain to minimum score threshold",
106
+ "additionalProperties": {
107
+ "type": "number",
108
+ "minimum": 0,
109
+ "maximum": 1
110
+ }
111
+ },
112
+ "assigned": {
113
+ "type": "array",
114
+ "items": { "type": "string" },
115
+ "description": "DIDs of agents assigned to this role"
116
+ },
117
+ "assignedSlugs": {
118
+ "type": "array",
119
+ "items": { "type": "string" },
120
+ "description": "Reputation profile slugs of assigned agents"
121
+ }
122
+ },
123
+ "additionalProperties": true
124
+ }
125
+ }
126
+ }
@@ -0,0 +1,90 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://awp.dev/schemas/task.schema.json",
4
+ "title": "AWP Task",
5
+ "description": "Schema for AWP task frontmatter (CDP v1.0)",
6
+ "type": "object",
7
+ "required": ["awp", "cdp", "type", "id", "projectId", "title", "status", "priority", "created", "blockedBy", "blocks"],
8
+ "properties": {
9
+ "awp": {
10
+ "type": "string",
11
+ "pattern": "^\\d+\\.\\d+\\.\\d+$",
12
+ "description": "AWP specification version"
13
+ },
14
+ "cdp": {
15
+ "type": "string",
16
+ "description": "CDP specification version"
17
+ },
18
+ "type": {
19
+ "type": "string",
20
+ "const": "task"
21
+ },
22
+ "id": {
23
+ "type": "string",
24
+ "pattern": "^task:[a-z0-9][a-z0-9-]*/[a-z0-9][a-z0-9-]*$",
25
+ "description": "Unique identifier (task:<project-slug>/<task-slug>)"
26
+ },
27
+ "projectId": {
28
+ "type": "string",
29
+ "pattern": "^project:[a-z0-9][a-z0-9-]*$",
30
+ "description": "Parent project ID"
31
+ },
32
+ "title": {
33
+ "type": "string",
34
+ "description": "Human-readable task title"
35
+ },
36
+ "status": {
37
+ "type": "string",
38
+ "enum": ["pending", "in-progress", "blocked", "review", "completed", "cancelled"],
39
+ "description": "Task lifecycle state"
40
+ },
41
+ "assignee": {
42
+ "type": "string",
43
+ "description": "DID of the assigned agent"
44
+ },
45
+ "assigneeSlug": {
46
+ "type": "string",
47
+ "pattern": "^[a-z0-9][a-z0-9-]*$",
48
+ "description": "Reputation profile slug of the assignee"
49
+ },
50
+ "priority": {
51
+ "type": "string",
52
+ "enum": ["low", "medium", "high", "critical"],
53
+ "description": "Task priority level"
54
+ },
55
+ "created": {
56
+ "type": "string",
57
+ "format": "date-time",
58
+ "description": "Task creation timestamp"
59
+ },
60
+ "deadline": {
61
+ "type": "string",
62
+ "format": "date-time",
63
+ "description": "Optional deadline"
64
+ },
65
+ "blockedBy": {
66
+ "type": "array",
67
+ "items": { "type": "string" },
68
+ "description": "Task IDs this task depends on"
69
+ },
70
+ "blocks": {
71
+ "type": "array",
72
+ "items": { "type": "string" },
73
+ "description": "Task IDs that depend on this task"
74
+ },
75
+ "outputArtifact": {
76
+ "type": "string",
77
+ "description": "Expected output artifact slug"
78
+ },
79
+ "contractSlug": {
80
+ "type": "string",
81
+ "description": "Linked delegation contract slug"
82
+ },
83
+ "tags": {
84
+ "type": "array",
85
+ "items": { "type": "string" },
86
+ "description": "Classification tags"
87
+ }
88
+ },
89
+ "additionalProperties": true
90
+ }