@midscene/core 1.2.2-beta-20260116114131.0 → 1.2.2-beta-20260119114334.0

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.
Files changed (90) hide show
  1. package/dist/es/agent/agent.mjs +4 -4
  2. package/dist/es/agent/agent.mjs.map +1 -1
  3. package/dist/es/agent/tasks.mjs +3 -4
  4. package/dist/es/agent/tasks.mjs.map +1 -1
  5. package/dist/es/agent/utils.mjs +1 -1
  6. package/dist/es/ai-model/auto-glm/index.mjs +2 -2
  7. package/dist/es/ai-model/auto-glm/planning.mjs +1 -1
  8. package/dist/es/ai-model/auto-glm/planning.mjs.map +1 -1
  9. package/dist/es/ai-model/auto-glm/prompt.mjs +8 -8
  10. package/dist/es/ai-model/auto-glm/prompt.mjs.map +1 -1
  11. package/dist/es/ai-model/auto-glm/util.mjs +6 -3
  12. package/dist/es/ai-model/auto-glm/util.mjs.map +1 -1
  13. package/dist/es/ai-model/index.mjs +2 -2
  14. package/dist/es/ai-model/inspect.mjs +12 -12
  15. package/dist/es/ai-model/inspect.mjs.map +1 -1
  16. package/dist/es/ai-model/llm-planning.mjs +51 -7
  17. package/dist/es/ai-model/llm-planning.mjs.map +1 -1
  18. package/dist/es/ai-model/prompt/common.mjs +2 -2
  19. package/dist/es/ai-model/prompt/common.mjs.map +1 -1
  20. package/dist/es/ai-model/prompt/extraction.mjs +3 -1
  21. package/dist/es/ai-model/prompt/extraction.mjs.map +1 -1
  22. package/dist/es/ai-model/prompt/llm-locator.mjs +5 -3
  23. package/dist/es/ai-model/prompt/llm-locator.mjs.map +1 -1
  24. package/dist/es/ai-model/prompt/llm-planning.mjs +48 -52
  25. package/dist/es/ai-model/prompt/llm-planning.mjs.map +1 -1
  26. package/dist/es/ai-model/prompt/llm-section-locator.mjs +5 -3
  27. package/dist/es/ai-model/prompt/llm-section-locator.mjs.map +1 -1
  28. package/dist/es/ai-model/service-caller/index.mjs +12 -13
  29. package/dist/es/ai-model/service-caller/index.mjs.map +1 -1
  30. package/dist/es/ai-model/ui-tars-planning.mjs +2 -24
  31. package/dist/es/ai-model/ui-tars-planning.mjs.map +1 -1
  32. package/dist/es/common.mjs +10 -9
  33. package/dist/es/common.mjs.map +1 -1
  34. package/dist/es/service/index.mjs +6 -6
  35. package/dist/es/service/index.mjs.map +1 -1
  36. package/dist/es/utils.mjs +2 -2
  37. package/dist/lib/agent/agent.js +3 -3
  38. package/dist/lib/agent/agent.js.map +1 -1
  39. package/dist/lib/agent/tasks.js +2 -3
  40. package/dist/lib/agent/tasks.js.map +1 -1
  41. package/dist/lib/agent/utils.js +1 -1
  42. package/dist/lib/ai-model/auto-glm/index.js +3 -0
  43. package/dist/lib/ai-model/auto-glm/planning.js +1 -1
  44. package/dist/lib/ai-model/auto-glm/planning.js.map +1 -1
  45. package/dist/lib/ai-model/auto-glm/prompt.js +8 -8
  46. package/dist/lib/ai-model/auto-glm/prompt.js.map +1 -1
  47. package/dist/lib/ai-model/auto-glm/util.js +10 -4
  48. package/dist/lib/ai-model/auto-glm/util.js.map +1 -1
  49. package/dist/lib/ai-model/index.js +0 -3
  50. package/dist/lib/ai-model/inspect.js +12 -12
  51. package/dist/lib/ai-model/inspect.js.map +1 -1
  52. package/dist/lib/ai-model/llm-planning.js +52 -5
  53. package/dist/lib/ai-model/llm-planning.js.map +1 -1
  54. package/dist/lib/ai-model/prompt/common.js +2 -2
  55. package/dist/lib/ai-model/prompt/common.js.map +1 -1
  56. package/dist/lib/ai-model/prompt/extraction.js +5 -3
  57. package/dist/lib/ai-model/prompt/extraction.js.map +1 -1
  58. package/dist/lib/ai-model/prompt/llm-locator.js +5 -3
  59. package/dist/lib/ai-model/prompt/llm-locator.js.map +1 -1
  60. package/dist/lib/ai-model/prompt/llm-planning.js +48 -52
  61. package/dist/lib/ai-model/prompt/llm-planning.js.map +1 -1
  62. package/dist/lib/ai-model/prompt/llm-section-locator.js +5 -3
  63. package/dist/lib/ai-model/prompt/llm-section-locator.js.map +1 -1
  64. package/dist/lib/ai-model/service-caller/index.js +11 -12
  65. package/dist/lib/ai-model/service-caller/index.js.map +1 -1
  66. package/dist/lib/ai-model/ui-tars-planning.js +1 -26
  67. package/dist/lib/ai-model/ui-tars-planning.js.map +1 -1
  68. package/dist/lib/common.js +10 -9
  69. package/dist/lib/common.js.map +1 -1
  70. package/dist/lib/service/index.js +6 -6
  71. package/dist/lib/service/index.js.map +1 -1
  72. package/dist/lib/utils.js +2 -2
  73. package/dist/types/ai-model/auto-glm/index.d.ts +1 -1
  74. package/dist/types/ai-model/auto-glm/prompt.d.ts +3 -3
  75. package/dist/types/ai-model/auto-glm/util.d.ts +11 -5
  76. package/dist/types/ai-model/index.d.ts +1 -1
  77. package/dist/types/ai-model/llm-planning.d.ts +5 -1
  78. package/dist/types/ai-model/prompt/common.d.ts +2 -2
  79. package/dist/types/ai-model/prompt/llm-locator.d.ts +2 -2
  80. package/dist/types/ai-model/prompt/llm-planning.d.ts +3 -3
  81. package/dist/types/ai-model/prompt/llm-section-locator.d.ts +2 -2
  82. package/dist/types/ai-model/service-caller/index.d.ts +2 -2
  83. package/dist/types/ai-model/ui-tars-planning.d.ts +2 -3
  84. package/dist/types/common.d.ts +5 -5
  85. package/package.json +2 -2
  86. package/dist/es/ai-model/prompt/assertion.mjs +0 -31
  87. package/dist/es/ai-model/prompt/assertion.mjs.map +0 -1
  88. package/dist/lib/ai-model/prompt/assertion.js +0 -65
  89. package/dist/lib/ai-model/prompt/assertion.js.map +0 -1
  90. package/dist/types/ai-model/prompt/assertion.d.ts +0 -2
@@ -2,5 +2,5 @@ export { getAutoGLMLocatePrompt, getAutoGLMPlanPrompt } from './prompt';
2
2
  export { parseAutoGLMLocateResponse, parseAutoGLMResponse, parseAction, } from './parser';
3
3
  export { autoGLMPlanning } from './planning';
4
4
  export { transformAutoGLMAction } from './actions';
5
- export { isAutoGLM } from './util';
5
+ export { isAutoGLM, isUITars } from './util';
6
6
  export type { ParsedAction } from './actions';
@@ -22,6 +22,6 @@
22
22
  * Modifications:
23
23
  * - Adapted prompts for Midscene.js integration
24
24
  */
25
- import type { TVlModeTypes } from '@midscene/shared/env';
26
- export declare const getAutoGLMPlanPrompt: (vlMode: TVlModeTypes | undefined) => string;
27
- export declare const getAutoGLMLocatePrompt: (vlMode: TVlModeTypes | undefined) => string;
25
+ import type { TModelFamily } from '@midscene/shared/env';
26
+ export declare const getAutoGLMPlanPrompt: (modelFamily: TModelFamily | undefined) => string;
27
+ export declare const getAutoGLMLocatePrompt: (modelFamily: TModelFamily | undefined) => string;
@@ -1,7 +1,13 @@
1
- import type { TVlModeTypes } from '@midscene/shared/env';
1
+ import type { TModelFamily } from '@midscene/shared/env';
2
2
  /**
3
- * Check if the vlMode is auto-glm or auto-glm-multilingual
4
- * @param vlMode The VL mode to check
5
- * @returns true if vlMode is auto-glm or auto-glm-multilingual
3
+ * Check if the modelFamily is auto-glm or auto-glm-multilingual
4
+ * @param modelFamily The model family to check
5
+ * @returns true if modelFamily is auto-glm or auto-glm-multilingual
6
6
  */
7
- export declare function isAutoGLM(vlMode: TVlModeTypes | undefined): boolean;
7
+ export declare function isAutoGLM(modelFamily: TModelFamily | undefined): boolean;
8
+ /**
9
+ * Check if the modelFamily is a UI-TARS variant
10
+ * @param modelFamily The model family to check
11
+ * @returns true if modelFamily is any UI-TARS variant
12
+ */
13
+ export declare function isUITars(modelFamily: TModelFamily | undefined): boolean;
@@ -8,7 +8,7 @@ export { AiLocateElement, AiExtractElementInfo, AiLocateSection, AiJudgeOrderSen
8
8
  export { plan } from './llm-planning';
9
9
  export { autoGLMPlanning } from './auto-glm/planning';
10
10
  export { adaptBboxToRect } from '../common';
11
- export { uiTarsPlanning, resizeImageForUiTars } from './ui-tars-planning';
11
+ export { uiTarsPlanning } from './ui-tars-planning';
12
12
  export { ConversationHistory, type ConversationHistoryOptions, } from './conversation-history';
13
13
  export type { AIArgs } from '../common';
14
14
  export { getMidsceneLocationSchema, type MidsceneLocationResultType, PointSchema, SizeSchema, RectSchema, TMultimodalPromptSchema, TUserPromptSchema, type TMultimodalPrompt, type TUserPrompt, findAllMidsceneLocatorField, dumpActionParam, parseActionParam, } from '../common';
@@ -1,6 +1,10 @@
1
- import type { DeepThinkOption, DeviceAction, InterfaceType, PlanningAIResponse, UIContext } from '../types';
1
+ import type { DeepThinkOption, DeviceAction, InterfaceType, PlanningAIResponse, RawResponsePlanningAIResponse, UIContext } from '../types';
2
2
  import type { IModelConfig } from '@midscene/shared/env';
3
3
  import type { ConversationHistory } from './conversation-history';
4
+ /**
5
+ * Parse XML response from LLM and convert to RawResponsePlanningAIResponse
6
+ */
7
+ export declare function parseXMLPlanningResponse(xmlString: string): RawResponsePlanningAIResponse;
4
8
  export declare function plan(userInstruction: string, opts: {
5
9
  context: UIContext;
6
10
  interfaceType: InterfaceType;
@@ -1,2 +1,2 @@
1
- import type { TVlModeTypes } from '@midscene/shared/env';
2
- export declare function bboxDescription(vlMode: TVlModeTypes | undefined): "box_2d bounding box for the target element, should be [ymin, xmin, ymax, xmax] normalized to 0-1000." | "2d bounding box as [xmin, ymin, xmax, ymax]";
1
+ import type { TModelFamily } from '@midscene/shared/env';
2
+ export declare function bboxDescription(modelFamily: TModelFamily | undefined): "box_2d bounding box for the target element, should be [ymin, xmin, ymax, xmax] normalized to 0-1000." | "2d bounding box as [xmin, ymin, xmax, ymax]";
@@ -1,3 +1,3 @@
1
- import type { TVlModeTypes } from '@midscene/shared/env';
2
- export declare function systemPromptToLocateElement(vlMode: TVlModeTypes | undefined): string;
1
+ import type { TModelFamily } from '@midscene/shared/env';
2
+ export declare function systemPromptToLocateElement(modelFamily: TModelFamily | undefined): string;
3
3
  export declare const findElementPrompt: (targetElementDescription: string) => string;
@@ -1,9 +1,9 @@
1
1
  import type { DeviceAction } from '../../types';
2
- import type { TVlModeTypes } from '@midscene/shared/env';
2
+ import type { TModelFamily } from '@midscene/shared/env';
3
3
  export declare const descriptionForAction: (action: DeviceAction<any>, locatorSchemaTypeDescription: string) => string;
4
- export declare function systemPromptToTaskPlanning({ actionSpace, vlMode, includeBbox, includeThought, }: {
4
+ export declare function systemPromptToTaskPlanning({ actionSpace, modelFamily, includeBbox, includeThought, }: {
5
5
  actionSpace: DeviceAction<any>[];
6
- vlMode: TVlModeTypes | undefined;
6
+ modelFamily: TModelFamily | undefined;
7
7
  includeBbox: boolean;
8
8
  includeThought?: boolean;
9
9
  }): Promise<string>;
@@ -1,3 +1,3 @@
1
- import type { TVlModeTypes } from '@midscene/shared/env';
2
- export declare function systemPromptToLocateSection(vlMode: TVlModeTypes | undefined): string;
1
+ import type { TModelFamily } from '@midscene/shared/env';
2
+ export declare function systemPromptToLocateSection(modelFamily: TModelFamily | undefined): string;
3
3
  export declare const sectionLocatorInstruction: (sectionDescription: string) => string;
@@ -1,6 +1,6 @@
1
1
  import type { AIUsageInfo, DeepThinkOption } from '../../types';
2
2
  import type { StreamingCallback } from '../../types';
3
- import { type IModelConfig, type TModelFamily, type TVlModeTypes } from '@midscene/shared/env';
3
+ import { type IModelConfig, type TModelFamily } from '@midscene/shared/env';
4
4
  import type { ChatCompletionMessageParam } from 'openai/resources/index';
5
5
  import type { AIArgs } from '../../common';
6
6
  export declare function callAI(messages: ChatCompletionMessageParam[], modelConfig: IModelConfig, options?: {
@@ -35,4 +35,4 @@ export declare function resolveDeepThinkConfig({ deepThink, modelFamily, }: {
35
35
  debugMessage?: string;
36
36
  warningMessage?: string;
37
37
  };
38
- export declare function safeParseJson(input: string, vlMode: TVlModeTypes | undefined): any;
38
+ export declare function safeParseJson(input: string, modelFamily: TModelFamily | undefined): any;
@@ -1,5 +1,5 @@
1
- import type { PlanningAIResponse, Size, UIContext } from '../types';
2
- import { type IModelConfig, UITarsModelVersion } from '@midscene/shared/env';
1
+ import type { PlanningAIResponse, UIContext } from '../types';
2
+ import { type IModelConfig } from '@midscene/shared/env';
3
3
  import type { ConversationHistory } from './conversation-history';
4
4
  type ActionType = 'click' | 'left_double' | 'right_single' | 'drag' | 'type' | 'hotkey' | 'finished' | 'scroll' | 'wait';
5
5
  export declare function uiTarsPlanning(userInstruction: string, options: {
@@ -68,5 +68,4 @@ interface FinishedAction extends BaseAction {
68
68
  action_inputs: Record<string, never>;
69
69
  }
70
70
  export type Action = ClickAction | LeftDoubleAction | RightSingleAction | DragAction | TypeAction | HotkeyAction | ScrollAction | FinishedAction | WaitAction;
71
- export declare function resizeImageForUiTars(imageBase64: string, size: Size, uiTarsVersion: UITarsModelVersion | undefined): Promise<string>;
72
71
  export {};
@@ -1,7 +1,7 @@
1
1
  import type { BaseElement, DeviceAction, ElementTreeNode, MidsceneYamlFlowItem, PlanningAction, Rect, Size } from './types';
2
2
  import type { ChatCompletionMessageParam } from 'openai/resources/index';
3
3
  import type { PlanningLocateParam } from './types';
4
- import type { TVlModeTypes } from '@midscene/shared/env';
4
+ import type { TModelFamily } from '@midscene/shared/env';
5
5
  import { z } from 'zod';
6
6
  export type AIArgs = ChatCompletionMessageParam[];
7
7
  type AdaptBboxInput = number[] | string[] | string | (number[] | string[])[];
@@ -15,20 +15,20 @@ type AdaptBboxInput = number[] | string[] | string | (number[] | string[])[];
15
15
  * @returns [x1, y1, x2, y2] bbox in [0, 1000] coordinate space
16
16
  */
17
17
  export declare function pointToBbox(x: number, y: number, bboxSize?: number): [number, number, number, number];
18
- export declare function fillBboxParam(locate: PlanningLocateParam, width: number, height: number, rightLimit: number, bottomLimit: number, vlMode: TVlModeTypes | undefined): PlanningLocateParam;
18
+ export declare function fillBboxParam(locate: PlanningLocateParam, width: number, height: number, rightLimit: number, bottomLimit: number, modelFamily: TModelFamily | undefined): PlanningLocateParam;
19
19
  export declare function adaptQwen2_5Bbox(bbox: number[]): [number, number, number, number];
20
20
  export declare function adaptDoubaoBbox(bbox: string[] | number[] | string, width: number, height: number): [number, number, number, number];
21
- export declare function adaptBbox(bbox: AdaptBboxInput, width: number, height: number, rightLimit: number, bottomLimit: number, vlMode: TVlModeTypes | undefined): [number, number, number, number];
21
+ export declare function adaptBbox(bbox: AdaptBboxInput, width: number, height: number, rightLimit: number, bottomLimit: number, modelFamily: TModelFamily | undefined): [number, number, number, number];
22
22
  export declare function normalized01000(bbox: number[], width: number, height: number): [number, number, number, number];
23
23
  export declare function adaptGeminiBbox(bbox: number[], width: number, height: number): [number, number, number, number];
24
- export declare function adaptBboxToRect(bbox: number[], width: number, height: number, offsetX?: number, offsetY?: number, rightLimit?: number, bottomLimit?: number, vlMode?: TVlModeTypes | undefined): Rect;
24
+ export declare function adaptBboxToRect(bbox: number[], width: number, height: number, offsetX?: number, offsetY?: number, rightLimit?: number, bottomLimit?: number, modelFamily?: TModelFamily | undefined): Rect;
25
25
  export declare function mergeRects(rects: Rect[]): {
26
26
  left: number;
27
27
  top: number;
28
28
  width: number;
29
29
  height: number;
30
30
  };
31
- export declare function expandSearchArea(rect: Rect, screenSize: Size, vlMode: TVlModeTypes | undefined): Rect;
31
+ export declare function expandSearchArea(rect: Rect, screenSize: Size, modelFamily: TModelFamily | undefined): Rect;
32
32
  export declare function markupImageForLLM(screenshotBase64: string, tree: ElementTreeNode<BaseElement>, size: Size): Promise<string>;
33
33
  export declare function buildYamlFlowFromPlans(plans: PlanningAction[], actionSpace: DeviceAction<any>[]): MidsceneYamlFlowItem[];
34
34
  export declare const PointSchema: z.ZodObject<{
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@midscene/core",
3
3
  "description": "Automate browser actions, extract data, and perform assertions using AI. It offers JavaScript SDK, Chrome extension, and support for scripting in YAML. See https://midscenejs.com/ for details.",
4
- "version": "1.2.2-beta-20260116114131.0",
4
+ "version": "1.2.2-beta-20260119114334.0",
5
5
  "repository": "https://github.com/web-infra-dev/midscene",
6
6
  "homepage": "https://midscenejs.com/",
7
7
  "main": "./dist/lib/index.js",
@@ -89,7 +89,7 @@
89
89
  "semver": "7.5.2",
90
90
  "undici": "^6.0.0",
91
91
  "zod": "3.24.3",
92
- "@midscene/shared": "1.2.2-beta-20260116114131.0"
92
+ "@midscene/shared": "1.2.2-beta-20260119114334.0"
93
93
  },
94
94
  "devDependencies": {
95
95
  "@rslib/core": "^0.18.3",
@@ -1,31 +0,0 @@
1
- const assertSchema = {
2
- type: 'json_schema',
3
- json_schema: {
4
- name: 'assert',
5
- strict: true,
6
- schema: {
7
- type: 'object',
8
- properties: {
9
- pass: {
10
- type: 'boolean',
11
- description: 'Whether the assertion passed or failed'
12
- },
13
- thought: {
14
- type: [
15
- 'string',
16
- 'null'
17
- ],
18
- description: 'The thought process behind the assertion'
19
- }
20
- },
21
- required: [
22
- 'pass',
23
- 'thought'
24
- ],
25
- additionalProperties: false
26
- }
27
- }
28
- };
29
- export { assertSchema };
30
-
31
- //# sourceMappingURL=assertion.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-model/prompt/assertion.mjs","sources":["../../../../src/ai-model/prompt/assertion.ts"],"sourcesContent":["import type { ResponseFormatJSONSchema } from 'openai/resources/index';\n\nexport const assertSchema: ResponseFormatJSONSchema = {\n type: 'json_schema',\n json_schema: {\n name: 'assert',\n strict: true,\n schema: {\n type: 'object',\n properties: {\n pass: {\n type: 'boolean',\n description: 'Whether the assertion passed or failed',\n },\n thought: {\n type: ['string', 'null'],\n description: 'The thought process behind the assertion',\n },\n },\n required: ['pass', 'thought'],\n additionalProperties: false,\n },\n },\n};\n"],"names":["assertSchema"],"mappings":"AAEO,MAAMA,eAAyC;IACpD,MAAM;IACN,aAAa;QACX,MAAM;QACN,QAAQ;QACR,QAAQ;YACN,MAAM;YACN,YAAY;gBACV,MAAM;oBACJ,MAAM;oBACN,aAAa;gBACf;gBACA,SAAS;oBACP,MAAM;wBAAC;wBAAU;qBAAO;oBACxB,aAAa;gBACf;YACF;YACA,UAAU;gBAAC;gBAAQ;aAAU;YAC7B,sBAAsB;QACxB;IACF;AACF"}
@@ -1,65 +0,0 @@
1
- "use strict";
2
- var __webpack_require__ = {};
3
- (()=>{
4
- __webpack_require__.d = (exports1, definition)=>{
5
- for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
- enumerable: true,
7
- get: definition[key]
8
- });
9
- };
10
- })();
11
- (()=>{
12
- __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
- })();
14
- (()=>{
15
- __webpack_require__.r = (exports1)=>{
16
- if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
- value: 'Module'
18
- });
19
- Object.defineProperty(exports1, '__esModule', {
20
- value: true
21
- });
22
- };
23
- })();
24
- var __webpack_exports__ = {};
25
- __webpack_require__.r(__webpack_exports__);
26
- __webpack_require__.d(__webpack_exports__, {
27
- assertSchema: ()=>assertSchema
28
- });
29
- const assertSchema = {
30
- type: 'json_schema',
31
- json_schema: {
32
- name: 'assert',
33
- strict: true,
34
- schema: {
35
- type: 'object',
36
- properties: {
37
- pass: {
38
- type: 'boolean',
39
- description: 'Whether the assertion passed or failed'
40
- },
41
- thought: {
42
- type: [
43
- 'string',
44
- 'null'
45
- ],
46
- description: 'The thought process behind the assertion'
47
- }
48
- },
49
- required: [
50
- 'pass',
51
- 'thought'
52
- ],
53
- additionalProperties: false
54
- }
55
- }
56
- };
57
- exports.assertSchema = __webpack_exports__.assertSchema;
58
- for(var __rspack_i in __webpack_exports__)if (-1 === [
59
- "assertSchema"
60
- ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
61
- Object.defineProperty(exports, '__esModule', {
62
- value: true
63
- });
64
-
65
- //# sourceMappingURL=assertion.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-model/prompt/assertion.js","sources":["webpack/runtime/define_property_getters","webpack/runtime/has_own_property","webpack/runtime/make_namespace_object","../../../../src/ai-model/prompt/assertion.ts"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import type { ResponseFormatJSONSchema } from 'openai/resources/index';\n\nexport const assertSchema: ResponseFormatJSONSchema = {\n type: 'json_schema',\n json_schema: {\n name: 'assert',\n strict: true,\n schema: {\n type: 'object',\n properties: {\n pass: {\n type: 'boolean',\n description: 'Whether the assertion passed or failed',\n },\n thought: {\n type: ['string', 'null'],\n description: 'The thought process behind the assertion',\n },\n },\n required: ['pass', 'thought'],\n additionalProperties: false,\n },\n },\n};\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","assertSchema"],"mappings":";;;IAAAA,oBAAoB,CAAC,GAAG,CAAC,UAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGD,oBAAoB,CAAC,CAACC,YAAYC,QAAQ,CAACF,oBAAoB,CAAC,CAAC,UAASE,MACzEC,OAAO,cAAc,CAAC,UAASD,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAF,oBAAoB,CAAC,GAAG,CAACI,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFL,oBAAoB,CAAC,GAAG,CAAC;QACxB,IAAG,AAAkB,eAAlB,OAAOM,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAAC,UAASG,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAAC,UAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;ACJO,MAAMI,eAAyC;IACpD,MAAM;IACN,aAAa;QACX,MAAM;QACN,QAAQ;QACR,QAAQ;YACN,MAAM;YACN,YAAY;gBACV,MAAM;oBACJ,MAAM;oBACN,aAAa;gBACf;gBACA,SAAS;oBACP,MAAM;wBAAC;wBAAU;qBAAO;oBACxB,aAAa;gBACf;YACF;YACA,UAAU;gBAAC;gBAAQ;aAAU;YAC7B,sBAAsB;QACxB;IACF;AACF"}
@@ -1,2 +0,0 @@
1
- import type { ResponseFormatJSONSchema } from 'openai/resources/index';
2
- export declare const assertSchema: ResponseFormatJSONSchema;