@tangle-network/agent-app 0.57.16 → 0.57.18
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/dist/agent-profiles/d1.js +1 -1
- package/dist/agent-profiles/index.d.ts +5 -0
- package/dist/agent-profiles/index.js +5 -1
- package/dist/chat-routes/index.js +3 -1
- package/dist/chat-routes/index.js.map +1 -1
- package/dist/{chunk-HLDUEAQ5.js → chunk-YEBSFADG.js} +11 -3
- package/dist/chunk-YEBSFADG.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-HLDUEAQ5.js.map +0 -1
|
@@ -223,6 +223,9 @@ export declare function parseProfileSwitch(text: string): {
|
|
|
223
223
|
invalid: true;
|
|
224
224
|
} | null;
|
|
225
225
|
export declare function normalizeProfileName(name: string): string;
|
|
226
|
+
/** A source identity joins the command hash without entering the receipt row. */
|
|
227
|
+
export declare function profileSwitchInputHashFromContentHash(contentHash: string, identityContext?: string): string;
|
|
228
|
+
export declare function profileSwitchInputHash(content: string, identityContext?: string): string;
|
|
226
229
|
export interface SwitchableProfile {
|
|
227
230
|
id: string;
|
|
228
231
|
name: string;
|
|
@@ -233,6 +236,8 @@ export interface SwitchProfileInput {
|
|
|
233
236
|
key: ProfileBindingKey;
|
|
234
237
|
messageId: string;
|
|
235
238
|
content: string;
|
|
239
|
+
/** Trusted source identity, such as a phone sender; replay must preserve it. */
|
|
240
|
+
identityContext?: string;
|
|
236
241
|
conversationId?: string;
|
|
237
242
|
choice: {
|
|
238
243
|
name: string;
|
|
@@ -12,6 +12,8 @@ import {
|
|
|
12
12
|
parseProfileSwitch,
|
|
13
13
|
profileAuthority,
|
|
14
14
|
profileAuthorityDigest,
|
|
15
|
+
profileSwitchInputHash,
|
|
16
|
+
profileSwitchInputHashFromContentHash,
|
|
15
17
|
profileTextChange,
|
|
16
18
|
profileTools,
|
|
17
19
|
projectKnowledgeDocuments,
|
|
@@ -21,7 +23,7 @@ import {
|
|
|
21
23
|
rollbackProfileBinding,
|
|
22
24
|
serializeProfileRevisionDiff,
|
|
23
25
|
switchProfile
|
|
24
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-YEBSFADG.js";
|
|
25
27
|
export {
|
|
26
28
|
PROFILE_CHANGE_POLICY,
|
|
27
29
|
ProfileAccessError,
|
|
@@ -36,6 +38,8 @@ export {
|
|
|
36
38
|
parseProfileSwitch,
|
|
37
39
|
profileAuthority,
|
|
38
40
|
profileAuthorityDigest,
|
|
41
|
+
profileSwitchInputHash,
|
|
42
|
+
profileSwitchInputHashFromContentHash,
|
|
39
43
|
profileTextChange,
|
|
40
44
|
profileTools,
|
|
41
45
|
projectKnowledgeDocuments,
|
|
@@ -1144,7 +1144,9 @@ function createProtectedRuntimeChatProducer(options) {
|
|
|
1144
1144
|
...options,
|
|
1145
1145
|
grant: { ...options.grant, resolve: structuredClone(options.grant.resolve), reserve: structuredClone(options.grant.reserve) },
|
|
1146
1146
|
tools: options.tools.map((tool) => ({ ...tool, inputSchema: structuredClone(tool.inputSchema) })),
|
|
1147
|
-
|
|
1147
|
+
// Chat history rows carry storage fields (id, parts, timestamps). The
|
|
1148
|
+
// provider receives exactly role and content; Anthropic rejects extra keys.
|
|
1149
|
+
priorMessages: options.priorMessages?.map(({ role, content }) => ({ role, content }))
|
|
1148
1150
|
};
|
|
1149
1151
|
const tools = new Map(options.tools.map((tool) => [tool.name, tool]));
|
|
1150
1152
|
if (tools.size !== options.tools.length) throw new Error("Duplicate protected tool name");
|