@halot/cli 1.0.4 → 1.0.6

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
@@ -256,7 +256,7 @@ This creates:
256
256
  {
257
257
  "verifierId": "",
258
258
  "displayName": "My Verifier",
259
- "description": "Multimodal service verification specialist",
259
+ "description": "Text service verification specialist",
260
260
  "identity": {
261
261
  "domain": "myverifier.0g",
262
262
  "domainType": "space-id",
@@ -289,9 +289,7 @@ This creates:
289
289
  ```json
290
290
  {
291
291
  "evaluationModel": {
292
- "providerAddress": "0x...",
293
- "serviceType": "chatbot",
294
- "verifiability": "TeeML"
292
+ "zeroGComputeProviderAddress": "0x..."
295
293
  },
296
294
  "sdk": {
297
295
  "network": "testnet"
@@ -300,12 +298,14 @@ This creates:
300
298
  }
301
299
  ```
302
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.
302
+
303
303
  `inference.json`:
304
304
 
305
305
  ```json
306
306
  {
307
- "systemPrompt": "You are an impartial evaluator.",
308
- "promptTemplate": "Evaluate whether the provider result and any referenced artifacts satisfy the acceptance criteria.",
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.",
309
309
  "outputSchema": {
310
310
  "decision": "approve | reject | uncertain",
311
311
  "confidence": "number between 0 and 1",
@@ -321,9 +321,9 @@ This creates:
321
321
 
322
322
  ```json
323
323
  {
324
- "categories": ["text", "document", "tool"],
324
+ "categories": ["text"],
325
325
  "serviceIds": [],
326
- "maxConcurrentJobs": 5,
326
+ "maxConcurrentJobs": 3,
327
327
  "minConfidenceThreshold": 0.75
328
328
  }
329
329
  ```
@@ -38,9 +38,9 @@ async function runProviderInitCommand(options = {}) {
38
38
  subtitle: `Cluster: ${cluster}`,
39
39
  rows: [
40
40
  { label: 'Actor', value: authorities.zeroG },
41
- { label: 'Owner', value: zeroGAddress },
42
- { label: 'Settlement', value: `${authorities.zeroG}, ${authorities.stellar}` },
41
+ { label: '0G Wallet', value: zeroGAddress },
43
42
  { label: 'Stellar', value: stellarAddress },
43
+ { label: 'Settlement', value: `${authorities.zeroG}, ${authorities.stellar}` },
44
44
  ],
45
45
  files: ['wallets.json', 'halot.provider.json', '.gitignore'],
46
46
  warnings: ['wallets.json contains private keys. Do not commit it.'],
@@ -27,7 +27,7 @@ async function runRequesterInitCommand(options = {}) {
27
27
  subtitle: `Cluster: ${cluster}`,
28
28
  rows: [
29
29
  { label: 'Actor', value: authorities.zeroG },
30
- { label: '0G', value: zeroGAddress },
30
+ { label: '0G Wallet', value: zeroGAddress },
31
31
  { label: 'Stellar', value: stellarAddress },
32
32
  ],
33
33
  files: ['wallets.json', 'halot.requester.json', '.gitignore'],
@@ -17,7 +17,7 @@ async function runVerifierInitCommand(options = {}) {
17
17
  workspace.writeVerifierConfig({
18
18
  verifierId: '',
19
19
  displayName: 'My Verifier',
20
- description: 'Multimodal service verification specialist',
20
+ description: 'Text service verification specialist',
21
21
  identity: {
22
22
  erc8004TokenId: '',
23
23
  agentRegistry: '',
@@ -42,9 +42,7 @@ async function runVerifierInitCommand(options = {}) {
42
42
  });
43
43
  workspace.writeModelConfig({
44
44
  evaluationModel: {
45
- providerAddress: '',
46
- serviceType: 'chatbot',
47
- verifiability: 'TeeML',
45
+ zeroGComputeProviderAddress: '',
48
46
  },
49
47
  sdk: {
50
48
  network: cluster,
@@ -52,8 +50,36 @@ async function runVerifierInitCommand(options = {}) {
52
50
  timeout: 60,
53
51
  });
54
52
  workspace.writeInferenceTemplate({
55
- systemPrompt: 'You are an impartial evaluator.',
56
- promptTemplate: 'Evaluate whether the provider result and any referenced artifacts satisfy the acceptance criteria.',
53
+ systemPrompt: 'You are a Halot verifier for text-generation services. Return only valid JSON.',
54
+ promptTemplate: [
55
+ 'Evaluate this Halot text-generation job.',
56
+ '',
57
+ 'Job input:',
58
+ '{{input}}',
59
+ '',
60
+ 'Provider result:',
61
+ '{{result}}',
62
+ '',
63
+ 'Service acceptance criteria:',
64
+ '{{acceptanceCriteria}}',
65
+ '',
66
+ 'Expected output schema:',
67
+ '{{outputSchema}}',
68
+ '',
69
+ 'Input artifacts:',
70
+ '{{inputArtifacts}}',
71
+ '',
72
+ 'Result artifacts:',
73
+ '{{resultArtifacts}}',
74
+ '',
75
+ 'Artifact validation issues:',
76
+ '{{artifactValidationIssues}}',
77
+ '',
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.',
82
+ ].join('\n'),
57
83
  outputSchema: {
58
84
  decision: 'approve | reject | uncertain',
59
85
  confidence: 'number between 0 and 1',
@@ -64,9 +90,9 @@ async function runVerifierInitCommand(options = {}) {
64
90
  temperature: 0,
65
91
  });
66
92
  workspace.writeSpecializations({
67
- categories: ['text', 'document', 'tool'],
93
+ categories: ['text'],
68
94
  serviceIds: [],
69
- maxConcurrentJobs: 5,
95
+ maxConcurrentJobs: 3,
70
96
  minConfidenceThreshold: 0.75,
71
97
  });
72
98
  (0, console_1.printInitSummary)({
@@ -74,9 +100,9 @@ async function runVerifierInitCommand(options = {}) {
74
100
  subtitle: `Cluster: ${cluster}`,
75
101
  rows: [
76
102
  { label: 'Actor', value: authorities.zeroG },
77
- { label: 'Owner', value: zeroGAddress },
78
- { label: 'Settlement', value: `${authorities.zeroG}, ${authorities.stellar}` },
103
+ { label: '0G Wallet', value: zeroGAddress },
79
104
  { label: 'Stellar', value: stellarAddress },
105
+ { label: 'Settlement', value: `${authorities.zeroG}, ${authorities.stellar}` },
80
106
  ],
81
107
  files: [
82
108
  'wallets.json',
@@ -89,7 +115,8 @@ async function runVerifierInitCommand(options = {}) {
89
115
  warnings: ['wallets.json contains private keys. Do not commit it.'],
90
116
  nextSteps: [
91
117
  'Edit halot.verifier.json',
92
- 'Edit model.config.json, inference.json, and specializations.json',
118
+ 'Set evaluationModel.zeroGComputeProviderAddress in model.config.json',
119
+ 'Review inference.json and specializations.json',
93
120
  `Run ${(0, console_1.command)('halot verifier register')}`,
94
121
  `Run ${(0, console_1.command)('halot verifier run')}`,
95
122
  ],
@@ -20,10 +20,11 @@ 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;
23
24
  const compute = new sdk_1.ZeroGComputeService({
24
25
  privateKey: verifierWallet.privateKey,
25
26
  rpcUrl: modelConfig.sdk.rpcUrl ?? chain.rpcUrl,
26
- providerAddress: modelConfig.evaluationModel.providerAddress,
27
+ providerAddress: computeProviderAddress,
27
28
  ledgerContractAddress: modelConfig.sdk.ledgerContractAddress,
28
29
  inferenceContractAddress: modelConfig.sdk.inferenceContractAddress,
29
30
  fineTuningContractAddress: modelConfig.sdk.fineTuningContractAddress,
@@ -32,8 +33,8 @@ async function runVerifierRunCommand(options) {
32
33
  const workerId = (0, sdk_1.createPrefixedId)('worker');
33
34
  const cursorKey = `verifier:${config.verifierId}`;
34
35
  let lastEventId = workspace.readStreamCursor(cursorKey);
35
- if (!modelConfig.evaluationModel.providerAddress) {
36
- throw new Error('model.config.json must set evaluationModel.providerAddress for real 0G TeeML verification.');
36
+ if (!computeProviderAddress) {
37
+ throw new Error('model.config.json must set evaluationModel.zeroGComputeProviderAddress for real 0G TeeML verification.');
37
38
  }
38
39
  if (options.once) {
39
40
  const assignmentPath = `/verifiers/${config.verifierId}/jobs/next`;
@@ -89,7 +90,8 @@ async function processVerifierAssignment(api, verifierWallet, verifierId, assign
89
90
  input: assignment.job.input,
90
91
  result: assignment.result.output,
91
92
  service: assignment.service,
92
- providerAddress: modelConfig.evaluationModel.providerAddress,
93
+ providerAddress: modelConfig.evaluationModel.zeroGComputeProviderAddress,
94
+ model: modelConfig.evaluationModel.model,
93
95
  systemPrompt: inferenceTemplate.systemPrompt,
94
96
  promptTemplate: inferenceTemplate.promptTemplate,
95
97
  outputSchema: inferenceTemplate.outputSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@halot/cli",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
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.2",
33
+ "@halot/sdk": "^1.0.3",
34
34
  "@stellar/stellar-sdk": "^15.0.1",
35
35
  "@web3-name-sdk/core": "^0.1.18",
36
36
  "commander": "^14.0.3",