@chaoschain/sdk 0.2.3 → 0.2.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 +73 -15
- package/dist/{IPFSLocal-BCIADaOU.d.ts → IPFSLocal-BqyHRp_l.d.ts} +1 -1
- package/dist/{IPFSLocal-DqzD3Y7I.d.cts → IPFSLocal-azjjaiGR.d.cts} +1 -1
- package/dist/index.cjs +77 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -5
- package/dist/index.d.ts +4 -5
- package/dist/index.js +77 -38
- package/dist/index.js.map +1 -1
- package/dist/providers/compute/index.d.cts +1 -1
- package/dist/providers/compute/index.d.ts +1 -1
- package/dist/providers/storage/index.d.cts +2 -2
- package/dist/providers/storage/index.d.ts +2 -2
- package/dist/{types-CEFAgoAM.d.cts → types-DZze-Z8B.d.cts} +35 -11
- package/dist/{types-CEFAgoAM.d.ts → types-DZze-Z8B.d.ts} +35 -11
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { I as IPFSLocalStorage } from '../../IPFSLocal-
|
|
2
|
-
import { n as StorageProvider, U as UploadOptions, i as UploadResult } from '../../types-
|
|
1
|
+
export { I as IPFSLocalStorage } from '../../IPFSLocal-azjjaiGR.cjs';
|
|
2
|
+
import { n as StorageProvider, U as UploadOptions, i as UploadResult } from '../../types-DZze-Z8B.cjs';
|
|
3
3
|
import 'ethers';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { I as IPFSLocalStorage } from '../../IPFSLocal-
|
|
2
|
-
import { n as StorageProvider, U as UploadOptions, i as UploadResult } from '../../types-
|
|
1
|
+
export { I as IPFSLocalStorage } from '../../IPFSLocal-BqyHRp_l.js';
|
|
2
|
+
import { n as StorageProvider, U as UploadOptions, i as UploadResult } from '../../types-DZze-Z8B.js';
|
|
3
3
|
import 'ethers';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -39,11 +39,24 @@ interface WorkVerificationResult {
|
|
|
39
39
|
signals?: AgencySignals;
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
|
-
* Verifier assessment
|
|
42
|
+
* Verifier assessment for production scoring.
|
|
43
|
+
* Compliance and efficiency are REQUIRED — verifier agents must provide them.
|
|
43
44
|
* Values can be in 0..1 (normalized) or 0..100 (integer); the SDK
|
|
44
45
|
* auto-detects and normalizes internally.
|
|
45
46
|
*/
|
|
46
47
|
type VerifierAssessment = {
|
|
48
|
+
complianceScore: number;
|
|
49
|
+
efficiencyScore: number;
|
|
50
|
+
initiativeScore?: number;
|
|
51
|
+
collaborationScore?: number;
|
|
52
|
+
reasoningScore?: number;
|
|
53
|
+
rationale?: string;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Relaxed assessment for demo/test use only.
|
|
57
|
+
* All fields optional — missing compliance/efficiency fall back to signals or 0.
|
|
58
|
+
*/
|
|
59
|
+
type DemoAssessment = {
|
|
47
60
|
initiativeScore?: number;
|
|
48
61
|
collaborationScore?: number;
|
|
49
62
|
reasoningScore?: number;
|
|
@@ -76,6 +89,8 @@ type AgencySignals = {
|
|
|
76
89
|
requiredArtifactsPresent?: string[];
|
|
77
90
|
missingArtifacts?: string[];
|
|
78
91
|
durationMs?: number;
|
|
92
|
+
fragmentationPenalty?: number;
|
|
93
|
+
overcomplexityPenalty?: number;
|
|
79
94
|
};
|
|
80
95
|
};
|
|
81
96
|
type ScoreRange = {
|
|
@@ -177,26 +192,35 @@ declare function extractAgencySignals(evidence: EvidencePackage[], context?: Sig
|
|
|
177
192
|
*/
|
|
178
193
|
declare function computeDepth(evidence: EvidencePackage[]): number;
|
|
179
194
|
/**
|
|
180
|
-
*
|
|
181
|
-
*
|
|
195
|
+
* Production score vector composition for verifier agents.
|
|
196
|
+
*
|
|
197
|
+
* Compliance and efficiency are REQUIRED — verifier agents must explicitly
|
|
198
|
+
* provide these based on their judgment + deterministic signals. Throws if
|
|
199
|
+
* either is missing.
|
|
182
200
|
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
* - Otherwise → use the deterministic signal
|
|
186
|
-
* - If the signal is also undefined → 0
|
|
201
|
+
* Initiative, collaboration, and reasoning default to deterministic signals
|
|
202
|
+
* unless the verifier provides overrides.
|
|
187
203
|
*
|
|
188
204
|
* Input values can be in 0..1 or 0..100; the SDK auto-detects.
|
|
189
205
|
* Output is always integer tuple [0..100] × 5 ready for contract submission.
|
|
190
206
|
*/
|
|
191
|
-
declare function composeScoreVector(signals: AgencySignals, assessment
|
|
207
|
+
declare function composeScoreVector(signals: AgencySignals, assessment: VerifierAssessment): [number, number, number, number, number];
|
|
208
|
+
/**
|
|
209
|
+
* Demo/test score vector composition — all fields optional.
|
|
210
|
+
*
|
|
211
|
+
* Falls back to deterministic signals (or 0) for any missing dimension.
|
|
212
|
+
* Use this for demo scripts and testing only — production verifier agents
|
|
213
|
+
* must use composeScoreVector() which enforces compliance/efficiency.
|
|
214
|
+
*/
|
|
215
|
+
declare function composeScoreVectorWithDefaults(signals: AgencySignals, assessment?: DemoAssessment): [number, number, number, number, number];
|
|
192
216
|
/**
|
|
193
217
|
* Convenience wrapper: extract signals + compose score vector in one call.
|
|
194
218
|
*
|
|
195
219
|
* Returns [Initiative, Collaboration, Reasoning, Compliance, Efficiency]
|
|
196
220
|
* as integers 0..100 for on-chain submission.
|
|
197
221
|
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
222
|
+
* Uses composeScoreVectorWithDefaults internally — compliance and efficiency
|
|
223
|
+
* fall back to signals or 0 when not provided.
|
|
200
224
|
*/
|
|
201
225
|
declare function derivePoAScores(evidence: EvidencePackage[], options?: {
|
|
202
226
|
compliance?: number;
|
|
@@ -753,4 +777,4 @@ interface DKGNodeData {
|
|
|
753
777
|
canonicalHash?: string;
|
|
754
778
|
}
|
|
755
779
|
|
|
756
|
-
export { AgentRole as A, extractAgencySignals as B, type ContractAddresses as C, type DKGNodeData as D, composeScoreVector as E, type FeedbackParams as F, type GatewayClientConfig as G,
|
|
780
|
+
export { type SignalExtractionContext as $, AgentRole as A, extractAgencySignals as B, type ContractAddresses as C, type DKGNodeData as D, composeScoreVector as E, type FeedbackParams as F, type GatewayClientConfig as G, composeScoreVectorWithDefaults as H, type IntegrityProof as I, rangeFit as J, type EvidencePackage as K, type WorkEvidenceVerificationResult as L, type WorkVerificationResult as M, NetworkConfig as N, type AgencySignals as O, type PendingWorkResponse as P, type VerifierAssessment as Q, type DemoAssessment as R, ScoreSubmissionMode as S, type TEEAttestation as T, type UploadOptions as U, type ValidationRequestParams as V, type WalletConfig as W, type X402PaymentParams as X, type ScoreRange as Y, type EngineeringStudioPolicy as Z, type WorkMandate as _, type NetworkInfo as a, type GatewayHealthResponse as b, type WorkflowStatus as c, type WorkEvidenceResponse as d, type ChaosChainSDKConfig as e, type AgentMetadata as f, type AgentRegistration as g, PaymentMethod as h, type UploadResult as i, type WorkflowError as j, type FeedbackRecord as k, type ValidationRequest as l, type X402Payment as m, type StorageProvider as n, type ComputeProvider as o, type TransactionResult as p, ValidationStatus as q, WorkflowType as r, WorkflowState as s, type WorkflowProgress as t, type PendingWorkItem as u, type XMTPMessageData as v, computeDepth as w, derivePoAScores as x, validateEvidenceGraph as y, verifyWorkEvidence as z };
|
|
@@ -39,11 +39,24 @@ interface WorkVerificationResult {
|
|
|
39
39
|
signals?: AgencySignals;
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
|
-
* Verifier assessment
|
|
42
|
+
* Verifier assessment for production scoring.
|
|
43
|
+
* Compliance and efficiency are REQUIRED — verifier agents must provide them.
|
|
43
44
|
* Values can be in 0..1 (normalized) or 0..100 (integer); the SDK
|
|
44
45
|
* auto-detects and normalizes internally.
|
|
45
46
|
*/
|
|
46
47
|
type VerifierAssessment = {
|
|
48
|
+
complianceScore: number;
|
|
49
|
+
efficiencyScore: number;
|
|
50
|
+
initiativeScore?: number;
|
|
51
|
+
collaborationScore?: number;
|
|
52
|
+
reasoningScore?: number;
|
|
53
|
+
rationale?: string;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Relaxed assessment for demo/test use only.
|
|
57
|
+
* All fields optional — missing compliance/efficiency fall back to signals or 0.
|
|
58
|
+
*/
|
|
59
|
+
type DemoAssessment = {
|
|
47
60
|
initiativeScore?: number;
|
|
48
61
|
collaborationScore?: number;
|
|
49
62
|
reasoningScore?: number;
|
|
@@ -76,6 +89,8 @@ type AgencySignals = {
|
|
|
76
89
|
requiredArtifactsPresent?: string[];
|
|
77
90
|
missingArtifacts?: string[];
|
|
78
91
|
durationMs?: number;
|
|
92
|
+
fragmentationPenalty?: number;
|
|
93
|
+
overcomplexityPenalty?: number;
|
|
79
94
|
};
|
|
80
95
|
};
|
|
81
96
|
type ScoreRange = {
|
|
@@ -177,26 +192,35 @@ declare function extractAgencySignals(evidence: EvidencePackage[], context?: Sig
|
|
|
177
192
|
*/
|
|
178
193
|
declare function computeDepth(evidence: EvidencePackage[]): number;
|
|
179
194
|
/**
|
|
180
|
-
*
|
|
181
|
-
*
|
|
195
|
+
* Production score vector composition for verifier agents.
|
|
196
|
+
*
|
|
197
|
+
* Compliance and efficiency are REQUIRED — verifier agents must explicitly
|
|
198
|
+
* provide these based on their judgment + deterministic signals. Throws if
|
|
199
|
+
* either is missing.
|
|
182
200
|
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
* - Otherwise → use the deterministic signal
|
|
186
|
-
* - If the signal is also undefined → 0
|
|
201
|
+
* Initiative, collaboration, and reasoning default to deterministic signals
|
|
202
|
+
* unless the verifier provides overrides.
|
|
187
203
|
*
|
|
188
204
|
* Input values can be in 0..1 or 0..100; the SDK auto-detects.
|
|
189
205
|
* Output is always integer tuple [0..100] × 5 ready for contract submission.
|
|
190
206
|
*/
|
|
191
|
-
declare function composeScoreVector(signals: AgencySignals, assessment
|
|
207
|
+
declare function composeScoreVector(signals: AgencySignals, assessment: VerifierAssessment): [number, number, number, number, number];
|
|
208
|
+
/**
|
|
209
|
+
* Demo/test score vector composition — all fields optional.
|
|
210
|
+
*
|
|
211
|
+
* Falls back to deterministic signals (or 0) for any missing dimension.
|
|
212
|
+
* Use this for demo scripts and testing only — production verifier agents
|
|
213
|
+
* must use composeScoreVector() which enforces compliance/efficiency.
|
|
214
|
+
*/
|
|
215
|
+
declare function composeScoreVectorWithDefaults(signals: AgencySignals, assessment?: DemoAssessment): [number, number, number, number, number];
|
|
192
216
|
/**
|
|
193
217
|
* Convenience wrapper: extract signals + compose score vector in one call.
|
|
194
218
|
*
|
|
195
219
|
* Returns [Initiative, Collaboration, Reasoning, Compliance, Efficiency]
|
|
196
220
|
* as integers 0..100 for on-chain submission.
|
|
197
221
|
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
222
|
+
* Uses composeScoreVectorWithDefaults internally — compliance and efficiency
|
|
223
|
+
* fall back to signals or 0 when not provided.
|
|
200
224
|
*/
|
|
201
225
|
declare function derivePoAScores(evidence: EvidencePackage[], options?: {
|
|
202
226
|
compliance?: number;
|
|
@@ -753,4 +777,4 @@ interface DKGNodeData {
|
|
|
753
777
|
canonicalHash?: string;
|
|
754
778
|
}
|
|
755
779
|
|
|
756
|
-
export { AgentRole as A, extractAgencySignals as B, type ContractAddresses as C, type DKGNodeData as D, composeScoreVector as E, type FeedbackParams as F, type GatewayClientConfig as G,
|
|
780
|
+
export { type SignalExtractionContext as $, AgentRole as A, extractAgencySignals as B, type ContractAddresses as C, type DKGNodeData as D, composeScoreVector as E, type FeedbackParams as F, type GatewayClientConfig as G, composeScoreVectorWithDefaults as H, type IntegrityProof as I, rangeFit as J, type EvidencePackage as K, type WorkEvidenceVerificationResult as L, type WorkVerificationResult as M, NetworkConfig as N, type AgencySignals as O, type PendingWorkResponse as P, type VerifierAssessment as Q, type DemoAssessment as R, ScoreSubmissionMode as S, type TEEAttestation as T, type UploadOptions as U, type ValidationRequestParams as V, type WalletConfig as W, type X402PaymentParams as X, type ScoreRange as Y, type EngineeringStudioPolicy as Z, type WorkMandate as _, type NetworkInfo as a, type GatewayHealthResponse as b, type WorkflowStatus as c, type WorkEvidenceResponse as d, type ChaosChainSDKConfig as e, type AgentMetadata as f, type AgentRegistration as g, PaymentMethod as h, type UploadResult as i, type WorkflowError as j, type FeedbackRecord as k, type ValidationRequest as l, type X402Payment as m, type StorageProvider as n, type ComputeProvider as o, type TransactionResult as p, ValidationStatus as q, WorkflowType as r, WorkflowState as s, type WorkflowProgress as t, type PendingWorkItem as u, type XMTPMessageData as v, computeDepth as w, derivePoAScores as x, validateEvidenceGraph as y, verifyWorkEvidence as z };
|