@ifsoul/core 0.3.0 → 0.4.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 +28 -34
- 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/index.js +1 -1
- 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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "urn:ifsoul:protocol:0.
|
|
3
|
+
"$id": "urn:ifsoul:protocol:0.4.0:planning",
|
|
4
4
|
"oneOf": [
|
|
5
5
|
{
|
|
6
6
|
"$ref": "#/$defs/proposal"
|
|
@@ -23,40 +23,40 @@
|
|
|
23
23
|
"type": "object",
|
|
24
24
|
"properties": {
|
|
25
25
|
"schemaVersion": {
|
|
26
|
-
"const": "0.
|
|
26
|
+
"const": "0.4.0"
|
|
27
27
|
},
|
|
28
28
|
"kind": {
|
|
29
29
|
"const": "plan-proposal"
|
|
30
30
|
},
|
|
31
31
|
"binding": {
|
|
32
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
32
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/binding"
|
|
33
33
|
},
|
|
34
34
|
"correlationId": {
|
|
35
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
35
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
36
36
|
},
|
|
37
37
|
"planId": {
|
|
38
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
38
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
39
39
|
},
|
|
40
40
|
"requestId": {
|
|
41
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
41
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
42
42
|
},
|
|
43
43
|
"contextReportId": {
|
|
44
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
44
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
45
45
|
},
|
|
46
46
|
"contextRevision": {
|
|
47
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
47
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
48
48
|
},
|
|
49
49
|
"environmentRevision": {
|
|
50
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
50
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
51
51
|
},
|
|
52
52
|
"createdAt": {
|
|
53
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
53
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/utc"
|
|
54
54
|
},
|
|
55
55
|
"expiresAt": {
|
|
56
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
56
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/utc"
|
|
57
57
|
},
|
|
58
58
|
"horizon": {
|
|
59
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
59
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/period"
|
|
60
60
|
},
|
|
61
61
|
"tasks": {
|
|
62
62
|
"type": "array",
|
|
@@ -64,28 +64,28 @@
|
|
|
64
64
|
"type": "object",
|
|
65
65
|
"properties": {
|
|
66
66
|
"taskId": {
|
|
67
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
67
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
68
68
|
},
|
|
69
69
|
"intentId": {
|
|
70
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
70
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
71
71
|
},
|
|
72
72
|
"arguments": {
|
|
73
73
|
"type": "object",
|
|
74
74
|
"maxProperties": 16,
|
|
75
75
|
"propertyNames": {
|
|
76
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
76
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
77
77
|
},
|
|
78
78
|
"additionalProperties": {
|
|
79
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
79
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/argument"
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
"priority": {
|
|
83
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
83
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/priority"
|
|
84
84
|
},
|
|
85
85
|
"dependsOnTaskIds": {
|
|
86
86
|
"type": "array",
|
|
87
87
|
"items": {
|
|
88
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
88
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
89
89
|
},
|
|
90
90
|
"minItems": 0,
|
|
91
91
|
"maxItems": 16,
|
|
@@ -110,12 +110,12 @@
|
|
|
110
110
|
"maxItems": 16
|
|
111
111
|
},
|
|
112
112
|
"extensions": {
|
|
113
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
113
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/extensions"
|
|
114
114
|
},
|
|
115
115
|
"requiredExtensions": {
|
|
116
116
|
"type": "array",
|
|
117
117
|
"items": {
|
|
118
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
118
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/extensionName"
|
|
119
119
|
},
|
|
120
120
|
"minItems": 0,
|
|
121
121
|
"maxItems": 16,
|
|
@@ -143,31 +143,31 @@
|
|
|
143
143
|
"type": "object",
|
|
144
144
|
"properties": {
|
|
145
145
|
"schemaVersion": {
|
|
146
|
-
"const": "0.
|
|
146
|
+
"const": "0.4.0"
|
|
147
147
|
},
|
|
148
148
|
"kind": {
|
|
149
149
|
"const": "plan-decision"
|
|
150
150
|
},
|
|
151
151
|
"binding": {
|
|
152
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
152
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/binding"
|
|
153
153
|
},
|
|
154
154
|
"correlationId": {
|
|
155
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
155
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
156
156
|
},
|
|
157
157
|
"planId": {
|
|
158
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
158
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
159
159
|
},
|
|
160
160
|
"decisionId": {
|
|
161
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
161
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
162
162
|
},
|
|
163
163
|
"requestId": {
|
|
164
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
164
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
165
165
|
},
|
|
166
166
|
"contextRevision": {
|
|
167
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
167
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
168
168
|
},
|
|
169
169
|
"recordedAt": {
|
|
170
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
170
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/utc"
|
|
171
171
|
},
|
|
172
172
|
"status": {
|
|
173
173
|
"enum": ["accepted", "partially-accepted", "rejected"]
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
"type": "object",
|
|
179
179
|
"properties": {
|
|
180
180
|
"taskId": {
|
|
181
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
181
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
182
182
|
},
|
|
183
183
|
"decision": {
|
|
184
184
|
"enum": ["accepted", "rejected"]
|
|
@@ -196,12 +196,12 @@
|
|
|
196
196
|
"maxItems": 16
|
|
197
197
|
},
|
|
198
198
|
"extensions": {
|
|
199
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
199
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/extensions"
|
|
200
200
|
},
|
|
201
201
|
"requiredExtensions": {
|
|
202
202
|
"type": "array",
|
|
203
203
|
"items": {
|
|
204
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
204
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/extensionName"
|
|
205
205
|
},
|
|
206
206
|
"minItems": 0,
|
|
207
207
|
"maxItems": 16,
|
|
@@ -227,34 +227,34 @@
|
|
|
227
227
|
"type": "object",
|
|
228
228
|
"properties": {
|
|
229
229
|
"schemaVersion": {
|
|
230
|
-
"const": "0.
|
|
230
|
+
"const": "0.4.0"
|
|
231
231
|
},
|
|
232
232
|
"kind": {
|
|
233
233
|
"const": "task-report"
|
|
234
234
|
},
|
|
235
235
|
"binding": {
|
|
236
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
236
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/binding"
|
|
237
237
|
},
|
|
238
238
|
"correlationId": {
|
|
239
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
239
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
240
240
|
},
|
|
241
241
|
"planId": {
|
|
242
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
242
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
243
243
|
},
|
|
244
244
|
"reportId": {
|
|
245
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
245
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
246
246
|
},
|
|
247
247
|
"taskId": {
|
|
248
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
248
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
249
249
|
},
|
|
250
250
|
"contextRevision": {
|
|
251
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
251
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
252
252
|
},
|
|
253
253
|
"recordedAt": {
|
|
254
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
254
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/utc"
|
|
255
255
|
},
|
|
256
256
|
"status": {
|
|
257
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
257
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/taskStatus"
|
|
258
258
|
},
|
|
259
259
|
"summary": {
|
|
260
260
|
"type": "string",
|
|
@@ -272,15 +272,15 @@
|
|
|
272
272
|
"maxItems": 16
|
|
273
273
|
},
|
|
274
274
|
"nextContextReportId": {
|
|
275
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
275
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
276
276
|
},
|
|
277
277
|
"extensions": {
|
|
278
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
278
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/extensions"
|
|
279
279
|
},
|
|
280
280
|
"requiredExtensions": {
|
|
281
281
|
"type": "array",
|
|
282
282
|
"items": {
|
|
283
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
283
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/extensionName"
|
|
284
284
|
},
|
|
285
285
|
"minItems": 0,
|
|
286
286
|
"maxItems": 16,
|
|
@@ -307,34 +307,34 @@
|
|
|
307
307
|
"type": "object",
|
|
308
308
|
"properties": {
|
|
309
309
|
"schemaVersion": {
|
|
310
|
-
"const": "0.
|
|
310
|
+
"const": "0.4.0"
|
|
311
311
|
},
|
|
312
312
|
"kind": {
|
|
313
313
|
"const": "plan-cancel-request"
|
|
314
314
|
},
|
|
315
315
|
"binding": {
|
|
316
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
316
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/binding"
|
|
317
317
|
},
|
|
318
318
|
"correlationId": {
|
|
319
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
319
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
320
320
|
},
|
|
321
321
|
"planId": {
|
|
322
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
322
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
323
323
|
},
|
|
324
324
|
"cancellationId": {
|
|
325
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
325
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
326
326
|
},
|
|
327
327
|
"taskIds": {
|
|
328
328
|
"type": "array",
|
|
329
329
|
"items": {
|
|
330
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
330
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
331
331
|
},
|
|
332
332
|
"minItems": 1,
|
|
333
333
|
"maxItems": 16,
|
|
334
334
|
"uniqueItems": true
|
|
335
335
|
},
|
|
336
336
|
"requestedAt": {
|
|
337
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
337
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/utc"
|
|
338
338
|
},
|
|
339
339
|
"reason": {
|
|
340
340
|
"type": "string",
|
|
@@ -342,12 +342,12 @@
|
|
|
342
342
|
"maxLength": 500
|
|
343
343
|
},
|
|
344
344
|
"extensions": {
|
|
345
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
345
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/extensions"
|
|
346
346
|
},
|
|
347
347
|
"requiredExtensions": {
|
|
348
348
|
"type": "array",
|
|
349
349
|
"items": {
|
|
350
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
350
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/extensionName"
|
|
351
351
|
},
|
|
352
352
|
"minItems": 0,
|
|
353
353
|
"maxItems": 16,
|
|
@@ -371,25 +371,25 @@
|
|
|
371
371
|
"type": "object",
|
|
372
372
|
"properties": {
|
|
373
373
|
"schemaVersion": {
|
|
374
|
-
"const": "0.
|
|
374
|
+
"const": "0.4.0"
|
|
375
375
|
},
|
|
376
376
|
"kind": {
|
|
377
377
|
"const": "plan-cancel-result"
|
|
378
378
|
},
|
|
379
379
|
"binding": {
|
|
380
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
380
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/binding"
|
|
381
381
|
},
|
|
382
382
|
"correlationId": {
|
|
383
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
383
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
384
384
|
},
|
|
385
385
|
"planId": {
|
|
386
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
386
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
387
387
|
},
|
|
388
388
|
"cancellationId": {
|
|
389
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
389
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
390
390
|
},
|
|
391
391
|
"recordedAt": {
|
|
392
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
392
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/utc"
|
|
393
393
|
},
|
|
394
394
|
"taskResults": {
|
|
395
395
|
"type": "array",
|
|
@@ -397,7 +397,7 @@
|
|
|
397
397
|
"type": "object",
|
|
398
398
|
"properties": {
|
|
399
399
|
"taskId": {
|
|
400
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
400
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/id"
|
|
401
401
|
},
|
|
402
402
|
"status": {
|
|
403
403
|
"enum": ["cancelled", "already-finished", "rejected", "unknown"]
|
|
@@ -415,12 +415,12 @@
|
|
|
415
415
|
"maxItems": 16
|
|
416
416
|
},
|
|
417
417
|
"extensions": {
|
|
418
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
418
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/extensions"
|
|
419
419
|
},
|
|
420
420
|
"requiredExtensions": {
|
|
421
421
|
"type": "array",
|
|
422
422
|
"items": {
|
|
423
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
423
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:common#/$defs/extensionName"
|
|
424
424
|
},
|
|
425
425
|
"minItems": 0,
|
|
426
426
|
"maxItems": 16,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "urn:ifsoul:protocol:0.
|
|
3
|
+
"$id": "urn:ifsoul:protocol:0.4.0:provider-common",
|
|
4
4
|
"description": "Shared definitions, not an exchange document.",
|
|
5
5
|
"$defs": {
|
|
6
6
|
"id": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"extensions": {
|
|
20
20
|
"type": "object",
|
|
21
21
|
"propertyNames": {
|
|
22
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
22
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:provider-common#/$defs/extensionName"
|
|
23
23
|
},
|
|
24
24
|
"additionalProperties": true
|
|
25
25
|
},
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"type": "object",
|
|
37
37
|
"properties": {
|
|
38
38
|
"timelineId": {
|
|
39
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
39
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:provider-common#/$defs/id"
|
|
40
40
|
},
|
|
41
41
|
"tick": {
|
|
42
42
|
"type": "integer",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"subjectIds": {
|
|
57
57
|
"type": "array",
|
|
58
58
|
"items": {
|
|
59
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
59
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:provider-common#/$defs/id"
|
|
60
60
|
},
|
|
61
61
|
"minItems": 0,
|
|
62
62
|
"uniqueItems": true
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"traits": {
|
|
83
83
|
"type": "object",
|
|
84
84
|
"propertyNames": {
|
|
85
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
85
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:provider-common#/$defs/id"
|
|
86
86
|
},
|
|
87
87
|
"additionalProperties": {
|
|
88
88
|
"anyOf": [
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"type": "object",
|
|
107
107
|
"properties": {
|
|
108
108
|
"code": {
|
|
109
|
-
"$ref": "urn:ifsoul:protocol:0.
|
|
109
|
+
"$ref": "urn:ifsoul:protocol:0.4.0:provider-common#/$defs/id"
|
|
110
110
|
},
|
|
111
111
|
"message": {
|
|
112
112
|
"type": "string",
|
package/release.json
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.4.0",
|
|
3
3
|
"current": {
|
|
4
|
-
"protocol": "0.
|
|
5
|
-
"modelProvider": "0.
|
|
6
|
-
"bridge": "ifsoul-bridge/0.
|
|
7
|
-
"bridgeResourcePolicy": "ifsoul-bridge-resource-policy/0.
|
|
8
|
-
"appResourcePolicy": "ifsoul-app-resource-policy/0.
|
|
9
|
-
"appMemory": "ifsoul-app-memory/0.
|
|
10
|
-
},
|
|
11
|
-
"legacy": {
|
|
12
|
-
"protocol": ["draft-0.1.0", "draft-0.2.0"],
|
|
13
|
-
"bridge": ["ifsoul-bridge/0.1"],
|
|
14
|
-
"appMemory": ["ifsoul-app-memory/0.1"]
|
|
4
|
+
"protocol": "0.4.0",
|
|
5
|
+
"modelProvider": "0.4.0",
|
|
6
|
+
"bridge": "ifsoul-bridge/0.4.0",
|
|
7
|
+
"bridgeResourcePolicy": "ifsoul-bridge-resource-policy/0.4.0",
|
|
8
|
+
"appResourcePolicy": "ifsoul-app-resource-policy/0.4.0",
|
|
9
|
+
"appMemory": "ifsoul-app-memory/0.4.0"
|
|
15
10
|
}
|
|
16
11
|
}
|
package/specs/README.md
CHANGED
|
@@ -1,87 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# IfSoul contracts
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
host-owned planning/dialogue. The sections below document the retained v0.1
|
|
6
|
-
baseline; they do not recommend implementing direct NPC control in a bridge.
|
|
7
|
-
ModelProvider v0.1 remains the current independent provider contract.
|
|
8
|
-
|
|
9
|
-
## Historical v0.1 baseline
|
|
10
|
-
|
|
11
|
-
The frozen local bootstrap baseline is **draft-0.1.0**. It specifies data
|
|
12
|
-
contracts, not a functioning agent system. The words MUST, MUST NOT, SHOULD,
|
|
13
|
-
and MAY express requirements for a future conforming implementation. Structural
|
|
14
|
-
requirements are in the [schema registry](../packages/protocol/README.md).
|
|
15
|
-
Additional semantic requirements below remain necessary even after validation.
|
|
16
|
-
|
|
17
|
-
| Area | Specification | Positive examples |
|
|
18
|
-
| ------------------------------ | ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
19
|
-
| Character and archive | [Character](character/README.md) | [Template](character/examples/character-template.json), [instance](character/examples/character-instance.json), [manifest](character/examples/archive-manifest.json) |
|
|
20
|
-
| Event history and derived data | [Memory](memory/README.md) | [Event](memory/examples/memory-event.json), [summary](memory/examples/derived-memory.json) |
|
|
21
|
-
| World and authorization | [WorldAdapter](world-adapter/README.md) | [Perception](world-adapter/examples/perception.json), [action](world-adapter/examples/action.json), [result](world-adapter/examples/action-result.json) |
|
|
22
|
-
| Model boundary | [ModelProvider](model-provider/README.md) | [Request](model-provider/examples/request.json), [response](model-provider/examples/response.json), [error](model-provider/examples/error.json) |
|
|
23
|
-
|
|
24
|
-
These examples are normative positive structural examples using original,
|
|
25
|
-
synthetic data. They do not claim that an adapter, provider, archive importer, or
|
|
26
|
-
memory engine exists. The initial character archive predates the separate
|
|
27
|
-
watering trace; its instance therefore has empty history references.
|
|
28
|
-
|
|
29
|
-
## Frozen field conventions
|
|
30
|
-
|
|
31
|
-
- JSON uses UTF-8, case-sensitive camelCase property names, and a `kind`
|
|
32
|
-
discriminator. Every exchange envelope has `schemaVersion: "draft-0.1.0"`.
|
|
33
|
-
Absence and `null` differ; optional values are omitted, never `null`.
|
|
34
|
-
- IDs are opaque, case-sensitive ASCII strings matching
|
|
35
|
-
`[A-Za-z0-9][A-Za-z0-9._:-]{0,127}`. They are not paths, display names, emails,
|
|
36
|
-
URLs, credentials, or implied authorities. Allocation and collision detection
|
|
37
|
-
belong to the producer/importer. A referenced ID MUST resolve in its stated
|
|
38
|
-
namespace; equal IDs in unrelated worlds do not identify the same actor.
|
|
39
|
-
- A `characterId` identifies a portable instance. `actorId`, `observerId`, and
|
|
40
|
-
scope `subjectIds` identify world subjects within `worldId` + `sessionId`.
|
|
41
|
-
A trusted composition root maintains their mapping; it is not inferred from
|
|
42
|
-
names. A template ID and revision identify reusable authored content.
|
|
43
|
-
- Revisions are positive integers for template/policy content; capability/world
|
|
44
|
-
revisions are opaque IDs. No lexicographic revision ordering is implied.
|
|
45
|
-
- `recordedAt`, `createdAt`, `observedAt`, `requestedAt`, `deadlineAt`, and
|
|
46
|
-
`evaluatedAt` are RFC 3339 date-time strings restricted to UTC `Z`, four-digit
|
|
47
|
-
years, seconds, and optional 1–9 digit fractional seconds. They describe wall
|
|
48
|
-
clock recording or scheduling, not world chronology. Deadline comparisons
|
|
49
|
-
require a trusted local clock and explicit transport clock handling.
|
|
50
|
-
- `worldTime` is `{ "timelineId": <id>, "tick": <nonnegative integer> }`.
|
|
51
|
-
Ticks have no implied duration or UTC conversion. Worlds document their tick
|
|
52
|
-
rate separately. A reset, branch, or incomparable clock uses a new timeline
|
|
53
|
-
ID. Integers in common counters are bounded by `9007199254740991` for portable
|
|
54
|
-
exact representation. No global event ordering is promised.
|
|
55
|
-
- Ordinary contract objects reject additional properties. Open JSON payloads,
|
|
56
|
-
argument-schema objects, and extensions are explicit exceptions. Unknown
|
|
57
|
-
properties MUST NOT be silently removed to make a document pass validation.
|
|
58
|
-
- `extensions` is an optional object keyed by lowercase dotted namespaces such
|
|
59
|
-
as `org.example.notes`. Values are arbitrary JSON. `requiredExtensions` is an
|
|
60
|
-
optional unique array of those keys. Every required key MUST exist in
|
|
61
|
-
`extensions` and be understood before processing. Schema validation alone
|
|
62
|
-
cannot check that relationship or an implementation's support.
|
|
63
|
-
- Unknown optional extensions MUST be preserved as JSON values by a lossless
|
|
64
|
-
import/export path. An implementation unable to preserve them MUST reject
|
|
65
|
-
that operation or obtain an explicitly filtered export with recorded losses.
|
|
66
|
-
Unknown required extensions MUST cause rejection. Neither grants authority.
|
|
67
|
-
- Human-readable text, memory, model output, imported payloads, and semantic
|
|
68
|
-
descriptions are untrusted data; they cannot grant permissions or override
|
|
69
|
-
trusted policy. Validators MUST NOT fetch external schema references found in
|
|
70
|
-
untrusted argument/tool schemas. Limits and allowed local references must be
|
|
71
|
-
applied before compiling those nested schemas.
|
|
72
|
-
|
|
73
|
-
## Schema limits and semantic validation
|
|
74
|
-
|
|
75
|
-
JSON Schema checks fields, types, supported versions, tagged variants, and some
|
|
76
|
-
status relationships. It cannot prove uniqueness of selected IDs across records,
|
|
77
|
-
referential integrity, provenance truth, licenses, consent, authorization, UTC
|
|
78
|
-
clock accuracy, time ordering, checksums, archive completeness, action effects,
|
|
79
|
-
model capability support, or psychological identity. Future consumers MUST
|
|
80
|
-
check the requirements relevant to their operation, with bounded document,
|
|
81
|
-
array, string, archive, and model sizes. This draft intentionally does not pick
|
|
82
|
-
universal resource budgets or implement a semantic validator.
|
|
83
|
-
|
|
84
|
-
The schema of a capability's arguments or model tool is itself JSON data here.
|
|
85
|
-
A consumer MUST separately validate it as JSON Schema 2020-12, enforce its local
|
|
86
|
-
reference/complexity policy, and validate arguments against it. Merely passing
|
|
87
|
-
the enclosing schema does not validate the arguments.
|
|
3
|
+
The [current contracts](current/README.md) are the only supported product formats.
|
|
4
|
+
See [compatibility](../docs/compatibility.md) for the breaking-release boundary.
|
package/specs/current/README.md
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
# Current IfSoul 0.
|
|
1
|
+
# Current IfSoul 0.4.0 contracts
|
|
2
2
|
|
|
3
3
|
Current character, environment, planning, conversation, memory and archive schemas
|
|
4
|
-
are in `packages/protocol/schemas/current` and use `schemaVersion: "0.
|
|
5
|
-
The corresponding examples are under this directory.
|
|
6
|
-
reviewed v0.2 shapes; this new version has its own IDs and exact validation.
|
|
7
|
-
Historical v0.1/v0.2 schemas and examples remain byte-identical legacy references.
|
|
4
|
+
are in `packages/protocol/schemas/current` and use `schemaVersion: "0.4.0"`.
|
|
5
|
+
The corresponding examples are under this directory.
|
|
8
6
|
See [compatibility](../../docs/compatibility.md).
|
|
9
7
|
|
|
10
8
|
The current ModelProvider normative schema is `current/model-provider.schema.json`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"schemaVersion": "0.
|
|
2
|
+
"schemaVersion": "0.4.0",
|
|
3
3
|
"kind": "archive-manifest",
|
|
4
|
-
"archiveVersion": "0.
|
|
4
|
+
"archiveVersion": "0.4.0",
|
|
5
5
|
"archiveId": "archive-mira-fork",
|
|
6
6
|
"characterId": "character-mira",
|
|
7
7
|
"createdAt": "2026-01-01T08:03:01Z",
|
|
@@ -12,37 +12,37 @@
|
|
|
12
12
|
},
|
|
13
13
|
"schemaInventory": [
|
|
14
14
|
{
|
|
15
|
-
"schemaId": "urn:ifsoul:protocol:0.
|
|
16
|
-
"schemaVersion": "0.
|
|
15
|
+
"schemaId": "urn:ifsoul:protocol:0.4.0:character",
|
|
16
|
+
"schemaVersion": "0.4.0"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
|
-
"schemaId": "urn:ifsoul:protocol:0.
|
|
20
|
-
"schemaVersion": "0.
|
|
19
|
+
"schemaId": "urn:ifsoul:protocol:0.4.0:memory",
|
|
20
|
+
"schemaVersion": "0.4.0"
|
|
21
21
|
}
|
|
22
22
|
],
|
|
23
23
|
"files": [
|
|
24
24
|
{
|
|
25
25
|
"path": "character-template.json",
|
|
26
26
|
"role": "character-template",
|
|
27
|
-
"schemaId": "urn:ifsoul:protocol:0.
|
|
27
|
+
"schemaId": "urn:ifsoul:protocol:0.4.0:character",
|
|
28
28
|
"recordCount": 1,
|
|
29
|
-
"sha256": "
|
|
29
|
+
"sha256": "ae65535b6f932bbc504c98bf7e12a2b3a7b91f97adbb22d20332c507e6a1afbe",
|
|
30
30
|
"sizeBytes": 1263
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"path": "character-instance.json",
|
|
34
34
|
"role": "character-instance",
|
|
35
|
-
"schemaId": "urn:ifsoul:protocol:0.
|
|
35
|
+
"schemaId": "urn:ifsoul:protocol:0.4.0:character",
|
|
36
36
|
"recordCount": 1,
|
|
37
|
-
"sha256": "
|
|
37
|
+
"sha256": "587f3259fa51cc2f70aa376a1ace4be0ffe9dd621450cd6d84466c1cb88c21fe",
|
|
38
38
|
"sizeBytes": 1574
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"path": "portable-memory.jsonl",
|
|
42
42
|
"role": "memory",
|
|
43
|
-
"schemaId": "urn:ifsoul:protocol:0.
|
|
43
|
+
"schemaId": "urn:ifsoul:protocol:0.4.0:memory",
|
|
44
44
|
"recordCount": 9,
|
|
45
|
-
"sha256": "
|
|
45
|
+
"sha256": "5f716035bfde7e1f5e40e5dac8e499f32957f6a0b41209ff4116cd83603cd8ca",
|
|
46
46
|
"sizeBytes": 7253
|
|
47
47
|
}
|
|
48
48
|
],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"schemaVersion": "0.
|
|
2
|
+
"schemaVersion": "0.4.0",
|
|
3
3
|
"kind": "archive-manifest",
|
|
4
|
-
"archiveVersion": "0.
|
|
4
|
+
"archiveVersion": "0.4.0",
|
|
5
5
|
"archiveId": "archive-mira-resume",
|
|
6
6
|
"characterId": "character-mira",
|
|
7
7
|
"createdAt": "2026-01-01T08:03:01Z",
|
|
@@ -11,37 +11,37 @@
|
|
|
11
11
|
},
|
|
12
12
|
"schemaInventory": [
|
|
13
13
|
{
|
|
14
|
-
"schemaId": "urn:ifsoul:protocol:0.
|
|
15
|
-
"schemaVersion": "0.
|
|
14
|
+
"schemaId": "urn:ifsoul:protocol:0.4.0:character",
|
|
15
|
+
"schemaVersion": "0.4.0"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
|
-
"schemaId": "urn:ifsoul:protocol:0.
|
|
19
|
-
"schemaVersion": "0.
|
|
18
|
+
"schemaId": "urn:ifsoul:protocol:0.4.0:memory",
|
|
19
|
+
"schemaVersion": "0.4.0"
|
|
20
20
|
}
|
|
21
21
|
],
|
|
22
22
|
"files": [
|
|
23
23
|
{
|
|
24
24
|
"path": "character-template.json",
|
|
25
25
|
"role": "character-template",
|
|
26
|
-
"schemaId": "urn:ifsoul:protocol:0.
|
|
26
|
+
"schemaId": "urn:ifsoul:protocol:0.4.0:character",
|
|
27
27
|
"recordCount": 1,
|
|
28
|
-
"sha256": "
|
|
28
|
+
"sha256": "ae65535b6f932bbc504c98bf7e12a2b3a7b91f97adbb22d20332c507e6a1afbe",
|
|
29
29
|
"sizeBytes": 1263
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
"path": "character-instance.json",
|
|
33
33
|
"role": "character-instance",
|
|
34
|
-
"schemaId": "urn:ifsoul:protocol:0.
|
|
34
|
+
"schemaId": "urn:ifsoul:protocol:0.4.0:character",
|
|
35
35
|
"recordCount": 1,
|
|
36
|
-
"sha256": "
|
|
36
|
+
"sha256": "587f3259fa51cc2f70aa376a1ace4be0ffe9dd621450cd6d84466c1cb88c21fe",
|
|
37
37
|
"sizeBytes": 1574
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"path": "portable-memory.jsonl",
|
|
41
41
|
"role": "memory",
|
|
42
|
-
"schemaId": "urn:ifsoul:protocol:0.
|
|
42
|
+
"schemaId": "urn:ifsoul:protocol:0.4.0:memory",
|
|
43
43
|
"recordCount": 9,
|
|
44
|
-
"sha256": "
|
|
44
|
+
"sha256": "5f716035bfde7e1f5e40e5dac8e499f32957f6a0b41209ff4116cd83603cd8ca",
|
|
45
45
|
"sizeBytes": 7253
|
|
46
46
|
}
|
|
47
47
|
],
|