@flanksource/clicky-ui 0.3.40 → 0.3.42
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/README.md +24 -0
- package/dist/ai.cjs +14 -0
- package/dist/ai.cjs.map +1 -1
- package/dist/ai.js +14 -0
- package/dist/ai.js.map +1 -1
- package/dist/comments/CommentCard.cjs +3 -1
- package/dist/comments/CommentCard.cjs.map +1 -1
- package/dist/comments/CommentCard.d.ts.map +1 -1
- package/dist/comments/CommentCard.js +4 -2
- package/dist/comments/CommentCard.js.map +1 -1
- package/dist/comments/CommentCardParts.cjs +16 -0
- package/dist/comments/CommentCardParts.cjs.map +1 -1
- package/dist/comments/CommentCardParts.d.ts +4 -1
- package/dist/comments/CommentCardParts.d.ts.map +1 -1
- package/dist/comments/CommentCardParts.js +16 -0
- package/dist/comments/CommentCardParts.js.map +1 -1
- package/dist/comments/comment-types.cjs.map +1 -1
- package/dist/comments/comment-types.d.ts +4 -0
- package/dist/comments/comment-types.d.ts.map +1 -1
- package/dist/comments/comment-types.js.map +1 -1
- package/dist/components/AccordionList.cjs +5 -1
- package/dist/components/AccordionList.cjs.map +1 -1
- package/dist/components/AccordionList.d.ts +3 -1
- package/dist/components/AccordionList.d.ts.map +1 -1
- package/dist/components/AccordionList.js +5 -1
- package/dist/components/AccordionList.js.map +1 -1
- package/dist/components/Combobox.cjs +54 -8
- package/dist/components/Combobox.cjs.map +1 -1
- package/dist/components/Combobox.d.ts.map +1 -1
- package/dist/components/Combobox.js +56 -10
- package/dist/components/Combobox.js.map +1 -1
- package/dist/components/ComboboxMenu.cjs +139 -113
- package/dist/components/ComboboxMenu.cjs.map +1 -1
- package/dist/components/ComboboxMenu.d.ts +3 -1
- package/dist/components/ComboboxMenu.d.ts.map +1 -1
- package/dist/components/ComboboxMenu.js +139 -113
- package/dist/components/ComboboxMenu.js.map +1 -1
- package/dist/components/ComboboxMenuTrigger.cjs +87 -0
- package/dist/components/ComboboxMenuTrigger.cjs.map +1 -0
- package/dist/components/ComboboxMenuTrigger.d.ts +23 -0
- package/dist/components/ComboboxMenuTrigger.d.ts.map +1 -0
- package/dist/components/ComboboxMenuTrigger.js +87 -0
- package/dist/components/ComboboxMenuTrigger.js.map +1 -0
- package/dist/components/JsonSchemaForm.cjs +39 -11
- package/dist/components/JsonSchemaForm.cjs.map +1 -1
- package/dist/components/JsonSchemaForm.d.ts +1 -1
- package/dist/components/JsonSchemaForm.d.ts.map +1 -1
- package/dist/components/JsonSchemaForm.js +38 -10
- package/dist/components/JsonSchemaForm.js.map +1 -1
- package/dist/components/SegmentedControl.cjs +20 -3
- package/dist/components/SegmentedControl.cjs.map +1 -1
- package/dist/components/SegmentedControl.d.ts +11 -0
- package/dist/components/SegmentedControl.d.ts.map +1 -1
- package/dist/components/SegmentedControl.js +21 -4
- package/dist/components/SegmentedControl.js.map +1 -1
- package/dist/components/combobox-types.d.ts +8 -0
- package/dist/components/combobox-types.d.ts.map +1 -1
- package/dist/components/json-schema-form-accordion-array.cjs +3 -1
- package/dist/components/json-schema-form-accordion-array.cjs.map +1 -1
- package/dist/components/json-schema-form-accordion-array.d.ts +4 -1
- package/dist/components/json-schema-form-accordion-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-accordion-array.js +3 -1
- package/dist/components/json-schema-form-accordion-array.js.map +1 -1
- package/dist/components/json-schema-form-array-view.cjs +63 -0
- package/dist/components/json-schema-form-array-view.cjs.map +1 -0
- package/dist/components/json-schema-form-array-view.d.ts +21 -0
- package/dist/components/json-schema-form-array-view.d.ts.map +1 -0
- package/dist/components/json-schema-form-array-view.js +63 -0
- package/dist/components/json-schema-form-array-view.js.map +1 -0
- package/dist/components/json-schema-form-array.cjs +3 -7
- package/dist/components/json-schema-form-array.cjs.map +1 -1
- package/dist/components/json-schema-form-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-array.js +3 -7
- package/dist/components/json-schema-form-array.js.map +1 -1
- package/dist/components/json-schema-form-conditionals.cjs +67 -0
- package/dist/components/json-schema-form-conditionals.cjs.map +1 -0
- package/dist/components/json-schema-form-conditionals.d.ts +9 -0
- package/dist/components/json-schema-form-conditionals.d.ts.map +1 -0
- package/dist/components/json-schema-form-conditionals.js +67 -0
- package/dist/components/json-schema-form-conditionals.js.map +1 -0
- package/dist/components/json-schema-form-debug-badge.cjs +108 -0
- package/dist/components/json-schema-form-debug-badge.cjs.map +1 -0
- package/dist/components/json-schema-form-debug-badge.d.ts +10 -0
- package/dist/components/json-schema-form-debug-badge.d.ts.map +1 -0
- package/dist/components/json-schema-form-debug-badge.js +108 -0
- package/dist/components/json-schema-form-debug-badge.js.map +1 -0
- package/dist/components/json-schema-form-debug-glyph-map.cjs +129 -0
- package/dist/components/json-schema-form-debug-glyph-map.cjs.map +1 -0
- package/dist/components/json-schema-form-debug-glyph-map.d.ts +20 -0
- package/dist/components/json-schema-form-debug-glyph-map.d.ts.map +1 -0
- package/dist/components/json-schema-form-debug-glyph-map.js +129 -0
- package/dist/components/json-schema-form-debug-glyph-map.js.map +1 -0
- package/dist/components/json-schema-form-debug-glyph.cjs +13 -0
- package/dist/components/json-schema-form-debug-glyph.cjs.map +1 -0
- package/dist/components/json-schema-form-debug-glyph.d.ts +6 -0
- package/dist/components/json-schema-form-debug-glyph.d.ts.map +1 -0
- package/dist/components/json-schema-form-debug-glyph.js +13 -0
- package/dist/components/json-schema-form-debug-glyph.js.map +1 -0
- package/dist/components/json-schema-form-debug-groups.cjs +56 -0
- package/dist/components/json-schema-form-debug-groups.cjs.map +1 -0
- package/dist/components/json-schema-form-debug-groups.d.ts +8 -0
- package/dist/components/json-schema-form-debug-groups.d.ts.map +1 -0
- package/dist/components/json-schema-form-debug-groups.js +56 -0
- package/dist/components/json-schema-form-debug-groups.js.map +1 -0
- package/dist/components/json-schema-form-debug-keywords.cjs +159 -0
- package/dist/components/json-schema-form-debug-keywords.cjs.map +1 -0
- package/dist/components/json-schema-form-debug-keywords.d.ts +6 -0
- package/dist/components/json-schema-form-debug-keywords.d.ts.map +1 -0
- package/dist/components/json-schema-form-debug-keywords.js +159 -0
- package/dist/components/json-schema-form-debug-keywords.js.map +1 -0
- package/dist/components/json-schema-form-debug-listeners.cjs +102 -0
- package/dist/components/json-schema-form-debug-listeners.cjs.map +1 -0
- package/dist/components/json-schema-form-debug-listeners.d.ts +6 -0
- package/dist/components/json-schema-form-debug-listeners.d.ts.map +1 -0
- package/dist/components/json-schema-form-debug-listeners.js +102 -0
- package/dist/components/json-schema-form-debug-listeners.js.map +1 -0
- package/dist/components/json-schema-form-debug.cjs +31 -0
- package/dist/components/json-schema-form-debug.cjs.map +1 -0
- package/dist/components/json-schema-form-debug.d.ts +11 -0
- package/dist/components/json-schema-form-debug.d.ts.map +1 -0
- package/dist/components/json-schema-form-debug.js +31 -0
- package/dist/components/json-schema-form-debug.js.map +1 -0
- package/dist/components/json-schema-form-defaults.cjs +68 -0
- package/dist/components/json-schema-form-defaults.cjs.map +1 -0
- package/dist/components/json-schema-form-defaults.d.ts +4 -0
- package/dist/components/json-schema-form-defaults.d.ts.map +1 -0
- package/dist/components/json-schema-form-defaults.js +68 -0
- package/dist/components/json-schema-form-defaults.js.map +1 -0
- package/dist/components/json-schema-form-enum-choice.cjs +114 -0
- package/dist/components/json-schema-form-enum-choice.cjs.map +1 -0
- package/dist/components/json-schema-form-enum-choice.d.ts +14 -0
- package/dist/components/json-schema-form-enum-choice.d.ts.map +1 -0
- package/dist/components/json-schema-form-enum-choice.js +114 -0
- package/dist/components/json-schema-form-enum-choice.js.map +1 -0
- package/dist/components/json-schema-form-errors.cjs +49 -31
- package/dist/components/json-schema-form-errors.cjs.map +1 -1
- package/dist/components/json-schema-form-errors.d.ts +4 -2
- package/dist/components/json-schema-form-errors.d.ts.map +1 -1
- package/dist/components/json-schema-form-errors.js +51 -33
- package/dist/components/json-schema-form-errors.js.map +1 -1
- package/dist/components/json-schema-form-fields.cjs +3 -93
- package/dist/components/json-schema-form-fields.cjs.map +1 -1
- package/dist/components/json-schema-form-fields.d.ts.map +1 -1
- package/dist/components/json-schema-form-fields.js +1 -91
- package/dist/components/json-schema-form-fields.js.map +1 -1
- package/dist/components/json-schema-form-filter.cjs +2 -1
- package/dist/components/json-schema-form-filter.cjs.map +1 -1
- package/dist/components/json-schema-form-filter.js +2 -1
- package/dist/components/json-schema-form-filter.js.map +1 -1
- package/dist/components/json-schema-form-item-summary.cjs +6 -2
- package/dist/components/json-schema-form-item-summary.cjs.map +1 -1
- package/dist/components/json-schema-form-item-summary.d.ts.map +1 -1
- package/dist/components/json-schema-form-item-summary.js +6 -2
- package/dist/components/json-schema-form-item-summary.js.map +1 -1
- package/dist/components/json-schema-form-layout.cjs +28 -19
- package/dist/components/json-schema-form-layout.cjs.map +1 -1
- package/dist/components/json-schema-form-layout.d.ts +8 -6
- package/dist/components/json-schema-form-layout.d.ts.map +1 -1
- package/dist/components/json-schema-form-layout.js +29 -20
- package/dist/components/json-schema-form-layout.js.map +1 -1
- package/dist/components/json-schema-form-listener-paths.cjs +52 -0
- package/dist/components/json-schema-form-listener-paths.cjs.map +1 -0
- package/dist/components/json-schema-form-listener-paths.d.ts +10 -0
- package/dist/components/json-schema-form-listener-paths.d.ts.map +1 -0
- package/dist/components/json-schema-form-listener-paths.js +52 -0
- package/dist/components/json-schema-form-listener-paths.js.map +1 -0
- package/dist/components/json-schema-form-listener-types.d.ts +22 -0
- package/dist/components/json-schema-form-listener-types.d.ts.map +1 -0
- package/dist/components/json-schema-form-listeners.cjs +256 -0
- package/dist/components/json-schema-form-listeners.cjs.map +1 -0
- package/dist/components/json-schema-form-listeners.d.ts +13 -0
- package/dist/components/json-schema-form-listeners.d.ts.map +1 -0
- package/dist/components/json-schema-form-listeners.js +256 -0
- package/dist/components/json-schema-form-listeners.js.map +1 -0
- package/dist/components/json-schema-form-object-array-view.cjs +62 -0
- package/dist/components/json-schema-form-object-array-view.cjs.map +1 -0
- package/dist/components/json-schema-form-object-array-view.d.ts +14 -0
- package/dist/components/json-schema-form-object-array-view.d.ts.map +1 -0
- package/dist/components/json-schema-form-object-array-view.js +62 -0
- package/dist/components/json-schema-form-object-array-view.js.map +1 -0
- package/dist/components/json-schema-form-object.cjs +3 -0
- package/dist/components/json-schema-form-object.cjs.map +1 -1
- package/dist/components/json-schema-form-object.d.ts.map +1 -1
- package/dist/components/json-schema-form-object.js +3 -0
- package/dist/components/json-schema-form-object.js.map +1 -1
- package/dist/components/json-schema-form-preferences.cjs +1 -0
- package/dist/components/json-schema-form-preferences.cjs.map +1 -1
- package/dist/components/json-schema-form-preferences.d.ts +1 -0
- package/dist/components/json-schema-form-preferences.d.ts.map +1 -1
- package/dist/components/json-schema-form-preferences.js +1 -0
- package/dist/components/json-schema-form-preferences.js.map +1 -1
- package/dist/components/json-schema-form-render.cjs +36 -12
- package/dist/components/json-schema-form-render.cjs.map +1 -1
- package/dist/components/json-schema-form-render.d.ts.map +1 -1
- package/dist/components/json-schema-form-render.js +38 -14
- package/dist/components/json-schema-form-render.js.map +1 -1
- package/dist/components/json-schema-form-resolve.cjs +6 -99
- package/dist/components/json-schema-form-resolve.cjs.map +1 -1
- package/dist/components/json-schema-form-resolve.d.ts +1 -8
- package/dist/components/json-schema-form-resolve.d.ts.map +1 -1
- package/dist/components/json-schema-form-resolve.js +5 -98
- package/dist/components/json-schema-form-resolve.js.map +1 -1
- package/dist/components/json-schema-form-runtime-types.d.ts +16 -0
- package/dist/components/json-schema-form-runtime-types.d.ts.map +1 -1
- package/dist/components/json-schema-form-table-array.cjs +67 -16
- package/dist/components/json-schema-form-table-array.cjs.map +1 -1
- package/dist/components/json-schema-form-table-array.d.ts +4 -1
- package/dist/components/json-schema-form-table-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-table-array.js +70 -19
- package/dist/components/json-schema-form-table-array.js.map +1 -1
- package/dist/components/json-schema-form-tone.cjs +12 -0
- package/dist/components/json-schema-form-tone.cjs.map +1 -1
- package/dist/components/json-schema-form-tone.js +12 -0
- package/dist/components/json-schema-form-tone.js.map +1 -1
- package/dist/components/json-schema-form-types.d.ts +17 -0
- package/dist/components/json-schema-form-types.d.ts.map +1 -1
- package/dist/components/json-schema-form-utils.cjs +7 -1
- package/dist/components/json-schema-form-utils.cjs.map +1 -1
- package/dist/components/json-schema-form-utils.d.ts +2 -1
- package/dist/components/json-schema-form-utils.d.ts.map +1 -1
- package/dist/components/json-schema-form-utils.js +7 -1
- package/dist/components/json-schema-form-utils.js.map +1 -1
- package/dist/components.cjs +3 -2
- package/dist/components.cjs.map +1 -1
- package/dist/components.d.ts +3 -2
- package/dist/components.d.ts.map +1 -1
- package/dist/components.js +2 -1
- package/dist/components.js.map +1 -1
- package/dist/data/DataTable.cjs +9 -3
- package/dist/data/DataTable.cjs.map +1 -1
- package/dist/data/DataTable.d.ts +6 -0
- package/dist/data/DataTable.d.ts.map +1 -1
- package/dist/data/DataTable.js +9 -3
- package/dist/data/DataTable.js.map +1 -1
- package/dist/data/FixtureEditor/FixtureEditor.cjs +43 -24
- package/dist/data/FixtureEditor/FixtureEditor.cjs.map +1 -1
- package/dist/data/FixtureEditor/FixtureEditor.d.ts.map +1 -1
- package/dist/data/FixtureEditor/FixtureEditor.js +43 -24
- package/dist/data/FixtureEditor/FixtureEditor.js.map +1 -1
- package/dist/data/GraphDiagram.cjs +125 -138
- package/dist/data/GraphDiagram.cjs.map +1 -1
- package/dist/data/GraphDiagram.d.ts +30 -23
- package/dist/data/GraphDiagram.d.ts.map +1 -1
- package/dist/data/GraphDiagram.js +128 -141
- package/dist/data/GraphDiagram.js.map +1 -1
- package/dist/data/GraphDiagramEdges.cjs +208 -0
- package/dist/data/GraphDiagramEdges.cjs.map +1 -0
- package/dist/data/GraphDiagramEdges.d.ts +40 -0
- package/dist/data/GraphDiagramEdges.d.ts.map +1 -0
- package/dist/data/GraphDiagramEdges.js +208 -0
- package/dist/data/GraphDiagramEdges.js.map +1 -0
- package/dist/data/GraphDiagramNodes.cjs +142 -0
- package/dist/data/GraphDiagramNodes.cjs.map +1 -0
- package/dist/data/GraphDiagramNodes.d.ts +22 -0
- package/dist/data/GraphDiagramNodes.d.ts.map +1 -0
- package/dist/data/GraphDiagramNodes.js +142 -0
- package/dist/data/GraphDiagramNodes.js.map +1 -0
- package/dist/data/Tree.cjs +10 -2
- package/dist/data/Tree.cjs.map +1 -1
- package/dist/data/Tree.d.ts +6 -1
- package/dist/data/Tree.d.ts.map +1 -1
- package/dist/data/Tree.js +10 -2
- package/dist/data/Tree.js.map +1 -1
- package/dist/data/ai/PromptRunEditor/RuntimeRows.cjs +8 -3
- package/dist/data/ai/PromptRunEditor/RuntimeRows.cjs.map +1 -1
- package/dist/data/ai/PromptRunEditor/RuntimeRows.d.ts.map +1 -1
- package/dist/data/ai/PromptRunEditor/RuntimeRows.js +8 -3
- package/dist/data/ai/PromptRunEditor/RuntimeRows.js.map +1 -1
- package/dist/data/ai/PromptRunEditor/index.cjs +37 -43
- package/dist/data/ai/PromptRunEditor/index.cjs.map +1 -1
- package/dist/data/ai/PromptRunEditor/index.d.ts +3 -1
- package/dist/data/ai/PromptRunEditor/index.d.ts.map +1 -1
- package/dist/data/ai/PromptRunEditor/index.js +38 -44
- package/dist/data/ai/PromptRunEditor/index.js.map +1 -1
- package/dist/data/ai/PromptRunEditor/runtimeActions.cjs +16 -5
- package/dist/data/ai/PromptRunEditor/runtimeActions.cjs.map +1 -1
- package/dist/data/ai/PromptRunEditor/runtimeActions.d.ts +4 -1
- package/dist/data/ai/PromptRunEditor/runtimeActions.d.ts.map +1 -1
- package/dist/data/ai/PromptRunEditor/runtimeActions.js +17 -6
- package/dist/data/ai/PromptRunEditor/runtimeActions.js.map +1 -1
- package/dist/data/ai/SessionInspector.approvals-model.cjs +12 -0
- package/dist/data/ai/SessionInspector.approvals-model.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.approvals-model.d.ts +11 -2
- package/dist/data/ai/SessionInspector.approvals-model.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.approvals-model.js +12 -0
- package/dist/data/ai/SessionInspector.approvals-model.js.map +1 -1
- package/dist/data/ai/SessionInspector.approvals.cjs +25 -1
- package/dist/data/ai/SessionInspector.approvals.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.approvals.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.approvals.js +26 -2
- package/dist/data/ai/SessionInspector.approvals.js.map +1 -1
- package/dist/data/ai/SessionInspector.cjs +143 -167
- package/dist/data/ai/SessionInspector.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.collection-types.d.ts +5 -0
- package/dist/data/ai/SessionInspector.collection-types.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.collection.cjs +18 -5
- package/dist/data/ai/SessionInspector.collection.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.collection.d.ts +2 -0
- package/dist/data/ai/SessionInspector.collection.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.collection.fixtures.d.ts +6 -0
- package/dist/data/ai/SessionInspector.collection.fixtures.d.ts.map +1 -0
- package/dist/data/ai/SessionInspector.collection.js +18 -5
- package/dist/data/ai/SessionInspector.collection.js.map +1 -1
- package/dist/data/ai/SessionInspector.d.ts +24 -2
- package/dist/data/ai/SessionInspector.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.hierarchy-state.cjs +105 -7
- package/dist/data/ai/SessionInspector.hierarchy-state.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.hierarchy-state.d.ts +12 -1
- package/dist/data/ai/SessionInspector.hierarchy-state.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.hierarchy-state.js +107 -9
- package/dist/data/ai/SessionInspector.hierarchy-state.js.map +1 -1
- package/dist/data/ai/SessionInspector.hierarchy.cjs +1 -1
- package/dist/data/ai/SessionInspector.hierarchy.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.hierarchy.js +1 -1
- package/dist/data/ai/SessionInspector.hierarchy.js.map +1 -1
- package/dist/data/ai/SessionInspector.js +144 -168
- package/dist/data/ai/SessionInspector.js.map +1 -1
- package/dist/data/ai/SessionInspector.legacy.cjs +116 -0
- package/dist/data/ai/SessionInspector.legacy.cjs.map +1 -0
- package/dist/data/ai/SessionInspector.legacy.d.ts +19 -0
- package/dist/data/ai/SessionInspector.legacy.d.ts.map +1 -0
- package/dist/data/ai/SessionInspector.legacy.js +116 -0
- package/dist/data/ai/SessionInspector.legacy.js.map +1 -0
- package/dist/data/ai/SessionInspector.panels.cjs +3 -0
- package/dist/data/ai/SessionInspector.panels.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.panels.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.panels.js +3 -0
- package/dist/data/ai/SessionInspector.panels.js.map +1 -1
- package/dist/data/ai/SessionInspector.plan.cjs +29 -12
- package/dist/data/ai/SessionInspector.plan.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.plan.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.plan.js +30 -13
- package/dist/data/ai/SessionInspector.plan.js.map +1 -1
- package/dist/data/ai/SessionInspector.remote-view.cjs +44 -0
- package/dist/data/ai/SessionInspector.remote-view.cjs.map +1 -0
- package/dist/data/ai/SessionInspector.remote-view.d.ts +11 -0
- package/dist/data/ai/SessionInspector.remote-view.d.ts.map +1 -0
- package/dist/data/ai/SessionInspector.remote-view.js +44 -0
- package/dist/data/ai/SessionInspector.remote-view.js.map +1 -0
- package/dist/data/ai/SessionInspector.remote.cjs +275 -0
- package/dist/data/ai/SessionInspector.remote.cjs.map +1 -0
- package/dist/data/ai/SessionInspector.remote.d.ts +57 -0
- package/dist/data/ai/SessionInspector.remote.d.ts.map +1 -0
- package/dist/data/ai/SessionInspector.remote.js +275 -0
- package/dist/data/ai/SessionInspector.remote.js.map +1 -0
- package/dist/data/ai/SessionInspector.summary.cjs +9 -159
- package/dist/data/ai/SessionInspector.summary.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.summary.d.ts +0 -3
- package/dist/data/ai/SessionInspector.summary.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.summary.js +11 -161
- package/dist/data/ai/SessionInspector.summary.js.map +1 -1
- package/dist/data/ai/SessionInspector.tab-state.cjs +15 -0
- package/dist/data/ai/SessionInspector.tab-state.cjs.map +1 -0
- package/dist/data/ai/SessionInspector.tab-state.d.ts +3 -0
- package/dist/data/ai/SessionInspector.tab-state.d.ts.map +1 -0
- package/dist/data/ai/SessionInspector.tab-state.js +15 -0
- package/dist/data/ai/SessionInspector.tab-state.js.map +1 -0
- package/dist/data/ai/SessionInspector.tabs.model.cjs +31 -18
- package/dist/data/ai/SessionInspector.tabs.model.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.tabs.model.d.ts +3 -1
- package/dist/data/ai/SessionInspector.tabs.model.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.tabs.model.js +32 -19
- package/dist/data/ai/SessionInspector.tabs.model.js.map +1 -1
- package/dist/data/ai/SessionInspector.transcript.cjs +4 -0
- package/dist/data/ai/SessionInspector.transcript.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.transcript.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.transcript.js +4 -0
- package/dist/data/ai/SessionInspector.transcript.js.map +1 -1
- package/dist/data/ai/SessionInspector.verification.cjs +53 -0
- package/dist/data/ai/SessionInspector.verification.cjs.map +1 -0
- package/dist/data/ai/SessionInspector.verification.d.ts +7 -0
- package/dist/data/ai/SessionInspector.verification.d.ts.map +1 -0
- package/dist/data/ai/SessionInspector.verification.js +53 -0
- package/dist/data/ai/SessionInspector.verification.js.map +1 -0
- package/dist/data/ai/SessionViewer.approval-body.cjs +146 -0
- package/dist/data/ai/SessionViewer.approval-body.cjs.map +1 -0
- package/dist/data/ai/SessionViewer.approval-body.d.ts +11 -0
- package/dist/data/ai/SessionViewer.approval-body.d.ts.map +1 -0
- package/dist/data/ai/SessionViewer.approval-body.js +146 -0
- package/dist/data/ai/SessionViewer.approval-body.js.map +1 -0
- package/dist/data/ai/SessionViewer.approval-forms.cjs +150 -0
- package/dist/data/ai/SessionViewer.approval-forms.cjs.map +1 -0
- package/dist/data/ai/SessionViewer.approval-forms.d.ts +23 -0
- package/dist/data/ai/SessionViewer.approval-forms.d.ts.map +1 -0
- package/dist/data/ai/SessionViewer.approval-forms.js +150 -0
- package/dist/data/ai/SessionViewer.approval-forms.js.map +1 -0
- package/dist/data/ai/SessionViewer.cjs +57 -20
- package/dist/data/ai/SessionViewer.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.d.ts +13 -3
- package/dist/data/ai/SessionViewer.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.decision-controls.cjs +313 -0
- package/dist/data/ai/SessionViewer.decision-controls.cjs.map +1 -0
- package/dist/data/ai/SessionViewer.decision-controls.d.ts +43 -0
- package/dist/data/ai/SessionViewer.decision-controls.d.ts.map +1 -0
- package/dist/data/ai/SessionViewer.decision-controls.js +313 -0
- package/dist/data/ai/SessionViewer.decision-controls.js.map +1 -0
- package/dist/data/ai/SessionViewer.decision.cjs +21 -0
- package/dist/data/ai/SessionViewer.decision.cjs.map +1 -0
- package/dist/data/ai/SessionViewer.decision.d.ts +12 -0
- package/dist/data/ai/SessionViewer.decision.d.ts.map +1 -0
- package/dist/data/ai/SessionViewer.decision.js +21 -0
- package/dist/data/ai/SessionViewer.decision.js.map +1 -0
- package/dist/data/ai/SessionViewer.input.cjs +14 -0
- package/dist/data/ai/SessionViewer.input.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.input.d.ts +5 -0
- package/dist/data/ai/SessionViewer.input.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.input.js +14 -0
- package/dist/data/ai/SessionViewer.input.js.map +1 -1
- package/dist/data/ai/SessionViewer.js +58 -21
- package/dist/data/ai/SessionViewer.js.map +1 -1
- package/dist/data/ai/SessionViewer.model.cjs +7 -1
- package/dist/data/ai/SessionViewer.model.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.model.d.ts +25 -3
- package/dist/data/ai/SessionViewer.model.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.model.js +7 -1
- package/dist/data/ai/SessionViewer.model.js.map +1 -1
- package/dist/data/ai/SessionViewer.rows.cjs +6 -3
- package/dist/data/ai/SessionViewer.rows.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.rows.d.ts +2 -1
- package/dist/data/ai/SessionViewer.rows.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.rows.js +6 -3
- package/dist/data/ai/SessionViewer.rows.js.map +1 -1
- package/dist/data/ai/SessionViewer.tool-row.cjs +29 -237
- package/dist/data/ai/SessionViewer.tool-row.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.tool-row.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.tool-row.js +27 -235
- package/dist/data/ai/SessionViewer.tool-row.js.map +1 -1
- package/dist/data/ai/SessionViewer.unified.d.ts +17 -0
- package/dist/data/ai/SessionViewer.unified.d.ts.map +1 -1
- package/dist/data/ai/SessionViewerMenu.cjs +8 -2
- package/dist/data/ai/SessionViewerMenu.cjs.map +1 -1
- package/dist/data/ai/SessionViewerMenu.d.ts +4 -1
- package/dist/data/ai/SessionViewerMenu.d.ts.map +1 -1
- package/dist/data/ai/SessionViewerMenu.js +8 -2
- package/dist/data/ai/SessionViewerMenu.js.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/CommitSection.cjs +28 -17
- package/dist/data/ai/SpecRuntimeEditor/CommitSection.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/CommitSection.d.ts +10 -2
- package/dist/data/ai/SpecRuntimeEditor/CommitSection.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/CommitSection.js +29 -18
- package/dist/data/ai/SpecRuntimeEditor/CommitSection.js.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/index.cjs +9 -1
- package/dist/data/ai/SpecRuntimeEditor/index.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/index.d.ts +9 -2
- package/dist/data/ai/SpecRuntimeEditor/index.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/index.js +9 -1
- package/dist/data/ai/SpecRuntimeEditor/index.js.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/permission-mode-visuals.cjs +1 -1
- package/dist/data/ai/SpecRuntimeEditor/permission-mode-visuals.js +1 -1
- package/dist/data/ai/SpecRuntimeEditor/summaries.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/summaries.d.ts +8 -2
- package/dist/data/ai/SpecRuntimeEditor/summaries.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/summaries.js.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/update.cjs +14 -6
- package/dist/data/ai/SpecRuntimeEditor/update.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/update.d.ts +1 -0
- package/dist/data/ai/SpecRuntimeEditor/update.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/update.js +14 -6
- package/dist/data/ai/SpecRuntimeEditor/update.js.map +1 -1
- package/dist/data/ai/approval-request.cjs +75 -0
- package/dist/data/ai/approval-request.cjs.map +1 -0
- package/dist/data/ai/approval-request.d.ts +155 -0
- package/dist/data/ai/approval-request.d.ts.map +1 -0
- package/dist/data/ai/approval-request.js +75 -0
- package/dist/data/ai/approval-request.js.map +1 -0
- package/dist/data/ai/index.d.ts +6 -1
- package/dist/data/ai/index.d.ts.map +1 -1
- package/dist/data/ai/runtime-preset-menu/SavePresetDialog.cjs +125 -0
- package/dist/data/ai/runtime-preset-menu/SavePresetDialog.cjs.map +1 -0
- package/dist/data/ai/runtime-preset-menu/SavePresetDialog.d.ts +11 -0
- package/dist/data/ai/runtime-preset-menu/SavePresetDialog.d.ts.map +1 -0
- package/dist/data/ai/runtime-preset-menu/SavePresetDialog.js +125 -0
- package/dist/data/ai/runtime-preset-menu/SavePresetDialog.js.map +1 -0
- package/dist/data/ai/runtime-preset-menu/index.d.ts +3 -0
- package/dist/data/ai/runtime-preset-menu/index.d.ts.map +1 -0
- package/dist/data/ai/runtime-preset-menu/model.cjs +73 -0
- package/dist/data/ai/runtime-preset-menu/model.cjs.map +1 -0
- package/dist/data/ai/runtime-preset-menu/model.d.ts +13 -0
- package/dist/data/ai/runtime-preset-menu/model.d.ts.map +1 -0
- package/dist/data/ai/runtime-preset-menu/model.js +73 -0
- package/dist/data/ai/runtime-preset-menu/model.js.map +1 -0
- package/dist/data/ai/runtime-preset-menu/use-runtime-preset-menu.cjs +149 -0
- package/dist/data/ai/runtime-preset-menu/use-runtime-preset-menu.cjs.map +1 -0
- package/dist/data/ai/runtime-preset-menu/use-runtime-preset-menu.d.ts +15 -0
- package/dist/data/ai/runtime-preset-menu/use-runtime-preset-menu.d.ts.map +1 -0
- package/dist/data/ai/runtime-preset-menu/use-runtime-preset-menu.js +149 -0
- package/dist/data/ai/runtime-preset-menu/use-runtime-preset-menu.js.map +1 -0
- package/dist/data/ai/runtime-spec-fields.cjs +166 -0
- package/dist/data/ai/runtime-spec-fields.cjs.map +1 -0
- package/dist/data/ai/runtime-spec-fields.d.ts +13 -0
- package/dist/data/ai/runtime-spec-fields.d.ts.map +1 -0
- package/dist/data/ai/runtime-spec-fields.js +166 -0
- package/dist/data/ai/runtime-spec-fields.js.map +1 -0
- package/dist/data/ai/session-categories.cjs +4 -0
- package/dist/data/ai/session-categories.cjs.map +1 -1
- package/dist/data/ai/session-categories.d.ts +1 -0
- package/dist/data/ai/session-categories.d.ts.map +1 -1
- package/dist/data/ai/session-categories.js +4 -0
- package/dist/data/ai/session-categories.js.map +1 -1
- package/dist/data/ai/use-session-scroll.cjs +49 -21
- package/dist/data/ai/use-session-scroll.cjs.map +1 -1
- package/dist/data/ai/use-session-scroll.d.ts +2 -0
- package/dist/data/ai/use-session-scroll.d.ts.map +1 -1
- package/dist/data/ai/use-session-scroll.js +49 -21
- package/dist/data/ai/use-session-scroll.js.map +1 -1
- package/dist/data/chat/Chat.runtime.cjs +1 -1
- package/dist/data/chat/Chat.runtime.cjs.map +1 -1
- package/dist/data/chat/Chat.runtime.d.ts.map +1 -1
- package/dist/data/chat/Chat.runtime.js +1 -1
- package/dist/data/chat/Chat.runtime.js.map +1 -1
- package/dist/data/graph-columns-layout.cjs +216 -0
- package/dist/data/graph-columns-layout.cjs.map +1 -0
- package/dist/data/graph-columns-layout.d.ts +56 -0
- package/dist/data/graph-columns-layout.d.ts.map +1 -0
- package/dist/data/graph-columns-layout.js +216 -0
- package/dist/data/graph-columns-layout.js.map +1 -0
- package/dist/data/graph-diagram-model.cjs +73 -0
- package/dist/data/graph-diagram-model.cjs.map +1 -0
- package/dist/data/graph-diagram-model.d.ts +90 -0
- package/dist/data/graph-diagram-model.d.ts.map +1 -0
- package/dist/data/graph-diagram-model.js +73 -0
- package/dist/data/graph-diagram-model.js.map +1 -0
- package/dist/data/graph-edge-routing.cjs +235 -0
- package/dist/data/graph-edge-routing.cjs.map +1 -0
- package/dist/data/graph-edge-routing.d.ts +73 -0
- package/dist/data/graph-edge-routing.d.ts.map +1 -0
- package/dist/data/graph-edge-routing.js +235 -0
- package/dist/data/graph-edge-routing.js.map +1 -0
- package/dist/data/graph-layout.cjs +0 -82
- package/dist/data/graph-layout.cjs.map +1 -1
- package/dist/data/graph-layout.d.ts +1 -28
- package/dist/data/graph-layout.d.ts.map +1 -1
- package/dist/data/graph-layout.js +1 -83
- package/dist/data/graph-layout.js.map +1 -1
- package/dist/data/har/HarPanel.cjs +129 -33
- package/dist/data/har/HarPanel.cjs.map +1 -1
- package/dist/data/har/HarPanel.d.ts +13 -1
- package/dist/data/har/HarPanel.d.ts.map +1 -1
- package/dist/data/har/HarPanel.js +130 -34
- package/dist/data/har/HarPanel.js.map +1 -1
- package/dist/data/har/fixtures.d.ts +12 -0
- package/dist/data/har/fixtures.d.ts.map +1 -1
- package/dist/data/har/types.d.ts +12 -0
- package/dist/data/har/types.d.ts.map +1 -1
- package/dist/data/runtime/RuntimeBar.cjs +67 -84
- package/dist/data/runtime/RuntimeBar.cjs.map +1 -1
- package/dist/data/runtime/RuntimeBar.d.ts +4 -5
- package/dist/data/runtime/RuntimeBar.d.ts.map +1 -1
- package/dist/data/runtime/RuntimeBar.fields.cjs +170 -0
- package/dist/data/runtime/RuntimeBar.fields.cjs.map +1 -0
- package/dist/data/runtime/RuntimeBar.fields.d.ts +16 -0
- package/dist/data/runtime/RuntimeBar.fields.d.ts.map +1 -0
- package/dist/data/runtime/RuntimeBar.fields.js +170 -0
- package/dist/data/runtime/RuntimeBar.fields.js.map +1 -0
- package/dist/data/runtime/RuntimeBar.js +70 -87
- package/dist/data/runtime/RuntimeBar.js.map +1 -1
- package/dist/data/runtime/RuntimeBar.selection.cjs +56 -0
- package/dist/data/runtime/RuntimeBar.selection.cjs.map +1 -0
- package/dist/data/runtime/RuntimeBar.selection.d.ts +20 -0
- package/dist/data/runtime/RuntimeBar.selection.d.ts.map +1 -0
- package/dist/data/runtime/RuntimeBar.selection.js +56 -0
- package/dist/data/runtime/RuntimeBar.selection.js.map +1 -0
- package/dist/data/runtime/RuntimeBarActions.cjs +10 -6
- package/dist/data/runtime/RuntimeBarActions.cjs.map +1 -1
- package/dist/data/runtime/RuntimeBarActions.d.ts +8 -1
- package/dist/data/runtime/RuntimeBarActions.d.ts.map +1 -1
- package/dist/data/runtime/RuntimeBarActions.js +10 -6
- package/dist/data/runtime/RuntimeBarActions.js.map +1 -1
- package/dist/data/runtime/RuntimeBarIdentity.cjs +166 -0
- package/dist/data/runtime/RuntimeBarIdentity.cjs.map +1 -0
- package/dist/data/runtime/RuntimeBarIdentity.d.ts +25 -0
- package/dist/data/runtime/RuntimeBarIdentity.d.ts.map +1 -0
- package/dist/data/runtime/RuntimeBarIdentity.js +166 -0
- package/dist/data/runtime/RuntimeBarIdentity.js.map +1 -0
- package/dist/data/runtime/RuntimeBarLayout.cjs +95 -0
- package/dist/data/runtime/RuntimeBarLayout.cjs.map +1 -0
- package/dist/data/runtime/RuntimeBarLayout.d.ts +9 -0
- package/dist/data/runtime/RuntimeBarLayout.d.ts.map +1 -0
- package/dist/data/runtime/RuntimeBarLayout.js +95 -0
- package/dist/data/runtime/RuntimeBarLayout.js.map +1 -0
- package/dist/data/runtime/RuntimeBarSegment.cjs +25 -14
- package/dist/data/runtime/RuntimeBarSegment.cjs.map +1 -1
- package/dist/data/runtime/RuntimeBarSegment.d.ts +4 -0
- package/dist/data/runtime/RuntimeBarSegment.d.ts.map +1 -1
- package/dist/data/runtime/RuntimeBarSegment.js +25 -14
- package/dist/data/runtime/RuntimeBarSegment.js.map +1 -1
- package/dist/data/runtime/RuntimeLimitInput.cjs +41 -0
- package/dist/data/runtime/RuntimeLimitInput.cjs.map +1 -0
- package/dist/data/runtime/RuntimeLimitInput.d.ts +9 -0
- package/dist/data/runtime/RuntimeLimitInput.d.ts.map +1 -0
- package/dist/data/runtime/RuntimeLimitInput.js +41 -0
- package/dist/data/runtime/RuntimeLimitInput.js.map +1 -0
- package/dist/data/runtime/use-runtime-bar-overflow.cjs +70 -0
- package/dist/data/runtime/use-runtime-bar-overflow.cjs.map +1 -0
- package/dist/data/runtime/use-runtime-bar-overflow.d.ts +13 -0
- package/dist/data/runtime/use-runtime-bar-overflow.d.ts.map +1 -0
- package/dist/data/runtime/use-runtime-bar-overflow.js +70 -0
- package/dist/data/runtime/use-runtime-bar-overflow.js.map +1 -0
- package/dist/data/use-edge-focus.cjs +20 -0
- package/dist/data/use-edge-focus.cjs.map +1 -0
- package/dist/data/use-edge-focus.d.ts +23 -0
- package/dist/data/use-edge-focus.d.ts.map +1 -0
- package/dist/data/use-edge-focus.js +20 -0
- package/dist/data/use-edge-focus.js.map +1 -0
- package/dist/data/use-pan-zoom.cjs +159 -0
- package/dist/data/use-pan-zoom.cjs.map +1 -0
- package/dist/data/use-pan-zoom.d.ts +79 -0
- package/dist/data/use-pan-zoom.d.ts.map +1 -0
- package/dist/data/use-pan-zoom.js +159 -0
- package/dist/data/use-pan-zoom.js.map +1 -0
- package/dist/data/version-info.cjs +3 -3
- package/dist/data/version-info.js +3 -3
- package/dist/data.cjs +5 -1
- package/dist/data.cjs.map +1 -1
- package/dist/data.d.ts +4 -3
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +6 -2
- package/dist/data.js.map +1 -1
- package/dist/devtools/useDebugStream.cjs +5 -1
- package/dist/devtools/useDebugStream.cjs.map +1 -1
- package/dist/devtools/useDebugStream.d.ts.map +1 -1
- package/dist/devtools/useDebugStream.js +6 -2
- package/dist/devtools/useDebugStream.js.map +1 -1
- package/dist/hooks/event-source-provider.cjs +9 -0
- package/dist/hooks/event-source-provider.cjs.map +1 -0
- package/dist/hooks/event-source-provider.d.ts +15 -0
- package/dist/hooks/event-source-provider.d.ts.map +1 -0
- package/dist/hooks/event-source-provider.js +9 -0
- package/dist/hooks/event-source-provider.js.map +1 -0
- package/dist/hooks/event-source.cjs +11 -0
- package/dist/hooks/event-source.cjs.map +1 -0
- package/dist/hooks/event-source.d.ts +22 -0
- package/dist/hooks/event-source.d.ts.map +1 -0
- package/dist/hooks/event-source.js +11 -0
- package/dist/hooks/event-source.js.map +1 -0
- package/dist/hooks/use-log-tail.cjs +5 -1
- package/dist/hooks/use-log-tail.cjs.map +1 -1
- package/dist/hooks/use-log-tail.d.ts.map +1 -1
- package/dist/hooks/use-log-tail.js +5 -1
- package/dist/hooks/use-log-tail.js.map +1 -1
- package/dist/hooks/use-prompts.cjs +5 -1
- package/dist/hooks/use-prompts.cjs.map +1 -1
- package/dist/hooks/use-prompts.d.ts.map +1 -1
- package/dist/hooks/use-prompts.js +6 -2
- package/dist/hooks/use-prompts.js.map +1 -1
- package/dist/hooks/use-task-run.cjs +9 -2
- package/dist/hooks/use-task-run.cjs.map +1 -1
- package/dist/hooks/use-task-run.d.ts.map +1 -1
- package/dist/hooks/use-task-run.js +10 -3
- package/dist/hooks/use-task-run.js.map +1 -1
- package/dist/hooks.cjs +4 -0
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.ts +2 -0
- package/dist/hooks.d.ts.map +1 -1
- package/dist/hooks.js +4 -0
- package/dist/hooks.js.map +1 -1
- package/dist/icons/programmingCatalog.cjs +34 -34
- package/dist/icons/programmingCatalog.cjs.map +1 -1
- package/dist/icons/programmingCatalog.js +34 -34
- package/dist/icons/programmingCatalog.js.map +1 -1
- package/dist/index.cjs +14 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -3
- package/dist/index.js.map +1 -1
- package/dist/monaco/MonacoEditor.cjs +4 -1
- package/dist/monaco/MonacoEditor.cjs.map +1 -1
- package/dist/monaco/MonacoEditor.d.ts +1 -1
- package/dist/monaco/MonacoEditor.d.ts.map +1 -1
- package/dist/monaco/MonacoEditor.js +4 -1
- package/dist/monaco/MonacoEditor.js.map +1 -1
- package/dist/monaco/types.d.ts +2 -1
- package/dist/monaco/types.d.ts.map +1 -1
- package/dist/overlay/CommandPalette.cjs +14 -4
- package/dist/overlay/CommandPalette.cjs.map +1 -1
- package/dist/overlay/CommandPalette.d.ts +5 -1
- package/dist/overlay/CommandPalette.d.ts.map +1 -1
- package/dist/overlay/CommandPalette.js +14 -4
- package/dist/overlay/CommandPalette.js.map +1 -1
- package/dist/overlay/CommandPaletteList.cjs +5 -0
- package/dist/overlay/CommandPaletteList.cjs.map +1 -1
- package/dist/overlay/CommandPaletteList.d.ts +4 -2
- package/dist/overlay/CommandPaletteList.d.ts.map +1 -1
- package/dist/overlay/CommandPaletteList.js +5 -0
- package/dist/overlay/CommandPaletteList.js.map +1 -1
- package/dist/overlay/DropdownMenu.cjs +2 -0
- package/dist/overlay/DropdownMenu.cjs.map +1 -1
- package/dist/overlay/DropdownMenu.d.ts +4 -0
- package/dist/overlay/DropdownMenu.d.ts.map +1 -1
- package/dist/overlay/DropdownMenu.js +2 -0
- package/dist/overlay/DropdownMenu.js.map +1 -1
- package/dist/overlay/DropdownMenuSubmenu.cjs +31 -15
- package/dist/overlay/DropdownMenuSubmenu.cjs.map +1 -1
- package/dist/overlay/DropdownMenuSubmenu.d.ts.map +1 -1
- package/dist/overlay/DropdownMenuSubmenu.js +31 -15
- package/dist/overlay/DropdownMenuSubmenu.js.map +1 -1
- package/dist/rpc/OperationCatalog.cjs +32 -27
- package/dist/rpc/OperationCatalog.cjs.map +1 -1
- package/dist/rpc/OperationCatalog.d.ts +11 -1
- package/dist/rpc/OperationCatalog.d.ts.map +1 -1
- package/dist/rpc/OperationCatalog.js +32 -27
- package/dist/rpc/OperationCatalog.js.map +1 -1
- package/dist/rpc/OperationEntityContextPicker.cjs +62 -256
- package/dist/rpc/OperationEntityContextPicker.cjs.map +1 -1
- package/dist/rpc/OperationEntityContextPicker.d.ts.map +1 -1
- package/dist/rpc/OperationEntityContextPicker.js +64 -258
- package/dist/rpc/OperationEntityContextPicker.js.map +1 -1
- package/dist/rpc/OperationEntityPicker.cjs +185 -0
- package/dist/rpc/OperationEntityPicker.cjs.map +1 -0
- package/dist/rpc/OperationEntityPicker.d.ts +51 -0
- package/dist/rpc/OperationEntityPicker.d.ts.map +1 -0
- package/dist/rpc/OperationEntityPicker.js +185 -0
- package/dist/rpc/OperationEntityPicker.js.map +1 -0
- package/dist/rpc/OperationEntityPicker.model.cjs +39 -0
- package/dist/rpc/OperationEntityPicker.model.cjs.map +1 -0
- package/dist/rpc/OperationEntityPicker.model.d.ts +27 -0
- package/dist/rpc/OperationEntityPicker.model.d.ts.map +1 -0
- package/dist/rpc/OperationEntityPicker.model.js +39 -0
- package/dist/rpc/OperationEntityPicker.model.js.map +1 -0
- package/dist/rpc/operationCatalogRowSelection.cjs +85 -0
- package/dist/rpc/operationCatalogRowSelection.cjs.map +1 -0
- package/dist/rpc/operationCatalogRowSelection.d.ts +57 -0
- package/dist/rpc/operationCatalogRowSelection.d.ts.map +1 -0
- package/dist/rpc/operationCatalogRowSelection.js +85 -0
- package/dist/rpc/operationCatalogRowSelection.js.map +1 -0
- package/dist/rpc/operationEntityPicker.fixtures.d.ts +13 -0
- package/dist/rpc/operationEntityPicker.fixtures.d.ts.map +1 -0
- package/dist/rpc/useOperationPages.cjs +6 -1
- package/dist/rpc/useOperationPages.cjs.map +1 -1
- package/dist/rpc/useOperationPages.d.ts +3 -1
- package/dist/rpc/useOperationPages.d.ts.map +1 -1
- package/dist/rpc/useOperationPages.js +6 -1
- package/dist/rpc/useOperationPages.js.map +1 -1
- package/dist/rpc.cjs +2 -0
- package/dist/rpc.cjs.map +1 -1
- package/dist/rpc.d.ts +2 -0
- package/dist/rpc.d.ts.map +1 -1
- package/dist/rpc.js +2 -0
- package/dist/rpc.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +4 -1
- package/schemas/json-schema-form.schema.json +571 -0
- package/dist/data/runtime/RuntimeBarCombo.cjs +0 -423
- package/dist/data/runtime/RuntimeBarCombo.cjs.map +0 -1
- package/dist/data/runtime/RuntimeBarCombo.d.ts +0 -33
- package/dist/data/runtime/RuntimeBarCombo.d.ts.map +0 -1
- package/dist/data/runtime/RuntimeBarCombo.js +0 -423
- package/dist/data/runtime/RuntimeBarCombo.js.map +0 -1
- package/dist/data/runtime/RuntimeBarLimits.cjs +0 -262
- package/dist/data/runtime/RuntimeBarLimits.cjs.map +0 -1
- package/dist/data/runtime/RuntimeBarLimits.d.ts +0 -17
- package/dist/data/runtime/RuntimeBarLimits.d.ts.map +0 -1
- package/dist/data/runtime/RuntimeBarLimits.js +0 -262
- package/dist/data/runtime/RuntimeBarLimits.js.map +0 -1
- package/dist/data/runtime/RuntimeBarSegments.cjs +0 -346
- package/dist/data/runtime/RuntimeBarSegments.cjs.map +0 -1
- package/dist/data/runtime/RuntimeBarSegments.d.ts +0 -37
- package/dist/data/runtime/RuntimeBarSegments.d.ts.map +0 -1
- package/dist/data/runtime/RuntimeBarSegments.js +0 -346
- package/dist/data/runtime/RuntimeBarSegments.js.map +0 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const agentActionIcons = require("../agent-action-icons.cjs");
|
|
4
|
-
const SpecRuntimeEditor_sandboxModel = require("../SpecRuntimeEditor.sandbox-model.cjs");
|
|
5
4
|
const UiPauseCircle = require("../../../icons/components/UiPauseCircle.cjs");
|
|
6
5
|
const UiShieldSlash = require("../../../icons/components/UiShieldSlash.cjs");
|
|
7
6
|
const UiPencilSimpleLine = require("../../../icons/components/UiPencilSimpleLine.cjs");
|
|
@@ -9,6 +8,7 @@ const UiHandPalm = require("../../../icons/components/UiHandPalm.cjs");
|
|
|
9
8
|
const UiLockOpen = require("../../../icons/components/UiLockOpen.cjs");
|
|
10
9
|
const UiRobotAi = require("../../../icons/components/UiRobotAi.cjs");
|
|
11
10
|
const UiLock = require("../../../icons/components/UiLock.cjs");
|
|
11
|
+
const SpecRuntimeEditor_sandboxModel = require("../SpecRuntimeEditor.sandbox-model.cjs");
|
|
12
12
|
const CODEX_PERMISSION_MODES = {
|
|
13
13
|
default: { icon: UiLock.UiLock, tone: "slate", label: "Read only" },
|
|
14
14
|
acceptEdits: {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PERMISSION_MODE_ICONS } from "../agent-action-icons.js";
|
|
2
|
-
import { SPEC_PERMISSION_MODES } from "../SpecRuntimeEditor.sandbox-model.js";
|
|
3
2
|
import { UiPauseCircle } from "../../../icons/components/UiPauseCircle.js";
|
|
4
3
|
import { UiShieldSlash } from "../../../icons/components/UiShieldSlash.js";
|
|
5
4
|
import { UiPencilSimpleLine } from "../../../icons/components/UiPencilSimpleLine.js";
|
|
@@ -7,6 +6,7 @@ import { UiHandPalm } from "../../../icons/components/UiHandPalm.js";
|
|
|
7
6
|
import { UiLockOpen } from "../../../icons/components/UiLockOpen.js";
|
|
8
7
|
import { UiRobotAi } from "../../../icons/components/UiRobotAi.js";
|
|
9
8
|
import { UiLock } from "../../../icons/components/UiLock.js";
|
|
9
|
+
import { SPEC_PERMISSION_MODES } from "../SpecRuntimeEditor.sandbox-model.js";
|
|
10
10
|
const CODEX_PERMISSION_MODES = {
|
|
11
11
|
default: { icon: UiLock, tone: "slate", label: "Read only" },
|
|
12
12
|
acceptEdits: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summaries.cjs","sources":["../../../../src/data/ai/SpecRuntimeEditor/summaries.ts"],"sourcesContent":["import type { ChatModel } from \"../../chat/types\";\nimport type {
|
|
1
|
+
{"version":3,"file":"summaries.cjs","sources":["../../../../src/data/ai/SpecRuntimeEditor/summaries.ts"],"sourcesContent":["import type { ChatModel } from \"../../chat/types\";\nimport type {\n AISpecRuntimeCommit,\n AISpecRuntimeValue,\n} from \"../SpecRuntimeEditor.model\";\nimport { UNSPECIFIED_LABEL } from \"../../runtime/unspecified\";\nimport {\n checkoutMode,\n commitPhase,\n commitPhaseFromEntry,\n worktreeMode,\n} from \"./update\";\nimport { isDenyMode, type PermissionListEntry } from \"./permissions-model\";\n\nexport function summarizeModel(\n value: AISpecRuntimeValue,\n models: ChatModel[] = [],\n): string {\n const parts: string[] = [];\n const model = value.model?.trim();\n if (model) {\n parts.push(models.find((m) => m.id === model)?.label ?? model);\n }\n if (value.effort) parts.push(value.effort);\n return parts.length > 0 ? parts.join(\" · \") : UNSPECIFIED_LABEL;\n}\n\nexport function summarizePrompt(value: AISpecRuntimeValue): string {\n const overrides = [\n value.prompt?.user,\n value.prompt?.system,\n value.prompt?.appendSystem,\n ].filter((text) => Boolean(text?.trim())).length;\n if (overrides === 0) return \"Base prompt only\";\n return `${overrides} override${overrides > 1 ? \"s\" : \"\"} set`;\n}\n\nexport function summarizeWorkspace(value: AISpecRuntimeValue): string {\n const mode = checkoutMode(value);\n if (mode === \"none\") return \"No checkout\";\n const parts: string[] = [mode];\n const ref = value.setup?.checkout?.ref?.trim();\n if (ref) parts.push(ref);\n const worktree = worktreeMode(value);\n parts.push(worktree === \"none\" ? \"in-place\" : `${worktree} worktree`);\n return parts.join(\" · \");\n}\n\nexport function summarizePermissions(\n _value: AISpecRuntimeValue,\n entries: PermissionListEntry[],\n): string {\n const parts: string[] = [];\n const denied = entries.filter(\n (entry) => entry.domain === \"tools\" && entry.mode === \"deny\",\n ).length;\n const off = entries.filter(\n (entry) => entry.domain !== \"tools\" && isDenyMode(entry.mode),\n ).length;\n if (denied > 0) parts.push(`${denied} denied`);\n if (off > 0) parts.push(`${off} off`);\n return parts.length > 0 ? parts.join(\" · \") : \"No overrides\";\n}\n\nexport function summarizeEnvironment(value: AISpecRuntimeValue): string {\n const vars = (value.setup?.envVars ?? []).filter((item) =>\n Boolean(item.name?.trim()),\n );\n if (vars.length === 0) return \"No variables\";\n const secrets = vars.filter((item) => {\n if (typeof item.valueFrom === \"string\") {\n return item.valueFrom.trim().startsWith(\"secret://\");\n }\n return Boolean(item.valueFrom?.secretKeyRef);\n }).length;\n const parts = [`${vars.length} var${vars.length !== 1 ? \"s\" : \"\"}`];\n if (secrets > 0) parts.push(`${secrets} secret`);\n return parts.join(\" · \");\n}\n\nexport function summarizeVerify(value: AISpecRuntimeValue): string {\n const verify = value.workflow?.verify;\n if (!verify) return \"No fixture\";\n const parts: string[] = [];\n if (verify.fixture?.trim()) parts.push(\"Fixture\");\n if (verify.scope === \"changed\") parts.push(\"changed files\");\n if (verify.maxIterations != null && verify.maxIterations > 0) {\n parts.push(\n `${verify.maxIterations} iteration${verify.maxIterations !== 1 ? \"s\" : \"\"}`,\n );\n }\n if (verify.commands?.length) {\n parts.push(`${verify.commands.length} command${verify.commands.length !== 1 ? \"s\" : \"\"}`);\n }\n if (verify.prompts?.length) {\n parts.push(`${verify.prompts.length} prompt${verify.prompts.length !== 1 ? \"s\" : \"\"}`);\n }\n return parts.length > 0 ? parts.join(\" · \") : \"No fixture\";\n}\n\nconst COMMIT_PHASE_SUMMARIES = {\n none: \"Leave uncommitted\",\n turn: \"Commit every turn\",\n agent: \"Commit after the loop\",\n run: \"Commit changes\",\n} as const;\n\n// Matches the CommitSection phase select's own option labels, since this is\n// the vocabulary the section reads back to the operator as \"what's selected\"\n// rather than the free-standing summary line's own copy.\nconst COMMIT_PHASE_SELECT_LABELS = {\n turn: \"Every turn\",\n agent: \"After the loop\",\n run: \"End of run\",\n} as const;\n\n/**\n * Reads back the effective commit intent: the operator's own policy, or —\n * only while `workflow.commits` is entirely unset and `inheritedCommits` is\n * non-empty — the inherited stanza from a lower spec layer, clearly marked so\n * it never reads as \"the operator chose this\".\n */\nexport function summarizeCommit(\n value: AISpecRuntimeValue,\n inheritedCommits?: AISpecRuntimeCommit[] | undefined,\n): string {\n const operatorSet = value.workflow?.commits !== undefined;\n const inherited = operatorSet ? undefined : inheritedCommits?.[0];\n if (inherited) {\n const parts = [\n COMMIT_PHASE_SELECT_LABELS[commitPhaseFromEntry(inherited)],\n \"inherited\",\n ];\n if (inherited.stage) parts.push(inherited.stage);\n if (inherited.gates) parts.push(`${inherited.gates} gates`);\n return parts.join(\" · \");\n }\n const phase = commitPhase(value);\n const summary = COMMIT_PHASE_SUMMARIES[phase];\n return value.workflow?.commits?.[0]?.dryRun\n ? `${summary} · dry run`\n : summary;\n}\n\nexport function summarizeCLIArgs(value: AISpecRuntimeValue): string {\n const flags = Object.entries(value.cliArgs ?? {}).filter(\n ([, item]) =>\n item !== undefined &&\n item !== \"\" &&\n item !== false &&\n (!Array.isArray(item) || item.length > 0),\n ).length;\n if (flags === 0) return \"Defaults\";\n return `${flags} flag${flags !== 1 ? \"s\" : \"\"} set`;\n}\n\n// The rail target chip: repo (from checkout URL or local path) plus ref.\nexport function summarizeTarget(value: AISpecRuntimeValue): string | undefined {\n const checkout = value.setup?.checkout;\n const source = checkout?.url?.trim() || checkout?.path?.trim();\n if (!source) return undefined;\n // Split-and-filter instead of `.replace(/\\/+$/, \"\")`: the trailing-slash\n // strip was a polynomial (ReDoS) match on many-`/` inputs. Empty segments\n // from trailing/duplicate slashes are dropped, so the last one is the repo.\n const segments = source.split(\"/\").filter(Boolean);\n const repo = segments[segments.length - 1]?.replace(/\\.git$/, \"\");\n if (!repo) return undefined;\n const ref = checkout?.ref?.trim();\n return ref ? `${repo} · ${ref}` : repo;\n}\n"],"names":[],"mappings":";;AA6JO,SAAS,gBAAgB,OAA+C;;AAC7E,QAAM,YAAW,WAAM,UAAN,mBAAa;AAC9B,QAAM,WAAS,0CAAU,QAAV,mBAAe,aAAU,0CAAU,SAAV,mBAAgB;AACxD,MAAI,CAAC,OAAQ,QAAO;AAIpB,QAAM,WAAW,OAAO,MAAM,GAAG,EAAE,OAAO,OAAO;AACjD,QAAM,QAAO,cAAS,SAAS,SAAS,CAAC,MAA5B,mBAA+B,QAAQ,UAAU;AAC9D,MAAI,CAAC,KAAM,QAAO;AAClB,QAAM,OAAM,0CAAU,QAAV,mBAAe;AAC3B,SAAO,MAAM,GAAG,IAAI,MAAM,GAAG,KAAK;AACpC;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChatModel } from '../../chat/types.js';
|
|
2
|
-
import { AISpecRuntimeValue } from '../SpecRuntimeEditor.model.js';
|
|
2
|
+
import { AISpecRuntimeCommit, AISpecRuntimeValue } from '../SpecRuntimeEditor.model.js';
|
|
3
3
|
import { PermissionListEntry } from './permissions-model.js';
|
|
4
4
|
export declare function summarizeModel(value: AISpecRuntimeValue, models?: ChatModel[]): string;
|
|
5
5
|
export declare function summarizePrompt(value: AISpecRuntimeValue): string;
|
|
@@ -7,7 +7,13 @@ export declare function summarizeWorkspace(value: AISpecRuntimeValue): string;
|
|
|
7
7
|
export declare function summarizePermissions(_value: AISpecRuntimeValue, entries: PermissionListEntry[]): string;
|
|
8
8
|
export declare function summarizeEnvironment(value: AISpecRuntimeValue): string;
|
|
9
9
|
export declare function summarizeVerify(value: AISpecRuntimeValue): string;
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Reads back the effective commit intent: the operator's own policy, or —
|
|
12
|
+
* only while `workflow.commits` is entirely unset and `inheritedCommits` is
|
|
13
|
+
* non-empty — the inherited stanza from a lower spec layer, clearly marked so
|
|
14
|
+
* it never reads as "the operator chose this".
|
|
15
|
+
*/
|
|
16
|
+
export declare function summarizeCommit(value: AISpecRuntimeValue, inheritedCommits?: AISpecRuntimeCommit[] | undefined): string;
|
|
11
17
|
export declare function summarizeCLIArgs(value: AISpecRuntimeValue): string;
|
|
12
18
|
export declare function summarizeTarget(value: AISpecRuntimeValue): string | undefined;
|
|
13
19
|
//# sourceMappingURL=summaries.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summaries.d.ts","sourceRoot":"","sources":["../../../../src/data/ai/SpecRuntimeEditor/summaries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"summaries.d.ts","sourceRoot":"","sources":["../../../../src/data/ai/SpecRuntimeEditor/summaries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EACV,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,4BAA4B,CAAC;AAQpC,OAAO,EAAc,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE3E,wBAAgB,cAAc,CAC5B,KAAK,EAAE,kBAAkB,EACzB,MAAM,GAAE,SAAS,EAAO,GACvB,MAAM,CAQR;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,CAQjE;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,CASpE;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,kBAAkB,EAC1B,OAAO,EAAE,mBAAmB,EAAE,GAC7B,MAAM,CAWR;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,CActE;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,CAkBjE;AAkBD;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,kBAAkB,EACzB,gBAAgB,CAAC,EAAE,mBAAmB,EAAE,GAAG,SAAS,GACnD,MAAM,CAiBR;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,CAUlE;AAGD,wBAAgB,eAAe,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,GAAG,SAAS,CAY7E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summaries.js","sources":["../../../../src/data/ai/SpecRuntimeEditor/summaries.ts"],"sourcesContent":["import type { ChatModel } from \"../../chat/types\";\nimport type {
|
|
1
|
+
{"version":3,"file":"summaries.js","sources":["../../../../src/data/ai/SpecRuntimeEditor/summaries.ts"],"sourcesContent":["import type { ChatModel } from \"../../chat/types\";\nimport type {\n AISpecRuntimeCommit,\n AISpecRuntimeValue,\n} from \"../SpecRuntimeEditor.model\";\nimport { UNSPECIFIED_LABEL } from \"../../runtime/unspecified\";\nimport {\n checkoutMode,\n commitPhase,\n commitPhaseFromEntry,\n worktreeMode,\n} from \"./update\";\nimport { isDenyMode, type PermissionListEntry } from \"./permissions-model\";\n\nexport function summarizeModel(\n value: AISpecRuntimeValue,\n models: ChatModel[] = [],\n): string {\n const parts: string[] = [];\n const model = value.model?.trim();\n if (model) {\n parts.push(models.find((m) => m.id === model)?.label ?? model);\n }\n if (value.effort) parts.push(value.effort);\n return parts.length > 0 ? parts.join(\" · \") : UNSPECIFIED_LABEL;\n}\n\nexport function summarizePrompt(value: AISpecRuntimeValue): string {\n const overrides = [\n value.prompt?.user,\n value.prompt?.system,\n value.prompt?.appendSystem,\n ].filter((text) => Boolean(text?.trim())).length;\n if (overrides === 0) return \"Base prompt only\";\n return `${overrides} override${overrides > 1 ? \"s\" : \"\"} set`;\n}\n\nexport function summarizeWorkspace(value: AISpecRuntimeValue): string {\n const mode = checkoutMode(value);\n if (mode === \"none\") return \"No checkout\";\n const parts: string[] = [mode];\n const ref = value.setup?.checkout?.ref?.trim();\n if (ref) parts.push(ref);\n const worktree = worktreeMode(value);\n parts.push(worktree === \"none\" ? \"in-place\" : `${worktree} worktree`);\n return parts.join(\" · \");\n}\n\nexport function summarizePermissions(\n _value: AISpecRuntimeValue,\n entries: PermissionListEntry[],\n): string {\n const parts: string[] = [];\n const denied = entries.filter(\n (entry) => entry.domain === \"tools\" && entry.mode === \"deny\",\n ).length;\n const off = entries.filter(\n (entry) => entry.domain !== \"tools\" && isDenyMode(entry.mode),\n ).length;\n if (denied > 0) parts.push(`${denied} denied`);\n if (off > 0) parts.push(`${off} off`);\n return parts.length > 0 ? parts.join(\" · \") : \"No overrides\";\n}\n\nexport function summarizeEnvironment(value: AISpecRuntimeValue): string {\n const vars = (value.setup?.envVars ?? []).filter((item) =>\n Boolean(item.name?.trim()),\n );\n if (vars.length === 0) return \"No variables\";\n const secrets = vars.filter((item) => {\n if (typeof item.valueFrom === \"string\") {\n return item.valueFrom.trim().startsWith(\"secret://\");\n }\n return Boolean(item.valueFrom?.secretKeyRef);\n }).length;\n const parts = [`${vars.length} var${vars.length !== 1 ? \"s\" : \"\"}`];\n if (secrets > 0) parts.push(`${secrets} secret`);\n return parts.join(\" · \");\n}\n\nexport function summarizeVerify(value: AISpecRuntimeValue): string {\n const verify = value.workflow?.verify;\n if (!verify) return \"No fixture\";\n const parts: string[] = [];\n if (verify.fixture?.trim()) parts.push(\"Fixture\");\n if (verify.scope === \"changed\") parts.push(\"changed files\");\n if (verify.maxIterations != null && verify.maxIterations > 0) {\n parts.push(\n `${verify.maxIterations} iteration${verify.maxIterations !== 1 ? \"s\" : \"\"}`,\n );\n }\n if (verify.commands?.length) {\n parts.push(`${verify.commands.length} command${verify.commands.length !== 1 ? \"s\" : \"\"}`);\n }\n if (verify.prompts?.length) {\n parts.push(`${verify.prompts.length} prompt${verify.prompts.length !== 1 ? \"s\" : \"\"}`);\n }\n return parts.length > 0 ? parts.join(\" · \") : \"No fixture\";\n}\n\nconst COMMIT_PHASE_SUMMARIES = {\n none: \"Leave uncommitted\",\n turn: \"Commit every turn\",\n agent: \"Commit after the loop\",\n run: \"Commit changes\",\n} as const;\n\n// Matches the CommitSection phase select's own option labels, since this is\n// the vocabulary the section reads back to the operator as \"what's selected\"\n// rather than the free-standing summary line's own copy.\nconst COMMIT_PHASE_SELECT_LABELS = {\n turn: \"Every turn\",\n agent: \"After the loop\",\n run: \"End of run\",\n} as const;\n\n/**\n * Reads back the effective commit intent: the operator's own policy, or —\n * only while `workflow.commits` is entirely unset and `inheritedCommits` is\n * non-empty — the inherited stanza from a lower spec layer, clearly marked so\n * it never reads as \"the operator chose this\".\n */\nexport function summarizeCommit(\n value: AISpecRuntimeValue,\n inheritedCommits?: AISpecRuntimeCommit[] | undefined,\n): string {\n const operatorSet = value.workflow?.commits !== undefined;\n const inherited = operatorSet ? undefined : inheritedCommits?.[0];\n if (inherited) {\n const parts = [\n COMMIT_PHASE_SELECT_LABELS[commitPhaseFromEntry(inherited)],\n \"inherited\",\n ];\n if (inherited.stage) parts.push(inherited.stage);\n if (inherited.gates) parts.push(`${inherited.gates} gates`);\n return parts.join(\" · \");\n }\n const phase = commitPhase(value);\n const summary = COMMIT_PHASE_SUMMARIES[phase];\n return value.workflow?.commits?.[0]?.dryRun\n ? `${summary} · dry run`\n : summary;\n}\n\nexport function summarizeCLIArgs(value: AISpecRuntimeValue): string {\n const flags = Object.entries(value.cliArgs ?? {}).filter(\n ([, item]) =>\n item !== undefined &&\n item !== \"\" &&\n item !== false &&\n (!Array.isArray(item) || item.length > 0),\n ).length;\n if (flags === 0) return \"Defaults\";\n return `${flags} flag${flags !== 1 ? \"s\" : \"\"} set`;\n}\n\n// The rail target chip: repo (from checkout URL or local path) plus ref.\nexport function summarizeTarget(value: AISpecRuntimeValue): string | undefined {\n const checkout = value.setup?.checkout;\n const source = checkout?.url?.trim() || checkout?.path?.trim();\n if (!source) return undefined;\n // Split-and-filter instead of `.replace(/\\/+$/, \"\")`: the trailing-slash\n // strip was a polynomial (ReDoS) match on many-`/` inputs. Empty segments\n // from trailing/duplicate slashes are dropped, so the last one is the repo.\n const segments = source.split(\"/\").filter(Boolean);\n const repo = segments[segments.length - 1]?.replace(/\\.git$/, \"\");\n if (!repo) return undefined;\n const ref = checkout?.ref?.trim();\n return ref ? `${repo} · ${ref}` : repo;\n}\n"],"names":[],"mappings":"AA6JO,SAAS,gBAAgB,OAA+C;AAAxE;AACL,QAAM,YAAW,WAAM,UAAN,mBAAa;AAC9B,QAAM,WAAS,0CAAU,QAAV,mBAAe,aAAU,0CAAU,SAAV,mBAAgB;AACxD,MAAI,CAAC,OAAQ,QAAO;AAIpB,QAAM,WAAW,OAAO,MAAM,GAAG,EAAE,OAAO,OAAO;AACjD,QAAM,QAAO,cAAS,SAAS,SAAS,CAAC,MAA5B,mBAA+B,QAAQ,UAAU;AAC9D,MAAI,CAAC,KAAM,QAAO;AAClB,QAAM,OAAM,0CAAU,QAAV,mBAAe;AAC3B,SAAO,MAAM,GAAG,IAAI,MAAM,GAAG,KAAK;AACpC;"}
|
|
@@ -36,7 +36,9 @@ function sandboxRef(value) {
|
|
|
36
36
|
function withSandbox(value, patch) {
|
|
37
37
|
const next = { ...sandboxRef(value), ...patch };
|
|
38
38
|
if (!next.mode) {
|
|
39
|
-
throw new Error(
|
|
39
|
+
throw new Error(
|
|
40
|
+
"sandbox.mode is required before configuring sandbox settings"
|
|
41
|
+
);
|
|
40
42
|
}
|
|
41
43
|
return withRoot(value, { sandbox: next });
|
|
42
44
|
}
|
|
@@ -114,12 +116,15 @@ function withCommitPhase(value, phase) {
|
|
|
114
116
|
}
|
|
115
117
|
return withCommit(value, { on: phase });
|
|
116
118
|
}
|
|
119
|
+
function commitPhaseFromEntry(commit) {
|
|
120
|
+
const on = commit == null ? void 0 : commit.on;
|
|
121
|
+
return on === "turn" || on === "agent" ? on : "run";
|
|
122
|
+
}
|
|
117
123
|
function commitPhase(value) {
|
|
118
|
-
var _a
|
|
124
|
+
var _a;
|
|
119
125
|
const commits = (_a = value.workflow) == null ? void 0 : _a.commits;
|
|
120
126
|
if (!(commits == null ? void 0 : commits.length)) return "none";
|
|
121
|
-
|
|
122
|
-
return on === "turn" || on === "agent" ? on : "run";
|
|
127
|
+
return commitPhaseFromEntry(commits[0]);
|
|
123
128
|
}
|
|
124
129
|
function withCheckoutMode(value, mode) {
|
|
125
130
|
if (mode === "none") {
|
|
@@ -137,6 +142,7 @@ function withCheckoutMode(value, mode) {
|
|
|
137
142
|
return withCheckout(value, { mode, path: "" });
|
|
138
143
|
}
|
|
139
144
|
function withWorktreeMode(value, mode) {
|
|
145
|
+
var _a;
|
|
140
146
|
if (mode === "none") {
|
|
141
147
|
return withWorktree(value, {
|
|
142
148
|
mode,
|
|
@@ -146,10 +152,11 @@ function withWorktreeMode(value, mode) {
|
|
|
146
152
|
keep: false
|
|
147
153
|
});
|
|
148
154
|
}
|
|
155
|
+
const next = ((_a = value.workflow) == null ? void 0 : _a.commits) === void 0 ? withCommitPhase(value, "turn") : value;
|
|
149
156
|
if (mode === "existing") {
|
|
150
|
-
return withWorktree(
|
|
157
|
+
return withWorktree(next, { mode, prefix: "", base: "", keep: false });
|
|
151
158
|
}
|
|
152
|
-
return withWorktree(
|
|
159
|
+
return withWorktree(next, { mode });
|
|
153
160
|
}
|
|
154
161
|
function checkoutMode(value) {
|
|
155
162
|
var _a;
|
|
@@ -167,6 +174,7 @@ function worktreeMode(value) {
|
|
|
167
174
|
}
|
|
168
175
|
exports.checkoutMode = checkoutMode;
|
|
169
176
|
exports.commitPhase = commitPhase;
|
|
177
|
+
exports.commitPhaseFromEntry = commitPhaseFromEntry;
|
|
170
178
|
exports.sandboxRef = sandboxRef;
|
|
171
179
|
exports.withBudgetValue = withBudgetValue;
|
|
172
180
|
exports.withCheckout = withCheckout;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.cjs","sources":["../../../../src/data/ai/SpecRuntimeEditor/update.ts"],"sourcesContent":["import type {\n AISpecRuntimeConnections,\n AISpecRuntimeMemory,\n AISpecRuntimePermissions,\n AISpecRuntimePrompt,\n AISpecRuntimeSandbox,\n AISpecRuntimeSandboxDispatch,\n AISpecRuntimeSandboxPolicy,\n AISpecRuntimeSetup,\n AISpecRuntimeValue,\n SpecCheckoutMode,\n SpecCommitPhase,\n SpecPermissionMode,\n SpecSandboxMode,\n SpecStashMode,\n SpecWorktreeMode,\n} from \"../SpecRuntimeEditor.model\";\n\ntype SpecCheckout = NonNullable<AISpecRuntimeSetup[\"checkout\"]>;\ntype SpecWorktree = NonNullable<SpecCheckout[\"worktree\"]>;\ntype SpecDirty = NonNullable<SpecCheckout[\"dirty\"]>;\ntype SpecWorkflow = NonNullable<AISpecRuntimeValue[\"workflow\"]>;\ntype SpecCommit = NonNullable<SpecWorkflow[\"commits\"]>[number];\ntype SpecBudget = NonNullable<AISpecRuntimeValue[\"budget\"]>;\n\nexport function withRoot(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeValue>,\n): AISpecRuntimeValue {\n return { ...value, ...patch };\n}\n\n// Sets a top-level scalar, deleting the key entirely when cleared so the\n// compacted payload omits it instead of carrying an empty string/undefined.\nexport function withOptionalRoot(\n value: AISpecRuntimeValue,\n key: keyof AISpecRuntimeValue,\n next: unknown,\n): AISpecRuntimeValue {\n const updated = { ...value } as Record<string, unknown>;\n if (next === undefined || next === \"\") {\n delete updated[key];\n } else {\n updated[key] = next;\n }\n return updated as AISpecRuntimeValue;\n}\n\nexport function withPrompt(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimePrompt>,\n): AISpecRuntimeValue {\n return withRoot(value, { prompt: { ...value.prompt, ...patch } });\n}\n\nexport function withBudget(\n value: AISpecRuntimeValue,\n budget: SpecBudget,\n): AISpecRuntimeValue {\n return withRoot(value, { budget });\n}\n\nexport function withBudgetValue(\n value: AISpecRuntimeValue,\n key: keyof SpecBudget,\n next: number | string | undefined,\n): AISpecRuntimeValue {\n const budget = { ...value.budget } as Record<string, unknown>;\n if (next === undefined || next === \"\") {\n delete budget[key];\n } else {\n budget[key] = next;\n }\n return withRoot(value, { budget: budget as SpecBudget });\n}\n\nexport function withMemory(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeMemory>,\n): AISpecRuntimeValue {\n return withRoot(value, { memory: { ...value.memory, ...patch } });\n}\n\nexport function withPermissions(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimePermissions>,\n): AISpecRuntimeValue {\n return withRoot(value, { permissions: { ...value.permissions, ...patch } });\n}\n\n/**\n * Reads the sandbox ref in object form regardless of which form it is stored\n * in, so the section's controls do not each have to re-narrow the union.\n */\nexport function sandboxRef(value: AISpecRuntimeValue): AISpecRuntimeSandbox {\n if (typeof value.sandbox === \"string\") {\n return { mode: value.sandbox.trim() as SpecSandboxMode };\n }\n return value.sandbox ?? {};\n}\n\n/**\n * Patches the unified ref while keeping its object form during editing.\n */\nexport function withSandbox(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeSandbox>,\n): AISpecRuntimeValue {\n const next: AISpecRuntimeSandbox = { ...sandboxRef(value), ...patch };\n if (!next.mode) {\n throw new Error(\"sandbox.mode is required before configuring sandbox settings\");\n }\n return withRoot(value, { sandbox: next });\n}\n\nexport function withSandboxMode(\n value: AISpecRuntimeValue,\n mode: SpecSandboxMode,\n): AISpecRuntimeValue {\n const current = sandboxRef(value);\n if (current.mode === mode) return value;\n return withRoot(value, { sandbox: { mode } });\n}\n\nexport function withSandboxBackend(\n value: AISpecRuntimeValue,\n backend: string,\n): AISpecRuntimeValue {\n const next = { ...sandboxRef(value) };\n const selected = backend.trim();\n if (selected) next.backend = selected;\n else delete next.backend;\n return withRoot(value, { sandbox: next });\n}\n\nexport function withSandboxAgent(\n value: AISpecRuntimeValue,\n agent: string,\n): AISpecRuntimeValue {\n const next = { ...sandboxRef(value) };\n const selected = agent.trim();\n if (selected) next.agent = selected;\n else delete next.agent;\n return withRoot(value, { sandbox: next });\n}\n\n// The base posture is independent of the sandbox (see AISpecRuntimePermissions\n// doc comment), so unlike sandbox settings it deletes cleanly to Unspecified\n// without needing a mode to be configured first.\nexport function withPermissionMode(\n value: AISpecRuntimeValue,\n mode: SpecPermissionMode | undefined,\n): AISpecRuntimeValue {\n const next = { ...value.permissions } as AISpecRuntimePermissions;\n if (mode) next.mode = mode;\n else delete next.mode;\n if (Object.keys(next).length === 0) {\n const { permissions: _permissions, ...rest } = value;\n return rest as AISpecRuntimeValue;\n }\n return withRoot(value, { permissions: next });\n}\n\nexport function withSandboxPolicy(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeSandboxPolicy>,\n): AISpecRuntimeValue {\n if (sandboxRef(value).mode !== \"native\") {\n throw new Error(\"native sandbox policy requires sandbox.mode native\");\n }\n return withSandbox(value, {\n policy: { ...sandboxRef(value).policy, ...patch },\n });\n}\n\nexport function withSandboxDispatch(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeSandboxDispatch>,\n): AISpecRuntimeValue {\n if (sandboxRef(value).mode !== \"git-agent\") {\n throw new Error(\"sandbox dispatch policy requires sandbox.mode git-agent\");\n }\n return withSandbox(value, {\n dispatch: { ...sandboxRef(value).dispatch, ...patch },\n });\n}\n\nexport function withSetup(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeSetup>,\n): AISpecRuntimeValue {\n return withRoot(value, { setup: { ...value.setup, ...patch } });\n}\n\nexport function withConnections(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeConnections>,\n): AISpecRuntimeValue {\n return withSetup(value, {\n connections: { ...value.setup?.connections, ...patch },\n });\n}\n\nexport function withCheckout(\n value: AISpecRuntimeValue,\n patch: SpecCheckout,\n): AISpecRuntimeValue {\n return withSetup(value, {\n checkout: { ...value.setup?.checkout, ...patch },\n });\n}\n\nexport function withWorktree(\n value: AISpecRuntimeValue,\n patch: SpecWorktree,\n): AISpecRuntimeValue {\n return withCheckout(value, {\n worktree: { ...value.setup?.checkout?.worktree, ...patch },\n });\n}\n\nexport function withDirty(\n value: AISpecRuntimeValue,\n patch: SpecDirty,\n): AISpecRuntimeValue {\n return withCheckout(value, {\n dirty: { ...value.setup?.checkout?.dirty, ...patch },\n });\n}\n\nexport function withVerify(\n value: AISpecRuntimeValue,\n patch: NonNullable<SpecWorkflow[\"verify\"]>,\n): AISpecRuntimeValue {\n return withRoot(value, {\n workflow: {\n ...value.workflow,\n verify: { ...value.workflow?.verify, ...patch },\n },\n });\n}\n\n// The editor drives a single commit policy. A spec authored by hand may declare\n// several stanzas; the ones past the first are carried through untouched rather\n// than collapsed away by an edit to a field the editor does surface.\nexport function withCommit(\n value: AISpecRuntimeValue,\n patch: Partial<SpecCommit>,\n): AISpecRuntimeValue {\n const [first, ...rest] = value.workflow?.commits ?? [];\n return withRoot(value, {\n workflow: { ...value.workflow, commits: [{ ...first, ...patch }, ...rest] },\n });\n}\n\n// \"Never\" drops every stanza rather than flagging one off: an absent list is how\n// the spec says \"commit nothing\", and a surviving {dryRun: true} would leave the\n// section reading as configured.\nexport function withCommitPhase(\n value: AISpecRuntimeValue,\n phase: SpecCommitPhase | \"none\",\n): AISpecRuntimeValue {\n if (phase === \"none\") {\n return withRoot(value, { workflow: { ...value.workflow, commits: [] } });\n }\n return withCommit(value, { on: phase });\n}\n\n// A stanza with no explicit phase commits at the end of the run, matching\n// api.Commit.Phase()'s default.\nexport function commitPhase(\n value: AISpecRuntimeValue,\n): SpecCommitPhase | \"none\" {\n const commits = value.workflow?.commits;\n if (!commits?.length) return \"none\";\n const on = commits[0]?.on;\n return on === \"turn\" || on === \"agent\" ? on : \"run\";\n}\n\n// Mode switches clear the fields that no longer apply, so stale values from a\n// previous mode never leak into the compacted payload.\nexport function withCheckoutMode(\n value: AISpecRuntimeValue,\n mode: SpecCheckoutMode,\n): AISpecRuntimeValue {\n if (mode === \"none\") {\n return withCheckout(value, {\n mode,\n url: \"\",\n path: \"\",\n connection: \"\",\n ref: \"\",\n depth: 0,\n });\n }\n if (mode === \"local\")\n return withCheckout(value, { mode, url: \"\", connection: \"\" });\n return withCheckout(value, { mode, path: \"\" });\n}\n\nexport function withWorktreeMode(\n value: AISpecRuntimeValue,\n mode: SpecWorktreeMode,\n): AISpecRuntimeValue {\n if (mode === \"none\") {\n return withWorktree(value, {\n mode,\n prefix: \"\",\n base: \"\",\n path: \"\",\n keep: false,\n });\n }\n if (mode === \"existing\") {\n return withWorktree(value, { mode, prefix: \"\", base: \"\", keep: false });\n }\n return withWorktree(value, { mode });\n}\n\nexport function withStashMode(\n value: AISpecRuntimeValue,\n stash: SpecStashMode,\n): AISpecRuntimeValue {\n return withDirty(value, stash === \"none\" ? { stash, since: \"\" } : { stash });\n}\n\nexport function checkoutMode(value: AISpecRuntimeValue): SpecCheckoutMode {\n const checkout = value.setup?.checkout;\n if (checkout?.mode === \"remote\") return \"remote\";\n if (checkout?.mode === \"local\" || checkout?.path) return \"local\";\n return \"none\";\n}\n\nexport function worktreeMode(value: AISpecRuntimeValue): SpecWorktreeMode {\n const mode = value.setup?.checkout?.worktree?.mode;\n if (mode === \"existing\") return \"existing\";\n if (mode === \"new\") return \"new\";\n return \"none\";\n}\n\nexport function stashMode(value: AISpecRuntimeValue): SpecStashMode {\n const stash = value.setup?.checkout?.dirty?.stash;\n if (\n stash === \"untracked\" ||\n stash === \"unstaged\" ||\n stash === \"staged\" ||\n stash === \"all\"\n ) {\n return stash;\n }\n return \"none\";\n}\n\nexport function parseOptionalNumber(\n value: string,\n integer = false,\n): number | undefined {\n if (value.trim() === \"\") return undefined;\n const parsed = Number(value);\n if (!Number.isFinite(parsed)) return undefined;\n return integer ? Math.max(0, Math.trunc(parsed)) : parsed;\n}\n"],"names":[],"mappings":";;AAyBO,SAAS,SACd,OACA,OACoB;AACpB,SAAO,EAAE,GAAG,OAAO,GAAG,MAAA;AACxB;AAIO,SAAS,iBACd,OACA,KACA,MACoB;AACpB,QAAM,UAAU,EAAE,GAAG,MAAA;AACrB,MAAI,SAAS,UAAa,SAAS,IAAI;AACrC,WAAO,QAAQ,GAAG;AAAA,EACpB,OAAO;AACL,YAAQ,GAAG,IAAI;AAAA,EACjB;AACA,SAAO;AACT;AAEO,SAAS,WACd,OACA,OACoB;AACpB,SAAO,SAAS,OAAO,EAAE,QAA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I,MAAM,OAAO;AAAA,EACxE;AACA,SAAO,aAAa,OAAO,EAAE,MAAM;AACrC;AASO,SAAS,aAAa,OAA6C;;AACxE,QAAM,YAAW,WAAM,UAAN,mBAAa;AAC9B,OAAI,qCAAU,UAAS,SAAU,QAAO;AACxC,OAAI,qCAAU,UAAS,YAAW,qCAAU,MAAM,QAAO;AACzD,SAAO;AACT;AAEO,SAAS,aAAa,OAA6C;;AACxE,QAAM,QAAO,uBAAM,UAAN,mBAAa,aAAb,mBAAuB,aAAvB,mBAAiC;AAC9C,MAAI,SAAS,WAAY,QAAO;AAChC,MAAI,SAAS,MAAO,QAAO;AAC3B,SAAO;AACT;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"update.cjs","sources":["../../../../src/data/ai/SpecRuntimeEditor/update.ts"],"sourcesContent":["import type {\n AISpecRuntimeConnections,\n AISpecRuntimeMemory,\n AISpecRuntimePermissions,\n AISpecRuntimePrompt,\n AISpecRuntimeSandbox,\n AISpecRuntimeSandboxDispatch,\n AISpecRuntimeSandboxPolicy,\n AISpecRuntimeSetup,\n AISpecRuntimeValue,\n SpecCheckoutMode,\n SpecCommitPhase,\n SpecPermissionMode,\n SpecSandboxMode,\n SpecStashMode,\n SpecWorktreeMode,\n} from \"../SpecRuntimeEditor.model\";\n\ntype SpecCheckout = NonNullable<AISpecRuntimeSetup[\"checkout\"]>;\ntype SpecWorktree = NonNullable<SpecCheckout[\"worktree\"]>;\ntype SpecDirty = NonNullable<SpecCheckout[\"dirty\"]>;\ntype SpecWorkflow = NonNullable<AISpecRuntimeValue[\"workflow\"]>;\ntype SpecCommit = NonNullable<SpecWorkflow[\"commits\"]>[number];\ntype SpecBudget = NonNullable<AISpecRuntimeValue[\"budget\"]>;\n\nexport function withRoot(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeValue>,\n): AISpecRuntimeValue {\n return { ...value, ...patch };\n}\n\n// Sets a top-level scalar, deleting the key entirely when cleared so the\n// compacted payload omits it instead of carrying an empty string/undefined.\nexport function withOptionalRoot(\n value: AISpecRuntimeValue,\n key: keyof AISpecRuntimeValue,\n next: unknown,\n): AISpecRuntimeValue {\n const updated = { ...value } as Record<string, unknown>;\n if (next === undefined || next === \"\") {\n delete updated[key];\n } else {\n updated[key] = next;\n }\n return updated as AISpecRuntimeValue;\n}\n\nexport function withPrompt(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimePrompt>,\n): AISpecRuntimeValue {\n return withRoot(value, { prompt: { ...value.prompt, ...patch } });\n}\n\nexport function withBudget(\n value: AISpecRuntimeValue,\n budget: SpecBudget,\n): AISpecRuntimeValue {\n return withRoot(value, { budget });\n}\n\nexport function withBudgetValue(\n value: AISpecRuntimeValue,\n key: keyof SpecBudget,\n next: number | string | undefined,\n): AISpecRuntimeValue {\n const budget = { ...value.budget } as Record<string, unknown>;\n if (next === undefined || next === \"\") {\n delete budget[key];\n } else {\n budget[key] = next;\n }\n return withRoot(value, { budget: budget as SpecBudget });\n}\n\nexport function withMemory(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeMemory>,\n): AISpecRuntimeValue {\n return withRoot(value, { memory: { ...value.memory, ...patch } });\n}\n\nexport function withPermissions(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimePermissions>,\n): AISpecRuntimeValue {\n return withRoot(value, { permissions: { ...value.permissions, ...patch } });\n}\n\n/**\n * Reads the sandbox ref in object form regardless of which form it is stored\n * in, so the section's controls do not each have to re-narrow the union.\n */\nexport function sandboxRef(value: AISpecRuntimeValue): AISpecRuntimeSandbox {\n if (typeof value.sandbox === \"string\") {\n return { mode: value.sandbox.trim() as SpecSandboxMode };\n }\n return value.sandbox ?? {};\n}\n\n/**\n * Patches the unified ref while keeping its object form during editing.\n */\nexport function withSandbox(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeSandbox>,\n): AISpecRuntimeValue {\n const next: AISpecRuntimeSandbox = { ...sandboxRef(value), ...patch };\n if (!next.mode) {\n throw new Error(\n \"sandbox.mode is required before configuring sandbox settings\",\n );\n }\n return withRoot(value, { sandbox: next });\n}\n\nexport function withSandboxMode(\n value: AISpecRuntimeValue,\n mode: SpecSandboxMode,\n): AISpecRuntimeValue {\n const current = sandboxRef(value);\n if (current.mode === mode) return value;\n return withRoot(value, { sandbox: { mode } });\n}\n\nexport function withSandboxBackend(\n value: AISpecRuntimeValue,\n backend: string,\n): AISpecRuntimeValue {\n const next = { ...sandboxRef(value) };\n const selected = backend.trim();\n if (selected) next.backend = selected;\n else delete next.backend;\n return withRoot(value, { sandbox: next });\n}\n\nexport function withSandboxAgent(\n value: AISpecRuntimeValue,\n agent: string,\n): AISpecRuntimeValue {\n const next = { ...sandboxRef(value) };\n const selected = agent.trim();\n if (selected) next.agent = selected;\n else delete next.agent;\n return withRoot(value, { sandbox: next });\n}\n\n// The base posture is independent of the sandbox (see AISpecRuntimePermissions\n// doc comment), so unlike sandbox settings it deletes cleanly to Unspecified\n// without needing a mode to be configured first.\nexport function withPermissionMode(\n value: AISpecRuntimeValue,\n mode: SpecPermissionMode | undefined,\n): AISpecRuntimeValue {\n const next = { ...value.permissions } as AISpecRuntimePermissions;\n if (mode) next.mode = mode;\n else delete next.mode;\n if (Object.keys(next).length === 0) {\n const { permissions: _permissions, ...rest } = value;\n return rest as AISpecRuntimeValue;\n }\n return withRoot(value, { permissions: next });\n}\n\nexport function withSandboxPolicy(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeSandboxPolicy>,\n): AISpecRuntimeValue {\n if (sandboxRef(value).mode !== \"native\") {\n throw new Error(\"native sandbox policy requires sandbox.mode native\");\n }\n return withSandbox(value, {\n policy: { ...sandboxRef(value).policy, ...patch },\n });\n}\n\nexport function withSandboxDispatch(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeSandboxDispatch>,\n): AISpecRuntimeValue {\n if (sandboxRef(value).mode !== \"git-agent\") {\n throw new Error(\"sandbox dispatch policy requires sandbox.mode git-agent\");\n }\n return withSandbox(value, {\n dispatch: { ...sandboxRef(value).dispatch, ...patch },\n });\n}\n\nexport function withSetup(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeSetup>,\n): AISpecRuntimeValue {\n return withRoot(value, { setup: { ...value.setup, ...patch } });\n}\n\nexport function withConnections(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeConnections>,\n): AISpecRuntimeValue {\n return withSetup(value, {\n connections: { ...value.setup?.connections, ...patch },\n });\n}\n\nexport function withCheckout(\n value: AISpecRuntimeValue,\n patch: SpecCheckout,\n): AISpecRuntimeValue {\n return withSetup(value, {\n checkout: { ...value.setup?.checkout, ...patch },\n });\n}\n\nexport function withWorktree(\n value: AISpecRuntimeValue,\n patch: SpecWorktree,\n): AISpecRuntimeValue {\n return withCheckout(value, {\n worktree: { ...value.setup?.checkout?.worktree, ...patch },\n });\n}\n\nexport function withDirty(\n value: AISpecRuntimeValue,\n patch: SpecDirty,\n): AISpecRuntimeValue {\n return withCheckout(value, {\n dirty: { ...value.setup?.checkout?.dirty, ...patch },\n });\n}\n\nexport function withVerify(\n value: AISpecRuntimeValue,\n patch: NonNullable<SpecWorkflow[\"verify\"]>,\n): AISpecRuntimeValue {\n return withRoot(value, {\n workflow: {\n ...value.workflow,\n verify: { ...value.workflow?.verify, ...patch },\n },\n });\n}\n\n// The editor drives a single commit policy. A spec authored by hand may declare\n// several stanzas; the ones past the first are carried through untouched rather\n// than collapsed away by an edit to a field the editor does surface.\nexport function withCommit(\n value: AISpecRuntimeValue,\n patch: Partial<SpecCommit>,\n): AISpecRuntimeValue {\n const [first, ...rest] = value.workflow?.commits ?? [];\n return withRoot(value, {\n workflow: { ...value.workflow, commits: [{ ...first, ...patch }, ...rest] },\n });\n}\n\n// \"Never\" drops every stanza rather than flagging one off: an absent list is how\n// the spec says \"commit nothing\", and a surviving {dryRun: true} would leave the\n// section reading as configured.\nexport function withCommitPhase(\n value: AISpecRuntimeValue,\n phase: SpecCommitPhase | \"none\",\n): AISpecRuntimeValue {\n if (phase === \"none\") {\n return withRoot(value, { workflow: { ...value.workflow, commits: [] } });\n }\n return withCommit(value, { on: phase });\n}\n\n// A stanza with no explicit phase commits at the end of the run, matching\n// api.Commit.Phase()'s default. Shared between a value's own first commit\n// stanza and an inherited stanza the section displays in its place.\nexport function commitPhaseFromEntry(\n commit: SpecCommit | undefined,\n): SpecCommitPhase {\n const on = commit?.on;\n return on === \"turn\" || on === \"agent\" ? on : \"run\";\n}\n\nexport function commitPhase(\n value: AISpecRuntimeValue,\n): SpecCommitPhase | \"none\" {\n const commits = value.workflow?.commits;\n if (!commits?.length) return \"none\";\n return commitPhaseFromEntry(commits[0]);\n}\n\n// Mode switches clear the fields that no longer apply, so stale values from a\n// previous mode never leak into the compacted payload.\nexport function withCheckoutMode(\n value: AISpecRuntimeValue,\n mode: SpecCheckoutMode,\n): AISpecRuntimeValue {\n if (mode === \"none\") {\n return withCheckout(value, {\n mode,\n url: \"\",\n path: \"\",\n connection: \"\",\n ref: \"\",\n depth: 0,\n });\n }\n if (mode === \"local\")\n return withCheckout(value, { mode, url: \"\", connection: \"\" });\n return withCheckout(value, { mode, path: \"\" });\n}\n\nexport function withWorktreeMode(\n value: AISpecRuntimeValue,\n mode: SpecWorktreeMode,\n): AISpecRuntimeValue {\n if (mode === \"none\") {\n return withWorktree(value, {\n mode,\n prefix: \"\",\n base: \"\",\n path: \"\",\n keep: false,\n });\n }\n const next =\n value.workflow?.commits === undefined\n ? withCommitPhase(value, \"turn\")\n : value;\n if (mode === \"existing\") {\n return withWorktree(next, { mode, prefix: \"\", base: \"\", keep: false });\n }\n return withWorktree(next, { mode });\n}\n\nexport function withStashMode(\n value: AISpecRuntimeValue,\n stash: SpecStashMode,\n): AISpecRuntimeValue {\n return withDirty(value, stash === \"none\" ? { stash, since: \"\" } : { stash });\n}\n\nexport function checkoutMode(value: AISpecRuntimeValue): SpecCheckoutMode {\n const checkout = value.setup?.checkout;\n if (checkout?.mode === \"remote\") return \"remote\";\n if (checkout?.mode === \"local\" || checkout?.path) return \"local\";\n return \"none\";\n}\n\nexport function worktreeMode(value: AISpecRuntimeValue): SpecWorktreeMode {\n const mode = value.setup?.checkout?.worktree?.mode;\n if (mode === \"existing\") return \"existing\";\n if (mode === \"new\") return \"new\";\n return \"none\";\n}\n\nexport function stashMode(value: AISpecRuntimeValue): SpecStashMode {\n const stash = value.setup?.checkout?.dirty?.stash;\n if (\n stash === \"untracked\" ||\n stash === \"unstaged\" ||\n stash === \"staged\" ||\n stash === \"all\"\n ) {\n return stash;\n }\n return \"none\";\n}\n\nexport function parseOptionalNumber(\n value: string,\n integer = false,\n): number | undefined {\n if (value.trim() === \"\") return undefined;\n const parsed = Number(value);\n if (!Number.isFinite(parsed)) return undefined;\n return integer ? Math.max(0, Math.trunc(parsed)) : parsed;\n}\n"],"names":[],"mappings":";;AAyBO,SAAS,SACd,OACA,OACoB;AACpB,SAAO,EAAE,GAAG,OAAO,GAAG,MAAA;AACxB;AAIO,SAAS,iBACd,OACA,KACA,MACoB;AACpB,QAAM,UAAU,EAAE,GAAG,MAAA;AACrB,MAAI,SAAS,UAAa,SAAS,IAAI;AACrC,WAAO,QAAQ,GAAG;AAAA,EACpB,OAAO;AACL,YAAQ,GAAG,IAAI;AAAA,EACjB;AACA,SAAO;AACT;AAEO,SAAS,WACd,OACA,OACoB;AACpB,SAAO,SAAS,OAAO,EAAE,QAAQ,EAAE,GAAG,MAAM,QAAQ,GAAG,MAAA,GAAS;AAClE;AASO,SAAS,gBACd,OACA,KACA,MACoB;AACpB,QAAM,SAAS,EAAE,GAAG,MAAM,OAAA;AAC1B,MAAI,SAAS,UAAa,SAAS,IAAI;AACrC,WAAO,OAAO,GAAG;AAAA,EACnB,OAAO;AACL,WAAO,GAAG,IAAI;AAAA,EAChB;AACA,SAAO,SAAS,OAAO,EAAE,QAA8B;AACzD;AAEO,SAAS,WACd,OACA,OACoB;AACpB,SAAO,SAAS,OAAO,EAAE,QAAQ,EAAE,GAAG,MA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,SAAO;AACT;AAEO,SAAS,aAAa,OAA6C;;AACxE,QAAM,QAAO,uBAAM,UAAN,mBAAa,aAAb,mBAAuB,aAAvB,mBAAiC;AAC9C,MAAI,SAAS,WAAY,QAAO;AAChC,MAAI,SAAS,MAAO,QAAO;AAC3B,SAAO;AACT;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -35,6 +35,7 @@ export declare function withDirty(value: AISpecRuntimeValue, patch: SpecDirty):
|
|
|
35
35
|
export declare function withVerify(value: AISpecRuntimeValue, patch: NonNullable<SpecWorkflow["verify"]>): AISpecRuntimeValue;
|
|
36
36
|
export declare function withCommit(value: AISpecRuntimeValue, patch: Partial<SpecCommit>): AISpecRuntimeValue;
|
|
37
37
|
export declare function withCommitPhase(value: AISpecRuntimeValue, phase: SpecCommitPhase | "none"): AISpecRuntimeValue;
|
|
38
|
+
export declare function commitPhaseFromEntry(commit: SpecCommit | undefined): SpecCommitPhase;
|
|
38
39
|
export declare function commitPhase(value: AISpecRuntimeValue): SpecCommitPhase | "none";
|
|
39
40
|
export declare function withCheckoutMode(value: AISpecRuntimeValue, mode: SpecCheckoutMode): AISpecRuntimeValue;
|
|
40
41
|
export declare function withWorktreeMode(value: AISpecRuntimeValue, mode: SpecWorktreeMode): AISpecRuntimeValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../src/data/ai/SpecRuntimeEditor/update.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,oBAAoB,EACpB,4BAA4B,EAC5B,0BAA0B,EAC1B,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AAEpC,KAAK,YAAY,GAAG,WAAW,CAAC,kBAAkB,CAAC,UAAU,CAAC,CA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IAAI,EAAE,gBAAgB,GACrB,kBAAkB,CAcpB;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,kBAAkB,EACzB,IAAI,EAAE,gBAAgB,GACrB,kBAAkB,CAkBpB;AAED,wBAAgB,aAAa,CAC3B,KAAK,EAAE,kBAAkB,EACzB,KAAK,EAAE,aAAa,GACnB,kBAAkB,CAEpB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,kBAAkB,GAAG,gBAAgB,CAKxE;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,kBAAkB,GAAG,gBAAgB,CAKxE;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,kBAAkB,GAAG,aAAa,CAWlE;AAED,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,EACb,OAAO,UAAQ,GACd,MAAM,GAAG,SAAS,CAKpB"}
|
|
@@ -34,7 +34,9 @@ function sandboxRef(value) {
|
|
|
34
34
|
function withSandbox(value, patch) {
|
|
35
35
|
const next = { ...sandboxRef(value), ...patch };
|
|
36
36
|
if (!next.mode) {
|
|
37
|
-
throw new Error(
|
|
37
|
+
throw new Error(
|
|
38
|
+
"sandbox.mode is required before configuring sandbox settings"
|
|
39
|
+
);
|
|
38
40
|
}
|
|
39
41
|
return withRoot(value, { sandbox: next });
|
|
40
42
|
}
|
|
@@ -112,12 +114,15 @@ function withCommitPhase(value, phase) {
|
|
|
112
114
|
}
|
|
113
115
|
return withCommit(value, { on: phase });
|
|
114
116
|
}
|
|
117
|
+
function commitPhaseFromEntry(commit) {
|
|
118
|
+
const on = commit == null ? void 0 : commit.on;
|
|
119
|
+
return on === "turn" || on === "agent" ? on : "run";
|
|
120
|
+
}
|
|
115
121
|
function commitPhase(value) {
|
|
116
|
-
var _a
|
|
122
|
+
var _a;
|
|
117
123
|
const commits = (_a = value.workflow) == null ? void 0 : _a.commits;
|
|
118
124
|
if (!(commits == null ? void 0 : commits.length)) return "none";
|
|
119
|
-
|
|
120
|
-
return on === "turn" || on === "agent" ? on : "run";
|
|
125
|
+
return commitPhaseFromEntry(commits[0]);
|
|
121
126
|
}
|
|
122
127
|
function withCheckoutMode(value, mode) {
|
|
123
128
|
if (mode === "none") {
|
|
@@ -135,6 +140,7 @@ function withCheckoutMode(value, mode) {
|
|
|
135
140
|
return withCheckout(value, { mode, path: "" });
|
|
136
141
|
}
|
|
137
142
|
function withWorktreeMode(value, mode) {
|
|
143
|
+
var _a;
|
|
138
144
|
if (mode === "none") {
|
|
139
145
|
return withWorktree(value, {
|
|
140
146
|
mode,
|
|
@@ -144,10 +150,11 @@ function withWorktreeMode(value, mode) {
|
|
|
144
150
|
keep: false
|
|
145
151
|
});
|
|
146
152
|
}
|
|
153
|
+
const next = ((_a = value.workflow) == null ? void 0 : _a.commits) === void 0 ? withCommitPhase(value, "turn") : value;
|
|
147
154
|
if (mode === "existing") {
|
|
148
|
-
return withWorktree(
|
|
155
|
+
return withWorktree(next, { mode, prefix: "", base: "", keep: false });
|
|
149
156
|
}
|
|
150
|
-
return withWorktree(
|
|
157
|
+
return withWorktree(next, { mode });
|
|
151
158
|
}
|
|
152
159
|
function checkoutMode(value) {
|
|
153
160
|
var _a;
|
|
@@ -166,6 +173,7 @@ function worktreeMode(value) {
|
|
|
166
173
|
export {
|
|
167
174
|
checkoutMode,
|
|
168
175
|
commitPhase,
|
|
176
|
+
commitPhaseFromEntry,
|
|
169
177
|
sandboxRef,
|
|
170
178
|
withBudgetValue,
|
|
171
179
|
withCheckout,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.js","sources":["../../../../src/data/ai/SpecRuntimeEditor/update.ts"],"sourcesContent":["import type {\n AISpecRuntimeConnections,\n AISpecRuntimeMemory,\n AISpecRuntimePermissions,\n AISpecRuntimePrompt,\n AISpecRuntimeSandbox,\n AISpecRuntimeSandboxDispatch,\n AISpecRuntimeSandboxPolicy,\n AISpecRuntimeSetup,\n AISpecRuntimeValue,\n SpecCheckoutMode,\n SpecCommitPhase,\n SpecPermissionMode,\n SpecSandboxMode,\n SpecStashMode,\n SpecWorktreeMode,\n} from \"../SpecRuntimeEditor.model\";\n\ntype SpecCheckout = NonNullable<AISpecRuntimeSetup[\"checkout\"]>;\ntype SpecWorktree = NonNullable<SpecCheckout[\"worktree\"]>;\ntype SpecDirty = NonNullable<SpecCheckout[\"dirty\"]>;\ntype SpecWorkflow = NonNullable<AISpecRuntimeValue[\"workflow\"]>;\ntype SpecCommit = NonNullable<SpecWorkflow[\"commits\"]>[number];\ntype SpecBudget = NonNullable<AISpecRuntimeValue[\"budget\"]>;\n\nexport function withRoot(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeValue>,\n): AISpecRuntimeValue {\n return { ...value, ...patch };\n}\n\n// Sets a top-level scalar, deleting the key entirely when cleared so the\n// compacted payload omits it instead of carrying an empty string/undefined.\nexport function withOptionalRoot(\n value: AISpecRuntimeValue,\n key: keyof AISpecRuntimeValue,\n next: unknown,\n): AISpecRuntimeValue {\n const updated = { ...value } as Record<string, unknown>;\n if (next === undefined || next === \"\") {\n delete updated[key];\n } else {\n updated[key] = next;\n }\n return updated as AISpecRuntimeValue;\n}\n\nexport function withPrompt(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimePrompt>,\n): AISpecRuntimeValue {\n return withRoot(value, { prompt: { ...value.prompt, ...patch } });\n}\n\nexport function withBudget(\n value: AISpecRuntimeValue,\n budget: SpecBudget,\n): AISpecRuntimeValue {\n return withRoot(value, { budget });\n}\n\nexport function withBudgetValue(\n value: AISpecRuntimeValue,\n key: keyof SpecBudget,\n next: number | string | undefined,\n): AISpecRuntimeValue {\n const budget = { ...value.budget } as Record<string, unknown>;\n if (next === undefined || next === \"\") {\n delete budget[key];\n } else {\n budget[key] = next;\n }\n return withRoot(value, { budget: budget as SpecBudget });\n}\n\nexport function withMemory(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeMemory>,\n): AISpecRuntimeValue {\n return withRoot(value, { memory: { ...value.memory, ...patch } });\n}\n\nexport function withPermissions(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimePermissions>,\n): AISpecRuntimeValue {\n return withRoot(value, { permissions: { ...value.permissions, ...patch } });\n}\n\n/**\n * Reads the sandbox ref in object form regardless of which form it is stored\n * in, so the section's controls do not each have to re-narrow the union.\n */\nexport function sandboxRef(value: AISpecRuntimeValue): AISpecRuntimeSandbox {\n if (typeof value.sandbox === \"string\") {\n return { mode: value.sandbox.trim() as SpecSandboxMode };\n }\n return value.sandbox ?? {};\n}\n\n/**\n * Patches the unified ref while keeping its object form during editing.\n */\nexport function withSandbox(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeSandbox>,\n): AISpecRuntimeValue {\n const next: AISpecRuntimeSandbox = { ...sandboxRef(value), ...patch };\n if (!next.mode) {\n throw new Error(\"sandbox.mode is required before configuring sandbox settings\");\n }\n return withRoot(value, { sandbox: next });\n}\n\nexport function withSandboxMode(\n value: AISpecRuntimeValue,\n mode: SpecSandboxMode,\n): AISpecRuntimeValue {\n const current = sandboxRef(value);\n if (current.mode === mode) return value;\n return withRoot(value, { sandbox: { mode } });\n}\n\nexport function withSandboxBackend(\n value: AISpecRuntimeValue,\n backend: string,\n): AISpecRuntimeValue {\n const next = { ...sandboxRef(value) };\n const selected = backend.trim();\n if (selected) next.backend = selected;\n else delete next.backend;\n return withRoot(value, { sandbox: next });\n}\n\nexport function withSandboxAgent(\n value: AISpecRuntimeValue,\n agent: string,\n): AISpecRuntimeValue {\n const next = { ...sandboxRef(value) };\n const selected = agent.trim();\n if (selected) next.agent = selected;\n else delete next.agent;\n return withRoot(value, { sandbox: next });\n}\n\n// The base posture is independent of the sandbox (see AISpecRuntimePermissions\n// doc comment), so unlike sandbox settings it deletes cleanly to Unspecified\n// without needing a mode to be configured first.\nexport function withPermissionMode(\n value: AISpecRuntimeValue,\n mode: SpecPermissionMode | undefined,\n): AISpecRuntimeValue {\n const next = { ...value.permissions } as AISpecRuntimePermissions;\n if (mode) next.mode = mode;\n else delete next.mode;\n if (Object.keys(next).length === 0) {\n const { permissions: _permissions, ...rest } = value;\n return rest as AISpecRuntimeValue;\n }\n return withRoot(value, { permissions: next });\n}\n\nexport function withSandboxPolicy(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeSandboxPolicy>,\n): AISpecRuntimeValue {\n if (sandboxRef(value).mode !== \"native\") {\n throw new Error(\"native sandbox policy requires sandbox.mode native\");\n }\n return withSandbox(value, {\n policy: { ...sandboxRef(value).policy, ...patch },\n });\n}\n\nexport function withSandboxDispatch(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeSandboxDispatch>,\n): AISpecRuntimeValue {\n if (sandboxRef(value).mode !== \"git-agent\") {\n throw new Error(\"sandbox dispatch policy requires sandbox.mode git-agent\");\n }\n return withSandbox(value, {\n dispatch: { ...sandboxRef(value).dispatch, ...patch },\n });\n}\n\nexport function withSetup(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeSetup>,\n): AISpecRuntimeValue {\n return withRoot(value, { setup: { ...value.setup, ...patch } });\n}\n\nexport function withConnections(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeConnections>,\n): AISpecRuntimeValue {\n return withSetup(value, {\n connections: { ...value.setup?.connections, ...patch },\n });\n}\n\nexport function withCheckout(\n value: AISpecRuntimeValue,\n patch: SpecCheckout,\n): AISpecRuntimeValue {\n return withSetup(value, {\n checkout: { ...value.setup?.checkout, ...patch },\n });\n}\n\nexport function withWorktree(\n value: AISpecRuntimeValue,\n patch: SpecWorktree,\n): AISpecRuntimeValue {\n return withCheckout(value, {\n worktree: { ...value.setup?.checkout?.worktree, ...patch },\n });\n}\n\nexport function withDirty(\n value: AISpecRuntimeValue,\n patch: SpecDirty,\n): AISpecRuntimeValue {\n return withCheckout(value, {\n dirty: { ...value.setup?.checkout?.dirty, ...patch },\n });\n}\n\nexport function withVerify(\n value: AISpecRuntimeValue,\n patch: NonNullable<SpecWorkflow[\"verify\"]>,\n): AISpecRuntimeValue {\n return withRoot(value, {\n workflow: {\n ...value.workflow,\n verify: { ...value.workflow?.verify, ...patch },\n },\n });\n}\n\n// The editor drives a single commit policy. A spec authored by hand may declare\n// several stanzas; the ones past the first are carried through untouched rather\n// than collapsed away by an edit to a field the editor does surface.\nexport function withCommit(\n value: AISpecRuntimeValue,\n patch: Partial<SpecCommit>,\n): AISpecRuntimeValue {\n const [first, ...rest] = value.workflow?.commits ?? [];\n return withRoot(value, {\n workflow: { ...value.workflow, commits: [{ ...first, ...patch }, ...rest] },\n });\n}\n\n// \"Never\" drops every stanza rather than flagging one off: an absent list is how\n// the spec says \"commit nothing\", and a surviving {dryRun: true} would leave the\n// section reading as configured.\nexport function withCommitPhase(\n value: AISpecRuntimeValue,\n phase: SpecCommitPhase | \"none\",\n): AISpecRuntimeValue {\n if (phase === \"none\") {\n return withRoot(value, { workflow: { ...value.workflow, commits: [] } });\n }\n return withCommit(value, { on: phase });\n}\n\n// A stanza with no explicit phase commits at the end of the run, matching\n// api.Commit.Phase()'s default.\nexport function commitPhase(\n value: AISpecRuntimeValue,\n): SpecCommitPhase | \"none\" {\n const commits = value.workflow?.commits;\n if (!commits?.length) return \"none\";\n const on = commits[0]?.on;\n return on === \"turn\" || on === \"agent\" ? on : \"run\";\n}\n\n// Mode switches clear the fields that no longer apply, so stale values from a\n// previous mode never leak into the compacted payload.\nexport function withCheckoutMode(\n value: AISpecRuntimeValue,\n mode: SpecCheckoutMode,\n): AISpecRuntimeValue {\n if (mode === \"none\") {\n return withCheckout(value, {\n mode,\n url: \"\",\n path: \"\",\n connection: \"\",\n ref: \"\",\n depth: 0,\n });\n }\n if (mode === \"local\")\n return withCheckout(value, { mode, url: \"\", connection: \"\" });\n return withCheckout(value, { mode, path: \"\" });\n}\n\nexport function withWorktreeMode(\n value: AISpecRuntimeValue,\n mode: SpecWorktreeMode,\n): AISpecRuntimeValue {\n if (mode === \"none\") {\n return withWorktree(value, {\n mode,\n prefix: \"\",\n base: \"\",\n path: \"\",\n keep: false,\n });\n }\n if (mode === \"existing\") {\n return withWorktree(value, { mode, prefix: \"\", base: \"\", keep: false });\n }\n return withWorktree(value, { mode });\n}\n\nexport function withStashMode(\n value: AISpecRuntimeValue,\n stash: SpecStashMode,\n): AISpecRuntimeValue {\n return withDirty(value, stash === \"none\" ? { stash, since: \"\" } : { stash });\n}\n\nexport function checkoutMode(value: AISpecRuntimeValue): SpecCheckoutMode {\n const checkout = value.setup?.checkout;\n if (checkout?.mode === \"remote\") return \"remote\";\n if (checkout?.mode === \"local\" || checkout?.path) return \"local\";\n return \"none\";\n}\n\nexport function worktreeMode(value: AISpecRuntimeValue): SpecWorktreeMode {\n const mode = value.setup?.checkout?.worktree?.mode;\n if (mode === \"existing\") return \"existing\";\n if (mode === \"new\") return \"new\";\n return \"none\";\n}\n\nexport function stashMode(value: AISpecRuntimeValue): SpecStashMode {\n const stash = value.setup?.checkout?.dirty?.stash;\n if (\n stash === \"untracked\" ||\n stash === \"unstaged\" ||\n stash === \"staged\" ||\n stash === \"all\"\n ) {\n return stash;\n }\n return \"none\";\n}\n\nexport function parseOptionalNumber(\n value: string,\n integer = false,\n): number | undefined {\n if (value.trim() === \"\") return undefined;\n const parsed = Number(value);\n if (!Number.isFinite(parsed)) return undefined;\n return integer ? Math.max(0, Math.trunc(parsed)) : parsed;\n}\n"],"names":[],"mappings":"AAyBO,SAAS,SACd,OACA,OACoB;AACpB,SAAO,EAAE,GAAG,OAAO,GAAG,MAAA;AACxB;AAIO,SAAS,iBACd,OACA,KACA,MACoB;AACpB,QAAM,UAAU,EAAE,GAAG,MAAA;AACrB,MAAI,SAAS,UAAa,SAAS,IAAI;AACrC,WAAO,QAAQ,GAAG;AAAA,EACpB,OAAO;AACL,YAAQ,GAAG,IAAI;AAAA,EACjB;AACA,SAAO;AACT;AAEO,SAAS,WACd,OACA,OACoB;AACpB,SAAO,SAAS,OAAO,EAAE,QAAQ,EAAE,GAAG,MAAM,QAAQ,GAAG,MAAA,GAAS;AAClE;AASO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,EACxE;AACA,SAAO,aAAa,OAAO,EAAE,MAAM;AACrC;AASO,SAAS,aAAa,OAA6C;AA7SnE;AA8SL,QAAM,YAAW,WAAM,UAAN,mBAAa;AAC9B,OAAI,qCAAU,UAAS,SAAU,QAAO;AACxC,OAAI,qCAAU,UAAS,YAAW,qCAAU,MAAM,QAAO;AACzD,SAAO;AACT;AAEO,SAAS,aAAa,OAA6C;AApTnE;AAqTL,QAAM,QAAO,uBAAM,UAAN,mBAAa,aAAb,mBAAuB,aAAvB,mBAAiC;AAC9C,MAAI,SAAS,WAAY,QAAO;AAChC,MAAI,SAAS,MAAO,QAAO;AAC3B,SAAO;AACT;"}
|
|
1
|
+
{"version":3,"file":"update.js","sources":["../../../../src/data/ai/SpecRuntimeEditor/update.ts"],"sourcesContent":["import type {\n AISpecRuntimeConnections,\n AISpecRuntimeMemory,\n AISpecRuntimePermissions,\n AISpecRuntimePrompt,\n AISpecRuntimeSandbox,\n AISpecRuntimeSandboxDispatch,\n AISpecRuntimeSandboxPolicy,\n AISpecRuntimeSetup,\n AISpecRuntimeValue,\n SpecCheckoutMode,\n SpecCommitPhase,\n SpecPermissionMode,\n SpecSandboxMode,\n SpecStashMode,\n SpecWorktreeMode,\n} from \"../SpecRuntimeEditor.model\";\n\ntype SpecCheckout = NonNullable<AISpecRuntimeSetup[\"checkout\"]>;\ntype SpecWorktree = NonNullable<SpecCheckout[\"worktree\"]>;\ntype SpecDirty = NonNullable<SpecCheckout[\"dirty\"]>;\ntype SpecWorkflow = NonNullable<AISpecRuntimeValue[\"workflow\"]>;\ntype SpecCommit = NonNullable<SpecWorkflow[\"commits\"]>[number];\ntype SpecBudget = NonNullable<AISpecRuntimeValue[\"budget\"]>;\n\nexport function withRoot(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeValue>,\n): AISpecRuntimeValue {\n return { ...value, ...patch };\n}\n\n// Sets a top-level scalar, deleting the key entirely when cleared so the\n// compacted payload omits it instead of carrying an empty string/undefined.\nexport function withOptionalRoot(\n value: AISpecRuntimeValue,\n key: keyof AISpecRuntimeValue,\n next: unknown,\n): AISpecRuntimeValue {\n const updated = { ...value } as Record<string, unknown>;\n if (next === undefined || next === \"\") {\n delete updated[key];\n } else {\n updated[key] = next;\n }\n return updated as AISpecRuntimeValue;\n}\n\nexport function withPrompt(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimePrompt>,\n): AISpecRuntimeValue {\n return withRoot(value, { prompt: { ...value.prompt, ...patch } });\n}\n\nexport function withBudget(\n value: AISpecRuntimeValue,\n budget: SpecBudget,\n): AISpecRuntimeValue {\n return withRoot(value, { budget });\n}\n\nexport function withBudgetValue(\n value: AISpecRuntimeValue,\n key: keyof SpecBudget,\n next: number | string | undefined,\n): AISpecRuntimeValue {\n const budget = { ...value.budget } as Record<string, unknown>;\n if (next === undefined || next === \"\") {\n delete budget[key];\n } else {\n budget[key] = next;\n }\n return withRoot(value, { budget: budget as SpecBudget });\n}\n\nexport function withMemory(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeMemory>,\n): AISpecRuntimeValue {\n return withRoot(value, { memory: { ...value.memory, ...patch } });\n}\n\nexport function withPermissions(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimePermissions>,\n): AISpecRuntimeValue {\n return withRoot(value, { permissions: { ...value.permissions, ...patch } });\n}\n\n/**\n * Reads the sandbox ref in object form regardless of which form it is stored\n * in, so the section's controls do not each have to re-narrow the union.\n */\nexport function sandboxRef(value: AISpecRuntimeValue): AISpecRuntimeSandbox {\n if (typeof value.sandbox === \"string\") {\n return { mode: value.sandbox.trim() as SpecSandboxMode };\n }\n return value.sandbox ?? {};\n}\n\n/**\n * Patches the unified ref while keeping its object form during editing.\n */\nexport function withSandbox(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeSandbox>,\n): AISpecRuntimeValue {\n const next: AISpecRuntimeSandbox = { ...sandboxRef(value), ...patch };\n if (!next.mode) {\n throw new Error(\n \"sandbox.mode is required before configuring sandbox settings\",\n );\n }\n return withRoot(value, { sandbox: next });\n}\n\nexport function withSandboxMode(\n value: AISpecRuntimeValue,\n mode: SpecSandboxMode,\n): AISpecRuntimeValue {\n const current = sandboxRef(value);\n if (current.mode === mode) return value;\n return withRoot(value, { sandbox: { mode } });\n}\n\nexport function withSandboxBackend(\n value: AISpecRuntimeValue,\n backend: string,\n): AISpecRuntimeValue {\n const next = { ...sandboxRef(value) };\n const selected = backend.trim();\n if (selected) next.backend = selected;\n else delete next.backend;\n return withRoot(value, { sandbox: next });\n}\n\nexport function withSandboxAgent(\n value: AISpecRuntimeValue,\n agent: string,\n): AISpecRuntimeValue {\n const next = { ...sandboxRef(value) };\n const selected = agent.trim();\n if (selected) next.agent = selected;\n else delete next.agent;\n return withRoot(value, { sandbox: next });\n}\n\n// The base posture is independent of the sandbox (see AISpecRuntimePermissions\n// doc comment), so unlike sandbox settings it deletes cleanly to Unspecified\n// without needing a mode to be configured first.\nexport function withPermissionMode(\n value: AISpecRuntimeValue,\n mode: SpecPermissionMode | undefined,\n): AISpecRuntimeValue {\n const next = { ...value.permissions } as AISpecRuntimePermissions;\n if (mode) next.mode = mode;\n else delete next.mode;\n if (Object.keys(next).length === 0) {\n const { permissions: _permissions, ...rest } = value;\n return rest as AISpecRuntimeValue;\n }\n return withRoot(value, { permissions: next });\n}\n\nexport function withSandboxPolicy(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeSandboxPolicy>,\n): AISpecRuntimeValue {\n if (sandboxRef(value).mode !== \"native\") {\n throw new Error(\"native sandbox policy requires sandbox.mode native\");\n }\n return withSandbox(value, {\n policy: { ...sandboxRef(value).policy, ...patch },\n });\n}\n\nexport function withSandboxDispatch(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeSandboxDispatch>,\n): AISpecRuntimeValue {\n if (sandboxRef(value).mode !== \"git-agent\") {\n throw new Error(\"sandbox dispatch policy requires sandbox.mode git-agent\");\n }\n return withSandbox(value, {\n dispatch: { ...sandboxRef(value).dispatch, ...patch },\n });\n}\n\nexport function withSetup(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeSetup>,\n): AISpecRuntimeValue {\n return withRoot(value, { setup: { ...value.setup, ...patch } });\n}\n\nexport function withConnections(\n value: AISpecRuntimeValue,\n patch: Partial<AISpecRuntimeConnections>,\n): AISpecRuntimeValue {\n return withSetup(value, {\n connections: { ...value.setup?.connections, ...patch },\n });\n}\n\nexport function withCheckout(\n value: AISpecRuntimeValue,\n patch: SpecCheckout,\n): AISpecRuntimeValue {\n return withSetup(value, {\n checkout: { ...value.setup?.checkout, ...patch },\n });\n}\n\nexport function withWorktree(\n value: AISpecRuntimeValue,\n patch: SpecWorktree,\n): AISpecRuntimeValue {\n return withCheckout(value, {\n worktree: { ...value.setup?.checkout?.worktree, ...patch },\n });\n}\n\nexport function withDirty(\n value: AISpecRuntimeValue,\n patch: SpecDirty,\n): AISpecRuntimeValue {\n return withCheckout(value, {\n dirty: { ...value.setup?.checkout?.dirty, ...patch },\n });\n}\n\nexport function withVerify(\n value: AISpecRuntimeValue,\n patch: NonNullable<SpecWorkflow[\"verify\"]>,\n): AISpecRuntimeValue {\n return withRoot(value, {\n workflow: {\n ...value.workflow,\n verify: { ...value.workflow?.verify, ...patch },\n },\n });\n}\n\n// The editor drives a single commit policy. A spec authored by hand may declare\n// several stanzas; the ones past the first are carried through untouched rather\n// than collapsed away by an edit to a field the editor does surface.\nexport function withCommit(\n value: AISpecRuntimeValue,\n patch: Partial<SpecCommit>,\n): AISpecRuntimeValue {\n const [first, ...rest] = value.workflow?.commits ?? [];\n return withRoot(value, {\n workflow: { ...value.workflow, commits: [{ ...first, ...patch }, ...rest] },\n });\n}\n\n// \"Never\" drops every stanza rather than flagging one off: an absent list is how\n// the spec says \"commit nothing\", and a surviving {dryRun: true} would leave the\n// section reading as configured.\nexport function withCommitPhase(\n value: AISpecRuntimeValue,\n phase: SpecCommitPhase | \"none\",\n): AISpecRuntimeValue {\n if (phase === \"none\") {\n return withRoot(value, { workflow: { ...value.workflow, commits: [] } });\n }\n return withCommit(value, { on: phase });\n}\n\n// A stanza with no explicit phase commits at the end of the run, matching\n// api.Commit.Phase()'s default. Shared between a value's own first commit\n// stanza and an inherited stanza the section displays in its place.\nexport function commitPhaseFromEntry(\n commit: SpecCommit | undefined,\n): SpecCommitPhase {\n const on = commit?.on;\n return on === \"turn\" || on === \"agent\" ? on : \"run\";\n}\n\nexport function commitPhase(\n value: AISpecRuntimeValue,\n): SpecCommitPhase | \"none\" {\n const commits = value.workflow?.commits;\n if (!commits?.length) return \"none\";\n return commitPhaseFromEntry(commits[0]);\n}\n\n// Mode switches clear the fields that no longer apply, so stale values from a\n// previous mode never leak into the compacted payload.\nexport function withCheckoutMode(\n value: AISpecRuntimeValue,\n mode: SpecCheckoutMode,\n): AISpecRuntimeValue {\n if (mode === \"none\") {\n return withCheckout(value, {\n mode,\n url: \"\",\n path: \"\",\n connection: \"\",\n ref: \"\",\n depth: 0,\n });\n }\n if (mode === \"local\")\n return withCheckout(value, { mode, url: \"\", connection: \"\" });\n return withCheckout(value, { mode, path: \"\" });\n}\n\nexport function withWorktreeMode(\n value: AISpecRuntimeValue,\n mode: SpecWorktreeMode,\n): AISpecRuntimeValue {\n if (mode === \"none\") {\n return withWorktree(value, {\n mode,\n prefix: \"\",\n base: \"\",\n path: \"\",\n keep: false,\n });\n }\n const next =\n value.workflow?.commits === undefined\n ? withCommitPhase(value, \"turn\")\n : value;\n if (mode === \"existing\") {\n return withWorktree(next, { mode, prefix: \"\", base: \"\", keep: false });\n }\n return withWorktree(next, { mode });\n}\n\nexport function withStashMode(\n value: AISpecRuntimeValue,\n stash: SpecStashMode,\n): AISpecRuntimeValue {\n return withDirty(value, stash === \"none\" ? { stash, since: \"\" } : { stash });\n}\n\nexport function checkoutMode(value: AISpecRuntimeValue): SpecCheckoutMode {\n const checkout = value.setup?.checkout;\n if (checkout?.mode === \"remote\") return \"remote\";\n if (checkout?.mode === \"local\" || checkout?.path) return \"local\";\n return \"none\";\n}\n\nexport function worktreeMode(value: AISpecRuntimeValue): SpecWorktreeMode {\n const mode = value.setup?.checkout?.worktree?.mode;\n if (mode === \"existing\") return \"existing\";\n if (mode === \"new\") return \"new\";\n return \"none\";\n}\n\nexport function stashMode(value: AISpecRuntimeValue): SpecStashMode {\n const stash = value.setup?.checkout?.dirty?.stash;\n if (\n stash === \"untracked\" ||\n stash === \"unstaged\" ||\n stash === \"staged\" ||\n stash === \"all\"\n ) {\n return stash;\n }\n return \"none\";\n}\n\nexport function parseOptionalNumber(\n value: string,\n integer = false,\n): number | undefined {\n if (value.trim() === \"\") return undefined;\n const parsed = Number(value);\n if (!Number.isFinite(parsed)) return undefined;\n return integer ? Math.max(0, Math.trunc(parsed)) : parsed;\n}\n"],"names":[],"mappings":"AAyBO,SAAS,SACd,OACA,OACoB;AACpB,SAAO,EAAE,GAAG,OAAO,GAAG,MAAA;AACxB;AAIO,SAAS,iBACd,OACA,KACA,MACoB;AACpB,QAAM,UAAU,EAAE,GAAG,MAAA;AACrB,MAAI,SAAS,UAAa,SAAS,IAAI;AACrC,WAAO,QAAQ,GAAG;AAAA,EACpB,OAAO;AACL,YAAQ,GAAG,IAAI;AAAA,EACjB;AACA,SAAO;AACT;AAEO,SAAS,WACd,OACA,OACoB;AACpB,SAAO,SAAS,OAAO,EAAE,QAAQ,EAAE,GAAG,MAAM,QAAQ,GAAG,MAAA,GAAS;AAClE;AASO,SAAS,gBACd,OACA,KACA,MACoB;AACpB,QAAM,SAAS,EAAE,GAAG,MAAM,OAAA;AAC1B,MAAI,SAAS,UAAa,SAAS,IAAI;AACrC,WAAO,OAAO,GAAG;AAAA,EACnB,OAAO;AACL,WAAO,GAAG,IAAI;AAAA,EAChB;AACA,SAAO,SAAS,OAAO,EAAE,QAA8B;AACzD;AAEO,SAAS,WACd,OACA,OACoB;AACpB,SAAO,SAAS,OAAO,EAAE,QAAQ,EAAE,GAAG,MAAM,QAAQ,GAAG,MAAA,GAAS;AAClE;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MAAM,QAAO;AACzD,SAAO;AACT;AAEO,SAAS,aAAa,OAA6C;AAjUnE;AAkUL,QAAM,QAAO,uBAAM,UAAN,mBAAa,aAAb,mBAAuB,aAAvB,mBAAiC;AAC9C,MAAI,SAAS,WAAY,QAAO;AAChC,MAAI,SAAS,MAAO,QAAO;AAC3B,SAAO;AACT;"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const OWN_BODY_KINDS = /* @__PURE__ */ new Set([
|
|
4
|
+
"command",
|
|
5
|
+
"filesystem",
|
|
6
|
+
"network",
|
|
7
|
+
"permissions",
|
|
8
|
+
"elicitation",
|
|
9
|
+
"plan"
|
|
10
|
+
]);
|
|
11
|
+
function hasApprovalBody(request) {
|
|
12
|
+
return request !== void 0 && OWN_BODY_KINDS.has(request.kind);
|
|
13
|
+
}
|
|
14
|
+
function grantEntries(policy) {
|
|
15
|
+
var _a, _b, _c, _d;
|
|
16
|
+
const entries = [];
|
|
17
|
+
for (const root of ((_a = policy.filesystem) == null ? void 0 : _a.writableRoots) ?? []) {
|
|
18
|
+
entries.push({
|
|
19
|
+
key: `write:${root}`,
|
|
20
|
+
label: `Write ${root}`,
|
|
21
|
+
apply: (grant) => {
|
|
22
|
+
const filesystem = grant.filesystem ?? (grant.filesystem = {});
|
|
23
|
+
(filesystem.writableRoots ?? (filesystem.writableRoots = [])).push(root);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
for (const root of ((_b = policy.filesystem) == null ? void 0 : _b.readableRoots) ?? []) {
|
|
28
|
+
entries.push({
|
|
29
|
+
key: `read:${root}`,
|
|
30
|
+
label: `Read ${root}`,
|
|
31
|
+
apply: (grant) => {
|
|
32
|
+
const filesystem = grant.filesystem ?? (grant.filesystem = {});
|
|
33
|
+
(filesystem.readableRoots ?? (filesystem.readableRoots = [])).push(root);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
const access = (_c = policy.network) == null ? void 0 : _c.access;
|
|
38
|
+
if (access) {
|
|
39
|
+
entries.push({
|
|
40
|
+
key: "network:access",
|
|
41
|
+
label: `Network access: ${access}`,
|
|
42
|
+
apply: (grant) => {
|
|
43
|
+
(grant.network ?? (grant.network = {})).access = access;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
for (const domain of ((_d = policy.network) == null ? void 0 : _d.allowedDomains) ?? []) {
|
|
48
|
+
entries.push({
|
|
49
|
+
key: `domain:${domain}`,
|
|
50
|
+
label: `Network domain ${domain}`,
|
|
51
|
+
apply: (grant) => {
|
|
52
|
+
const network = grant.network ?? (grant.network = {});
|
|
53
|
+
(network.allowedDomains ?? (network.allowedDomains = [])).push(domain);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
return entries;
|
|
58
|
+
}
|
|
59
|
+
function grantFromSelection(entries, selected) {
|
|
60
|
+
const grant = {};
|
|
61
|
+
for (const entry of entries) {
|
|
62
|
+
if (selected.has(entry.key)) entry.apply(grant);
|
|
63
|
+
}
|
|
64
|
+
return grant;
|
|
65
|
+
}
|
|
66
|
+
function offeredScopes(request) {
|
|
67
|
+
return ((request == null ? void 0 : request.supportedScopes) ?? []).filter(
|
|
68
|
+
(scope) => scope !== "request"
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
exports.grantEntries = grantEntries;
|
|
72
|
+
exports.grantFromSelection = grantFromSelection;
|
|
73
|
+
exports.hasApprovalBody = hasApprovalBody;
|
|
74
|
+
exports.offeredScopes = offeredScopes;
|
|
75
|
+
//# sourceMappingURL=approval-request.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"approval-request.cjs","sources":["../../../src/data/ai/approval-request.ts"],"sourcesContent":["// Typed mirror of captain's `api.ApprovalRequest` / `api.ApprovalDecision` JSON\n// (pkg/api/approval.go). Every field beyond `tool`/`input` is optional here: a\n// host that predates the unified approval callback sends only the old shape and\n// the viewer must keep rendering it.\n\nexport type ApprovalKind =\n | \"tool\"\n | \"command\"\n | \"filesystem\"\n | \"network\"\n | \"permissions\"\n | \"question\"\n | \"elicitation\"\n | \"plan\";\n\n/** How far an approval reaches. Absent or \"request\" means this request only. */\nexport type ApprovalScope = \"request\" | \"turn\" | \"session\";\n\nexport interface StdinWrite {\n terminal: string;\n chars: string;\n}\n\nexport interface CommandApproval {\n command?: string;\n cwd?: string;\n unsandboxed?: boolean;\n stdin?: StdinWrite;\n /** The provider's suggested persistent rule. Shown, never offered as an action. */\n proposedPolicy?: string[];\n}\n\nexport type FilesystemOperation = \"read\" | \"write\" | \"edit\" | \"delete\" | \"patch\";\n\nexport interface FileChange {\n path: string;\n kind: string;\n}\n\nexport interface FilesystemApproval {\n operation: FilesystemOperation;\n paths?: string[];\n changes?: FileChange[];\n}\n\nexport interface NetworkApproval {\n host?: string;\n protocol?: string;\n url?: string;\n command?: string;\n}\n\nexport type SandboxFilesystemAccess = \"read-only\" | \"workspace-write\";\nexport type SandboxNetworkAccess = \"disabled\" | \"restricted\" | \"unrestricted\";\n\nexport interface SandboxFilesystemPolicy {\n access?: SandboxFilesystemAccess;\n writableRoots?: string[];\n readableRoots?: string[];\n deniedReadRoots?: string[];\n deniedWriteRoots?: string[];\n includeSystemTemp?: boolean;\n}\n\nexport interface SandboxNetworkPolicy {\n access?: SandboxNetworkAccess;\n allowedDomains?: string[];\n deniedDomains?: string[];\n allowedUnixSockets?: string[];\n allowAllUnixSockets?: boolean;\n allowLocalBinding?: boolean;\n allowedMachServices?: string[];\n httpProxyPort?: number;\n socksProxyPort?: number;\n}\n\nexport interface SandboxCommandPolicy {\n excludedFromSandbox?: string[];\n allowUnsandboxed?: boolean;\n}\n\nexport interface SandboxCredentialsPolicy {\n deniedFiles?: string[];\n deniedEnv?: string[];\n maskedEnv?: string[];\n}\n\nexport interface SandboxPlatformPolicy {\n allowAppleEvents?: boolean;\n weakerNestedIsolation?: boolean;\n weakerNetworkIsolation?: boolean;\n}\n\n/** captain `api.NativeSandboxPolicy`: the sandbox vocabulary a permissions\n * request is expressed in and a grant is answered in. A grant may carry only\n * `filesystem.writableRoots`/`readableRoots` and `network`, and only entries the\n * request listed. */\nexport interface NativeSandboxPolicy {\n required?: boolean;\n filesystem?: SandboxFilesystemPolicy;\n network?: SandboxNetworkPolicy;\n commands?: SandboxCommandPolicy;\n credentials?: SandboxCredentialsPolicy;\n platform?: SandboxPlatformPolicy;\n}\n\n/** captain `api.TerminalQuestion`. Answers are keyed by `id`, or by `text` when\n * the provider gives questions no id (Claude). */\nexport interface ApprovalQuestion {\n id?: string;\n text: string;\n context?: string;\n options?: string[];\n optionDescriptions?: Record<string, string>;\n multiSelect?: boolean;\n secret?: boolean;\n}\n\nexport type ElicitationMode = \"form\" | \"url\";\n\nexport interface ElicitationApproval {\n server: string;\n mode: ElicitationMode;\n message: string;\n /** The requested form: a flat object schema of primitive fields. */\n schema?: Record<string, unknown>;\n url?: string;\n elicitationId?: string;\n}\n\n/** The plan an agent asks to implement (captain `TerminalPlan`). */\nexport interface ApprovalPlan {\n content: string;\n path?: string;\n}\n\nexport interface ApprovalRequest {\n tool: string;\n input?: Record<string, unknown>;\n toolUseId?: string;\n sessionId?: string;\n kind: ApprovalKind;\n turnId?: string;\n reason?: string;\n /** Approving exceeds the run's initial sandbox posture. */\n escalates?: boolean;\n /** Cancel (deny + interrupt the turn) is available. */\n interruptible?: boolean;\n supportedScopes?: ApprovalScope[];\n command?: CommandApproval;\n filesystem?: FilesystemApproval;\n network?: NetworkApproval;\n permissions?: NativeSandboxPolicy;\n questions?: ApprovalQuestion[];\n elicitation?: ElicitationApproval;\n /** Approving leaves plan mode; a deny keeps planning with the message as feedback. */\n plan?: ApprovalPlan;\n}\n\n/** The decision fields beyond allow/message that a typed approval can carry. */\nexport interface ApprovalDecisionFields {\n /** Question answers, keyed by question id (or text). */\n answers?: Record<string, string | string[]>;\n /** Deny and interrupt the turn. Only valid on an `interruptible` request. */\n interrupt?: boolean;\n /** Widen an approval beyond this request; only a scope in `supportedScopes`. */\n scope?: Exclude<ApprovalScope, \"request\">;\n /** The approved subset of a `permissions` request. */\n grants?: NativeSandboxPolicy;\n /** Accepted form-mode elicitation content. */\n content?: Record<string, unknown>;\n}\n\n/** Kinds whose body the viewer draws itself instead of the generic tool row;\n * `tool` and `question` keep their existing rows and only gain controls. */\nconst OWN_BODY_KINDS: ReadonlySet<ApprovalKind> = new Set([\n \"command\",\n \"filesystem\",\n \"network\",\n \"permissions\",\n \"elicitation\",\n \"plan\",\n]);\n\nexport function hasApprovalBody(\n request: ApprovalRequest | undefined,\n): request is ApprovalRequest {\n return request !== undefined && OWN_BODY_KINDS.has(request.kind);\n}\n\n/** One selectable entry of a permissions request. */\nexport interface GrantEntry {\n key: string;\n label: string;\n /** Adds this entry to a grant under construction. */\n apply: (grant: NativeSandboxPolicy) => void;\n}\n\n/** Lists exactly what a permissions request asks for, one entry per grantable\n * item. Only the fields captain accepts back in a grant are listed. */\nexport function grantEntries(policy: NativeSandboxPolicy): GrantEntry[] {\n const entries: GrantEntry[] = [];\n for (const root of policy.filesystem?.writableRoots ?? []) {\n entries.push({\n key: `write:${root}`,\n label: `Write ${root}`,\n apply: (grant) => {\n const filesystem = (grant.filesystem ??= {});\n (filesystem.writableRoots ??= []).push(root);\n },\n });\n }\n for (const root of policy.filesystem?.readableRoots ?? []) {\n entries.push({\n key: `read:${root}`,\n label: `Read ${root}`,\n apply: (grant) => {\n const filesystem = (grant.filesystem ??= {});\n (filesystem.readableRoots ??= []).push(root);\n },\n });\n }\n const access = policy.network?.access;\n if (access) {\n entries.push({\n key: \"network:access\",\n label: `Network access: ${access}`,\n apply: (grant) => {\n (grant.network ??= {}).access = access;\n },\n });\n }\n for (const domain of policy.network?.allowedDomains ?? []) {\n entries.push({\n key: `domain:${domain}`,\n label: `Network domain ${domain}`,\n apply: (grant) => {\n const network = (grant.network ??= {});\n (network.allowedDomains ??= []).push(domain);\n },\n });\n }\n return entries;\n}\n\n/** Builds the grant for the selected entry keys. */\nexport function grantFromSelection(\n entries: readonly GrantEntry[],\n selected: ReadonlySet<string>,\n): NativeSandboxPolicy {\n const grant: NativeSandboxPolicy = {};\n for (const entry of entries) {\n if (selected.has(entry.key)) entry.apply(grant);\n }\n return grant;\n}\n\n/** The scopes a host may offer beyond a single request. */\nexport function offeredScopes(\n request: ApprovalRequest | undefined,\n): Exclude<ApprovalScope, \"request\">[] {\n return (request?.supportedScopes ?? []).filter(\n (scope): scope is Exclude<ApprovalScope, \"request\"> => scope !== \"request\",\n );\n}\n"],"names":[],"mappings":";;AA+KA,MAAM,qCAAgD,IAAI;AAAA,EACxD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEM,SAAS,gBACd,SAC4B;AAC5B,SAAO,YAAY,UAAa,eAAe,IAAI,QAAQ,IAAI;AACjE;AAYO,SAAS,aAAa,QAA2C;;AACtE,QAAM,UAAwB,CAAA;AAC9B,aAAW,UAAQ,YAAO,eAAP,mBAAmB,kBAAiB,CAAA,GAAI;AACzD,YAAQ,KAAK;AAAA,MACX,KAAK,SAAS,IAAI;AAAA,MAClB,OAAO,SAAS,IAAI;AAAA,MACpB,OAAO,CAAC,UAAU;AAChB,cAAM,aAAc,MAAM,eAAN,MAAM,aAAe,CAAA;AACzC,SAAC,WAAW,kBAAX,WAAW,gBAAkB,KAAI,KAAK,IAAI;AAAA,MAC7C;AAAA,IAAA,CACD;AAAA,EACH;AACA,aAAW,UAAQ,YAAO,eAAP,mBAAmB,kBAAiB,CAAA,GAAI;AACzD,YAAQ,KAAK;AAAA,MACX,KAAK,QAAQ,IAAI;AAAA,MACjB,OAAO,QAAQ,IAAI;AAAA,MACnB,OAAO,CAAC,UAAU;AAChB,cAAM,aAAc,MAAM,eAAN,MAAM,aAAe,CAAA;AACzC,SAAC,WAAW,kBAAX,WAAW,gBAAkB,KAAI,KA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