@microsoft/teams.a2a 2.0.0-preview.10

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 (44) hide show
  1. package/README.md +180 -0
  2. package/dist/chat-prompt/plugin.d.ts +24 -0
  3. package/dist/chat-prompt/plugin.js +156 -0
  4. package/dist/chat-prompt/types.d.ts +60 -0
  5. package/dist/chat-prompt/types.js +3 -0
  6. package/dist/client/agent-client.d.ts +58 -0
  7. package/dist/client/agent-client.js +177 -0
  8. package/dist/client/agent-manager.d.ts +57 -0
  9. package/dist/client/agent-manager.js +136 -0
  10. package/dist/client/agent-task-store.d.ts +25 -0
  11. package/dist/client/agent-task-store.js +47 -0
  12. package/dist/common/schema.d.ts +728 -0
  13. package/dist/common/schema.js +26 -0
  14. package/dist/common/type-utils.d.ts +11 -0
  15. package/dist/common/type-utils.js +3 -0
  16. package/dist/common/uuid.d.ts +1 -0
  17. package/dist/common/uuid.js +12 -0
  18. package/dist/index.d.ts +10 -0
  19. package/dist/index.js +50 -0
  20. package/dist/server/middleware/isTaskRequest.d.ts +2 -0
  21. package/dist/server/middleware/isTaskRequest.js +32 -0
  22. package/dist/server/plugin.d.ts +49 -0
  23. package/dist/server/plugin.js +130 -0
  24. package/dist/server/plugin.on-get-request.d.ts +3 -0
  25. package/dist/server/plugin.on-get-request.js +17 -0
  26. package/dist/server/plugin.on-send-request.d.ts +9 -0
  27. package/dist/server/plugin.on-send-request.js +107 -0
  28. package/dist/server/serverUtils.d.ts +13 -0
  29. package/dist/server/serverUtils.js +65 -0
  30. package/dist/server/tasks/task-manager.d.ts +22 -0
  31. package/dist/server/tasks/task-manager.js +205 -0
  32. package/dist/server/tasks/task-store.d.ts +8 -0
  33. package/dist/server/tasks/task-store.js +18 -0
  34. package/dist/server/tasks/task-utilities.d.ts +27 -0
  35. package/dist/server/tasks/task-utilities.js +139 -0
  36. package/dist/server/tasks/task-utils.d.ts +22 -0
  37. package/dist/server/tasks/task-utils.js +38 -0
  38. package/dist/server/types/a2a-error.d.ts +23 -0
  39. package/dist/server/types/a2a-error.js +95 -0
  40. package/dist/server/types/a2a-types.d.ts +56 -0
  41. package/dist/server/types/a2a-types.js +3 -0
  42. package/dist/server/types/event-types.d.ts +24 -0
  43. package/dist/server/types/event-types.js +3 -0
  44. package/package.json +49 -0
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYTJhLXR5cGVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3NlcnZlci90eXBlcy9hMmEtdHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
@@ -0,0 +1,24 @@
1
+ import * as schema from '../../common/schema';
2
+ import { TaskContext, TaskUpdate } from './a2a-types';
3
+ export type Respond = (taskUpdate: TaskUpdate | string) => Promise<void>;
4
+ export type AccumulateArtifacts = (artifact: schema.Artifact | schema.Artifact[]) => Promise<void>;
5
+ export type A2AEvents = {
6
+ 'a2a:message': {
7
+ /**
8
+ * The context of the task
9
+ */
10
+ taskContext: TaskContext;
11
+ /**
12
+ * Function to respond to the task.
13
+ * This function must be called once to indicate
14
+ * that the task is handled.
15
+ */
16
+ respond: Respond;
17
+ /**
18
+ * Function to accumulate artifacts.
19
+ * This function can be called multiple times to accumulate
20
+ * artifacts.
21
+ */
22
+ accumulateArtifacts: AccumulateArtifacts;
23
+ };
24
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnQtdHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvc2VydmVyL3R5cGVzL2V2ZW50LXR5cGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@microsoft/teams.a2a",
3
+ "version": "2.0.0-preview.10",
4
+ "license": "MIT",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.mjs",
7
+ "types": "./dist/index.d.ts",
8
+ "homepage": "https://github.com/microsoft/teams.ts",
9
+ "bugs": "https://github.com/microsoft/teams.ts/issues",
10
+ "files": [
11
+ "dist",
12
+ "README.md"
13
+ ],
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "https://github.com/microsoft/teams.ts.git",
17
+ "directory": "packages/a2a"
18
+ },
19
+ "keywords": [
20
+ "microsoft",
21
+ "teams",
22
+ "msteams"
23
+ ],
24
+ "scripts": {
25
+ "clean": "npx rimraf ./dist",
26
+ "build": "npx tsc",
27
+ "test": "npx jest",
28
+ "lint": "npx eslint",
29
+ "lint:fix": "npx eslint --fix"
30
+ },
31
+ "peerDependencies": {
32
+ "@microsoft/teams.ai": "2.0.0-preview.10",
33
+ "@microsoft/teams.apps": "2.0.0-preview.10",
34
+ "@microsoft/teams.common": "2.0.0-preview.10"
35
+ },
36
+ "devDependencies": {
37
+ "@microsoft/teams.config": "2.0.0-preview.10",
38
+ "@types/jest": "^29.5.12",
39
+ "@types/lodash.camelcase": "^4.3.9",
40
+ "@types/node": "^22.0.2",
41
+ "jest": "^29.7.0",
42
+ "rimraf": "^6.0.1",
43
+ "ts-jest": "^29.2.5",
44
+ "typescript": "^5.4.5"
45
+ },
46
+ "dependencies": {
47
+ "lodash.camelcase": "^4.3.0"
48
+ }
49
+ }