gbz185-sdk 0.1.0

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 (86) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/LICENSE +21 -0
  3. package/README.md +192 -0
  4. package/dist/agent-maintenance.d.ts +35 -0
  5. package/dist/agent-maintenance.d.ts.map +1 -0
  6. package/dist/agent-maintenance.js +107 -0
  7. package/dist/agent-maintenance.js.map +1 -0
  8. package/dist/authorization.d.ts +32 -0
  9. package/dist/authorization.d.ts.map +1 -0
  10. package/dist/authorization.js +37 -0
  11. package/dist/authorization.js.map +1 -0
  12. package/dist/client.d.ts +39 -0
  13. package/dist/client.d.ts.map +1 -0
  14. package/dist/client.js +70 -0
  15. package/dist/client.js.map +1 -0
  16. package/dist/conformance.d.ts +11 -0
  17. package/dist/conformance.d.ts.map +1 -0
  18. package/dist/conformance.js +195 -0
  19. package/dist/conformance.js.map +1 -0
  20. package/dist/credentials.d.ts +124 -0
  21. package/dist/credentials.d.ts.map +1 -0
  22. package/dist/credentials.js +209 -0
  23. package/dist/credentials.js.map +1 -0
  24. package/dist/description-registry.d.ts +66 -0
  25. package/dist/description-registry.d.ts.map +1 -0
  26. package/dist/description-registry.js +137 -0
  27. package/dist/description-registry.js.map +1 -0
  28. package/dist/discovery.d.ts +14 -0
  29. package/dist/discovery.d.ts.map +1 -0
  30. package/dist/discovery.js +105 -0
  31. package/dist/discovery.js.map +1 -0
  32. package/dist/factory.d.ts +34 -0
  33. package/dist/factory.d.ts.map +1 -0
  34. package/dist/factory.js +98 -0
  35. package/dist/factory.js.map +1 -0
  36. package/dist/functional-architecture.d.ts +18 -0
  37. package/dist/functional-architecture.d.ts.map +1 -0
  38. package/dist/functional-architecture.js +159 -0
  39. package/dist/functional-architecture.js.map +1 -0
  40. package/dist/identity-code.d.ts +8 -0
  41. package/dist/identity-code.d.ts.map +1 -0
  42. package/dist/identity-code.js +76 -0
  43. package/dist/identity-code.js.map +1 -0
  44. package/dist/identity-registry.d.ts +68 -0
  45. package/dist/identity-registry.d.ts.map +1 -0
  46. package/dist/identity-registry.js +155 -0
  47. package/dist/identity-registry.js.map +1 -0
  48. package/dist/index.d.ts +19 -0
  49. package/dist/index.d.ts.map +1 -0
  50. package/dist/index.js +19 -0
  51. package/dist/index.js.map +1 -0
  52. package/dist/interaction.d.ts +41 -0
  53. package/dist/interaction.d.ts.map +1 -0
  54. package/dist/interaction.js +95 -0
  55. package/dist/interaction.js.map +1 -0
  56. package/dist/message-distribution.d.ts +18 -0
  57. package/dist/message-distribution.d.ts.map +1 -0
  58. package/dist/message-distribution.js +35 -0
  59. package/dist/message-distribution.js.map +1 -0
  60. package/dist/tool-access.d.ts +16 -0
  61. package/dist/tool-access.d.ts.map +1 -0
  62. package/dist/tool-access.js +30 -0
  63. package/dist/tool-access.js.map +1 -0
  64. package/dist/tools.d.ts +18 -0
  65. package/dist/tools.d.ts.map +1 -0
  66. package/dist/tools.js +77 -0
  67. package/dist/tools.js.map +1 -0
  68. package/dist/transport.d.ts +21 -0
  69. package/dist/transport.d.ts.map +1 -0
  70. package/dist/transport.js +36 -0
  71. package/dist/transport.js.map +1 -0
  72. package/dist/types.d.ts +165 -0
  73. package/dist/types.d.ts.map +1 -0
  74. package/dist/types.js +2 -0
  75. package/dist/types.js.map +1 -0
  76. package/dist/validation.d.ts +12 -0
  77. package/dist/validation.d.ts.map +1 -0
  78. package/dist/validation.js +94 -0
  79. package/dist/validation.js.map +1 -0
  80. package/docs/API_REFERENCE.md +116 -0
  81. package/docs/CONFORMANCE.md +96 -0
  82. package/docs/GITHUB_PAGES.md +54 -0
  83. package/docs/NPM_RELEASE.md +107 -0
  84. package/docs/SDK_GUIDE.md +439 -0
  85. package/examples/calendar.ts +105 -0
  86. package/package.json +60 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,12 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0 - 2026-06-26
4
+
5
+ Initial public SDK release preparation.
6
+
7
+ - Added GB/Z 185.1-185.7 TypeScript models, validators, constants, and reference runtime coverage.
8
+ - Added identity-code helpers for the `1.2.156.3088` OID structure.
9
+ - Added identity account, development credential, X.509-first verification, description, discovery, interaction, message distribution, and tool runtimes.
10
+ - Added pluggable `JsonTransport`, in-process transport, and HTTP JSON transport boundary.
11
+ - Added calendar smoke example and GB/Z 185 conformance matrix.
12
+ - Added developer documentation site and npm package release metadata.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 IchenDEV
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,192 @@
1
+ # GB/Z 185 Agent Interconnect SDK
2
+
3
+ TypeScript SDK and reference runtime for the GB/Z 185-2026 "Artificial intelligence - Agent interconnection" guidance documents.
4
+
5
+ This package is intentionally transport-neutral. It models the standard objects and flows as JSON-friendly TypeScript APIs, then exposes them through a pluggable `JsonTransport` interface. The default runtime is in-process and memory-backed so it can be used for development, tests, and protocol experiments.
6
+
7
+ The SDK exposes every function domain listed in the GB/Z 185.1 reference architecture: identity maintenance, description maintenance, interconnection authorization, interaction, tool access, identity management, credential management, identity authentication, description management, discovery, message distribution, and tool service.
8
+
9
+ ## What Is Included
10
+
11
+ - Identity code helpers for the GB/Z 185.2 OID structure:
12
+ - fixed prefix `1.2.156.3088`
13
+ - version `1`
14
+ - registration service provider
15
+ - registration requester
16
+ - ontology serial
17
+ - instance serial
18
+ - X.509-first identity interfaces:
19
+ - certificate chain verifier interface
20
+ - credential status store
21
+ - process credential package
22
+ - authentication assertion
23
+ - development Ed25519 implementation for local tests
24
+ - In-memory reference runtimes:
25
+ - `AgentIdentityMaintenance`
26
+ - `AgentDescriptionMaintenance`
27
+ - `InterconnectionAuthorizationRuntime`
28
+ - `IdentityRegistryRuntime`
29
+ - `AgentDescriptionRegistry`
30
+ - `DiscoveryService`
31
+ - `InteractionRuntime`
32
+ - `MessageDistributionRuntime`
33
+ - `ToolAccessRuntime`
34
+ - `ToolRuntime`
35
+ - Client and transport:
36
+ - `JsonTransport`
37
+ - `InProcessJsonTransport`
38
+ - `HttpJsonTransport`
39
+ - `AgentInterconnectClient`
40
+
41
+ ## Install
42
+
43
+ ```bash
44
+ # npm
45
+ npm install gbz185-sdk
46
+
47
+ # pnpm
48
+ pnpm add gbz185-sdk
49
+
50
+ # yarn
51
+ yarn add gbz185-sdk
52
+ ```
53
+
54
+ The package is ESM-only and requires Node.js `>=20`.
55
+
56
+ ## Develop And Verify
57
+
58
+ ```bash
59
+ git clone https://github.com/IchenDEV/gbz185-sdk.git
60
+ cd gbz185-sdk
61
+ pnpm install
62
+ pnpm typecheck
63
+ pnpm test
64
+ pnpm build
65
+ pnpm example:calendar
66
+ pnpm pack:check
67
+ ```
68
+
69
+ ## Documentation
70
+
71
+ - Canonical developer documentation: https://blogs.idevlab.dev/gbz185-sdk/
72
+ - SDK guide: [`docs/SDK_GUIDE.md`](docs/SDK_GUIDE.md)
73
+ - API reference: [`docs/API_REFERENCE.md`](docs/API_REFERENCE.md)
74
+ - GB/Z 185 conformance matrix: [`docs/CONFORMANCE.md`](docs/CONFORMANCE.md)
75
+ - npm release checklist: [`docs/NPM_RELEASE.md`](docs/NPM_RELEASE.md)
76
+ - GitHub Pages deployment notes: [`docs/GITHUB_PAGES.md`](docs/GITHUB_PAGES.md)
77
+
78
+ ## Quick Start
79
+
80
+ ```ts
81
+ import {
82
+ createAgentInterconnectRuntime,
83
+ formatIdentityCode
84
+ } from "gbz185-sdk";
85
+
86
+ const runtime = createAgentInterconnectRuntime();
87
+
88
+ const requesterId = formatIdentityCode({
89
+ registrationServiceProvider: "A1",
90
+ registrationRequester: "REQ001",
91
+ ontologySerial: "ASSISTANT",
92
+ instanceSerial: "1"
93
+ });
94
+
95
+ const registration = await runtime.client.registerIdentity({
96
+ delegatorId: "example-org",
97
+ subject: "Calendar Agent",
98
+ registrationServiceProvider: "A1",
99
+ registrationRequester: "REQ001",
100
+ ontologySerial: "CALENDAR",
101
+ instanceSerial: "1",
102
+ issueCredential: true,
103
+ credentialAudience: [requesterId],
104
+ credentialScope: ["agent:interact", "tool:invoke"]
105
+ });
106
+
107
+ await runtime.client.registerDescription({
108
+ agentId: registration.account.id,
109
+ name: "Calendar Agent",
110
+ version: "1.0.0",
111
+ description: "Creates calendar events",
112
+ provider: "Example Org",
113
+ capabilities: { asyncMessages: true },
114
+ defaultInputTypes: ["text", "json"],
115
+ defaultOutputTypes: ["json"],
116
+ skills: [
117
+ {
118
+ skillId: "schedule.add",
119
+ skillName: "add_schedule",
120
+ skillDescription: "Add one calendar schedule item",
121
+ tags: ["calendar", "schedule"],
122
+ inputTypes: ["text", "json"],
123
+ outputTypes: ["json"]
124
+ }
125
+ ]
126
+ });
127
+ await runtime.client.publishDescription(registration.account.id);
128
+
129
+ const matches = await runtime.client.discover({
130
+ text: "calendar schedule",
131
+ requiredSkills: ["schedule.add"]
132
+ });
133
+ ```
134
+
135
+ See `examples/calendar.ts` for a full register -> publish -> discover -> interact -> tool invocation flow.
136
+
137
+ For a fuller API and runtime guide, see [`docs/SDK_GUIDE.md`](docs/SDK_GUIDE.md). For the national-standard coverage check, see [`docs/CONFORMANCE.md`](docs/CONFORMANCE.md).
138
+
139
+ ## GB/Z 185 Function Coverage
140
+
141
+ The exported `GBZ185_FUNCTIONS` and `GBZ185_FRAI_INTERFACES` constants provide a machine-readable coverage map for the national-standard function domains and FRAI interfaces.
142
+
143
+ | Function Domain | SDK Surface |
144
+ | --- | --- |
145
+ | Agent identity maintenance | `AgentIdentityMaintenance` |
146
+ | Agent description maintenance | `AgentDescriptionMaintenance` |
147
+ | Agent interconnection authorization | `InterconnectionAuthorizationRuntime` |
148
+ | Agent interaction | `InteractionRuntime` |
149
+ | Tool access | `ToolAccessRuntime` |
150
+ | Identity management | `IdentityRegistryRuntime` |
151
+ | Credential management | `CredentialIssuer` |
152
+ | Identity authentication | `CredentialVerifier` |
153
+ | Description management | `AgentDescriptionRegistry` |
154
+ | Agent discovery | `DiscoveryService` |
155
+ | Message distribution | `MessageDistributionRuntime` |
156
+ | Tool service | `ToolRuntime` |
157
+
158
+ ## Standard Mapping
159
+
160
+ - GB/Z 185.1: domain/runtime composition through `createAgentInterconnectRuntime`.
161
+ - GB/Z 185.2: identity code parse/format/validation helpers.
162
+ - GB/Z 185.3: identity accounts, credentials, process credential packages, assertions.
163
+ - GB/Z 185.4: `AgentDescription` and `SkillDescription`.
164
+ - GB/Z 185.5: discovery service and preset discovery source.
165
+ - GB/Z 185.6: session/task/message/data interaction model.
166
+ - GB/Z 185.7: tool descriptor, tool list sync, tool update, tool invocation result model.
167
+
168
+ ## Security Boundary
169
+
170
+ The credential implementation is a development reference. It follows the GB/Z 185 identity-management shape and keeps X.509 certificate chain verification as a first-class interface, but it does not claim production compliance with any national CA, GM/T algorithm suite, or regulator-specific certificate policy.
171
+
172
+ For production use, replace:
173
+
174
+ - `CertificateChainVerifier`
175
+ - `CredentialStatusStore`
176
+ - `CredentialIssuer`
177
+ - `CredentialVerifier`
178
+ - in-memory repositories
179
+
180
+ with implementations backed by your CA, certificate status service, key custody model, audit log, and persistence layer.
181
+
182
+ ## Transport Boundary
183
+
184
+ The SDK does not prescribe HTTP paths, WebSocket messages, or MCP method names. All client calls go through:
185
+
186
+ ```ts
187
+ interface JsonTransport {
188
+ request<TRequest, TResponse>(operation: string, payload: TRequest): Promise<TResponse>;
189
+ }
190
+ ```
191
+
192
+ Use `InProcessJsonTransport` for tests and local runtimes. Use `HttpJsonTransport` or a custom adapter when you want to bind the operations to a network protocol.
@@ -0,0 +1,35 @@
1
+ import type { CredentialIssuer, IssuedCredential } from "./credentials.js";
2
+ import type { AgentDescriptionRegistry, DescriptionRecord, PublicationRequestInfo } from "./description-registry.js";
3
+ import type { IdentityAccount, IdentityRegistryRuntime, RegisterIdentityInput, RegisterIdentityResult } from "./identity-registry.js";
4
+ import type { AgentDescription, AgentIdentityCode } from "./types.js";
5
+ export declare class AgentIdentityMaintenance {
6
+ private readonly registry;
7
+ private readonly credentialIssuer?;
8
+ private activeAccount;
9
+ private credentials;
10
+ constructor(registry: IdentityRegistryRuntime, credentialIssuer?: CredentialIssuer | undefined);
11
+ get identityCode(): AgentIdentityCode | undefined;
12
+ listCredentials(): IssuedCredential[];
13
+ register(input: RegisterIdentityInput): Promise<RegisterIdentityResult>;
14
+ refresh(): Promise<IdentityAccount | undefined>;
15
+ update(patch: Parameters<IdentityRegistryRuntime["update"]>[1]): Promise<IdentityAccount>;
16
+ issueCredential(input: Omit<Parameters<IdentityRegistryRuntime["issueCredential"]>[1], "agentId">): Promise<IssuedCredential>;
17
+ lock(reason?: string): Promise<IdentityAccount>;
18
+ unlock(reason?: string): Promise<IdentityAccount>;
19
+ revoke(reason?: string): Promise<IdentityAccount>;
20
+ lockCredential(credentialId: string, reason?: string): Promise<void>;
21
+ unlockCredential(credentialId: string, reason?: string): Promise<void>;
22
+ revokeCredential(credentialId: string, reason?: string): Promise<void>;
23
+ private requireAccount;
24
+ }
25
+ export declare class AgentDescriptionMaintenance {
26
+ private readonly registry;
27
+ constructor(registry: AgentDescriptionRegistry);
28
+ register(description: AgentDescription): Promise<DescriptionRecord>;
29
+ requestReview(agentId: AgentIdentityCode, reviewerId: string, approved: boolean, reason?: string): Promise<DescriptionRecord>;
30
+ publish(agentId: AgentIdentityCode, publication?: PublicationRequestInfo): Promise<DescriptionRecord>;
31
+ change(agentId: AgentIdentityCode, patch: Partial<AgentDescription>): Promise<DescriptionRecord>;
32
+ unpublish(agentId: AgentIdentityCode): Promise<DescriptionRecord>;
33
+ revoke(agentId: AgentIdentityCode, reason?: string): Promise<DescriptionRecord>;
34
+ }
35
+ //# sourceMappingURL=agent-maintenance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-maintenance.d.ts","sourceRoot":"","sources":["../src/agent-maintenance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,KAAK,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACrH,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACtI,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEtE,qBAAa,wBAAwB;IAKjC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IALpC,OAAO,CAAC,aAAa,CAA8B;IACnD,OAAO,CAAC,WAAW,CAAuC;gBAGvC,QAAQ,EAAE,uBAAuB,EACjC,gBAAgB,CAAC,EAAE,gBAAgB,YAAA;IAGtD,IAAI,YAAY,IAAI,iBAAiB,GAAG,SAAS,CAEhD;IAED,eAAe,IAAI,gBAAgB,EAAE;IAI/B,QAAQ,CAAC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AAO,CAAC,iBAAiB,CAAC;IAI7H,OAAO,CAAC,OAAO,EAAE,iBAAiB,EAAE,WAAW,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAIrG,MAAM,CAAC,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAIhG,SAAS,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAIjE,MAAM,CAAC,OAAO,EAAE,iBAAiB,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAGtF"}
@@ -0,0 +1,107 @@
1
+ export class AgentIdentityMaintenance {
2
+ registry;
3
+ credentialIssuer;
4
+ activeAccount;
5
+ credentials = new Map();
6
+ constructor(registry, credentialIssuer) {
7
+ this.registry = registry;
8
+ this.credentialIssuer = credentialIssuer;
9
+ }
10
+ get identityCode() {
11
+ return this.activeAccount?.id;
12
+ }
13
+ listCredentials() {
14
+ return [...this.credentials.values()];
15
+ }
16
+ async register(input) {
17
+ const result = await this.registry.register(input);
18
+ this.activeAccount = result.account;
19
+ if (result.issuedCredential) {
20
+ this.credentials.set(result.issuedCredential.credential.credentialId, result.issuedCredential);
21
+ }
22
+ return result;
23
+ }
24
+ async refresh() {
25
+ if (!this.activeAccount) {
26
+ return undefined;
27
+ }
28
+ this.activeAccount = await this.registry.get(this.activeAccount.id);
29
+ return this.activeAccount;
30
+ }
31
+ async update(patch) {
32
+ const account = this.requireAccount();
33
+ this.activeAccount = await this.registry.update(account.id, patch);
34
+ return this.activeAccount;
35
+ }
36
+ async issueCredential(input) {
37
+ const account = this.requireAccount();
38
+ const issued = await this.registry.issueCredential(account.id, input);
39
+ this.credentials.set(issued.credential.credentialId, issued);
40
+ await this.refresh();
41
+ return issued;
42
+ }
43
+ async lock(reason) {
44
+ const account = this.requireAccount();
45
+ this.activeAccount = await this.registry.lock(account.id, reason);
46
+ return this.activeAccount;
47
+ }
48
+ async unlock(reason) {
49
+ const account = this.requireAccount();
50
+ this.activeAccount = await this.registry.unlock(account.id, reason);
51
+ return this.activeAccount;
52
+ }
53
+ async revoke(reason) {
54
+ const account = this.requireAccount();
55
+ this.activeAccount = await this.registry.revoke(account.id, reason);
56
+ return this.activeAccount;
57
+ }
58
+ async lockCredential(credentialId, reason) {
59
+ if (!this.credentialIssuer) {
60
+ throw new Error("No credential issuer configured");
61
+ }
62
+ await this.credentialIssuer.lockCredential(credentialId, reason);
63
+ }
64
+ async unlockCredential(credentialId, reason) {
65
+ if (!this.credentialIssuer) {
66
+ throw new Error("No credential issuer configured");
67
+ }
68
+ await this.credentialIssuer.unlockCredential(credentialId, reason);
69
+ }
70
+ async revokeCredential(credentialId, reason) {
71
+ if (!this.credentialIssuer) {
72
+ throw new Error("No credential issuer configured");
73
+ }
74
+ await this.credentialIssuer.revokeCredential(credentialId, reason);
75
+ }
76
+ requireAccount() {
77
+ if (!this.activeAccount) {
78
+ throw new Error("Agent identity has not been registered");
79
+ }
80
+ return this.activeAccount;
81
+ }
82
+ }
83
+ export class AgentDescriptionMaintenance {
84
+ registry;
85
+ constructor(registry) {
86
+ this.registry = registry;
87
+ }
88
+ async register(description) {
89
+ return this.registry.register(description);
90
+ }
91
+ async requestReview(agentId, reviewerId, approved, reason) {
92
+ return this.registry.review(agentId, { reviewerId, approved, reason });
93
+ }
94
+ async publish(agentId, publication) {
95
+ return this.registry.publish(agentId, publication);
96
+ }
97
+ async change(agentId, patch) {
98
+ return this.registry.change(agentId, patch);
99
+ }
100
+ async unpublish(agentId) {
101
+ return this.registry.unpublish(agentId);
102
+ }
103
+ async revoke(agentId, reason) {
104
+ return this.registry.revoke(agentId, reason);
105
+ }
106
+ }
107
+ //# sourceMappingURL=agent-maintenance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-maintenance.js","sourceRoot":"","sources":["../src/agent-maintenance.ts"],"names":[],"mappings":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e;QACpG,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;IACzE,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,OAA0B,EAAE,WAAoC;QAC5E,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IACrD,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAA0B,EAAE,KAAgC;QACvE,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC9C,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,OAA0B;QACxC,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAA0B,EAAE,MAAe;QACtD,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC/C,CAAC;CACF"}
@@ -0,0 +1,32 @@
1
+ import { type AuthenticationAssertion, type CredentialVerifier, type CreatePresentationInput, type ProcessCredentialPackage } from "./credentials.js";
2
+ import type { JsonObject } from "./types.js";
3
+ export interface AuthorizationPolicy {
4
+ expectedAudience: string;
5
+ requiredScope?: string[] | undefined;
6
+ allowNeedsMoreVerification?: boolean | undefined;
7
+ metadata?: JsonObject | undefined;
8
+ }
9
+ export interface AuthorizationDecision {
10
+ allowed: boolean;
11
+ assertion: AuthenticationAssertion;
12
+ reason?: string | undefined;
13
+ }
14
+ export interface MutualAuthenticationResult {
15
+ requester: AuthorizationDecision;
16
+ service: AuthorizationDecision;
17
+ allowed: boolean;
18
+ }
19
+ export declare class InterconnectionAuthorizationRuntime {
20
+ private readonly verifier;
21
+ constructor(verifier: CredentialVerifier);
22
+ createPresentation(input: CreatePresentationInput): ProcessCredentialPackage;
23
+ authenticatePeer(pkg: ProcessCredentialPackage, policy: AuthorizationPolicy): Promise<AuthorizationDecision>;
24
+ authorizeAssertion(assertion: AuthenticationAssertion, policy: AuthorizationPolicy): AuthorizationDecision;
25
+ mutualAuthenticate(input: {
26
+ requesterPackage: ProcessCredentialPackage;
27
+ requesterPolicy: AuthorizationPolicy;
28
+ servicePackage: ProcessCredentialPackage;
29
+ servicePolicy: AuthorizationPolicy;
30
+ }): Promise<MutualAuthenticationResult>;
31
+ }
32
+ //# sourceMappingURL=authorization.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authorization.d.ts","sourceRoot":"","sources":["../src/authorization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,uBAAuB,EAAE,KAAK,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,KAAK,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACtL,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,WAAW,mBAAmB;IAClC,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACrC,0BAA0B,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjD,QAAQ,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;CACnC;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,uBAAuB,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B;AAED,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,qBAAqB,CAAC;IACjC,OAAO,EAAE,qBAAqB,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,qBAAa,mCAAmC;IAClC,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,kBAAkB;IAEzD,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,wBAAwB;IAItE,gBAAgB,CAAC,GAAG,EAAE,wBAAwB,EAAE,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IASlH,kBAAkB,CAAC,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAE,mBAAmB,GAAG,qBAAqB;IAUpG,kBAAkB,CAAC,KAAK,EAAE;QAC9B,gBAAgB,EAAE,wBAAwB,CAAC;QAC3C,eAAe,EAAE,mBAAmB,CAAC;QACrC,cAAc,EAAE,wBAAwB,CAAC;QACzC,aAAa,EAAE,mBAAmB,CAAC;KACpC,GAAG,OAAO,CAAC,0BAA0B,CAAC;CASxC"}
@@ -0,0 +1,37 @@
1
+ import { createProcessCredentialPackage } from "./credentials.js";
2
+ export class InterconnectionAuthorizationRuntime {
3
+ verifier;
4
+ constructor(verifier) {
5
+ this.verifier = verifier;
6
+ }
7
+ createPresentation(input) {
8
+ return createProcessCredentialPackage(input);
9
+ }
10
+ async authenticatePeer(pkg, policy) {
11
+ const assertion = await this.verifier.verifyPresentation({
12
+ package: pkg,
13
+ expectedAudience: policy.expectedAudience,
14
+ requiredScope: policy.requiredScope
15
+ });
16
+ return this.authorizeAssertion(assertion, policy);
17
+ }
18
+ authorizeAssertion(assertion, policy) {
19
+ if (assertion.result === "success") {
20
+ return { allowed: true, assertion };
21
+ }
22
+ if (assertion.result === "needs_more_verification" && policy.allowNeedsMoreVerification) {
23
+ return { allowed: true, assertion, reason: "Allowed by policy with additional verification required" };
24
+ }
25
+ return { allowed: false, assertion, reason: assertion.reason ?? "Authentication failed" };
26
+ }
27
+ async mutualAuthenticate(input) {
28
+ const requester = await this.authenticatePeer(input.requesterPackage, input.requesterPolicy);
29
+ const service = await this.authenticatePeer(input.servicePackage, input.servicePolicy);
30
+ return {
31
+ requester,
32
+ service,
33
+ allowed: requester.allowed && service.allowed
34
+ };
35
+ }
36
+ }
37
+ //# sourceMappingURL=authorization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authorization.js","sourceRoot":"","sources":["../src/author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MAAM,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;QACvF,OAAO;YACL,SAAS;YACT,OAAO;YACP,OAAO,EAAE,SAAS,CAAC,OAAO,IAAI,OAAO,CAAC,OAAO;SAC9C,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,39 @@
1
+ import type { JsonTransport } from "./transport.js";
2
+ import type { DescriptionRecord, DescriptionReview, PublicationCertificate, PublicationRequestInfo } from "./description-registry.js";
3
+ import type { IdentityAccount, RegisterIdentityInput, RegisterIdentityResult } from "./identity-registry.js";
4
+ import type { AgentDescription, AgentIdentityCode, DiscoveryQuery, DiscoveryResult, Message, Session, ToolInvokeRequest, ToolInvokeResult, ToolSyncData, ToolUpdateData } from "./types.js";
5
+ import type { CreateSessionInput, SendMessageInput, SubmitTaskInput } from "./interaction.js";
6
+ import type { Task } from "./types.js";
7
+ import type { DistributionReceipt } from "./message-distribution.js";
8
+ import type { IssuedCredential } from "./credentials.js";
9
+ export declare class AgentInterconnectClient {
10
+ private readonly transport;
11
+ constructor(transport: JsonTransport);
12
+ registerIdentity(input: RegisterIdentityInput): Promise<RegisterIdentityResult>;
13
+ getIdentity(agentId: AgentIdentityCode): Promise<IdentityAccount | undefined>;
14
+ issueCredential(agentId: AgentIdentityCode, input: {
15
+ subject: string;
16
+ audience?: string[];
17
+ scope?: string[];
18
+ expiresAt?: string;
19
+ }): Promise<IssuedCredential>;
20
+ lockIdentity(agentId: AgentIdentityCode, reason?: string): Promise<IdentityAccount>;
21
+ unlockIdentity(agentId: AgentIdentityCode, reason?: string): Promise<IdentityAccount>;
22
+ revokeIdentity(agentId: AgentIdentityCode, reason?: string): Promise<IdentityAccount>;
23
+ registerDescription(description: AgentDescription): Promise<DescriptionRecord>;
24
+ publishDescription(agentId: AgentIdentityCode): Promise<DescriptionRecord>;
25
+ reviewDescription(agentId: AgentIdentityCode, review: Omit<DescriptionReview, "reviewId" | "createdAt">): Promise<DescriptionRecord>;
26
+ issuePublicationCertificate(agentId: AgentIdentityCode, input: Omit<PublicationCertificate, "certificateId" | "agentId" | "issuedAt">): Promise<PublicationCertificate>;
27
+ publishDescriptionWithInfo(agentId: AgentIdentityCode, publication?: PublicationRequestInfo): Promise<DescriptionRecord>;
28
+ unpublishDescription(agentId: AgentIdentityCode): Promise<DescriptionRecord>;
29
+ revokeDescription(agentId: AgentIdentityCode, reason?: string): Promise<DescriptionRecord>;
30
+ discover(query: DiscoveryQuery): Promise<DiscoveryResult[]>;
31
+ createSession(input: CreateSessionInput): Promise<Session>;
32
+ submitTask(input: SubmitTaskInput): Promise<Task>;
33
+ sendMessage(input: SendMessageInput): Promise<Message>;
34
+ distributeMessage(input: SendMessageInput, recipients?: AgentIdentityCode[]): Promise<DistributionReceipt[]>;
35
+ listTools(toolRequestList?: string[]): Promise<ToolSyncData>;
36
+ syncToolUpdates(): Promise<ToolUpdateData>;
37
+ invokeTools(request: ToolInvokeRequest): Promise<ToolInvokeResult>;
38
+ }
39
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACtI,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAC7G,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,EAAE,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5L,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAA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AAC,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAIpI,2BAA2B,CACzB,OAAO,EAAE,iBAAiB,EAC1B,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAAE,eAAe,GAAG,SAAS,GAAG,UAAU,CAAC,GAC5E,OAAO,CAAC,sBAAsB,CAAC;IAIlC,0BAA0B,CAAC,OAAO,EAAE,iBAAiB,EAAE,WAAW,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAIxH,oBAAoB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAI5E,iBAAiB,CAAC,OAAO,EAAE,iBAAiB,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAI1F,QAAQ,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAI3D,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC;IAI1D,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjD,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;IAItD,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,EAAE,UAAU,CAAC,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC;IAI5G,SAAS,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,YAAY,CAAC;IAI5D,eAAe,IAAI,OAAO,CAAC,cAAc,CAAC;IAI1C,WAAW,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAGnE"}
package/dist/client.js ADDED
@@ -0,0 +1,70 @@
1
+ export class AgentInterconnectClient {
2
+ transport;
3
+ constructor(transport) {
4
+ this.transport = transport;
5
+ }
6
+ registerIdentity(input) {
7
+ return this.transport.request("identity.register", input);
8
+ }
9
+ getIdentity(agentId) {
10
+ return this.transport.request("identity.get", { agentId });
11
+ }
12
+ issueCredential(agentId, input) {
13
+ return this.transport.request("identity.issueCredential", { agentId, input });
14
+ }
15
+ lockIdentity(agentId, reason) {
16
+ return this.transport.request("identity.lock", { agentId, reason });
17
+ }
18
+ unlockIdentity(agentId, reason) {
19
+ return this.transport.request("identity.unlock", { agentId, reason });
20
+ }
21
+ revokeIdentity(agentId, reason) {
22
+ return this.transport.request("identity.revoke", { agentId, reason });
23
+ }
24
+ registerDescription(description) {
25
+ return this.transport.request("description.register", description);
26
+ }
27
+ publishDescription(agentId) {
28
+ return this.transport.request("description.publish", { agentId });
29
+ }
30
+ reviewDescription(agentId, review) {
31
+ return this.transport.request("description.review", { agentId, review });
32
+ }
33
+ issuePublicationCertificate(agentId, input) {
34
+ return this.transport.request("description.issuePublicationCertificate", { agentId, input });
35
+ }
36
+ publishDescriptionWithInfo(agentId, publication) {
37
+ return this.transport.request("description.publish", { agentId, publication });
38
+ }
39
+ unpublishDescription(agentId) {
40
+ return this.transport.request("description.unpublish", { agentId });
41
+ }
42
+ revokeDescription(agentId, reason) {
43
+ return this.transport.request("description.revoke", { agentId, reason });
44
+ }
45
+ discover(query) {
46
+ return this.transport.request("discovery.discover", query);
47
+ }
48
+ createSession(input) {
49
+ return this.transport.request("interaction.createSession", input);
50
+ }
51
+ submitTask(input) {
52
+ return this.transport.request("interaction.submitTask", input);
53
+ }
54
+ sendMessage(input) {
55
+ return this.transport.request("interaction.sendMessage", input);
56
+ }
57
+ distributeMessage(input, recipients) {
58
+ return this.transport.request("interaction.distributeMessage", { input, recipients });
59
+ }
60
+ listTools(toolRequestList) {
61
+ return this.transport.request("tool.list", { toolRequestList });
62
+ }
63
+ syncToolUpdates() {
64
+ return this.transport.request("tool.updates", {});
65
+ }
66
+ invokeTools(request) {
67
+ return this.transport.request("tool.invoke", request);
68
+ }
69
+ }
70
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+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4B,yBAAyB,EAAE,KAAK,CAAC,CAAC;IAC7F,CAAC;IAED,iBAAiB,CAAC,KAAuB,EAAE,UAAgC;QACzE,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,+BAA+B,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;IACxF,CAAC;IAED,SAAS,CAAC,eAA0B;QAClC,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAA2D,WAAW,EAAE,EAAE,eAAe,EAAE,CAAC,CAAC;IAC5H,CAAC;IAED,eAAe;QACb,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;IACpD,CAAC;IAED,WAAW,CAAC,OAA0B;QACpC,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAsC,aAAa,EAAE,OAAO,CAAC,CAAC;IAC7F,CAAC;CACF"}
@@ -0,0 +1,11 @@
1
+ export type ConformanceStatus = "covered" | "covered_by_reference_runtime" | "extension_point";
2
+ export interface Gbz185ConformanceItem {
3
+ part: "GB/Z 185.1" | "GB/Z 185.2" | "GB/Z 185.3" | "GB/Z 185.4" | "GB/Z 185.5" | "GB/Z 185.6" | "GB/Z 185.7";
4
+ clause: string;
5
+ topic: string;
6
+ status: ConformanceStatus;
7
+ sdkSurface: string[];
8
+ notes: string;
9
+ }
10
+ export declare const GBZ185_CONFORMANCE_MATRIX: Gbz185ConformanceItem[];
11
+ //# sourceMappingURL=conformance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conformance.d.ts","sourceRoot":"","sources":["../src/conformance.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,8BAA8B,GAAG,iBAAiB,CAAC;AAE/F,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,YAAY,GAAG,YAAY,GAAG,YAAY,GAAG,YAAY,GAAG,YAAY,GAAG,YAAY,GAAG,YAAY,CAAC;IAC7G,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,iBAAiB,CAAC;IAC1B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,yBAAyB,EAAE,qBAAqB,EAiM5D,CAAC"}