@a2aletheia/sdk 0.2.0 → 0.2.1

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.
Files changed (80) hide show
  1. package/dist/agent/agent-executor.d.ts +1 -1
  2. package/dist/agent/aletheia-agent.d.ts +1 -1
  3. package/dist/agent/types.d.ts +1 -1
  4. package/dist/client.d.ts +1 -1
  5. package/dist/client.d.ts.map +1 -1
  6. package/dist/identity/agent-signer.d.ts +1 -1
  7. package/dist/identity/did-resolver.d.ts +1 -1
  8. package/dist/identity/did-resolver.js +1 -1
  9. package/dist/identity/manifest-fetcher.d.ts +1 -1
  10. package/dist/identity/manifest-fetcher.js +1 -1
  11. package/dist/index.d.ts +1 -0
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +2 -0
  14. package/dist/index.js.map +1 -1
  15. package/dist/logger/console-logger.d.ts +1 -1
  16. package/dist/logger/event-emitter.d.ts +1 -1
  17. package/dist/logger/noop-logger.d.ts +1 -1
  18. package/dist/reputation/rating-client.d.ts +1 -1
  19. package/dist/security/audit-client.d.ts +1 -1
  20. package/dist/types/common/events.d.ts +14 -0
  21. package/dist/types/common/events.d.ts.map +1 -0
  22. package/dist/types/common/events.js +8 -0
  23. package/dist/types/common/events.js.map +1 -0
  24. package/dist/types/common/index.d.ts +4 -0
  25. package/dist/types/common/index.d.ts.map +1 -0
  26. package/dist/types/common/index.js +4 -0
  27. package/dist/types/common/index.js.map +1 -0
  28. package/dist/types/common/logger.d.ts +14 -0
  29. package/dist/types/common/logger.d.ts.map +1 -0
  30. package/dist/types/common/logger.js +2 -0
  31. package/dist/types/common/logger.js.map +1 -0
  32. package/dist/types/common/pagination.d.ts +45 -0
  33. package/dist/types/common/pagination.d.ts.map +1 -0
  34. package/dist/types/common/pagination.js +17 -0
  35. package/dist/types/common/pagination.js.map +1 -0
  36. package/dist/types/identity/agent-manifest.d.ts +258 -0
  37. package/dist/types/identity/agent-manifest.d.ts.map +1 -0
  38. package/dist/types/identity/agent-manifest.js +78 -0
  39. package/dist/types/identity/agent-manifest.js.map +1 -0
  40. package/dist/types/identity/agent.d.ts +86 -0
  41. package/dist/types/identity/agent.d.ts.map +1 -0
  42. package/dist/types/identity/agent.js +37 -0
  43. package/dist/types/identity/agent.js.map +1 -0
  44. package/dist/types/identity/did.d.ts +116 -0
  45. package/dist/types/identity/did.d.ts.map +1 -0
  46. package/dist/types/identity/did.js +27 -0
  47. package/dist/types/identity/did.js.map +1 -0
  48. package/dist/types/identity/index.d.ts +4 -0
  49. package/dist/types/identity/index.d.ts.map +1 -0
  50. package/dist/types/identity/index.js +4 -0
  51. package/dist/types/identity/index.js.map +1 -0
  52. package/dist/types/index.d.ts +5 -0
  53. package/dist/types/index.d.ts.map +1 -0
  54. package/dist/types/index.js +5 -0
  55. package/dist/types/index.js.map +1 -0
  56. package/dist/types/reputation/index.d.ts +4 -0
  57. package/dist/types/reputation/index.d.ts.map +1 -0
  58. package/dist/types/reputation/index.js +4 -0
  59. package/dist/types/reputation/index.js.map +1 -0
  60. package/dist/types/reputation/pow-challenge.d.ts +25 -0
  61. package/dist/types/reputation/pow-challenge.d.ts.map +1 -0
  62. package/dist/types/reputation/pow-challenge.js +11 -0
  63. package/dist/types/reputation/pow-challenge.js.map +1 -0
  64. package/dist/types/reputation/rating.d.ts +102 -0
  65. package/dist/types/reputation/rating.d.ts.map +1 -0
  66. package/dist/types/reputation/rating.js +42 -0
  67. package/dist/types/reputation/rating.js.map +1 -0
  68. package/dist/types/reputation/trust-score.d.ts +58 -0
  69. package/dist/types/reputation/trust-score.d.ts.map +1 -0
  70. package/dist/types/reputation/trust-score.js +18 -0
  71. package/dist/types/reputation/trust-score.js.map +1 -0
  72. package/dist/types/security/audit-report.d.ts +104 -0
  73. package/dist/types/security/audit-report.d.ts.map +1 -0
  74. package/dist/types/security/audit-report.js +31 -0
  75. package/dist/types/security/audit-report.js.map +1 -0
  76. package/dist/types/security/index.d.ts +2 -0
  77. package/dist/types/security/index.d.ts.map +1 -0
  78. package/dist/types/security/index.js +2 -0
  79. package/dist/types/security/index.js.map +1 -0
  80. package/package.json +3 -4
@@ -0,0 +1,78 @@
1
+ import { z } from "zod";
2
+ import { DIDSchema } from "./did.js";
3
+ /**
4
+ * A2A-compliant Skill schema (replaces old Capability for task definitions).
5
+ * Describes a specific skill/capability the agent can perform.
6
+ */
7
+ export const SkillSchema = z.object({
8
+ id: z.string(),
9
+ name: z.string().min(1).max(128),
10
+ description: z.string().max(1024).optional(),
11
+ tags: z.array(z.string()).optional(),
12
+ examples: z.array(z.string()).optional(),
13
+ inputModes: z.array(z.string()).optional(),
14
+ outputModes: z.array(z.string()).optional(),
15
+ inputSchema: z.record(z.unknown()).optional(),
16
+ outputSchema: z.record(z.unknown()).optional(),
17
+ });
18
+ /**
19
+ * A2A-compliant Capabilities schema (protocol features).
20
+ * Describes what protocol features the agent supports.
21
+ */
22
+ export const CapabilitiesSchema = z.object({
23
+ streaming: z.boolean().optional(),
24
+ pushNotifications: z.boolean().optional(),
25
+ stateTransitionHistory: z.boolean().optional(),
26
+ });
27
+ // Keep backward compatibility alias
28
+ export const CapabilitySchema = SkillSchema;
29
+ /**
30
+ * A2A-compliant AgentManifest schema.
31
+ *
32
+ * Core A2A fields: name, description, version, url, skills, capabilities, provider
33
+ * Aletheia-specific fields are in aletheiaExtensions: did, owner, registry info
34
+ */
35
+ export const AgentManifestSchema = z.object({
36
+ // Core A2A fields
37
+ name: z.string().min(1).max(256),
38
+ description: z.string().max(2048).optional(),
39
+ version: z.string().regex(/^\d+\.\d+\.\d+$/),
40
+ url: z.string().url(),
41
+ // A2A skills (what the agent can do)
42
+ skills: z.array(SkillSchema).min(1),
43
+ // A2A capabilities (protocol features)
44
+ capabilities: CapabilitiesSchema.optional(),
45
+ // A2A input/output modes
46
+ defaultInputModes: z.array(z.string()).optional(),
47
+ defaultOutputModes: z.array(z.string()).optional(),
48
+ // Provider info (A2A compatible)
49
+ provider: z
50
+ .object({
51
+ organization: z.string(),
52
+ url: z.string().url().optional(),
53
+ contact: z.string().email().optional(),
54
+ })
55
+ .optional(),
56
+ // Security (A2A compatible)
57
+ securitySchemes: z.record(z.unknown()).optional(),
58
+ security: z.array(z.record(z.array(z.string()))).optional(),
59
+ // Extended agent card support
60
+ supportsAuthenticatedExtendedCard: z.boolean().optional(),
61
+ // Aletheia-specific extensions
62
+ aletheiaExtensions: z
63
+ .object({
64
+ // DID for identity verification
65
+ did: DIDSchema.optional(),
66
+ // Owner ETH address - required for claiming/registering the agent
67
+ owner: z
68
+ .string()
69
+ .regex(/^0x[a-fA-F0-9]{40}$/, "Must be a valid Ethereum address")
70
+ .optional(),
71
+ // Registry info
72
+ registryChain: z.string().optional(),
73
+ registryAddress: z.string().optional(),
74
+ livenessPingUrl: z.string().url().optional(),
75
+ })
76
+ .optional(),
77
+ });
78
+ //# sourceMappingURL=agent-manifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-manifest.js","sourceRoot":"","sources":["../../../src/types/identity/agent-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAChC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;IAC5C,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACpC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAA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AAQ,EAAE;QACpC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACtC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;KAC7C,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAC"}
@@ -0,0 +1,86 @@
1
+ import { z } from "zod";
2
+ export declare const AgentStatusSchema: z.ZodEnum<["active", "inactive", "suspended", "pending"]>;
3
+ export type AgentStatus = z.infer<typeof AgentStatusSchema>;
4
+ export declare const AgentSchema: z.ZodObject<{
5
+ id: z.ZodString;
6
+ did: z.ZodString;
7
+ name: z.ZodString;
8
+ description: z.ZodOptional<z.ZodString>;
9
+ url: z.ZodString;
10
+ manifestUrl: z.ZodString;
11
+ status: z.ZodEnum<["active", "inactive", "suspended", "pending"]>;
12
+ trustScore: z.ZodNullable<z.ZodNumber>;
13
+ totalRatings: z.ZodNumber;
14
+ totalVolume: z.ZodNumber;
15
+ lastLivenessCheck: z.ZodNullable<z.ZodDate>;
16
+ isLive: z.ZodBoolean;
17
+ isBattleTested: z.ZodBoolean;
18
+ registeredAt: z.ZodDate;
19
+ updatedAt: z.ZodDate;
20
+ chainId: z.ZodOptional<z.ZodNumber>;
21
+ registryTxHash: z.ZodOptional<z.ZodString>;
22
+ ownerAddress: z.ZodOptional<z.ZodString>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ status: "active" | "inactive" | "suspended" | "pending";
25
+ id: string;
26
+ name: string;
27
+ url: string;
28
+ did: string;
29
+ manifestUrl: string;
30
+ trustScore: number | null;
31
+ totalRatings: number;
32
+ totalVolume: number;
33
+ lastLivenessCheck: Date | null;
34
+ isLive: boolean;
35
+ isBattleTested: boolean;
36
+ registeredAt: Date;
37
+ updatedAt: Date;
38
+ description?: string | undefined;
39
+ chainId?: number | undefined;
40
+ registryTxHash?: string | undefined;
41
+ ownerAddress?: string | undefined;
42
+ }, {
43
+ status: "active" | "inactive" | "suspended" | "pending";
44
+ id: string;
45
+ name: string;
46
+ url: string;
47
+ did: string;
48
+ manifestUrl: string;
49
+ trustScore: number | null;
50
+ totalRatings: number;
51
+ totalVolume: number;
52
+ lastLivenessCheck: Date | null;
53
+ isLive: boolean;
54
+ isBattleTested: boolean;
55
+ registeredAt: Date;
56
+ updatedAt: Date;
57
+ description?: string | undefined;
58
+ chainId?: number | undefined;
59
+ registryTxHash?: string | undefined;
60
+ ownerAddress?: string | undefined;
61
+ }>;
62
+ export type Agent = z.infer<typeof AgentSchema>;
63
+ export declare const AgentSearchParamsSchema: z.ZodObject<{
64
+ status: z.ZodOptional<z.ZodEnum<["active", "inactive", "suspended", "pending"]>>;
65
+ search: z.ZodOptional<z.ZodString>;
66
+ minTrustScore: z.ZodOptional<z.ZodNumber>;
67
+ capability: z.ZodOptional<z.ZodString>;
68
+ isLive: z.ZodOptional<z.ZodBoolean>;
69
+ isBattleTested: z.ZodOptional<z.ZodBoolean>;
70
+ }, "strip", z.ZodTypeAny, {
71
+ status?: "active" | "inactive" | "suspended" | "pending" | undefined;
72
+ isLive?: boolean | undefined;
73
+ isBattleTested?: boolean | undefined;
74
+ search?: string | undefined;
75
+ minTrustScore?: number | undefined;
76
+ capability?: string | undefined;
77
+ }, {
78
+ status?: "active" | "inactive" | "suspended" | "pending" | undefined;
79
+ isLive?: boolean | undefined;
80
+ isBattleTested?: boolean | undefined;
81
+ search?: string | undefined;
82
+ minTrustScore?: number | undefined;
83
+ capability?: string | undefined;
84
+ }>;
85
+ export type AgentSearchParams = z.infer<typeof AgentSearchParamsSchema>;
86
+ //# sourceMappingURL=agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../src/types/identity/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,iBAAiB,2DAK5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBtB,CAAC;AACH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEhD,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;EAOlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { z } from "zod";
2
+ import { DIDSchema } from "./did.js";
3
+ export const AgentStatusSchema = z.enum([
4
+ "active",
5
+ "inactive",
6
+ "suspended",
7
+ "pending",
8
+ ]);
9
+ export const AgentSchema = z.object({
10
+ id: z.string().uuid(),
11
+ did: DIDSchema,
12
+ name: z.string(),
13
+ description: z.string().optional(),
14
+ url: z.string().url(),
15
+ manifestUrl: z.string().url(),
16
+ status: AgentStatusSchema,
17
+ trustScore: z.number().min(0).max(100).nullable(),
18
+ totalRatings: z.number().int().nonnegative(),
19
+ totalVolume: z.number().nonnegative(),
20
+ lastLivenessCheck: z.coerce.date().nullable(),
21
+ isLive: z.boolean(),
22
+ isBattleTested: z.boolean(),
23
+ registeredAt: z.coerce.date(),
24
+ updatedAt: z.coerce.date(),
25
+ chainId: z.number().int().optional(),
26
+ registryTxHash: z.string().optional(),
27
+ ownerAddress: z.string().optional(),
28
+ });
29
+ export const AgentSearchParamsSchema = z.object({
30
+ status: AgentStatusSchema.optional(),
31
+ search: z.string().optional(),
32
+ minTrustScore: z.coerce.number().optional(),
33
+ capability: z.string().optional(),
34
+ isLive: z.coerce.boolean().optional(),
35
+ isBattleTested: z.coerce.boolean().optional(),
36
+ });
37
+ //# sourceMappingURL=agent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.js","sourceRoot":"","sources":["../../../src/types/identity/agent.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C,QAAQ,EAAE;IACpC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACpC,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,MAAM,EAAE,iBAAiB,CAAC,QAAQ,EAAE;IACpC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,aAAa,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACrC,cAAc,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC"}
@@ -0,0 +1,116 @@
1
+ import { z } from "zod";
2
+ export declare const DIDMethodSchema: z.ZodEnum<["web", "key", "ethr", "pkh"]>;
3
+ export type DIDMethod = z.infer<typeof DIDMethodSchema>;
4
+ export declare const DIDSchema: z.ZodString;
5
+ export type DID = z.infer<typeof DIDSchema>;
6
+ export declare const VerificationMethodSchema: z.ZodObject<{
7
+ id: z.ZodString;
8
+ type: z.ZodString;
9
+ controller: z.ZodString;
10
+ publicKeyMultibase: z.ZodOptional<z.ZodString>;
11
+ publicKeyJwk: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
12
+ }, "strip", z.ZodTypeAny, {
13
+ type: string;
14
+ id: string;
15
+ controller: string;
16
+ publicKeyMultibase?: string | undefined;
17
+ publicKeyJwk?: Record<string, unknown> | undefined;
18
+ }, {
19
+ type: string;
20
+ id: string;
21
+ controller: string;
22
+ publicKeyMultibase?: string | undefined;
23
+ publicKeyJwk?: Record<string, unknown> | undefined;
24
+ }>;
25
+ export type VerificationMethod = z.infer<typeof VerificationMethodSchema>;
26
+ export declare const DIDServiceSchema: z.ZodObject<{
27
+ id: z.ZodString;
28
+ type: z.ZodString;
29
+ serviceEndpoint: z.ZodString;
30
+ }, "strip", z.ZodTypeAny, {
31
+ type: string;
32
+ id: string;
33
+ serviceEndpoint: string;
34
+ }, {
35
+ type: string;
36
+ id: string;
37
+ serviceEndpoint: string;
38
+ }>;
39
+ export type DIDService = z.infer<typeof DIDServiceSchema>;
40
+ export declare const DIDDocumentSchema: z.ZodObject<{
41
+ "@context": z.ZodArray<z.ZodString, "many">;
42
+ id: z.ZodString;
43
+ controller: z.ZodOptional<z.ZodString>;
44
+ verificationMethod: z.ZodOptional<z.ZodArray<z.ZodObject<{
45
+ id: z.ZodString;
46
+ type: z.ZodString;
47
+ controller: z.ZodString;
48
+ publicKeyMultibase: z.ZodOptional<z.ZodString>;
49
+ publicKeyJwk: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
50
+ }, "strip", z.ZodTypeAny, {
51
+ type: string;
52
+ id: string;
53
+ controller: string;
54
+ publicKeyMultibase?: string | undefined;
55
+ publicKeyJwk?: Record<string, unknown> | undefined;
56
+ }, {
57
+ type: string;
58
+ id: string;
59
+ controller: string;
60
+ publicKeyMultibase?: string | undefined;
61
+ publicKeyJwk?: Record<string, unknown> | undefined;
62
+ }>, "many">>;
63
+ authentication: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
64
+ assertionMethod: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
65
+ service: z.ZodOptional<z.ZodArray<z.ZodObject<{
66
+ id: z.ZodString;
67
+ type: z.ZodString;
68
+ serviceEndpoint: z.ZodString;
69
+ }, "strip", z.ZodTypeAny, {
70
+ type: string;
71
+ id: string;
72
+ serviceEndpoint: string;
73
+ }, {
74
+ type: string;
75
+ id: string;
76
+ serviceEndpoint: string;
77
+ }>, "many">>;
78
+ }, "strip", z.ZodTypeAny, {
79
+ id: string;
80
+ "@context": string[];
81
+ controller?: string | undefined;
82
+ verificationMethod?: {
83
+ type: string;
84
+ id: string;
85
+ controller: string;
86
+ publicKeyMultibase?: string | undefined;
87
+ publicKeyJwk?: Record<string, unknown> | undefined;
88
+ }[] | undefined;
89
+ authentication?: string[] | undefined;
90
+ assertionMethod?: string[] | undefined;
91
+ service?: {
92
+ type: string;
93
+ id: string;
94
+ serviceEndpoint: string;
95
+ }[] | undefined;
96
+ }, {
97
+ id: string;
98
+ "@context": string[];
99
+ controller?: string | undefined;
100
+ verificationMethod?: {
101
+ type: string;
102
+ id: string;
103
+ controller: string;
104
+ publicKeyMultibase?: string | undefined;
105
+ publicKeyJwk?: Record<string, unknown> | undefined;
106
+ }[] | undefined;
107
+ authentication?: string[] | undefined;
108
+ assertionMethod?: string[] | undefined;
109
+ service?: {
110
+ type: string;
111
+ id: string;
112
+ serviceEndpoint: string;
113
+ }[] | undefined;
114
+ }>;
115
+ export type DIDDocument = z.infer<typeof DIDDocumentSchema>;
116
+ //# sourceMappingURL=did.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"did.d.ts","sourceRoot":"","sources":["../../../src/types/identity/did.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,eAAe,0CAAwC,CAAC;AACrE,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,SAAS,aAE+C,CAAC;AACtE,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAE5C,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;EAMnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EAI3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQ5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { z } from "zod";
2
+ export const DIDMethodSchema = z.enum(["web", "key", "ethr", "pkh"]);
3
+ export const DIDSchema = z
4
+ .string()
5
+ .regex(/^did:(web|key|ethr|pkh):.+$/, "Must be a valid DID string");
6
+ export const VerificationMethodSchema = z.object({
7
+ id: z.string(),
8
+ type: z.string(),
9
+ controller: z.string(),
10
+ publicKeyMultibase: z.string().optional(),
11
+ publicKeyJwk: z.record(z.unknown()).optional(),
12
+ });
13
+ export const DIDServiceSchema = z.object({
14
+ id: z.string(),
15
+ type: z.string(),
16
+ serviceEndpoint: z.string().url(),
17
+ });
18
+ export const DIDDocumentSchema = z.object({
19
+ "@context": z.array(z.string()),
20
+ id: z.string(),
21
+ controller: z.string().optional(),
22
+ verificationMethod: z.array(VerificationMethodSchema).optional(),
23
+ authentication: z.array(z.string()).optional(),
24
+ assertionMethod: z.array(z.string()).optional(),
25
+ service: z.array(DIDServiceSchema).optional(),
26
+ });
27
+ //# sourceMappingURL=did.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"did.js","sourceRoot":"","sources":["../../../src/types/identity/did.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AAGrE,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC;KACvB,MAAM,EAAE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CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from "./did.js";
2
+ export * from "./agent-manifest.js";
3
+ export * from "./agent.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/identity/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from "./did.js";
2
+ export * from "./agent-manifest.js";
3
+ export * from "./agent.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/identity/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from "./identity/index.js";
2
+ export * from "./reputation/index.js";
3
+ export * from "./security/index.js";
4
+ export * from "./common/index.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from "./identity/index.js";
2
+ export * from "./reputation/index.js";
3
+ export * from "./security/index.js";
4
+ export * from "./common/index.js";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from "./rating.js";
2
+ export * from "./trust-score.js";
3
+ export * from "./pow-challenge.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/reputation/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from "./rating.js";
2
+ export * from "./trust-score.js";
3
+ export * from "./pow-challenge.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/reputation/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { z } from "zod";
2
+ export declare const PoWChallengeSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ challenge: z.ZodString;
5
+ difficulty: z.ZodNumber;
6
+ expiresAt: z.ZodDate;
7
+ raterDid: z.ZodString;
8
+ targetDid: z.ZodString;
9
+ }, "strip", z.ZodTypeAny, {
10
+ id: string;
11
+ expiresAt: Date;
12
+ challenge: string;
13
+ difficulty: number;
14
+ raterDid: string;
15
+ targetDid: string;
16
+ }, {
17
+ id: string;
18
+ expiresAt: Date;
19
+ challenge: string;
20
+ difficulty: number;
21
+ raterDid: string;
22
+ targetDid: string;
23
+ }>;
24
+ export type PoWChallenge = z.infer<typeof PoWChallengeSchema>;
25
+ //# sourceMappingURL=pow-challenge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pow-challenge.d.ts","sourceRoot":"","sources":["../../../src/types/reputation/pow-challenge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;EAO7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { z } from "zod";
2
+ import { DIDSchema } from "../identity/did.js";
3
+ export const PoWChallengeSchema = z.object({
4
+ id: z.string().uuid(),
5
+ challenge: z.string(),
6
+ difficulty: z.number().int(),
7
+ expiresAt: z.coerce.date(),
8
+ raterDid: DIDSchema,
9
+ targetDid: DIDSchema,
10
+ });
11
+ //# sourceMappingURL=pow-challenge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pow-challenge.js","sourceRoot":"","sources":["../../../src/types/reputation/pow-challenge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACrB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC5B,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE;IAC1B,QAAQ,EAAE,SAAS;IACnB,SAAS,EAAE,SAAS;CACrB,CAAC,CAAC"}
@@ -0,0 +1,102 @@
1
+ import { z } from "zod";
2
+ export declare const RatingSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ fromDid: z.ZodString;
5
+ toDid: z.ZodString;
6
+ score: z.ZodNumber;
7
+ comment: z.ZodOptional<z.ZodString>;
8
+ txHash: z.ZodOptional<z.ZodString>;
9
+ chainId: z.ZodOptional<z.ZodNumber>;
10
+ epochId: z.ZodString;
11
+ signature: z.ZodString;
12
+ createdAt: z.ZodDate;
13
+ expiresAt: z.ZodDate;
14
+ isVerified: z.ZodBoolean;
15
+ isWashTrade: z.ZodNullable<z.ZodBoolean>;
16
+ powNonce: z.ZodString;
17
+ powHash: z.ZodString;
18
+ powDifficulty: z.ZodNumber;
19
+ interactionCount: z.ZodNumber;
20
+ interactionWindowStart: z.ZodDate;
21
+ interactionCumulativeValue: z.ZodNumber;
22
+ raterTrustScore: z.ZodNullable<z.ZodNumber>;
23
+ weightedScore: z.ZodNullable<z.ZodNumber>;
24
+ }, "strip", z.ZodTypeAny, {
25
+ id: string;
26
+ fromDid: string;
27
+ toDid: string;
28
+ score: number;
29
+ epochId: string;
30
+ signature: string;
31
+ createdAt: Date;
32
+ expiresAt: Date;
33
+ isVerified: boolean;
34
+ isWashTrade: boolean | null;
35
+ powNonce: string;
36
+ powHash: string;
37
+ powDifficulty: number;
38
+ interactionCount: number;
39
+ interactionWindowStart: Date;
40
+ interactionCumulativeValue: number;
41
+ raterTrustScore: number | null;
42
+ weightedScore: number | null;
43
+ chainId?: number | undefined;
44
+ comment?: string | undefined;
45
+ txHash?: string | undefined;
46
+ }, {
47
+ id: string;
48
+ fromDid: string;
49
+ toDid: string;
50
+ score: number;
51
+ epochId: string;
52
+ signature: string;
53
+ createdAt: Date;
54
+ expiresAt: Date;
55
+ isVerified: boolean;
56
+ isWashTrade: boolean | null;
57
+ powNonce: string;
58
+ powHash: string;
59
+ powDifficulty: number;
60
+ interactionCount: number;
61
+ interactionWindowStart: Date;
62
+ interactionCumulativeValue: number;
63
+ raterTrustScore: number | null;
64
+ weightedScore: number | null;
65
+ chainId?: number | undefined;
66
+ comment?: string | undefined;
67
+ txHash?: string | undefined;
68
+ }>;
69
+ export type Rating = z.infer<typeof RatingSchema>;
70
+ export declare const CreateRatingInputSchema: z.ZodObject<{
71
+ toDid: z.ZodString;
72
+ score: z.ZodNumber;
73
+ comment: z.ZodOptional<z.ZodString>;
74
+ signature: z.ZodString;
75
+ powNonce: z.ZodString;
76
+ powHash: z.ZodString;
77
+ challengeId: z.ZodString;
78
+ interactionProofs: z.ZodArray<z.ZodString, "many">;
79
+ interactionChainId: z.ZodNumber;
80
+ }, "strip", z.ZodTypeAny, {
81
+ toDid: string;
82
+ score: number;
83
+ signature: string;
84
+ powNonce: string;
85
+ powHash: string;
86
+ challengeId: string;
87
+ interactionProofs: string[];
88
+ interactionChainId: number;
89
+ comment?: string | undefined;
90
+ }, {
91
+ toDid: string;
92
+ score: number;
93
+ signature: string;
94
+ powNonce: string;
95
+ powHash: string;
96
+ challengeId: string;
97
+ interactionProofs: string[];
98
+ interactionChainId: number;
99
+ comment?: string | undefined;
100
+ }>;
101
+ export type CreateRatingInput = z.infer<typeof CreateRatingInputSchema>;
102
+ //# sourceMappingURL=rating.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rating.d.ts","sourceRoot":"","sources":["../../../src/types/reputation/rating.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBvB,CAAC;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { z } from "zod";
2
+ import { DIDSchema } from "../identity/did.js";
3
+ export const RatingSchema = z.object({
4
+ id: z.string().uuid(),
5
+ fromDid: DIDSchema,
6
+ toDid: DIDSchema,
7
+ score: z.number().int().min(1).max(5),
8
+ comment: z.string().max(1024).optional(),
9
+ txHash: z.string().optional(),
10
+ chainId: z.number().int().optional(),
11
+ epochId: z.string(),
12
+ signature: z.string(),
13
+ createdAt: z.coerce.date(),
14
+ expiresAt: z.coerce.date(),
15
+ isVerified: z.boolean(),
16
+ isWashTrade: z.boolean().nullable(),
17
+ // PoW fields
18
+ powNonce: z.string(),
19
+ powHash: z.string(),
20
+ powDifficulty: z.number().int(),
21
+ // Interaction proof fields
22
+ interactionCount: z.number().int().min(3),
23
+ interactionWindowStart: z.coerce.date(),
24
+ interactionCumulativeValue: z.number().nonnegative(),
25
+ // Trust-weighted influence
26
+ raterTrustScore: z.number().min(0).max(100).nullable(),
27
+ weightedScore: z.number().nullable(),
28
+ });
29
+ export const CreateRatingInputSchema = z.object({
30
+ toDid: DIDSchema,
31
+ score: z.number().int().min(1).max(5),
32
+ comment: z.string().max(1024).optional(),
33
+ signature: z.string(),
34
+ // PoW proof
35
+ powNonce: z.string(),
36
+ powHash: z.string(),
37
+ challengeId: z.string().uuid(),
38
+ // Interaction proof (on-chain tx hashes proving prior interaction)
39
+ interactionProofs: z.array(z.string()).min(3),
40
+ interactionChainId: z.number().int(),
41
+ });
42
+ //# sourceMappingURL=rating.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rating.js","sourceRoot":"","sources":["../../../src/types/reputation/rating.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACrB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACrC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;IACxC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,O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