@rzx/ohs 1.1.13 → 1.1.16

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.
@@ -743,13 +743,23 @@ function parseServerCapabilities(value) {
743
743
  features[name] = positiveInteger2(version, `features.${name}`);
744
744
  }
745
745
  const attachments = parseAttachmentTransferCapabilities(value.attachments);
746
+ const agentEnvironments = parseAgentEnvironmentCapabilities(value.agentEnvironments);
746
747
  return {
747
748
  serverVersion: value.serverVersion,
748
749
  protocol: { version },
749
750
  features,
750
- ...attachments ? { attachments } : {}
751
+ ...attachments ? { attachments } : {},
752
+ ...agentEnvironments ? { agentEnvironments } : {}
751
753
  };
752
754
  }
755
+ function parseAgentEnvironmentCapabilities(value) {
756
+ if (value === undefined)
757
+ return;
758
+ if (!isRecord2(value) || value.native !== true || typeof value.wsl !== "boolean") {
759
+ throw new Error("agentEnvironments must contain native=true and a boolean wsl value");
760
+ }
761
+ return { native: true, wsl: value.wsl };
762
+ }
753
763
  function checkProtocolCompatibility(server, client) {
754
764
  if (client.version !== server.protocol.version) {
755
765
  return {
@@ -788,6 +798,11 @@ var init_capabilities = __esm(() => {
788
798
  init_attachment();
789
799
  });
790
800
 
801
+ // ../../packages/protocol/src/session-goals.ts
802
+ var init_session_goals = __esm(() => {
803
+ init_requests();
804
+ });
805
+
791
806
  // ../../packages/protocol/src/index.ts
792
807
  var init_src = __esm(() => {
793
808
  init_session();
@@ -796,6 +811,7 @@ var init_src = __esm(() => {
796
811
  init_capabilities();
797
812
  init_attachment();
798
813
  init_session_input_items();
814
+ init_session_goals();
799
815
  });
800
816
 
801
817
  // ../../packages/client/src/transport/http-client.ts
@@ -1061,6 +1077,22 @@ class OpenHarnessClient {
1061
1077
  async compactSession(sessionId, options = {}) {
1062
1078
  return await this.request(`/sessions/${encodeURIComponent(sessionId)}/compact`, { method: "POST", signal: options.signal });
1063
1079
  }
1080
+ async getSessionGoal(sessionId) {
1081
+ const response = await this.request(`/sessions/${encodeURIComponent(sessionId)}/goal`);
1082
+ return response.goal;
1083
+ }
1084
+ async createSessionGoal(sessionId, input) {
1085
+ const response = await this.request(`/sessions/${encodeURIComponent(sessionId)}/goals`, { method: "POST", body: input });
1086
+ return response.goal;
1087
+ }
1088
+ async updateSessionGoal(sessionId, goalId, input) {
1089
+ const response = await this.request(`/sessions/${encodeURIComponent(sessionId)}/goals/${encodeURIComponent(goalId)}`, { method: "PATCH", body: input });
1090
+ return response.goal;
1091
+ }
1092
+ async applySessionGoalAction(sessionId, goalId, input) {
1093
+ const response = await this.request(`/sessions/${encodeURIComponent(sessionId)}/goals/${encodeURIComponent(goalId)}/actions`, { method: "POST", body: input });
1094
+ return response.goal;
1095
+ }
1064
1096
  async rewindSession(sessionId, input = {}, options = {}) {
1065
1097
  return await this.request(`/sessions/${encodeURIComponent(sessionId)}/rewind`, { method: "POST", body: input, signal: options.signal });
1066
1098
  }
@@ -3000,6 +3032,7 @@ var init_commands = __esm(() => {
3000
3032
  var init_src2 = __esm(() => {
3001
3033
  init_transport();
3002
3034
  init_src();
3035
+ init_src();
3003
3036
  init_state();
3004
3037
  init_commands();
3005
3038
  init_src();
@@ -8134,4 +8167,4 @@ try {
8134
8167
  process.exit(1);
8135
8168
  }
8136
8169
 
8137
- //# debugId=DB9708E7A715BB8364756E2164756E21
8170
+ //# debugId=CC7EA554B2C5EAF964756E2164756E21