@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.
Files changed (137) hide show
  1. package/README.md +28 -34
  2. package/dist/packages/memory/src/sql.js +54 -5
  3. package/dist/packages/protocol/src/generated/validators.cjs +1 -1
  4. package/dist/packages/protocol/src/index.d.ts +1 -6
  5. package/dist/packages/protocol/src/index.js +3 -16
  6. package/dist/packages/protocol/src/types.d.ts +1 -1
  7. package/dist/packages/runtime/src/index.js +1 -1
  8. package/package.json +2 -3
  9. package/packages/protocol/schemas/current/archive.schema.json +16 -16
  10. package/packages/protocol/schemas/current/character.schema.json +21 -21
  11. package/packages/protocol/schemas/current/common.schema.json +15 -15
  12. package/packages/protocol/schemas/current/context.schema.json +24 -24
  13. package/packages/protocol/schemas/current/conversation.schema.json +39 -39
  14. package/packages/protocol/schemas/current/environment.schema.json +18 -18
  15. package/packages/protocol/schemas/current/memory.schema.json +66 -66
  16. package/packages/protocol/schemas/current/model-provider.schema.json +40 -40
  17. package/packages/protocol/schemas/current/planning.schema.json +61 -61
  18. package/packages/protocol/schemas/current/provider-common.schema.json +6 -6
  19. package/release.json +7 -12
  20. package/specs/README.md +3 -86
  21. package/specs/current/README.md +3 -5
  22. package/specs/current/examples/archive-fork.json +12 -12
  23. package/specs/current/examples/archive-resume.json +12 -12
  24. package/specs/current/examples/character-instance.json +1 -1
  25. package/specs/current/examples/character-template.json +1 -1
  26. package/specs/current/examples/context-after-inspection.json +1 -1
  27. package/specs/current/examples/context-chat.json +1 -1
  28. package/specs/current/examples/context-daily.json +1 -1
  29. package/specs/current/examples/context-no-speech.json +1 -1
  30. package/specs/current/examples/conversation-delivery.json +1 -1
  31. package/specs/current/examples/conversation-live-request.json +1 -1
  32. package/specs/current/examples/conversation-live-response.json +1 -1
  33. package/specs/current/examples/conversation-no-speech-request.json +1 -1
  34. package/specs/current/examples/conversation-no-speech-response.json +1 -1
  35. package/specs/current/examples/conversation-requested-request.json +1 -1
  36. package/specs/current/examples/conversation-requested-response.json +1 -1
  37. package/specs/current/examples/environment-chat.json +1 -1
  38. package/specs/current/examples/environment-game.json +1 -1
  39. package/specs/current/examples/environment-no-speech.json +1 -1
  40. package/specs/current/examples/intent-checkpoint.json +1 -1
  41. package/specs/current/examples/memory-episode.json +1 -1
  42. package/specs/current/examples/memory-event-conversation.json +1 -1
  43. package/specs/current/examples/memory-event-observed.json +2 -2
  44. package/specs/current/examples/memory-event-plan-proposal.json +2 -2
  45. package/specs/current/examples/memory-event-proposed.json +2 -2
  46. package/specs/current/examples/memory-fact.json +1 -1
  47. package/specs/current/examples/memory-relationship.json +1 -1
  48. package/specs/current/examples/memory-working-context.json +1 -1
  49. package/specs/current/examples/plan-cancel-request.json +1 -1
  50. package/specs/current/examples/plan-cancel-result.json +1 -1
  51. package/specs/current/examples/plan-daily.json +1 -1
  52. package/specs/current/examples/plan-partial-decision.json +1 -1
  53. package/specs/current/examples/portable-memory.jsonl +9 -9
  54. package/specs/current/examples/task-outcome.json +1 -1
  55. package/specs/current/examples/task-progress.json +1 -1
  56. package/specs/current/model-provider/examples/capabilities.json +1 -1
  57. package/specs/current/model-provider/examples/error.json +1 -1
  58. package/specs/current/model-provider/examples/request.json +1 -1
  59. package/specs/current/model-provider/examples/response.json +1 -1
  60. package/docs/npm-publishing.md +0 -44
  61. package/packages/protocol/schemas/action-result.schema.json +0 -187
  62. package/packages/protocol/schemas/action.schema.json +0 -68
  63. package/packages/protocol/schemas/archive-manifest.schema.json +0 -126
  64. package/packages/protocol/schemas/capability.schema.json +0 -131
  65. package/packages/protocol/schemas/character-instance.schema.json +0 -73
  66. package/packages/protocol/schemas/character-template.schema.json +0 -67
  67. package/packages/protocol/schemas/common.schema.json +0 -154
  68. package/packages/protocol/schemas/derived-memory.schema.json +0 -145
  69. package/packages/protocol/schemas/memory-event.schema.json +0 -123
  70. package/packages/protocol/schemas/model-provider.schema.json +0 -326
  71. package/packages/protocol/schemas/perception.schema.json +0 -89
  72. package/packages/protocol/schemas/permission-policy.schema.json +0 -153
  73. package/packages/protocol/schemas/v0.2/archive.schema.json +0 -205
  74. package/packages/protocol/schemas/v0.2/character.schema.json +0 -344
  75. package/packages/protocol/schemas/v0.2/common.schema.json +0 -239
  76. package/packages/protocol/schemas/v0.2/context.schema.json +0 -230
  77. package/packages/protocol/schemas/v0.2/conversation.schema.json +0 -340
  78. package/packages/protocol/schemas/v0.2/environment.schema.json +0 -244
  79. package/packages/protocol/schemas/v0.2/memory.schema.json +0 -495
  80. package/packages/protocol/schemas/v0.2/planning.schema.json +0 -443
  81. package/packages/protocol/schemas/world-event.schema.json +0 -74
  82. package/specs/character/README.md +0 -84
  83. package/specs/character/examples/archive-manifest.json +0 -32
  84. package/specs/character/examples/character-instance.json +0 -20
  85. package/specs/character/examples/character-template.json +0 -19
  86. package/specs/memory/README.md +0 -80
  87. package/specs/memory/examples/derived-memory.json +0 -21
  88. package/specs/memory/examples/memory-event.json +0 -35
  89. package/specs/model-provider/README.md +0 -85
  90. package/specs/model-provider/examples/capabilities.json +0 -10
  91. package/specs/model-provider/examples/error.json +0 -18
  92. package/specs/model-provider/examples/request.json +0 -17
  93. package/specs/model-provider/examples/response.json +0 -19
  94. package/specs/v0.2/README.md +0 -421
  95. package/specs/v0.2/examples/archive-fork.json +0 -64
  96. package/specs/v0.2/examples/archive-resume.json +0 -63
  97. package/specs/v0.2/examples/character-instance.json +0 -57
  98. package/specs/v0.2/examples/character-template.json +0 -45
  99. package/specs/v0.2/examples/context-after-inspection.json +0 -44
  100. package/specs/v0.2/examples/context-chat.json +0 -27
  101. package/specs/v0.2/examples/context-daily.json +0 -69
  102. package/specs/v0.2/examples/context-no-speech.json +0 -27
  103. package/specs/v0.2/examples/conversation-delivery.json +0 -17
  104. package/specs/v0.2/examples/conversation-live-request.json +0 -31
  105. package/specs/v0.2/examples/conversation-live-response.json +0 -23
  106. package/specs/v0.2/examples/conversation-no-speech-request.json +0 -23
  107. package/specs/v0.2/examples/conversation-no-speech-response.json +0 -22
  108. package/specs/v0.2/examples/conversation-requested-request.json +0 -31
  109. package/specs/v0.2/examples/conversation-requested-response.json +0 -23
  110. package/specs/v0.2/examples/environment-chat.json +0 -43
  111. package/specs/v0.2/examples/environment-game.json +0 -80
  112. package/specs/v0.2/examples/environment-no-speech.json +0 -47
  113. package/specs/v0.2/examples/intent-checkpoint.json +0 -29
  114. package/specs/v0.2/examples/memory-episode.json +0 -28
  115. package/specs/v0.2/examples/memory-event-conversation.json +0 -32
  116. package/specs/v0.2/examples/memory-event-observed.json +0 -50
  117. package/specs/v0.2/examples/memory-event-plan-proposal.json +0 -82
  118. package/specs/v0.2/examples/memory-event-proposed.json +0 -53
  119. package/specs/v0.2/examples/memory-fact.json +0 -23
  120. package/specs/v0.2/examples/memory-relationship.json +0 -25
  121. package/specs/v0.2/examples/memory-working-context.json +0 -24
  122. package/specs/v0.2/examples/plan-cancel-request.json +0 -16
  123. package/specs/v0.2/examples/plan-cancel-result.json +0 -21
  124. package/specs/v0.2/examples/plan-daily.json +0 -57
  125. package/specs/v0.2/examples/plan-partial-decision.json +0 -28
  126. package/specs/v0.2/examples/portable-memory.jsonl +0 -9
  127. package/specs/v0.2/examples/task-outcome.json +0 -21
  128. package/specs/v0.2/examples/task-progress.json +0 -19
  129. package/specs/world-adapter/README.md +0 -114
  130. package/specs/world-adapter/examples/action-result-unknown.json +0 -23
  131. package/specs/world-adapter/examples/action-result.json +0 -45
  132. package/specs/world-adapter/examples/action.json +0 -17
  133. package/specs/world-adapter/examples/capability.json +0 -44
  134. package/specs/world-adapter/examples/perception.json +0 -30
  135. package/specs/world-adapter/examples/permission-decision.json +0 -14
  136. package/specs/world-adapter/examples/permission-policy.json +0 -17
  137. package/specs/world-adapter/examples/world-event.json +0 -25
@@ -1,153 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "urn:ifsoul:protocol:draft-0.1.0:permission-policy",
4
- "oneOf": [
5
- {
6
- "$ref": "#/$defs/policy"
7
- },
8
- {
9
- "$ref": "#/$defs/decision"
10
- }
11
- ],
12
- "$defs": {
13
- "policy": {
14
- "type": "object",
15
- "properties": {
16
- "schemaVersion": {
17
- "const": "draft-0.1.0"
18
- },
19
- "kind": {
20
- "const": "permission-policy"
21
- },
22
- "policyId": {
23
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
24
- },
25
- "revision": {
26
- "type": "integer",
27
- "minimum": 1
28
- },
29
- "worldId": {
30
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
31
- },
32
- "sessionId": {
33
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
34
- },
35
- "rules": {
36
- "type": "array",
37
- "items": {
38
- "type": "object",
39
- "properties": {
40
- "ruleId": {
41
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
42
- },
43
- "subjectId": {
44
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
45
- },
46
- "resource": {
47
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
48
- },
49
- "action": {
50
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
51
- },
52
- "effect": {
53
- "enum": ["grant", "revoke"]
54
- }
55
- },
56
- "required": ["ruleId", "subjectId", "resource", "action", "effect"],
57
- "additionalProperties": false
58
- },
59
- "minItems": 0
60
- },
61
- "extensions": {
62
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensions"
63
- },
64
- "requiredExtensions": {
65
- "type": "array",
66
- "items": {
67
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensionName"
68
- },
69
- "minItems": 0,
70
- "uniqueItems": true
71
- }
72
- },
73
- "required": [
74
- "schemaVersion",
75
- "kind",
76
- "policyId",
77
- "revision",
78
- "worldId",
79
- "sessionId",
80
- "rules"
81
- ],
82
- "additionalProperties": false
83
- },
84
- "decision": {
85
- "type": "object",
86
- "properties": {
87
- "schemaVersion": {
88
- "const": "draft-0.1.0"
89
- },
90
- "kind": {
91
- "const": "permission-decision"
92
- },
93
- "decisionId": {
94
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
95
- },
96
- "policyId": {
97
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
98
- },
99
- "policyRevision": {
100
- "type": "integer",
101
- "minimum": 1
102
- },
103
- "worldId": {
104
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
105
- },
106
- "sessionId": {
107
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
108
- },
109
- "subjectId": {
110
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
111
- },
112
- "resource": {
113
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
114
- },
115
- "action": {
116
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
117
- },
118
- "decision": {
119
- "enum": ["allow", "deny"]
120
- },
121
- "evaluatedAt": {
122
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/utcTimestamp"
123
- },
124
- "extensions": {
125
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensions"
126
- },
127
- "requiredExtensions": {
128
- "type": "array",
129
- "items": {
130
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensionName"
131
- },
132
- "minItems": 0,
133
- "uniqueItems": true
134
- }
135
- },
136
- "required": [
137
- "schemaVersion",
138
- "kind",
139
- "decisionId",
140
- "policyId",
141
- "policyRevision",
142
- "worldId",
143
- "sessionId",
144
- "subjectId",
145
- "resource",
146
- "action",
147
- "decision",
148
- "evaluatedAt"
149
- ],
150
- "additionalProperties": false
151
- }
152
- }
153
- }
@@ -1,205 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "urn:ifsoul:protocol:draft-0.2.0:archive",
4
- "type": "object",
5
- "properties": {
6
- "schemaVersion": {
7
- "const": "draft-0.2.0"
8
- },
9
- "kind": {
10
- "const": "archive-manifest"
11
- },
12
- "archiveVersion": {
13
- "const": "draft-0.2.0"
14
- },
15
- "archiveId": {
16
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
17
- },
18
- "characterId": {
19
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
20
- },
21
- "createdAt": {
22
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/utc"
23
- },
24
- "transferIntent": {
25
- "oneOf": [
26
- {
27
- "type": "object",
28
- "properties": {
29
- "mode": {
30
- "const": "resume"
31
- },
32
- "expectedCharacterId": {
33
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
34
- }
35
- },
36
- "required": ["mode", "expectedCharacterId"],
37
- "additionalProperties": false
38
- },
39
- {
40
- "type": "object",
41
- "properties": {
42
- "mode": {
43
- "const": "fork"
44
- },
45
- "newCharacterId": {
46
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
47
- },
48
- "newParticipantId": {
49
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
50
- }
51
- },
52
- "required": ["mode", "newCharacterId", "newParticipantId"],
53
- "additionalProperties": false
54
- }
55
- ]
56
- },
57
- "schemaInventory": {
58
- "type": "array",
59
- "items": {
60
- "type": "object",
61
- "properties": {
62
- "schemaId": {
63
- "type": "string",
64
- "pattern": "^urn:ifsoul:protocol:draft-0\\.2\\.0:(character|memory)$"
65
- },
66
- "schemaVersion": {
67
- "const": "draft-0.2.0"
68
- }
69
- },
70
- "required": ["schemaId", "schemaVersion"],
71
- "additionalProperties": false
72
- },
73
- "minItems": 1,
74
- "maxItems": 8,
75
- "uniqueItems": true
76
- },
77
- "files": {
78
- "type": "array",
79
- "items": {
80
- "type": "object",
81
- "properties": {
82
- "path": {
83
- "type": "string",
84
- "pattern": "^(?!/)(?!.*(?:^|/)\\.{1,2}(?:/|$))[A-Za-z0-9._-]+(?:/[A-Za-z0-9._-]+)*$"
85
- },
86
- "role": {
87
- "enum": ["character-template", "character-instance", "memory"]
88
- },
89
- "schemaId": {
90
- "type": "string",
91
- "pattern": "^urn:ifsoul:protocol:draft-0\\.2\\.0:(character|memory)$"
92
- },
93
- "recordCount": {
94
- "type": "integer",
95
- "minimum": 1,
96
- "maximum": 9007199254740991
97
- },
98
- "sha256": {
99
- "type": "string",
100
- "pattern": "^[a-f0-9]{64}$"
101
- },
102
- "sizeBytes": {
103
- "type": "integer",
104
- "minimum": 0,
105
- "maximum": 9007199254740991
106
- }
107
- },
108
- "required": [
109
- "path",
110
- "role",
111
- "schemaId",
112
- "recordCount",
113
- "sha256",
114
- "sizeBytes"
115
- ],
116
- "additionalProperties": false
117
- },
118
- "minItems": 1
119
- },
120
- "filter": {
121
- "type": "object",
122
- "properties": {
123
- "mode": {
124
- "enum": ["complete-authorized", "filtered"]
125
- },
126
- "omittedCategories": {
127
- "type": "array",
128
- "items": {
129
- "enum": [
130
- "profile",
131
- "events",
132
- "working-context",
133
- "episodes",
134
- "facts",
135
- "relationships",
136
- "intent-checkpoints",
137
- "extensions"
138
- ]
139
- },
140
- "minItems": 0,
141
- "maxItems": 8,
142
- "uniqueItems": true
143
- },
144
- "reasons": {
145
- "type": "array",
146
- "items": {
147
- "type": "string",
148
- "minLength": 1,
149
- "maxLength": 500
150
- },
151
- "minItems": 0,
152
- "maxItems": 16
153
- },
154
- "externalReferences": {
155
- "type": "boolean"
156
- }
157
- },
158
- "required": [
159
- "mode",
160
- "omittedCategories",
161
- "reasons",
162
- "externalReferences"
163
- ],
164
- "additionalProperties": false
165
- },
166
- "provenance": {
167
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/provenance"
168
- },
169
- "portableCheckpointIds": {
170
- "type": "array",
171
- "items": {
172
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
173
- },
174
- "minItems": 0,
175
- "uniqueItems": true
176
- },
177
- "extensions": {
178
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/extensions"
179
- },
180
- "requiredExtensions": {
181
- "type": "array",
182
- "items": {
183
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/extensionName"
184
- },
185
- "minItems": 0,
186
- "maxItems": 16,
187
- "uniqueItems": true
188
- }
189
- },
190
- "required": [
191
- "schemaVersion",
192
- "kind",
193
- "archiveVersion",
194
- "archiveId",
195
- "characterId",
196
- "createdAt",
197
- "transferIntent",
198
- "schemaInventory",
199
- "files",
200
- "filter",
201
- "provenance",
202
- "portableCheckpointIds"
203
- ],
204
- "additionalProperties": false
205
- }
@@ -1,344 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "urn:ifsoul:protocol:draft-0.2.0:character",
4
- "oneOf": [
5
- {
6
- "$ref": "#/$defs/template"
7
- },
8
- {
9
- "$ref": "#/$defs/instance"
10
- }
11
- ],
12
- "$defs": {
13
- "template": {
14
- "type": "object",
15
- "properties": {
16
- "schemaVersion": {
17
- "const": "draft-0.2.0"
18
- },
19
- "kind": {
20
- "const": "character-template"
21
- },
22
- "templateId": {
23
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
24
- },
25
- "revision": {
26
- "type": "integer",
27
- "minimum": 1,
28
- "maximum": 9007199254740991
29
- },
30
- "profile": {
31
- "$ref": "#/$defs/profile"
32
- },
33
- "authorship": {
34
- "type": "object",
35
- "properties": {
36
- "authors": {
37
- "type": "array",
38
- "items": {
39
- "type": "string",
40
- "minLength": 1,
41
- "maxLength": 160
42
- },
43
- "minItems": 1,
44
- "maxItems": 16,
45
- "uniqueItems": true
46
- },
47
- "license": {
48
- "type": "string",
49
- "minLength": 1,
50
- "maxLength": 128
51
- },
52
- "source": {
53
- "type": "string",
54
- "minLength": 1,
55
- "maxLength": 500
56
- }
57
- },
58
- "required": ["authors", "license"],
59
- "additionalProperties": false
60
- },
61
- "extensions": {
62
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/extensions"
63
- },
64
- "requiredExtensions": {
65
- "type": "array",
66
- "items": {
67
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/extensionName"
68
- },
69
- "minItems": 0,
70
- "maxItems": 16,
71
- "uniqueItems": true
72
- }
73
- },
74
- "required": [
75
- "schemaVersion",
76
- "kind",
77
- "templateId",
78
- "revision",
79
- "profile",
80
- "authorship"
81
- ],
82
- "additionalProperties": false
83
- },
84
- "instance": {
85
- "type": "object",
86
- "properties": {
87
- "schemaVersion": {
88
- "const": "draft-0.2.0"
89
- },
90
- "kind": {
91
- "const": "character-instance"
92
- },
93
- "characterId": {
94
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
95
- },
96
- "participantId": {
97
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
98
- },
99
- "createdAt": {
100
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/utc"
101
- },
102
- "template": {
103
- "type": "object",
104
- "properties": {
105
- "templateId": {
106
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
107
- },
108
- "revision": {
109
- "type": "integer",
110
- "minimum": 1,
111
- "maximum": 9007199254740991
112
- }
113
- },
114
- "required": ["templateId", "revision"],
115
- "additionalProperties": false
116
- },
117
- "profile": {
118
- "$ref": "#/$defs/profile"
119
- },
120
- "memoryRecordIds": {
121
- "type": "array",
122
- "items": {
123
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
124
- },
125
- "minItems": 0,
126
- "uniqueItems": true
127
- },
128
- "relationshipMemoryIds": {
129
- "type": "array",
130
- "items": {
131
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
132
- },
133
- "minItems": 0,
134
- "uniqueItems": true
135
- },
136
- "lineage": {
137
- "type": "array",
138
- "items": {
139
- "type": "object",
140
- "properties": {
141
- "operation": {
142
- "enum": ["fork", "import"]
143
- },
144
- "sourceCharacterId": {
145
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
146
- },
147
- "sourceArchiveId": {
148
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
149
- },
150
- "recordedAt": {
151
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/utc"
152
- }
153
- },
154
- "required": [
155
- "operation",
156
- "sourceCharacterId",
157
- "sourceArchiveId",
158
- "recordedAt"
159
- ],
160
- "additionalProperties": false
161
- },
162
- "minItems": 0,
163
- "maxItems": 64
164
- },
165
- "extensions": {
166
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/extensions"
167
- },
168
- "requiredExtensions": {
169
- "type": "array",
170
- "items": {
171
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/extensionName"
172
- },
173
- "minItems": 0,
174
- "maxItems": 16,
175
- "uniqueItems": true
176
- }
177
- },
178
- "required": [
179
- "schemaVersion",
180
- "kind",
181
- "characterId",
182
- "participantId",
183
- "createdAt",
184
- "profile",
185
- "memoryRecordIds",
186
- "relationshipMemoryIds"
187
- ],
188
- "additionalProperties": false
189
- },
190
- "profile": {
191
- "type": "object",
192
- "properties": {
193
- "name": {
194
- "type": "string",
195
- "minLength": 1,
196
- "maxLength": 128
197
- },
198
- "description": {
199
- "type": "string",
200
- "minLength": 1,
201
- "maxLength": 2000
202
- },
203
- "traits": {
204
- "type": "object",
205
- "maxProperties": 32,
206
- "propertyNames": {
207
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
208
- },
209
- "additionalProperties": {
210
- "anyOf": [
211
- {
212
- "type": "string",
213
- "maxLength": 300
214
- },
215
- {
216
- "type": "number"
217
- },
218
- {
219
- "type": "boolean"
220
- }
221
- ]
222
- }
223
- },
224
- "preferences": {
225
- "type": "array",
226
- "items": {
227
- "type": "object",
228
- "properties": {
229
- "preferenceId": {
230
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
231
- },
232
- "subject": {
233
- "type": "string",
234
- "minLength": 1,
235
- "maxLength": 160
236
- },
237
- "stance": {
238
- "enum": ["like", "dislike", "avoid", "seek"]
239
- },
240
- "description": {
241
- "type": "string",
242
- "minLength": 1,
243
- "maxLength": 500
244
- },
245
- "strength": {
246
- "type": "number",
247
- "minimum": 0,
248
- "maximum": 1
249
- }
250
- },
251
- "required": ["preferenceId", "subject", "stance", "description"],
252
- "additionalProperties": false
253
- },
254
- "minItems": 0,
255
- "maxItems": 32
256
- },
257
- "speechStyle": {
258
- "type": "object",
259
- "properties": {
260
- "description": {
261
- "type": "string",
262
- "minLength": 1,
263
- "maxLength": 500
264
- },
265
- "languages": {
266
- "type": "array",
267
- "items": {
268
- "type": "string",
269
- "minLength": 1,
270
- "maxLength": 64
271
- },
272
- "minItems": 0,
273
- "maxItems": 16,
274
- "uniqueItems": true
275
- },
276
- "habits": {
277
- "type": "array",
278
- "items": {
279
- "type": "string",
280
- "minLength": 1,
281
- "maxLength": 200
282
- },
283
- "minItems": 0,
284
- "maxItems": 16
285
- }
286
- },
287
- "required": ["description", "languages", "habits"],
288
- "additionalProperties": false
289
- },
290
- "goals": {
291
- "type": "array",
292
- "items": {
293
- "type": "object",
294
- "properties": {
295
- "goalId": {
296
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/id"
297
- },
298
- "description": {
299
- "type": "string",
300
- "minLength": 1,
301
- "maxLength": 500
302
- },
303
- "priority": {
304
- "$ref": "urn:ifsoul:protocol:draft-0.2.0:common#/$defs/priority"
305
- },
306
- "status": {
307
- "enum": ["desired", "active", "paused", "complete"]
308
- }
309
- },
310
- "required": ["goalId", "description", "priority", "status"],
311
- "additionalProperties": false
312
- },
313
- "minItems": 0,
314
- "maxItems": 32
315
- },
316
- "authoredBiography": {
317
- "type": "object",
318
- "properties": {
319
- "text": {
320
- "type": "string",
321
- "minLength": 1,
322
- "maxLength": 8000
323
- },
324
- "fictional": {
325
- "const": true
326
- }
327
- },
328
- "required": ["text", "fictional"],
329
- "additionalProperties": false
330
- }
331
- },
332
- "required": [
333
- "name",
334
- "description",
335
- "traits",
336
- "preferences",
337
- "speechStyle",
338
- "goals",
339
- "authoredBiography"
340
- ],
341
- "additionalProperties": false
342
- }
343
- }
344
- }