@ifsoul/core 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/README.md +30 -33
  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/behavior-types.d.ts +150 -0
  8. package/dist/packages/runtime/src/behavior-types.js +1 -0
  9. package/dist/packages/runtime/src/behavior.d.ts +40 -0
  10. package/dist/packages/runtime/src/behavior.js +621 -0
  11. package/dist/packages/runtime/src/group-scheduler.d.ts +165 -0
  12. package/dist/packages/runtime/src/group-scheduler.js +647 -0
  13. package/dist/packages/runtime/src/index.d.ts +4 -0
  14. package/dist/packages/runtime/src/index.js +4 -1
  15. package/dist/packages/runtime/src/participants.d.ts +107 -0
  16. package/dist/packages/runtime/src/participants.js +309 -0
  17. package/dist/packages/runtime/src/types.d.ts +1 -0
  18. package/package.json +2 -3
  19. package/packages/protocol/schemas/current/archive.schema.json +16 -16
  20. package/packages/protocol/schemas/current/character.schema.json +21 -21
  21. package/packages/protocol/schemas/current/common.schema.json +15 -15
  22. package/packages/protocol/schemas/current/context.schema.json +24 -24
  23. package/packages/protocol/schemas/current/conversation.schema.json +39 -39
  24. package/packages/protocol/schemas/current/environment.schema.json +18 -18
  25. package/packages/protocol/schemas/current/memory.schema.json +66 -66
  26. package/packages/protocol/schemas/current/model-provider.schema.json +40 -40
  27. package/packages/protocol/schemas/current/planning.schema.json +61 -61
  28. package/packages/protocol/schemas/current/provider-common.schema.json +6 -6
  29. package/release.json +7 -12
  30. package/specs/README.md +3 -86
  31. package/specs/current/README.md +3 -5
  32. package/specs/current/examples/archive-fork.json +12 -12
  33. package/specs/current/examples/archive-resume.json +12 -12
  34. package/specs/current/examples/character-instance.json +1 -1
  35. package/specs/current/examples/character-template.json +1 -1
  36. package/specs/current/examples/context-after-inspection.json +1 -1
  37. package/specs/current/examples/context-chat.json +1 -1
  38. package/specs/current/examples/context-daily.json +1 -1
  39. package/specs/current/examples/context-no-speech.json +1 -1
  40. package/specs/current/examples/conversation-delivery.json +1 -1
  41. package/specs/current/examples/conversation-live-request.json +1 -1
  42. package/specs/current/examples/conversation-live-response.json +1 -1
  43. package/specs/current/examples/conversation-no-speech-request.json +1 -1
  44. package/specs/current/examples/conversation-no-speech-response.json +1 -1
  45. package/specs/current/examples/conversation-requested-request.json +1 -1
  46. package/specs/current/examples/conversation-requested-response.json +1 -1
  47. package/specs/current/examples/environment-chat.json +1 -1
  48. package/specs/current/examples/environment-game.json +1 -1
  49. package/specs/current/examples/environment-no-speech.json +1 -1
  50. package/specs/current/examples/intent-checkpoint.json +1 -1
  51. package/specs/current/examples/memory-episode.json +1 -1
  52. package/specs/current/examples/memory-event-conversation.json +1 -1
  53. package/specs/current/examples/memory-event-observed.json +2 -2
  54. package/specs/current/examples/memory-event-plan-proposal.json +2 -2
  55. package/specs/current/examples/memory-event-proposed.json +2 -2
  56. package/specs/current/examples/memory-fact.json +1 -1
  57. package/specs/current/examples/memory-relationship.json +1 -1
  58. package/specs/current/examples/memory-working-context.json +1 -1
  59. package/specs/current/examples/plan-cancel-request.json +1 -1
  60. package/specs/current/examples/plan-cancel-result.json +1 -1
  61. package/specs/current/examples/plan-daily.json +1 -1
  62. package/specs/current/examples/plan-partial-decision.json +1 -1
  63. package/specs/current/examples/portable-memory.jsonl +9 -9
  64. package/specs/current/examples/task-outcome.json +1 -1
  65. package/specs/current/examples/task-progress.json +1 -1
  66. package/specs/current/model-provider/examples/capabilities.json +1 -1
  67. package/specs/current/model-provider/examples/error.json +1 -1
  68. package/specs/current/model-provider/examples/request.json +1 -1
  69. package/specs/current/model-provider/examples/response.json +1 -1
  70. package/docs/npm-publishing.md +0 -44
  71. package/packages/protocol/schemas/action-result.schema.json +0 -187
  72. package/packages/protocol/schemas/action.schema.json +0 -68
  73. package/packages/protocol/schemas/archive-manifest.schema.json +0 -126
  74. package/packages/protocol/schemas/capability.schema.json +0 -131
  75. package/packages/protocol/schemas/character-instance.schema.json +0 -73
  76. package/packages/protocol/schemas/character-template.schema.json +0 -67
  77. package/packages/protocol/schemas/common.schema.json +0 -154
  78. package/packages/protocol/schemas/derived-memory.schema.json +0 -145
  79. package/packages/protocol/schemas/memory-event.schema.json +0 -123
  80. package/packages/protocol/schemas/model-provider.schema.json +0 -326
  81. package/packages/protocol/schemas/perception.schema.json +0 -89
  82. package/packages/protocol/schemas/permission-policy.schema.json +0 -153
  83. package/packages/protocol/schemas/v0.2/archive.schema.json +0 -205
  84. package/packages/protocol/schemas/v0.2/character.schema.json +0 -344
  85. package/packages/protocol/schemas/v0.2/common.schema.json +0 -239
  86. package/packages/protocol/schemas/v0.2/context.schema.json +0 -230
  87. package/packages/protocol/schemas/v0.2/conversation.schema.json +0 -340
  88. package/packages/protocol/schemas/v0.2/environment.schema.json +0 -244
  89. package/packages/protocol/schemas/v0.2/memory.schema.json +0 -495
  90. package/packages/protocol/schemas/v0.2/planning.schema.json +0 -443
  91. package/packages/protocol/schemas/world-event.schema.json +0 -74
  92. package/specs/character/README.md +0 -84
  93. package/specs/character/examples/archive-manifest.json +0 -32
  94. package/specs/character/examples/character-instance.json +0 -20
  95. package/specs/character/examples/character-template.json +0 -19
  96. package/specs/memory/README.md +0 -80
  97. package/specs/memory/examples/derived-memory.json +0 -21
  98. package/specs/memory/examples/memory-event.json +0 -35
  99. package/specs/model-provider/README.md +0 -85
  100. package/specs/model-provider/examples/capabilities.json +0 -10
  101. package/specs/model-provider/examples/error.json +0 -18
  102. package/specs/model-provider/examples/request.json +0 -17
  103. package/specs/model-provider/examples/response.json +0 -19
  104. package/specs/v0.2/README.md +0 -421
  105. package/specs/v0.2/examples/archive-fork.json +0 -64
  106. package/specs/v0.2/examples/archive-resume.json +0 -63
  107. package/specs/v0.2/examples/character-instance.json +0 -57
  108. package/specs/v0.2/examples/character-template.json +0 -45
  109. package/specs/v0.2/examples/context-after-inspection.json +0 -44
  110. package/specs/v0.2/examples/context-chat.json +0 -27
  111. package/specs/v0.2/examples/context-daily.json +0 -69
  112. package/specs/v0.2/examples/context-no-speech.json +0 -27
  113. package/specs/v0.2/examples/conversation-delivery.json +0 -17
  114. package/specs/v0.2/examples/conversation-live-request.json +0 -31
  115. package/specs/v0.2/examples/conversation-live-response.json +0 -23
  116. package/specs/v0.2/examples/conversation-no-speech-request.json +0 -23
  117. package/specs/v0.2/examples/conversation-no-speech-response.json +0 -22
  118. package/specs/v0.2/examples/conversation-requested-request.json +0 -31
  119. package/specs/v0.2/examples/conversation-requested-response.json +0 -23
  120. package/specs/v0.2/examples/environment-chat.json +0 -43
  121. package/specs/v0.2/examples/environment-game.json +0 -80
  122. package/specs/v0.2/examples/environment-no-speech.json +0 -47
  123. package/specs/v0.2/examples/intent-checkpoint.json +0 -29
  124. package/specs/v0.2/examples/memory-episode.json +0 -28
  125. package/specs/v0.2/examples/memory-event-conversation.json +0 -32
  126. package/specs/v0.2/examples/memory-event-observed.json +0 -50
  127. package/specs/v0.2/examples/memory-event-plan-proposal.json +0 -82
  128. package/specs/v0.2/examples/memory-event-proposed.json +0 -53
  129. package/specs/v0.2/examples/memory-fact.json +0 -23
  130. package/specs/v0.2/examples/memory-relationship.json +0 -25
  131. package/specs/v0.2/examples/memory-working-context.json +0 -24
  132. package/specs/v0.2/examples/plan-cancel-request.json +0 -16
  133. package/specs/v0.2/examples/plan-cancel-result.json +0 -21
  134. package/specs/v0.2/examples/plan-daily.json +0 -57
  135. package/specs/v0.2/examples/plan-partial-decision.json +0 -28
  136. package/specs/v0.2/examples/portable-memory.jsonl +0 -9
  137. package/specs/v0.2/examples/task-outcome.json +0 -21
  138. package/specs/v0.2/examples/task-progress.json +0 -19
  139. package/specs/world-adapter/README.md +0 -114
  140. package/specs/world-adapter/examples/action-result-unknown.json +0 -23
  141. package/specs/world-adapter/examples/action-result.json +0 -45
  142. package/specs/world-adapter/examples/action.json +0 -17
  143. package/specs/world-adapter/examples/capability.json +0 -44
  144. package/specs/world-adapter/examples/perception.json +0 -30
  145. package/specs/world-adapter/examples/permission-decision.json +0 -14
  146. package/specs/world-adapter/examples/permission-policy.json +0 -17
  147. package/specs/world-adapter/examples/world-event.json +0 -25
@@ -1,5 +1,5 @@
1
1
  {
2
- "schemaVersion": "0.3.0",
2
+ "schemaVersion": "0.4.0",
3
3
  "kind": "model-response",
4
4
  "requestId": "request-1",
5
5
  "providerId": "synthetic-provider",
@@ -1,44 +0,0 @@
1
- # First npm publication preparation
2
-
3
- The intended first registry package is `@ifsoul/core@0.3.0`, public on
4
- `https://registry.npmjs.org/` with the `latest` dist-tag. This is preparation,
5
- not a publication receipt. Package names reflect the current manifest; GitHub
6
- organization ownership does not establish npm scope ownership or publish rights.
7
-
8
- Run existing frozen-install/check/build/package gates locally. Inspect the exact
9
- built archive, its license/member inventory and SHA-256/SHA-512, then install that
10
- archive in an external consumer and check runtime/declarations. Publish only the
11
- reviewed archive after separate owner approval; do not repack a changed tree under
12
- the approved digest. `publishConfig` fixes public access and the intended registry.
13
-
14
- Before approval, re-read public registry name/version metadata and verify the
15
- publisher's npm identity, scope/team permissions and interactive 2FA readiness.
16
- A public 404 does not prove scope ownership or that a hidden package is absent.
17
- Do not request credentials or tokens in chat. Account setup belongs to the owner
18
- in their browser. Never stage a package as a harmless check: npm staged publishing
19
- can create a public placeholder for a new package.
20
-
21
- Core and SDK are independent runtime packages; publish Core first and verify its
22
- registry readback, then SDK, as a coordinated release sequence. Neither needs an
23
- unpublished IfSoul registry dependency. Existing App/game/Website/Cloud/bridge
24
- archive pins and provenance stay unchanged until a separately reviewed migration
25
- to actually published versions. No automatic publish workflow is authorized.
26
-
27
- After final owner approval and authenticated scope checks, the proposed command
28
- for the exact approved archive is:
29
-
30
- ```sh
31
- npm publish /absolute/path/to/ifsoul-core-0.3.0.tgz --access public --tag latest --registry=https://registry.npmjs.org/ --ignore-scripts
32
- ```
33
-
34
- This command is intentionally not a package script and has not been run. The
35
- local release manifest supplies the real path and immutable candidate digests.
36
- Local digest/provenance receipts are not an npm registry provenance attestation.
37
- Do not add trusted-publisher settings or a CI publication workflow without a
38
- separate owner decision.
39
-
40
- The current [npm scoped-public guide](https://docs.npmjs.com/creating-and-publishing-scoped-public-packages/)
41
- and [publish command](https://docs.npmjs.com/cli/v11/commands/npm-publish/)
42
- require explicit public access and suitable account authentication/2FA policy.
43
- A name/version pair cannot be reused after publication; if it becomes occupied,
44
- stop for a reviewed version/name decision rather than overwrite or unpublish.
@@ -1,187 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "urn:ifsoul:protocol:draft-0.1.0:action-result",
4
- "type": "object",
5
- "properties": {
6
- "schemaVersion": {
7
- "const": "draft-0.1.0"
8
- },
9
- "kind": {
10
- "const": "action-result"
11
- },
12
- "resultId": {
13
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
14
- },
15
- "actionId": {
16
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
17
- },
18
- "adapterId": {
19
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
20
- },
21
- "worldId": {
22
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
23
- },
24
- "sessionId": {
25
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
26
- },
27
- "actorId": {
28
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
29
- },
30
- "recordedAt": {
31
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/utcTimestamp"
32
- },
33
- "worldTime": {
34
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/worldTime"
35
- },
36
- "status": {
37
- "enum": ["success", "rejected", "failed", "unknown"]
38
- },
39
- "execution": {
40
- "enum": ["not-started", "completed", "partial", "unknown"]
41
- },
42
- "events": {
43
- "type": "array",
44
- "items": {
45
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:world-event"
46
- },
47
- "minItems": 0
48
- },
49
- "error": {
50
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/error"
51
- },
52
- "worldRevision": {
53
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/id"
54
- },
55
- "extensions": {
56
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensions"
57
- },
58
- "requiredExtensions": {
59
- "type": "array",
60
- "items": {
61
- "$ref": "urn:ifsoul:protocol:draft-0.1.0:common#/$defs/extensionName"
62
- },
63
- "minItems": 0,
64
- "uniqueItems": true
65
- }
66
- },
67
- "required": [
68
- "schemaVersion",
69
- "kind",
70
- "resultId",
71
- "actionId",
72
- "adapterId",
73
- "worldId",
74
- "sessionId",
75
- "actorId",
76
- "recordedAt",
77
- "worldTime",
78
- "status",
79
- "execution",
80
- "events"
81
- ],
82
- "additionalProperties": false,
83
- "allOf": [
84
- {
85
- "if": {
86
- "properties": {
87
- "status": {
88
- "const": "success"
89
- }
90
- },
91
- "required": ["status"]
92
- },
93
- "then": {
94
- "properties": {
95
- "execution": {
96
- "const": "completed"
97
- },
98
- "error": false
99
- }
100
- }
101
- },
102
- {
103
- "if": {
104
- "properties": {
105
- "status": {
106
- "const": "rejected"
107
- }
108
- },
109
- "required": ["status"]
110
- },
111
- "then": {
112
- "properties": {
113
- "execution": {
114
- "const": "not-started"
115
- },
116
- "events": {
117
- "maxItems": 0,
118
- "type": "array"
119
- }
120
- },
121
- "required": ["error"]
122
- }
123
- },
124
- {
125
- "if": {
126
- "properties": {
127
- "status": {
128
- "const": "failed"
129
- }
130
- },
131
- "required": ["status"]
132
- },
133
- "then": {
134
- "properties": {
135
- "execution": {
136
- "enum": ["not-started", "partial"]
137
- }
138
- },
139
- "required": ["error"]
140
- }
141
- },
142
- {
143
- "if": {
144
- "properties": {
145
- "status": {
146
- "const": "unknown"
147
- }
148
- },
149
- "required": ["status"]
150
- },
151
- "then": {
152
- "properties": {
153
- "execution": {
154
- "const": "unknown"
155
- },
156
- "error": {
157
- "properties": {
158
- "retry": {
159
- "const": "reconcile-first"
160
- }
161
- },
162
- "type": "object"
163
- }
164
- },
165
- "required": ["error"]
166
- }
167
- },
168
- {
169
- "if": {
170
- "properties": {
171
- "execution": {
172
- "const": "not-started"
173
- }
174
- },
175
- "required": ["execution"]
176
- },
177
- "then": {
178
- "properties": {
179
- "events": {
180
- "type": "array",
181
- "maxItems": 0
182
- }
183
- }
184
- }
185
- }
186
- ]
187
- }
@@ -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
- }