@agent-vm/agent-portal-sdk 0.0.109

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 (47) hide show
  1. package/LICENSE +21 -0
  2. package/dist/adapter-boundary/index.d.ts +41 -0
  3. package/dist/adapter-boundary/index.d.ts.map +1 -0
  4. package/dist/adapter-boundary/index.js +29 -0
  5. package/dist/adapter-boundary/index.js.map +1 -0
  6. package/dist/approval-surface/index.d.ts +48 -0
  7. package/dist/approval-surface/index.d.ts.map +1 -0
  8. package/dist/approval-surface/index.js +22 -0
  9. package/dist/approval-surface/index.js.map +1 -0
  10. package/dist/artifact-reference-schema-XiJ280uV.js +12 -0
  11. package/dist/artifact-reference-schema-XiJ280uV.js.map +1 -0
  12. package/dist/artifact-surface/index.d.ts +49 -0
  13. package/dist/artifact-surface/index.d.ts.map +1 -0
  14. package/dist/artifact-surface/index.js +27 -0
  15. package/dist/artifact-surface/index.js.map +1 -0
  16. package/dist/capability-description-surface/index.d.ts +142 -0
  17. package/dist/capability-description-surface/index.d.ts.map +1 -0
  18. package/dist/capability-description-surface/index.js +2 -0
  19. package/dist/capability-descriptor-schema-wgtHF0Ic.js +86 -0
  20. package/dist/capability-descriptor-schema-wgtHF0Ic.js.map +1 -0
  21. package/dist/index-DJiaGYF_.d.ts +17 -0
  22. package/dist/index-DJiaGYF_.d.ts.map +1 -0
  23. package/dist/index.d.ts +10 -0
  24. package/dist/index.js +12 -0
  25. package/dist/json-value-schema-Bj42URkc.d.ts +18 -0
  26. package/dist/json-value-schema-Bj42URkc.d.ts.map +1 -0
  27. package/dist/json-value-schema-D-3hfAyL.js +19 -0
  28. package/dist/json-value-schema-D-3hfAyL.js.map +1 -0
  29. package/dist/portal-call-result-schema-BIqFTFK8.js +102 -0
  30. package/dist/portal-call-result-schema-BIqFTFK8.js.map +1 -0
  31. package/dist/portal-call-result-schema-DjpKPcE_.d.ts +1271 -0
  32. package/dist/portal-call-result-schema-DjpKPcE_.d.ts.map +1 -0
  33. package/dist/portal-call-surface/index.d.ts +153 -0
  34. package/dist/portal-call-surface/index.d.ts.map +1 -0
  35. package/dist/portal-call-surface/index.js +69 -0
  36. package/dist/portal-call-surface/index.js.map +1 -0
  37. package/dist/portal-error-schema-D58onG2t.js +61 -0
  38. package/dist/portal-error-schema-D58onG2t.js.map +1 -0
  39. package/dist/portal-event-surface/index.d.ts +229 -0
  40. package/dist/portal-event-surface/index.d.ts.map +1 -0
  41. package/dist/portal-event-surface/index.js +51 -0
  42. package/dist/portal-event-surface/index.js.map +1 -0
  43. package/dist/testing/index.d.ts +20 -0
  44. package/dist/testing/index.d.ts.map +1 -0
  45. package/dist/testing/index.js +27 -0
  46. package/dist/testing/index.js.map +1 -0
  47. package/package.json +71 -0
@@ -0,0 +1,27 @@
1
+ import { g as PortalCallRequestSchema, n as PortalCallResultSchema } from "../portal-call-result-schema-BIqFTFK8.js";
2
+ //#region src/testing/index.ts
3
+ function createPortalCallRequestFixture(props = {}) {
4
+ return PortalCallRequestSchema.parse({
5
+ calls: [{
6
+ arguments: props.arguments ?? {},
7
+ id: props.id ?? "call-1",
8
+ namespace: props.namespace ?? "github",
9
+ name: props.name ?? "get_issue"
10
+ }],
11
+ requestId: props.requestId
12
+ });
13
+ }
14
+ function createPortalCallResultFixture(props = {}) {
15
+ return PortalCallResultSchema.parse({
16
+ items: [{
17
+ id: props.id ?? "call-1",
18
+ status: "ok",
19
+ value: props.value ?? {}
20
+ }],
21
+ ok: true
22
+ });
23
+ }
24
+ //#endregion
25
+ export { createPortalCallRequestFixture, createPortalCallResultFixture };
26
+
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/testing/index.ts"],"sourcesContent":["import type { JsonObject, JsonValue } from '../contract-primitives/index.js';\nimport {\n\tPortalCallRequestSchema,\n\ttype PortalCallRequest,\n} from '../portal-call-surface/models/portal-call-request-schema.js';\nimport {\n\tPortalCallResultSchema,\n\ttype PortalCallResult,\n} from '../portal-call-surface/models/portal-call-result-schema.js';\n\nexport interface CreatePortalCallRequestFixtureProps {\n\treadonly arguments?: JsonObject;\n\treadonly id?: string;\n\treadonly namespace?: string;\n\treadonly requestId?: string;\n\treadonly name?: string;\n}\n\nexport interface CreatePortalCallResultFixtureProps {\n\treadonly id?: string;\n\treadonly value?: JsonValue;\n}\n\nexport function createPortalCallRequestFixture(\n\tprops: CreatePortalCallRequestFixtureProps = {},\n): PortalCallRequest {\n\treturn PortalCallRequestSchema.parse({\n\t\tcalls: [\n\t\t\t{\n\t\t\t\targuments: props.arguments ?? {},\n\t\t\t\tid: props.id ?? 'call-1',\n\t\t\t\tnamespace: props.namespace ?? 'github',\n\t\t\t\tname: props.name ?? 'get_issue',\n\t\t\t},\n\t\t],\n\t\trequestId: props.requestId,\n\t});\n}\n\nexport function createPortalCallResultFixture(\n\tprops: CreatePortalCallResultFixtureProps = {},\n): PortalCallResult {\n\treturn PortalCallResultSchema.parse({\n\t\titems: [\n\t\t\t{\n\t\t\t\tid: props.id ?? 'call-1',\n\t\t\t\tstatus: 'ok',\n\t\t\t\tvalue: props.value ?? {},\n\t\t\t},\n\t\t],\n\t\tok: true,\n\t});\n}\n"],"mappings":";;AAuBA,SAAgB,+BACf,QAA6C,EAAE,EAC3B;CACpB,OAAO,wBAAwB,MAAM;EACpC,OAAO,CACN;GACC,WAAW,MAAM,aAAa,EAAE;GAChC,IAAI,MAAM,MAAM;GAChB,WAAW,MAAM,aAAa;GAC9B,MAAM,MAAM,QAAQ;GACpB,CACD;EACD,WAAW,MAAM;EACjB,CAAC;;AAGH,SAAgB,8BACf,QAA4C,EAAE,EAC3B;CACnB,OAAO,uBAAuB,MAAM;EACnC,OAAO,CACN;GACC,IAAI,MAAM,MAAM;GAChB,QAAQ;GACR,OAAO,MAAM,SAAS,EAAE;GACxB,CACD;EACD,IAAI;EACJ,CAAC"}
package/package.json ADDED
@@ -0,0 +1,71 @@
1
+ {
2
+ "name": "@agent-vm/agent-portal-sdk",
3
+ "version": "0.0.109",
4
+ "description": "Portal-neutral Zod contracts and helpers for agent-facing capability surfaces.",
5
+ "homepage": "https://github.com/ShravanSunder/agent-vm#readme",
6
+ "bugs": {
7
+ "url": "https://github.com/ShravanSunder/agent-vm/issues"
8
+ },
9
+ "license": "MIT",
10
+ "author": "Shravan Sunder <ShravanSunder@users.noreply.github.com>",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/ShravanSunder/agent-vm.git",
14
+ "directory": "packages/agent-portal-sdk"
15
+ },
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "type": "module",
20
+ "main": "./dist/index.js",
21
+ "types": "./dist/index.d.ts",
22
+ "exports": {
23
+ ".": {
24
+ "types": "./dist/index.d.ts",
25
+ "import": "./dist/index.js"
26
+ },
27
+ "./adapter-boundary": {
28
+ "types": "./dist/adapter-boundary/index.d.ts",
29
+ "import": "./dist/adapter-boundary/index.js"
30
+ },
31
+ "./approval-surface": {
32
+ "types": "./dist/approval-surface/index.d.ts",
33
+ "import": "./dist/approval-surface/index.js"
34
+ },
35
+ "./artifact-surface": {
36
+ "types": "./dist/artifact-surface/index.d.ts",
37
+ "import": "./dist/artifact-surface/index.js"
38
+ },
39
+ "./capability-description-surface": {
40
+ "types": "./dist/capability-description-surface/index.d.ts",
41
+ "import": "./dist/capability-description-surface/index.js"
42
+ },
43
+ "./portal-call-surface": {
44
+ "types": "./dist/portal-call-surface/index.d.ts",
45
+ "import": "./dist/portal-call-surface/index.js"
46
+ },
47
+ "./portal-event-surface": {
48
+ "types": "./dist/portal-event-surface/index.d.ts",
49
+ "import": "./dist/portal-event-surface/index.js"
50
+ },
51
+ "./testing": {
52
+ "types": "./dist/testing/index.d.ts",
53
+ "import": "./dist/testing/index.js"
54
+ }
55
+ },
56
+ "publishConfig": {
57
+ "access": "public"
58
+ },
59
+ "dependencies": {
60
+ "zod": "^4.4.3"
61
+ },
62
+ "devDependencies": {
63
+ "vitest": "^4.1.5"
64
+ },
65
+ "scripts": {
66
+ "build": "tsdown",
67
+ "typecheck": "tsc -p tsconfig.json --noEmit",
68
+ "test": "pnpm test:unit",
69
+ "test:unit": "vitest run --root ../../ --config vitest.config.ts --project unit packages/agent-portal-sdk/src"
70
+ }
71
+ }