@amalgm/chat 0.2.9-preview.34938476986 → 0.2.9-preview.34940997223
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/PURPOSE.md
CHANGED
|
@@ -180,6 +180,8 @@ automations, and third-party apps must all use the same public SDK.
|
|
|
180
180
|
43. Attachment bytes belong to the accepted ACP prompt. A native adapter that
|
|
181
181
|
needs a filesystem path receives a host materialization of those bytes;
|
|
182
182
|
that derived file is never the durable source of truth.
|
|
183
|
+
Every attachment reaches the model as native content or an explicit readable
|
|
184
|
+
reference; provider routing metadata cannot replace prompt content.
|
|
183
185
|
44. A managed provider home belongs to one installation and one auth authority.
|
|
184
186
|
Child environments contain standard process and network settings plus
|
|
185
187
|
explicitly prepared credentials; they never inherit host service secrets.
|
|
@@ -210,6 +212,8 @@ automations, and third-party apps must all use the same public SDK.
|
|
|
210
212
|
idempotency key and retried until acknowledged. Platform usage is metered and
|
|
211
213
|
persisted by the API proxy for each upstream invocation; local observations
|
|
212
214
|
cannot create a second charge. The authenticated host supplies ownership.
|
|
215
|
+
Delivery starts only with a complete host-supplied platform capability;
|
|
216
|
+
absent delivery configuration leaves measurements pending and local Chat usable.
|
|
213
217
|
49. Only commands with an explicit Amalgm normalization may be advertised or
|
|
214
218
|
executed. Native discovery is evidence, never execution permission. The only
|
|
215
219
|
enabled command is `/compact`, on adapters with a proven compaction mapping;
|
|
@@ -152,7 +152,7 @@ the final native boundary:
|
|
|
152
152
|
| Adapter | Native projection |
|
|
153
153
|
| --- | --- |
|
|
154
154
|
| ACP / Cursor | ACP content blocks unchanged after capability validation |
|
|
155
|
-
| Codex | text, URL/base64 image or audio, local image/audio, or file
|
|
155
|
+
| Codex | text, URL/base64 image or audio, local image/audio, or readable file references in text |
|
|
156
156
|
| Claude Code | structured text, image, plain-text document, or PDF blocks |
|
|
157
157
|
| OpenCode | text and URL/data-URL file parts |
|
|
158
158
|
| Pi | text plus its RPC image channel |
|
package/host/adapters/prompt.js
CHANGED
|
@@ -77,7 +77,9 @@ export function codexPromptInput(prompt) {
|
|
|
77
77
|
if (!file) return [{ type: 'text', text: linkedText(part) }];
|
|
78
78
|
if (mime.startsWith('image/')) return [{ type: 'localImage', path: file }];
|
|
79
79
|
if (mime.startsWith('audio/')) return [{ type: 'localAudio', path: file }];
|
|
80
|
-
|
|
80
|
+
// Codex mentions select provider integrations; they do not put an
|
|
81
|
+
// arbitrary file reference into the model's user message.
|
|
82
|
+
return [{ type: 'text', text: linkedText(part) }];
|
|
81
83
|
}
|
|
82
84
|
if (part.type === 'resource') {
|
|
83
85
|
const mime = mimeOf(part);
|
package/host/index.js
CHANGED
|
@@ -31,9 +31,10 @@ export async function createChatHost(options) {
|
|
|
31
31
|
: options.journalBatch || createSqliteJournalBatchPolicy(),
|
|
32
32
|
});
|
|
33
33
|
const recoveredTurns = await chat.recoverInterruptedTurns();
|
|
34
|
-
const
|
|
34
|
+
const proxy = runtime.preparer?.platformProxy({ required: false });
|
|
35
|
+
const usageDelivery = proxy && typeof conversations.pendingUsage === 'function'
|
|
35
36
|
? createUsageDelivery({ store: conversations, ownerUserId: options.ownerUserId,
|
|
36
|
-
proxy
|
|
37
|
+
proxy }) : null;
|
|
37
38
|
const handleHttp = createChatHttpHandler({
|
|
38
39
|
chat,
|
|
39
40
|
...(typeof runtime.forwardEgress === 'function'
|
package/host/native-contract.js
CHANGED
|
@@ -188,8 +188,9 @@ export class NativeExecutionPreparer {
|
|
|
188
188
|
});
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
-
platformProxy() {
|
|
191
|
+
platformProxy({ required = true } = {}) {
|
|
192
192
|
if (!this.proxyBaseUrl || !this.credentialBroker) {
|
|
193
|
+
if (!required) return null;
|
|
193
194
|
throw new InvalidPreparedAuthError('Platform proxy is not configured');
|
|
194
195
|
}
|
|
195
196
|
return Object.freeze({ baseUrl: this.proxyBaseUrl, credentialBroker: this.credentialBroker });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amalgm/chat",
|
|
3
|
-
"version": "0.2.9-preview.
|
|
3
|
+
"version": "0.2.9-preview.34940997223",
|
|
4
4
|
"description": "A provider-agnostic agent chat SDK with ACP content, prepared execution, normalized streams, and usage.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -118,11 +118,11 @@
|
|
|
118
118
|
"allowScripts": {
|
|
119
119
|
"better-sqlite3@12.11.1": true
|
|
120
120
|
},
|
|
121
|
-
"gitHead": "
|
|
121
|
+
"gitHead": "7cabb01fd99650e5e16a9160ae4470fd70a68e45",
|
|
122
122
|
"amalgmSource": {
|
|
123
123
|
"repository": "amalgm-inc/amalgm-chat",
|
|
124
124
|
"branch": "preview",
|
|
125
|
-
"commit": "
|
|
126
|
-
"occurrence": "
|
|
125
|
+
"commit": "7cabb01fd99650e5e16a9160ae4470fd70a68e45",
|
|
126
|
+
"occurrence": "34940997223"
|
|
127
127
|
}
|
|
128
128
|
}
|