@ifsoul/core 0.3.0 → 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/README.md +30 -33
- package/dist/packages/memory/src/sql.js +54 -5
- package/dist/packages/protocol/src/generated/validators.cjs +1 -1
- package/dist/packages/protocol/src/index.d.ts +1 -6
- package/dist/packages/protocol/src/index.js +3 -16
- package/dist/packages/protocol/src/types.d.ts +1 -1
- package/dist/packages/runtime/src/behavior-types.d.ts +150 -0
- package/dist/packages/runtime/src/behavior-types.js +1 -0
- package/dist/packages/runtime/src/behavior.d.ts +40 -0
- package/dist/packages/runtime/src/behavior.js +621 -0
- package/dist/packages/runtime/src/group-scheduler.d.ts +165 -0
- package/dist/packages/runtime/src/group-scheduler.js +647 -0
- package/dist/packages/runtime/src/index.d.ts +4 -0
- package/dist/packages/runtime/src/index.js +4 -1
- package/dist/packages/runtime/src/participants.d.ts +107 -0
- package/dist/packages/runtime/src/participants.js +309 -0
- package/dist/packages/runtime/src/types.d.ts +1 -0
- package/package.json +2 -3
- package/packages/protocol/schemas/current/archive.schema.json +16 -16
- package/packages/protocol/schemas/current/character.schema.json +21 -21
- package/packages/protocol/schemas/current/common.schema.json +15 -15
- package/packages/protocol/schemas/current/context.schema.json +24 -24
- package/packages/protocol/schemas/current/conversation.schema.json +39 -39
- package/packages/protocol/schemas/current/environment.schema.json +18 -18
- package/packages/protocol/schemas/current/memory.schema.json +66 -66
- package/packages/protocol/schemas/current/model-provider.schema.json +40 -40
- package/packages/protocol/schemas/current/planning.schema.json +61 -61
- package/packages/protocol/schemas/current/provider-common.schema.json +6 -6
- package/release.json +7 -12
- package/specs/README.md +3 -86
- package/specs/current/README.md +3 -5
- package/specs/current/examples/archive-fork.json +12 -12
- package/specs/current/examples/archive-resume.json +12 -12
- package/specs/current/examples/character-instance.json +1 -1
- package/specs/current/examples/character-template.json +1 -1
- package/specs/current/examples/context-after-inspection.json +1 -1
- package/specs/current/examples/context-chat.json +1 -1
- package/specs/current/examples/context-daily.json +1 -1
- package/specs/current/examples/context-no-speech.json +1 -1
- package/specs/current/examples/conversation-delivery.json +1 -1
- package/specs/current/examples/conversation-live-request.json +1 -1
- package/specs/current/examples/conversation-live-response.json +1 -1
- package/specs/current/examples/conversation-no-speech-request.json +1 -1
- package/specs/current/examples/conversation-no-speech-response.json +1 -1
- package/specs/current/examples/conversation-requested-request.json +1 -1
- package/specs/current/examples/conversation-requested-response.json +1 -1
- package/specs/current/examples/environment-chat.json +1 -1
- package/specs/current/examples/environment-game.json +1 -1
- package/specs/current/examples/environment-no-speech.json +1 -1
- package/specs/current/examples/intent-checkpoint.json +1 -1
- package/specs/current/examples/memory-episode.json +1 -1
- package/specs/current/examples/memory-event-conversation.json +1 -1
- package/specs/current/examples/memory-event-observed.json +2 -2
- package/specs/current/examples/memory-event-plan-proposal.json +2 -2
- package/specs/current/examples/memory-event-proposed.json +2 -2
- package/specs/current/examples/memory-fact.json +1 -1
- package/specs/current/examples/memory-relationship.json +1 -1
- package/specs/current/examples/memory-working-context.json +1 -1
- package/specs/current/examples/plan-cancel-request.json +1 -1
- package/specs/current/examples/plan-cancel-result.json +1 -1
- package/specs/current/examples/plan-daily.json +1 -1
- package/specs/current/examples/plan-partial-decision.json +1 -1
- package/specs/current/examples/portable-memory.jsonl +9 -9
- package/specs/current/examples/task-outcome.json +1 -1
- package/specs/current/examples/task-progress.json +1 -1
- package/specs/current/model-provider/examples/capabilities.json +1 -1
- package/specs/current/model-provider/examples/error.json +1 -1
- package/specs/current/model-provider/examples/request.json +1 -1
- package/specs/current/model-provider/examples/response.json +1 -1
- package/docs/npm-publishing.md +0 -44
- package/packages/protocol/schemas/action-result.schema.json +0 -187
- package/packages/protocol/schemas/action.schema.json +0 -68
- package/packages/protocol/schemas/archive-manifest.schema.json +0 -126
- package/packages/protocol/schemas/capability.schema.json +0 -131
- package/packages/protocol/schemas/character-instance.schema.json +0 -73
- package/packages/protocol/schemas/character-template.schema.json +0 -67
- package/packages/protocol/schemas/common.schema.json +0 -154
- package/packages/protocol/schemas/derived-memory.schema.json +0 -145
- package/packages/protocol/schemas/memory-event.schema.json +0 -123
- package/packages/protocol/schemas/model-provider.schema.json +0 -326
- package/packages/protocol/schemas/perception.schema.json +0 -89
- package/packages/protocol/schemas/permission-policy.schema.json +0 -153
- package/packages/protocol/schemas/v0.2/archive.schema.json +0 -205
- package/packages/protocol/schemas/v0.2/character.schema.json +0 -344
- package/packages/protocol/schemas/v0.2/common.schema.json +0 -239
- package/packages/protocol/schemas/v0.2/context.schema.json +0 -230
- package/packages/protocol/schemas/v0.2/conversation.schema.json +0 -340
- package/packages/protocol/schemas/v0.2/environment.schema.json +0 -244
- package/packages/protocol/schemas/v0.2/memory.schema.json +0 -495
- package/packages/protocol/schemas/v0.2/planning.schema.json +0 -443
- package/packages/protocol/schemas/world-event.schema.json +0 -74
- package/specs/character/README.md +0 -84
- package/specs/character/examples/archive-manifest.json +0 -32
- package/specs/character/examples/character-instance.json +0 -20
- package/specs/character/examples/character-template.json +0 -19
- package/specs/memory/README.md +0 -80
- package/specs/memory/examples/derived-memory.json +0 -21
- package/specs/memory/examples/memory-event.json +0 -35
- package/specs/model-provider/README.md +0 -85
- package/specs/model-provider/examples/capabilities.json +0 -10
- package/specs/model-provider/examples/error.json +0 -18
- package/specs/model-provider/examples/request.json +0 -17
- package/specs/model-provider/examples/response.json +0 -19
- package/specs/v0.2/README.md +0 -421
- package/specs/v0.2/examples/archive-fork.json +0 -64
- package/specs/v0.2/examples/archive-resume.json +0 -63
- package/specs/v0.2/examples/character-instance.json +0 -57
- package/specs/v0.2/examples/character-template.json +0 -45
- package/specs/v0.2/examples/context-after-inspection.json +0 -44
- package/specs/v0.2/examples/context-chat.json +0 -27
- package/specs/v0.2/examples/context-daily.json +0 -69
- package/specs/v0.2/examples/context-no-speech.json +0 -27
- package/specs/v0.2/examples/conversation-delivery.json +0 -17
- package/specs/v0.2/examples/conversation-live-request.json +0 -31
- package/specs/v0.2/examples/conversation-live-response.json +0 -23
- package/specs/v0.2/examples/conversation-no-speech-request.json +0 -23
- package/specs/v0.2/examples/conversation-no-speech-response.json +0 -22
- package/specs/v0.2/examples/conversation-requested-request.json +0 -31
- package/specs/v0.2/examples/conversation-requested-response.json +0 -23
- package/specs/v0.2/examples/environment-chat.json +0 -43
- package/specs/v0.2/examples/environment-game.json +0 -80
- package/specs/v0.2/examples/environment-no-speech.json +0 -47
- package/specs/v0.2/examples/intent-checkpoint.json +0 -29
- package/specs/v0.2/examples/memory-episode.json +0 -28
- package/specs/v0.2/examples/memory-event-conversation.json +0 -32
- package/specs/v0.2/examples/memory-event-observed.json +0 -50
- package/specs/v0.2/examples/memory-event-plan-proposal.json +0 -82
- package/specs/v0.2/examples/memory-event-proposed.json +0 -53
- package/specs/v0.2/examples/memory-fact.json +0 -23
- package/specs/v0.2/examples/memory-relationship.json +0 -25
- package/specs/v0.2/examples/memory-working-context.json +0 -24
- package/specs/v0.2/examples/plan-cancel-request.json +0 -16
- package/specs/v0.2/examples/plan-cancel-result.json +0 -21
- package/specs/v0.2/examples/plan-daily.json +0 -57
- package/specs/v0.2/examples/plan-partial-decision.json +0 -28
- package/specs/v0.2/examples/portable-memory.jsonl +0 -9
- package/specs/v0.2/examples/task-outcome.json +0 -21
- package/specs/v0.2/examples/task-progress.json +0 -19
- package/specs/world-adapter/README.md +0 -114
- package/specs/world-adapter/examples/action-result-unknown.json +0 -23
- package/specs/world-adapter/examples/action-result.json +0 -45
- package/specs/world-adapter/examples/action.json +0 -17
- package/specs/world-adapter/examples/capability.json +0 -44
- package/specs/world-adapter/examples/perception.json +0 -30
- package/specs/world-adapter/examples/permission-decision.json +0 -14
- package/specs/world-adapter/examples/permission-policy.json +0 -17
- package/specs/world-adapter/examples/world-event.json +0 -25
|
@@ -1,443 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "urn:ifsoul:protocol:draft-0.2.0:planning",
|
|
4
|
-
"oneOf": [
|
|
5
|
-
{
|
|
6
|
-
"$ref": "#/$defs/proposal"
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
"$ref": "#/$defs/decision"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"$ref": "#/$defs/report"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"$ref": "#/$defs/cancelRequest"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"$ref": "#/$defs/cancelResult"
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"$defs": {
|
|
22
|
-
"proposal": {
|
|
23
|
-
"type": "object",
|
|
24
|
-
"properties": {
|
|
25
|
-
"schemaVersion": {
|
|
26
|
-
"const": "draft-0.2.0"
|
|
27
|
-
},
|
|
28
|
-
"kind": {
|
|
29
|
-
"const": "plan-proposal"
|
|
30
|
-
},
|
|
31
|
-
"binding": {
|
|
32
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/binding"
|
|
33
|
-
},
|
|
34
|
-
"correlationId": {
|
|
35
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
36
|
-
},
|
|
37
|
-
"planId": {
|
|
38
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
39
|
-
},
|
|
40
|
-
"requestId": {
|
|
41
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
42
|
-
},
|
|
43
|
-
"contextReportId": {
|
|
44
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
45
|
-
},
|
|
46
|
-
"contextRevision": {
|
|
47
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
48
|
-
},
|
|
49
|
-
"environmentRevision": {
|
|
50
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
51
|
-
},
|
|
52
|
-
"createdAt": {
|
|
53
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/utc"
|
|
54
|
-
},
|
|
55
|
-
"expiresAt": {
|
|
56
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/utc"
|
|
57
|
-
},
|
|
58
|
-
"horizon": {
|
|
59
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/period"
|
|
60
|
-
},
|
|
61
|
-
"tasks": {
|
|
62
|
-
"type": "array",
|
|
63
|
-
"items": {
|
|
64
|
-
"type": "object",
|
|
65
|
-
"properties": {
|
|
66
|
-
"taskId": {
|
|
67
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
68
|
-
},
|
|
69
|
-
"intentId": {
|
|
70
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
71
|
-
},
|
|
72
|
-
"arguments": {
|
|
73
|
-
"type": "object",
|
|
74
|
-
"maxProperties": 16,
|
|
75
|
-
"propertyNames": {
|
|
76
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
77
|
-
},
|
|
78
|
-
"additionalProperties": {
|
|
79
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/argument"
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
"priority": {
|
|
83
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/priority"
|
|
84
|
-
},
|
|
85
|
-
"dependsOnTaskIds": {
|
|
86
|
-
"type": "array",
|
|
87
|
-
"items": {
|
|
88
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
89
|
-
},
|
|
90
|
-
"minItems": 0,
|
|
91
|
-
"maxItems": 16,
|
|
92
|
-
"uniqueItems": true
|
|
93
|
-
},
|
|
94
|
-
"explanation": {
|
|
95
|
-
"type": "string",
|
|
96
|
-
"minLength": 1,
|
|
97
|
-
"maxLength": 500
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
"required": [
|
|
101
|
-
"taskId",
|
|
102
|
-
"intentId",
|
|
103
|
-
"arguments",
|
|
104
|
-
"priority",
|
|
105
|
-
"dependsOnTaskIds"
|
|
106
|
-
],
|
|
107
|
-
"additionalProperties": false
|
|
108
|
-
},
|
|
109
|
-
"minItems": 0,
|
|
110
|
-
"maxItems": 16
|
|
111
|
-
},
|
|
112
|
-
"extensions": {
|
|
113
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/extensions"
|
|
114
|
-
},
|
|
115
|
-
"requiredExtensions": {
|
|
116
|
-
"type": "array",
|
|
117
|
-
"items": {
|
|
118
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/extensionName"
|
|
119
|
-
},
|
|
120
|
-
"minItems": 0,
|
|
121
|
-
"maxItems": 16,
|
|
122
|
-
"uniqueItems": true
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
"required": [
|
|
126
|
-
"schemaVersion",
|
|
127
|
-
"kind",
|
|
128
|
-
"binding",
|
|
129
|
-
"correlationId",
|
|
130
|
-
"planId",
|
|
131
|
-
"requestId",
|
|
132
|
-
"contextReportId",
|
|
133
|
-
"contextRevision",
|
|
134
|
-
"environmentRevision",
|
|
135
|
-
"createdAt",
|
|
136
|
-
"expiresAt",
|
|
137
|
-
"horizon",
|
|
138
|
-
"tasks"
|
|
139
|
-
],
|
|
140
|
-
"additionalProperties": false
|
|
141
|
-
},
|
|
142
|
-
"decision": {
|
|
143
|
-
"type": "object",
|
|
144
|
-
"properties": {
|
|
145
|
-
"schemaVersion": {
|
|
146
|
-
"const": "draft-0.2.0"
|
|
147
|
-
},
|
|
148
|
-
"kind": {
|
|
149
|
-
"const": "plan-decision"
|
|
150
|
-
},
|
|
151
|
-
"binding": {
|
|
152
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/binding"
|
|
153
|
-
},
|
|
154
|
-
"correlationId": {
|
|
155
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
156
|
-
},
|
|
157
|
-
"planId": {
|
|
158
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
159
|
-
},
|
|
160
|
-
"decisionId": {
|
|
161
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
162
|
-
},
|
|
163
|
-
"requestId": {
|
|
164
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
165
|
-
},
|
|
166
|
-
"contextRevision": {
|
|
167
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
168
|
-
},
|
|
169
|
-
"recordedAt": {
|
|
170
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/utc"
|
|
171
|
-
},
|
|
172
|
-
"status": {
|
|
173
|
-
"enum": ["accepted", "partially-accepted", "rejected"]
|
|
174
|
-
},
|
|
175
|
-
"taskDecisions": {
|
|
176
|
-
"type": "array",
|
|
177
|
-
"items": {
|
|
178
|
-
"type": "object",
|
|
179
|
-
"properties": {
|
|
180
|
-
"taskId": {
|
|
181
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
182
|
-
},
|
|
183
|
-
"decision": {
|
|
184
|
-
"enum": ["accepted", "rejected"]
|
|
185
|
-
},
|
|
186
|
-
"reason": {
|
|
187
|
-
"type": "string",
|
|
188
|
-
"minLength": 1,
|
|
189
|
-
"maxLength": 500
|
|
190
|
-
}
|
|
191
|
-
},
|
|
192
|
-
"required": ["taskId", "decision"],
|
|
193
|
-
"additionalProperties": false
|
|
194
|
-
},
|
|
195
|
-
"minItems": 0,
|
|
196
|
-
"maxItems": 16
|
|
197
|
-
},
|
|
198
|
-
"extensions": {
|
|
199
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/extensions"
|
|
200
|
-
},
|
|
201
|
-
"requiredExtensions": {
|
|
202
|
-
"type": "array",
|
|
203
|
-
"items": {
|
|
204
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/extensionName"
|
|
205
|
-
},
|
|
206
|
-
"minItems": 0,
|
|
207
|
-
"maxItems": 16,
|
|
208
|
-
"uniqueItems": true
|
|
209
|
-
}
|
|
210
|
-
},
|
|
211
|
-
"required": [
|
|
212
|
-
"schemaVersion",
|
|
213
|
-
"kind",
|
|
214
|
-
"binding",
|
|
215
|
-
"correlationId",
|
|
216
|
-
"planId",
|
|
217
|
-
"decisionId",
|
|
218
|
-
"requestId",
|
|
219
|
-
"contextRevision",
|
|
220
|
-
"recordedAt",
|
|
221
|
-
"status",
|
|
222
|
-
"taskDecisions"
|
|
223
|
-
],
|
|
224
|
-
"additionalProperties": false
|
|
225
|
-
},
|
|
226
|
-
"report": {
|
|
227
|
-
"type": "object",
|
|
228
|
-
"properties": {
|
|
229
|
-
"schemaVersion": {
|
|
230
|
-
"const": "draft-0.2.0"
|
|
231
|
-
},
|
|
232
|
-
"kind": {
|
|
233
|
-
"const": "task-report"
|
|
234
|
-
},
|
|
235
|
-
"binding": {
|
|
236
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/binding"
|
|
237
|
-
},
|
|
238
|
-
"correlationId": {
|
|
239
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
240
|
-
},
|
|
241
|
-
"planId": {
|
|
242
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
243
|
-
},
|
|
244
|
-
"reportId": {
|
|
245
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
246
|
-
},
|
|
247
|
-
"taskId": {
|
|
248
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
249
|
-
},
|
|
250
|
-
"contextRevision": {
|
|
251
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
252
|
-
},
|
|
253
|
-
"recordedAt": {
|
|
254
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/utc"
|
|
255
|
-
},
|
|
256
|
-
"status": {
|
|
257
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/taskStatus"
|
|
258
|
-
},
|
|
259
|
-
"summary": {
|
|
260
|
-
"type": "string",
|
|
261
|
-
"minLength": 1,
|
|
262
|
-
"maxLength": 1000
|
|
263
|
-
},
|
|
264
|
-
"observedEffects": {
|
|
265
|
-
"type": "array",
|
|
266
|
-
"items": {
|
|
267
|
-
"type": "string",
|
|
268
|
-
"minLength": 1,
|
|
269
|
-
"maxLength": 500
|
|
270
|
-
},
|
|
271
|
-
"minItems": 0,
|
|
272
|
-
"maxItems": 16
|
|
273
|
-
},
|
|
274
|
-
"nextContextReportId": {
|
|
275
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
276
|
-
},
|
|
277
|
-
"extensions": {
|
|
278
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/extensions"
|
|
279
|
-
},
|
|
280
|
-
"requiredExtensions": {
|
|
281
|
-
"type": "array",
|
|
282
|
-
"items": {
|
|
283
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/extensionName"
|
|
284
|
-
},
|
|
285
|
-
"minItems": 0,
|
|
286
|
-
"maxItems": 16,
|
|
287
|
-
"uniqueItems": true
|
|
288
|
-
}
|
|
289
|
-
},
|
|
290
|
-
"required": [
|
|
291
|
-
"schemaVersion",
|
|
292
|
-
"kind",
|
|
293
|
-
"binding",
|
|
294
|
-
"correlationId",
|
|
295
|
-
"planId",
|
|
296
|
-
"reportId",
|
|
297
|
-
"taskId",
|
|
298
|
-
"contextRevision",
|
|
299
|
-
"recordedAt",
|
|
300
|
-
"status",
|
|
301
|
-
"summary",
|
|
302
|
-
"observedEffects"
|
|
303
|
-
],
|
|
304
|
-
"additionalProperties": false
|
|
305
|
-
},
|
|
306
|
-
"cancelRequest": {
|
|
307
|
-
"type": "object",
|
|
308
|
-
"properties": {
|
|
309
|
-
"schemaVersion": {
|
|
310
|
-
"const": "draft-0.2.0"
|
|
311
|
-
},
|
|
312
|
-
"kind": {
|
|
313
|
-
"const": "plan-cancel-request"
|
|
314
|
-
},
|
|
315
|
-
"binding": {
|
|
316
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/binding"
|
|
317
|
-
},
|
|
318
|
-
"correlationId": {
|
|
319
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
320
|
-
},
|
|
321
|
-
"planId": {
|
|
322
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
323
|
-
},
|
|
324
|
-
"cancellationId": {
|
|
325
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
326
|
-
},
|
|
327
|
-
"taskIds": {
|
|
328
|
-
"type": "array",
|
|
329
|
-
"items": {
|
|
330
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
331
|
-
},
|
|
332
|
-
"minItems": 1,
|
|
333
|
-
"maxItems": 16,
|
|
334
|
-
"uniqueItems": true
|
|
335
|
-
},
|
|
336
|
-
"requestedAt": {
|
|
337
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/utc"
|
|
338
|
-
},
|
|
339
|
-
"reason": {
|
|
340
|
-
"type": "string",
|
|
341
|
-
"minLength": 1,
|
|
342
|
-
"maxLength": 500
|
|
343
|
-
},
|
|
344
|
-
"extensions": {
|
|
345
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/extensions"
|
|
346
|
-
},
|
|
347
|
-
"requiredExtensions": {
|
|
348
|
-
"type": "array",
|
|
349
|
-
"items": {
|
|
350
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/extensionName"
|
|
351
|
-
},
|
|
352
|
-
"minItems": 0,
|
|
353
|
-
"maxItems": 16,
|
|
354
|
-
"uniqueItems": true
|
|
355
|
-
}
|
|
356
|
-
},
|
|
357
|
-
"required": [
|
|
358
|
-
"schemaVersion",
|
|
359
|
-
"kind",
|
|
360
|
-
"binding",
|
|
361
|
-
"correlationId",
|
|
362
|
-
"planId",
|
|
363
|
-
"cancellationId",
|
|
364
|
-
"taskIds",
|
|
365
|
-
"requestedAt",
|
|
366
|
-
"reason"
|
|
367
|
-
],
|
|
368
|
-
"additionalProperties": false
|
|
369
|
-
},
|
|
370
|
-
"cancelResult": {
|
|
371
|
-
"type": "object",
|
|
372
|
-
"properties": {
|
|
373
|
-
"schemaVersion": {
|
|
374
|
-
"const": "draft-0.2.0"
|
|
375
|
-
},
|
|
376
|
-
"kind": {
|
|
377
|
-
"const": "plan-cancel-result"
|
|
378
|
-
},
|
|
379
|
-
"binding": {
|
|
380
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/binding"
|
|
381
|
-
},
|
|
382
|
-
"correlationId": {
|
|
383
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
384
|
-
},
|
|
385
|
-
"planId": {
|
|
386
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
387
|
-
},
|
|
388
|
-
"cancellationId": {
|
|
389
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
390
|
-
},
|
|
391
|
-
"recordedAt": {
|
|
392
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/utc"
|
|
393
|
-
},
|
|
394
|
-
"taskResults": {
|
|
395
|
-
"type": "array",
|
|
396
|
-
"items": {
|
|
397
|
-
"type": "object",
|
|
398
|
-
"properties": {
|
|
399
|
-
"taskId": {
|
|
400
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
|
|
401
|
-
},
|
|
402
|
-
"status": {
|
|
403
|
-
"enum": ["cancelled", "already-finished", "rejected", "unknown"]
|
|
404
|
-
},
|
|
405
|
-
"reason": {
|
|
406
|
-
"type": "string",
|
|
407
|
-
"minLength": 1,
|
|
408
|
-
"maxLength": 500
|
|
409
|
-
}
|
|
410
|
-
},
|
|
411
|
-
"required": ["taskId", "status"],
|
|
412
|
-
"additionalProperties": false
|
|
413
|
-
},
|
|
414
|
-
"minItems": 1,
|
|
415
|
-
"maxItems": 16
|
|
416
|
-
},
|
|
417
|
-
"extensions": {
|
|
418
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/extensions"
|
|
419
|
-
},
|
|
420
|
-
"requiredExtensions": {
|
|
421
|
-
"type": "array",
|
|
422
|
-
"items": {
|
|
423
|
-
"$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/extensionName"
|
|
424
|
-
},
|
|
425
|
-
"minItems": 0,
|
|
426
|
-
"maxItems": 16,
|
|
427
|
-
"uniqueItems": true
|
|
428
|
-
}
|
|
429
|
-
},
|
|
430
|
-
"required": [
|
|
431
|
-
"schemaVersion",
|
|
432
|
-
"kind",
|
|
433
|
-
"binding",
|
|
434
|
-
"correlationId",
|
|
435
|
-
"planId",
|
|
436
|
-
"cancellationId",
|
|
437
|
-
"recordedAt",
|
|
438
|
-
"taskResults"
|
|
439
|
-
],
|
|
440
|
-
"additionalProperties": false
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "urn:ifsoul:protocol:draft-0.1.0:world-event",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"properties": {
|
|
6
|
-
"schemaVersion": {
|
|
7
|
-
"const": "draft-0.1.0"
|
|
8
|
-
},
|
|
9
|
-
"kind": {
|
|
10
|
-
"const": "world-event"
|
|
11
|
-
},
|
|
12
|
-
"eventId": {
|
|
13
|
-
"$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
|
|
14
|
-
},
|
|
15
|
-
"adapterId": {
|
|
16
|
-
"$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
|
|
17
|
-
},
|
|
18
|
-
"worldId": {
|
|
19
|
-
"$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
|
|
20
|
-
},
|
|
21
|
-
"sessionId": {
|
|
22
|
-
"$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
|
|
23
|
-
},
|
|
24
|
-
"sourceSequence": {
|
|
25
|
-
"type": "integer",
|
|
26
|
-
"minimum": 0,
|
|
27
|
-
"maximum": 9007199254740991
|
|
28
|
-
},
|
|
29
|
-
"recordedAt": {
|
|
30
|
-
"$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/utcTimestamp"
|
|
31
|
-
},
|
|
32
|
-
"worldTime": {
|
|
33
|
-
"$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/worldTime"
|
|
34
|
-
},
|
|
35
|
-
"scope": {
|
|
36
|
-
"$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/scope"
|
|
37
|
-
},
|
|
38
|
-
"type": {
|
|
39
|
-
"$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
|
|
40
|
-
},
|
|
41
|
-
"payload": {
|
|
42
|
-
"$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/jsonObject"
|
|
43
|
-
},
|
|
44
|
-
"actionId": {
|
|
45
|
-
"$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
|
|
46
|
-
},
|
|
47
|
-
"extensions": {
|
|
48
|
-
"$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensions"
|
|
49
|
-
},
|
|
50
|
-
"requiredExtensions": {
|
|
51
|
-
"type": "array",
|
|
52
|
-
"items": {
|
|
53
|
-
"$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensionName"
|
|
54
|
-
},
|
|
55
|
-
"minItems": 0,
|
|
56
|
-
"uniqueItems": true
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
"required": [
|
|
60
|
-
"schemaVersion",
|
|
61
|
-
"kind",
|
|
62
|
-
"eventId",
|
|
63
|
-
"adapterId",
|
|
64
|
-
"worldId",
|
|
65
|
-
"sessionId",
|
|
66
|
-
"sourceSequence",
|
|
67
|
-
"recordedAt",
|
|
68
|
-
"worldTime",
|
|
69
|
-
"scope",
|
|
70
|
-
"type",
|
|
71
|
-
"payload"
|
|
72
|
-
],
|
|
73
|
-
"additionalProperties": false
|
|
74
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
# Character and archive contracts
|
|
2
|
-
|
|
3
|
-
Historical v0.1 contract. See [v0.2](../v0.2/README.md) for the current design;
|
|
4
|
-
the v0.1 JSON examples remain unchanged for regression checks.
|
|
5
|
-
|
|
6
|
-
A template is reusable authored material; an instance is an individual portable
|
|
7
|
-
character with separately referenced history. Importing a template MUST NOT
|
|
8
|
-
silently import a person's conversations, memories, relationships, owner
|
|
9
|
-
identity, or provider configuration. Closed template fields reject history.
|
|
10
|
-
Template edits create a new positive integer `revision`; existing instance
|
|
11
|
-
profiles do not automatically change when a template changes.
|
|
12
|
-
|
|
13
|
-
| Document | Required fields beyond `schemaVersion`, `kind` |
|
|
14
|
-
| ----------------- | --------------------------------------------------------------------------------- |
|
|
15
|
-
| CharacterTemplate | `templateId`, `revision`, `profile`, `provenance` |
|
|
16
|
-
| CharacterInstance | `characterId`, `createdAt`, `profile`, `historyEventIds`, `relationshipMemoryIds` |
|
|
17
|
-
| Archive manifest | `archiveVersion`, `archiveId`, `createdAt`, `schemaVersions`, `files`, `filter` |
|
|
18
|
-
|
|
19
|
-
`profile` contains `name`, `description`, and `traits` (a map of simple strings,
|
|
20
|
-
numbers, or booleans). A template's `provenance` requires nonempty `authors` and
|
|
21
|
-
`license`; an optional `source` describes origin. These are claims to verify,
|
|
22
|
-
not automatic proof of rights. An instance's optional `template` is an exact
|
|
23
|
-
`templateId` + `revision` reference, not inheritance or a remote fetch request.
|
|
24
|
-
`historyEventIds` refer to its memory events; `relationshipMemoryIds` refer to
|
|
25
|
-
its derived records whose payload type is `relationship`. An empty array means
|
|
26
|
-
there are no referenced records at that snapshot, not that a deleted history
|
|
27
|
-
can be reconstructed.
|
|
28
|
-
|
|
29
|
-
Preferences and goals may be represented as explicitly documented traits or
|
|
30
|
-
namespaced extensions in this small baseline. Experience is represented by
|
|
31
|
-
memory events and derived summaries; dedicated preference, goal, skill, or
|
|
32
|
-
experience fields are deferred. A consumer MUST preserve unknown optional
|
|
33
|
-
extensions or declare losses; it MUST NOT flatten richer input into this profile
|
|
34
|
-
and silently discard unsupported state. Profile text does not grant permissions.
|
|
35
|
-
|
|
36
|
-
## Archive manifest
|
|
37
|
-
|
|
38
|
-
The manifest describes files; it is not an importer, container format, database,
|
|
39
|
-
or encryption scheme. `archiveVersion` versions the archive layout independently
|
|
40
|
-
of wire `schemaVersion`, even though both are `draft-0.1.0` now.
|
|
41
|
-
`schemaVersions.protocol` declares the contract baseline used. Every file entry
|
|
42
|
-
contains a safe relative `path`, `role`, `schemaId`, lowercase hexadecimal
|
|
43
|
-
`sha256`, and nonnegative `sizeBytes`. SHA-256 covers the exact uncompressed file
|
|
44
|
-
bytes, not a canonicalized JSON document. The manifest does not list itself.
|
|
45
|
-
|
|
46
|
-
The draft exchange layout uses one UTF-8 JSON document for template and instance
|
|
47
|
-
files, and UTF-8 JSONL for event/derived streams (one complete document per
|
|
48
|
-
nonempty line). Roles map to the `character-template`, `character-instance`,
|
|
49
|
-
`memory-event`, and `derived-memory` schema IDs respectively. Extension files
|
|
50
|
-
require their explicitly declared schema ID and reader support. This draft's
|
|
51
|
-
schema-ID pattern only admits baseline URNs; a new external extension file schema
|
|
52
|
-
requires a later agreed contract. Optional extension data can already live in
|
|
53
|
-
ordinary document `extensions`.
|
|
54
|
-
|
|
55
|
-
A future importer MUST independently check:
|
|
56
|
-
|
|
57
|
-
- Every listed file exists, matches its exact byte count/checksum, has the
|
|
58
|
-
declared role/schema combination, and validates before use.
|
|
59
|
-
- Paths are unique and confined to the extraction root after normalization;
|
|
60
|
-
platform case collisions, symlinks, archive entries absent from the manifest,
|
|
61
|
-
decompression bombs, and oversized files are rejected. The schema's restricted
|
|
62
|
-
ASCII path syntax is only the first check. No absolute paths or `..` segments
|
|
63
|
-
are accepted.
|
|
64
|
-
- Referenced templates, instances, events, and derived records exist and have
|
|
65
|
-
consistent identities, or the filtered manifest explicitly declares external
|
|
66
|
-
references. Dangling references are not silently invented or discarded.
|
|
67
|
-
|
|
68
|
-
`filter` always contains `mode`, `omittedCategories`, `reasons`, and
|
|
69
|
-
`externalReferences`. `private-backup` means all data the exporter is authorized
|
|
70
|
-
to back up is included: omitted categories and reasons MUST be empty and
|
|
71
|
-
external references MUST be `none`. It is not a bypass of consent or access
|
|
72
|
-
restrictions. If any selected data cannot be included, use `filtered`, record
|
|
73
|
-
categories and nonempty reasons, and set `externalReferences: "present"` when
|
|
74
|
-
remaining provenance points outside the archive. That flag declares incomplete
|
|
75
|
-
closure, not authority to fetch data or expose omitted private IDs.
|
|
76
|
-
|
|
77
|
-
Keys, secrets, owner addresses, provider configuration, and access tokens are
|
|
78
|
-
outside this archive contract. Checksums detect changed bytes; they do not
|
|
79
|
-
identify a trusted author. Import/export, deletion propagation, migrations,
|
|
80
|
-
round-trip guarantees, and archive size limits remain unimplemented.
|
|
81
|
-
|
|
82
|
-
Positive examples: [template](examples/character-template.json),
|
|
83
|
-
[instance](examples/character-instance.json), [manifest](examples/archive-manifest.json).
|
|
84
|
-
The manifest's two sibling files form a synthetic initial snapshot.
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": "draft-0.1.0",
|
|
3
|
-
"kind": "archive-manifest",
|
|
4
|
-
"archiveVersion": "draft-0.1.0",
|
|
5
|
-
"archiveId": "archive-mira-initial",
|
|
6
|
-
"createdAt": "2026-01-01T12:00:00Z",
|
|
7
|
-
"schemaVersions": {
|
|
8
|
-
"protocol": "draft-0.1.0"
|
|
9
|
-
},
|
|
10
|
-
"files": [
|
|
11
|
-
{
|
|
12
|
-
"path": "character-template.json",
|
|
13
|
-
"role": "template",
|
|
14
|
-
"schemaId": "urn:ifsoul:protocol:draft-0.1.0:character-template",
|
|
15
|
-
"sha256": "ce0aa4a3887f3618f4d31859d14f3bd348afdf318fb6f63beb7793e9deccc2ad",
|
|
16
|
-
"sizeBytes": 466
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"path": "character-instance.json",
|
|
20
|
-
"role": "instance",
|
|
21
|
-
"schemaId": "urn:ifsoul:protocol:draft-0.1.0:character-instance",
|
|
22
|
-
"sha256": "4964e8f042835743056b10045c7e0476cc0034ce517e42cfaee1727e415cc806",
|
|
23
|
-
"sizeBytes": 475
|
|
24
|
-
}
|
|
25
|
-
],
|
|
26
|
-
"filter": {
|
|
27
|
-
"mode": "private-backup",
|
|
28
|
-
"omittedCategories": [],
|
|
29
|
-
"reasons": [],
|
|
30
|
-
"externalReferences": "none"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": "draft-0.1.0",
|
|
3
|
-
"kind": "character-instance",
|
|
4
|
-
"characterId": "character-mira",
|
|
5
|
-
"createdAt": "2026-01-01T12:00:00Z",
|
|
6
|
-
"template": {
|
|
7
|
-
"templateId": "mira-vale",
|
|
8
|
-
"revision": 1
|
|
9
|
-
},
|
|
10
|
-
"profile": {
|
|
11
|
-
"name": "Mira Vale",
|
|
12
|
-
"description": "An original synthetic garden keeper who values patient observation.",
|
|
13
|
-
"traits": {
|
|
14
|
-
"curiosity": 0.7,
|
|
15
|
-
"patience": "high"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
"historyEventIds": [],
|
|
19
|
-
"relationshipMemoryIds": []
|
|
20
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": "draft-0.1.0",
|
|
3
|
-
"kind": "character-template",
|
|
4
|
-
"templateId": "mira-vale",
|
|
5
|
-
"revision": 1,
|
|
6
|
-
"profile": {
|
|
7
|
-
"name": "Mira Vale",
|
|
8
|
-
"description": "An original synthetic garden keeper who values patient observation.",
|
|
9
|
-
"traits": {
|
|
10
|
-
"curiosity": 0.7,
|
|
11
|
-
"patience": "high"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"provenance": {
|
|
15
|
-
"authors": ["IfSoul contributors"],
|
|
16
|
-
"license": "Apache-2.0",
|
|
17
|
-
"source": "Original synthetic bootstrap example"
|
|
18
|
-
}
|
|
19
|
-
}
|