feat(worker): S3 3b härda UPDATE_USER_MEMORY — budget, kostnad, anti-påhitt, GDPR-regression

This commit is contained in:
Sven (AAMOS AI)
2026-08-11 03:23:09 +07:00
parent 33b0a8267b
commit 05bba93b90
11 changed files with 678 additions and 62 deletions
+6
View File
@@ -22,6 +22,8 @@ export interface AamosCallOptions {
anonymizedImprovement: boolean;
imageTraining: boolean;
};
/** Systeminstruktion som skickas med till AAMOS (t.ex. anti-påhitt-regler). */
systemInstruction?: string;
}
export interface AamosResult<T extends AamosTaskType> {
@@ -118,6 +120,9 @@ export class HttpAamosClient implements AamosClient {
anonymizedImprovement: false,
imageTraining: false,
},
...(options.systemInstruction
? { systemInstruction: options.systemInstruction }
: {}),
},
};
@@ -219,6 +224,7 @@ export class MockAamosClient implements AamosClient {
async runTask<T extends AamosTaskType>(
taskType: T,
input: TaskInput<T>,
_options?: AamosCallOptions,
): Promise<AamosResult<T>> {
const contract = TASK_CONTRACTS[taskType];
const parsedInput = contract.input.safeParse(input);