@hmharness/cognitive 0.23.7 → 0.23.10
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/dist/exploration.js +14 -1
- package/package.json +2 -2
package/dist/exploration.js
CHANGED
|
@@ -114,11 +114,24 @@ export class UcbExplorationPolicy {
|
|
|
114
114
|
return keywords.length ? hits / keywords.length : 0;
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
+
/** probe values must be WELL-FORMED for the arg's role: a malformed probe
|
|
118
|
+
* (url='probe') measures arg synthesis, not the environment — every
|
|
119
|
+
* resulting failure would be an artifact polluting the calibration curve. */
|
|
120
|
+
function probeValue(key) {
|
|
121
|
+
const k = key.toLowerCase();
|
|
122
|
+
if (k.includes('url') || k === 'href')
|
|
123
|
+
return 'https://example.com';
|
|
124
|
+
if (k.includes('selector'))
|
|
125
|
+
return 'a';
|
|
126
|
+
if (k.includes('path') || k.includes('file'))
|
|
127
|
+
return 'probe.txt';
|
|
128
|
+
return 'probe';
|
|
129
|
+
}
|
|
117
130
|
function defaultArgs(spec) {
|
|
118
131
|
const args = {};
|
|
119
132
|
const schema = spec.argsSchema ?? {};
|
|
120
133
|
for (const [k, v] of Object.entries(schema)) {
|
|
121
|
-
args[k] = typeof v === 'string' && v.includes('string') ?
|
|
134
|
+
args[k] = typeof v === 'string' && v.includes('string') ? probeValue(k) : null;
|
|
122
135
|
}
|
|
123
136
|
return args;
|
|
124
137
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hmharness/cognitive",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.10",
|
|
4
4
|
"description": "hmharness Cognitive OS core: Environment protocol, World Model, Goal system, Exploration, RLM runtime, five-layer memory, Skill Compiler, Continual Learning control plane, Evolution 2.0 governance, Multi-Agent topology, Transfer lab and GeneralBench schema. Cognitive strategy layer per the HMH Cognitive OS blueprint (2026-09).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
"node": ">=22"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@hmharness/kernel": "0.23.
|
|
29
|
+
"@hmharness/kernel": "0.23.10"
|
|
30
30
|
}
|
|
31
31
|
}
|