@artinet/sdk 0.5.1 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/README.md +44 -13
- package/dist/client/index.js +0 -1
- package/dist/client/index.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/server/index.js +0 -1
- package/dist/server/index.js.map +1 -1
- package/dist/transport/streaming/stream.js.map +1 -1
- package/dist/types/client/a2a-client.d.ts +1 -1
- package/dist/types/client/a2a-client.d.ts.map +1 -1
- package/dist/types/client/index.d.ts +0 -1
- package/dist/types/client/index.d.ts.map +1 -1
- package/dist/{client/interfaces → types}/client.js.map +1 -1
- package/dist/types/context.js.map +1 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/proxy.js +2 -0
- package/dist/types/proxy.js.map +1 -0
- package/dist/types/server/a2a-server.d.ts +1 -1
- package/dist/types/server/a2a-server.d.ts.map +1 -1
- package/dist/types/server/index.d.ts +0 -1
- package/dist/types/server/index.d.ts.map +1 -1
- package/dist/types/server/interfaces/params.d.ts +1 -1
- package/dist/types/server/interfaces/params.d.ts.map +1 -1
- package/dist/types/server/interfaces/server.d.ts +1 -2
- package/dist/types/server/interfaces/server.d.ts.map +1 -1
- package/dist/types/transport/streaming/stream.d.ts +1 -2
- package/dist/types/transport/streaming/stream.d.ts.map +1 -1
- package/dist/types/{client/interfaces → types}/client.d.ts +2 -2
- package/dist/types/types/client.d.ts.map +1 -0
- package/dist/types/{server/interfaces → types}/context.d.ts +1 -1
- package/dist/types/types/context.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +3 -0
- package/dist/types/types/index.d.ts.map +1 -1
- package/dist/types/types/proxy.d.ts +93 -0
- package/dist/types/types/proxy.d.ts.map +1 -0
- package/dist/types/utils/deployment/agents.d.ts +53 -0
- package/dist/types/utils/deployment/agents.d.ts.map +1 -0
- package/dist/types/utils/deployment/task-wrapper.d.ts +4 -3
- package/dist/types/utils/deployment/task-wrapper.d.ts.map +1 -1
- package/dist/utils/deployment/agents.js +92 -0
- package/dist/utils/deployment/agents.js.map +1 -0
- package/dist/utils/deployment/task-wrapper.js +5 -23
- package/dist/utils/deployment/task-wrapper.js.map +1 -1
- package/package.json +10 -5
- package/dist/server/interfaces/context.js.map +0 -1
- package/dist/types/client/interfaces/client.d.ts.map +0 -1
- package/dist/types/server/interfaces/context.d.ts.map +0 -1
- /package/dist/{client/interfaces → types}/client.js +0 -0
- /package/dist/{server/interfaces → types}/context.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,32 @@ All notable changes to the @artinet/sdk package will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.5.2] - 2025-05-25 (Please fill in the date)
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- New `artinet.v0` namespace in `src/utils/deployment/agents.ts` providing `taskManager`, `connect`, and `agent` utilities. These are designed for agents running in sandboxed or managed environments, offering a standardized way to interact with the host system for task execution, inter-agent communication, and external API calls.
|
|
12
|
+
- Corresponding types for the new agent utilities in `src/types/proxy.ts`: `TaskProxy`, `TaskManagerProps`, `TaskManager`, `ConnectProps`, `ConnectAPICallback`, `ClientProxy`, `ClientProps`, `ClientFactory`.
|
|
13
|
+
- New `exports` path `./agents` in `package.json` to expose the `artinet.v0` utilities.
|
|
14
|
+
- New example file `examples/nested-deployment.ts` demonstrating how to use `artinet.v0.agent` for an agent to call another agent, and `artinet.v0.taskManager` for managing the agent's lifecycle.
|
|
15
|
+
- New `dev-pack` script in `package.json` for easier local development and packaging.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- **Refactoring**:
|
|
19
|
+
- `src/client/interfaces/client.ts` has been moved to `src/types/client.ts`.
|
|
20
|
+
- `src/server/interfaces/context.ts` has been moved to `src/types/context.ts`.
|
|
21
|
+
- Internal type imports throughout the codebase have been updated to reflect these changes.
|
|
22
|
+
- Examples `examples/code-deployment.js` and `examples/code-deployment.ts` have been updated to use the new `artinet.v0.taskManager` and `artinet.v0.connect` utilities instead of the deprecated proxy functions.
|
|
23
|
+
- Updated `@types/node` dependency to `^20.17.50`.
|
|
24
|
+
|
|
25
|
+
### Deprecated
|
|
26
|
+
- The `taskHandlerProxy` and `fetchResponseProxy` functions in `src/utils/deployment/task-wrapper.ts` are now deprecated. Developers should migrate to the new `artinet.v0.taskManager` and `artinet.v0.connect` utilities respectively.
|
|
27
|
+
|
|
28
|
+
### Removed
|
|
29
|
+
- Removed `json-schema-to-typescript` from `devDependencies` as it's no longer directly used.
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
- Minor wording update in the "QUICK-AGENT FAQs" section of `README.md` for clarity on searching by `registrationId/agentId`.
|
|
33
|
+
|
|
8
34
|
## [0.5.1] - 2025-05-12
|
|
9
35
|
|
|
10
36
|
### Added
|
|
@@ -136,6 +162,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
136
162
|
- Comprehensive test suite and documentation
|
|
137
163
|
|
|
138
164
|
<!-- [Unreleased]: https://github.com/artinet/sdk/compare/v0.5.1...HEAD -->
|
|
165
|
+
[0.5.2]: https://github.com/the-artinet-project/artinet-sdk/compare/v0.5.1...v0.5.2
|
|
139
166
|
[0.5.1]: https://github.com/the-artinet-project/artinet-sdk/compare/v0.5.0...v0.5.1
|
|
140
167
|
[0.5.0]: https://github.com/the-artinet-project/artinet-sdk/compare/v0.4.1...v0.5.0
|
|
141
168
|
[0.4.1]: https://github.com/the-artinet-project/artinet-sdk/compare/v0.3.0...v0.4.1
|
package/README.md
CHANGED
|
@@ -11,8 +11,19 @@ Artinet SDK is a [Agent2Agent (A2A) Protocol](https://github.com/google/A2A) com
|
|
|
11
11
|
|
|
12
12
|
This SDK significantly enhances the foundational A2A concepts and samples provided by Google, offering a production-ready solution with a focus on developer experience, reliability, and comprehensive features.
|
|
13
13
|
|
|
14
|
+
### Quick Start
|
|
15
|
+
|
|
16
|
+
To build your own agent/server use the [`create-quick-agent`](https://www.npmjs.com/package/@artinet/create-quick-agent) command:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx @artinet/create-quick-agent@latest
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Its got [serveral template projects](https://github.com/the-artinet-project/create-quick-agent) that you can use to get started building agents today.
|
|
23
|
+
|
|
14
24
|
## Table of Contents
|
|
15
25
|
- [Artinet SDK](#artinet-sdk)
|
|
26
|
+
- [Quick Start](#quick-start)
|
|
16
27
|
- [Table of Contents](#table-of-contents)
|
|
17
28
|
- [Features](#features)
|
|
18
29
|
- [Installation](#installation)
|
|
@@ -50,7 +61,7 @@ This SDK significantly enhances the foundational A2A concepts and samples provid
|
|
|
50
61
|
- **Configurable Logging:** Integrated structured logging via `pino`. Configurable levels using `configureLogger` and `LogLevel`.
|
|
51
62
|
- **Advanced Customization:** Allows providing a custom `JSONRPCServerFactory` for fine-grained control over the JSON-RPC server, enabling integration with existing Express apps or adding custom methods.
|
|
52
63
|
- **Comprehensive Testing:** Includes a suite of tests to ensure reliability and maintainability.
|
|
53
|
-
- **Code Deployment (
|
|
64
|
+
- **Code Deployment (Experimental)** | Bundle, test, and deploy agent code onto the artinet. Includes bundler, task wrapper, and deployment utilities. | `bundle`, `test/fullDeployment`, `ServerDeploymentRequestParams`, `ServerDeploymentResponse`, `artinet.v0.taskManager`, `artinet.v0.connect`, `artinet.v0.agent` |
|
|
54
65
|
|
|
55
66
|
| Component/Feature | Description | Key Classes/Types |
|
|
56
67
|
| :------------------ | :-------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------- |
|
|
@@ -62,6 +73,7 @@ This SDK significantly enhances the foundational A2A concepts and samples provid
|
|
|
62
73
|
| **Logging** | Configure structured logging for debugging and monitoring. | `logger`, `configureLogger`, `LogLevel` |
|
|
63
74
|
| **Advanced Server** | Customize the underlying JSON-RPC server or integrate into existing apps. | `JSONRPCServerFactory`, `CreateJSONRPCServerParams`, `createJSONRPCMethod`, A2A Method Types |
|
|
64
75
|
| **Core Types** | Based on the official A2A JSON Schema. | `AgentCard`, `Task`, `Message`, `Part`, `Artifact`, etc. |
|
|
76
|
+
| **Agent Utilities (for Sandboxed Environments)** | Standardized utilities for agents in managed environments to interact with the host system for task lifecycle, inter-agent communication, and external API calls. | `artinet.v0.taskManager`, `artinet.v0.connect`, `artinet.v0.agent`, `TaskProxy`, `ConnectAPICallback`, `ClientProxy`, `ClientFactory` |
|
|
65
77
|
|
|
66
78
|
## Installation
|
|
67
79
|
|
|
@@ -485,20 +497,39 @@ Key features include:
|
|
|
485
497
|
const bundledCode = await bundle(new URL('./your-agent.ts', import.meta.url));
|
|
486
498
|
```
|
|
487
499
|
|
|
488
|
-
- **Sandboxed Enviroments:**
|
|
500
|
+
- **Sandboxed Enviroments:** Streamline agent logic for quick and easy deployments. The new `artinet.v0` namespace (accessible via `@artinet/sdk/agents`) provides `taskManager`, `connect`, and `agent`.
|
|
501
|
+
- `artinet.v0.taskManager`: Replaces the deprecated `taskHandlerProxy`. Manages the agent's task lifecycle by iterating over the agent's `TaskHandler` and communicating updates to the host environment.
|
|
502
|
+
- `artinet.v0.connect`: Replaces the deprecated `fetchResponseProxy`. Allows agents to make proxied calls to other agents or LLMs via the host environment.
|
|
503
|
+
- `artinet.v0.agent`: A factory function to obtain a `ClientProxy` for type-safe communication with other agents, managed by the host environment.
|
|
504
|
+
|
|
505
|
+
Example of using the new `artinet.v0` utilities in an agent:
|
|
489
506
|
```typescript
|
|
490
|
-
import {
|
|
507
|
+
import { TaskContext, TaskYieldUpdate, Task } from "@artinet/sdk";
|
|
508
|
+
import { artinet } from "@artinet/sdk/agents";
|
|
509
|
+
|
|
510
|
+
export async function* myAgentLogic(context: TaskContext): AsyncGenerator<TaskYieldUpdate, Task | void, unknown> {
|
|
511
|
+
yield { state: "working" };
|
|
512
|
+
|
|
513
|
+
// Call another agent/LLM using artinet.v0.connect
|
|
514
|
+
const llmResponse = await artinet.v0.connect({
|
|
515
|
+
agentId: "SomeLLMAgentID",
|
|
516
|
+
messages: [{ role: "user", content: "Tell me a joke." }]
|
|
517
|
+
});
|
|
518
|
+
|
|
519
|
+
// Or communicate tasks with artinet.v0.agent
|
|
520
|
+
const anotherAgent = artinet.v0.agent({
|
|
521
|
+
baseUrl: "https://agents.artinet.io/agentId=456",
|
|
522
|
+
});
|
|
523
|
+
const taskResult = await anotherAgent.sendTask({
|
|
524
|
+
...
|
|
525
|
+
});
|
|
491
526
|
|
|
492
|
-
async function myAgent(context) {
|
|
493
|
-
//call any other agent in the artinet with fetchResponseProxy
|
|
494
|
-
const friendResponse = await fetchResponseProxy("MyFriendlyAgent",
|
|
495
|
-
[{ role: "user", content: "Tell me a joke."}]
|
|
496
|
-
);
|
|
497
|
-
yield { state: "completed", message: { role: "agent", parts: [{type: "text", text: freiendResponse.choices[0].message.content }] } };
|
|
498
527
|
}
|
|
499
528
|
|
|
500
|
-
|
|
529
|
+
// The host environment will invoke this taskManager with the agent's logic.
|
|
530
|
+
await artinet.v0.taskManager({ taskHandler: myAgentLogic });
|
|
501
531
|
```
|
|
532
|
+
*Note: The `taskHandlerProxy` and `fetchResponseProxy` utilities are now deprecated in favor of `artinet.v0.taskManager` and `artinet.v0.connect` respectively.*
|
|
502
533
|
|
|
503
534
|
- **Test-Agents (Experimental):** Simulate and test your agents @ agents.artinet.io/test/deploy using the `testDeployment` tool.
|
|
504
535
|
```typescript
|
|
@@ -531,10 +562,10 @@ Key features include:
|
|
|
531
562
|
console.log("Deployment Result:", deploymentResult);
|
|
532
563
|
```
|
|
533
564
|
|
|
534
|
-
- **Dedicated Endpoints:** Once deployed your agent will be available On-Demand at its dedicated enpoint. (e.g. "https://agents.
|
|
535
|
-
- **New Types:** To support these features, new types for server deployment requests and responses (such as `ServerDeploymentRequestParams`, `ServerDeploymentResponse`) have been added to `src/types/extended-schema.ts`.
|
|
565
|
+
- **Dedicated Endpoints:** Once deployed your agent will be available On-Demand at its dedicated enpoint. (e.g. "https://agents.artinet.io/agentId=0xabf698845743538727a81352bfcfdb724e5c2bbe3113a26362482248f9f3e5fa/.well-known/agent.json")
|
|
566
|
+
- **New Types:** To support these features, new types for server deployment requests and responses (such as `ServerDeploymentRequestParams`, `ServerDeploymentResponse`) have been added to `src/types/extended-schema.ts`. New types for sandboxed agent interactions (`TaskProxy`, `ConnectAPICallback`, `ClientProxy`, etc.) are in `src/types/proxy.ts`.
|
|
536
567
|
|
|
537
|
-
|
|
568
|
+
**QUICK-AGENT FAQs**
|
|
538
569
|
- Test-Agents expire after 60s (need more time? let us know @humans@artinet.io)
|
|
539
570
|
- Quick-Agents do not have access to a filesystem or networking (limited persistance & networking capabalities are on the project roadmap).
|
|
540
571
|
- Quick-Agents v0 does not support streaming, push notifications or state transition history (these capabilities are on the project roadmap).
|
package/dist/client/index.js
CHANGED
package/dist/client/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
export * from "./types/index.js";
|
|
2
|
+
export * from "./utils/index.js";
|
|
1
3
|
export * from "./server/index.js";
|
|
2
4
|
export * from "./client/index.js";
|
|
3
5
|
export * from "./transport/index.js";
|
|
4
|
-
export * from "./utils/index.js";
|
|
5
|
-
export * from "./types/index.js";
|
|
6
6
|
//# 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,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC"}
|
package/dist/server/index.js
CHANGED
package/dist/server/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream.js","sourceRoot":"","sources":["../../../src/transport/streaming/stream.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"stream.js","sourceRoot":"","sources":["../../../src/transport/streaming/stream.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EACL,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,E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C;YACxC,GAAG,CAAC,GAAG,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AgentCard, TaskSendParams, TaskQueryParams, TaskIdParams, TaskPushNotificationConfig, Task, TaskArtifactUpdateEvent, TaskStatusUpdateEvent } from "../types/index.js";
|
|
2
|
-
import type { Client } from "
|
|
2
|
+
import type { Client } from "../types/client.js";
|
|
3
3
|
/**
|
|
4
4
|
* A2AClient is the main client class for interacting with Agent2Agent (A2A) protocol-compliant services.
|
|
5
5
|
* It provides methods for sending tasks, retrieving statuses, canceling operations, and handling streaming responses.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a2a-client.d.ts","sourceRoot":"","sources":["../../../src/client/a2a-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EAMT,cAAc,EACd,eAAe,EACf,YAAY,EACZ,0BAA0B,EAM1B,IAAI,EACJ,uBAAuB,EACvB,qBAAqB,EAGtB,MAAM,mBAAmB,CAAC;AAU3B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"a2a-client.d.ts","sourceRoot":"","sources":["../../../src/client/a2a-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EAMT,cAAc,EACd,eAAe,EACf,YAAY,EACZ,0BAA0B,EAM1B,IAAI,EACJ,uBAAuB,EACvB,qBAAqB,EAGtB,MAAM,mBAAmB,CAAC;AAU3B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;;GAGG;AACH,qBAAa,SAAU,YAAW,MAAM;IACtC,OAAO,CAAC,OAAO,CAAM;IACrB,OAAO,CAAC,eAAe,CAA0B;IACjD,OAAO,CAAC,aAAa,CAA8B;IACnD,OAAO,CAAC,YAAY,CAAS;IAC7B;;;;OAIG;gBAED,OAAO,EAAE,GAAG,GAAG,MAAM,EACrB,OAAO,GAA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;OAEG;IACH,YAAY,IAAI,IAAI;CAGrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/types/client.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/types/context.ts"],"names":[],"mappings":""}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
export * from "./types/index.js";
|
|
2
|
+
export * from "./utils/index.js";
|
|
1
3
|
export * from "./server/index.js";
|
|
2
4
|
export * from "./client/index.js";
|
|
3
5
|
export * from "./transport/index.js";
|
|
4
|
-
export * from "./utils/index.js";
|
|
5
|
-
export * from "./types/index.js";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC"}
|
package/dist/types/index.js
CHANGED
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../../src/types/proxy.ts"],"names":[],"mappings":""}
|
|
@@ -3,7 +3,7 @@ import { CorsOptions } from "cors";
|
|
|
3
3
|
import http from "http";
|
|
4
4
|
import type { AgentCard, Task, Message, SendTaskStreamingRequest, TaskResubscriptionRequest } from "../types/index.js";
|
|
5
5
|
import { TaskStore, TaskAndHistory } from "./interfaces/store.js";
|
|
6
|
-
import { TaskHandler, TaskContext } from "
|
|
6
|
+
import { TaskHandler, TaskContext } from "../types/context.js";
|
|
7
7
|
import { A2AServerParams, JSONRPCServerType } from "./interfaces/params.js";
|
|
8
8
|
import { Server } from "./interfaces/server.js";
|
|
9
9
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a2a-server.d.ts","sourceRoot":"","sources":["../../../src/server/a2a-server.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,KAAK,EACV,SAAS,EACT,IAAI,EACJ,OAAO,EACP,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,mBAAmB,CAAC;AAuB3B,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"a2a-server.d.ts","sourceRoot":"","sources":["../../../src/server/a2a-server.ts"],"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,GAAG,IAAI;IAiB/D;;OAEG;WACW,gBAAgB,IAAI,SAAS;IAe3C;;;;;;OAMG;IACI,iBAAiB,CACtB,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,OAAO,EACpB,OAAO,EAAE,OAAO,EAAE,GACjB,WAAW;IASd;;;OAGG;IACI,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CAajD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CorsOptions } from "cors";
|
|
2
2
|
import { A2AResponse, RequestParams, AgentCard, CancelTaskRequest, CancelTaskResponse, GetTaskPushNotificationRequest, GetTaskPushNotificationResponse, GetTaskRequest, GetTaskResponse, Message, SendTaskRequest, SendTaskResponse, SendTaskStreamingRequest, SetTaskPushNotificationRequest, SetTaskPushNotificationResponse, Task, TaskResubscriptionRequest } from "../../types/extended-schema.js";
|
|
3
3
|
import { TaskStore } from "./store.js";
|
|
4
|
-
import { TaskHandler, TaskContext } from "
|
|
4
|
+
import { TaskHandler, TaskContext } from "../../types/context.js";
|
|
5
5
|
import jayson from "jayson";
|
|
6
6
|
import { ErrorHandler } from "../../utils/common/errors.js";
|
|
7
7
|
import { JSONRPCError } from "../../types/extended-schema.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"params.d.ts","sourceRoot":"","sources":["../../../../src/server/interfaces/params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EACL,WAAW,EACX,aAAa,EACb,SAAS,EACT,iBAAiB,EACjB,kBAAkB,EAClB,8BAA8B,EAC9B,+BAA+B,EAC/B,cAAc,EACd,eAAe,EACf,OAAO,EACP,eAAe,EACf,gBAAgB,EAChB,wBAAwB,EACxB,8BAA8B,EAC9B,+BAA+B,EAC/B,IAAI,EACJ,yBAAyB,EAC1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"params.d.ts","sourceRoot":"","sources":["../../../../src/server/interfaces/params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EACL,WAAW,EACX,aAAa,EACb,SAAS,EACT,iBAAiB,EACjB,kBAAkB,EAClB,8BAA8B,EAC9B,+BAA+B,EAC/B,cAAc,EACd,eAAe,EACf,OAAO,EACP,eAAe,EACf,gBAAgB,EAChB,wBAAwB,EACxB,8BAA8B,EAC9B,+BAA+B,EAC/B,IAAI,EACJ,yBAAyB,EAC1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC;AAC9C,eAAO,M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G,IAAI,CACvB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,CAC7C,iBAAiB,CAAC,QAAQ,CAAC,EAC3B,kBAAkB,GAAG,IAAI,CAC1B,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,6BAA6B,GAAG,gBAAgB,CAC1D,8BAA8B,CAAC,QAAQ,CAAC,EACxC,+BAA+B,GAAG,IAAI,CACvC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,6BAA6B,GAAG,gBAAgB,CAC1D,8BAA8B,CAAC,QAAQ,CAAC,EACxC,+BAA+B,GAAG,IAAI,CACvC,CAAC"}
|
|
@@ -3,10 +3,9 @@ import http from "http";
|
|
|
3
3
|
import { CorsOptions } from "cors";
|
|
4
4
|
import { AgentCard, Message, Task, SendTaskStreamingRequest, TaskResubscriptionRequest } from "../../types/index.js";
|
|
5
5
|
import { TaskStore } from "./store.js";
|
|
6
|
-
import { TaskHandler } from "./context.js";
|
|
7
6
|
import { JSONRPCServerType } from "./params.js";
|
|
8
7
|
import { TaskAndHistory } from "./store.js";
|
|
9
|
-
import { TaskContext } from "
|
|
8
|
+
import { TaskContext, TaskHandler } from "../../types/context.js";
|
|
10
9
|
export interface Server {
|
|
11
10
|
start(): express.Express;
|
|
12
11
|
stop(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../src/server/interfaces/server.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAEnC,OAAO,EACL,SAAS,EACT,OAAO,EACP,IAAI,EACJ,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OA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,OAAO,EAAE,GACjB,WAAW,CAAC;IACf,QAAQ,CAAC,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,GAAG,IAAI,CAAC;IACtD,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,GAAG,IAAI,CAAC;IACzD,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,uBAAuB,CACrB,GAAG,EAAE,wBAAwB,EAC7B,GAAG,EAAE,QAAQ,GACZ,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,qBAAqB,CACnB,GAAG,EAAE,yBAAyB,EAC9B,GAAG,EAAE,QAAQ,GACZ,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,gBAAgB,IAAI,SAAS,CAAC;IAC9B,iBAAiB,CACf,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,OAAO,EACpB,OAAO,EAAE,OAAO,EAAE,GACjB,WAAW,CAAC;CAChB"}
|
|
@@ -2,8 +2,7 @@ import { Response } from "express";
|
|
|
2
2
|
import { JSONRPCError } from "../../types/schema.js";
|
|
3
3
|
import { TaskEvent } from "../../types/extended-schema.js";
|
|
4
4
|
import { TaskStore, TaskAndHistory } from "../../server/interfaces/store.js";
|
|
5
|
-
import { TaskContext } from "../../
|
|
6
|
-
import { TaskHandler } from "../../server/interfaces/context.js";
|
|
5
|
+
import { TaskContext, TaskHandler } from "../../types/context.js";
|
|
7
6
|
/**
|
|
8
7
|
* Sets up a Server-Sent Events stream with appropriate headers
|
|
9
8
|
* and initializes tracking for the stream.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../../../src/transport/streaming/stream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAY,YAAY,EAAmB,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../../../src/transport/streaming/stream.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAY,YAAY,EAAmB,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AASlE;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,QAAQ,EACb,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,SAAS,EACxB,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,KAAK,IAAI,GACxD,IAAI,CAeN;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAYnE;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,GAAG,EAAE,QAAQ,EACb,KAAK,EAAE,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,GAC5B,IAAI,CAWN;AAED;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CACrC,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,GAAG,EAAE,QAAQ,EACb,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,WAAW,EACpB,WAAW,EAAE,cAAc,EAC3B,QAAQ,EAAE,CAAC,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,QAAQ,KAAK,OAAO,CAAC,IAAI,CAAC,EAChE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,KAAK,OAAO,CAAC,IAAI,CAAC,GACtD,OAAO,CAAC,IAAI,CAAC,CA+Ef"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TaskPushNotificationConfig, TaskArtifactUpdateEvent, TaskIdParams, Task } from "
|
|
2
|
-
import type { AgentCard, TaskQueryParams, TaskSendParams, TaskStatusUpdateEvent } from "
|
|
1
|
+
import { TaskPushNotificationConfig, TaskArtifactUpdateEvent, TaskIdParams, Task } from "./extended-schema.js";
|
|
2
|
+
import type { AgentCard, TaskQueryParams, TaskSendParams, TaskStatusUpdateEvent } from "./extended-schema.js";
|
|
3
3
|
/**
|
|
4
4
|
* @interface Client
|
|
5
5
|
* @description Defines the standard contract for an A2A (Agent-to-Agent) client implementation.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/types/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACvB,YAAY,EACZ,IAAI,EACL,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EACf,cAAc,EACd,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;GAOG;AACH,MAAM,WAAW,MAAM;IACrB;;;;;;;OAOG;IACH,SAAS,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC;IAEhC;;;;;OAKG;IACH,gBAAgB,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC;IAEvC;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC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|
3
3
|
* Context object provided to the TaskHandler.
|
|
4
4
|
* Contains the information needed for the handler to process the task.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/types/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE3E;;;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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
|
|
@@ -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,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H,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,WAAW,CAAC"}
|
|
@@ -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"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Task,
|
|
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,
|
|
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"}
|
|
@@ -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,OAAO;IACtB,2DAA2D;IAC3D,IAAiB,EAAE,CAgGlB;IAhGD,WAAiB,EAAE;QACjB;;;;;;;;;;;;;;;;WAgBG;QACU,cAAW,GAAgB,KAAK,EAAE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U,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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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
|
-
|
|
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
|
-
|
|
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":"
|
|
1
|
+
{"version":3,"file":"task-wrapper.js","sourceRoot":"","sources":["../../../src/utils/deployment/task-wrapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC;;;;;GAKG;AAEH;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,EACnC,WAE0D,EAC1D,EAAE;IACF,OAAO,MAAM,OAAO,CAAC,EAAE,CAAC,WAAW,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;AACvD,CAAC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,EACrC,OAAe,EACf,QAA6C,EAC5B,EAAE;IACnB,OAAO,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;AAC5D,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artinet/sdk",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
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.
|
|
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,M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AAC;IAElD;;;;;OAKG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,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
|