@stigmer/react 3.1.1 → 3.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/composer/SessionComposer.d.ts +25 -1
- package/composer/SessionComposer.d.ts.map +1 -1
- package/composer/SessionComposer.js +19 -8
- package/composer/SessionComposer.js.map +1 -1
- package/execution/ArtifactContentRenderer.d.ts +11 -1
- package/execution/ArtifactContentRenderer.d.ts.map +1 -1
- package/execution/ArtifactContentRenderer.js +39 -15
- package/execution/ArtifactContentRenderer.js.map +1 -1
- package/execution/ArtifactPreviewModal.d.ts +5 -5
- package/execution/ArtifactPreviewModal.js +4 -4
- package/execution/ArtifactPreviewModal.js.map +1 -1
- package/execution/FileChangeProgressBar.d.ts +47 -0
- package/execution/FileChangeProgressBar.d.ts.map +1 -0
- package/execution/FileChangeProgressBar.js +49 -0
- package/execution/FileChangeProgressBar.js.map +1 -0
- package/execution/FileChangesView.d.ts.map +1 -1
- package/execution/FileChangesView.js +19 -4
- package/execution/FileChangesView.js.map +1 -1
- package/execution/FilePathContext.d.ts +8 -1
- package/execution/FilePathContext.d.ts.map +1 -1
- package/execution/FilePathContext.js.map +1 -1
- package/execution/FilePathLink.d.ts.map +1 -1
- package/execution/FilePathLink.js +21 -6
- package/execution/FilePathLink.js.map +1 -1
- package/execution/FileReviewAtoms.d.ts +27 -0
- package/execution/FileReviewAtoms.d.ts.map +1 -0
- package/execution/FileReviewAtoms.js +64 -0
- package/execution/FileReviewAtoms.js.map +1 -0
- package/execution/FileReviewCard.d.ts +2 -2
- package/execution/FileReviewCard.d.ts.map +1 -1
- package/execution/FileReviewCard.js +32 -62
- package/execution/FileReviewCard.js.map +1 -1
- package/execution/MessageEntry.d.ts +20 -0
- package/execution/MessageEntry.d.ts.map +1 -1
- package/execution/MessageEntry.js +19 -5
- package/execution/MessageEntry.js.map +1 -1
- package/execution/MessageThread.d.ts +75 -13
- package/execution/MessageThread.d.ts.map +1 -1
- package/execution/MessageThread.js +195 -27
- package/execution/MessageThread.js.map +1 -1
- package/execution/PlanArtifactCard.d.ts +36 -21
- package/execution/PlanArtifactCard.d.ts.map +1 -1
- package/execution/PlanArtifactCard.js +39 -25
- package/execution/PlanArtifactCard.js.map +1 -1
- package/execution/PlanCompletionCard.d.ts +4 -4
- package/execution/PlanCompletionCard.d.ts.map +1 -1
- package/execution/PlanCompletionCard.js +4 -4
- package/execution/PlanCompletionCard.js.map +1 -1
- package/execution/PlanDocumentMessage.d.ts +32 -0
- package/execution/PlanDocumentMessage.d.ts.map +1 -0
- package/execution/PlanDocumentMessage.js +37 -0
- package/execution/PlanDocumentMessage.js.map +1 -0
- package/execution/PlanStreamingCard.d.ts +50 -0
- package/execution/PlanStreamingCard.d.ts.map +1 -0
- package/execution/PlanStreamingCard.js +40 -0
- package/execution/PlanStreamingCard.js.map +1 -0
- package/execution/index.d.ts +9 -1
- package/execution/index.d.ts.map +1 -1
- package/execution/index.js +4 -0
- package/execution/index.js.map +1 -1
- package/execution/use-build-from-plan-hotkey.d.ts +1 -1
- package/execution/use-build-from-plan-hotkey.js +1 -1
- package/execution/useArtifactCopy.d.ts +51 -0
- package/execution/useArtifactCopy.d.ts.map +1 -0
- package/execution/useArtifactCopy.js +75 -0
- package/execution/useArtifactCopy.js.map +1 -0
- package/execution/useArtifactDownload.d.ts.map +1 -1
- package/execution/useArtifactDownload.js +17 -5
- package/execution/useArtifactDownload.js.map +1 -1
- package/execution/useCreateAgentExecution.d.ts +12 -0
- package/execution/useCreateAgentExecution.d.ts.map +1 -1
- package/execution/useCreateAgentExecution.js +5 -1
- package/execution/useCreateAgentExecution.js.map +1 -1
- package/github/decodeGitHubContent.d.ts +29 -0
- package/github/decodeGitHubContent.d.ts.map +1 -0
- package/github/decodeGitHubContent.js +72 -0
- package/github/decodeGitHubContent.js.map +1 -0
- package/github/index.d.ts +1 -0
- package/github/index.d.ts.map +1 -1
- package/github/index.js +1 -0
- package/github/index.js.map +1 -1
- package/github/useGitHubFileReader.d.ts +26 -0
- package/github/useGitHubFileReader.d.ts.map +1 -0
- package/github/useGitHubFileReader.js +106 -0
- package/github/useGitHubFileReader.js.map +1 -0
- package/github/useGitHubTreeLister.d.ts.map +1 -1
- package/github/useGitHubTreeLister.js +6 -2
- package/github/useGitHubTreeLister.js.map +1 -1
- package/index.d.ts +9 -9
- package/index.d.ts.map +1 -1
- package/index.js +5 -5
- package/index.js.map +1 -1
- package/internal/ResizableSplit.d.ts +72 -22
- package/internal/ResizableSplit.d.ts.map +1 -1
- package/internal/ResizableSplit.js +96 -38
- package/internal/ResizableSplit.js.map +1 -1
- package/internal/VirtualizedThread.d.ts +5 -3
- package/internal/VirtualizedThread.d.ts.map +1 -1
- package/internal/VirtualizedThread.js +6 -4
- package/internal/VirtualizedThread.js.map +1 -1
- package/internal/file-icons/index.d.ts +17 -0
- package/internal/file-icons/index.d.ts.map +1 -0
- package/internal/file-icons/index.js +60 -0
- package/internal/file-icons/index.js.map +1 -0
- package/internal/file-tree/FileTreeNode.d.ts +18 -1
- package/internal/file-tree/FileTreeNode.d.ts.map +1 -1
- package/internal/file-tree/FileTreeNode.js +11 -2
- package/internal/file-tree/FileTreeNode.js.map +1 -1
- package/internal/markdown-components.d.ts +38 -1
- package/internal/markdown-components.d.ts.map +1 -1
- package/internal/markdown-components.js +86 -11
- package/internal/markdown-components.js.map +1 -1
- package/{workflow → internal}/motion-preference.d.ts +7 -4
- package/internal/motion-preference.d.ts.map +1 -0
- package/{workflow → internal}/motion-preference.js +7 -4
- package/internal/motion-preference.js.map +1 -0
- package/internal/store/index.d.ts +33 -0
- package/internal/store/index.d.ts.map +1 -1
- package/internal/store/index.js +59 -0
- package/internal/store/index.js.map +1 -1
- package/internal/store/workspace-editors-store.d.ts +145 -0
- package/internal/store/workspace-editors-store.d.ts.map +1 -0
- package/internal/store/workspace-editors-store.js +208 -0
- package/internal/store/workspace-editors-store.js.map +1 -0
- package/internal/store/workspace-file-selection-store.d.ts +38 -0
- package/internal/store/workspace-file-selection-store.d.ts.map +1 -0
- package/internal/store/workspace-file-selection-store.js +62 -0
- package/internal/store/workspace-file-selection-store.js.map +1 -0
- package/internal/useRevealLine.d.ts +49 -0
- package/internal/useRevealLine.d.ts.map +1 -0
- package/internal/useRevealLine.js +43 -0
- package/internal/useRevealLine.js.map +1 -0
- package/library/detect-plan-artifact.d.ts +43 -4
- package/library/detect-plan-artifact.d.ts.map +1 -1
- package/library/detect-plan-artifact.js +45 -5
- package/library/detect-plan-artifact.js.map +1 -1
- package/library/detect-streaming-plan.d.ts +45 -0
- package/library/detect-streaming-plan.d.ts.map +1 -0
- package/library/detect-streaming-plan.js +83 -0
- package/library/detect-streaming-plan.js.map +1 -0
- package/library/index.d.ts +4 -1
- package/library/index.d.ts.map +1 -1
- package/library/index.js +2 -1
- package/library/index.js.map +1 -1
- package/package.json +4 -4
- package/session/NewSessionViewer.d.ts +19 -4
- package/session/NewSessionViewer.d.ts.map +1 -1
- package/session/NewSessionViewer.js +52 -25
- package/session/NewSessionViewer.js.map +1 -1
- package/session/PlanEditor.d.ts +55 -0
- package/session/PlanEditor.d.ts.map +1 -0
- package/session/PlanEditor.js +88 -0
- package/session/PlanEditor.js.map +1 -0
- package/session/PlanStreamingDocument.d.ts +30 -0
- package/session/PlanStreamingDocument.d.ts.map +1 -0
- package/session/PlanStreamingDocument.js +37 -0
- package/session/PlanStreamingDocument.js.map +1 -0
- package/session/SessionPanelChip.d.ts +26 -0
- package/session/SessionPanelChip.d.ts.map +1 -0
- package/session/SessionPanelChip.js +40 -0
- package/session/SessionPanelChip.js.map +1 -0
- package/session/SessionViewer.d.ts +34 -7
- package/session/SessionViewer.d.ts.map +1 -1
- package/session/SessionViewer.js +334 -33
- package/session/SessionViewer.js.map +1 -1
- package/session/{inspector → facets}/ArtifactsTab.d.ts +10 -2
- package/session/facets/ArtifactsTab.d.ts.map +1 -0
- package/session/{inspector → facets}/ArtifactsTab.js +8 -3
- package/session/facets/ArtifactsTab.js.map +1 -0
- package/session/{inspector → facets}/ChangesTab.d.ts +3 -3
- package/session/facets/ChangesTab.d.ts.map +1 -0
- package/session/{inspector → facets}/ChangesTab.js +3 -3
- package/session/facets/ChangesTab.js.map +1 -0
- package/session/facets/InspectTab.d.ts.map +1 -0
- package/session/facets/InspectTab.js.map +1 -0
- package/session/{inspector → facets}/SetupTab.d.ts +11 -2
- package/session/facets/SetupTab.d.ts.map +1 -0
- package/session/{inspector → facets}/SetupTab.js +4 -3
- package/session/facets/SetupTab.js.map +1 -0
- package/session/{inspector → facets}/UsageTab.d.ts +1 -1
- package/session/facets/UsageTab.d.ts.map +1 -0
- package/session/{inspector → facets}/UsageTab.js +1 -1
- package/session/facets/UsageTab.js.map +1 -0
- package/session/{inspector → facets}/index.d.ts +0 -6
- package/session/facets/index.d.ts.map +1 -0
- package/session/{inspector → facets}/index.js +0 -3
- package/session/facets/index.js.map +1 -0
- package/session/index.d.ts +11 -2
- package/session/index.d.ts.map +1 -1
- package/session/index.js +15 -2
- package/session/index.js.map +1 -1
- package/session/plan-document.d.ts +21 -0
- package/session/plan-document.d.ts.map +1 -0
- package/session/plan-document.js +28 -0
- package/session/plan-document.js.map +1 -0
- package/session/useOpenFileChange.d.ts +20 -0
- package/session/useOpenFileChange.d.ts.map +1 -0
- package/session/useOpenFileChange.js +31 -0
- package/session/useOpenFileChange.js.map +1 -0
- package/session/usePlanDraft.d.ts +52 -0
- package/session/usePlanDraft.d.ts.map +1 -0
- package/session/usePlanDraft.js +63 -0
- package/session/usePlanDraft.js.map +1 -0
- package/session/useSessionConversation.d.ts +14 -1
- package/session/useSessionConversation.d.ts.map +1 -1
- package/session/useSessionConversation.js +20 -2
- package/session/useSessionConversation.js.map +1 -1
- package/session/useSessionPageFlow.d.ts.map +1 -1
- package/session/useSessionPageFlow.js +1 -0
- package/session/useSessionPageFlow.js.map +1 -1
- package/session/useSessionPanel.d.ts +120 -0
- package/session/useSessionPanel.d.ts.map +1 -0
- package/session/useSessionPanel.js +130 -0
- package/session/useSessionPanel.js.map +1 -0
- package/session/useSessionRailViews.d.ts +45 -0
- package/session/useSessionRailViews.d.ts.map +1 -0
- package/session/useSessionRailViews.js +105 -0
- package/session/useSessionRailViews.js.map +1 -0
- package/src/composer/SessionComposer.tsx +53 -10
- package/src/composer/__tests__/SessionComposer-contract.test.tsx +58 -4
- package/src/execution/ArtifactContentRenderer.tsx +101 -24
- package/src/execution/ArtifactPreviewModal.tsx +9 -9
- package/src/execution/FileChangeProgressBar.tsx +121 -0
- package/src/execution/FileChangesView.tsx +18 -4
- package/src/execution/FilePathContext.tsx +8 -1
- package/src/execution/FilePathLink.tsx +22 -6
- package/src/execution/FileReviewAtoms.tsx +89 -0
- package/src/execution/FileReviewCard.tsx +57 -90
- package/src/execution/MessageEntry.tsx +49 -1
- package/src/execution/MessageThread.tsx +308 -39
- package/src/execution/PlanArtifactCard.tsx +174 -64
- package/src/execution/PlanCompletionCard.tsx +5 -5
- package/src/execution/PlanDocumentMessage.tsx +96 -0
- package/src/execution/PlanStreamingCard.tsx +141 -0
- package/src/execution/__tests__/ArtifactContentRenderer.test.tsx +80 -1
- package/src/execution/__tests__/ArtifactPreviewModal.test.tsx +6 -6
- package/src/execution/__tests__/FileChangeProgressBar.test.tsx +125 -0
- package/src/execution/__tests__/FilePathLink.test.tsx +87 -0
- package/src/execution/__tests__/FileReviewCard.test.tsx +66 -7
- package/src/execution/__tests__/MessageThread.test.tsx +102 -1
- package/src/execution/__tests__/PlanArtifactCard.test.tsx +114 -26
- package/src/execution/__tests__/PlanCompletionCard.test.tsx +2 -2
- package/src/execution/__tests__/PlanDocumentMessage.test.tsx +55 -0
- package/src/execution/__tests__/PlanStreamingCard.test.tsx +56 -0
- package/src/execution/__tests__/buildThreadItems-plan-completion.test.ts +600 -22
- package/src/execution/__tests__/message-entry.test.tsx +17 -0
- package/src/execution/__tests__/useArtifactCopy.test.tsx +90 -0
- package/src/execution/__tests__/useArtifactDownload.test.tsx +2 -0
- package/src/execution/__tests__/useCreateAgentExecution.test.tsx +85 -0
- package/src/execution/index.ts +13 -1
- package/src/execution/use-build-from-plan-hotkey.ts +1 -1
- package/src/execution/useArtifactCopy.ts +109 -0
- package/src/execution/useArtifactDownload.ts +17 -5
- package/src/execution/useCreateAgentExecution.ts +18 -1
- package/src/github/__tests__/decodeGitHubContent.test.ts +102 -0
- package/src/github/__tests__/useGitHubFileReader.test.ts +183 -0
- package/src/github/decodeGitHubContent.ts +83 -0
- package/src/github/index.ts +1 -0
- package/src/github/useGitHubFileReader.ts +152 -0
- package/src/github/useGitHubTreeLister.ts +6 -2
- package/src/index.ts +69 -9
- package/src/internal/ResizableSplit.tsx +184 -51
- package/src/internal/VirtualizedThread.tsx +12 -4
- package/src/internal/__tests__/ResizableSplit.test.tsx +125 -3
- package/src/internal/__tests__/markdown-components.test.tsx +68 -0
- package/src/internal/__tests__/useRevealLine.test.tsx +97 -0
- package/src/internal/file-icons/__tests__/file-icons.test.tsx +35 -0
- package/src/internal/file-icons/index.tsx +137 -0
- package/src/internal/file-tree/FileTreeNode.tsx +56 -5
- package/src/internal/file-tree/__tests__/FileTreeNode-explorer.test.tsx +86 -0
- package/src/internal/markdown-components.tsx +116 -11
- package/src/{workflow → internal}/motion-preference.ts +7 -4
- package/src/internal/store/__tests__/workspace-editors-store.test.ts +216 -0
- package/src/internal/store/__tests__/workspace-file-selection-store.test.ts +118 -0
- package/src/internal/store/index.ts +94 -0
- package/src/internal/store/workspace-editors-store.ts +315 -0
- package/src/internal/store/workspace-file-selection-store.ts +88 -0
- package/src/internal/useRevealLine.ts +81 -0
- package/src/library/__tests__/detect-plan-artifact.test.ts +69 -0
- package/src/library/__tests__/detect-streaming-plan.test.ts +234 -0
- package/src/library/detect-plan-artifact.ts +62 -5
- package/src/library/detect-streaming-plan.ts +108 -0
- package/src/library/index.ts +7 -0
- package/src/session/NewSessionViewer.tsx +123 -55
- package/src/session/PlanEditor.tsx +361 -0
- package/src/session/PlanStreamingDocument.tsx +97 -0
- package/src/session/SessionPanelChip.tsx +103 -0
- package/src/session/SessionViewer.tsx +655 -96
- package/src/session/__tests__/NewSessionViewer.test.tsx +148 -0
- package/src/session/__tests__/PlanEditor.test.tsx +217 -0
- package/src/session/__tests__/PlanStreamingDocument.test.tsx +50 -0
- package/src/session/__tests__/SessionPanelChip.test.tsx +42 -0
- package/src/session/__tests__/SessionViewer-fileReviewDock.test.tsx +66 -4
- package/src/session/__tests__/SessionViewer-transcriptFileOpen.test.tsx +205 -0
- package/src/session/__tests__/audienceWiring.test.tsx +55 -19
- package/src/session/__tests__/useOpenFileChange.test.tsx +82 -0
- package/src/session/__tests__/usePlanDraft.test.ts +102 -0
- package/src/session/__tests__/useSessionConversation.test.tsx +44 -0
- package/src/session/__tests__/useSessionPanel.test.ts +298 -0
- package/src/session/__tests__/useSessionRailViews.test.tsx +124 -0
- package/src/session/{inspector → facets}/ArtifactsTab.tsx +27 -5
- package/src/session/{inspector → facets}/ChangesTab.tsx +3 -3
- package/src/session/{inspector → facets}/SetupTab.tsx +13 -1
- package/src/session/{inspector → facets}/UsageTab.tsx +1 -1
- package/src/session/{inspector → facets}/__tests__/ArtifactsTab.test.tsx +42 -8
- package/src/session/facets/__tests__/SetupTab.test.tsx +44 -0
- package/src/session/{inspector → facets}/index.ts +0 -16
- package/src/session/index.ts +30 -13
- package/src/session/plan-document.ts +30 -0
- package/src/session/useOpenFileChange.ts +53 -0
- package/src/session/usePlanDraft.ts +109 -0
- package/src/session/useSessionConversation.ts +38 -3
- package/src/session/useSessionPageFlow.ts +1 -0
- package/src/session/useSessionPanel.ts +288 -0
- package/src/session/useSessionRailViews.tsx +200 -0
- package/src/workflow/WorkflowExecutionGraph.tsx +1 -1
- package/src/workflow/index.ts +1 -1
- package/src/workflow/useFollowExecution.ts +1 -1
- package/src/workspace/EditorTabs.tsx +174 -0
- package/src/workspace/ExplorerTree.tsx +253 -0
- package/src/workspace/FileViewer.tsx +537 -0
- package/src/workspace/WorkspaceContentSearch.tsx +502 -0
- package/src/workspace/WorkspaceContentSearcher.ts +70 -0
- package/src/workspace/WorkspaceEditor.tsx +19 -16
- package/src/workspace/WorkspaceFileLister.ts +11 -0
- package/src/workspace/WorkspaceFileReader.ts +57 -0
- package/src/workspace/WorkspaceFileSearch.tsx +452 -0
- package/src/workspace/WorkspaceSurface.tsx +839 -0
- package/src/workspace/__tests__/EditorTabs.test.tsx +102 -0
- package/src/workspace/__tests__/ExplorerTree.test.tsx +204 -0
- package/src/workspace/__tests__/FileViewer.test.tsx +439 -0
- package/src/workspace/__tests__/WorkspaceContentSearch.test.tsx +229 -0
- package/src/workspace/__tests__/WorkspaceEditor-initialPanel.test.tsx +19 -0
- package/src/workspace/__tests__/WorkspaceFileSearch.test.tsx +227 -0
- package/src/workspace/__tests__/WorkspaceSurface.test.tsx +418 -0
- package/src/workspace/__tests__/a11y/harness.tsx +140 -0
- package/src/workspace/__tests__/a11y/mock-capabilities.ts +138 -0
- package/src/workspace/__tests__/a11y/workspace-editor.a11y.test.tsx +65 -0
- package/src/workspace/__tests__/a11y/workspace-explorer-search.a11y.test.tsx +112 -0
- package/src/workspace/__tests__/a11y/workspace-viewer-tabs.a11y.test.tsx +69 -0
- package/src/workspace/__tests__/findChangeForSelection.test.ts +132 -0
- package/src/workspace/__tests__/matchContentPreview.test.ts +55 -0
- package/src/workspace/__tests__/matchWorkspaceFiles.test.ts +104 -0
- package/src/workspace/__tests__/resolveWorkspaceFileSelection.test.ts +135 -0
- package/src/workspace/__tests__/useWorkspaceContentSearch.test.tsx +196 -0
- package/src/workspace/__tests__/useWorkspaceFileContent.test.tsx +190 -0
- package/src/workspace/__tests__/useWorkspaceFileSearch.test.tsx +162 -0
- package/src/workspace/findChangeForSelection.ts +61 -0
- package/src/workspace/index.ts +56 -2
- package/src/workspace/matchContentPreview.ts +51 -0
- package/src/workspace/matchWorkspaceFiles.ts +86 -0
- package/src/workspace/resolveWorkspaceFileSelection.ts +119 -0
- package/src/workspace/useWorkspaceContentSearch.ts +228 -0
- package/src/workspace/useWorkspaceFileContent.ts +129 -0
- package/src/workspace/useWorkspaceFileSearch.ts +184 -0
- package/src/workspace/useWorkspaceFiles.ts +27 -27
- package/src/workspace/workspaceListingCache.ts +93 -0
- package/styles.css +1 -1
- package/workflow/WorkflowExecutionGraph.js +1 -1
- package/workflow/WorkflowExecutionGraph.js.map +1 -1
- package/workflow/index.d.ts +1 -1
- package/workflow/index.d.ts.map +1 -1
- package/workflow/index.js +1 -1
- package/workflow/index.js.map +1 -1
- package/workflow/useFollowExecution.js +1 -1
- package/workflow/useFollowExecution.js.map +1 -1
- package/workspace/EditorTabs.d.ts +47 -0
- package/workspace/EditorTabs.d.ts.map +1 -0
- package/workspace/EditorTabs.js +78 -0
- package/workspace/EditorTabs.js.map +1 -0
- package/workspace/ExplorerTree.d.ts +32 -0
- package/workspace/ExplorerTree.d.ts.map +1 -0
- package/workspace/ExplorerTree.js +49 -0
- package/workspace/ExplorerTree.js.map +1 -0
- package/workspace/FileViewer.d.ts +93 -0
- package/workspace/FileViewer.d.ts.map +1 -0
- package/workspace/FileViewer.js +193 -0
- package/workspace/FileViewer.js.map +1 -0
- package/workspace/WorkspaceContentSearch.d.ts +41 -0
- package/workspace/WorkspaceContentSearch.d.ts.map +1 -0
- package/workspace/WorkspaceContentSearch.js +216 -0
- package/workspace/WorkspaceContentSearch.js.map +1 -0
- package/workspace/WorkspaceContentSearcher.d.ts +59 -0
- package/workspace/WorkspaceContentSearcher.d.ts.map +1 -0
- package/workspace/WorkspaceContentSearcher.js +7 -0
- package/workspace/WorkspaceContentSearcher.js.map +1 -0
- package/workspace/WorkspaceEditor.d.ts.map +1 -1
- package/workspace/WorkspaceEditor.js +8 -10
- package/workspace/WorkspaceEditor.js.map +1 -1
- package/workspace/WorkspaceFileLister.d.ts +11 -0
- package/workspace/WorkspaceFileLister.d.ts.map +1 -1
- package/workspace/WorkspaceFileReader.d.ts +48 -0
- package/workspace/WorkspaceFileReader.d.ts.map +1 -0
- package/workspace/WorkspaceFileReader.js +11 -0
- package/workspace/WorkspaceFileReader.js.map +1 -0
- package/workspace/WorkspaceFileSearch.d.ts +32 -0
- package/workspace/WorkspaceFileSearch.d.ts.map +1 -0
- package/workspace/WorkspaceFileSearch.js +175 -0
- package/workspace/WorkspaceFileSearch.js.map +1 -0
- package/workspace/WorkspaceSurface.d.ts +151 -0
- package/workspace/WorkspaceSurface.d.ts.map +1 -0
- package/workspace/WorkspaceSurface.js +220 -0
- package/workspace/WorkspaceSurface.js.map +1 -0
- package/workspace/findChangeForSelection.d.ts +19 -0
- package/workspace/findChangeForSelection.d.ts.map +1 -0
- package/workspace/findChangeForSelection.js +46 -0
- package/workspace/findChangeForSelection.js.map +1 -0
- package/workspace/index.d.ts +24 -2
- package/workspace/index.d.ts.map +1 -1
- package/workspace/index.js +13 -1
- package/workspace/index.js.map +1 -1
- package/workspace/matchContentPreview.d.ts +21 -0
- package/workspace/matchContentPreview.d.ts.map +1 -0
- package/workspace/matchContentPreview.js +36 -0
- package/workspace/matchContentPreview.js.map +1 -0
- package/workspace/matchWorkspaceFiles.d.ts +30 -0
- package/workspace/matchWorkspaceFiles.d.ts.map +1 -0
- package/workspace/matchWorkspaceFiles.js +58 -0
- package/workspace/matchWorkspaceFiles.js.map +1 -0
- package/workspace/resolveWorkspaceFileSelection.d.ts +19 -0
- package/workspace/resolveWorkspaceFileSelection.d.ts.map +1 -0
- package/workspace/resolveWorkspaceFileSelection.js +115 -0
- package/workspace/resolveWorkspaceFileSelection.js.map +1 -0
- package/workspace/useWorkspaceContentSearch.d.ts +69 -0
- package/workspace/useWorkspaceContentSearch.d.ts.map +1 -0
- package/workspace/useWorkspaceContentSearch.js +154 -0
- package/workspace/useWorkspaceContentSearch.js.map +1 -0
- package/workspace/useWorkspaceFileContent.d.ts +73 -0
- package/workspace/useWorkspaceFileContent.d.ts.map +1 -0
- package/workspace/useWorkspaceFileContent.js +57 -0
- package/workspace/useWorkspaceFileContent.js.map +1 -0
- package/workspace/useWorkspaceFileSearch.d.ts +61 -0
- package/workspace/useWorkspaceFileSearch.d.ts.map +1 -0
- package/workspace/useWorkspaceFileSearch.js +119 -0
- package/workspace/useWorkspaceFileSearch.js.map +1 -0
- package/workspace/useWorkspaceFiles.d.ts +13 -5
- package/workspace/useWorkspaceFiles.d.ts.map +1 -1
- package/workspace/useWorkspaceFiles.js +18 -19
- package/workspace/useWorkspaceFiles.js.map +1 -1
- package/workspace/workspaceListingCache.d.ts +47 -0
- package/workspace/workspaceListingCache.d.ts.map +1 -0
- package/workspace/workspaceListingCache.js +55 -0
- package/workspace/workspaceListingCache.js.map +1 -0
- package/session/inspector/ArtifactsTab.d.ts.map +0 -1
- package/session/inspector/ArtifactsTab.js.map +0 -1
- package/session/inspector/ChangesTab.d.ts.map +0 -1
- package/session/inspector/ChangesTab.js.map +0 -1
- package/session/inspector/InspectTab.d.ts.map +0 -1
- package/session/inspector/InspectTab.js.map +0 -1
- package/session/inspector/SessionInspector.d.ts +0 -64
- package/session/inspector/SessionInspector.d.ts.map +0 -1
- package/session/inspector/SessionInspector.js +0 -53
- package/session/inspector/SessionInspector.js.map +0 -1
- package/session/inspector/SetupTab.d.ts.map +0 -1
- package/session/inspector/SetupTab.js.map +0 -1
- package/session/inspector/UsageTab.d.ts.map +0 -1
- package/session/inspector/UsageTab.js.map +0 -1
- package/session/inspector/WorkspaceTab.d.ts +0 -35
- package/session/inspector/WorkspaceTab.d.ts.map +0 -1
- package/session/inspector/WorkspaceTab.js +0 -75
- package/session/inspector/WorkspaceTab.js.map +0 -1
- package/session/inspector/index.d.ts.map +0 -1
- package/session/inspector/index.js.map +0 -1
- package/session/inspector/useSessionInspector.d.ts +0 -49
- package/session/inspector/useSessionInspector.d.ts.map +0 -1
- package/session/inspector/useSessionInspector.js +0 -122
- package/session/inspector/useSessionInspector.js.map +0 -1
- package/src/session/inspector/SessionInspector.tsx +0 -162
- package/src/session/inspector/WorkspaceTab.tsx +0 -245
- package/src/session/inspector/__tests__/useSessionInspector.test.ts +0 -251
- package/src/session/inspector/useSessionInspector.ts +0 -178
- package/src/workspace/WorkspaceEntryFiles.tsx +0 -196
- package/workflow/motion-preference.d.ts.map +0 -1
- package/workflow/motion-preference.js.map +0 -1
- package/workspace/WorkspaceEntryFiles.d.ts +0 -22
- package/workspace/WorkspaceEntryFiles.d.ts.map +0 -1
- package/workspace/WorkspaceEntryFiles.js +0 -58
- package/workspace/WorkspaceEntryFiles.js.map +0 -1
- /package/session/{inspector → facets}/InspectTab.d.ts +0 -0
- /package/session/{inspector → facets}/InspectTab.js +0 -0
- /package/src/{workflow → internal}/__tests__/motion-preference.test.ts +0 -0
- /package/src/session/{inspector → facets}/InspectTab.tsx +0 -0
- /package/src/session/{inspector → facets}/__tests__/ChangesTab.test.tsx +0 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
+
import { create } from "@bufbuild/protobuf";
|
|
4
|
+
import { GetArtifactContentRequestSchema } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/io_pb";
|
|
5
|
+
import { useStigmer } from "../hooks.js";
|
|
6
|
+
import { toError } from "../internal/toError.js";
|
|
7
|
+
/** How long the transient `copied` flag stays true after a successful copy. */
|
|
8
|
+
const COPIED_FEEDBACK_MS = 2000;
|
|
9
|
+
/**
|
|
10
|
+
* Behavior hook that copies an execution artifact's text to the clipboard on
|
|
11
|
+
* demand.
|
|
12
|
+
*
|
|
13
|
+
* The imperative sibling of {@link useArtifactDownload}: it fetches content at
|
|
14
|
+
* click time via `getArtifactContent` (CORS-safe, through the Stigmer API)
|
|
15
|
+
* rather than requiring the caller to have loaded it. This suits content-free
|
|
16
|
+
* surfaces — a plan card that detects the artifact by convention and never
|
|
17
|
+
* fetches until the user acts — where a mount-time {@link useArtifactContent}
|
|
18
|
+
* would be wasteful.
|
|
19
|
+
*
|
|
20
|
+
* Returns an imperative `copy(storageKey)` action plus a transient `copied`
|
|
21
|
+
* flag for feedback, mirroring the modal's copy affordance so every surface
|
|
22
|
+
* shares one implementation.
|
|
23
|
+
*
|
|
24
|
+
* @param executionId - Execution that produced the artifacts, or `null` to
|
|
25
|
+
* disable (the action becomes a no-op).
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* const { copy, isCopying, copied } = useArtifactCopy(executionId);
|
|
30
|
+
* <button onClick={() => copy(artifact.storageKey)} disabled={isCopying}>
|
|
31
|
+
* {copied ? "Copied" : "Copy"}
|
|
32
|
+
* </button>
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @see useArtifactDownload — imperative save-to-disk counterpart
|
|
36
|
+
* @see useArtifactContent — declarative content reader (preview rendering)
|
|
37
|
+
*/
|
|
38
|
+
export function useArtifactCopy(executionId) {
|
|
39
|
+
const stigmer = useStigmer();
|
|
40
|
+
const [isCopying, setIsCopying] = useState(false);
|
|
41
|
+
const [copied, setCopied] = useState(false);
|
|
42
|
+
const [error, setError] = useState(null);
|
|
43
|
+
// Clear the pending "copied" timer on unmount so a resolved copy never sets
|
|
44
|
+
// state on an unmounted component.
|
|
45
|
+
const copiedTimer = useRef(null);
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
return () => {
|
|
48
|
+
if (copiedTimer.current !== null)
|
|
49
|
+
clearTimeout(copiedTimer.current);
|
|
50
|
+
};
|
|
51
|
+
}, []);
|
|
52
|
+
const copy = useCallback(async (storageKey) => {
|
|
53
|
+
if (!executionId || !storageKey || isCopying)
|
|
54
|
+
return;
|
|
55
|
+
setIsCopying(true);
|
|
56
|
+
setError(null);
|
|
57
|
+
try {
|
|
58
|
+
const result = await stigmer.agentExecution.getArtifactContent(create(GetArtifactContentRequestSchema, { executionId, storageKey }));
|
|
59
|
+
const text = new TextDecoder().decode(result.content);
|
|
60
|
+
await navigator.clipboard.writeText(text);
|
|
61
|
+
setCopied(true);
|
|
62
|
+
if (copiedTimer.current !== null)
|
|
63
|
+
clearTimeout(copiedTimer.current);
|
|
64
|
+
copiedTimer.current = setTimeout(() => setCopied(false), COPIED_FEEDBACK_MS);
|
|
65
|
+
}
|
|
66
|
+
catch (err) {
|
|
67
|
+
setError(toError(err));
|
|
68
|
+
}
|
|
69
|
+
finally {
|
|
70
|
+
setIsCopying(false);
|
|
71
|
+
}
|
|
72
|
+
}, [executionId, stigmer, isCopying]);
|
|
73
|
+
return useMemo(() => ({ copy, isCopying, copied, error }), [copy, isCopying, copied, error]);
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=useArtifactCopy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useArtifactCopy.js","sourceRoot":"","sources":["../../src/execution/useArtifactCopy.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,+BAA+B,EAAE,MAAM,4DAA4D,CAAC;AAC7G,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,+EAA+E;AAC/E,MAAM,kBAAkB,GAAG,IAAI,CAAC;AA0BhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,UAAU,eAAe,CAC7B,WAA0B;IAE1B,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAe,IAAI,CAAC,CAAC;IAEvD,4EAA4E;IAC5E,mCAAmC;IACnC,MAAM,W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ClC,CAAC;IAEF,OAAO,OAAO,CACZ,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAC1C,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,CACjC,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useArtifactDownload.d.ts","sourceRoot":"","sources":["../../src/execution/useArtifactDownload.ts"],"names":[],"mappings":"AAQA,mDAAmD;AACnD,MAAM,WAAW,yBAAyB;IACxC;;;;;;;OAOG;IACH,QAAQ,CAAC,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5E,4EAA4E;IAC5E,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAEhC,2EAA2E;IAC3E,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,MAAM,GAAG,IAAI,GACzB,yBAAyB,
|
|
1
|
+
{"version":3,"file":"useArtifactDownload.d.ts","sourceRoot":"","sources":["../../src/execution/useArtifactDownload.ts"],"names":[],"mappings":"AAQA,mDAAmD;AACnD,MAAM,WAAW,yBAAyB;IACxC;;;;;;;OAOG;IACH,QAAQ,CAAC,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5E,4EAA4E;IAC5E,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAEhC,2EAA2E;IAC3E,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,MAAM,GAAG,IAAI,GACzB,yBAAyB,CAuC3B"}
|
|
@@ -40,7 +40,16 @@ export function useArtifactDownload(executionId) {
|
|
|
40
40
|
setIsDownloading(true);
|
|
41
41
|
setError(null);
|
|
42
42
|
try {
|
|
43
|
-
const result = await stigmer.agentExecution.getArtifactDownloadUrl(create(GetArtifactDownloadUrlRequestSchema, {
|
|
43
|
+
const result = await stigmer.agentExecution.getArtifactDownloadUrl(create(GetArtifactDownloadUrlRequestSchema, {
|
|
44
|
+
executionId,
|
|
45
|
+
storageKey,
|
|
46
|
+
// This is a save-to-disk action, so mint a URL that forces a
|
|
47
|
+
// browser download (Content-Disposition: attachment). Browsers
|
|
48
|
+
// ignore the anchor's `download` attribute cross-origin, so the
|
|
49
|
+
// disposition must ride on the URL itself. Contrast
|
|
50
|
+
// useArtifactDownloadUrl, which stays inline for `<img src>`.
|
|
51
|
+
asAttachment: true,
|
|
52
|
+
}));
|
|
44
53
|
if (result.downloadUrl) {
|
|
45
54
|
triggerBrowserDownload(result.downloadUrl, fileName);
|
|
46
55
|
}
|
|
@@ -55,10 +64,13 @@ export function useArtifactDownload(executionId) {
|
|
|
55
64
|
return useMemo(() => ({ download, isDownloading, error }), [download, isDownloading, error]);
|
|
56
65
|
}
|
|
57
66
|
/**
|
|
58
|
-
* Trigger a browser download for a URL via a transient anchor click.
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
67
|
+
* Trigger a browser download for a URL via a transient anchor click.
|
|
68
|
+
*
|
|
69
|
+
* The URL minted for this flow carries `Content-Disposition: attachment`
|
|
70
|
+
* (requested via `asAttachment`), so the browser saves the file even
|
|
71
|
+
* cross-origin — where it would ignore the anchor's `download` attribute. The
|
|
72
|
+
* `download` hint is still set as a same-origin nicety. Falls back to a new tab
|
|
73
|
+
* in non-DOM environments.
|
|
62
74
|
*/
|
|
63
75
|
function triggerBrowserDownload(url, fileName) {
|
|
64
76
|
if (typeof document === "undefined") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useArtifactDownload.js","sourceRoot":"","sources":["../../src/execution/useArtifactDownload.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,mCAAmC,EAAE,MAAM,4DAA4D,CAAC;AACjH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAqBjD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,mBAAmB,CACjC,WAA0B;IAE1B,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC1D,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAe,IAAI,CAAC,CAAC;IAEvD,MAAM,QAAQ,GAAG,WAAW,CAC1B,KAAK,EAAE,UAAkB,EAAE,QAAiB,EAAE,EAAE;QAC9C,IAAI,CAAC,WAAW,IAAI,CAAC,UAAU,IAAI,aAAa;YAAE,OAAO;QACzD,gBAAgB,CAAC,IAAI,CAAC,CAAC;QACvB,QAAQ,CAAC,IAAI,CAAC,CAAC;QACf,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,cAAc,CAAC,sBAAsB,CAChE,MAAM,CAAC,mCAAmC,EAAE,
|
|
1
|
+
{"version":3,"file":"useArtifactDownload.js","sourceRoot":"","sources":["../../src/execution/useArtifactDownload.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EA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AAK,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC,EACD,CAAC,WAAW,EAAE,OAAO,EAAE,aAAa,CAAC,CACtC,CAAC;IAEF,OAAO,OAAO,CACZ,GAAG,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,EAC1C,CAAC,QAAQ,EAAE,aAAa,EAAE,KAAK,CAAC,CACjC,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,sBAAsB,CAAC,GAAW,EAAE,QAAiB;IAC5D,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,CAAC;QACpC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;YAClC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,EAAE,qBAAqB,CAAC,CAAC;QACpD,CAAC;QACD,OAAO;IACT,CAAC;IACD,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAC3C,MAAM,CAAC,IAAI,GAAG,GAAG,CAAC;IAClB,IAAI,QAAQ;QAAE,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACzC,MAAM,CAAC,GAAG,GAAG,qBAAqB,CAAC;IACnC,MAAM,CAAC,MAAM,GAAG,QAAQ,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAClC,MAAM,CAAC,KAAK,EAAE,CAAC;IACf,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -47,6 +47,18 @@ export interface CreateAgentExecutionInput {
|
|
|
47
47
|
* Maps to `ExecutionConfig.interaction_mode` in the proto.
|
|
48
48
|
*/
|
|
49
49
|
readonly interactionMode?: "agent" | "plan";
|
|
50
|
+
/**
|
|
51
|
+
* Marks this execution as a Build-from-plan turn: the user approved a
|
|
52
|
+
* plan from a prior Plan-mode execution and asked the agent to implement
|
|
53
|
+
* it. The runner injects the implement-plan directive (pointing at the
|
|
54
|
+
* attached approved plan when present); the thread hides the turn's
|
|
55
|
+
* machine-written message entirely — the plan card above it is the
|
|
56
|
+
* visible cause. Surfaces without that treatment (the CLI, history)
|
|
57
|
+
* show the message text as-is.
|
|
58
|
+
*
|
|
59
|
+
* Maps to `ExecutionConfig.build_from_plan` in the proto.
|
|
60
|
+
*/
|
|
61
|
+
readonly buildFromPlan?: boolean;
|
|
50
62
|
/**
|
|
51
63
|
* Auto-approve every tool call for this execution.
|
|
52
64
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCreateAgentExecution.d.ts","sourceRoot":"","sources":["../../src/execution/useCreateAgentExecution.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAKjE,8DAA8D;AAC9D,MAAM,WAAW,yBAAyB;IACxC,+CAA+C;IAC/C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,iDAAiD;IACjD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,qDAAqD;IACrD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,0EAA0E;IAC1E,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAClD;;;;;;OAMG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,eAAe,EAAE,CAAC;IACzC;;;;;;;OAOG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC5C;;;;;;;OAOG;IACH,QAAQ,CAAC,c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;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,uBAAuB,IAAI,6BAA6B,CA6DvE"}
|
|
@@ -50,7 +50,10 @@ export function useCreateAgentExecution() {
|
|
|
50
50
|
setIsCreating(true);
|
|
51
51
|
setError(null);
|
|
52
52
|
try {
|
|
53
|
-
const hasConfig = input.modelName ||
|
|
53
|
+
const hasConfig = input.modelName ||
|
|
54
|
+
input.interactionMode ||
|
|
55
|
+
input.structuredOutputSchema ||
|
|
56
|
+
input.buildFromPlan;
|
|
54
57
|
const executionConfig = hasConfig
|
|
55
58
|
? {
|
|
56
59
|
...(input.modelName ? { modelName: input.modelName } : {}),
|
|
@@ -60,6 +63,7 @@ export function useCreateAgentExecution() {
|
|
|
60
63
|
...(input.structuredOutputSchema
|
|
61
64
|
? { structuredOutputSchema: input.structuredOutputSchema }
|
|
62
65
|
: {}),
|
|
66
|
+
...(input.buildFromPlan ? { buildFromPlan: true } : {}),
|
|
63
67
|
}
|
|
64
68
|
: undefined;
|
|
65
69
|
const execution = await stigmer.agentExecution.create({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCreateAgentExecution.js","sourceRoot":"","sources":["../../src/execution/useCreateAgentExecution.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG9C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"useCreateAgentExecution.js","sourceRoot":"","sources":["../../src/execution/useCreateAgentExecution.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG9C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO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;oBACP,GAAG,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;iBACxD;gBACH,CAAC,CAAC,SAAS,CAAC;YAEd,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC;gBACpD,IAAI,EAAE,aAAa,IAAI,CAAC,GAAG,EAAE,EAAE;gBAC/B,GAAG,EAAE,KAAK,CAAC,GAAG;gBACd,SAAS,EAAE,KAAK,CAAC,SAAS;gBAC1B,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,eAAe;gBACf,cAAc,EAAE,KAAK,CAAC,cAAc;gBACpC,UAAU,EAAE,KAAK,CAAC,UAAU;gBAC5B,WAAW,EAAE,KAAK,CAAC,WAAW;gBAC9B,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;aAC3C,CAAC,CAAC;YAEH,OAAO;gBACL,WAAW,EAAE,SAAS,CAAC,QAAS,CAAC,EAAE;gBACnC,SAAS,EAAE,KAAK,CAAC,SAAS;aAC3B,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;YACvB,MAAM,GAAG,CAAC;QACZ,CAAC;gBAAS,CAAC;YACT,aAAa,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;IACH,CAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAC;IAEF,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type WorkspaceFileContent } from "../workspace/WorkspaceFileReader.js";
|
|
2
|
+
/**
|
|
3
|
+
* Decode a GitHub base64 payload to raw bytes.
|
|
4
|
+
*
|
|
5
|
+
* GitHub's Contents API line-wraps its base64 with `\n` every 60 chars, and
|
|
6
|
+
* `atob` rejects embedded newlines in some engines — strip all ASCII
|
|
7
|
+
* whitespace first.
|
|
8
|
+
*/
|
|
9
|
+
export declare function base64ToBytes(b64: string): Uint8Array;
|
|
10
|
+
/** Detect binary content via a NUL byte in the head of the buffer. */
|
|
11
|
+
export declare function detectBinary(bytes: Uint8Array): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Decode bytes as strict UTF-8, returning `null` when the sequence is invalid.
|
|
14
|
+
* `{ fatal: true }` makes `TextDecoder` throw rather than emit replacement
|
|
15
|
+
* characters, so undecodable files degrade to the binary/unknown fallback
|
|
16
|
+
* instead of silently rendering mojibake.
|
|
17
|
+
*/
|
|
18
|
+
export declare function bytesToText(bytes: Uint8Array): string | null;
|
|
19
|
+
/**
|
|
20
|
+
* Turn decoded bytes into a {@link WorkspaceFileContent}, applying binary
|
|
21
|
+
* detection and the shared 1 MB display cap.
|
|
22
|
+
*
|
|
23
|
+
* @param bytes the full decoded bytes as delivered by GitHub
|
|
24
|
+
* @param fullSize the file's true size in bytes (GitHub's `size` field), which
|
|
25
|
+
* may exceed `bytes.length` when the caller has already capped
|
|
26
|
+
* the download — reported verbatim as `size`.
|
|
27
|
+
*/
|
|
28
|
+
export declare function normalizeGitHubContent(bytes: Uint8Array, fullSize: number): WorkspaceFileContent;
|
|
29
|
+
//# sourceMappingURL=decodeGitHubContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decodeGitHubContent.d.ts","sourceRoot":"","sources":["../../src/github/decodeGitHubContent.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,qCAAqC,CAAC;AAM7C;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAIrD;AAED,sEAAsE;AACtE,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAMvD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAM5D;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,MAAM,GACf,oBAAoB,CAqBtB"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// Pure byte/text decode helpers for the GitHub file reader.
|
|
2
|
+
// Kept free of React and fetch so the Slice 0 spike behavior (base64 decode,
|
|
3
|
+
// binary detection, the 1 MB cap) is unit-testable in isolation.
|
|
4
|
+
import { MAX_WORKSPACE_FILE_READ_BYTES, } from "../workspace/WorkspaceFileReader.js";
|
|
5
|
+
// Scan only the head for a NUL byte — git uses the first 8000 bytes as its
|
|
6
|
+
// text/binary heuristic, and scanning the whole buffer buys nothing.
|
|
7
|
+
const BINARY_SNIFF_BYTES = 8000;
|
|
8
|
+
/**
|
|
9
|
+
* Decode a GitHub base64 payload to raw bytes.
|
|
10
|
+
*
|
|
11
|
+
* GitHub's Contents API line-wraps its base64 with `\n` every 60 chars, and
|
|
12
|
+
* `atob` rejects embedded newlines in some engines — strip all ASCII
|
|
13
|
+
* whitespace first.
|
|
14
|
+
*/
|
|
15
|
+
export function base64ToBytes(b64) {
|
|
16
|
+
const clean = b64.replace(/\s/g, "");
|
|
17
|
+
const binary = atob(clean);
|
|
18
|
+
return Uint8Array.from(binary, (ch) => ch.charCodeAt(0));
|
|
19
|
+
}
|
|
20
|
+
/** Detect binary content via a NUL byte in the head of the buffer. */
|
|
21
|
+
export function detectBinary(bytes) {
|
|
22
|
+
const limit = Math.min(bytes.length, BINARY_SNIFF_BYTES);
|
|
23
|
+
for (let i = 0; i < limit; i++) {
|
|
24
|
+
if (bytes[i] === 0)
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Decode bytes as strict UTF-8, returning `null` when the sequence is invalid.
|
|
31
|
+
* `{ fatal: true }` makes `TextDecoder` throw rather than emit replacement
|
|
32
|
+
* characters, so undecodable files degrade to the binary/unknown fallback
|
|
33
|
+
* instead of silently rendering mojibake.
|
|
34
|
+
*/
|
|
35
|
+
export function bytesToText(bytes) {
|
|
36
|
+
try {
|
|
37
|
+
return new TextDecoder("utf-8", { fatal: true }).decode(bytes);
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Turn decoded bytes into a {@link WorkspaceFileContent}, applying binary
|
|
45
|
+
* detection and the shared 1 MB display cap.
|
|
46
|
+
*
|
|
47
|
+
* @param bytes the full decoded bytes as delivered by GitHub
|
|
48
|
+
* @param fullSize the file's true size in bytes (GitHub's `size` field), which
|
|
49
|
+
* may exceed `bytes.length` when the caller has already capped
|
|
50
|
+
* the download — reported verbatim as `size`.
|
|
51
|
+
*/
|
|
52
|
+
export function normalizeGitHubContent(bytes, fullSize) {
|
|
53
|
+
if (detectBinary(bytes)) {
|
|
54
|
+
return { text: null, isBinary: true, size: fullSize, encoding: "base64" };
|
|
55
|
+
}
|
|
56
|
+
// Decode the full buffer, then cap the resulting *string* — capping the bytes
|
|
57
|
+
// first could split a multibyte char at the boundary and make the fatal
|
|
58
|
+
// decoder reject an otherwise-valid file.
|
|
59
|
+
const text = bytesToText(bytes);
|
|
60
|
+
if (text === null) {
|
|
61
|
+
return { text: null, isBinary: false, size: fullSize, encoding: "unknown" };
|
|
62
|
+
}
|
|
63
|
+
const truncated = bytes.length > MAX_WORKSPACE_FILE_READ_BYTES;
|
|
64
|
+
return {
|
|
65
|
+
text: truncated ? text.slice(0, MAX_WORKSPACE_FILE_READ_BYTES) : text,
|
|
66
|
+
isBinary: false,
|
|
67
|
+
size: fullSize,
|
|
68
|
+
encoding: "utf-8",
|
|
69
|
+
...(truncated ? { truncated: true } : {}),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=dec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H,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,sBAAsB,CACpC,KAAiB,EACjB,QAAgB;IAEhB,IAAI,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;IAC5E,CAAC;IAED,8EAA8E;IAC9E,wEAAwE;IACxE,0CAA0C;IAC1C,MAAM,IAAI,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;IAChC,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAClB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAC9E,CAAC;IAED,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,GAAG,6BAA6B,CAAC;IAC/D,OAAO;QACL,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,6BAA6B,CAAC,CAAC,CAAC,CAAC,IAAI;QACrE,QAAQ,EAAE,KAAK;QACf,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,OAAO;QACjB,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC1C,CAAC;AACJ,CAAC"}
|
package/github/index.d.ts
CHANGED
|
@@ -3,5 +3,6 @@ export { useGitHubRepos, type GitHubRepo, type GitHubBranch, type UseGitHubRepos
|
|
|
3
3
|
export { useGitHubSearch, type UseGitHubSearchReturn, } from "./useGitHubSearch.js";
|
|
4
4
|
export { GitHubRepoPicker, type GitHubRepoPickerProps, } from "./GitHubRepoPicker.js";
|
|
5
5
|
export { useGitHubTreeLister } from "./useGitHubTreeLister.js";
|
|
6
|
+
export { useGitHubFileReader } from "./useGitHubFileReader.js";
|
|
6
7
|
export { parseGitUrl, type ParsedGitRepo } from "./parseGitUrl.js";
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
package/github/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/github/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,4BAA4B,EAC5B,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,GAC/B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,cAAc,EACd,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,oBAAoB,GAC1B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,eAAe,EACf,KAAK,qBAAqB,GAC3B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,GAC3B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/github/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,4BAA4B,EAC5B,KAAK,UAAU,EACf,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,GAC/B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,cAAc,EACd,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,oBAAoB,GAC1B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,eAAe,EACf,KAAK,qBAAqB,GAC3B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,GAC3B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
|
package/github/index.js
CHANGED
|
@@ -3,5 +3,6 @@ export { useGitHubRepos, } from "./useGitHubRepos.js";
|
|
|
3
3
|
export { useGitHubSearch, } from "./useGitHubSearch.js";
|
|
4
4
|
export { GitHubRepoPicker, } from "./GitHubRepoPicker.js";
|
|
5
5
|
export { useGitHubTreeLister } from "./useGitHubTreeLister.js";
|
|
6
|
+
export { useGitHubFileReader } from "./useGitHubFileReader.js";
|
|
6
7
|
export { parseGitUrl } from "./parseGitUrl.js";
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
package/github/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/github/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,4BAA4B,GAK7B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,cAAc,GAIf,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,eAAe,GAEhB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,gBAAgB,GAEjB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAsB,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/github/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,4BAA4B,GAK7B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,cAAc,GAIf,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,eAAe,GAEhB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,gBAAgB,GAEjB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAsB,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { WorkspaceFileReader } from "../workspace/WorkspaceFileReader.js";
|
|
2
|
+
/**
|
|
3
|
+
* Creates a {@link WorkspaceFileReader} backed by the GitHub Contents API,
|
|
4
|
+
* with a Blob-API fallback for files above the Contents 1 MB cap.
|
|
5
|
+
*
|
|
6
|
+
* Uses the same client-side OAuth token as {@link useGitHubTreeLister}
|
|
7
|
+
* (`Authorization: Bearer`), inheriting its private-repo scope. Returns
|
|
8
|
+
* `undefined` when no token is present, mirroring the tree lister so callers
|
|
9
|
+
* can treat "no reader" and "no lister" identically.
|
|
10
|
+
*
|
|
11
|
+
* The reader itself:
|
|
12
|
+
* - Returns `null` when the entry is not a readable GitHub git repo
|
|
13
|
+
* (non-git entry, missing/unparseable URL) — the "unsupported here" state.
|
|
14
|
+
* - **Throws** on a real failure: a non-OK response, or a directory path
|
|
15
|
+
* (which the Contents API returns as a JSON array). Consumers surface these
|
|
16
|
+
* as an error, distinct from the null "unsupported" state.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* const gitHubConnection = useGitHubConnection(org);
|
|
21
|
+
* const fileReader = useGitHubFileReader(gitHubConnection.token);
|
|
22
|
+
* <SessionViewer workspaceFileReader={fileReader} />
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare function useGitHubFileReader(token: string | null): WorkspaceFileReader | undefined;
|
|
26
|
+
//# sourceMappingURL=useGitHubFileReader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGitHubFileReader.d.ts","sourceRoot":"","sources":["../../src/github/useGitHubFileReader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAEV,mBAAmB,EACpB,MAAM,qCAAqC,CAAC;AAuC7C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,GAAG,IAAI,GACnB,mBAAmB,GAAG,SAAS,CA8CjC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
import { base64ToBytes, normalizeGitHubContent } from "./decodeGitHubContent.js";
|
|
4
|
+
import { parseGitUrl } from "./parseGitUrl.js";
|
|
5
|
+
const GITHUB_API = "https://api.github.com/repos";
|
|
6
|
+
/**
|
|
7
|
+
* Upper bound on files we will pull through the Blob API (Gate 1, Option B).
|
|
8
|
+
*
|
|
9
|
+
* The Contents API caps at ~1 MB and signals larger files with
|
|
10
|
+
* `encoding: "none"`; the Blob API then serves them in full (up to GitHub's own
|
|
11
|
+
* ~100 MB blob limit). Since we only ever display the first ~1 MB, downloading
|
|
12
|
+
* a 90 MB blob to show 1 MB is wasteful — so above this ceiling we report the
|
|
13
|
+
* file as too-large
|
|
14
|
+
* (`text: null`, `truncated: true`) using the size GitHub already told us,
|
|
15
|
+
* without downloading anything.
|
|
16
|
+
*/
|
|
17
|
+
const BLOB_FETCH_CEILING_BYTES = 10 * 1024 * 1024; // 10 MiB
|
|
18
|
+
/** Encode a repo-relative path per segment, preserving the slashes. */
|
|
19
|
+
function encodePath(path) {
|
|
20
|
+
return path.split("/").map(encodeURIComponent).join("/");
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Creates a {@link WorkspaceFileReader} backed by the GitHub Contents API,
|
|
24
|
+
* with a Blob-API fallback for files above the Contents 1 MB cap.
|
|
25
|
+
*
|
|
26
|
+
* Uses the same client-side OAuth token as {@link useGitHubTreeLister}
|
|
27
|
+
* (`Authorization: Bearer`), inheriting its private-repo scope. Returns
|
|
28
|
+
* `undefined` when no token is present, mirroring the tree lister so callers
|
|
29
|
+
* can treat "no reader" and "no lister" identically.
|
|
30
|
+
*
|
|
31
|
+
* The reader itself:
|
|
32
|
+
* - Returns `null` when the entry is not a readable GitHub git repo
|
|
33
|
+
* (non-git entry, missing/unparseable URL) — the "unsupported here" state.
|
|
34
|
+
* - **Throws** on a real failure: a non-OK response, or a directory path
|
|
35
|
+
* (which the Contents API returns as a JSON array). Consumers surface these
|
|
36
|
+
* as an error, distinct from the null "unsupported" state.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```tsx
|
|
40
|
+
* const gitHubConnection = useGitHubConnection(org);
|
|
41
|
+
* const fileReader = useGitHubFileReader(gitHubConnection.token);
|
|
42
|
+
* <SessionViewer workspaceFileReader={fileReader} />
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export function useGitHubFileReader(token) {
|
|
46
|
+
const reader = useCallback(async (entry, path) => {
|
|
47
|
+
if (entry.type !== "git" || !entry.gitUrl || !token)
|
|
48
|
+
return null;
|
|
49
|
+
const parsed = parseGitUrl(entry.gitUrl);
|
|
50
|
+
if (!parsed)
|
|
51
|
+
return null;
|
|
52
|
+
const branch = entry.gitBranch || "main";
|
|
53
|
+
const url = `${GITHUB_API}/${parsed.owner}/${parsed.repo}/contents/${encodePath(path)}` +
|
|
54
|
+
`?ref=${encodeURIComponent(branch)}`;
|
|
55
|
+
const resp = await fetch(url, {
|
|
56
|
+
headers: { Authorization: `Bearer ${token}` },
|
|
57
|
+
});
|
|
58
|
+
if (!resp.ok) {
|
|
59
|
+
throw new Error(`GitHub content fetch failed for ${path} (HTTP ${resp.status})`);
|
|
60
|
+
}
|
|
61
|
+
const data = await resp.json();
|
|
62
|
+
// The Contents API returns an array for a directory — a misdirected read,
|
|
63
|
+
// not an unsupported substrate, so fail loudly rather than return null.
|
|
64
|
+
if (Array.isArray(data)) {
|
|
65
|
+
throw new Error(`Cannot read "${path}": path is a directory`);
|
|
66
|
+
}
|
|
67
|
+
const file = data;
|
|
68
|
+
if (file.encoding === "base64") {
|
|
69
|
+
return normalizeGitHubContent(base64ToBytes(file.content), file.size);
|
|
70
|
+
}
|
|
71
|
+
// encoding: "none" is GitHub's signal that the file exceeds the Contents
|
|
72
|
+
// API's ~1 MB cap; the bytes live only behind the Blob API.
|
|
73
|
+
return readViaBlob(parsed, file, token);
|
|
74
|
+
}, [token]);
|
|
75
|
+
if (!token)
|
|
76
|
+
return undefined;
|
|
77
|
+
return reader;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Gate 1 / Option B — size-gated blob fetch for files the Contents API refused
|
|
81
|
+
* (`encoding: "none"`). Isolated so the large-file policy can change without
|
|
82
|
+
* touching the reader's control flow.
|
|
83
|
+
*/
|
|
84
|
+
async function readViaBlob(parsed, file, token) {
|
|
85
|
+
// Above the ceiling we never download — GitHub already told us the size, so
|
|
86
|
+
// report it as too-large-to-preview without spending the bandwidth.
|
|
87
|
+
if (file.size > BLOB_FETCH_CEILING_BYTES) {
|
|
88
|
+
return {
|
|
89
|
+
text: null,
|
|
90
|
+
isBinary: false,
|
|
91
|
+
size: file.size,
|
|
92
|
+
encoding: "none",
|
|
93
|
+
truncated: true,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
const url = `${GITHUB_API}/${parsed.owner}/${parsed.repo}/git/blobs/${file.sha}`;
|
|
97
|
+
const resp = await fetch(url, {
|
|
98
|
+
headers: { Authorization: `Bearer ${token}` },
|
|
99
|
+
});
|
|
100
|
+
if (!resp.ok) {
|
|
101
|
+
throw new Error(`GitHub blob fetch failed for ${file.sha} (HTTP ${resp.status})`);
|
|
102
|
+
}
|
|
103
|
+
const blob = await resp.json();
|
|
104
|
+
return normalizeGitHubContent(base64ToBytes(blob.content), blob.size);
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=useGitHubFileReader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGitHubFileReader.js","sourceRoot":"","sources":["../../src/github/useGitH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K,IAAI,MAAM,CAAC,IAAI,cAAc,IAAI,CAAC,GAAG,EAAE,CAAC;IACjF,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;QAC5B,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,KAAK,EAAE,EAAE;KAC9C,CAAC,CAAC;IACH,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,gCAAgC,IAAI,CAAC,GAAG,UAAU,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IACpF,CAAC;IAED,MAAM,IAAI,GAAe,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;IAC3C,OAAO,sBAAsB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;AACxE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGitHubTreeLister.d.ts","sourceRoot":"","sources":["../../src/github/useGitHubTreeLister.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAsB,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"useGitHubTreeLister.d.ts","sourceRoot":"","sources":["../../src/github/useGitHubTreeLister.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAsB,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAiCnG;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,GAAG,IAAI,GACnB,mBAAmB,GAAG,SAAS,CAqCjC"}
|
|
@@ -3,12 +3,16 @@ import { useCallback } from "react";
|
|
|
3
3
|
import { parseGitUrl } from "./parseGitUrl.js";
|
|
4
4
|
const GITHUB_TREES_API = "https://api.github.com/repos";
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* Advisory entry appended to the listing when the GitHub API indicates that the
|
|
7
|
+
* tree was truncated (repository exceeds the API's entry limit). Flagged with
|
|
8
|
+
* `notice: true` so generic consumers treat it as a "results incomplete" banner
|
|
9
|
+
* rather than an openable file (see `workspaceListingCache`) — never a tree leaf,
|
|
10
|
+
* never a search hit.
|
|
8
11
|
*/
|
|
9
12
|
const TRUNCATION_MARKER = {
|
|
10
13
|
path: "... (tree truncated by GitHub — repository has too many files)",
|
|
11
14
|
isDirectory: false,
|
|
15
|
+
notice: true,
|
|
12
16
|
};
|
|
13
17
|
/**
|
|
14
18
|
* Creates a {@link WorkspaceFileLister} backed by the GitHub Trees API.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGitHubTreeLister.js","sourceRoot":"","sources":["../../src/github/useGitHubTreeLister.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAGpC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,gBAAgB,GAAG,8BAA8B,CAAC;AAgBxD
|
|
1
|
+
{"version":3,"file":"useGitHubTreeLister.js","sourceRoot":"","sources":["../../src/github/useGitHubTreeLister.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAGpC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,gBAAgB,GAAG,8BAA8B,CAAC;AAgBxD;;;;;;GAMG;AACH,MAAM,iBAAiB,GAAuB;IAC5C,IAAI,EAAE,gEAAgE;IACtE,WAAW,EAAE,KAAK;IAClB,MAAM,EAAE,IAAI;CACb,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,mBAAmB,CACjC,KAAoB;IAEpB,MAAM,MAAM,GAAG,WAAW,CACxB,KAAK,EAAE,KAAqB,EAAwC,EAAE;QACpE,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,IAAI,CAAC,KAAK,CAA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13,14 +13,14 @@ export { type DeploymentMode, isResourceAvailable, ApiResourceKind } from "@stig
|
|
|
13
13
|
export { CloudFeatureNotice, type CloudFeatureNoticeProps } from "./internal/CloudFeatureNotice.js";
|
|
14
14
|
export { DEFAULT_MODEL_ID, DEFAULT_CURSOR_MODEL_ID, DISABLED_PROVIDERS, modelKey, parseModelKey, fetchModelRegistry, parseRegistryJson, useModelRegistry, ModelRegistryContext, ModelSelector, HarnessSelector, DEFAULT_HARNESS, HARNESS_LABELS, toProtoHarness, fromProtoHarness, } from "./models/index.js";
|
|
15
15
|
export type { ModelInfo, ModelRegistryState, ParsedModelKey, Provider, CostTier, UseModelRegistryReturn, UseModelRegistryOptions, ModelSelectorProps, HarnessSelectorProps, HarnessOption, } from "./models/index.js";
|
|
16
|
-
export { useWorkspaceEntries, useWorkspaceFiles, useWorkspaceSources, WorkspaceEditor,
|
|
17
|
-
export type { WorkspaceEntry, WorkspaceFileEntry, WorkspaceFileLister, UseWorkspaceEntriesReturn, UseWorkspaceFilesOptions, UseWorkspaceFilesReturn,
|
|
18
|
-
export { useCreateSession, useUpdateSession, useSession, useSessionList, useSessionExecutions, useSessionConversation, useSessionArtifacts, useSessionWriteBacks, useSessionFileChanges, useSessionUsage, useAgentRefFromSession, useNewSessionFlow, useSessionPageFlow, usePersistedModel, useEditSessionPrep, CREATOR_AGENTS, parseDraftType, parseDraftParams, groupSessionsByTime, groupSearchResultsByTime, useSessionSearch, PENDING_SUBJECT, resolvedSubject, SessionViewer, NewSessionViewer,
|
|
19
|
-
export type { SharedSessionFields, CreateSessionInput, CreateSessionResult, UseCreateSessionReturn, UseUpdateSessionReturn, UseSessionReturn, UseSessionListOptions, UseSessionListReturn, UseSessionSearchOptions, UseSessionSearchReturn, UseSessionExecutionsReturn, SendFollowUpOptions, UseSessionConversationReturn, SessionArtifactEntry, UseSessionArtifactsReturn, SessionWriteBackEntry, UseSessionWriteBacksReturn, UseSessionFileChangesReturn, ModelCostEntry, UseSessionUsageReturn, UseAgentRefFromSessionReturn, UseNewSessionFlowOptions, UseNewSessionFlowReturn, UseSessionPageFlowOptions, UseSessionPageFlowReturn, UsePersistedModelOptions, UsePersistedModelReturn, UseEditSessionPrepReturn, DraftResourceType, DraftParams, SessionGroup, SearchResultGroup, SessionViewerProps, NewSessionViewerProps,
|
|
16
|
+
export { useWorkspaceEntries, useWorkspaceFiles, useWorkspaceFileContent, useWorkspaceFileSearch, useWorkspaceContentSearch, useWorkspaceSources, MAX_WORKSPACE_FILE_READ_BYTES, WorkspaceEditor, WorkspaceFileSearch, WorkspaceContentSearch, WorkspaceSummary, FileViewer, WorkspaceSurface, ExplorerTree, virtualEntryId, isVirtualEntryId, } from "./workspace/index.js";
|
|
17
|
+
export type { WorkspaceEntry, WorkspaceFileEntry, WorkspaceFileLister, WorkspaceFileContent, WorkspaceFileReader, UseWorkspaceEntriesReturn, UseWorkspaceFilesOptions, UseWorkspaceFilesReturn, UseWorkspaceFileContentOptions, UseWorkspaceFileContentReturn, UseWorkspaceFileSearchOptions, UseWorkspaceFileSearchReturn, WorkspaceFileSearchGroup, WorkspaceFileMatch, WorkspaceFileSearchProps, WorkspaceContentMatch, WorkspaceContentSearchResult, WorkspaceContentSearcher, UseWorkspaceContentSearchOptions, UseWorkspaceContentSearchReturn, WorkspaceContentSearchGroup, WorkspaceContentSearchProps, FileViewerProps, FileViewerHandle, SelectedWorkspaceFile, UseWorkspaceSourcesOptions, UseWorkspaceSourcesReturn, WorkspaceEditorProps, WorkspaceSummaryProps, WorkspaceSurfaceProps, SurfaceRailView, SurfaceVirtualDocument, ExplorerTreeProps, OpenEditor, OpenFileOptions, RevealTarget, } from "./workspace/index.js";
|
|
18
|
+
export { useCreateSession, useUpdateSession, useSession, useSessionList, useSessionExecutions, useSessionConversation, useSessionArtifacts, useSessionWriteBacks, useSessionFileChanges, useSessionUsage, useAgentRefFromSession, useNewSessionFlow, useSessionPageFlow, usePersistedModel, useEditSessionPrep, CREATOR_AGENTS, parseDraftType, parseDraftParams, groupSessionsByTime, groupSearchResultsByTime, useSessionSearch, PENDING_SUBJECT, resolvedSubject, SessionViewer, NewSessionViewer, useSessionPanel, usePlanDraft, planDraftKey, PlanEditor, PlanStreamingDocument, PLAN_DOCUMENT_ENTRY_ID, PLAN_DOCUMENT_PATH, SetupTab, } from "./session/index.js";
|
|
19
|
+
export type { SharedSessionFields, CreateSessionInput, CreateSessionResult, UseCreateSessionReturn, UseUpdateSessionReturn, UseSessionReturn, UseSessionListOptions, UseSessionListReturn, UseSessionSearchOptions, UseSessionSearchReturn, UseSessionExecutionsReturn, SendFollowUpOptions, UseSessionConversationReturn, SessionArtifactEntry, UseSessionArtifactsReturn, SessionWriteBackEntry, UseSessionWriteBacksReturn, UseSessionFileChangesReturn, ModelCostEntry, UseSessionUsageReturn, UseAgentRefFromSessionReturn, UseNewSessionFlowOptions, UseNewSessionFlowReturn, UseSessionPageFlowOptions, UseSessionPageFlowReturn, UsePersistedModelOptions, UsePersistedModelReturn, UseEditSessionPrepReturn, DraftResourceType, DraftParams, SessionGroup, SearchResultGroup, SessionViewerProps, NewSessionViewerProps, SessionPanelController, UseSessionPanelOptions, PlanDraftController, PlanEditorProps, PlanStreamingDocumentProps, ExecutionTargetOption, RuntimeEnvProvider, SessionAudience, SetupTabProps, SetupTabMutationCallbacks, SelectedThreadItem, } from "./session/index.js";
|
|
20
20
|
export { useRecentActivity, groupRecentActivityByTime, } from "./activity/index.js";
|
|
21
21
|
export type { RecentActivityType, RecentActivityEntry, RecentActivityGroup, UseRecentActivityOptions, UseRecentActivityReturn, } from "./activity/index.js";
|
|
22
|
-
export { isTerminalPhase, useCreateAgentExecution, useExecutionStream, useAgentExecutionActions, useSubmitApproval, useFileReview, fileDecisionKey, fileReviewability, changeSetReviewability, deriveEffectiveVerdicts, changeForRowPath, fileReviewRowState, foldFileReviewEventStream, displayFileChangeSets, toDisplayFileChange, ExecutionPhaseBadge, InteractionModeBadge, SetupProgress, ExecutionProgress, TodoList, TodoCard, TodoInProgressIcon, findActiveTodo, todoCompletionSummary, UsageWidget, ContextGauge, SummarizationBadge, SummarizationCard, PlanCompletionCard, useContextWindow, formatCost, formatTokenCount, ToolCallGroup, ToolCallDetail, ResultView, summarizeResultView, TerminalSession, useToolPresentation, registerToolPresenter, getToolPresenter, resolveToolCategory, resolveToolCategoryFromCall, resolveToolCategoryFromKind, toolKindToCategoryInfo, defaultDisclosureForCategory, McpToolDetail, parseMcpResult, formatDuration, humanizeToolName, ToolCallItem, SubAgentSection, MessageEntry, MessageThread, ThreadSkeleton, FollowUpInput, ApprovalCard, ApprovalCardHeader, ApprovalCardBody, FileReviewCard, FileReviewDock, ApprovalContext, useApproval, FileReviewContext, useFileReviewRowState, ArtifactCard, ArtifactContentRenderer, ArtifactPreviewContent, ArtifactPreviewModal, ArtifactsWidget, WriteBacksWidget, ToolArgsView, McpArgsView, McpMetadataRow, FilePathLink, FilePathContext, classifyPath, resolveGitBrowseUrl, resolvePathAction, useSessionVariables, SessionVariablesInput, useExecutionArtifacts, useArtifactContent, useArtifactDownloadUrl, useArtifactDownload, useToolOutputContent, useFileChangeContent, execIdFromStorageKey, useWorkspaceWriteBacks, WriteBackCard, FileChangesView, FileChangeDiff, EmptyChangeNotice, isTextArtifact, formatArtifactSize, getArtifactExtension, getFileExtension, getArtifactRenderMode, } from "./execution/index.js";
|
|
23
|
-
export type { CreateAgentExecutionInput, CreateAgentExecutionResult, UseCreateAgentExecutionReturn, UseExecutionStreamReturn, UseAgentExecutionActionsOptions, UseAgentExecutionActionsReturn, UseSubmitApprovalReturn, UseFileReviewReturn, FileDecisionOptions, FileReviewability, FileBlockReason, ChangeSetReviewability, FileReviewRowState, ExecutionPhaseBadgeProps, InteractionModeBadgeProps, SetupProgressProps, ExecutionProgressProps, TodoListProps, TodoCardProps, UsageWidgetProps, ContextGaugeProps, SummarizationBadgeProps, SummarizationCardProps, PlanCompletionCardProps, ContextHealth, SummarizationEventView, UseContextWindowReturn, ToolCallGroupProps, ToolCallDetailProps, ResultViewProps, TerminalSessionProps, ToolPresentation, ToolPresenter, ToolDisclosure, McpToolDetailProps, McpArgsViewProps, McpMetadataRowProps, ToolArgsViewProps, ToolCallItemProps, SubAgentSectionProps, MessageEntryProps, MessageThreadProps, ThreadSkeletonProps, FollowUpInputProps, ApprovalCardProps, ApprovalCardHeaderProps, ApprovalCardBodyProps, FileReviewCardProps, FileReviewDockProps, ApprovalContextValue, UseApprovalResult, FileReviewContextValue, ArtifactCardProps, ArtifactContentRendererProps, ArtifactRenderMode, ArtifactPreviewContentProps, ArtifactPreviewModalProps, ArtifactsWidgetProps, WriteBacksWidgetProps, FilePathLinkProps, FilePathContextValue, PathClassification, ResolvedPathAction, SessionVariableEntry, UseSessionVariablesReturn, SessionVariablesInputProps, UseExecutionArtifactsReturn, UseArtifactContentReturn, UseArtifactDownloadUrlReturn, UseArtifactDownloadUrlOptions, UseArtifactDownloadReturn, UseToolOutputContentReturn, ToolOutputRefLike, UseFileChangeContentReturn, UseWorkspaceWriteBacksReturn, WriteBackCardProps, FileChangesViewProps, FileChangeDiffProps, EmptyChangeNoticeProps, EmptyChangeKind, } from "./execution/index.js";
|
|
22
|
+
export { isTerminalPhase, useCreateAgentExecution, useExecutionStream, useAgentExecutionActions, useSubmitApproval, useFileReview, fileDecisionKey, fileReviewability, changeSetReviewability, deriveEffectiveVerdicts, changeForRowPath, fileReviewRowState, foldFileReviewEventStream, displayFileChangeSets, toDisplayFileChange, ExecutionPhaseBadge, InteractionModeBadge, SetupProgress, ExecutionProgress, TodoList, TodoCard, TodoInProgressIcon, findActiveTodo, todoCompletionSummary, UsageWidget, ContextGauge, SummarizationBadge, SummarizationCard, PlanCompletionCard, PlanArtifactCard, PlanStreamingCard, PlanDocumentMessage, useContextWindow, formatCost, formatTokenCount, ToolCallGroup, ToolCallDetail, ResultView, summarizeResultView, TerminalSession, useToolPresentation, registerToolPresenter, getToolPresenter, resolveToolCategory, resolveToolCategoryFromCall, resolveToolCategoryFromKind, toolKindToCategoryInfo, defaultDisclosureForCategory, extractPrimaryArg, McpToolDetail, parseMcpResult, formatDuration, humanizeToolName, ToolCallItem, SubAgentSection, MessageEntry, MessageThread, ThreadSkeleton, FollowUpInput, ApprovalCard, ApprovalCardHeader, ApprovalCardBody, FileReviewCard, FileReviewDock, FileChangeProgressBar, ApprovalContext, useApproval, FileReviewContext, useFileReviewRowState, ArtifactCard, ArtifactContentRenderer, ArtifactPreviewContent, ArtifactPreviewModal, ArtifactsWidget, WriteBacksWidget, ToolArgsView, McpArgsView, McpMetadataRow, FilePathLink, FilePathContext, classifyPath, resolveGitBrowseUrl, resolvePathAction, useSessionVariables, SessionVariablesInput, useExecutionArtifacts, useArtifactContent, useArtifactDownloadUrl, useArtifactDownload, useArtifactCopy, useToolOutputContent, useFileChangeContent, execIdFromStorageKey, useWorkspaceWriteBacks, WriteBackCard, FileChangesView, FileChangeDiff, EmptyChangeNotice, isTextArtifact, formatArtifactSize, getArtifactExtension, getFileExtension, getArtifactRenderMode, } from "./execution/index.js";
|
|
23
|
+
export type { CreateAgentExecutionInput, CreateAgentExecutionResult, UseCreateAgentExecutionReturn, UseExecutionStreamReturn, UseAgentExecutionActionsOptions, UseAgentExecutionActionsReturn, UseSubmitApprovalReturn, UseFileReviewReturn, FileDecisionOptions, FileReviewability, FileBlockReason, ChangeSetReviewability, FileReviewRowState, ExecutionPhaseBadgeProps, InteractionModeBadgeProps, SetupProgressProps, ExecutionProgressProps, TodoListProps, TodoCardProps, UsageWidgetProps, ContextGaugeProps, SummarizationBadgeProps, SummarizationCardProps, PlanCompletionCardProps, PlanArtifactCardProps, PlanStreamingCardProps, PlanDocumentMessageProps, ContextHealth, SummarizationEventView, UseContextWindowReturn, ToolCallGroupProps, ToolCallDetailProps, ResultViewProps, TerminalSessionProps, ToolPresentation, ToolPresenter, ToolDisclosure, McpToolDetailProps, McpArgsViewProps, McpMetadataRowProps, ToolArgsViewProps, ToolCallItemProps, SubAgentSectionProps, MessageEntryProps, MessageThreadProps, ThreadContentColumn, ThreadSkeletonProps, FollowUpInputProps, ApprovalCardProps, ApprovalCardHeaderProps, ApprovalCardBodyProps, FileReviewCardProps, FileReviewDockProps, FileChangeProgressBarProps, ApprovalContextValue, UseApprovalResult, FileReviewContextValue, ArtifactCardProps, ArtifactContentRendererProps, ArtifactRenderMode, ArtifactPreviewContentProps, ArtifactPreviewModalProps, ArtifactsWidgetProps, WriteBacksWidgetProps, FilePathLinkProps, FilePathContextValue, PathClassification, ResolvedPathAction, SessionVariableEntry, UseSessionVariablesReturn, SessionVariablesInputProps, UseExecutionArtifactsReturn, UseArtifactContentReturn, UseArtifactDownloadUrlReturn, UseArtifactDownloadUrlOptions, UseArtifactDownloadReturn, UseArtifactCopyReturn, UseToolOutputContentReturn, ToolOutputRefLike, UseFileChangeContentReturn, UseWorkspaceWriteBacksReturn, WriteBackCardProps, FileChangesViewProps, FileChangeDiffProps, EmptyChangeNoticeProps, EmptyChangeKind, } from "./execution/index.js";
|
|
24
24
|
export type { ExecutionArtifact } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/artifact_pb";
|
|
25
25
|
export { ExecutionArtifactKind } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
26
26
|
export { useAttachments, AttachmentChipList, MAX_ATTACHMENT_BYTES, detectContentType, formatFileSize, validateAttachmentSize, } from "./attachment/index.js";
|
|
@@ -34,7 +34,7 @@ export { useMcpServer, useMcpServerCount, useMcpServerList, useMcpServerSearch,
|
|
|
34
34
|
export type { UseMcpServerReturn, UseMcpServerCountOptions, UseMcpServerCountReturn, UseMcpServerListOptions, UseMcpServerListReturn, UseMcpServerSearchOptions, UseMcpServerSearchReturn, UseMcpServerSetupReturn, SubmitMcpEnvVarsOptions, McpServerSetupEntry, McpServerSetupPhase, McpServerSetupState, McpServerPickerProps, McpServerSetupIntegration, McpServerConfigPanelProps, McpServerCredentialsProps, McpServerOAuthSignInProps, McpServerDetailViewProps, McpServerConnectDialogProps, CapabilityTab, McpToolSelectorProps, UseMcpServerConnectReturn, UseMcpServerOAuthConnectReturn, OAuthConnectPhase, OAuthCallbackHandlerProps, OAuthCallbackParams, UseMcpServerCredentialsReturn, UseOAuthGrantStatusReturn, UseDisconnectOAuthReturn, McpServerAuthMode, UseCreateMcpServerReturn, UseUpdateMcpServerReturn, McpServerCreationWizardProps, McpServerCreationResult, McpServerWizardData, } from "./mcp-server/index.js";
|
|
35
35
|
export { useSkill, useSkillCount, useSkillList, useSkillSearch, SkillPicker, SkillDetailView, usePushSkill, useSkillUpload, useSkillArtifact, useSkillVersions, useSkillDiff, useSkillDuplicateCheck, SkillUploader, SkillFileBrowser, SkillDiffDialog, } from "./skill/index.js";
|
|
36
36
|
export type { UseSkillReturn, UseSkillCountOptions, UseSkillCountReturn, UseSkillListOptions, UseSkillListReturn, UseSkillSearchOptions, UseSkillSearchReturn, SkillPickerProps, SkillDetailViewProps, PushSkillInput, UsePushSkillReturn, SkillUploadPreview, SkillFileEntry, UseSkillUploadReturn, UseSkillArtifactReturn, UseSkillVersionsReturn, UseSkillDiffReturn, UseSkillDuplicateCheckReturn, SkillDiffDialogProps, SkillDiffDialogState, SkillUploaderProps, SkillFileBrowserProps, } from "./skill/index.js";
|
|
37
|
-
export { useGitHubConnection, useGitHubRepos, useGitHubSearch, useGitHubTreeLister, parseGitUrl, GitHubRepoPicker, GITHUB_CALLBACK_MESSAGE_TYPE, } from "./github/index.js";
|
|
37
|
+
export { useGitHubConnection, useGitHubRepos, useGitHubSearch, useGitHubTreeLister, useGitHubFileReader, parseGitUrl, GitHubRepoPicker, GITHUB_CALLBACK_MESSAGE_TYPE, } from "./github/index.js";
|
|
38
38
|
export type { GitHubUser, GitHubConnectOptions, UseGitHubConnectionConfig, UseGitHubConnectionReturn, GitHubRepo, GitHubBranch, UseGitHubReposReturn, UseGitHubSearchReturn, GitHubRepoPickerProps, ParsedGitRepo, } from "./github/index.js";
|
|
39
39
|
export { useAgent, useAgentCount, useAgentList, useAgentSearch, AgentPicker, AgentDetailView, AgentEnvForm, diffEnv, useAgentSetup, useDefaultAgent, useCreateAgent, useUpdateAgent, agentToInput, AgentCreationWizard, } from "./agent/index.js";
|
|
40
40
|
export type { UseAgentReturn, UseAgentCountOptions, UseAgentCountReturn, UseAgentListOptions, UseAgentListReturn, UseAgentSearchOptions, UseAgentSearchReturn, AgentPickerProps, AgentDetailViewProps, AgentEnvFormProps, AgentEnvFormSubmitOptions, AgentEnvFormVariable, AgentSetupResult, AgentSetupReadyResult, AgentSetupState, AgentSetupPhase, AgentResolution, SubmitEnvVarsOptions, UseAgentSetupReturn, UseDefaultAgentReturn, UseCreateAgentReturn, UseUpdateAgentReturn, AgentCreationWizardProps, AgentCreationResult, AgentWizardData, } from "./agent/index.js";
|
|
@@ -76,8 +76,8 @@ export { useOrgInvitations, useCreateInvitation, useRevokeInvitation, useInvitat
|
|
|
76
76
|
export type { UseOrgInvitationsReturn, UseCreateInvitationReturn, UseRevokeInvitationReturn, UseInvitationPreviewReturn, UseRedeemInvitationReturn, InvitationCreatedAlertProps, InvitationManagerProps, InvitationRedemptionProps, } from "./invitation/index.js";
|
|
77
77
|
export { ErrorMessage, SecretFlowErrorGuide, isSecretFlowError } from "./error/index.js";
|
|
78
78
|
export type { ErrorMessageProps, SecretFlowErrorGuideProps } from "./error/index.js";
|
|
79
|
-
export { LibraryBreadcrumbProvider, useBreadcrumbLabel, useBreadcrumbOverride, ScopeToggle, ResourceCountCard, detectStigmerResource, useDetectStigmerResource, isSkillPackage, detectSkillPackage, useDetectSkillPackage, isPlanArtifact, findPlanArtifact, parseResourceYaml, serializeAgentYaml, serializeMcpServerYaml, serializeAgentInputYaml, serializeMcpServerInputYaml, useApplyResource, useExportResource, useImportResource, ImportResourceDialog, VisibilitySelector, VisibilityBadge, blueprintVisibilityLevels, INSTANCE_VISIBILITY_LEVELS, visibilityLabel, useUpdateVisibility, } from "./library/index.js";
|
|
80
|
-
export type { ScopeToggleProps, ResourceCountCardProps, StigmerResourceKind, StigmerResourceDetection, SkillPackageDetection, UseDetectSkillPackageReturn, ParsedResource, UseApplyResourceReturn, ApplyResourceResult, PushSkillParams, UseExportResourceOptions, UseExportResourceReturn, ImportFormat, ImportPreview, UseImportResourceReturn, ImportResourceDialogProps, VisibilitySelectorProps, VisibilityLevelOption, BlueprintVisibilityLevelsContext, VisibilityResourceKind, UseUpdateVisibilityReturn, } from "./library/index.js";
|
|
79
|
+
export { LibraryBreadcrumbProvider, useBreadcrumbLabel, useBreadcrumbOverride, ScopeToggle, ResourceCountCard, detectStigmerResource, useDetectStigmerResource, isSkillPackage, detectSkillPackage, useDetectSkillPackage, isPlanArtifact, isPlanArtifactName, findPlanArtifact, findLatestSessionPlan, findStreamingPlan, PLAN_ARTIFACT_NAME, PLAN_ARTIFACT_SUFFIX, parseResourceYaml, serializeAgentYaml, serializeMcpServerYaml, serializeAgentInputYaml, serializeMcpServerInputYaml, useApplyResource, useExportResource, useImportResource, ImportResourceDialog, VisibilitySelector, VisibilityBadge, blueprintVisibilityLevels, INSTANCE_VISIBILITY_LEVELS, visibilityLabel, useUpdateVisibility, } from "./library/index.js";
|
|
80
|
+
export type { ScopeToggleProps, ResourceCountCardProps, StigmerResourceKind, StigmerResourceDetection, SkillPackageDetection, SessionPlan, StreamingPlan, UseDetectSkillPackageReturn, ParsedResource, UseApplyResourceReturn, ApplyResourceResult, PushSkillParams, UseExportResourceOptions, UseExportResourceReturn, ImportFormat, ImportPreview, UseImportResourceReturn, ImportResourceDialogProps, VisibilitySelectorProps, VisibilityLevelOption, BlueprintVisibilityLevelsContext, VisibilityResourceKind, UseUpdateVisibilityReturn, } from "./library/index.js";
|
|
81
81
|
export { ActionMenu } from "./action-menu/index.js";
|
|
82
82
|
export type { ActionMenuProps, ActionMenuTriggerProps, ActionMenuContentProps, ActionMenuItemProps, ActionMenuSeparatorProps, ActionMenuGroupProps, } from "./action-menu/index.js";
|
|
83
83
|
export { StigmerToaster, toast } from "./feedback/index.js";
|