@halot/cli 1.0.6 → 1.0.8

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
@@ -289,7 +289,7 @@ This creates:
289
289
  ```json
290
290
  {
291
291
  "evaluationModel": {
292
- "zeroGComputeProviderAddress": "0x..."
292
+ "model": "openai/gpt-oss-20b"
293
293
  },
294
294
  "sdk": {
295
295
  "network": "testnet"
@@ -298,14 +298,20 @@ This creates:
298
298
  }
299
299
  ```
300
300
 
301
- `zeroGComputeProviderAddress` is the 0G TeeML compute provider address used for verifier inference. It is not your Halot provider ID or service provider wallet.
301
+ `model` is the 0G inference model name. The verifier runtime resolves the live TeeML chatbot provider for that model from the 0G registry before it sends the evaluation request.
302
+
303
+ Current 0G testnet TeeML chatbot models include:
304
+
305
+ - `openai/gpt-oss-20b`
306
+ - `google/gemma-3-27b-it`
307
+ - `qwen/qwen-2.5-7b-instruct`
302
308
 
303
309
  `inference.json`:
304
310
 
305
311
  ```json
306
312
  {
307
- "systemPrompt": "You are a Halot verifier for text-generation services. Return only valid JSON.",
308
- "promptTemplate": "Evaluate this Halot text-generation job.\\n\\nJob input:\\n{{input}}\\n\\nProvider result:\\n{{result}}\\n\\nService acceptance criteria:\\n{{acceptanceCriteria}}\\n\\nExpected output schema:\\n{{outputSchema}}\\n\\nInput artifacts:\\n{{inputArtifacts}}\\n\\nResult artifacts:\\n{{resultArtifacts}}\\n\\nArtifact validation issues:\\n{{artifactValidationIssues}}\\n\\nApprove only if the result directly answers the requester input, satisfies the service schema, and meets the acceptance criteria.\\nReject empty, irrelevant, malformed, unsafe, inaccessible, or artifact-mismatched results.\\nUse uncertain only when the available evidence is insufficient.\\nReturn only JSON with fields: decision, confidence, reason, failedCriteria.",
313
+ "systemPrompt": "You are a Halot verifier for paid text-generation services. Be strict, evidence-based, and deterministic. Return only valid JSON.",
314
+ "promptTemplate": "Evaluate this Halot text-generation job.\\n\\nService:\\n- ID: {{serviceId}}\\n- Name: {{serviceName}}\\n- Description: {{serviceDescription}}\\n- Category: {{serviceCategory}}\\n- Trust level: {{trustLevel}}\\n\\nRequester input:\\n{{input}}\\n\\nProvider result:\\n{{result}}\\n\\nService acceptance criteria:\\n{{acceptanceCriteria}}\\n\\nExpected output schema:\\n{{outputSchema}}\\n\\nInput artifacts:\\n{{inputArtifacts}}\\n\\nResult artifacts:\\n{{resultArtifacts}}\\n\\nArtifact validation issues:\\n{{artifactValidationIssues}}\\n\\nDecision rules:\\n- Approve only if the result directly fulfills the requester input, matches the expected output schema, and satisfies the acceptance criteria.\\n- Reject if the result is empty, irrelevant, materially incomplete, malformed, unsafe, inaccessible, or artifact-mismatched.\\n- Reject if required fields are missing, placeholder content is returned, or the answer contradicts the request.\\n- Use uncertain only when the evidence is genuinely insufficient or the result is partially interpretable but not confidently approvable or rejectable.\\n\\nConfidence rules:\\n- 0.90 to 1.00: clear outcome with strong evidence.\\n- 0.70 to 0.89: likely outcome with minor ambiguity.\\n- Below 0.70: use uncertain.\\n\\nReturn only JSON with fields:\\n- decision\\n- confidence\\n- reason\\n- failedCriteria",
309
315
  "outputSchema": {
310
316
  "decision": "approve | reject | uncertain",
311
317
  "confidence": "number between 0 and 1",
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.runVerifierInitCommand = runVerifierInitCommand;
4
+ const sdk_1 = require("@halot/sdk");
4
5
  const wallet_manager_1 = require("@halot/cli/shared/wallet/wallet.manager");
5
6
  const authority_util_1 = require("@halot/cli/shared/wallet/authority.util");
6
7
  const init_cluster_util_1 = require("@halot/cli/shared/wallet/init-cluster.util");
@@ -42,7 +43,7 @@ async function runVerifierInitCommand(options = {}) {
42
43
  });
43
44
  workspace.writeModelConfig({
44
45
  evaluationModel: {
45
- zeroGComputeProviderAddress: '',
46
+ model: sdk_1.DEFAULT_ZERO_G_VERIFIER_EVALUATION_MODEL,
46
47
  },
47
48
  sdk: {
48
49
  network: cluster,
@@ -50,11 +51,18 @@ async function runVerifierInitCommand(options = {}) {
50
51
  timeout: 60,
51
52
  });
52
53
  workspace.writeInferenceTemplate({
53
- systemPrompt: 'You are a Halot verifier for text-generation services. Return only valid JSON.',
54
+ systemPrompt: 'You are a Halot verifier for paid text-generation services. Be strict, evidence-based, and deterministic. Return only valid JSON.',
54
55
  promptTemplate: [
55
56
  'Evaluate this Halot text-generation job.',
56
57
  '',
57
- 'Job input:',
58
+ 'Service:',
59
+ '- ID: {{serviceId}}',
60
+ '- Name: {{serviceName}}',
61
+ '- Description: {{serviceDescription}}',
62
+ '- Category: {{serviceCategory}}',
63
+ '- Trust level: {{trustLevel}}',
64
+ '',
65
+ 'Requester input:',
58
66
  '{{input}}',
59
67
  '',
60
68
  'Provider result:',
@@ -75,10 +83,22 @@ async function runVerifierInitCommand(options = {}) {
75
83
  'Artifact validation issues:',
76
84
  '{{artifactValidationIssues}}',
77
85
  '',
78
- 'Approve only if the result directly answers the requester input, satisfies the service schema, and meets the acceptance criteria.',
79
- 'Reject empty, irrelevant, malformed, unsafe, inaccessible, or artifact-mismatched results.',
80
- 'Use uncertain only when the available evidence is insufficient.',
81
- 'Return only JSON with fields: decision, confidence, reason, failedCriteria.',
86
+ 'Decision rules:',
87
+ '- Approve only if the result directly fulfills the requester input, matches the expected output schema, and satisfies the acceptance criteria.',
88
+ '- Reject if the result is empty, irrelevant, materially incomplete, malformed, unsafe, inaccessible, or artifact-mismatched.',
89
+ '- Reject if required fields are missing, placeholder content is returned, or the answer contradicts the request.',
90
+ '- Use uncertain only when the evidence is genuinely insufficient or the result is partially interpretable but not confidently approvable or rejectable.',
91
+ '',
92
+ 'Confidence rules:',
93
+ '- 0.90 to 1.00: clear outcome with strong evidence.',
94
+ '- 0.70 to 0.89: likely outcome with minor ambiguity.',
95
+ '- Below 0.70: use uncertain.',
96
+ '',
97
+ 'Return only JSON with fields:',
98
+ '- decision',
99
+ '- confidence',
100
+ '- reason',
101
+ '- failedCriteria',
82
102
  ].join('\n'),
83
103
  outputSchema: {
84
104
  decision: 'approve | reject | uncertain',
@@ -115,8 +135,7 @@ async function runVerifierInitCommand(options = {}) {
115
135
  warnings: ['wallets.json contains private keys. Do not commit it.'],
116
136
  nextSteps: [
117
137
  'Edit halot.verifier.json',
118
- 'Set evaluationModel.zeroGComputeProviderAddress in model.config.json',
119
- 'Review inference.json and specializations.json',
138
+ 'Review model.config.json, inference.json, and specializations.json',
120
139
  `Run ${(0, console_1.command)('halot verifier register')}`,
121
140
  `Run ${(0, console_1.command)('halot verifier run')}`,
122
141
  ],
@@ -20,11 +20,9 @@ async function runVerifierRunCommand(options) {
20
20
  const specializations = workspace.readSpecializations();
21
21
  const verifierWallet = (0, authority_util_1.resolveActorWallet)(wallets, config.authority.actor);
22
22
  const chain = (0, authority_util_1.resolveZeroGAuthorityProfile)(config.authority.actor);
23
- const computeProviderAddress = modelConfig.evaluationModel.zeroGComputeProviderAddress;
24
23
  const compute = new sdk_1.ZeroGComputeService({
25
24
  privateKey: verifierWallet.privateKey,
26
25
  rpcUrl: modelConfig.sdk.rpcUrl ?? chain.rpcUrl,
27
- providerAddress: computeProviderAddress,
28
26
  ledgerContractAddress: modelConfig.sdk.ledgerContractAddress,
29
27
  inferenceContractAddress: modelConfig.sdk.inferenceContractAddress,
30
28
  fineTuningContractAddress: modelConfig.sdk.fineTuningContractAddress,
@@ -33,9 +31,6 @@ async function runVerifierRunCommand(options) {
33
31
  const workerId = (0, sdk_1.createPrefixedId)('worker');
34
32
  const cursorKey = `verifier:${config.verifierId}`;
35
33
  let lastEventId = workspace.readStreamCursor(cursorKey);
36
- if (!computeProviderAddress) {
37
- throw new Error('model.config.json must set evaluationModel.zeroGComputeProviderAddress for real 0G TeeML verification.');
38
- }
39
34
  if (options.once) {
40
35
  const assignmentPath = `/verifiers/${config.verifierId}/jobs/next`;
41
36
  const headers = await (0, actor_headers_service_1.createSignedActorHeaders)(verifierWallet, config.verifierId, 'verifier', 'GET', assignmentPath);
@@ -90,7 +85,6 @@ async function processVerifierAssignment(api, verifierWallet, verifierId, assign
90
85
  input: assignment.job.input,
91
86
  result: assignment.result.output,
92
87
  service: assignment.service,
93
- providerAddress: modelConfig.evaluationModel.zeroGComputeProviderAddress,
94
88
  model: modelConfig.evaluationModel.model,
95
89
  systemPrompt: inferenceTemplate.systemPrompt,
96
90
  promptTemplate: inferenceTemplate.promptTemplate,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@halot/cli",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Halot protocol CLI",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -30,7 +30,7 @@
30
30
  "./*": "./dist/*.js"
31
31
  },
32
32
  "dependencies": {
33
- "@halot/sdk": "^1.0.3",
33
+ "@halot/sdk": "^1.0.5",
34
34
  "@stellar/stellar-sdk": "^15.0.1",
35
35
  "@web3-name-sdk/core": "^0.1.18",
36
36
  "commander": "^14.0.3",