acp-runtime 0.1.0 → 0.1.1

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/README.md CHANGED
@@ -15,6 +15,7 @@ ACP provides:
15
15
  - Capability-driven interaction patterns
16
16
 
17
17
  This enables agents to discover each other, exchange messages, and collaborate without tight coupling.
18
+ ACP SDKs across languages are interoperable and implement the same protocol semantics.
18
19
 
19
20
  ## What ACP Is Not
20
21
 
@@ -60,15 +61,18 @@ ACP may be unnecessary when:
60
61
  Status labels used in this repo:
61
62
  - `Published`
62
63
  - `Available from repo`
64
+ - `Experimental`
65
+ - `Bridge-based`
63
66
  - `Coming`
64
67
 
65
- | SDK | Status |
68
+ | SDK | Status |
69
+ | --- | --- |
66
70
  | Python (`acp-runtime`) | `Published`|
67
71
  | TypeScript (`acp-runtime`) | `Published`|
68
- | Rust (`acp`) | `Available from repo`|
69
- | Go (`github.com/acp/sdk-go`) | `Available from repo`|
70
- | Java (`io.acp:acp-sdk`) | `Available from repo` |
71
- | Mojo wrapper (`acp-sdk-mojo`) | `Available from repo` |
72
+ | Rust (`acp-runtime`) | `Published`|
73
+ | Go (`github.com/beltxa/acp/sdks/go`) | `Available from repo`|
74
+ | Java (`tech.co-operate:acp-runtime`) | `Published` |
75
+ | Mojo wrapper (`acp-sdk-mojo`) | `Bridge-based` |
72
76
 
73
77
  No SDK in this repository snapshot is currently labeled `Coming`.
74
78
 
package/dist/crypto.js CHANGED
@@ -125,6 +125,40 @@ export function encryptForRecipients(payload, envelope, recipientEncryptionPubli
125
125
  signature: ""
126
126
  };
127
127
  }
128
+ const REQUIRED_SIGNATURE_ENVELOPE_FIELDS = [
129
+ "acp_version",
130
+ "message_class",
131
+ "message_id",
132
+ "operation_id",
133
+ "timestamp",
134
+ "expires_at",
135
+ "sender",
136
+ "recipients",
137
+ "context_id",
138
+ "crypto_suite"
139
+ ];
140
+ const OPTIONAL_SIGNATURE_ENVELOPE_FIELDS = ["correlation_id", "in_reply_to"];
141
+ function normalizeSignatureEnvelope(envelope) {
142
+ const source = envelope;
143
+ const normalized = {};
144
+ for (const key of REQUIRED_SIGNATURE_ENVELOPE_FIELDS) {
145
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
146
+ const value = source[key];
147
+ if (value !== undefined) {
148
+ normalized[key] = value;
149
+ }
150
+ }
151
+ }
152
+ for (const key of OPTIONAL_SIGNATURE_ENVELOPE_FIELDS) {
153
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
154
+ const value = source[key];
155
+ if (value !== undefined && value !== null) {
156
+ normalized[key] = value;
157
+ }
158
+ }
159
+ }
160
+ return normalized;
161
+ }
128
162
  function messageSignatureInput(envelope, protectedPayload) {
129
163
  const signableProtected = {
130
164
  nonce: protectedPayload.nonce,
@@ -134,7 +168,7 @@ function messageSignatureInput(envelope, protectedPayload) {
134
168
  signature_kid: protectedPayload.signature_kid
135
169
  };
136
170
  return canonicalJsonBytes({
137
- envelope,
171
+ envelope: normalizeSignatureEnvelope(envelope),
138
172
  protected: signableProtected
139
173
  });
140
174
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "acp-runtime",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "TypeScript SDK for the Agent Communication Protocol (ACP)",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",