@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,68 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "urn:ifsoul:protocol:draft-0.1.0:action",
4
- "type": "object",
5
- "properties": {
6
- "schemaVersion": {
7
- "const": "draft-0.1.0"
8
- },
9
- "kind": {
10
- "const": "action"
11
- },
12
- "actionId": {
13
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
14
- },
15
- "worldId": {
16
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
17
- },
18
- "sessionId": {
19
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
20
- },
21
- "actorId": {
22
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
23
- },
24
- "capabilityId": {
25
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
26
- },
27
- "capabilityRevision": {
28
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
29
- },
30
- "arguments": {
31
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/jsonObject"
32
- },
33
- "requestedAt": {
34
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/utcTimestamp"
35
- },
36
- "deadlineAt": {
37
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/utcTimestamp"
38
- },
39
- "observedWorldRevision": {
40
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
41
- },
42
- "extensions": {
43
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensions"
44
- },
45
- "requiredExtensions": {
46
- "type": "array",
47
- "items": {
48
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensionName"
49
- },
50
- "minItems": 0,
51
- "uniqueItems": true
52
- }
53
- },
54
- "required": [
55
- "schemaVersion",
56
- "kind",
57
- "actionId",
58
- "worldId",
59
- "sessionId",
60
- "actorId",
61
- "capabilityId",
62
- "capabilityRevision",
63
- "arguments",
64
- "requestedAt",
65
- "deadlineAt"
66
- ],
67
- "additionalProperties": false
68
- }
@@ -1,126 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "urn:ifsoul:protocol:draft-0.1.0:archive-manifest",
4
- "type": "object",
5
- "properties": {
6
- "schemaVersion": {
7
- "const": "draft-0.1.0"
8
- },
9
- "kind": {
10
- "const": "archive-manifest"
11
- },
12
- "archiveVersion": {
13
- "const": "draft-0.1.0"
14
- },
15
- "archiveId": {
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
- "schemaVersions": {
22
- "type": "object",
23
- "properties": {
24
- "protocol": {
25
- "const": "draft-0.1.0"
26
- }
27
- },
28
- "required": ["protocol"],
29
- "additionalProperties": false
30
- },
31
- "files": {
32
- "type": "array",
33
- "items": {
34
- "type": "object",
35
- "properties": {
36
- "path": {
37
- "type": "string",
38
- "pattern": "^(?!/)(?!.*(?:^|/)\\.{1,2}(?:/|$))[A-Za-z0-9._-]+(?:/[A-Za-z0-9._-]+)*$"
39
- },
40
- "role": {
41
- "enum": ["template", "instance", "events", "derived", "extension"]
42
- },
43
- "schemaId": {
44
- "type": "string",
45
- "pattern": "^urn:ifsoul:protocol:draft-0\\.1\\.0:[a-z-]+$"
46
- },
47
- "sha256": {
48
- "type": "string",
49
- "pattern": "^[a-f0-9]{64}$"
50
- },
51
- "sizeBytes": {
52
- "type": "integer",
53
- "minimum": 0,
54
- "maximum": 9007199254740991
55
- }
56
- },
57
- "required": ["path", "role", "schemaId", "sha256", "sizeBytes"],
58
- "additionalProperties": false
59
- },
60
- "minItems": 1
61
- },
62
- "filter": {
63
- "type": "object",
64
- "properties": {
65
- "mode": {
66
- "enum": ["private-backup", "filtered"]
67
- },
68
- "omittedCategories": {
69
- "type": "array",
70
- "items": {
71
- "enum": [
72
- "profile",
73
- "events",
74
- "derived",
75
- "relationships",
76
- "extensions"
77
- ]
78
- },
79
- "minItems": 0,
80
- "uniqueItems": true
81
- },
82
- "reasons": {
83
- "type": "array",
84
- "items": {
85
- "type": "string",
86
- "minLength": 1
87
- },
88
- "minItems": 0,
89
- "uniqueItems": true
90
- },
91
- "externalReferences": {
92
- "enum": ["none", "present"]
93
- }
94
- },
95
- "required": [
96
- "mode",
97
- "omittedCategories",
98
- "reasons",
99
- "externalReferences"
100
- ],
101
- "additionalProperties": false
102
- },
103
- "extensions": {
104
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensions"
105
- },
106
- "requiredExtensions": {
107
- "type": "array",
108
- "items": {
109
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensionName"
110
- },
111
- "minItems": 0,
112
- "uniqueItems": true
113
- }
114
- },
115
- "required": [
116
- "schemaVersion",
117
- "kind",
118
- "archiveVersion",
119
- "archiveId",
120
- "createdAt",
121
- "schemaVersions",
122
- "files",
123
- "filter"
124
- ],
125
- "additionalProperties": false
126
- }
@@ -1,131 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "urn:ifsoul:protocol:draft-0.1.0:capability",
4
- "type": "object",
5
- "properties": {
6
- "schemaVersion": {
7
- "const": "draft-0.1.0"
8
- },
9
- "kind": {
10
- "const": "capability-set"
11
- },
12
- "adapterId": {
13
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
14
- },
15
- "worldId": {
16
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
17
- },
18
- "sessionId": {
19
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
20
- },
21
- "actorId": {
22
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
23
- },
24
- "capabilityRevision": {
25
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
26
- },
27
- "supportedSchemaVersions": {
28
- "type": "array",
29
- "items": {
30
- "const": "draft-0.1.0"
31
- },
32
- "minItems": 1,
33
- "uniqueItems": true
34
- },
35
- "capabilities": {
36
- "type": "array",
37
- "items": {
38
- "type": "object",
39
- "properties": {
40
- "capabilityId": {
41
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
42
- },
43
- "description": {
44
- "type": "string",
45
- "minLength": 1
46
- },
47
- "argumentsSchema": {
48
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/jsonSchema"
49
- },
50
- "requiredPermissions": {
51
- "type": "array",
52
- "items": {
53
- "type": "object",
54
- "properties": {
55
- "resource": {
56
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
57
- },
58
- "action": {
59
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
60
- }
61
- },
62
- "required": ["resource", "action"],
63
- "additionalProperties": false
64
- },
65
- "minItems": 0,
66
- "uniqueItems": true
67
- },
68
- "semantics": {
69
- "type": "object",
70
- "properties": {
71
- "preconditions": {
72
- "type": "array",
73
- "items": {
74
- "type": "string",
75
- "minLength": 1
76
- },
77
- "minItems": 0
78
- },
79
- "possibleEffects": {
80
- "type": "array",
81
- "items": {
82
- "type": "string",
83
- "minLength": 1
84
- },
85
- "minItems": 0
86
- }
87
- },
88
- "required": ["preconditions", "possibleEffects"],
89
- "additionalProperties": false
90
- },
91
- "idempotency": {
92
- "enum": ["none", "action-id"]
93
- }
94
- },
95
- "required": [
96
- "capabilityId",
97
- "description",
98
- "argumentsSchema",
99
- "requiredPermissions",
100
- "semantics",
101
- "idempotency"
102
- ],
103
- "additionalProperties": false
104
- },
105
- "minItems": 0
106
- },
107
- "extensions": {
108
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensions"
109
- },
110
- "requiredExtensions": {
111
- "type": "array",
112
- "items": {
113
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensionName"
114
- },
115
- "minItems": 0,
116
- "uniqueItems": true
117
- }
118
- },
119
- "required": [
120
- "schemaVersion",
121
- "kind",
122
- "adapterId",
123
- "worldId",
124
- "sessionId",
125
- "actorId",
126
- "capabilityRevision",
127
- "supportedSchemaVersions",
128
- "capabilities"
129
- ],
130
- "additionalProperties": false
131
- }
@@ -1,73 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "urn:ifsoul:protocol:draft-0.1.0:character-instance",
4
- "type": "object",
5
- "properties": {
6
- "schemaVersion": {
7
- "const": "draft-0.1.0"
8
- },
9
- "kind": {
10
- "const": "character-instance"
11
- },
12
- "characterId": {
13
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
14
- },
15
- "createdAt": {
16
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/utcTimestamp"
17
- },
18
- "template": {
19
- "type": "object",
20
- "properties": {
21
- "templateId": {
22
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
23
- },
24
- "revision": {
25
- "type": "integer",
26
- "minimum": 1
27
- }
28
- },
29
- "required": ["templateId", "revision"],
30
- "additionalProperties": false
31
- },
32
- "profile": {
33
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/profile"
34
- },
35
- "historyEventIds": {
36
- "type": "array",
37
- "items": {
38
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
39
- },
40
- "minItems": 0,
41
- "uniqueItems": true
42
- },
43
- "relationshipMemoryIds": {
44
- "type": "array",
45
- "items": {
46
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
47
- },
48
- "minItems": 0,
49
- "uniqueItems": true
50
- },
51
- "extensions": {
52
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensions"
53
- },
54
- "requiredExtensions": {
55
- "type": "array",
56
- "items": {
57
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensionName"
58
- },
59
- "minItems": 0,
60
- "uniqueItems": true
61
- }
62
- },
63
- "required": [
64
- "schemaVersion",
65
- "kind",
66
- "characterId",
67
- "createdAt",
68
- "profile",
69
- "historyEventIds",
70
- "relationshipMemoryIds"
71
- ],
72
- "additionalProperties": false
73
- }
@@ -1,67 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "urn:ifsoul:protocol:draft-0.1.0:character-template",
4
- "type": "object",
5
- "properties": {
6
- "schemaVersion": {
7
- "const": "draft-0.1.0"
8
- },
9
- "kind": {
10
- "const": "character-template"
11
- },
12
- "templateId": {
13
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
14
- },
15
- "revision": {
16
- "type": "integer",
17
- "minimum": 1
18
- },
19
- "profile": {
20
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/profile"
21
- },
22
- "provenance": {
23
- "type": "object",
24
- "properties": {
25
- "authors": {
26
- "type": "array",
27
- "items": {
28
- "type": "string",
29
- "minLength": 1
30
- },
31
- "minItems": 1,
32
- "uniqueItems": true
33
- },
34
- "license": {
35
- "type": "string",
36
- "minLength": 1
37
- },
38
- "source": {
39
- "type": "string",
40
- "minLength": 1
41
- }
42
- },
43
- "required": ["authors", "license"],
44
- "additionalProperties": false
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
- "templateId",
62
- "revision",
63
- "profile",
64
- "provenance"
65
- ],
66
- "additionalProperties": false
67
- }
@@ -1,154 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "urn:ifsoul:protocol:draft-0.1.0:common",
4
- "description": "Shared definitions, not an exchange document.",
5
- "$defs": {
6
- "id": {
7
- "type": "string",
8
- "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
9
- },
10
- "utcTimestamp": {
11
- "type": "string",
12
- "format": "date-time",
13
- "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?Z$"
14
- },
15
- "extensionName": {
16
- "type": "string",
17
- "pattern": "^[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*)+$"
18
- },
19
- "extensions": {
20
- "type": "object",
21
- "propertyNames": {
22
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensionName"
23
- },
24
- "additionalProperties": true
25
- },
26
- "jsonObject": {
27
- "type": "object",
28
- "additionalProperties": true
29
- },
30
- "jsonSchema": {
31
- "type": "object",
32
- "description": "A JSON Schema 2020-12 object; meta-validation and reference policy are separate checks.",
33
- "additionalProperties": true
34
- },
35
- "worldTime": {
36
- "type": "object",
37
- "properties": {
38
- "timelineId": {
39
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
40
- },
41
- "tick": {
42
- "type": "integer",
43
- "minimum": 0,
44
- "maximum": 9007199254740991
45
- }
46
- },
47
- "required": ["timelineId", "tick"],
48
- "additionalProperties": false
49
- },
50
- "scope": {
51
- "type": "object",
52
- "properties": {
53
- "audience": {
54
- "enum": ["private", "participants", "public"]
55
- },
56
- "subjectIds": {
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
- "export": {
65
- "enum": ["allowed", "consent-required", "forbidden"]
66
- }
67
- },
68
- "required": ["audience", "subjectIds", "export"],
69
- "additionalProperties": false
70
- },
71
- "profile": {
72
- "type": "object",
73
- "properties": {
74
- "name": {
75
- "type": "string",
76
- "minLength": 1
77
- },
78
- "description": {
79
- "type": "string",
80
- "minLength": 1
81
- },
82
- "traits": {
83
- "type": "object",
84
- "propertyNames": {
85
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
86
- },
87
- "additionalProperties": {
88
- "anyOf": [
89
- {
90
- "type": "string"
91
- },
92
- {
93
- "type": "number"
94
- },
95
- {
96
- "type": "boolean"
97
- }
98
- ]
99
- }
100
- }
101
- },
102
- "required": ["name", "description", "traits"],
103
- "additionalProperties": false
104
- },
105
- "error": {
106
- "type": "object",
107
- "properties": {
108
- "code": {
109
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
110
- },
111
- "message": {
112
- "type": "string",
113
- "minLength": 1
114
- },
115
- "retry": {
116
- "enum": [
117
- "never",
118
- "after-correction",
119
- "same-request",
120
- "reconcile-first"
121
- ]
122
- },
123
- "retryAfterMs": {
124
- "type": "integer",
125
- "minimum": 0,
126
- "maximum": 9007199254740991
127
- }
128
- },
129
- "required": ["code", "message", "retry"],
130
- "additionalProperties": false
131
- },
132
- "usage": {
133
- "type": "object",
134
- "properties": {
135
- "inputTokens": {
136
- "type": "integer",
137
- "minimum": 0,
138
- "maximum": 9007199254740991
139
- },
140
- "outputTokens": {
141
- "type": "integer",
142
- "minimum": 0,
143
- "maximum": 9007199254740991
144
- },
145
- "estimated": {
146
- "type": "boolean"
147
- }
148
- },
149
- "required": ["inputTokens", "outputTokens", "estimated"],
150
- "additionalProperties": false
151
- }
152
- },
153
- "not": {}
154
- }