agl 22.0.2 → 22.0.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agl",
3
- "version": "22.0.2",
3
+ "version": "22.0.3",
4
4
  "controllerUpgradeManagementVersion": 2,
5
5
  "private": false,
6
6
  "description": "Agent Gateway Layer for OpenCode and FlexHarness sessions",
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: 'agl',
6
- version: '22.0.2',
6
+ version: '22.0.3',
7
7
  description: 'Agent Gateway Layer for OpenCode and FlexHarness sessions'
8
8
  }
@@ -117,12 +117,19 @@ interface IUnknownBudget {
117
117
  const isRecord = (value: unknown): value is Record<string, unknown> =>
118
118
  typeof value === 'object' && value !== null && !Array.isArray(value);
119
119
 
120
- const isOpenCodeNotFoundError = (valueArg: unknown): boolean =>
120
+ const isOpenCodeNotFoundBody = (valueArg: unknown): boolean =>
121
121
  isRecord(valueArg)
122
122
  && valueArg.name === 'NotFoundError'
123
123
  && isRecord(valueArg.data)
124
124
  && typeof valueArg.data.message === 'string';
125
125
 
126
+ const isOpenCodeNotFoundError = (valueArg: unknown): boolean => {
127
+ if (isOpenCodeNotFoundBody(valueArg)) return true;
128
+ if (!isRecord(valueArg) || !isRecord(valueArg.cause)) return false;
129
+ return valueArg.cause.status === 404
130
+ && isOpenCodeNotFoundBody(valueArg.cause.body);
131
+ };
132
+
126
133
  const hasExactKeys = (
127
134
  valueArg: Record<string, unknown>,
128
135
  requiredArg: readonly string[],
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: 'agl',
6
- version: '22.0.2',
6
+ version: '22.0.3',
7
7
  description: 'Agent Gateway Layer for OpenCode and FlexHarness sessions'
8
8
  }