@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.
- package/dist/constants.d.ts +23 -3
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +35 -7
- package/dist/constants.js.map +1 -1
- package/dist/constants.test.d.ts +2 -0
- package/dist/constants.test.d.ts.map +1 -0
- package/dist/constants.test.js +73 -0
- package/dist/constants.test.js.map +1 -0
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/types/contract.d.ts +49 -0
- package/dist/types/contract.d.ts.map +1 -0
- package/dist/types/contract.js +2 -0
- package/dist/types/contract.js.map +1 -0
- package/dist/types/project.d.ts +49 -0
- package/dist/types/project.d.ts.map +1 -0
- package/dist/types/project.js +2 -0
- package/dist/types/project.js.map +1 -0
- package/dist/types/reputation.d.ts +60 -0
- package/dist/types/reputation.d.ts.map +1 -0
- package/dist/types/reputation.js +2 -0
- package/dist/types/reputation.js.map +1 -0
- package/dist/types/swarm.d.ts +55 -0
- package/dist/types/swarm.d.ts.map +1 -0
- package/dist/types/swarm.js +2 -0
- package/dist/types/swarm.js.map +1 -0
- package/dist/types/workspace.d.ts +68 -7
- package/dist/types/workspace.d.ts.map +1 -1
- package/package.json +6 -1
- package/schemas/delegation-contract.schema.json +139 -0
- package/schemas/experiment.schema.json +223 -0
- package/schemas/manifesto.schema.json +214 -0
- package/schemas/project.schema.json +106 -0
- package/schemas/reputation-profile.schema.json +132 -0
- package/schemas/society.schema.json +190 -0
- package/schemas/swarm.schema.json +126 -0
- package/schemas/task.schema.json +90 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://awp.dev/schemas/manifesto.schema.json",
|
|
4
|
+
"title": "AWP Manifesto Configuration",
|
|
5
|
+
"description": "Machine-readable configuration for manifesto principles (EXP v1.0)",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["exp", "type", "id", "name", "version", "values", "fitness", "constraints"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"exp": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "EXP specification version"
|
|
12
|
+
},
|
|
13
|
+
"type": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"const": "manifesto"
|
|
16
|
+
},
|
|
17
|
+
"id": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"pattern": "^manifesto:[a-z0-9][a-z0-9-]*$",
|
|
20
|
+
"description": "Unique identifier (manifesto:<slug>)"
|
|
21
|
+
},
|
|
22
|
+
"name": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Human-readable manifesto name"
|
|
25
|
+
},
|
|
26
|
+
"version": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
29
|
+
"description": "Manifesto version (semver)"
|
|
30
|
+
},
|
|
31
|
+
"values": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"description": "Core value weights (must sum to 1.0)",
|
|
34
|
+
"additionalProperties": {
|
|
35
|
+
"type": "number",
|
|
36
|
+
"minimum": 0,
|
|
37
|
+
"maximum": 1
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"fitness": {
|
|
41
|
+
"$ref": "#/$defs/fitnessConfig",
|
|
42
|
+
"description": "Society-level fitness function weights"
|
|
43
|
+
},
|
|
44
|
+
"purity": {
|
|
45
|
+
"$ref": "#/$defs/purityConfig",
|
|
46
|
+
"description": "Agent purity score computation weights"
|
|
47
|
+
},
|
|
48
|
+
"constraints": {
|
|
49
|
+
"$ref": "#/$defs/constraintsConfig",
|
|
50
|
+
"description": "Resource constraints for societies"
|
|
51
|
+
},
|
|
52
|
+
"governance": {
|
|
53
|
+
"$ref": "#/$defs/governanceConfig",
|
|
54
|
+
"description": "Governance rules"
|
|
55
|
+
},
|
|
56
|
+
"lifecycle": {
|
|
57
|
+
"$ref": "#/$defs/lifecycleConfig",
|
|
58
|
+
"description": "Agent birth and death rules"
|
|
59
|
+
},
|
|
60
|
+
"evolution": {
|
|
61
|
+
"$ref": "#/$defs/evolutionConfig",
|
|
62
|
+
"description": "What the manifesto evolves"
|
|
63
|
+
},
|
|
64
|
+
"antiPatterns": {
|
|
65
|
+
"type": "array",
|
|
66
|
+
"items": { "$ref": "#/$defs/antiPattern" },
|
|
67
|
+
"description": "Anti-patterns to detect and penalize"
|
|
68
|
+
},
|
|
69
|
+
"successCriteria": {
|
|
70
|
+
"type": "array",
|
|
71
|
+
"items": { "$ref": "#/$defs/successCriterion" },
|
|
72
|
+
"description": "Criteria for manifesto success"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"additionalProperties": true,
|
|
76
|
+
"$defs": {
|
|
77
|
+
"fitnessConfig": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"properties": {
|
|
80
|
+
"goal-completion-rate": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
81
|
+
"error-recovery-speed": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
82
|
+
"coordination-efficiency": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
83
|
+
"trust-stability": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
84
|
+
"human-intervention-frequency": { "type": "number", "minimum": 0, "maximum": 1 }
|
|
85
|
+
},
|
|
86
|
+
"additionalProperties": { "type": "number", "minimum": 0, "maximum": 1 }
|
|
87
|
+
},
|
|
88
|
+
"purityConfig": {
|
|
89
|
+
"type": "object",
|
|
90
|
+
"properties": {
|
|
91
|
+
"epistemic-hygiene": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
92
|
+
"reliability": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
93
|
+
"coordination": { "type": "number", "minimum": 0, "maximum": 1 }
|
|
94
|
+
},
|
|
95
|
+
"additionalProperties": { "type": "number", "minimum": 0, "maximum": 1 }
|
|
96
|
+
},
|
|
97
|
+
"constraintsConfig": {
|
|
98
|
+
"type": "object",
|
|
99
|
+
"properties": {
|
|
100
|
+
"maxAgents": {
|
|
101
|
+
"type": "integer",
|
|
102
|
+
"minimum": 1,
|
|
103
|
+
"description": "Maximum agents in the society"
|
|
104
|
+
},
|
|
105
|
+
"maxConcurrentTasks": {
|
|
106
|
+
"type": "integer",
|
|
107
|
+
"minimum": 1,
|
|
108
|
+
"description": "Maximum concurrent tasks"
|
|
109
|
+
},
|
|
110
|
+
"maxContractsPerAgent": {
|
|
111
|
+
"type": "integer",
|
|
112
|
+
"minimum": 1,
|
|
113
|
+
"description": "Maximum contracts per agent"
|
|
114
|
+
},
|
|
115
|
+
"taskBudgetPerCycle": {
|
|
116
|
+
"type": "integer",
|
|
117
|
+
"minimum": 1,
|
|
118
|
+
"description": "Tasks generated per cycle"
|
|
119
|
+
},
|
|
120
|
+
"trustBudget": {
|
|
121
|
+
"type": "number",
|
|
122
|
+
"minimum": 0,
|
|
123
|
+
"description": "Total trust budget for the society"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"additionalProperties": true
|
|
127
|
+
},
|
|
128
|
+
"governanceConfig": {
|
|
129
|
+
"type": "object",
|
|
130
|
+
"properties": {
|
|
131
|
+
"humanApprovalRequired": {
|
|
132
|
+
"type": "array",
|
|
133
|
+
"items": { "type": "string" },
|
|
134
|
+
"description": "Actions requiring human approval"
|
|
135
|
+
},
|
|
136
|
+
"escalationThreshold": {
|
|
137
|
+
"type": "number",
|
|
138
|
+
"minimum": 0,
|
|
139
|
+
"maximum": 1,
|
|
140
|
+
"description": "Confidence threshold for escalation"
|
|
141
|
+
},
|
|
142
|
+
"vetoPower": {
|
|
143
|
+
"type": "boolean",
|
|
144
|
+
"description": "Whether humans have veto power"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"additionalProperties": true
|
|
148
|
+
},
|
|
149
|
+
"lifecycleConfig": {
|
|
150
|
+
"type": "object",
|
|
151
|
+
"properties": {
|
|
152
|
+
"birthRequires": {
|
|
153
|
+
"type": "array",
|
|
154
|
+
"items": { "type": "string" },
|
|
155
|
+
"description": "Requirements for agent instantiation"
|
|
156
|
+
},
|
|
157
|
+
"deathTriggers": {
|
|
158
|
+
"type": "array",
|
|
159
|
+
"items": {
|
|
160
|
+
"type": "object",
|
|
161
|
+
"required": ["condition", "action"],
|
|
162
|
+
"properties": {
|
|
163
|
+
"condition": { "type": "string" },
|
|
164
|
+
"action": {
|
|
165
|
+
"type": "string",
|
|
166
|
+
"enum": ["suspend-delegation", "rate-limit", "archive", "merge-candidate"]
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"description": "Conditions that trigger agent lifecycle events"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"additionalProperties": true
|
|
174
|
+
},
|
|
175
|
+
"evolutionConfig": {
|
|
176
|
+
"type": "object",
|
|
177
|
+
"properties": {
|
|
178
|
+
"target": {
|
|
179
|
+
"type": "string",
|
|
180
|
+
"enum": ["institutions", "agents", "both"],
|
|
181
|
+
"description": "What the manifesto optimizes"
|
|
182
|
+
},
|
|
183
|
+
"extractRoleTemplates": {
|
|
184
|
+
"type": "boolean",
|
|
185
|
+
"description": "Whether to extract role templates from successful patterns"
|
|
186
|
+
},
|
|
187
|
+
"formalizeSuccessfulPatterns": {
|
|
188
|
+
"type": "boolean",
|
|
189
|
+
"description": "Whether to formalize successful coordination patterns"
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"additionalProperties": true
|
|
193
|
+
},
|
|
194
|
+
"antiPattern": {
|
|
195
|
+
"type": "object",
|
|
196
|
+
"required": ["id", "detector", "penalty"],
|
|
197
|
+
"properties": {
|
|
198
|
+
"id": { "type": "string" },
|
|
199
|
+
"detector": { "type": "string", "description": "Detection rule expression" },
|
|
200
|
+
"penalty": { "type": "number", "minimum": 0, "maximum": 1 }
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"successCriterion": {
|
|
204
|
+
"type": "object",
|
|
205
|
+
"required": ["id", "metric"],
|
|
206
|
+
"properties": {
|
|
207
|
+
"id": { "type": "string" },
|
|
208
|
+
"metric": { "type": "string" },
|
|
209
|
+
"threshold": { "type": "number" },
|
|
210
|
+
"direction": { "type": "string", "enum": ["increasing", "decreasing", "stable"] }
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://awp.dev/schemas/project.schema.json",
|
|
4
|
+
"title": "AWP Project",
|
|
5
|
+
"description": "Schema for AWP project frontmatter (CDP v1.0)",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["awp", "cdp", "type", "id", "title", "status", "owner", "created", "members", "taskCount", "completedCount"],
|
|
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": "project"
|
|
21
|
+
},
|
|
22
|
+
"id": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"pattern": "^project:[a-z0-9][a-z0-9-]*$",
|
|
25
|
+
"description": "Unique identifier (project:<slug>)"
|
|
26
|
+
},
|
|
27
|
+
"title": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "Human-readable project title"
|
|
30
|
+
},
|
|
31
|
+
"status": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"enum": ["draft", "active", "paused", "completed", "archived"],
|
|
34
|
+
"description": "Project lifecycle state"
|
|
35
|
+
},
|
|
36
|
+
"owner": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "DID of the project owner"
|
|
39
|
+
},
|
|
40
|
+
"created": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"format": "date-time",
|
|
43
|
+
"description": "Project creation timestamp"
|
|
44
|
+
},
|
|
45
|
+
"deadline": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"format": "date-time",
|
|
48
|
+
"description": "Optional deadline"
|
|
49
|
+
},
|
|
50
|
+
"members": {
|
|
51
|
+
"type": "array",
|
|
52
|
+
"description": "Project members with roles and optional reputation gates",
|
|
53
|
+
"items": {
|
|
54
|
+
"$ref": "#/$defs/projectMember"
|
|
55
|
+
},
|
|
56
|
+
"minItems": 1
|
|
57
|
+
},
|
|
58
|
+
"tags": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"items": { "type": "string" },
|
|
61
|
+
"description": "Classification tags"
|
|
62
|
+
},
|
|
63
|
+
"taskCount": {
|
|
64
|
+
"type": "integer",
|
|
65
|
+
"minimum": 0,
|
|
66
|
+
"description": "Total number of tasks"
|
|
67
|
+
},
|
|
68
|
+
"completedCount": {
|
|
69
|
+
"type": "integer",
|
|
70
|
+
"minimum": 0,
|
|
71
|
+
"description": "Number of completed tasks"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"additionalProperties": true,
|
|
75
|
+
"$defs": {
|
|
76
|
+
"projectMember": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"required": ["did", "role", "slug"],
|
|
79
|
+
"properties": {
|
|
80
|
+
"did": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"description": "W3C DID of the member agent"
|
|
83
|
+
},
|
|
84
|
+
"role": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"description": "Role name (e.g., 'lead', 'researcher', 'writer')"
|
|
87
|
+
},
|
|
88
|
+
"slug": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"pattern": "^[a-z0-9][a-z0-9-]*$",
|
|
91
|
+
"description": "Reputation profile slug"
|
|
92
|
+
},
|
|
93
|
+
"minReputation": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"description": "Map of dimension/domain to minimum score threshold",
|
|
96
|
+
"additionalProperties": {
|
|
97
|
+
"type": "number",
|
|
98
|
+
"minimum": 0,
|
|
99
|
+
"maximum": 1
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"additionalProperties": true
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://awp.dev/schemas/reputation-profile.schema.json",
|
|
4
|
+
"title": "AWP Reputation Profile",
|
|
5
|
+
"description": "Schema for AWP reputation profile frontmatter (RDP v1.0)",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["awp", "rdp", "type", "id", "agentDid", "agentName", "lastUpdated", "signals"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"awp": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
12
|
+
"description": "AWP specification version"
|
|
13
|
+
},
|
|
14
|
+
"rdp": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "RDP specification version"
|
|
17
|
+
},
|
|
18
|
+
"type": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"const": "reputation-profile"
|
|
21
|
+
},
|
|
22
|
+
"id": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"pattern": "^reputation:[a-z0-9][a-z0-9-]*$",
|
|
25
|
+
"description": "Unique identifier (reputation:<slug>)"
|
|
26
|
+
},
|
|
27
|
+
"agentDid": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "W3C DID of the tracked agent"
|
|
30
|
+
},
|
|
31
|
+
"agentName": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"description": "Human-readable agent name"
|
|
34
|
+
},
|
|
35
|
+
"lastUpdated": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"format": "date-time",
|
|
38
|
+
"description": "Timestamp of last signal"
|
|
39
|
+
},
|
|
40
|
+
"dimensions": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"description": "Map of dimension name to score object",
|
|
43
|
+
"additionalProperties": {
|
|
44
|
+
"$ref": "#/$defs/dimensionScore"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"domainCompetence": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"description": "Map of domain name to score object",
|
|
50
|
+
"additionalProperties": {
|
|
51
|
+
"$ref": "#/$defs/dimensionScore"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"signals": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"description": "Append-only log of reputation signals",
|
|
57
|
+
"items": {
|
|
58
|
+
"$ref": "#/$defs/reputationSignal"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"additionalProperties": true,
|
|
63
|
+
"$defs": {
|
|
64
|
+
"dimensionScore": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"required": ["score", "confidence", "sampleSize", "lastSignal"],
|
|
67
|
+
"properties": {
|
|
68
|
+
"score": {
|
|
69
|
+
"type": "number",
|
|
70
|
+
"minimum": 0,
|
|
71
|
+
"maximum": 1,
|
|
72
|
+
"description": "Raw score (before decay)"
|
|
73
|
+
},
|
|
74
|
+
"confidence": {
|
|
75
|
+
"type": "number",
|
|
76
|
+
"minimum": 0,
|
|
77
|
+
"maximum": 1,
|
|
78
|
+
"description": "Data confidence level"
|
|
79
|
+
},
|
|
80
|
+
"sampleSize": {
|
|
81
|
+
"type": "integer",
|
|
82
|
+
"minimum": 0,
|
|
83
|
+
"description": "Number of signals received"
|
|
84
|
+
},
|
|
85
|
+
"lastSignal": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"format": "date-time",
|
|
88
|
+
"description": "Timestamp of most recent signal"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"additionalProperties": true
|
|
92
|
+
},
|
|
93
|
+
"reputationSignal": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"required": ["source", "dimension", "score", "timestamp"],
|
|
96
|
+
"properties": {
|
|
97
|
+
"source": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"description": "DID of the observer"
|
|
100
|
+
},
|
|
101
|
+
"dimension": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"description": "Which dimension (e.g., 'reliability', 'domain-competence')"
|
|
104
|
+
},
|
|
105
|
+
"domain": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"description": "Domain name (required when dimension is 'domain-competence')"
|
|
108
|
+
},
|
|
109
|
+
"score": {
|
|
110
|
+
"type": "number",
|
|
111
|
+
"minimum": 0,
|
|
112
|
+
"maximum": 1,
|
|
113
|
+
"description": "Observed performance score"
|
|
114
|
+
},
|
|
115
|
+
"timestamp": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"format": "date-time",
|
|
118
|
+
"description": "When the observation was made"
|
|
119
|
+
},
|
|
120
|
+
"evidence": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"description": "Reference to supporting evidence (e.g., 'contract:q3-research')"
|
|
123
|
+
},
|
|
124
|
+
"message": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"description": "Human-readable note"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"additionalProperties": true
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://awp.dev/schemas/society.schema.json",
|
|
4
|
+
"title": "AWP Society Container",
|
|
5
|
+
"description": "Schema for society manifest - an isolated agent population under a manifesto (EXP v1.0)",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["exp", "type", "id", "name", "manifesto", "status", "created", "cycle", "population", "resources"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"exp": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "EXP specification version"
|
|
12
|
+
},
|
|
13
|
+
"type": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"const": "society"
|
|
16
|
+
},
|
|
17
|
+
"id": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"pattern": "^society:[a-z0-9][a-z0-9-]*$",
|
|
20
|
+
"description": "Unique identifier (society:<slug>)"
|
|
21
|
+
},
|
|
22
|
+
"name": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Human-readable society name"
|
|
25
|
+
},
|
|
26
|
+
"manifesto": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"pattern": "^manifesto:[a-z0-9][a-z0-9-]*$",
|
|
29
|
+
"description": "ID of the governing manifesto"
|
|
30
|
+
},
|
|
31
|
+
"status": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"enum": ["initializing", "running", "paused", "completed", "archived"],
|
|
34
|
+
"description": "Society lifecycle state"
|
|
35
|
+
},
|
|
36
|
+
"created": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"format": "date-time",
|
|
39
|
+
"description": "Creation timestamp"
|
|
40
|
+
},
|
|
41
|
+
"cycle": {
|
|
42
|
+
"type": "integer",
|
|
43
|
+
"minimum": 0,
|
|
44
|
+
"description": "Current simulation cycle"
|
|
45
|
+
},
|
|
46
|
+
"population": {
|
|
47
|
+
"$ref": "#/$defs/populationStats",
|
|
48
|
+
"description": "Agent population statistics"
|
|
49
|
+
},
|
|
50
|
+
"resources": {
|
|
51
|
+
"$ref": "#/$defs/resourceStats",
|
|
52
|
+
"description": "Resource allocation"
|
|
53
|
+
},
|
|
54
|
+
"fitness": {
|
|
55
|
+
"$ref": "#/$defs/fitnessStats",
|
|
56
|
+
"description": "Society fitness metrics"
|
|
57
|
+
},
|
|
58
|
+
"alerts": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"items": { "$ref": "#/$defs/alert" },
|
|
61
|
+
"description": "Active alerts (anti-patterns, escalations)"
|
|
62
|
+
},
|
|
63
|
+
"roleTemplates": {
|
|
64
|
+
"type": "array",
|
|
65
|
+
"items": { "type": "string" },
|
|
66
|
+
"description": "IDs of role templates emerged from this society"
|
|
67
|
+
},
|
|
68
|
+
"linkedExperiment": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"pattern": "^experiment:[a-z0-9][a-z0-9-]*$",
|
|
71
|
+
"description": "ID of experiment this society belongs to (if any)"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"additionalProperties": true,
|
|
75
|
+
"$defs": {
|
|
76
|
+
"populationStats": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"required": ["current", "max"],
|
|
79
|
+
"properties": {
|
|
80
|
+
"current": {
|
|
81
|
+
"type": "integer",
|
|
82
|
+
"minimum": 0,
|
|
83
|
+
"description": "Current agent count"
|
|
84
|
+
},
|
|
85
|
+
"max": {
|
|
86
|
+
"type": "integer",
|
|
87
|
+
"minimum": 1,
|
|
88
|
+
"description": "Maximum allowed agents"
|
|
89
|
+
},
|
|
90
|
+
"births": {
|
|
91
|
+
"type": "integer",
|
|
92
|
+
"minimum": 0,
|
|
93
|
+
"description": "Total agents instantiated"
|
|
94
|
+
},
|
|
95
|
+
"deaths": {
|
|
96
|
+
"type": "integer",
|
|
97
|
+
"minimum": 0,
|
|
98
|
+
"description": "Total agents that died (all types)"
|
|
99
|
+
},
|
|
100
|
+
"archived": {
|
|
101
|
+
"type": "integer",
|
|
102
|
+
"minimum": 0,
|
|
103
|
+
"description": "Agents archived"
|
|
104
|
+
},
|
|
105
|
+
"merged": {
|
|
106
|
+
"type": "integer",
|
|
107
|
+
"minimum": 0,
|
|
108
|
+
"description": "Agents merged into others"
|
|
109
|
+
},
|
|
110
|
+
"suspended": {
|
|
111
|
+
"type": "integer",
|
|
112
|
+
"minimum": 0,
|
|
113
|
+
"description": "Currently suspended agents"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"resourceStats": {
|
|
118
|
+
"type": "object",
|
|
119
|
+
"properties": {
|
|
120
|
+
"trustBudget": {
|
|
121
|
+
"type": "object",
|
|
122
|
+
"properties": {
|
|
123
|
+
"total": { "type": "number" },
|
|
124
|
+
"allocated": { "type": "number" },
|
|
125
|
+
"available": { "type": "number" }
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"taskSlots": {
|
|
129
|
+
"type": "object",
|
|
130
|
+
"properties": {
|
|
131
|
+
"total": { "type": "integer" },
|
|
132
|
+
"active": { "type": "integer" },
|
|
133
|
+
"available": { "type": "integer" }
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"contractSlots": {
|
|
137
|
+
"type": "object",
|
|
138
|
+
"properties": {
|
|
139
|
+
"total": { "type": "integer" },
|
|
140
|
+
"active": { "type": "integer" },
|
|
141
|
+
"available": { "type": "integer" }
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"additionalProperties": true
|
|
146
|
+
},
|
|
147
|
+
"fitnessStats": {
|
|
148
|
+
"type": "object",
|
|
149
|
+
"properties": {
|
|
150
|
+
"current": {
|
|
151
|
+
"type": "number",
|
|
152
|
+
"minimum": 0,
|
|
153
|
+
"maximum": 1,
|
|
154
|
+
"description": "Current fitness score"
|
|
155
|
+
},
|
|
156
|
+
"history": {
|
|
157
|
+
"type": "array",
|
|
158
|
+
"items": { "type": "number" },
|
|
159
|
+
"description": "Fitness score history (per measurement interval)"
|
|
160
|
+
},
|
|
161
|
+
"components": {
|
|
162
|
+
"type": "object",
|
|
163
|
+
"additionalProperties": { "type": "number" },
|
|
164
|
+
"description": "Current values of individual fitness components"
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"alert": {
|
|
169
|
+
"type": "object",
|
|
170
|
+
"required": ["type", "severity"],
|
|
171
|
+
"properties": {
|
|
172
|
+
"type": {
|
|
173
|
+
"type": "string",
|
|
174
|
+
"enum": ["anti-pattern", "escalation", "resource-exhaustion", "fitness-decline"]
|
|
175
|
+
},
|
|
176
|
+
"pattern": { "type": "string" },
|
|
177
|
+
"agent": { "type": "string" },
|
|
178
|
+
"message": { "type": "string" },
|
|
179
|
+
"severity": {
|
|
180
|
+
"type": "string",
|
|
181
|
+
"enum": ["info", "warning", "critical"]
|
|
182
|
+
},
|
|
183
|
+
"timestamp": {
|
|
184
|
+
"type": "string",
|
|
185
|
+
"format": "date-time"
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|