@artinet/sdk 0.5.0 → 0.5.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 (75) hide show
  1. package/CHANGELOG.md +53 -1
  2. package/README.md +58 -16
  3. package/dist/client/a2a-client.js +11 -0
  4. package/dist/client/a2a-client.js.map +1 -1
  5. package/dist/client/index.js +0 -1
  6. package/dist/client/index.js.map +1 -1
  7. package/dist/index.js +2 -2
  8. package/dist/index.js.map +1 -1
  9. package/dist/server/index.js +0 -1
  10. package/dist/server/index.js.map +1 -1
  11. package/dist/transport/rpc/parser.js +2 -1
  12. package/dist/transport/rpc/parser.js.map +1 -1
  13. package/dist/transport/streaming/stream.js.map +1 -1
  14. package/dist/types/client/a2a-client.d.ts +1 -1
  15. package/dist/types/client/a2a-client.d.ts.map +1 -1
  16. package/dist/types/client/index.d.ts +0 -1
  17. package/dist/types/client/index.d.ts.map +1 -1
  18. package/dist/{client/interfaces → types}/client.js.map +1 -1
  19. package/dist/types/context.js.map +1 -0
  20. package/dist/types/index.d.ts +2 -2
  21. package/dist/types/index.d.ts.map +1 -1
  22. package/dist/types/index.js +3 -0
  23. package/dist/types/index.js.map +1 -1
  24. package/dist/types/proxy.js +2 -0
  25. package/dist/types/proxy.js.map +1 -0
  26. package/dist/types/server/a2a-server.d.ts +1 -1
  27. package/dist/types/server/a2a-server.d.ts.map +1 -1
  28. package/dist/types/server/index.d.ts +0 -1
  29. package/dist/types/server/index.d.ts.map +1 -1
  30. package/dist/types/server/interfaces/params.d.ts +1 -1
  31. package/dist/types/server/interfaces/params.d.ts.map +1 -1
  32. package/dist/types/server/interfaces/server.d.ts +1 -2
  33. package/dist/types/server/interfaces/server.d.ts.map +1 -1
  34. package/dist/types/transport/rpc/parser.d.ts.map +1 -1
  35. package/dist/types/transport/streaming/stream.d.ts +1 -2
  36. package/dist/types/transport/streaming/stream.d.ts.map +1 -1
  37. package/dist/types/{client/interfaces → types}/client.d.ts +2 -2
  38. package/dist/types/types/client.d.ts.map +1 -0
  39. package/dist/types/{server/interfaces → types}/context.d.ts +1 -1
  40. package/dist/types/types/context.d.ts.map +1 -0
  41. package/dist/types/types/extended-schema.d.ts +2 -2
  42. package/dist/types/types/index.d.ts +3 -0
  43. package/dist/types/types/index.d.ts.map +1 -1
  44. package/dist/types/types/proxy.d.ts +93 -0
  45. package/dist/types/types/proxy.d.ts.map +1 -0
  46. package/dist/types/utils/api/register.d.ts.map +1 -1
  47. package/dist/types/utils/deployment/agents.d.ts +53 -0
  48. package/dist/types/utils/deployment/agents.d.ts.map +1 -0
  49. package/dist/types/utils/deployment/full-deployment.d.ts +8 -0
  50. package/dist/types/utils/deployment/full-deployment.d.ts.map +1 -0
  51. package/dist/types/utils/deployment/task-wrapper.d.ts +4 -3
  52. package/dist/types/utils/deployment/task-wrapper.d.ts.map +1 -1
  53. package/dist/types/utils/deployment/test-deployment.d.ts.map +1 -1
  54. package/dist/types/utils/index.d.ts +1 -0
  55. package/dist/types/utils/index.d.ts.map +1 -1
  56. package/dist/utils/api/register.js +9 -0
  57. package/dist/utils/api/register.js.map +1 -1
  58. package/dist/utils/deployment/agents.js +92 -0
  59. package/dist/utils/deployment/agents.js.map +1 -0
  60. package/dist/utils/deployment/bundler.js +1 -1
  61. package/dist/utils/deployment/bundler.js.map +1 -1
  62. package/dist/utils/deployment/full-deployment.js +31 -0
  63. package/dist/utils/deployment/full-deployment.js.map +1 -0
  64. package/dist/utils/deployment/task-wrapper.js +5 -23
  65. package/dist/utils/deployment/task-wrapper.js.map +1 -1
  66. package/dist/utils/deployment/test-deployment.js +2 -1
  67. package/dist/utils/deployment/test-deployment.js.map +1 -1
  68. package/dist/utils/index.js +1 -0
  69. package/dist/utils/index.js.map +1 -1
  70. package/package.json +10 -5
  71. package/dist/server/interfaces/context.js.map +0 -1
  72. package/dist/types/client/interfaces/client.d.ts.map +0 -1
  73. package/dist/types/server/interfaces/context.d.ts.map +0 -1
  74. /package/dist/{client/interfaces → types}/client.js +0 -0
  75. /package/dist/{server/interfaces → types}/context.js +0 -0
@@ -0,0 +1,93 @@
1
+ import { TaskYieldUpdate } from "./extended-schema.js";
2
+ import { TaskHandler } from "./context.js";
3
+ import { Client } from "./client.js";
4
+ /**
5
+ * Represents a proxy function for sending task yield updates.
6
+ * This function is typically provided by the host environment to allow
7
+ * an agent to communicate updates about its task execution.
8
+ * @param taskYieldUpdate - The update object yielded by the task.
9
+ * @returns A promise that resolves when the update has been processed.
10
+ */
11
+ export type TaskProxy = (taskYieldUpdate: TaskYieldUpdate) => Promise<void>;
12
+ /**
13
+ * Properties for the TaskManager function.
14
+ */
15
+ export interface TaskManagerProps {
16
+ /**
17
+ * The core task-handling generator function of an agent.
18
+ * This function takes a `TaskContext` and yields `TaskYieldUpdate` objects,
19
+ * eventually returning a `Task` or void.
20
+ */
21
+ taskHandler: TaskHandler;
22
+ }
23
+ /**
24
+ * Defines the signature for a TaskManager function.
25
+ * A TaskManager is responsible for orchestrating the execution of an agent's task,
26
+ * typically by interfacing with a host environment.
27
+ * @param props - The properties for the task manager, including the taskHandler.
28
+ * @returns A promise that resolves when the task handler has completed.
29
+ */
30
+ export type TaskManager = (props: TaskManagerProps) => Promise<void>;
31
+ /**
32
+ * Properties for the Connect function.
33
+ * These properties are used when an agent needs to establish a connection
34
+ * or send a request to another agent or an external service (e.g., an LLM).
35
+ */
36
+ export interface ConnectProps {
37
+ /**
38
+ * The identifier of the target agent or LLM to which the request is directed.
39
+ */
40
+ agentId: string;
41
+ /**
42
+ * An array of messages forming the conversation history or prompt.
43
+ * Each message should have a `role` (e.g., "user", "assistant") and `content`.
44
+ */
45
+ messages: {
46
+ role: string;
47
+ content: string;
48
+ }[];
49
+ }
50
+ /**
51
+ * Defines the signature for a Connect function.
52
+ * This function is used by agents to make external calls, such as to LLMs or other agents,
53
+ * often proxied by a host environment.
54
+ * @param props - The properties for the connect call, including agentID and messages.
55
+ * @returns A promise that resolves to a string, which could be a response from the
56
+ * target or a connection identifier.
57
+ */
58
+ export type ConnectAPICallback = (props: ConnectProps) => Promise<string>;
59
+ /**
60
+ * Represents a proxy for a client, providing a subset of `Client` functionalities.
61
+ * This interface omits methods related to direct task management and header manipulation,
62
+ * focusing on core interaction capabilities suitable for a proxied environment.
63
+ */
64
+ export interface ClientProxy extends Omit<Client, "sendTaskSubscribe" | "getTask" | "cancelTask" | "getTaskPushNotification" | "setTaskPushNotification" | "resubscribeTask" | "refreshAgentCard" | "setHeaders" | "addHeader" | "removeHeader" | "clearHeaders"> {
65
+ }
66
+ /**
67
+ * Properties for the ClientFactory function.
68
+ * These properties are used to configure and create a `ClientProxy` instance.
69
+ */
70
+ export interface ClientProps {
71
+ /**
72
+ * The base URL for the client to connect to.
73
+ * Can be a URL object or a string.
74
+ */
75
+ baseUrl: URL | string;
76
+ /**
77
+ * Optional record of headers to be included in client requests.
78
+ */
79
+ headers?: Record<string, string>;
80
+ /**
81
+ * Optional fallback path for client requests.
82
+ */
83
+ fallbackPath?: string;
84
+ }
85
+ /**
86
+ * Defines the signature for a ClientFactory function.
87
+ * A ClientFactory is responsible for creating `ClientProxy` instances,
88
+ * allowing agents to interact with services or other agents.
89
+ * @param props - The properties required to configure the client.
90
+ * @returns A `ClientProxy` instance.
91
+ */
92
+ export type ClientFactory = (props: ClientProps) => ClientProxy;
93
+ //# sourceMappingURL=proxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../../src/types/proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,eAAe,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,gBAAgB;IA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/B,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAgBxE;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,SAAS,GAAG,aAAa,CAkCtD;AAED;;;;GAIG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAkC/D"}
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../src/utils/api/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAqB,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAc,MAAM,sBAAsB,CAAC;AAG7D;;;;GAIG;AACH,wBAAsB,WAAW,CAC/B,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAgBxE;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,SAAS,GAAG,aAAa,CAmCtD;AAED;;;;GAIG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CA6C/D"}
@@ -0,0 +1,53 @@
1
+ import { ClientFactory, ConnectAPICallback, TaskManager } from "../../types/proxy.js";
2
+ export declare namespace artinet {
3
+ namespace v0 {
4
+ /**
5
+ * Manages the execution of an agent's task.
6
+ * This function is intended to be used within an agent's code when deployed to a
7
+ * managed environment. It takes the agent's core task-handling generator function
8
+ * and iterates over its yielded updates, passing them to a proxy function
9
+ * made available by the host environment.
10
+ *
11
+ * The `TaskContext` and the `TaskProxy` (for yielding updates) are expected
12
+ * to be provided by the host environment via `process.env`.
13
+ *
14
+ * @param {TaskManagerProps} props - The properties for the task manager, including the taskHandler.
15
+ * @param {function(TaskContext): AsyncGenerator<any, any, unknown>} props.taskHandler - An asynchronous generator function that takes a `TaskContext`
16
+ * and yields updates, eventually returning a `Task` or void.
17
+ * @returns {Promise<void>} A promise that resolves when the task handler has completed.
18
+ * @throws An error if the `taskManagerStub` or `context` is not set in `process.env`,
19
+ * indicating an invalid runtime environment.
20
+ */
21
+ const taskManager: TaskManager;
22
+ /**
23
+ * Establishes a connection or sends a request to another agent or service.
24
+ * This function proxies requests to a host-provided implementation, enabling
25
+ * agents in a managed environment to make external calls (e.g., to an LLM or another agent)
26
+ * without needing direct network access or credentials. The actual implementation
27
+ * is delegated to `env.connectStub`, provided by the host environment.
28
+ *
29
+ * @param {ConnectProps} props - The properties for the connect call, including the target agentID and messages.
30
+ * @param {string} props.agentID - The identifier of the target agent or LLM to which the request is directed.
31
+ * @param {object[]} props.messages - An array of messages forming the conversation history or prompt.
32
+ * @returns {Promise<string>} A promise that resolves to the string response from the target agent/LLM or a connection identifier.
33
+ * @throws An error if `env.connectStub` is not found,
34
+ * indicating an invalid runtime environment.
35
+ */
36
+ const connect: ConnectAPICallback;
37
+ /**
38
+ * Creates a client proxy for interacting with other agents or services.
39
+ * This function acts as a factory to obtain a `ClientProxy` instance.
40
+ * The actual implementation of the client factory is delegated to `env.clientStub`,
41
+ * provided by the host environment. This allows agents to communicate with
42
+ * other entities in a managed environment without direct awareness of the
43
+ * underlying communication mechanisms.
44
+ *
45
+ * @param {ClientProps} props - The properties for creating the client.
46
+ * @returns {ClientProxy} A proxy object for interacting with a client service or agent.
47
+ * @throws An error if `env.clientStub` is not found,
48
+ * indicating an invalid runtime environment.
49
+ */
50
+ const agent: ClientFactory;
51
+ }
52
+ }
53
+ //# sourceMappingURL=agents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../../../src/utils/deployment/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAGb,kBAAkB,EAElB,WAAW,EAGZ,MAAM,sBAAsB,CAAC;AAM9B,yBAAiB,OAAO,CAAC;IAEvB,UAAiB,EAAE,CAAC;QAClB;;;;;;;;;;;;;;;;WAgBG;QACI,MAAM,WAAW,EAAE,WA0BzB,CAAC;QAEF;;;;;;;;;;;;;WAaG;QACI,MAAM,OAAO,EAAE,kBAWrB,CAAC;QAEF;;;;;;;;;;;;WAYG;QACI,MAAM,KAAK,EAAE,aASnB,CAAC;KACH;CACF"}
@@ -0,0 +1,8 @@
1
+ import { ServerDeploymentRequestParams, ServerDeploymentResponse } from "../../types/index.js";
2
+ /**
3
+ * Sends a full deployment request to the server.
4
+ * @param params The parameters to pass to the method.
5
+ * @returns The response from the server.
6
+ */
7
+ export declare function fullDeployment(params: ServerDeploymentRequestParams): Promise<ServerDeploymentResponse>;
8
+ //# sourceMappingURL=full-deployment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"full-deployment.d.ts","sourceRoot":"","sources":["../../../../src/utils/deployment/full-deployment.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,wBAAwB,EAGzB,MAAM,sBAAsB,CAAC;AAqC9B;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,MAAM,EAAE,6BAA6B,qCAYzE"}
@@ -1,4 +1,5 @@
1
- import { Task, TaskContext, TaskYieldUpdate } from "../../index.js";
1
+ import { Task, TaskYieldUpdate } from "../../types/index.js";
2
+ import { TaskContext } from "../../types/context.js";
2
3
  /**
3
4
  * @fileoverview This module provides proxy functions for agent task handling and
4
5
  * fetching responses within a managed deployment environment. These proxies
@@ -13,7 +14,7 @@ import { Task, TaskContext, TaskYieldUpdate } from "../../index.js";
13
14
  * made available in the `env` by the host environment.
14
15
  *
15
16
  * The `Context` (TaskContext) is also expected to be provided by the host environment via `env`.
16
- *
17
+ * @deprecated This function is deprecated and will be removed in a future version. Use the `Artinet.v0.taskManager` function instead.
17
18
  * @param taskHandler - An asynchronous generator function that takes a `TaskContext`
18
19
  * and yields `TaskYieldUpdate` objects, eventually returning a `Task` or void.
19
20
  * @throws An error if the required `env.hostOnYield` or `env.Context` are not found,
@@ -25,7 +26,7 @@ export declare const taskHandlerProxy: (taskHandler: (context: TaskContext) => A
25
26
  * This allows agents in a managed environment to make external calls (e.g., to an LLM)
26
27
  * without needing direct network access or credentials. The actual implementation of fetching
27
28
  * the response is delegated to `env.hostFetchResponse`, provided by the host environment.
28
- *
29
+ * @deprecated This function is deprecated and will be removed in a future version. Use the `Artinet.v0.connect` function instead.
29
30
  * @param agentID - The identifier of the target agent or LLM to which the request is directed.
30
31
  * @param messages - An array of messages forming the conversation history or prompt.
31
32
  * @returns A promise that resolves to the string response from the target agent/LLM.
@@ -1 +1 @@
1
- {"version":3,"file":"task-wrapper.d.ts","sourceRoot":"","sources":["../../../../src/utils/deployment/task-wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGpE;;;;;GAKG;AAEH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,GAC3B,aAAa,CACX,OAAO,EAAE,WAAW,KACjB,cAAc,CAAC,eAAe,EAAE,IAAI,GAAG,IAAI,EAAE,OAAO,CAAC,kBAmB3D,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kBAAkB,GAC7B,SAAS,MAAM,EACf,UAAU;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,KAC5C,OAAO,CAAC,MAAM,CAUhB,CAAC"}
1
+ {"version":3,"file":"task-wrapper.d.ts","sourceRoot":"","sources":["../../../../src/utils/deployment/task-wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAGrD;;;;;GAKG;AAEH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,GAC3B,aAAa,CACX,OAAO,EAAE,WAAW,KACjB,cAAc,CAAC,eAAe,EAAE,IAAI,GAAG,IAAI,EAAE,OAAO,CAAC,kBAG3D,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kBAAkB,GAC7B,SAAS,MAAM,EACf,UAAU;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,KAC5C,OAAO,CAAC,MAAM,CAEhB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"test-deployment.d.ts","sourceRoot":"","sources":["../../../../src/utils/deployment/test-deployment.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,wBAAwB,EAIxB,IAAI,EACJ,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAqB9B;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAuB,cAAc,CACnC,MAAM,EAAE,6BAA6B,EACrC,QAAQ,EAAE,eAAe,EAAE,GAC1B,aAAa,CAAC,IAAI,GAAG,wBAAwB,GAAG,IAAI,CAAC,CAwCvD"}
1
+ {"version":3,"file":"test-deployment.d.ts","sourceRoot":"","sources":["../../../../src/utils/deployment/test-deployment.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,wBAAwB,EAIxB,IAAI,EACJ,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAqB9B;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAuB,cAAc,CACnC,MAAM,EAAE,6BAA6B,EACrC,QAAQ,EAAE,eAAe,EAAE,GAC1B,aAAa,CAAC,IAAI,GAAG,wBAAwB,GAAG,IAAI,CAAC,CAyCvD"}
@@ -7,4 +7,5 @@ export * from "./api/register.js";
7
7
  export * from "./deployment/test-deployment.js";
8
8
  export * from "./deployment/task-wrapper.js";
9
9
  export * from "./deployment/bundler.js";
10
+ export * from "./deployment/full-deployment.js";
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC"}
@@ -41,6 +41,7 @@ export function convert(card) {
41
41
  description: card.description ?? "sdk-generated registration for " + card.name,
42
42
  version: card.version,
43
43
  capabilities: capabilities,
44
+ tags: ["a2a"],
44
45
  communication: {
45
46
  endpoints: [
46
47
  {
@@ -68,6 +69,14 @@ export async function register(card) {
68
69
  logWarn("A2AServer", "No card provided");
69
70
  return "";
70
71
  }
72
+ if (card.url === undefined ||
73
+ card.url === null ||
74
+ card.url === "" ||
75
+ card.url.includes("localhost") ||
76
+ card.url.includes("127.0.0.1")) {
77
+ logDebug("A2AServer", "Invalid URL provided", card.url);
78
+ return "";
79
+ }
71
80
  try {
72
81
  const registration = convert(card);
73
82
  logInfo("A2AServer", "Registration", registration);
@@ -1 +1 @@
1
- {"version":3,"file":"register.js","sourceRoot":"","sources":["../../../src/utils/api/register.ts"],"names":[],"mappings":"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AE,KAAK,CAAC,CAAC;QACnD,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
@@ -0,0 +1,92 @@
1
+ const env = process.env;
2
+ // eslint-disable-next-line @typescript-eslint/no-namespace
3
+ export var artinet;
4
+ (function (artinet) {
5
+ // eslint-disable-next-line @typescript-eslint/no-namespace
6
+ let v0;
7
+ (function (v0) {
8
+ /**
9
+ * Manages the execution of an agent's task.
10
+ * This function is intended to be used within an agent's code when deployed to a
11
+ * managed environment. It takes the agent's core task-handling generator function
12
+ * and iterates over its yielded updates, passing them to a proxy function
13
+ * made available by the host environment.
14
+ *
15
+ * The `TaskContext` and the `TaskProxy` (for yielding updates) are expected
16
+ * to be provided by the host environment via `process.env`.
17
+ *
18
+ * @param {TaskManagerProps} props - The properties for the task manager, including the taskHandler.
19
+ * @param {function(TaskContext): AsyncGenerator<any, any, unknown>} props.taskHandler - An asynchronous generator function that takes a `TaskContext`
20
+ * and yields updates, eventually returning a `Task` or void.
21
+ * @returns {Promise<void>} A promise that resolves when the task handler has completed.
22
+ * @throws An error if the `taskManagerStub` or `context` is not set in `process.env`,
23
+ * indicating an invalid runtime environment.
24
+ */
25
+ v0.taskManager = async (props) => {
26
+ const { taskHandler } = props;
27
+ if (!env.taskManagerStub && !env.context) {
28
+ console.warn("taskManager: taskManagerStub or context is not set", "task-manager");
29
+ return;
30
+ }
31
+ const context = env.context;
32
+ const taskManagerProxy = env.taskManagerStub;
33
+ if (!taskManagerProxy || !context) {
34
+ console.warn("taskManager: taskManagerStub or context is not set", "task-manager");
35
+ return;
36
+ }
37
+ const generator = taskHandler(context);
38
+ for await (const yieldValue of generator) {
39
+ console.info("taskManager: yieldValue", "task-manager", yieldValue);
40
+ taskManagerProxy(yieldValue);
41
+ }
42
+ };
43
+ /**
44
+ * Establishes a connection or sends a request to another agent or service.
45
+ * This function proxies requests to a host-provided implementation, enabling
46
+ * agents in a managed environment to make external calls (e.g., to an LLM or another agent)
47
+ * without needing direct network access or credentials. The actual implementation
48
+ * is delegated to `env.connectStub`, provided by the host environment.
49
+ *
50
+ * @param {ConnectProps} props - The properties for the connect call, including the target agentID and messages.
51
+ * @param {string} props.agentID - The identifier of the target agent or LLM to which the request is directed.
52
+ * @param {object[]} props.messages - An array of messages forming the conversation history or prompt.
53
+ * @returns {Promise<string>} A promise that resolves to the string response from the target agent/LLM or a connection identifier.
54
+ * @throws An error if `env.connectStub` is not found,
55
+ * indicating an invalid runtime environment.
56
+ */
57
+ v0.connect = async (props) => {
58
+ if (!env.connectStub) {
59
+ throw new Error("connectStub is not set");
60
+ }
61
+ const connectProxy = env.connectStub;
62
+ if (!connectProxy) {
63
+ throw new Error("connectStub is not set");
64
+ }
65
+ return connectProxy(props);
66
+ };
67
+ /**
68
+ * Creates a client proxy for interacting with other agents or services.
69
+ * This function acts as a factory to obtain a `ClientProxy` instance.
70
+ * The actual implementation of the client factory is delegated to `env.clientStub`,
71
+ * provided by the host environment. This allows agents to communicate with
72
+ * other entities in a managed environment without direct awareness of the
73
+ * underlying communication mechanisms.
74
+ *
75
+ * @param {ClientProps} props - The properties for creating the client.
76
+ * @returns {ClientProxy} A proxy object for interacting with a client service or agent.
77
+ * @throws An error if `env.clientStub` is not found,
78
+ * indicating an invalid runtime environment.
79
+ */
80
+ v0.agent = (props) => {
81
+ if (!env.clientStub) {
82
+ throw new Error("clientStub is not set");
83
+ }
84
+ const clientProxy = env.clientStub;
85
+ if (!clientProxy) {
86
+ throw new Error("clientStub is not set");
87
+ }
88
+ return clientProxy(props);
89
+ };
90
+ })(v0 = artinet.v0 || (artinet.v0 = {}));
91
+ })(artinet || (artinet = {}));
92
+ //# sourceMappingURL=agents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents.js","sourceRoot":"","sources":["../../../src/utils/deployment/agents.ts"],"names":[],"mappings":"AAYA,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;AAExB,2DAA2D;AAC3D,MAAM,KAAW,OAAO,CAmGvB;AAnGD,WAAiB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AC,CAAC;QAC7B,CAAC,CAAC;QAEF;;;;;;;;;;;;WAYG;QACU,QAAK,GAAkB,CAAC,KAAkB,EAAe,EAAE;YACtE,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;gBACpB,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;YAC3C,CAAC;YACD,MAAM,WAAW,GAAG,GAAG,CAAC,UAAsC,CAAC;YAC/D,IAAI,CAAC,WAAW,EAAE,CAAC;gBACjB,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;YAC3C,CAAC;YACD,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC,CAAC;IACJ,CAAC,EAhGgB,EAAE,GAAF,UAAE,KAAF,UAAE,QAgGlB;AACH,CAAC,EAnGgB,OAAO,KAAP,OAAO,QAmGvB"}
@@ -31,7 +31,7 @@ export async function bundle(filePath) {
31
31
  entryPoints: [entryPath],
32
32
  bundle: true,
33
33
  minify: true,
34
- sourcemap: true,
34
+ sourcemap: false,
35
35
  platform: "node",
36
36
  format: "esm",
37
37
  write: false,
@@ -1 +1 @@
1
- {"version":3,"file":"bundler.js","sourceRoot":"","sources":["../../../src/utils/deployment/bundler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,QAAa;IACxC,MAAM,SAAS,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC;IAC1C,QAAQ,CACN,WAAW,EACX,uDAAuD,EACvD,SAAS,CACV,CAAC;IACF,IAAI,CAAC;QACH,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,CAAC;QACnC,MAAM,KAAK,GAAG,EAAE,CAAC,QAAQ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CAAC,CAAC,CAAC,EAAE,IAAI,IAAI,EAAE,CAAC;QACpD,QAAQ,CACN,8CAA8C,EAC9C,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,CACzB,CAAC;QACF,OAAO,MAAM,CAAC;IAChB,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,QAAQ,CAAC,WAAW,EAAE,8BAA8B,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;QACnE,MAAM,IAAI,KAAK,CAAC,uBAAuB,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IACxD,CAAC;AACH,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { executeJsonRpcRequest } from "../../transport/index.js";
2
+ /**
3
+ * @description The base URL of the deployment server.
4
+ */
5
+ const FULL_DEPLOYMENT_URL = new URL("https://agents.artinet.io/deploy");
6
+ /**
7
+ * @description The API key to use for the deployment.
8
+ */
9
+ const API_KEY = process.env.ARTINET_API_KEY;
10
+ /**
11
+ * Sends a full deployment request to the server.
12
+ * @param baseUrl The base URL of the server.
13
+ * @param method The method to call.
14
+ * @param params The parameters to pass to the method.
15
+ * @param headers The headers to send with the request.
16
+ * @param acceptHeader The accept header to send with the request.
17
+ * @returns The response from the server.
18
+ */
19
+ const executeFullDeploymentRequest = executeJsonRpcRequest;
20
+ /**
21
+ * Sends a full deployment request to the server.
22
+ * @param params The parameters to pass to the method.
23
+ * @returns The response from the server.
24
+ */
25
+ export async function fullDeployment(params) {
26
+ if (!API_KEY) {
27
+ throw new Error("ARTINET_API_KEY is not set");
28
+ }
29
+ return await executeFullDeploymentRequest(FULL_DEPLOYMENT_URL, "/deploy", params, { Authorization: `Bearer ${API_KEY}` }, "application/json");
30
+ }
31
+ //# sourceMappingURL=full-deployment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"full-deployment.js","sourceRoot":"","sources":["../../../src/utils/deployment/full-deployment.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE;;GAEG;AACH,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC,kCAAkC,CAAC,CAAC;AAExE;;GAEG;AACH,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;AAO5C;;;;;;;;GAQG;AACH,MAAM,4BAA4B,GAAG,qBAQC,CAAC;AAEvC;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,MAAqC;IACxE,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAChD,CAAC;IAED,OAAO,MAAM,4BAA4B,CACvC,mBAAmB,EACnB,SAAS,EACT,MAAM,EACN,EAAE,aAAa,EAAE,UAAU,OAAO,EAAE,EAAE,EACtC,kBAAkB,CACnB,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
- import { env } from "process";
1
+ import { artinet } from "./agents.js";
2
2
  /**
3
3
  * @fileoverview This module provides proxy functions for agent task handling and
4
4
  * fetching responses within a managed deployment environment. These proxies
@@ -13,34 +13,21 @@ import { env } from "process";
13
13
  * made available in the `env` by the host environment.
14
14
  *
15
15
  * The `Context` (TaskContext) is also expected to be provided by the host environment via `env`.
16
- *
16
+ * @deprecated This function is deprecated and will be removed in a future version. Use the `Artinet.v0.taskManager` function instead.
17
17
  * @param taskHandler - An asynchronous generator function that takes a `TaskContext`
18
18
  * and yields `TaskYieldUpdate` objects, eventually returning a `Task` or void.
19
19
  * @throws An error if the required `env.hostOnYield` or `env.Context` are not found,
20
20
  * indicating an invalid runtime environment.
21
21
  */
22
22
  export const taskHandlerProxy = async (taskHandler) => {
23
- if (!env.hostOnYield && !env.Context) {
24
- const err = new Error("invalid runtime environment");
25
- throw err;
26
- }
27
- const context = env.Context;
28
- const onYieldProxy = env.hostOnYield;
29
- if (!onYieldProxy || !context) {
30
- const err = new Error("invalid runtime environment");
31
- throw err;
32
- }
33
- const generator = taskHandler(context);
34
- for await (const yieldValue of generator) {
35
- onYieldProxy(yieldValue);
36
- }
23
+ return await artinet.v0.taskManager({ taskHandler });
37
24
  };
38
25
  /**
39
26
  * Proxies requests to fetch responses from other agents or LLMs to a host-provided implementation.
40
27
  * This allows agents in a managed environment to make external calls (e.g., to an LLM)
41
28
  * without needing direct network access or credentials. The actual implementation of fetching
42
29
  * the response is delegated to `env.hostFetchResponse`, provided by the host environment.
43
- *
30
+ * @deprecated This function is deprecated and will be removed in a future version. Use the `Artinet.v0.connect` function instead.
44
31
  * @param agentID - The identifier of the target agent or LLM to which the request is directed.
45
32
  * @param messages - An array of messages forming the conversation history or prompt.
46
33
  * @returns A promise that resolves to the string response from the target agent/LLM.
@@ -48,11 +35,6 @@ export const taskHandlerProxy = async (taskHandler) => {
48
35
  * indicating an invalid runtime environment.
49
36
  */
50
37
  export const fetchResponseProxy = async (agentID, messages) => {
51
- if (!env.hostFetchResponse) {
52
- const err = new Error("invalid runtime environment");
53
- throw err;
54
- }
55
- const fetchResponseImpl = env.hostFetchResponse;
56
- return fetchResponseImpl(agentID, messages);
38
+ return artinet.v0.connect({ agentId: agentID, messages });
57
39
  };
58
40
  //# sourceMappingURL=task-wrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"task-wrapper.js","sourceRoot":"","sources":["../../../src/utils/deployment/task-wrapper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAE9B;;;;;GAKG;AAEH;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,EACnC,WAE0D,EAC1D,EAAE;IACF,IAAI,CAAC,GAAG,CAAC,WAAW,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;QACrC,MAAM,GAAG,GAAG,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;QACrD,MAAM,GAAG,CAAC;IACZ,CAAC;IACD,MAAM,OAAO,GAAG,GAAG,CAAC,OAAiC,CAAC;IACtD,MAAM,YAA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E,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;AAC5D,CAAC,CAAC"}
@@ -42,7 +42,8 @@ export async function* testDeployment(params, requests) {
42
42
  };
43
43
  for await (const event of generator) {
44
44
  const deploymentEvent = event;
45
- if (deploymentEvent.result &&
45
+ if (deploymentEvent &&
46
+ deploymentEvent.result &&
46
47
  deploymentEvent.result.deploymentId &&
47
48
  deploymentEvent.result.url) {
48
49
  logDebug("testDeployment", "deployment-event: ", deploymentEvent);
@@ -1 +1 @@
1
- {"version":3,"file":"test-deployment.js","sourceRoot":"","sources":["../../../src/utils/deployment/test-deployment.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C;;;;GAIG;AAEH,MAAM,uBAAuB,GAAG,mBAQoB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,KAAK,SAAS,CAAC,CAAC,cAAc,CACnC,MAAqC,EACrC,QAA2B;IAE3B,MAAM,SAAS,GAAG,MAAM,uBAAuB,CAC7C,IAAI,GAAG,CAAC,uCAAuC,CAAC,EAChD,cAAqB,EACrB,MAAa,EACb,EAAE,CACH,CAAC;IAEF,MAAM,eAAe,GAAG,KAAK,EAAE,GAAW,EAAE,EAAE,CAC5C,KAAK,SAAS,CAAC;QACb,MAAM,UAAU,GAAG,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC;QACtC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;YAC/B,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,QAAQ,CAAC;gBACrC,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE;gBACrB,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO;aAChC,CAAC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ployment/test-deployment.js";
8
8
  export * from "./deployment/task-wrapper.js";
9
9
  export * from "./deployment/bundler.js";
10
+ export * from "./deployment/full-deployment.js";
10
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artinet/sdk",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "TypeScript SDK for the Agent2Agent (A2A) Protocol",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -11,6 +11,11 @@
11
11
  "types": "./dist/types/index.d.ts",
12
12
  "import": "./dist/index.js",
13
13
  "default": "./dist/index.js"
14
+ },
15
+ "./agents": {
16
+ "types": "./dist/utils/deployment/agents.d.ts",
17
+ "import": "./dist/utils/deployment/agents.js",
18
+ "default": "./dist/utils/deployment/agents.js"
14
19
  }
15
20
  },
16
21
  "rootDir": ".",
@@ -27,7 +32,8 @@
27
32
  "prepublishOnly": "npm run clean && npm run build && npm run lint && npm test",
28
33
  "test": "NODE_OPTIONS=--experimental-vm-modules jest",
29
34
  "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch",
30
- "test:coverage": "NODE_OPTIONS=--experimental-vm-modules jest --coverage"
35
+ "test:coverage": "NODE_OPTIONS=--experimental-vm-modules jest --coverage",
36
+ "dev-pack": "rimraf dist node_modules/ && npm i && npm run build && npm pack"
31
37
  },
32
38
  "keywords": [
33
39
  "agent2agent",
@@ -54,10 +60,10 @@
54
60
  "@types/express": "^5.0.1",
55
61
  "@types/pino": "^7.0.4",
56
62
  "cors": "^2.8.5",
57
- "esbuild": "^0.25.4",
58
63
  "eventsource-parser": "^3.0.1",
59
64
  "express": "^5.1.0",
60
65
  "jayson": "^4.2.0",
66
+ "esbuild": "^0.25.4",
61
67
  "pino": "^9.6.0",
62
68
  "pino-pretty": "^10.2.0",
63
69
  "uuid": "^11.1.0"
@@ -65,13 +71,12 @@
65
71
  "devDependencies": {
66
72
  "@eslint/js": "^9.25.1",
67
73
  "@types/jest": "^29.5.14",
68
- "@types/node": "^20.8.10",
74
+ "@types/node": "^20.17.50",
69
75
  "@types/supertest": "^6.0.2",
70
76
  "@types/uuid": "^9.0.6",
71
77
  "eslint": "^9.25.1",
72
78
  "globals": "^16.0.0",
73
79
  "jest": "^29.7.0",
74
- "json-schema-to-typescript": "^15.0.4",
75
80
  "msw": "^2.7.5",
76
81
  "rimraf": "^5.0.5",
77
82
  "supertest": "^7.1.0",
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/server/interfaces/context.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/client/interfaces/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACvB,YAAY,EACZ,IAAI,EACL,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EACV,SAAS,EACT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AAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7C;;;;OAIG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC;;;OAGG;IACH,YAAY,IAAI,IAAI,CAAC;CACtB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/server/interfaces/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EACJ,OAAO,EACP,eAAe,EAChB,MAAM,gCAAgC,CAAC;AAExC;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,IAAI,EAAE,IAAI,CAAC;IAEX;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;IAErB;;;;OAIG;IACH,WAAW,IAAI,OAAO,CAAC;IAEvB;;OAEG;IACH,OAAO,EAAE,OAAO,EAAE,CAAC;CACpB;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,WAAW,GAAG,CACxB,OAAO,EAAE,WAAW,KACjB,cAAc,CAAC,eAAe,EAAE,IAAI,GAAG,IAAI,EAAE,OAAO,CAAC,CAAC"}
File without changes
File without changes