openmates 0.14.8-alpha.4 → 0.14.8-alpha.5

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.
@@ -3004,17 +3004,23 @@ async function buildTaskEventSystemMessage(params) {
3004
3004
  return message;
3005
3005
  }
3006
3006
  function buildTaskUpdateJobPersistPayload(params) {
3007
- assertTaskPersistPayloadEncrypted(params.encryptedTaskPayload);
3007
+ const encryptedTaskPayload = pruneAbsentTaskPersistFields(params.encryptedTaskPayload);
3008
+ assertTaskPersistPayloadEncrypted(encryptedTaskPayload);
3008
3009
  return {
3009
3010
  protocol_version: 1,
3010
3011
  job_id: params.jobId,
3011
3012
  lease_token: params.leaseToken,
3012
3013
  lease_generation: params.leaseGeneration,
3013
3014
  expected_task_version: params.expectedTaskVersion,
3014
- encrypted_task_payload: { ...params.encryptedTaskPayload },
3015
+ encrypted_task_payload: encryptedTaskPayload,
3015
3016
  encrypted_task_event_message: params.encryptedTaskEventMessage ?? null
3016
3017
  };
3017
3018
  }
3019
+ function pruneAbsentTaskPersistFields(payload) {
3020
+ return Object.fromEntries(
3021
+ Object.entries(payload).filter(([, value]) => value !== void 0 && value !== null)
3022
+ );
3023
+ }
3018
3024
  function formatTaskEventSystemContent(event) {
3019
3025
  const taskLabel = event.short_id || event.task_id;
3020
3026
  const title = event.title ? ` "${event.title}"` : "";
package/dist/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getExtForLang,
4
4
  serializeToYaml
5
- } from "./chunk-UZA2XUCF.js";
5
+ } from "./chunk-MF5DW7MD.js";
6
6
  import "./chunk-AXNRPVLE.js";
7
7
  export {
8
8
  getExtForLang,
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ import {
29
29
  renderSupportInfo,
30
30
  serializeToYaml,
31
31
  unwrapApiKeyMasterKey
32
- } from "./chunk-UZA2XUCF.js";
32
+ } from "./chunk-MF5DW7MD.js";
33
33
  import "./chunk-AXNRPVLE.js";
34
34
 
35
35
  // src/generated/appSkills.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmates",
3
- "version": "0.14.8-alpha.4",
3
+ "version": "0.14.8-alpha.5",
4
4
  "description": "OpenMates CLI and SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",