@a2aletheia/sdk 0.2.0 → 0.2.2

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 (88) 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/index.d.ts +2 -0
  4. package/dist/agent/index.d.ts.map +1 -1
  5. package/dist/agent/index.js +2 -0
  6. package/dist/agent/index.js.map +1 -1
  7. package/dist/agent/redis-task-store.d.ts +40 -0
  8. package/dist/agent/redis-task-store.d.ts.map +1 -0
  9. package/dist/agent/redis-task-store.js +48 -0
  10. package/dist/agent/redis-task-store.js.map +1 -0
  11. package/dist/agent/types.d.ts +1 -1
  12. package/dist/client.d.ts +1 -1
  13. package/dist/client.d.ts.map +1 -1
  14. package/dist/identity/agent-signer.d.ts +1 -1
  15. package/dist/identity/did-resolver.d.ts +1 -1
  16. package/dist/identity/did-resolver.js +1 -1
  17. package/dist/identity/manifest-fetcher.d.ts +1 -1
  18. package/dist/identity/manifest-fetcher.js +1 -1
  19. package/dist/index.d.ts +1 -0
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +2 -0
  22. package/dist/index.js.map +1 -1
  23. package/dist/logger/console-logger.d.ts +1 -1
  24. package/dist/logger/event-emitter.d.ts +1 -1
  25. package/dist/logger/noop-logger.d.ts +1 -1
  26. package/dist/reputation/rating-client.d.ts +1 -1
  27. package/dist/security/audit-client.d.ts +1 -1
  28. package/dist/types/common/events.d.ts +14 -0
  29. package/dist/types/common/events.d.ts.map +1 -0
  30. package/dist/types/common/events.js +8 -0
  31. package/dist/types/common/events.js.map +1 -0
  32. package/dist/types/common/index.d.ts +4 -0
  33. package/dist/types/common/index.d.ts.map +1 -0
  34. package/dist/types/common/index.js +4 -0
  35. package/dist/types/common/index.js.map +1 -0
  36. package/dist/types/common/logger.d.ts +14 -0
  37. package/dist/types/common/logger.d.ts.map +1 -0
  38. package/dist/types/common/logger.js +2 -0
  39. package/dist/types/common/logger.js.map +1 -0
  40. package/dist/types/common/pagination.d.ts +45 -0
  41. package/dist/types/common/pagination.d.ts.map +1 -0
  42. package/dist/types/common/pagination.js +17 -0
  43. package/dist/types/common/pagination.js.map +1 -0
  44. package/dist/types/identity/agent-manifest.d.ts +258 -0
  45. package/dist/types/identity/agent-manifest.d.ts.map +1 -0
  46. package/dist/types/identity/agent-manifest.js +78 -0
  47. package/dist/types/identity/agent-manifest.js.map +1 -0
  48. package/dist/types/identity/agent.d.ts +86 -0
  49. package/dist/types/identity/agent.d.ts.map +1 -0
  50. package/dist/types/identity/agent.js +37 -0
  51. package/dist/types/identity/agent.js.map +1 -0
  52. package/dist/types/identity/did.d.ts +116 -0
  53. package/dist/types/identity/did.d.ts.map +1 -0
  54. package/dist/types/identity/did.js +27 -0
  55. package/dist/types/identity/did.js.map +1 -0
  56. package/dist/types/identity/index.d.ts +4 -0
  57. package/dist/types/identity/index.d.ts.map +1 -0
  58. package/dist/types/identity/index.js +4 -0
  59. package/dist/types/identity/index.js.map +1 -0
  60. package/dist/types/index.d.ts +5 -0
  61. package/dist/types/index.d.ts.map +1 -0
  62. package/dist/types/index.js +5 -0
  63. package/dist/types/index.js.map +1 -0
  64. package/dist/types/reputation/index.d.ts +4 -0
  65. package/dist/types/reputation/index.d.ts.map +1 -0
  66. package/dist/types/reputation/index.js +4 -0
  67. package/dist/types/reputation/index.js.map +1 -0
  68. package/dist/types/reputation/pow-challenge.d.ts +25 -0
  69. package/dist/types/reputation/pow-challenge.d.ts.map +1 -0
  70. package/dist/types/reputation/pow-challenge.js +11 -0
  71. package/dist/types/reputation/pow-challenge.js.map +1 -0
  72. package/dist/types/reputation/rating.d.ts +102 -0
  73. package/dist/types/reputation/rating.d.ts.map +1 -0
  74. package/dist/types/reputation/rating.js +42 -0
  75. package/dist/types/reputation/rating.js.map +1 -0
  76. package/dist/types/reputation/trust-score.d.ts +58 -0
  77. package/dist/types/reputation/trust-score.d.ts.map +1 -0
  78. package/dist/types/reputation/trust-score.js +18 -0
  79. package/dist/types/reputation/trust-score.js.map +1 -0
  80. package/dist/types/security/audit-report.d.ts +104 -0
  81. package/dist/types/security/audit-report.d.ts.map +1 -0
  82. package/dist/types/security/audit-report.js +31 -0
  83. package/dist/types/security/audit-report.js.map +1 -0
  84. package/dist/types/security/index.d.ts +2 -0
  85. package/dist/types/security/index.d.ts.map +1 -0
  86. package/dist/types/security/index.js +2 -0
  87. package/dist/types/security/index.js.map +1 -0
  88. package/package.json +65 -66
@@ -1,5 +1,5 @@
1
1
  import type { AgentExecutor, ExecutionEventBus, RequestContext } from "@a2a-js/sdk/server";
2
- import type { AletheiaLogger } from "@a2aletheia/types";
2
+ import type { AletheiaLogger } from "../types/index.js";
3
3
  import type { AgentHandler, CancelHandler } from "./types.js";
4
4
  import type { EventEmitter } from "../logger/event-emitter.js";
5
5
  /**
@@ -1,7 +1,7 @@
1
1
  import type { AgentCard } from "@a2a-js/sdk";
2
2
  import { type TaskStore, type A2ARequestHandler } from "@a2a-js/sdk/server";
3
3
  import type { A2AResponse } from "@a2a-js/sdk";
4
- import type { AletheiaLogger, AletheiaEventType, AletheiaEventHandler } from "@a2aletheia/types";
4
+ import type { AletheiaLogger, AletheiaEventType, AletheiaEventHandler } from "../types/index.js";
5
5
  import type { AletheiaAgentConfig, AgentHandler, CancelHandler } from "./types.js";
6
6
  import { EventEmitter } from "../logger/event-emitter.js";
7
7
  /**
@@ -1,6 +1,8 @@
1
1
  export { AletheiaAgent } from "./aletheia-agent.js";
2
2
  export { AgentResponse } from "./agent-response.js";
3
3
  export { AgentContextImpl } from "./agent-context.js";
4
+ export { RedisTaskStore } from "./redis-task-store.js";
5
+ export type { RedisTaskStoreOptions, RedisLike, } from "./redis-task-store.js";
4
6
  export type { AletheiaAgentConfig, AletheiaExtensions, AgentHandler, CancelHandler, AgentContext, Part, TextPart, DataPart, FilePart, Artifact, AgentCard, AgentSkill, AgentCapabilities, Message, Task, TaskState, TaskStatus, TaskStatusUpdateEvent, TaskArtifactUpdateEvent, ExecutionEventBus, TaskStore, AgentExecutionEvent, AgentExecutor, } from "./types.js";
5
7
  export { InMemoryTaskStore, A2AError, RequestContext, DefaultExecutionEventBus, } from "@a2a-js/sdk/server";
6
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,YAAY,EAEZ,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,OAAO,EACP,IAAI,EACJ,SAAS,EACT,UAAU,EACV,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EACT,mBAAmB,EACnB,aAAa,GACd,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,wBAAwB,GACzB,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,YAAY,EACV,qBAAqB,EACrB,SAAS,GACV,MAAM,uBAAuB,CAAC;AAG/B,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,YAAY,EAEZ,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,OAAO,EACP,IAAI,EACJ,SAAS,EACT,UAAU,EACV,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EACT,mBAAmB,EACnB,aAAa,GACd,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,wBAAwB,GACzB,MAAM,oBAAoB,CAAC"}
@@ -4,6 +4,8 @@ export { AletheiaAgent } from "./aletheia-agent.js";
4
4
  export { AgentResponse } from "./agent-response.js";
5
5
  // Context implementation
6
6
  export { AgentContextImpl } from "./agent-context.js";
7
+ // Redis task store
8
+ export { RedisTaskStore } from "./redis-task-store.js";
7
9
  // Re-export useful classes from @a2a-js/sdk/server
8
10
  export { InMemoryTaskStore, A2AError, RequestContext, DefaultExecutionEventBus, } from "@a2a-js/sdk/server";
9
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agent/index.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,kBAAkB;AAClB,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,yBAAyB;AACzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AA8BtD,mDAAmD;AACnD,OAAO,EACL,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,wBAAwB,GACzB,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agent/index.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,kBAAkB;AAClB,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,yBAAyB;AACzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,mBAAmB;AACnB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAkCvD,mDAAmD;AACnD,OAAO,EACL,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,wBAAwB,GACzB,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,40 @@
1
+ import type { Task } from "@a2a-js/sdk";
2
+ import type { TaskStore } from "@a2a-js/sdk/server";
3
+ /**
4
+ * Minimal subset of a Redis client that {@link RedisTaskStore} needs.
5
+ * Compatible with ioredis, node-redis v4, and most Redis client libraries.
6
+ */
7
+ export interface RedisLike {
8
+ get(key: string): Promise<string | null>;
9
+ set(key: string, value: string, ...args: unknown[]): Promise<unknown>;
10
+ del(...args: unknown[]): Promise<unknown>;
11
+ }
12
+ export interface RedisTaskStoreOptions {
13
+ /** Key prefix. Default: `"aletheia:task:"` */
14
+ prefix?: string;
15
+ /** TTL in seconds. Default: `86400` (24 hours). Set to `0` to disable. */
16
+ ttlSeconds?: number;
17
+ }
18
+ /**
19
+ * A {@link TaskStore} backed by any Redis-like client.
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * import IORedis from "ioredis";
24
+ * import { RedisTaskStore } from "@a2aletheia/sdk/agent";
25
+ *
26
+ * const redis = new IORedis("redis://localhost:6379");
27
+ * const taskStore = new RedisTaskStore(redis, { ttlSeconds: 3600 });
28
+ *
29
+ * const agent = new AletheiaAgent({ taskStore, ... });
30
+ * ```
31
+ */
32
+ export declare class RedisTaskStore implements TaskStore {
33
+ private readonly redis;
34
+ private readonly prefix;
35
+ private readonly ttl;
36
+ constructor(redis: RedisLike, options?: RedisTaskStoreOptions);
37
+ save(task: Task): Promise<void>;
38
+ load(taskId: string): Promise<Task | undefined>;
39
+ }
40
+ //# sourceMappingURL=redis-task-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redis-task-store.d.ts","sourceRoot":"","sources":["../../src/agent/redis-task-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACzC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACtE,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,qBAAqB;IACpC,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0EAA0E;IAC1E,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAKD;;;;;;;;;;;;;GAaG;AACH,qBAAa,cAAe,YAAW,SAAS;IAC9C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAY;IAClC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;gBAEjB,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,qBAAqB;IAMvD,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAU/B,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC;CAStD"}
@@ -0,0 +1,48 @@
1
+ const DEFAULT_PREFIX = "aletheia:task:";
2
+ const DEFAULT_TTL = 86400; // 24 hours
3
+ /**
4
+ * A {@link TaskStore} backed by any Redis-like client.
5
+ *
6
+ * @example
7
+ * ```ts
8
+ * import IORedis from "ioredis";
9
+ * import { RedisTaskStore } from "@a2aletheia/sdk/agent";
10
+ *
11
+ * const redis = new IORedis("redis://localhost:6379");
12
+ * const taskStore = new RedisTaskStore(redis, { ttlSeconds: 3600 });
13
+ *
14
+ * const agent = new AletheiaAgent({ taskStore, ... });
15
+ * ```
16
+ */
17
+ export class RedisTaskStore {
18
+ redis;
19
+ prefix;
20
+ ttl;
21
+ constructor(redis, options) {
22
+ this.redis = redis;
23
+ this.prefix = options?.prefix ?? DEFAULT_PREFIX;
24
+ this.ttl = options?.ttlSeconds ?? DEFAULT_TTL;
25
+ }
26
+ async save(task) {
27
+ const key = `${this.prefix}${task.id}`;
28
+ const value = JSON.stringify(task);
29
+ if (this.ttl > 0) {
30
+ await this.redis.set(key, value, "EX", this.ttl);
31
+ }
32
+ else {
33
+ await this.redis.set(key, value);
34
+ }
35
+ }
36
+ async load(taskId) {
37
+ const raw = await this.redis.get(`${this.prefix}${taskId}`);
38
+ if (!raw)
39
+ return undefined;
40
+ try {
41
+ return JSON.parse(raw);
42
+ }
43
+ catch {
44
+ return undefined;
45
+ }
46
+ }
47
+ }
48
+ //# sourceMappingURL=redis-task-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redis-task-store.js","sourceRoot":"","sources":["../../src/agent/redis-task-store.ts"],"names":[],"mappings":"AAoBA,MAAM,cAAc,GAAG,gBAAgB,CAAC;AACxC,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,WAAW;AAEtC;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,cAAc;IACR,KAAK,CAAY;IACjB,MAAM,CAAS;IACf,GAAG,CAAS;IAE7B,YAAY,KAAgB,EAAE,OAA+B;QAC3D,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,OAAO,EAAE,MAAM,IAAI,cAAc,CAAC;QAChD,IAAI,CAAC,GAAG,GAAG,OAAO,EAAE,UAAU,IAAI,WAAW,CAAC;IAChD,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,IAAU;QACnB,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QACvC,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,IAAI,CAAC,GAAG,GAAG,CAAC,EAAE,CAAC;YACjB,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QACnD,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACnC,CAAC;IACH,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,MAAc;QACvB,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;QAC5D,IAAI,CAAC,GAAG;YAAE,OAAO,SAAS,CAAC;QAC3B,IAAI,CAAC;YACH,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAS,CAAC;QACjC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;CACF"}
@@ -1,6 +1,6 @@
1
1
  import type { AgentCapabilities, AgentSkill, Part } from "@a2a-js/sdk";
2
2
  import type { RequestContext, TaskStore } from "@a2a-js/sdk/server";
3
- import type { AletheiaLogger, AletheiaLogLevel } from "@a2aletheia/types";
3
+ import type { AletheiaLogger, AletheiaLogLevel } from "../types/index.js";
4
4
  import type { AgentResponse } from "./agent-response.js";
5
5
  /**
6
6
  * Aletheia-specific extensions for AgentCard metadata.
package/dist/client.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Agent, AgentManifest, AgentSearchParams, AuditReport, CreateRatingInput, DID, DIDDocument, PaginatedResponse, PoWChallenge, Rating, TrustScore } from "@a2aletheia/types";
1
+ import type { Agent, AgentManifest, AgentSearchParams, AuditReport, CreateRatingInput, DID, DIDDocument, PaginatedResponse, PoWChallenge, Rating, TrustScore } from "./types/index.js";
2
2
  import { type SignedMessage } from "./identity/agent-signer.js";
3
3
  export interface AletheiaClientConfig {
4
4
  apiUrl: string;
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,GAAG,EACH,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,MAAM,EACN,UAAU,EACX,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,4BAA4B,CAAC;AAIpC,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,cAAc;IAMb,OAAO,CAAC,MAAM;IAL1B,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,YAAY,CAAe;gBAEf,MAAM,EAAE,oBAAoB;IAShD,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAIlC,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC;IAK3B,UAAU,CACd,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;IAS/C,UAAU,CAAC,GAAG,EAAE,GAAG;;;;;;;;8BAgDzB,CAAF;wBACI,CAAH;;;;;;;;;;IA7CO,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAItD,oBAAoB,CAAC,WAAW,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Agent key pair for signing messages.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { type DID, type DIDDocument } from "@a2aletheia/types";
1
+ import { type DID, type DIDDocument } from "../types/index.js";
2
2
  export declare class DIDResolver {
3
3
  /**
4
4
  * Resolve a did:web DID by fetching https://<domain>/.well-known/did.json
@@ -1,4 +1,4 @@
1
- import { DIDDocumentSchema, } from "@a2aletheia/types";
1
+ import { DIDDocumentSchema, } from "../types/index.js";
2
2
  export class DIDResolver {
3
3
  /**
4
4
  * Resolve a did:web DID by fetching https://<domain>/.well-known/did.json
@@ -1,4 +1,4 @@
1
- import { type AgentManifest } from "@a2aletheia/types";
1
+ import { type AgentManifest } from "../types/index.js";
2
2
  export declare class ManifestFetcher {
3
3
  /**
4
4
  * Fetch and validate an agent manifest from a .well-known/agent.json URL.
@@ -1,4 +1,4 @@
1
- import { AgentManifestSchema } from "@a2aletheia/types";
1
+ import { AgentManifestSchema } from "../types/index.js";
2
2
  export class ManifestFetcher {
3
3
  /**
4
4
  * Fetch and validate an agent manifest from a .well-known/agent.json URL.
package/dist/index.d.ts CHANGED
@@ -9,4 +9,5 @@ export { signRatingPayload, verifyRatingSignature, hashRatingPayload, type Signe
9
9
  export { HttpClient } from "./utils/http.js";
10
10
  export { ConsoleLogger, NoopLogger, EventEmitter } from "./logger/index.js";
11
11
  export { calculate, calculatorToolDefinition, getCurrentTime, getCurrentTimeToolDefinition, convertUnits, convertUnitsToolDefinition, generateUUID, uuidGeneratorToolDefinition, aletheiaToolDefinitions, aletheiaToolExecutors, type CalculatorInput, type CalculatorResult, type CurrentTimeResult, type CryptoUnit, type TimeUnit, type DataUnit, type SupportedUnit, type UnitCategory, type UnitConversionInput, type UnitConversionResult, type UUIDResult, } from "./tools/index.js";
12
+ export * from "./types/index.js";
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EA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,4BAA4B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,yBAAyB,EACzB,KAAK,YAAY,EACjB,KAAK,aAAa,GACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,aAAa,EAClB,KAAK,oBAAoB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG5E,OAAO,EAEL,SAAS,EACT,wBAAwB,EACxB,cAAc,EACd,4BAA4B,EAC5B,YAAY,EACZ,0BAA0B,EAC1B,YAAY,EACZ,2BAA2B,EAE3B,uBAAuB,EACvB,qBAAqB,EAErB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,UAAU,GAChB,MAAM,kBAAkB,CAAC;AAG1B,cAAc,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -15,6 +15,8 @@ export {
15
15
  calculate, calculatorToolDefinition, getCurrentTime, getCurrentTimeToolDefinition, convertUnits, convertUnitsToolDefinition, generateUUID, uuidGeneratorToolDefinition,
16
16
  // Convenience collections
17
17
  aletheiaToolDefinitions, aletheiaToolExecutors, } from "./tools/index.js";
18
+ // Types — re-exported from inlined @a2aletheia/types
19
+ export * from "./types/index.js";
18
20
  // NOTE: Agent hosting exports are available via "@a2aletheia/sdk/agent"
19
21
  // This keeps the main export browser-safe (no Node.js dependencies)
20
22
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAA6B,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,yBAAyB,GAG1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,GAGlB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,wCAAwC;AACxC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE5E,yEAAyE;AACzE,OAAO;AACL,mBAAmB;AACnB,SAAS,EACT,wBAAwB,EACxB,cAAc,EACd,4BAA4B,EAC5B,YAAY,EACZ,0BAA0B,EAC1B,YAAY,EACZ,2BAA2B;AAC3B,0BAA0B;AAC1B,uBAAuB,EACvB,qBAAqB,GAatB,MAAM,kBAAkB,CAAC;AAE1B,wEAAwE;AACxE,oEAAoE"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAA6B,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,yBAAyB,GAG1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,GAGlB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,wCAAwC;AACxC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE5E,yEAAyE;AACzE,OAAO;AACL,mBAAmB;AACnB,SAAS,EACT,wBAAwB,EACxB,cAAc,EACd,4BAA4B,EAC5B,YAAY,EACZ,0BAA0B,EAC1B,YAAY,EACZ,2BAA2B;AAC3B,0BAA0B;AAC1B,uBAAuB,EACvB,qBAAqB,GAatB,MAAM,kBAAkB,CAAC;AAE1B,qDAAqD;AACrD,cAAc,kBAAkB,CAAC;AAEjC,wEAAwE;AACxE,oEAAoE"}
@@ -1,4 +1,4 @@
1
- import type { AletheiaLogger, AletheiaLogLevel } from "@a2aletheia/types";
1
+ import type { AletheiaLogger, AletheiaLogLevel } from "../types/index.js";
2
2
  /**
3
3
  * Default logger that writes to the console with level filtering.
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { AletheiaEventType, AletheiaEventHandler } from "@a2aletheia/types";
1
+ import type { AletheiaEventType, AletheiaEventHandler } from "../types/index.js";
2
2
  /**
3
3
  * Lightweight event emitter for Aletheia lifecycle events.
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { AletheiaLogger } from "@a2aletheia/types";
1
+ import type { AletheiaLogger } from "../types/index.js";
2
2
  /**
3
3
  * Silent logger that discards all output.
4
4
  * Use when you want to suppress SDK logging entirely.
@@ -1,4 +1,4 @@
1
- import type { Rating, CreateRatingInput, TrustScore, PoWChallenge, DID, PaginatedResponse } from "@a2aletheia/types";
1
+ import type { Rating, CreateRatingInput, TrustScore, PoWChallenge, DID, PaginatedResponse } from "../types/index.js";
2
2
  import type { HttpClient } from "../utils/http.js";
3
3
  /**
4
4
  * Client for the Aletheia reputation API.
@@ -1,4 +1,4 @@
1
- import type { AuditReport, DID } from "@a2aletheia/types";
1
+ import type { AuditReport, DID } from "../types/index.js";
2
2
  import type { HttpClient } from "../utils/http.js";
3
3
  /**
4
4
  * Client for security/audit endpoints.
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Lifecycle event system for Aletheia SDK observability.
3
+ *
4
+ * Subscribe to events via `agent.on(type, handler)` to integrate
5
+ * with any monitoring, logging, or analytics system.
6
+ */
7
+ export type AletheiaEventType = "agent.start" | "agent.stop" | "message.received" | "message.sent" | "message.failed" | "trust.verified" | "trust.failed" | "rating.submitted" | "rating.received" | "discovery.search" | "discovery.connect" | "liveness.check" | "liveness.result";
8
+ export interface AletheiaEvent {
9
+ type: AletheiaEventType;
10
+ timestamp: Date;
11
+ data?: Record<string, unknown>;
12
+ }
13
+ export type AletheiaEventHandler = (event: AletheiaEvent) => void;
14
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/types/common/events.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,iBAAiB,GACzB,aAAa,GACb,YAAY,GACZ,kBAAkB,GAClB,cAAc,GACd,gBAAgB,GAChB,gBAAgB,GAChB,cAAc,GACd,kBAAkB,GAClB,iBAAiB,GACjB,kBAAkB,GAClB,mBAAmB,GACnB,gBAAgB,GAChB,iBAAiB,CAAC;AAEtB,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,iBAAiB,CAAC;IACxB,SAAS,EAAE,IAAI,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Lifecycle event system for Aletheia SDK observability.
3
+ *
4
+ * Subscribe to events via `agent.on(type, handler)` to integrate
5
+ * with any monitoring, logging, or analytics system.
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/types/common/events.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -0,0 +1,4 @@
1
+ export * from "./pagination.js";
2
+ export * from "./logger.js";
3
+ export * from "./events.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from "./pagination.js";
2
+ export * from "./logger.js";
3
+ export * from "./events.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Pluggable logger interface for the Aletheia SDK.
3
+ *
4
+ * Consumers can implement this interface with pino, winston, bunyan,
5
+ * OpenTelemetry, or any custom logger.
6
+ */
7
+ export interface AletheiaLogger {
8
+ debug(message: string, context?: Record<string, unknown>): void;
9
+ info(message: string, context?: Record<string, unknown>): void;
10
+ warn(message: string, context?: Record<string, unknown>): void;
11
+ error(message: string, context?: Record<string, unknown>): void;
12
+ }
13
+ export type AletheiaLogLevel = "debug" | "info" | "warn" | "error";
14
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/types/common/logger.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAChE,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC/D,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC/D,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CACjE;AAED,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/types/common/logger.ts"],"names":[],"mappings":""}
@@ -0,0 +1,45 @@
1
+ import { z } from "zod";
2
+ export declare const PaginationInputSchema: z.ZodObject<{
3
+ page: z.ZodDefault<z.ZodNumber>;
4
+ limit: z.ZodDefault<z.ZodNumber>;
5
+ sortBy: z.ZodOptional<z.ZodString>;
6
+ sortOrder: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ page: number;
9
+ limit: number;
10
+ sortOrder: "asc" | "desc";
11
+ sortBy?: string | undefined;
12
+ }, {
13
+ page?: number | undefined;
14
+ limit?: number | undefined;
15
+ sortBy?: string | undefined;
16
+ sortOrder?: "asc" | "desc" | undefined;
17
+ }>;
18
+ export type PaginationInput = z.infer<typeof PaginationInputSchema>;
19
+ export declare function paginatedResponseSchema<T extends z.ZodTypeAny>(itemSchema: T): z.ZodObject<{
20
+ items: z.ZodArray<T, "many">;
21
+ total: z.ZodNumber;
22
+ page: z.ZodNumber;
23
+ limit: z.ZodNumber;
24
+ totalPages: z.ZodNumber;
25
+ }, "strip", z.ZodTypeAny, {
26
+ page: number;
27
+ limit: number;
28
+ items: T["_output"][];
29
+ total: number;
30
+ totalPages: number;
31
+ }, {
32
+ page: number;
33
+ limit: number;
34
+ items: T["_input"][];
35
+ total: number;
36
+ totalPages: number;
37
+ }>;
38
+ export type PaginatedResponse<T> = {
39
+ items: T[];
40
+ total: number;
41
+ page: number;
42
+ limit: number;
43
+ totalPages: number;
44
+ };
45
+ //# sourceMappingURL=pagination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../src/types/common/pagination.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;EAKhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,CAAC;;;;;;;;;;;;;;;;;;GAQ5E;AAED,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI;IACjC,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { z } from "zod";
2
+ export const PaginationInputSchema = z.object({
3
+ page: z.coerce.number().int().positive().default(1),
4
+ limit: z.coerce.number().int().min(1).max(100).default(20),
5
+ sortBy: z.string().optional(),
6
+ sortOrder: z.enum(["asc", "desc"]).default("desc"),
7
+ });
8
+ export function paginatedResponseSchema(itemSchema) {
9
+ return z.object({
10
+ items: z.array(itemSchema),
11
+ total: z.number().int().nonnegative(),
12
+ page: z.number().int().positive(),
13
+ limit: z.number().int().positive(),
14
+ totalPages: z.number().int().nonnegative(),
15
+ });
16
+ }
17
+ //# sourceMappingURL=pagination.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.js","sourceRoot":"","sources":["../../../src/types/common/pagination.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IACnD,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAC1D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;CACnD,CAAC,CAAC;AAGH,MAAM,UAAU,uBAAuB,CAAyB,UAAa;IAC3E,OAAO,CAAC,CAAC,MAAM,CAAC;QACd,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC;QAC1B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;QACrC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;QACjC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;QAClC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;KAC3C,CAAC,CAAC;AACL,CAAC"}