@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,145 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "urn:ifsoul:protocol:draft-0.1.0:derived-memory",
4
- "type": "object",
5
- "properties": {
6
- "schemaVersion": {
7
- "const": "draft-0.1.0"
8
- },
9
- "kind": {
10
- "const": "derived-memory"
11
- },
12
- "memoryId": {
13
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
14
- },
15
- "characterId": {
16
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
17
- },
18
- "createdAt": {
19
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/utcTimestamp"
20
- },
21
- "scope": {
22
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/scope"
23
- },
24
- "sourceEventIds": {
25
- "type": "array",
26
- "items": {
27
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
28
- },
29
- "minItems": 1,
30
- "uniqueItems": true
31
- },
32
- "derivation": {
33
- "type": "object",
34
- "properties": {
35
- "algorithmId": {
36
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
37
- },
38
- "algorithmVersion": {
39
- "type": "string",
40
- "minLength": 1
41
- },
42
- "modelId": {
43
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
44
- }
45
- },
46
- "required": ["algorithmId", "algorithmVersion"],
47
- "additionalProperties": false
48
- },
49
- "payload": {
50
- "oneOf": [
51
- {
52
- "type": "object",
53
- "properties": {
54
- "type": {
55
- "const": "fact"
56
- },
57
- "text": {
58
- "type": "string",
59
- "minLength": 1
60
- }
61
- },
62
- "required": ["type", "text"],
63
- "additionalProperties": false
64
- },
65
- {
66
- "type": "object",
67
- "properties": {
68
- "type": {
69
- "const": "relationship"
70
- },
71
- "subjectId": {
72
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
73
- },
74
- "relation": {
75
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
76
- },
77
- "objectId": {
78
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
79
- },
80
- "description": {
81
- "type": "string",
82
- "minLength": 1
83
- }
84
- },
85
- "required": ["type", "subjectId", "relation", "objectId"],
86
- "additionalProperties": false
87
- },
88
- {
89
- "type": "object",
90
- "properties": {
91
- "type": {
92
- "const": "summary"
93
- },
94
- "text": {
95
- "type": "string",
96
- "minLength": 1
97
- }
98
- },
99
- "required": ["type", "text"],
100
- "additionalProperties": false
101
- },
102
- {
103
- "type": "object",
104
- "properties": {
105
- "type": {
106
- "const": "embedding"
107
- },
108
- "vector": {
109
- "type": "array",
110
- "items": {
111
- "type": "number"
112
- },
113
- "minItems": 1
114
- }
115
- },
116
- "required": ["type", "vector"],
117
- "additionalProperties": false
118
- }
119
- ]
120
- },
121
- "extensions": {
122
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensions"
123
- },
124
- "requiredExtensions": {
125
- "type": "array",
126
- "items": {
127
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensionName"
128
- },
129
- "minItems": 0,
130
- "uniqueItems": true
131
- }
132
- },
133
- "required": [
134
- "schemaVersion",
135
- "kind",
136
- "memoryId",
137
- "characterId",
138
- "createdAt",
139
- "scope",
140
- "sourceEventIds",
141
- "derivation",
142
- "payload"
143
- ],
144
- "additionalProperties": false
145
- }
@@ -1,123 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "urn:ifsoul:protocol:draft-0.1.0:memory-event",
4
- "type": "object",
5
- "properties": {
6
- "schemaVersion": {
7
- "const": "draft-0.1.0"
8
- },
9
- "kind": {
10
- "const": "memory-event"
11
- },
12
- "eventId": {
13
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
14
- },
15
- "characterId": {
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
- "source": {
25
- "type": "object",
26
- "properties": {
27
- "sourceId": {
28
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
29
- },
30
- "kind": {
31
- "enum": ["world-adapter", "runtime", "user", "import"]
32
- },
33
- "sequence": {
34
- "type": "integer",
35
- "minimum": 0,
36
- "maximum": 9007199254740991
37
- }
38
- },
39
- "required": ["sourceId", "kind", "sequence"],
40
- "additionalProperties": false
41
- },
42
- "observerId": {
43
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
44
- },
45
- "recordedAt": {
46
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/utcTimestamp"
47
- },
48
- "worldTime": {
49
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/worldTime"
50
- },
51
- "scope": {
52
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/scope"
53
- },
54
- "payload": {
55
- "type": "object",
56
- "properties": {
57
- "type": {
58
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
59
- },
60
- "data": {
61
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/jsonObject"
62
- }
63
- },
64
- "required": ["type", "data"],
65
- "additionalProperties": false
66
- },
67
- "provenance": {
68
- "type": "object",
69
- "properties": {
70
- "eventIds": {
71
- "type": "array",
72
- "items": {
73
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
74
- },
75
- "minItems": 0,
76
- "uniqueItems": true
77
- },
78
- "worldEventIds": {
79
- "type": "array",
80
- "items": {
81
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
82
- },
83
- "minItems": 0,
84
- "uniqueItems": true
85
- }
86
- },
87
- "required": ["eventIds", "worldEventIds"],
88
- "additionalProperties": false
89
- },
90
- "confidence": {
91
- "type": "number",
92
- "minimum": 0,
93
- "maximum": 1
94
- },
95
- "extensions": {
96
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensions"
97
- },
98
- "requiredExtensions": {
99
- "type": "array",
100
- "items": {
101
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensionName"
102
- },
103
- "minItems": 0,
104
- "uniqueItems": true
105
- }
106
- },
107
- "required": [
108
- "schemaVersion",
109
- "kind",
110
- "eventId",
111
- "characterId",
112
- "worldId",
113
- "sessionId",
114
- "source",
115
- "observerId",
116
- "recordedAt",
117
- "worldTime",
118
- "scope",
119
- "payload",
120
- "provenance"
121
- ],
122
- "additionalProperties": false
123
- }
@@ -1,326 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "urn:ifsoul:protocol:draft-0.1.0:model-provider",
4
- "oneOf": [
5
- {
6
- "$ref": "#/$defs/capabilities"
7
- },
8
- {
9
- "$ref": "#/$defs/request"
10
- },
11
- {
12
- "$ref": "#/$defs/response"
13
- },
14
- {
15
- "$ref": "#/$defs/error"
16
- }
17
- ],
18
- "$defs": {
19
- "capabilities": {
20
- "type": "object",
21
- "properties": {
22
- "schemaVersion": {
23
- "const": "draft-0.1.0"
24
- },
25
- "kind": {
26
- "const": "provider-capabilities"
27
- },
28
- "providerId": {
29
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
30
- },
31
- "modelId": {
32
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
33
- },
34
- "toolCalling": {
35
- "type": "boolean"
36
- },
37
- "structuredOutput": {
38
- "type": "boolean"
39
- },
40
- "cancellation": {
41
- "enum": ["best-effort", "unsupported"]
42
- },
43
- "usage": {
44
- "type": "boolean"
45
- },
46
- "extensions": {
47
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensions"
48
- },
49
- "requiredExtensions": {
50
- "type": "array",
51
- "items": {
52
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensionName"
53
- },
54
- "minItems": 0,
55
- "uniqueItems": true
56
- }
57
- },
58
- "required": [
59
- "schemaVersion",
60
- "kind",
61
- "providerId",
62
- "modelId",
63
- "toolCalling",
64
- "structuredOutput",
65
- "cancellation",
66
- "usage"
67
- ],
68
- "additionalProperties": false
69
- },
70
- "request": {
71
- "type": "object",
72
- "properties": {
73
- "schemaVersion": {
74
- "const": "draft-0.1.0"
75
- },
76
- "kind": {
77
- "const": "model-request"
78
- },
79
- "requestId": {
80
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
81
- },
82
- "providerId": {
83
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
84
- },
85
- "modelId": {
86
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
87
- },
88
- "messages": {
89
- "type": "array",
90
- "items": {
91
- "type": "object",
92
- "properties": {
93
- "role": {
94
- "enum": ["system", "user", "assistant", "tool"]
95
- },
96
- "content": {
97
- "type": "string"
98
- },
99
- "toolCallId": {
100
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
101
- },
102
- "toolCalls": {
103
- "type": "array",
104
- "items": {
105
- "type": "object",
106
- "properties": {
107
- "toolCallId": {
108
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
109
- },
110
- "name": {
111
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
112
- },
113
- "arguments": {
114
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/jsonObject"
115
- }
116
- },
117
- "required": ["toolCallId", "name", "arguments"],
118
- "additionalProperties": false
119
- },
120
- "minItems": 0
121
- }
122
- },
123
- "required": ["role", "content"],
124
- "additionalProperties": false
125
- },
126
- "minItems": 1
127
- },
128
- "tools": {
129
- "type": "array",
130
- "items": {
131
- "type": "object",
132
- "properties": {
133
- "name": {
134
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
135
- },
136
- "description": {
137
- "type": "string",
138
- "minLength": 1
139
- },
140
- "argumentsSchema": {
141
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/jsonSchema"
142
- }
143
- },
144
- "required": ["name", "description", "argumentsSchema"],
145
- "additionalProperties": false
146
- },
147
- "minItems": 0
148
- },
149
- "toolChoice": {
150
- "enum": ["none", "auto", "required"]
151
- },
152
- "outputFormat": {
153
- "enum": ["text", "json-object"]
154
- },
155
- "deadlineAt": {
156
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/utcTimestamp"
157
- },
158
- "cancellationId": {
159
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
160
- },
161
- "maxOutputTokens": {
162
- "type": "integer",
163
- "minimum": 1
164
- },
165
- "extensions": {
166
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensions"
167
- },
168
- "requiredExtensions": {
169
- "type": "array",
170
- "items": {
171
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensionName"
172
- },
173
- "minItems": 0,
174
- "uniqueItems": true
175
- }
176
- },
177
- "required": [
178
- "schemaVersion",
179
- "kind",
180
- "requestId",
181
- "providerId",
182
- "modelId",
183
- "messages",
184
- "toolChoice",
185
- "outputFormat",
186
- "deadlineAt"
187
- ],
188
- "additionalProperties": false
189
- },
190
- "response": {
191
- "type": "object",
192
- "properties": {
193
- "schemaVersion": {
194
- "const": "draft-0.1.0"
195
- },
196
- "kind": {
197
- "const": "model-response"
198
- },
199
- "requestId": {
200
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
201
- },
202
- "providerId": {
203
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
204
- },
205
- "modelId": {
206
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
207
- },
208
- "recordedAt": {
209
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/utcTimestamp"
210
- },
211
- "status": {
212
- "enum": ["completed", "incomplete", "cancelled"]
213
- },
214
- "output": {
215
- "type": "object",
216
- "properties": {
217
- "text": {
218
- "type": "string"
219
- },
220
- "toolCalls": {
221
- "type": "array",
222
- "items": {
223
- "type": "object",
224
- "properties": {
225
- "toolCallId": {
226
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
227
- },
228
- "name": {
229
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
230
- },
231
- "arguments": {
232
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/jsonObject"
233
- }
234
- },
235
- "required": ["toolCallId", "name", "arguments"],
236
- "additionalProperties": false
237
- },
238
- "minItems": 0
239
- }
240
- },
241
- "required": ["text", "toolCalls"],
242
- "additionalProperties": false
243
- },
244
- "finishReason": {
245
- "enum": ["stop", "tool-calls", "length", "cancelled"]
246
- },
247
- "usage": {
248
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/usage"
249
- },
250
- "extensions": {
251
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensions"
252
- },
253
- "requiredExtensions": {
254
- "type": "array",
255
- "items": {
256
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensionName"
257
- },
258
- "minItems": 0,
259
- "uniqueItems": true
260
- }
261
- },
262
- "required": [
263
- "schemaVersion",
264
- "kind",
265
- "requestId",
266
- "providerId",
267
- "modelId",
268
- "recordedAt",
269
- "status",
270
- "output",
271
- "finishReason"
272
- ],
273
- "additionalProperties": false
274
- },
275
- "error": {
276
- "type": "object",
277
- "properties": {
278
- "schemaVersion": {
279
- "const": "draft-0.1.0"
280
- },
281
- "kind": {
282
- "const": "model-error"
283
- },
284
- "requestId": {
285
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
286
- },
287
- "providerId": {
288
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
289
- },
290
- "modelId": {
291
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
292
- },
293
- "recordedAt": {
294
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/utcTimestamp"
295
- },
296
- "error": {
297
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/error"
298
- },
299
- "usage": {
300
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/usage"
301
- },
302
- "extensions": {
303
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensions"
304
- },
305
- "requiredExtensions": {
306
- "type": "array",
307
- "items": {
308
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensionName"
309
- },
310
- "minItems": 0,
311
- "uniqueItems": true
312
- }
313
- },
314
- "required": [
315
- "schemaVersion",
316
- "kind",
317
- "requestId",
318
- "providerId",
319
- "modelId",
320
- "recordedAt",
321
- "error"
322
- ],
323
- "additionalProperties": false
324
- }
325
- }
326
- }
@@ -1,89 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "urn:ifsoul:protocol:draft-0.1.0:perception",
4
- "type": "object",
5
- "properties": {
6
- "schemaVersion": {
7
- "const": "draft-0.1.0"
8
- },
9
- "kind": {
10
- "const": "perception"
11
- },
12
- "observationId": {
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
- "observerId": {
25
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
26
- },
27
- "observedAt": {
28
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/utcTimestamp"
29
- },
30
- "worldTime": {
31
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/worldTime"
32
- },
33
- "worldRevision": {
34
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
35
- },
36
- "observations": {
37
- "type": "array",
38
- "items": {
39
- "type": "object",
40
- "properties": {
41
- "subjectId": {
42
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
43
- },
44
- "scope": {
45
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/scope"
46
- },
47
- "payload": {
48
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/jsonObject"
49
- }
50
- },
51
- "required": ["subjectId", "scope", "payload"],
52
- "additionalProperties": false
53
- },
54
- "minItems": 0
55
- },
56
- "availableCapabilityIds": {
57
- "type": "array",
58
- "items": {
59
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
60
- },
61
- "minItems": 0,
62
- "uniqueItems": true
63
- },
64
- "extensions": {
65
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensions"
66
- },
67
- "requiredExtensions": {
68
- "type": "array",
69
- "items": {
70
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensionName"
71
- },
72
- "minItems": 0,
73
- "uniqueItems": true
74
- }
75
- },
76
- "required": [
77
- "schemaVersion",
78
- "kind",
79
- "observationId",
80
- "adapterId",
81
- "worldId",
82
- "sessionId",
83
- "observerId",
84
- "observedAt",
85
- "worldTime",
86
- "observations"
87
- ],
88
- "additionalProperties": false
89
- }