@curatelabs/graphforge-agent-skills 0.5.1 → 0.6.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -68,6 +68,15 @@ Input, output, and error-detail payloads enforce the same recursive value
68
68
  budgets in the dependency-free validator; the checked-in schemas additionally
69
69
  bound every nested string, array, and object.
70
70
 
71
+ For an external decision call, place the complete request contract under the
72
+ normal input envelope and validate that value with the separately exported
73
+ `decision-batch-v1.json` schema. The schema carries the Rust validator's typed
74
+ choices, rubric order, uncertainty, producer confidence meaning, input
75
+ identity, and row limits. The adapter remains transport only: application code
76
+ passes the batch to the native `validateDecisionBatch` method and owns any
77
+ clarification, review, or action policy. It does not execute a producer or
78
+ drop fields to fit its recursive payload budget.
79
+
71
80
  ## Local offline smoke
72
81
 
73
82
  From the repository root, create the local artifact and run the deterministic
@@ -86,7 +95,7 @@ npx --offline --no-install graphforge-agent-skills compatibility --json
86
95
  ```
87
96
 
88
97
  The compatibility response is machine-readable and currently declares support
89
- for GraphForge `>=0.5.0 <0.6.0`.
98
+ for GraphForge `>=0.6.0-dev <0.7.0`.
90
99
 
91
100
  ## Bootstrap, build knowledge, and resolve belief
92
101
 
@@ -102,8 +111,8 @@ conflicts.
102
111
  Build knowledge accepts caller-keyed nodes and edges plus caller-supplied UUIDv7
103
112
  operation and ledger identities. It enables the public provenance/knowledge
104
113
  capabilities, uses native UUID handles for graph references, and uses the atomic
105
- assertion-plus-nonempty-evidence API, then appends the required explicit M20
106
- confidence assessment. M21 reasoning and first status are appended only when
114
+ assertion-plus-nonempty-evidence API, then appends the required explicit knowledge
115
+ confidence assessment. epistemic reasoning and first status are appended only when
107
116
  their explicit input blocks are supplied. A domain property named `confidence`
108
117
  remains an ordinary graph property.
109
118
 
@@ -124,20 +133,20 @@ fingerprints. Native ambiguity remains a structured error; confidence is never
124
133
  used to choose an alternative. The returned opaque `projection` is reserved for
125
134
  later recorded dispatch through the native resolved-projection API.
126
135
 
127
- `narrateBeliefRecords` pages every public scoped M20/M21 history family for the
136
+ `narrateBeliefRecords` pages every public scoped knowledge/epistemic history family for the
128
137
  resolved assertion set within an explicit `record_budget`, keeps competing and
129
138
  superseded records distinguishable, and returns project-level pagination
130
139
  descriptors rather than truncating broader collections.
131
140
 
132
141
  `dispatchRecordedNeutralAnalysis` forwards one caller-prepared descriptor to
133
142
  `invokeResolvedRecorded`, returns the Arrow result with independent run and
134
- attachment state, and leaves completed M20 runs queryable when attachment fails.
143
+ attachment state, and leaves completed knowledge runs queryable when attachment fails.
135
144
 
136
145
  `exploreGraph` dispatches bounded neighborhood, traversal, path, and
137
146
  reachability requests through the public paths/descriptor facade, fails closed
138
147
  without finite bounds, and opens only the graph capability.
139
148
 
140
- `retrieveAnalyze` reaches public M19 find modes and every live M18 family with
149
+ `retrieveAnalyze` reaches public search find modes and every live algorithm family with
141
150
  explicit caller-selected algorithms/inputs, finite `result_limit`, and
142
151
  graph-only capability opens.
143
152
 
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "schema_version": 1,
3
3
  "package": "@curatelabs/graphforge-agent-skills",
4
- "package_version": "0.5.1",
5
- "graphforge_release": "0.5.1",
6
- "graphforge_version_range": ">=0.5.0 <0.6.0",
4
+ "package_version": "0.6.0-rc.4",
5
+ "graphforge_release": "0.6.0-rc.4",
6
+ "graphforge_version_range": ">=0.6.0-dev <0.7.0",
7
7
  "security_contract": {
8
8
  "subprocess": "unsupported",
9
9
  "project_symlinks": "rejected",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curatelabs/graphforge-agent-skills",
3
- "version": "0.5.1",
3
+ "version": "0.6.0-rc.4",
4
4
  "description": "NPX-distributed agent skills and adapters for GraphForge",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://docs.graphforge.sh/",
@@ -39,6 +39,7 @@
39
39
  "./workflows": "./workflows/index.js",
40
40
  "./schemas": "./schemas/validator.js",
41
41
  "./schemas/input-envelope-v1.json": "./schemas/input-envelope-v1.json",
42
+ "./schemas/decision-batch-v1.json": "./schemas/decision-batch-v1.json",
42
43
  "./schemas/output-envelope-v1.json": "./schemas/output-envelope-v1.json",
43
44
  "./schemas/skill-manifest-v1.json": "./schemas/skill-manifest-v1.json",
44
45
  "./compatibility.json": "./compatibility.json"
@@ -48,8 +49,8 @@
48
49
  },
49
50
  "graphforgeCompatibility": {
50
51
  "schemaVersion": 1,
51
- "release": "0.5.1",
52
- "range": ">=0.5.0 <0.6.0"
52
+ "release": "0.6.0-rc.4",
53
+ "range": ">=0.6.0-dev <0.7.0"
53
54
  },
54
55
  "publishConfig": {
55
56
  "access": "public",
package/schemas/README.md CHANGED
@@ -9,6 +9,10 @@ is closed (`additionalProperties: false`) and carries the exact integer
9
9
  - `input-envelope-v1.json` carries one skill invocation.
10
10
  - `output-envelope-v1.json` carries either a successful result or a structured
11
11
  error.
12
+ - `decision-batch-v1.json` describes the provider-neutral input accepted by
13
+ the native Rust decision validator, including finite choices, ordered
14
+ rubric levels, explicit result status, confidence meaning and the 256-row
15
+ result bound.
12
16
 
13
17
  Import `validateSkillManifest`, `validateSkillInput`, or `validateSkillOutput`
14
18
  from `@curatelabs/graphforge-agent-skills/schemas`. Validation is local and deterministic;
@@ -0,0 +1,199 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://graphforge.dev/schemas/decision-batch-v1.json",
4
+ "title": "GraphForge provider-neutral decision batch v1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["input", "producer", "questions", "results"],
8
+ "properties": {
9
+ "input": { "$ref": "#/$defs/input" },
10
+ "producer": { "$ref": "#/$defs/producer" },
11
+ "questions": {
12
+ "type": "array",
13
+ "minItems": 1,
14
+ "maxItems": 256,
15
+ "items": { "$ref": "#/$defs/question" }
16
+ },
17
+ "results": {
18
+ "type": "array",
19
+ "maxItems": 256,
20
+ "items": { "$ref": "#/$defs/result" }
21
+ }
22
+ },
23
+ "$defs": {
24
+ "uuid": {
25
+ "type": "string",
26
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
27
+ },
28
+ "digest": {
29
+ "type": "array",
30
+ "minItems": 32,
31
+ "maxItems": 32,
32
+ "items": { "type": "integer", "minimum": 0, "maximum": 255 }
33
+ },
34
+ "label": { "type": "string", "minLength": 1, "maxLength": 256 },
35
+ "input": {
36
+ "type": "object",
37
+ "additionalProperties": false,
38
+ "required": [
39
+ "generation_uuid",
40
+ "projection_sha256",
41
+ "selection_sha256",
42
+ "selected_item_uuids"
43
+ ],
44
+ "properties": {
45
+ "generation_uuid": { "$ref": "#/$defs/uuid" },
46
+ "version_uuid": {
47
+ "anyOf": [{ "$ref": "#/$defs/uuid" }, { "type": "null" }]
48
+ },
49
+ "projection_sha256": { "$ref": "#/$defs/digest" },
50
+ "selection_sha256": { "$ref": "#/$defs/digest" },
51
+ "selected_item_uuids": {
52
+ "type": "array",
53
+ "maxItems": 4096,
54
+ "items": { "$ref": "#/$defs/uuid" }
55
+ }
56
+ }
57
+ },
58
+ "producer": {
59
+ "type": "object",
60
+ "additionalProperties": false,
61
+ "required": ["name"],
62
+ "properties": {
63
+ "name": { "$ref": "#/$defs/label" },
64
+ "model": { "anyOf": [{ "$ref": "#/$defs/label" }, { "type": "null" }] },
65
+ "revision": {
66
+ "anyOf": [{ "$ref": "#/$defs/label" }, { "type": "null" }]
67
+ }
68
+ }
69
+ },
70
+ "question": {
71
+ "type": "object",
72
+ "additionalProperties": false,
73
+ "required": ["question_uuid", "text", "item_uuids", "kind"],
74
+ "properties": {
75
+ "question_uuid": { "$ref": "#/$defs/uuid" },
76
+ "text": { "type": "string", "minLength": 1, "maxLength": 4096 },
77
+ "item_uuids": {
78
+ "type": "array",
79
+ "maxItems": 256,
80
+ "items": { "$ref": "#/$defs/uuid" }
81
+ },
82
+ "kind": {
83
+ "oneOf": [
84
+ {
85
+ "type": "object",
86
+ "additionalProperties": false,
87
+ "required": ["kind", "allowed_choices"],
88
+ "properties": {
89
+ "kind": { "const": "choice" },
90
+ "allowed_choices": {
91
+ "type": "array",
92
+ "minItems": 1,
93
+ "maxItems": 256,
94
+ "items": { "$ref": "#/$defs/label" }
95
+ }
96
+ }
97
+ },
98
+ {
99
+ "type": "object",
100
+ "additionalProperties": false,
101
+ "required": ["kind", "ordered_levels"],
102
+ "properties": {
103
+ "kind": { "const": "rubric_score" },
104
+ "ordered_levels": {
105
+ "type": "array",
106
+ "minItems": 2,
107
+ "maxItems": 256,
108
+ "items": { "$ref": "#/$defs/label" }
109
+ }
110
+ }
111
+ },
112
+ {
113
+ "type": "object",
114
+ "additionalProperties": false,
115
+ "required": ["kind"],
116
+ "properties": { "kind": { "const": "yes_no_probability" } }
117
+ }
118
+ ]
119
+ }
120
+ }
121
+ },
122
+ "confidence": {
123
+ "type": "object",
124
+ "additionalProperties": false,
125
+ "required": ["value", "minimum", "maximum", "domain", "meaning"],
126
+ "properties": {
127
+ "value": { "type": "number" },
128
+ "minimum": { "type": "number" },
129
+ "maximum": { "type": "number" },
130
+ "domain": { "$ref": "#/$defs/label" },
131
+ "meaning": { "type": "string", "minLength": 1, "maxLength": 4096 }
132
+ }
133
+ },
134
+ "result": {
135
+ "type": "object",
136
+ "additionalProperties": false,
137
+ "required": ["question_uuid", "status"],
138
+ "properties": {
139
+ "question_uuid": { "$ref": "#/$defs/uuid" },
140
+ "item_uuid": {
141
+ "anyOf": [{ "$ref": "#/$defs/uuid" }, { "type": "null" }]
142
+ },
143
+ "status": {
144
+ "enum": ["answered", "uncertain", "unavailable", "missing"]
145
+ },
146
+ "value": {
147
+ "oneOf": [
148
+ {
149
+ "type": "object",
150
+ "additionalProperties": false,
151
+ "required": ["kind", "value"],
152
+ "properties": {
153
+ "kind": { "const": "choice" },
154
+ "value": { "$ref": "#/$defs/label" }
155
+ }
156
+ },
157
+ {
158
+ "type": "object",
159
+ "additionalProperties": false,
160
+ "required": ["kind", "value"],
161
+ "properties": {
162
+ "kind": { "const": "rubric_score" },
163
+ "value": { "$ref": "#/$defs/label" }
164
+ }
165
+ },
166
+ {
167
+ "type": "object",
168
+ "additionalProperties": false,
169
+ "required": ["kind", "value"],
170
+ "properties": {
171
+ "kind": { "const": "yes_no_probability" },
172
+ "value": {
173
+ "type": "object",
174
+ "additionalProperties": false,
175
+ "required": ["yes_probability"],
176
+ "properties": {
177
+ "yes_probability": {
178
+ "type": "number",
179
+ "minimum": 0,
180
+ "maximum": 1
181
+ },
182
+ "no_probability": {
183
+ "type": ["number", "null"],
184
+ "minimum": 0,
185
+ "maximum": 1
186
+ }
187
+ }
188
+ }
189
+ }
190
+ }
191
+ ]
192
+ },
193
+ "confidence": {
194
+ "anyOf": [{ "$ref": "#/$defs/confidence" }, { "type": "null" }]
195
+ }
196
+ }
197
+ }
198
+ }
199
+ }
package/skills/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  `bootstrap` creates or reopens a local project and verifies a real
4
4
  create/reopen/query cycle. `build-knowledge` appends caller-specified graph and
5
- M20 records, with optional explicit M21 reasoning and first status. Both use the
5
+ knowledge records, with optional explicit epistemic reasoning and first status. Both use the
6
6
  shared adapter and injected shipped Node/Arrow surfaces; neither contains a
7
7
  runtime, fallback backend, inference, search, traversal, or algorithm behavior.
8
8
 
@@ -2,7 +2,7 @@
2
2
  "schema_version": 1,
3
3
  "id": "build-knowledge",
4
4
  "title": "Build GraphForge graph and knowledge records",
5
- "description": "Append UUID-backed graph records and required M20 provenance, assertion, confidence, and evidence records, with optional additional M21 status and reasoning, without inference or overwrite.",
5
+ "description": "Append UUID-backed graph records and required knowledge provenance, assertion, confidence, and evidence records, with optional additional epistemic status and reasoning, without inference or overwrite.",
6
6
  "input_schema": "graphforge-agent-skill-input/v1",
7
7
  "output_schema": "graphforge-agent-skill-output/v1",
8
8
  "required_capabilities": {
@@ -542,8 +542,8 @@ export async function narrateBeliefRecords({
542
542
  }
543
543
 
544
544
  /**
545
- * Optionally dispatch one caller-prepared neutral M18 analysis on a resolved
546
- * belief projection, preserving completed M20 runs when M21 attachment fails.
545
+ * Optionally dispatch one caller-prepared neutral algorithm analysis on a resolved
546
+ * belief projection, preserving completed knowledge runs when epistemic attachment fails.
547
547
  */
548
548
  export async function dispatchRecordedNeutralAnalysis({
549
549
  GraphForge,
@@ -810,7 +810,7 @@ const RETRIEVE_SURFACES = new Set(["find", "rank", "cluster", "paths", "analyze"
810
810
  const MAX_RETRIEVE_RESULT_LIMIT = 10_000;
811
811
 
812
812
  /**
813
- * Bounded retrieve/analyze over public M19 find and live M18 descriptor families.
813
+ * Bounded retrieve/analyze over public search find and live algorithm descriptor families.
814
814
  *
815
815
  * Caller-selected modes and descriptor fields pass through unchanged. Rust owns
816
816
  * algorithm/search semantics; this workflow only enforces finite bounds and
@@ -922,7 +922,7 @@ function validateRetrieveInput(input) {
922
922
  if (typeof input.algorithm !== "string" || input.algorithm.length === 0) {
923
923
  throw new AgentAdapterError(
924
924
  "GF_AGENT_RETRIEVE_ALGORITHM_REQUIRED",
925
- "M18 surfaces require an explicit algorithm catalog value",
925
+ "algorithm surfaces require an explicit algorithm catalog value",
926
926
  );
927
927
  }
928
928
  if (surface !== "analyze" && (typeof input.label !== "string" || input.label.length === 0)) {
@@ -935,7 +935,7 @@ function validateRetrieveInput(input) {
935
935
  }
936
936
  return {
937
937
  echo: {
938
- m18: {
938
+ algorithm: {
939
939
  algorithm: input.algorithm,
940
940
  directed: input.directed === undefined ? null : Boolean(input.directed),
941
941
  label: input.label ?? null,
@@ -945,7 +945,7 @@ function validateRetrieveInput(input) {
945
945
  via: input.via ?? null,
946
946
  },
947
947
  },
948
- m18: {
948
+ algorithm: {
949
949
  algorithm: input.algorithm,
950
950
  directed: input.directed,
951
951
  label: input.label,
@@ -973,57 +973,91 @@ function invokeRetrieve(graph, request) {
973
973
  request.find.forceStale,
974
974
  );
975
975
  }
976
- const { m18, surface } = request;
976
+ const { algorithm, surface } = request;
977
977
  if (surface === "rank") {
978
978
  if (typeof graph.prepareRankInvocation === "function") {
979
979
  return graph.invokeDescriptor(
980
- graph.prepareRankInvocation(m18.label, m18.algorithm, m18.via, m18.directed),
980
+ graph.prepareRankInvocation(
981
+ algorithm.label,
982
+ algorithm.algorithm,
983
+ algorithm.via,
984
+ algorithm.directed,
985
+ ),
981
986
  );
982
987
  }
983
- return graph.rank(m18.label, m18.algorithm, m18.via, m18.directed);
988
+ return graph.rank(algorithm.label, algorithm.algorithm, algorithm.via, algorithm.directed);
984
989
  }
985
990
  if (surface === "cluster") {
986
991
  if (typeof graph.prepareClusterInvocation === "function") {
987
992
  return graph.invokeDescriptor(
988
993
  graph.prepareClusterInvocation(
989
- m18.label,
990
- m18.algorithm,
991
- m18.via,
992
- m18.directed,
993
- m18.vectorProperty,
994
+ algorithm.label,
995
+ algorithm.algorithm,
996
+ algorithm.via,
997
+ algorithm.directed,
998
+ algorithm.vectorProperty,
994
999
  ),
995
1000
  );
996
1001
  }
997
- return graph.cluster(m18.label, m18.algorithm, m18.via, m18.directed, m18.vectorProperty);
1002
+ return graph.cluster(
1003
+ algorithm.label,
1004
+ algorithm.algorithm,
1005
+ algorithm.via,
1006
+ algorithm.directed,
1007
+ algorithm.vectorProperty,
1008
+ );
998
1009
  }
999
1010
  if (surface === "paths") {
1000
1011
  if (typeof graph.preparePathsInvocation === "function") {
1001
1012
  return graph.invokeDescriptor(
1002
- graph.preparePathsInvocation(m18.source, m18.target, m18.algorithm, m18.via, m18.directed),
1013
+ graph.preparePathsInvocation(
1014
+ algorithm.source,
1015
+ algorithm.target,
1016
+ algorithm.algorithm,
1017
+ algorithm.via,
1018
+ algorithm.directed,
1019
+ ),
1003
1020
  );
1004
1021
  }
1005
- return graph.paths(m18.source, m18.target, m18.algorithm, m18.via, m18.directed);
1022
+ return graph.paths(
1023
+ algorithm.source,
1024
+ algorithm.target,
1025
+ algorithm.algorithm,
1026
+ algorithm.via,
1027
+ algorithm.directed,
1028
+ );
1006
1029
  }
1007
1030
  if (surface === "analyze") {
1008
1031
  if (typeof graph.prepareAnalyzeInvocation === "function") {
1009
1032
  return graph.invokeDescriptor(
1010
- graph.prepareAnalyzeInvocation(m18.algorithm, m18.label, m18.via, m18.directed),
1033
+ graph.prepareAnalyzeInvocation(
1034
+ algorithm.algorithm,
1035
+ algorithm.label,
1036
+ algorithm.via,
1037
+ algorithm.directed,
1038
+ ),
1011
1039
  );
1012
1040
  }
1013
- return graph.analyze(m18.algorithm, m18.label, m18.via, m18.directed);
1041
+ return graph.analyze(algorithm.algorithm, algorithm.label, algorithm.via, algorithm.directed);
1014
1042
  }
1015
1043
  if (typeof graph.prepareSimilarInvocation === "function") {
1016
1044
  return graph.invokeDescriptor(
1017
1045
  graph.prepareSimilarInvocation(
1018
- m18.label,
1019
- m18.algorithm,
1046
+ algorithm.label,
1047
+ algorithm.algorithm,
1020
1048
  request.resultLimit,
1021
- m18.vectorProperty,
1022
- m18.via,
1049
+ algorithm.vectorProperty,
1050
+ algorithm.via,
1023
1051
  ),
1024
1052
  );
1025
1053
  }
1026
- return graph.similar(m18.label, m18.algorithm, request.resultLimit, m18.vectorProperty, m18.via);
1054
+ return graph.similar(
1055
+ algorithm.label,
1056
+ algorithm.algorithm,
1057
+ request.resultLimit,
1058
+ algorithm.vectorProperty,
1059
+ algorithm.via,
1060
+ );
1027
1061
  }
1028
1062
 
1029
1063
  function configuredSurfaces(GraphForge, tableFromIPC) {