@stigmer/react 3.2.3 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agent/steps/ReviewStep.d.ts.map +1 -1
- package/agent/steps/ReviewStep.js +2 -3
- package/agent/steps/ReviewStep.js.map +1 -1
- package/billing/index.d.ts.map +1 -1
- package/billing/index.js +4 -0
- package/billing/index.js.map +1 -1
- package/channel/AgentChannelsPanel.d.ts.map +1 -1
- package/channel/AgentChannelsPanel.js +11 -5
- package/channel/AgentChannelsPanel.js.map +1 -1
- package/composer/SessionComposer.d.ts +1 -1
- package/cursor-accounts/CursorAccountEditor.d.ts +34 -0
- package/cursor-accounts/CursorAccountEditor.d.ts.map +1 -0
- package/cursor-accounts/CursorAccountEditor.js +67 -0
- package/cursor-accounts/CursorAccountEditor.js.map +1 -0
- package/cursor-accounts/CursorAccountsAccessNotice.d.ts +11 -0
- package/cursor-accounts/CursorAccountsAccessNotice.d.ts.map +1 -0
- package/cursor-accounts/CursorAccountsAccessNotice.js +14 -0
- package/cursor-accounts/CursorAccountsAccessNotice.js.map +1 -0
- package/cursor-accounts/CursorAccountsConsole.d.ts +32 -0
- package/cursor-accounts/CursorAccountsConsole.d.ts.map +1 -0
- package/cursor-accounts/CursorAccountsConsole.js +169 -0
- package/cursor-accounts/CursorAccountsConsole.js.map +1 -0
- package/cursor-accounts/MemberCoverageTable.d.ts +29 -0
- package/cursor-accounts/MemberCoverageTable.d.ts.map +1 -0
- package/cursor-accounts/MemberCoverageTable.js +150 -0
- package/cursor-accounts/MemberCoverageTable.js.map +1 -0
- package/cursor-accounts/MemberKeysPanel.d.ts +25 -0
- package/cursor-accounts/MemberKeysPanel.d.ts.map +1 -0
- package/cursor-accounts/MemberKeysPanel.js +115 -0
- package/cursor-accounts/MemberKeysPanel.js.map +1 -0
- package/cursor-accounts/badges.d.ts +9 -0
- package/cursor-accounts/badges.d.ts.map +1 -0
- package/cursor-accounts/badges.js +10 -0
- package/cursor-accounts/badges.js.map +1 -0
- package/cursor-accounts/cursor-account-coverage.d.ts +41 -0
- package/cursor-accounts/cursor-account-coverage.d.ts.map +1 -0
- package/cursor-accounts/cursor-account-coverage.js +26 -0
- package/cursor-accounts/cursor-account-coverage.js.map +1 -0
- package/cursor-accounts/cursor-account-format.d.ts +23 -0
- package/cursor-accounts/cursor-account-format.d.ts.map +1 -0
- package/cursor-accounts/cursor-account-format.js +41 -0
- package/cursor-accounts/cursor-account-format.js.map +1 -0
- package/cursor-accounts/index.d.ts +18 -0
- package/cursor-accounts/index.d.ts.map +1 -0
- package/cursor-accounts/index.js +13 -0
- package/cursor-accounts/index.js.map +1 -0
- package/cursor-accounts/useCursorAccountView.d.ts +30 -0
- package/cursor-accounts/useCursorAccountView.d.ts.map +1 -0
- package/cursor-accounts/useCursorAccountView.js +25 -0
- package/cursor-accounts/useCursorAccountView.js.map +1 -0
- package/cursor-accounts/useCursorAccounts.d.ts +33 -0
- package/cursor-accounts/useCursorAccounts.d.ts.map +1 -0
- package/cursor-accounts/useCursorAccounts.js +25 -0
- package/cursor-accounts/useCursorAccounts.js.map +1 -0
- package/cursor-accounts/useCursorMemberKeyActions.d.ts +49 -0
- package/cursor-accounts/useCursorMemberKeyActions.d.ts.map +1 -0
- package/cursor-accounts/useCursorMemberKeyActions.js +38 -0
- package/cursor-accounts/useCursorMemberKeyActions.js.map +1 -0
- package/cursor-accounts/useDeleteCursorAccount.d.ts +30 -0
- package/cursor-accounts/useDeleteCursorAccount.d.ts.map +1 -0
- package/cursor-accounts/useDeleteCursorAccount.js +32 -0
- package/cursor-accounts/useDeleteCursorAccount.js.map +1 -0
- package/cursor-accounts/useSyncCursorAccount.d.ts +23 -0
- package/cursor-accounts/useSyncCursorAccount.d.ts.map +1 -0
- package/cursor-accounts/useSyncCursorAccount.js +31 -0
- package/cursor-accounts/useSyncCursorAccount.js.map +1 -0
- package/cursor-accounts/useUpsertCursorAccount.d.ts +26 -0
- package/cursor-accounts/useUpsertCursorAccount.d.ts.map +1 -0
- package/cursor-accounts/useUpsertCursorAccount.js +34 -0
- package/cursor-accounts/useUpsertCursorAccount.js.map +1 -0
- package/datastore/CollectionRecordsBrowser.d.ts +34 -0
- package/datastore/CollectionRecordsBrowser.d.ts.map +1 -0
- package/datastore/CollectionRecordsBrowser.js +223 -0
- package/datastore/CollectionRecordsBrowser.js.map +1 -0
- package/datastore/CollectionSchemaView.d.ts +29 -0
- package/datastore/CollectionSchemaView.d.ts.map +1 -0
- package/datastore/CollectionSchemaView.js +93 -0
- package/datastore/CollectionSchemaView.js.map +1 -0
- package/datastore/DatastoreDetailView.d.ts +44 -0
- package/datastore/DatastoreDetailView.d.ts.map +1 -0
- package/datastore/DatastoreDetailView.js +76 -0
- package/datastore/DatastoreDetailView.js.map +1 -0
- package/datastore/DatastoreSyncReport.d.ts +19 -0
- package/datastore/DatastoreSyncReport.d.ts.map +1 -0
- package/datastore/DatastoreSyncReport.js +45 -0
- package/datastore/DatastoreSyncReport.js.map +1 -0
- package/datastore/DeleteDatastoreDialog.d.ts +35 -0
- package/datastore/DeleteDatastoreDialog.d.ts.map +1 -0
- package/datastore/DeleteDatastoreDialog.js +90 -0
- package/datastore/DeleteDatastoreDialog.js.map +1 -0
- package/datastore/FieldValueControl.d.ts +55 -0
- package/datastore/FieldValueControl.d.ts.map +1 -0
- package/datastore/FieldValueControl.js +138 -0
- package/datastore/FieldValueControl.js.map +1 -0
- package/datastore/RecordFilterBuilder.d.ts +37 -0
- package/datastore/RecordFilterBuilder.d.ts.map +1 -0
- package/datastore/RecordFilterBuilder.js +122 -0
- package/datastore/RecordFilterBuilder.js.map +1 -0
- package/datastore/RecordFormPanel.d.ts +45 -0
- package/datastore/RecordFormPanel.d.ts.map +1 -0
- package/datastore/RecordFormPanel.js +215 -0
- package/datastore/RecordFormPanel.js.map +1 -0
- package/datastore/index.d.ts +43 -0
- package/datastore/index.d.ts.map +1 -0
- package/datastore/index.js +22 -0
- package/datastore/index.js.map +1 -0
- package/datastore/recordFilter.d.ts +62 -0
- package/datastore/recordFilter.d.ts.map +1 -0
- package/datastore/recordFilter.js +104 -0
- package/datastore/recordFilter.js.map +1 -0
- package/datastore/recordValues.d.ts +85 -0
- package/datastore/recordValues.d.ts.map +1 -0
- package/datastore/recordValues.js +282 -0
- package/datastore/recordValues.js.map +1 -0
- package/datastore/useDatastore.d.ts +39 -0
- package/datastore/useDatastore.d.ts.map +1 -0
- package/datastore/useDatastore.js +44 -0
- package/datastore/useDatastore.js.map +1 -0
- package/datastore/useDatastoreCount.d.ts +48 -0
- package/datastore/useDatastoreCount.d.ts.map +1 -0
- package/datastore/useDatastoreCount.js +27 -0
- package/datastore/useDatastoreCount.js.map +1 -0
- package/datastore/useDatastoreDescription.d.ts +54 -0
- package/datastore/useDatastoreDescription.d.ts.map +1 -0
- package/datastore/useDatastoreDescription.js +50 -0
- package/datastore/useDatastoreDescription.js.map +1 -0
- package/datastore/useDatastoreList.d.ts +57 -0
- package/datastore/useDatastoreList.d.ts.map +1 -0
- package/datastore/useDatastoreList.js +29 -0
- package/datastore/useDatastoreList.js.map +1 -0
- package/datastore/useDatastoreSearch.d.ts +19 -0
- package/datastore/useDatastoreSearch.d.ts.map +1 -0
- package/datastore/useDatastoreSearch.js +22 -0
- package/datastore/useDatastoreSearch.js.map +1 -0
- package/datastore/useDeleteDatastore.d.ts +53 -0
- package/datastore/useDeleteDatastore.d.ts.map +1 -0
- package/datastore/useDeleteDatastore.js +40 -0
- package/datastore/useDeleteDatastore.js.map +1 -0
- package/datastore/useDeleteRecord.d.ts +34 -0
- package/datastore/useDeleteRecord.d.ts.map +1 -0
- package/datastore/useDeleteRecord.js +43 -0
- package/datastore/useDeleteRecord.js.map +1 -0
- package/datastore/useInsertRecord.d.ts +50 -0
- package/datastore/useInsertRecord.d.ts.map +1 -0
- package/datastore/useInsertRecord.js +55 -0
- package/datastore/useInsertRecord.js.map +1 -0
- package/datastore/useRecordCollection.d.ts +104 -0
- package/datastore/useRecordCollection.d.ts.map +1 -0
- package/datastore/useRecordCollection.js +136 -0
- package/datastore/useRecordCollection.js.map +1 -0
- package/datastore/useRecordList.d.ts +66 -0
- package/datastore/useRecordList.d.ts.map +1 -0
- package/datastore/useRecordList.js +58 -0
- package/datastore/useRecordList.js.map +1 -0
- package/datastore/useUpdateRecord.d.ts +52 -0
- package/datastore/useUpdateRecord.d.ts.map +1 -0
- package/datastore/useUpdateRecord.js +55 -0
- package/datastore/useUpdateRecord.js.map +1 -0
- package/environment/EnvironmentListPanel.d.ts.map +1 -1
- package/environment/EnvironmentListPanel.js +12 -7
- package/environment/EnvironmentListPanel.js.map +1 -1
- package/execution/ExecutionProgress.d.ts.map +1 -1
- package/execution/ExecutionProgress.js +13 -4
- package/execution/ExecutionProgress.js.map +1 -1
- package/execution/MessageThread.d.ts.map +1 -1
- package/execution/MessageThread.js +10 -2
- package/execution/MessageThread.js.map +1 -1
- package/execution/useCreateAgentExecution.d.ts +31 -1
- package/execution/useCreateAgentExecution.d.ts.map +1 -1
- package/execution/useCreateAgentExecution.js +2 -0
- package/execution/useCreateAgentExecution.js.map +1 -1
- package/iam-policy/index.d.ts +1 -1
- package/iam-policy/index.d.ts.map +1 -1
- package/iam-policy/index.js.map +1 -1
- package/iam-policy/useCheckPermission.d.ts +32 -11
- package/iam-policy/useCheckPermission.d.ts.map +1 -1
- package/iam-policy/useCheckPermission.js +24 -19
- package/iam-policy/useCheckPermission.js.map +1 -1
- package/index.d.ts +12 -4
- package/index.d.ts.map +1 -1
- package/index.js +18 -3
- package/index.js.map +1 -1
- package/internal/form-primitives.d.ts +10 -0
- package/internal/form-primitives.d.ts.map +1 -0
- package/internal/form-primitives.js +15 -0
- package/internal/form-primitives.js.map +1 -0
- package/library/index.d.ts +0 -7
- package/library/index.d.ts.map +1 -1
- package/library/index.js +0 -4
- package/library/index.js.map +1 -1
- package/library/useApplyResource.d.ts +12 -12
- package/library/useApplyResource.d.ts.map +1 -1
- package/library/useApplyResource.js +16 -25
- package/library/useApplyResource.js.map +1 -1
- package/library/useExportResource.d.ts +13 -9
- package/library/useExportResource.d.ts.map +1 -1
- package/library/useExportResource.js +18 -36
- package/library/useExportResource.js.map +1 -1
- package/manifest/ApplyManifestDialog.d.ts +48 -0
- package/manifest/ApplyManifestDialog.d.ts.map +1 -0
- package/manifest/ApplyManifestDialog.js +135 -0
- package/manifest/ApplyManifestDialog.js.map +1 -0
- package/manifest/EditResourceYamlDialog.d.ts +51 -0
- package/manifest/EditResourceYamlDialog.d.ts.map +1 -0
- package/manifest/EditResourceYamlDialog.js +104 -0
- package/manifest/EditResourceYamlDialog.js.map +1 -0
- package/manifest/RedactedSecretsNotice.d.ts +14 -0
- package/manifest/RedactedSecretsNotice.d.ts.map +1 -0
- package/manifest/RedactedSecretsNotice.js +14 -0
- package/manifest/RedactedSecretsNotice.js.map +1 -0
- package/manifest/YamlEditor.d.ts +44 -0
- package/manifest/YamlEditor.d.ts.map +1 -0
- package/manifest/YamlEditor.js +216 -0
- package/manifest/YamlEditor.js.map +1 -0
- package/manifest/index.d.ts +13 -0
- package/manifest/index.d.ts.map +1 -0
- package/manifest/index.js +13 -0
- package/manifest/index.js.map +1 -0
- package/manifest/useApplyManifest.d.ts +82 -0
- package/manifest/useApplyManifest.d.ts.map +1 -0
- package/manifest/useApplyManifest.js +180 -0
- package/manifest/useApplyManifest.js.map +1 -0
- package/manifest/useEditResourceYaml.d.ts +106 -0
- package/manifest/useEditResourceYaml.d.ts.map +1 -0
- package/manifest/useEditResourceYaml.js +168 -0
- package/manifest/useEditResourceYaml.js.map +1 -0
- package/mcp-server/steps/ReviewStep.d.ts.map +1 -1
- package/mcp-server/steps/ReviewStep.js +2 -3
- package/mcp-server/steps/ReviewStep.js.map +1 -1
- package/package.json +4 -4
- package/pricing-governance/BaselineEditor.d.ts +9 -0
- package/pricing-governance/BaselineEditor.d.ts.map +1 -0
- package/pricing-governance/BaselineEditor.js +270 -0
- package/pricing-governance/BaselineEditor.js.map +1 -0
- package/pricing-governance/ModelCatalogPanel.d.ts +28 -0
- package/pricing-governance/ModelCatalogPanel.d.ts.map +1 -0
- package/pricing-governance/ModelCatalogPanel.js +102 -0
- package/pricing-governance/ModelCatalogPanel.js.map +1 -0
- package/pricing-governance/ModelGovernanceDetail.d.ts +8 -0
- package/pricing-governance/ModelGovernanceDetail.d.ts.map +1 -0
- package/pricing-governance/ModelGovernanceDetail.js +64 -0
- package/pricing-governance/ModelGovernanceDetail.js.map +1 -0
- package/pricing-governance/OperatorAccessNotice.d.ts +12 -0
- package/pricing-governance/OperatorAccessNotice.d.ts.map +1 -0
- package/pricing-governance/OperatorAccessNotice.js +15 -0
- package/pricing-governance/OperatorAccessNotice.js.map +1 -0
- package/pricing-governance/PricingGovernanceConsole.d.ts +57 -0
- package/pricing-governance/PricingGovernanceConsole.d.ts.map +1 -0
- package/pricing-governance/PricingGovernanceConsole.js +164 -0
- package/pricing-governance/PricingGovernanceConsole.js.map +1 -0
- package/pricing-governance/PricingGovernancePanel.d.ts +26 -0
- package/pricing-governance/PricingGovernancePanel.d.ts.map +1 -0
- package/pricing-governance/PricingGovernancePanel.js +64 -0
- package/pricing-governance/PricingGovernancePanel.js.map +1 -0
- package/pricing-governance/RetireConfirm.d.ts +9 -0
- package/pricing-governance/RetireConfirm.d.ts.map +1 -0
- package/pricing-governance/RetireConfirm.js +19 -0
- package/pricing-governance/RetireConfirm.js.map +1 -0
- package/pricing-governance/governance-primitives.d.ts +33 -0
- package/pricing-governance/governance-primitives.d.ts.map +1 -0
- package/pricing-governance/governance-primitives.js +43 -0
- package/pricing-governance/governance-primitives.js.map +1 -0
- package/pricing-governance/index.d.ts +19 -0
- package/pricing-governance/index.d.ts.map +1 -0
- package/pricing-governance/index.js +20 -0
- package/pricing-governance/index.js.map +1 -0
- package/pricing-governance/pricing-format.d.ts +12 -0
- package/pricing-governance/pricing-format.d.ts.map +1 -0
- package/pricing-governance/pricing-format.js +50 -0
- package/pricing-governance/pricing-format.js.map +1 -0
- package/pricing-governance/useDecidePricingOverride.d.ts +46 -0
- package/pricing-governance/useDecidePricingOverride.d.ts.map +1 -0
- package/pricing-governance/useDecidePricingOverride.js +44 -0
- package/pricing-governance/useDecidePricingOverride.js.map +1 -0
- package/pricing-governance/useModelGovernanceView.d.ts +103 -0
- package/pricing-governance/useModelGovernanceView.d.ts.map +1 -0
- package/pricing-governance/useModelGovernanceView.js +144 -0
- package/pricing-governance/useModelGovernanceView.js.map +1 -0
- package/pricing-governance/useModelPricingBaselines.d.ts +40 -0
- package/pricing-governance/useModelPricingBaselines.d.ts.map +1 -0
- package/pricing-governance/useModelPricingBaselines.js +32 -0
- package/pricing-governance/useModelPricingBaselines.js.map +1 -0
- package/pricing-governance/usePricingGovernance.d.ts +39 -0
- package/pricing-governance/usePricingGovernance.d.ts.map +1 -0
- package/pricing-governance/usePricingGovernance.js +31 -0
- package/pricing-governance/usePricingGovernance.js.map +1 -0
- package/pricing-governance/useRetireModelPricingBaseline.d.ts +31 -0
- package/pricing-governance/useRetireModelPricingBaseline.d.ts.map +1 -0
- package/pricing-governance/useRetireModelPricingBaseline.js +36 -0
- package/pricing-governance/useRetireModelPricingBaseline.js.map +1 -0
- package/pricing-governance/useUpsertModelPricingBaseline.d.ts +38 -0
- package/pricing-governance/useUpsertModelPricingBaseline.d.ts.map +1 -0
- package/pricing-governance/useUpsertModelPricingBaseline.js +37 -0
- package/pricing-governance/useUpsertModelPricingBaseline.js.map +1 -0
- package/resource-creation/templates/workflow-templates.js +4 -4
- package/session/useCreateSession.d.ts +28 -0
- package/session/useCreateSession.d.ts.map +1 -1
- package/session/useCreateSession.js +2 -1
- package/session/useCreateSession.js.map +1 -1
- package/session/useEditSessionPrep.js +3 -3
- package/session/useEditSessionPrep.js.map +1 -1
- package/session/useNewSessionFlow.d.ts +30 -0
- package/session/useNewSessionFlow.d.ts.map +1 -1
- package/session/useNewSessionFlow.js +7 -1
- package/session/useNewSessionFlow.js.map +1 -1
- package/session/useUpdateSession.d.ts +29 -10
- package/session/useUpdateSession.d.ts.map +1 -1
- package/session/useUpdateSession.js +29 -10
- package/session/useUpdateSession.js.map +1 -1
- package/settings/index.d.ts +2 -1
- package/settings/index.d.ts.map +1 -1
- package/settings/index.js +2 -1
- package/settings/index.js.map +1 -1
- package/settings/settings-nav.d.ts +22 -0
- package/settings/settings-nav.d.ts.map +1 -1
- package/settings/settings-nav.js +32 -1
- package/settings/settings-nav.js.map +1 -1
- package/settings/useSettingsNavGroups.d.ts +29 -0
- package/settings/useSettingsNavGroups.d.ts.map +1 -0
- package/settings/useSettingsNavGroups.js +61 -0
- package/settings/useSettingsNavGroups.js.map +1 -0
- package/src/agent/steps/ReviewStep.tsx +2 -3
- package/src/billing/index.ts +5 -0
- package/src/channel/AgentChannelsPanel.tsx +27 -1
- package/src/composer/SessionComposer.tsx +1 -1
- package/src/cursor-accounts/CursorAccountEditor.tsx +229 -0
- package/src/cursor-accounts/CursorAccountsAccessNotice.tsx +36 -0
- package/src/cursor-accounts/CursorAccountsConsole.tsx +454 -0
- package/src/cursor-accounts/MemberCoverageTable.tsx +439 -0
- package/src/cursor-accounts/MemberKeysPanel.tsx +278 -0
- package/src/cursor-accounts/__tests__/CursorAccountsConsole.test.tsx +680 -0
- package/src/cursor-accounts/__tests__/cursor-account-coverage.test.ts +73 -0
- package/src/cursor-accounts/badges.tsx +26 -0
- package/src/cursor-accounts/cursor-account-coverage.ts +71 -0
- package/src/cursor-accounts/cursor-account-format.ts +45 -0
- package/src/cursor-accounts/index.ts +29 -0
- package/src/cursor-accounts/useCursorAccountView.ts +49 -0
- package/src/cursor-accounts/useCursorAccounts.ts +49 -0
- package/src/cursor-accounts/useCursorMemberKeyActions.ts +106 -0
- package/src/cursor-accounts/useDeleteCursorAccount.ts +62 -0
- package/src/cursor-accounts/useSyncCursorAccount.ts +54 -0
- package/src/cursor-accounts/useUpsertCursorAccount.ts +57 -0
- package/src/datastore/CollectionRecordsBrowser.tsx +570 -0
- package/src/datastore/CollectionSchemaView.tsx +247 -0
- package/src/datastore/DatastoreDetailView.tsx +201 -0
- package/src/datastore/DatastoreSyncReport.tsx +105 -0
- package/src/datastore/DeleteDatastoreDialog.tsx +202 -0
- package/src/datastore/FieldValueControl.tsx +289 -0
- package/src/datastore/RecordFilterBuilder.tsx +422 -0
- package/src/datastore/RecordFormPanel.tsx +432 -0
- package/src/datastore/__tests__/CollectionRecordsBrowser.test.tsx +245 -0
- package/src/datastore/__tests__/DeleteDatastoreDialog.test.tsx +133 -0
- package/src/datastore/__tests__/FieldValueControl.test.tsx +160 -0
- package/src/datastore/__tests__/RecordFilterBuilder.test.tsx +155 -0
- package/src/datastore/__tests__/RecordFormPanel.test.tsx +227 -0
- package/src/datastore/__tests__/recordFilter.test.ts +169 -0
- package/src/datastore/__tests__/recordMutations.test.tsx +195 -0
- package/src/datastore/__tests__/recordValues.test.ts +359 -0
- package/src/datastore/__tests__/schemaAndSyncViews.test.tsx +142 -0
- package/src/datastore/__tests__/useDatastoreDescription.test.tsx +143 -0
- package/src/datastore/__tests__/useRecordCollection.test.tsx +250 -0
- package/src/datastore/__tests__/useRecordList.test.tsx +85 -0
- package/src/datastore/index.ts +111 -0
- package/src/datastore/recordFilter.ts +154 -0
- package/src/datastore/recordValues.ts +327 -0
- package/src/datastore/useDatastore.ts +67 -0
- package/src/datastore/useDatastoreCount.ts +67 -0
- package/src/datastore/useDatastoreDescription.ts +90 -0
- package/src/datastore/useDatastoreList.ts +79 -0
- package/src/datastore/useDatastoreSearch.ts +39 -0
- package/src/datastore/useDeleteDatastore.ts +87 -0
- package/src/datastore/useDeleteRecord.ts +77 -0
- package/src/datastore/useInsertRecord.ts +92 -0
- package/src/datastore/useRecordCollection.ts +256 -0
- package/src/datastore/useRecordList.ts +131 -0
- package/src/datastore/useUpdateRecord.ts +95 -0
- package/src/environment/EnvironmentListPanel.tsx +24 -0
- package/src/execution/ExecutionProgress.tsx +14 -4
- package/src/execution/MessageThread.tsx +10 -2
- package/src/execution/__tests__/ExecutionProgress.test.tsx +67 -0
- package/src/execution/__tests__/MessageThread.test.tsx +44 -0
- package/src/execution/__tests__/useArtifactInspection.test.tsx +12 -2
- package/src/execution/__tests__/useCreateAgentExecution.test.tsx +86 -0
- package/src/execution/useCreateAgentExecution.ts +41 -6
- package/src/iam-policy/__tests__/useCheckPermission.test.tsx +221 -0
- package/src/iam-policy/index.ts +1 -0
- package/src/iam-policy/useCheckPermission.ts +45 -19
- package/src/index.ts +172 -14
- package/src/internal/form-primitives.tsx +40 -0
- package/src/library/index.ts +0 -20
- package/src/library/useApplyResource.ts +27 -34
- package/src/library/useExportResource.ts +21 -40
- package/src/manifest/ApplyManifestDialog.tsx +315 -0
- package/src/manifest/EditResourceYamlDialog.tsx +265 -0
- package/src/manifest/RedactedSecretsNotice.tsx +30 -0
- package/src/manifest/YamlEditor.tsx +272 -0
- package/src/manifest/__tests__/EditResourceYamlDialog.test.tsx +118 -0
- package/src/manifest/__tests__/useApplyManifest.test.tsx +237 -0
- package/src/manifest/__tests__/useEditResourceYaml.test.tsx +252 -0
- package/src/manifest/index.ts +33 -0
- package/src/manifest/useApplyManifest.ts +270 -0
- package/src/manifest/useEditResourceYaml.ts +273 -0
- package/src/mcp-server/steps/ReviewStep.tsx +2 -3
- package/src/pricing-governance/BaselineEditor.tsx +652 -0
- package/src/pricing-governance/ModelCatalogPanel.tsx +283 -0
- package/src/pricing-governance/ModelGovernanceDetail.tsx +289 -0
- package/src/pricing-governance/OperatorAccessNotice.tsx +32 -0
- package/src/pricing-governance/PricingGovernanceConsole.tsx +465 -0
- package/src/pricing-governance/PricingGovernancePanel.tsx +166 -0
- package/src/pricing-governance/RetireConfirm.tsx +82 -0
- package/src/pricing-governance/__tests__/ModelCatalogPanel.test.tsx +253 -0
- package/src/pricing-governance/__tests__/PricingGovernanceConsole.test.tsx +410 -0
- package/src/pricing-governance/__tests__/useModelGovernanceView.test.tsx +308 -0
- package/src/pricing-governance/governance-primitives.tsx +133 -0
- package/src/pricing-governance/index.ts +50 -0
- package/src/pricing-governance/pricing-format.ts +53 -0
- package/src/pricing-governance/useDecidePricingOverride.ts +78 -0
- package/src/pricing-governance/useModelGovernanceView.ts +290 -0
- package/src/pricing-governance/useModelPricingBaselines.ts +69 -0
- package/src/pricing-governance/usePricingGovernance.ts +57 -0
- package/src/pricing-governance/useRetireModelPricingBaseline.ts +65 -0
- package/src/pricing-governance/useUpsertModelPricingBaseline.ts +72 -0
- package/src/resource-creation/templates/workflow-templates.ts +4 -4
- package/src/session/__tests__/useCreateSession.test.tsx +94 -0
- package/src/session/__tests__/useNewSessionFlow.test.tsx +33 -0
- package/src/session/useCreateSession.ts +30 -0
- package/src/session/useEditSessionPrep.ts +3 -3
- package/src/session/useNewSessionFlow.ts +45 -1
- package/src/session/useUpdateSession.ts +29 -10
- package/src/settings/__tests__/useSettingsNavGroups.test.tsx +138 -0
- package/src/settings/index.ts +5 -1
- package/src/settings/settings-nav.ts +43 -0
- package/src/settings/useSettingsNavGroups.ts +81 -0
- package/src/workflow/WorkflowYamlEditor.tsx +6 -270
- package/styles.css +1 -1
- package/workflow/CanvasTransitionEdge.d.ts +1 -1
- package/workflow/WorkflowYamlEditor.d.ts +2 -42
- package/workflow/WorkflowYamlEditor.d.ts.map +1 -1
- package/workflow/WorkflowYamlEditor.js +5 -214
- package/workflow/WorkflowYamlEditor.js.map +1 -1
- package/library/ImportResourceDialog.d.ts +0 -43
- package/library/ImportResourceDialog.d.ts.map +0 -1
- package/library/ImportResourceDialog.js +0 -90
- package/library/ImportResourceDialog.js.map +0 -1
- package/library/parse-resource-yaml.d.ts +0 -63
- package/library/parse-resource-yaml.d.ts.map +0 -1
- package/library/parse-resource-yaml.js +0 -407
- package/library/parse-resource-yaml.js.map +0 -1
- package/library/serialize-resource-yaml.d.ts +0 -103
- package/library/serialize-resource-yaml.d.ts.map +0 -1
- package/library/serialize-resource-yaml.js +0 -565
- package/library/serialize-resource-yaml.js.map +0 -1
- package/library/useImportResource.d.ts +0 -84
- package/library/useImportResource.d.ts.map +0 -1
- package/library/useImportResource.js +0 -188
- package/library/useImportResource.js.map +0 -1
- package/src/library/ImportResourceDialog.tsx +0 -227
- package/src/library/parse-resource-yaml.ts +0 -630
- package/src/library/serialize-resource-yaml.ts +0 -756
- package/src/library/useImportResource.ts +0 -253
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-primitives.d.ts","sourceRoot":"","sources":["../../src/internal/form-primitives.tsx"],"names":[],"mappings":"AAUA,6DAA6D;AAC7D,eAAO,MAAM,aAAa,QAKzB,CAAC;AAEF,mCAAmC;AACnC,wBAAgB,KAAK,CAAC,EACpB,KAAK,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,GACT,EAAE;IACD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CACpC,2CAUA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "@stigmer/theme";
|
|
4
|
+
// ---------------------------------------------------------------------------
|
|
5
|
+
// Shared form primitives for the operator consoles (pricing-governance
|
|
6
|
+
// editors and search inputs, cursor-accounts editor and key forms).
|
|
7
|
+
// Internal — never exported from the package barrel.
|
|
8
|
+
// ---------------------------------------------------------------------------
|
|
9
|
+
/** Standard text-input styling for the operator consoles. */
|
|
10
|
+
export const INPUT_CLASSES = cn("w-full rounded-md border border-input bg-background px-2.5 py-1.5 text-xs text-foreground", "placeholder:text-muted-foreground", "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", "disabled:pointer-events-none disabled:opacity-50");
|
|
11
|
+
/** Labelled form field wrapper. */
|
|
12
|
+
export function Field({ label, required, className, children, }) {
|
|
13
|
+
return (_jsxs("label", { className: cn("block space-y-1", className), children: [_jsxs("span", { className: "text-[11px] font-medium text-muted-foreground", children: [label, required ? " *" : ""] }), children] }));
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=form-primitives.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-primitives.js","sourceRoot":"","sources":["../../src/internal/form-primitives.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAEpC,8EAA8E;AAC9E,uEAAuE;AACvE,oEAAoE;AACpE,qDAAqD;AACrD,8EAA8E;AAE9E,6DAA6D;AAC7D,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,CAC7B,2FAA2F,EAC3F,mCAAmC,EACnC,yEAAyE,EACzE,kDAAkD,CACnD,CAAC;AAEF,mCAAmC;AACnC,MAAM,UAAU,KAAK,CAAC,EACpB,KAAK,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,GAMT;IACC,OAAO,CACL,iBAAO,SAAS,EAAE,EAAE,CAAC,iBAAiB,EAAE,SAAS,CAAC,aAChD,gBAAM,SAAS,EAAC,+CAA+C,aAC5D,KAAK,EACL,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAChB,EACN,QAAQ,IACH,CACT,CAAC;AACJ,CAAC"}
|
package/library/index.d.ts
CHANGED
|
@@ -14,18 +14,11 @@ export { findStreamingPlan } from "./detect-streaming-plan.js";
|
|
|
14
14
|
export type { StreamingPlan } from "./detect-streaming-plan.js";
|
|
15
15
|
export { useDetectSkillPackage } from "./useDetectSkillPackage.js";
|
|
16
16
|
export type { UseDetectSkillPackageReturn } from "./useDetectSkillPackage.js";
|
|
17
|
-
export { parseResourceYaml } from "./parse-resource-yaml.js";
|
|
18
|
-
export type { ParsedResource } from "./parse-resource-yaml.js";
|
|
19
|
-
export { serializeAgentYaml, serializeMcpServerYaml, serializeAgentInputYaml, serializeMcpServerInputYaml, } from "./serialize-resource-yaml.js";
|
|
20
17
|
export { serializeWorkflowYaml, parseWorkflowYaml } from "../workflow/serialize-workflow-yaml.js";
|
|
21
18
|
export { useApplyResource } from "./useApplyResource.js";
|
|
22
19
|
export type { UseApplyResourceReturn, ApplyResourceResult, PushSkillParams, } from "./useApplyResource.js";
|
|
23
20
|
export { useExportResource } from "./useExportResource.js";
|
|
24
21
|
export type { UseExportResourceOptions, UseExportResourceReturn, } from "./useExportResource.js";
|
|
25
|
-
export { useImportResource } from "./useImportResource.js";
|
|
26
|
-
export type { ImportFormat, ImportPreview, UseImportResourceReturn, } from "./useImportResource.js";
|
|
27
|
-
export { ImportResourceDialog } from "./ImportResourceDialog.js";
|
|
28
|
-
export type { ImportResourceDialogProps } from "./ImportResourceDialog.js";
|
|
29
22
|
export { VisibilitySelector, VisibilityBadge } from "./VisibilitySelector.js";
|
|
30
23
|
export type { VisibilitySelectorProps, VisibilityBadgeProps, } from "./VisibilitySelector.js";
|
|
31
24
|
export { blueprintVisibilityLevels, INSTANCE_VISIBILITY_LEVELS, visibilityLabel, visibilityOption, } from "./visibilityLevels.js";
|
package/library/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/library/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,YAAY,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,YAAY,EACV,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,w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,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,YAAY,EAAE,+BAA+B,EAAE,MAAM,iCAAiC,CAAC"}
|
package/library/index.js
CHANGED
|
@@ -7,13 +7,9 @@ export { isSkillPackage, detectSkillPackage, } from "./detect-skill-package.js";
|
|
|
7
7
|
export { isPlanArtifact, isPlanArtifactName, findPlanArtifact, findLatestSessionPlan, PLAN_ARTIFACT_NAME, PLAN_ARTIFACT_SUFFIX, } from "./detect-plan-artifact.js";
|
|
8
8
|
export { findStreamingPlan } from "./detect-streaming-plan.js";
|
|
9
9
|
export { useDetectSkillPackage } from "./useDetectSkillPackage.js";
|
|
10
|
-
export { parseResourceYaml } from "./parse-resource-yaml.js";
|
|
11
|
-
export { serializeAgentYaml, serializeMcpServerYaml, serializeAgentInputYaml, serializeMcpServerInputYaml, } from "./serialize-resource-yaml.js";
|
|
12
10
|
export { serializeWorkflowYaml, parseWorkflowYaml } from "../workflow/serialize-workflow-yaml.js";
|
|
13
11
|
export { useApplyResource } from "./useApplyResource.js";
|
|
14
12
|
export { useExportResource } from "./useExportResource.js";
|
|
15
|
-
export { useImportResource } from "./useImportResource.js";
|
|
16
|
-
export { ImportResourceDialog } from "./ImportResourceDialog.js";
|
|
17
13
|
export { VisibilitySelector, VisibilityBadge } from "./VisibilitySelector.js";
|
|
18
14
|
export { blueprintVisibilityLevels, INSTANCE_VISIBILITY_LEVELS, visibilityLabel, visibilityOption, } from "./visibilityLevels.js";
|
|
19
15
|
export { ResourceVisibilityControl } from "./ResourceVisibilityControl.js";
|
package/library/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/library/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAE,iBAAiB,EAA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D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAM3D,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAM9E,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,eAAe,EACf,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAM/B,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAG3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAM/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* link to the resource in the Library (e.g., `/library/agents`).
|
|
6
6
|
*/
|
|
7
7
|
export interface ApplyResourceResult {
|
|
8
|
-
/** The resource kind that was applied. */
|
|
9
|
-
readonly kind:
|
|
8
|
+
/** The resource kind that was applied (`"Agent"`, `"McpServer"`, `"Skill"`, …). */
|
|
9
|
+
readonly kind: string;
|
|
10
10
|
/** The resource name (from response metadata). */
|
|
11
11
|
readonly name: string;
|
|
12
12
|
/** The organization the resource was applied to. */
|
|
@@ -33,14 +33,14 @@ export interface PushSkillParams {
|
|
|
33
33
|
/** Return value of {@link useApplyResource}. */
|
|
34
34
|
export interface UseApplyResourceReturn {
|
|
35
35
|
/**
|
|
36
|
-
* Apply a Stigmer resource YAML
|
|
36
|
+
* Apply a Stigmer resource YAML to an organization.
|
|
37
37
|
*
|
|
38
|
-
* Parses the YAML
|
|
39
|
-
* and
|
|
40
|
-
*
|
|
38
|
+
* Parses the YAML against the kind's generated proto schema via the SDK
|
|
39
|
+
* manifest engine and applies it through `stigmer.manifest.apply()` —
|
|
40
|
+
* any registry-supported kind, full fidelity.
|
|
41
41
|
*
|
|
42
|
-
* The `org` parameter
|
|
43
|
-
* the "Apply to [my-org]" UX intent.
|
|
42
|
+
* The `org` parameter fills in `metadata.org` when the YAML omits it —
|
|
43
|
+
* matching the "Apply to [my-org]" UX intent.
|
|
44
44
|
*
|
|
45
45
|
* @throws Re-throws the original error after setting `error` state, so
|
|
46
46
|
* callers can optionally catch for flow control.
|
|
@@ -72,9 +72,9 @@ export interface UseApplyResourceReturn {
|
|
|
72
72
|
*
|
|
73
73
|
* Handles two parallel apply paths:
|
|
74
74
|
*
|
|
75
|
-
* 1. **YAML resources
|
|
76
|
-
*
|
|
77
|
-
*
|
|
75
|
+
* 1. **YAML resources**: `applyYamlResource(content, org)` parses the YAML
|
|
76
|
+
* against the generated proto schema (SDK manifest engine) and applies
|
|
77
|
+
* it through the kind's `apply` RPC.
|
|
78
78
|
*
|
|
79
79
|
* 2. **Skill packages** (directory artifacts): `pushSkillPackage(params)`
|
|
80
80
|
* delegates to the server-side `pushFromExecutionArtifact` RPC.
|
|
@@ -108,7 +108,7 @@ export interface UseApplyResourceReturn {
|
|
|
108
108
|
* };
|
|
109
109
|
* ```
|
|
110
110
|
*
|
|
111
|
-
* @see {@link
|
|
111
|
+
* @see {@link parseManifest} for the YAML-to-proto conversion
|
|
112
112
|
* @see {@link detectStigmerResource} for YAML resource detection
|
|
113
113
|
* @see {@link useDetectSkillPackage} for skill package detection
|
|
114
114
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useApplyResource.d.ts","sourceRoot":"","sources":["../../src/library/useApplyResource.ts"],"names":[],"mappings":"AASA;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,
|
|
1
|
+
{"version":3,"file":"useApplyResource.d.ts","sourceRoot":"","sources":["../../src/library/useApplyResource.ts"],"names":[],"mappings":"AASA;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,mFAAmF;IACnF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,kDAAkD;IAClD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,oDAAoD;IACpD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,sDAAsD;IACtD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,4CAA4C;IAC5C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,6EAA6E;IAC7E,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,yFAAyF;IACzF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,yDAAyD;IACzD,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,gDAAgD;AAChD,MAAM,WAAW,sBAAsB;IACrC;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,iBAAiB,EAAE,CAC1B,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,KACR,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAElC;;;;;;;;OAQG;IACH,QAAQ,CAAC,gBAAgB,EAAE,CACzB,MAAM,EAAE,eAAe,KACpB,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAElC,4DAA4D;IAC5D,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAE7B,oEAAoE;IACpE,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAE7B,8EAA8E;IAC9E,QAAQ,CAAC,UAAU,EAAE,MAAM,IAAI,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,wBAAgB,gBAAgB,IAAI,sBAAsB,CAqEzD"}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { useCallback, useState } from "react";
|
|
3
3
|
import { create } from "@bufbuild/protobuf";
|
|
4
4
|
import { PushSkillFromExecutionArtifactRequestSchema } from "@stigmer/protos/ai/stigmer/agentic/skill/v1/io_pb";
|
|
5
|
+
import { parseManifest } from "@stigmer/sdk";
|
|
5
6
|
import { useStigmer } from "../hooks.js";
|
|
6
7
|
import { toError } from "../internal/toError.js";
|
|
7
|
-
import { parseResourceYaml } from "./parse-resource-yaml.js";
|
|
8
8
|
/**
|
|
9
9
|
* Behavior hook for applying detected Stigmer resources to an organization.
|
|
10
10
|
*
|
|
@@ -14,9 +14,9 @@ import { parseResourceYaml } from "./parse-resource-yaml.js";
|
|
|
14
14
|
*
|
|
15
15
|
* Handles two parallel apply paths:
|
|
16
16
|
*
|
|
17
|
-
* 1. **YAML resources
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* 1. **YAML resources**: `applyYamlResource(content, org)` parses the YAML
|
|
18
|
+
* against the generated proto schema (SDK manifest engine) and applies
|
|
19
|
+
* it through the kind's `apply` RPC.
|
|
20
20
|
*
|
|
21
21
|
* 2. **Skill packages** (directory artifacts): `pushSkillPackage(params)`
|
|
22
22
|
* delegates to the server-side `pushFromExecutionArtifact` RPC.
|
|
@@ -50,7 +50,7 @@ import { parseResourceYaml } from "./parse-resource-yaml.js";
|
|
|
50
50
|
* };
|
|
51
51
|
* ```
|
|
52
52
|
*
|
|
53
|
-
* @see {@link
|
|
53
|
+
* @see {@link parseManifest} for the YAML-to-proto conversion
|
|
54
54
|
* @see {@link detectStigmerResource} for YAML resource detection
|
|
55
55
|
* @see {@link useDetectSkillPackage} for skill package detection
|
|
56
56
|
*/
|
|
@@ -63,27 +63,18 @@ export function useApplyResource() {
|
|
|
63
63
|
setIsApplying(true);
|
|
64
64
|
setError(null);
|
|
65
65
|
try {
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return {
|
|
71
|
-
kind: "Agent",
|
|
72
|
-
name: agent.metadata?.name ?? parsed.input.name,
|
|
73
|
-
org: agent.metadata?.org ?? org,
|
|
74
|
-
slug: agent.metadata?.slug ?? parsed.input.name,
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
case "McpServer": {
|
|
78
|
-
const mcpServer = await stigmer.mcpServer.apply(parsed.input);
|
|
79
|
-
return {
|
|
80
|
-
kind: "McpServer",
|
|
81
|
-
name: mcpServer.metadata?.name ?? parsed.input.name,
|
|
82
|
-
org: mcpServer.metadata?.org ?? org,
|
|
83
|
-
slug: mcpServer.metadata?.slug ?? parsed.input.name,
|
|
84
|
-
};
|
|
85
|
-
}
|
|
66
|
+
const documents = parseManifest(content, { org });
|
|
67
|
+
if (documents.length > 1) {
|
|
68
|
+
throw new Error("This artifact contains multiple resource documents. " +
|
|
69
|
+
"Use Apply YAML in the Library to apply multi-document manifests.");
|
|
86
70
|
}
|
|
71
|
+
const applied = await stigmer.manifest.apply(documents[0]);
|
|
72
|
+
return {
|
|
73
|
+
kind: applied.yamlKind,
|
|
74
|
+
name: applied.name,
|
|
75
|
+
org: applied.org,
|
|
76
|
+
slug: applied.slug,
|
|
77
|
+
};
|
|
87
78
|
}
|
|
88
79
|
catch (err) {
|
|
89
80
|
setError(toError(err));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useApplyResource.js","sourceRoot":"","sources":["../../src/library/useApplyResource.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,2CAA2C,EAAE,MAAM,mDAAmD,CAAC;AAChH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"useApplyResource.js","sourceRoot":"","sources":["../../src/library/useApplyResource.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,2CAA2C,EAAE,MAAM,mDAAmD,CAAC;AAChH,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;A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2
|
+
import type { Datastore } from "@stigmer/protos/ai/stigmer/agentic/datastore/v1/api_pb";
|
|
2
3
|
import type { McpServer } from "@stigmer/protos/ai/stigmer/agentic/mcpserver/v1/api_pb";
|
|
3
4
|
import type { Workflow } from "@stigmer/protos/ai/stigmer/agentic/workflow/v1/api_pb";
|
|
4
5
|
/** Options for {@link useExportResource}. */
|
|
5
6
|
export interface UseExportResourceOptions {
|
|
6
7
|
/** The resource kind — determines which serializer is used. */
|
|
7
|
-
readonly kind: "Agent" | "McpServer" | "Workflow";
|
|
8
|
+
readonly kind: "Agent" | "McpServer" | "Workflow" | "Datastore";
|
|
8
9
|
/** The proto resource to export, or `null` when not yet loaded. */
|
|
9
|
-
readonly resource: Agent | McpServer | Workflow | null;
|
|
10
|
+
readonly resource: Agent | McpServer | Workflow | Datastore | null;
|
|
10
11
|
}
|
|
11
12
|
/** Return value of {@link useExportResource}. */
|
|
12
13
|
export interface UseExportResourceReturn {
|
|
@@ -24,16 +25,19 @@ export interface UseExportResourceReturn {
|
|
|
24
25
|
readonly json: string | null;
|
|
25
26
|
}
|
|
26
27
|
/**
|
|
27
|
-
* Headless export hook for Stigmer resources (Agent, McpServer
|
|
28
|
+
* Headless export hook for Stigmer resources (Agent, McpServer,
|
|
29
|
+
* Workflow, Datastore).
|
|
28
30
|
*
|
|
29
31
|
* Serializes the resource into YAML and JSON formats and provides
|
|
30
32
|
* stable callbacks for copying to clipboard or triggering a file
|
|
31
33
|
* download. All operations are client-side — no additional API calls.
|
|
32
34
|
*
|
|
33
|
-
*
|
|
34
|
-
* (
|
|
35
|
-
*
|
|
36
|
-
*
|
|
35
|
+
* Non-workflow kinds serialize through the SDK manifest engine
|
|
36
|
+
* ({@link serializeManifest}) — the canonical Stigmer resource format
|
|
37
|
+
* (`apiVersion`, `kind`, `metadata`, `spec`, snake_case fields) that
|
|
38
|
+
* round-trips through `parseManifest` and `stigmer apply -f`. Workflows
|
|
39
|
+
* use their own canonical serializer, shared with the workflow Editor
|
|
40
|
+
* tab, so one workflow has exactly one YAML shape across the product.
|
|
37
41
|
*
|
|
38
42
|
* @param options - Resource kind and the proto resource object.
|
|
39
43
|
* @returns Stable callbacks and memoized serialized strings.
|
|
@@ -50,8 +54,8 @@ export interface UseExportResourceReturn {
|
|
|
50
54
|
* <ActionMenu.Item onSelect={downloadYaml}>Download YAML</ActionMenu.Item>
|
|
51
55
|
* ```
|
|
52
56
|
*
|
|
53
|
-
* @see {@link
|
|
54
|
-
* @see {@link
|
|
57
|
+
* @see {@link serializeManifest} for the underlying Agent/McpServer serializer
|
|
58
|
+
* @see {@link serializeWorkflowYaml} for the workflow-canonical serializer
|
|
55
59
|
*/
|
|
56
60
|
export declare function useExportResource({ kind, resource, }: UseExportResourceOptions): UseExportResourceReturn;
|
|
57
61
|
//# sourceMappingURL=useExportResource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExportResource.d.ts","sourceRoot":"","sources":["../../src/library/useExportResource.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oDAAoD,CAAC;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wDAAwD,CAAC;AACxF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uDAAuD,CAAC;AAStF,6CAA6C;AAC7C,MAAM,WAAW,wBAAwB;IACvC,+DAA+D;IAC/D,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,WAAW,GAAG,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"useExportResource.d.ts","sourceRoot":"","sources":["../../src/library/useExportResource.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oDAAoD,CAAC;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wDAAwD,CAAC;AACxF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wDAAwD,CAAC;AACxF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uDAAuD,CAAC;AAStF,6CAA6C;AAC7C,MAAM,WAAW,wBAAwB;IACvC,+DAA+D;IAC/D,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,WAAW,GAAG,UAAU,GAAG,WAAW,CAAC;IAChE,mEAAmE;IACnE,QAAQ,CAAC,QAAQ,EAAE,KAAK,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,IAAI,CAAC;CACpE;AAED,iDAAiD;AACjD,MAAM,WAAW,uBAAuB;IACtC,wEAAwE;IACxE,QAAQ,CAAC,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,wEAAwE;IACxE,QAAQ,CAAC,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,+CAA+C;IAC/C,QAAQ,CAAC,YAAY,EAAE,MAAM,IAAI,CAAC;IAClC,+CAA+C;IAC/C,QAAQ,CAAC,YAAY,EAAE,MAAM,IAAI,CAAC;IAClC,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,QAAQ,GACT,EAAE,wBAAwB,GAAG,uBAAuB,CA8CpD"}
|
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useCallback, useMemo } from "react";
|
|
3
3
|
import { parse as parseYaml } from "yaml";
|
|
4
|
+
import { serializeManifest } from "@stigmer/sdk";
|
|
4
5
|
import { toast } from "../feedback/toast.js";
|
|
5
|
-
import { serializeAgentYaml, serializeMcpServerYaml } from "./serialize-resource-yaml.js";
|
|
6
6
|
import { serializeWorkflowYaml } from "../workflow/serialize-workflow-yaml.js";
|
|
7
7
|
// ---------------------------------------------------------------------------
|
|
8
8
|
// Hook
|
|
9
9
|
// ---------------------------------------------------------------------------
|
|
10
10
|
/**
|
|
11
|
-
* Headless export hook for Stigmer resources (Agent, McpServer
|
|
11
|
+
* Headless export hook for Stigmer resources (Agent, McpServer,
|
|
12
|
+
* Workflow, Datastore).
|
|
12
13
|
*
|
|
13
14
|
* Serializes the resource into YAML and JSON formats and provides
|
|
14
15
|
* stable callbacks for copying to clipboard or triggering a file
|
|
15
16
|
* download. All operations are client-side — no additional API calls.
|
|
16
17
|
*
|
|
17
|
-
*
|
|
18
|
-
* (
|
|
19
|
-
*
|
|
20
|
-
*
|
|
18
|
+
* Non-workflow kinds serialize through the SDK manifest engine
|
|
19
|
+
* ({@link serializeManifest}) — the canonical Stigmer resource format
|
|
20
|
+
* (`apiVersion`, `kind`, `metadata`, `spec`, snake_case fields) that
|
|
21
|
+
* round-trips through `parseManifest` and `stigmer apply -f`. Workflows
|
|
22
|
+
* use their own canonical serializer, shared with the workflow Editor
|
|
23
|
+
* tab, so one workflow has exactly one YAML shape across the product.
|
|
21
24
|
*
|
|
22
25
|
* @param options - Resource kind and the proto resource object.
|
|
23
26
|
* @returns Stable callbacks and memoized serialized strings.
|
|
@@ -34,24 +37,25 @@ import { serializeWorkflowYaml } from "../workflow/serialize-workflow-yaml.js";
|
|
|
34
37
|
* <ActionMenu.Item onSelect={downloadYaml}>Download YAML</ActionMenu.Item>
|
|
35
38
|
* ```
|
|
36
39
|
*
|
|
37
|
-
* @see {@link
|
|
38
|
-
* @see {@link
|
|
40
|
+
* @see {@link serializeManifest} for the underlying Agent/McpServer serializer
|
|
41
|
+
* @see {@link serializeWorkflowYaml} for the workflow-canonical serializer
|
|
39
42
|
*/
|
|
40
43
|
export function useExportResource({ kind, resource, }) {
|
|
41
44
|
const yaml = useMemo(() => {
|
|
42
45
|
if (!resource)
|
|
43
46
|
return null;
|
|
44
|
-
if (kind === "Agent")
|
|
45
|
-
return serializeAgentYaml(resource);
|
|
46
47
|
if (kind === "Workflow")
|
|
47
48
|
return serializeWorkflowYaml(resource);
|
|
48
|
-
return
|
|
49
|
+
return serializeManifest(resource);
|
|
49
50
|
}, [kind, resource]);
|
|
50
51
|
const json = useMemo(() => {
|
|
51
|
-
if (!
|
|
52
|
+
if (!yaml)
|
|
52
53
|
return null;
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
// Parse the YAML output to re-stringify as JSON — this guarantees the
|
|
55
|
+
// JSON structure is identical to the YAML structure (snake_case
|
|
56
|
+
// fields, no status).
|
|
57
|
+
return JSON.stringify(parseYaml(yaml), null, 2);
|
|
58
|
+
}, [yaml]);
|
|
55
59
|
const slug = useMemo(() => {
|
|
56
60
|
if (!resource)
|
|
57
61
|
return "resource";
|
|
@@ -82,28 +86,6 @@ export function useExportResource({ kind, resource, }) {
|
|
|
82
86
|
return useMemo(() => ({ copyYaml, copyJson, downloadYaml, downloadJson, yaml, json }), [copyYaml, copyJson, downloadYaml, downloadJson, yaml, json]);
|
|
83
87
|
}
|
|
84
88
|
// ---------------------------------------------------------------------------
|
|
85
|
-
// JSON serialization
|
|
86
|
-
// ---------------------------------------------------------------------------
|
|
87
|
-
/**
|
|
88
|
-
* Produces a JSON representation of the resource using the same canonical
|
|
89
|
-
* structure as the YAML export (apiVersion, kind, metadata, spec).
|
|
90
|
-
*
|
|
91
|
-
* Internally parses the YAML output to get a clean plain object, then
|
|
92
|
-
* re-stringifies as JSON. This guarantees the JSON structure is identical
|
|
93
|
-
* to the YAML structure (snake_case fields, no status).
|
|
94
|
-
*/
|
|
95
|
-
function serializeResourceJson(resource, kind) {
|
|
96
|
-
let yamlStr;
|
|
97
|
-
if (kind === "Agent")
|
|
98
|
-
yamlStr = serializeAgentYaml(resource);
|
|
99
|
-
else if (kind === "Workflow")
|
|
100
|
-
yamlStr = serializeWorkflowYaml(resource);
|
|
101
|
-
else
|
|
102
|
-
yamlStr = serializeMcpServerYaml(resource);
|
|
103
|
-
const doc = parseYaml(yamlStr);
|
|
104
|
-
return JSON.stringify(doc, null, 2);
|
|
105
|
-
}
|
|
106
|
-
// ---------------------------------------------------------------------------
|
|
107
89
|
// Clipboard
|
|
108
90
|
// ---------------------------------------------------------------------------
|
|
109
91
|
async function copyToClipboard(text) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExportResource.js","sourceRoot":"","sources":["../../src/library/useExportResource.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"useExportResource.js","sourceRoot":"","sources":["../../src/library/useExportResource.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAK1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AA8B/E,8EAA8E;AAC9E,OAAO;AACP,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAChC,IAAI,EACJ,QAAQ,GACiB;IACzB,MAAM,IAAI,GAAG,OAAO,CAAgB,GAAG,EAAE;QACvC,IAAI,CAAC,QAAQ;YAAE,OAAO,IAAI,CAAC;QAC3B,IAAI,IAAI,KAAK,UAAU;YAAE,OAAO,qBAAqB,CAAC,QAAoB,CAAC,CAAC;QAC5E,OAAO,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;IAErB,MAAM,IAAI,GAAG,OAAO,CAAgB,GAAG,EAAE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AAgB;IACvE,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE,GAAG,QAAQ,iBAAiB,EAAE,CAAC,CAAC;IACzE,MAAM,GAAG,GAAG,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IACtC,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IACzC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IAChB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACzB,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAChC,IAAI,CAAC,KAAK,EAAE,CAAC;IACb,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAChC,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type ManifestPreviewEntry } from "./useApplyManifest.js";
|
|
2
|
+
/** Props for {@link ApplyManifestDialog}. */
|
|
3
|
+
export interface ApplyManifestDialogProps {
|
|
4
|
+
/** Whether the dialog is open. */
|
|
5
|
+
readonly open: boolean;
|
|
6
|
+
/** Called when the dialog should open or close. */
|
|
7
|
+
readonly onOpenChange: (open: boolean) => void;
|
|
8
|
+
/** Target organization slug for documents that omit `metadata.org`. */
|
|
9
|
+
readonly org: string;
|
|
10
|
+
/**
|
|
11
|
+
* Called after every document applied successfully, with the per-document
|
|
12
|
+
* results in apply order. Use for navigation or list refresh.
|
|
13
|
+
*/
|
|
14
|
+
readonly onSuccess?: (entries: readonly ManifestPreviewEntry[]) => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Modal dialog for applying a Stigmer resource manifest — paste YAML or
|
|
18
|
+
* upload a file, review what will change, and apply. The console
|
|
19
|
+
* counterpart of `stigmer apply -f`, for every supported resource kind.
|
|
20
|
+
*
|
|
21
|
+
* Workflow:
|
|
22
|
+
* 1. Paste manifest YAML (or JSON) into the editor, or pick a file
|
|
23
|
+
* 2. Each document is validated against its kind's generated proto schema
|
|
24
|
+
* and previewed with a create-or-update badge resolved from server state
|
|
25
|
+
* 3. Apply runs the documents sequentially in dependency order with live
|
|
26
|
+
* per-document status; a failure stops the run and renders inline
|
|
27
|
+
*
|
|
28
|
+
* Multi-document manifests (`---` separators) are supported. Documents
|
|
29
|
+
* that omit `metadata.org` are applied to the active org; documents naming
|
|
30
|
+
* a different org are honored with a warning (matching `stigmer apply`).
|
|
31
|
+
*
|
|
32
|
+
* Uses the native `<dialog>` element for built-in focus trapping, Escape
|
|
33
|
+
* key handling, and backdrop — consistent with {@link ConfirmDialog}.
|
|
34
|
+
*
|
|
35
|
+
* Zero Console dependencies — safe for platform builder embedding.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* <ApplyManifestDialog
|
|
40
|
+
* open={open}
|
|
41
|
+
* onOpenChange={setOpen}
|
|
42
|
+
* org={activeOrg}
|
|
43
|
+
* onSuccess={() => refetchList()}
|
|
44
|
+
* />
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export declare function ApplyManifestDialog({ open, onOpenChange, org, onSuccess, }: ApplyManifestDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
//# sourceMappingURL=ApplyManifestDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApplyManifestDialog.d.ts","sourceRoot":"","sources":["../../src/manifest/ApplyManifestDialog.tsx"],"names":[],"mappings":"AAMA,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,uBAAuB,CAAC;AAO/B,6CAA6C;AAC7C,MAAM,WAAW,wBAAwB;IACvC,kCAAkC;IAClC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,mDAAmD;IACnD,QAAQ,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,uEAAuE;IACvE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,SAAS,oBAAoB,EAAE,KAAK,IAAI,CAAC;CACzE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,YAAY,EACZ,GAAG,EACH,SAAS,GACV,EAAE,wBAAwB,2CAqK1B"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { lazy, Suspense, useCallback, useEffect, useRef } from "react";
|
|
4
|
+
import { cn } from "@stigmer/theme";
|
|
5
|
+
import { toast } from "../feedback/toast.js";
|
|
6
|
+
import { RedactedSecretsNotice } from "./RedactedSecretsNotice.js";
|
|
7
|
+
import { useApplyManifest, } from "./useApplyManifest.js";
|
|
8
|
+
// CodeMirror loads only when the dialog actually opens (DD-013).
|
|
9
|
+
const LazyYamlEditor = lazy(() => import("./YamlEditor.js").then((m) => ({ default: m.YamlEditor })));
|
|
10
|
+
/**
|
|
11
|
+
* Modal dialog for applying a Stigmer resource manifest — paste YAML or
|
|
12
|
+
* upload a file, review what will change, and apply. The console
|
|
13
|
+
* counterpart of `stigmer apply -f`, for every supported resource kind.
|
|
14
|
+
*
|
|
15
|
+
* Workflow:
|
|
16
|
+
* 1. Paste manifest YAML (or JSON) into the editor, or pick a file
|
|
17
|
+
* 2. Each document is validated against its kind's generated proto schema
|
|
18
|
+
* and previewed with a create-or-update badge resolved from server state
|
|
19
|
+
* 3. Apply runs the documents sequentially in dependency order with live
|
|
20
|
+
* per-document status; a failure stops the run and renders inline
|
|
21
|
+
*
|
|
22
|
+
* Multi-document manifests (`---` separators) are supported. Documents
|
|
23
|
+
* that omit `metadata.org` are applied to the active org; documents naming
|
|
24
|
+
* a different org are honored with a warning (matching `stigmer apply`).
|
|
25
|
+
*
|
|
26
|
+
* Uses the native `<dialog>` element for built-in focus trapping, Escape
|
|
27
|
+
* key handling, and backdrop — consistent with {@link ConfirmDialog}.
|
|
28
|
+
*
|
|
29
|
+
* Zero Console dependencies — safe for platform builder embedding.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* <ApplyManifestDialog
|
|
34
|
+
* open={open}
|
|
35
|
+
* onOpenChange={setOpen}
|
|
36
|
+
* org={activeOrg}
|
|
37
|
+
* onSuccess={() => refetchList()}
|
|
38
|
+
* />
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export function ApplyManifestDialog({ open, onOpenChange, org, onSuccess, }) {
|
|
42
|
+
const dialogRef = useRef(null);
|
|
43
|
+
const fileInputRef = useRef(null);
|
|
44
|
+
const manifest = useApplyManifest(org);
|
|
45
|
+
const { reset } = manifest;
|
|
46
|
+
// Sync dialog open state with the native <dialog> element.
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
const dialog = dialogRef.current;
|
|
49
|
+
if (!dialog)
|
|
50
|
+
return;
|
|
51
|
+
if (open && !dialog.open) {
|
|
52
|
+
dialog.showModal();
|
|
53
|
+
}
|
|
54
|
+
else if (!open && dialog.open) {
|
|
55
|
+
dialog.close();
|
|
56
|
+
}
|
|
57
|
+
}, [open]);
|
|
58
|
+
// Start each session clean.
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
if (open) {
|
|
61
|
+
reset();
|
|
62
|
+
if (fileInputRef.current)
|
|
63
|
+
fileInputRef.current.value = "";
|
|
64
|
+
}
|
|
65
|
+
}, [open, reset]);
|
|
66
|
+
const handleCancel = useCallback((e) => {
|
|
67
|
+
e.preventDefault();
|
|
68
|
+
onOpenChange(false);
|
|
69
|
+
}, [onOpenChange]);
|
|
70
|
+
const handleFileChange = useCallback((e) => {
|
|
71
|
+
const file = e.target.files?.[0];
|
|
72
|
+
if (file)
|
|
73
|
+
manifest.readFile(file);
|
|
74
|
+
}, [manifest]);
|
|
75
|
+
const handleApply = useCallback(async () => {
|
|
76
|
+
const allApplied = await manifest.applyAll();
|
|
77
|
+
if (allApplied && manifest.entries) {
|
|
78
|
+
const count = manifest.entries.length;
|
|
79
|
+
toast.success(count === 1 ? "Resource applied" : `${count} resources applied`);
|
|
80
|
+
onOpenChange(false);
|
|
81
|
+
onSuccess?.(manifest.entries);
|
|
82
|
+
}
|
|
83
|
+
// On failure the dialog stays open — per-entry status shows what
|
|
84
|
+
// applied and what failed.
|
|
85
|
+
}, [manifest, onOpenChange, onSuccess]);
|
|
86
|
+
const canApply = manifest.entries !== null &&
|
|
87
|
+
manifest.entries.length > 0 &&
|
|
88
|
+
!manifest.isValidating &&
|
|
89
|
+
!manifest.isApplying;
|
|
90
|
+
return (_jsx("dialog", { ref: dialogRef, onCancel: handleCancel, className: cn("fixed inset-0 z-50 m-auto w-full max-w-3xl rounded-lg border border-border bg-popover p-0 text-popover-foreground shadow-lg", "backdrop:bg-black/50", "open:animate-in open:fade-in-0 open:zoom-in-95"), children: _jsxs("div", { className: "flex flex-col gap-4 p-6", children: [_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("h3", { className: "text-base font-semibold text-foreground", children: "Apply YAML" }), _jsx("p", { className: "text-sm text-muted-foreground", children: "Paste a resource manifest or upload a file. Resources are created when new and updated when they already exist." })] }), _jsx("input", { ref: fileInputRef, type: "file", accept: ".yaml,.yml,.json", onChange: handleFileChange, className: cn("w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground", "file:mr-3 file:rounded-md file:border-0 file:bg-primary file:px-2.5 file:py-1 file:text-xs file:font-medium file:text-primary-foreground", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"), "aria-label": "Select manifest file" }), _jsx(Suspense, { fallback: _jsx(EditorLoading, {}), children: _jsx(LazyYamlEditor, { value: manifest.content, onChange: manifest.setContent, className: "h-56" }) }), manifest.hasRedactedSecrets && _jsx(RedactedSecretsNotice, {}), manifest.validationError && (_jsx("div", { role: "alert", className: "rounded-md border border-destructive bg-card px-3 py-2.5 text-sm text-destructive", children: manifest.validationError })), manifest.entries && manifest.entries.length > 0 && (_jsx("ul", { className: "flex max-h-48 flex-col gap-2 overflow-y-auto", "aria-label": "Resources to apply", children: manifest.entries.map((entry, index) => (_jsx(PreviewRow, { entry: entry }, `${entry.document.handler.yamlKind}/${entry.document.org}/${entry.document.slug}/${index}`))) })), _jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("p", { className: "text-xs text-muted-foreground", "aria-live": "polite", children: manifest.isValidating ? "Validating…" : "" }), _jsxs("div", { className: "flex gap-2", children: [_jsx("button", { type: "button", onClick: () => onOpenChange(false), disabled: manifest.isApplying, className: cn("rounded-md px-3 py-1.5 text-sm font-medium transition-colors", "border border-input bg-background text-foreground", "hover:bg-accent hover:text-accent-foreground", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "disabled:pointer-events-none disabled:opacity-50"), children: "Cancel" }), _jsx("button", { type: "button", onClick: handleApply, disabled: !canApply, className: cn("rounded-md px-3 py-1.5 text-sm font-medium transition-colors", "bg-primary text-primary-foreground hover:bg-primary-hover", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "disabled:pointer-events-none disabled:opacity-50"), children: manifest.isApplying
|
|
91
|
+
? "Applying…"
|
|
92
|
+
: applyLabel(manifest.entries?.length ?? 0) })] })] })] }) }));
|
|
93
|
+
}
|
|
94
|
+
function applyLabel(count) {
|
|
95
|
+
if (count <= 1)
|
|
96
|
+
return "Apply";
|
|
97
|
+
return `Apply ${count} resources`;
|
|
98
|
+
}
|
|
99
|
+
function EditorLoading() {
|
|
100
|
+
return (_jsx("div", { className: "flex h-56 items-center justify-center rounded-md border border-border bg-muted text-sm text-muted-foreground", children: "Loading editor\u2026" }));
|
|
101
|
+
}
|
|
102
|
+
// ---------------------------------------------------------------------------
|
|
103
|
+
// Per-document preview row
|
|
104
|
+
// ---------------------------------------------------------------------------
|
|
105
|
+
function PreviewRow({ entry }) {
|
|
106
|
+
return (_jsxs("li", { className: "rounded-md border border-border bg-card px-3 py-2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "inline-flex rounded bg-muted px-1.5 py-0.5 text-xs font-medium text-muted-foreground", children: entry.document.handler.displayName }), _jsx("span", { className: "text-sm font-medium text-foreground", children: entry.document.name }), _jsx(ActionBadge, { entry: entry }), _jsx("span", { className: "ml-auto text-xs text-muted-foreground", children: entry.document.org })] }), entry.document.warning && (_jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: entry.document.warning })), entry.status === "failed" && entry.errorMessage && (_jsx("p", { role: "alert", className: "mt-1 text-xs text-destructive", children: entry.errorMessage }))] }));
|
|
107
|
+
}
|
|
108
|
+
function ActionBadge({ entry }) {
|
|
109
|
+
const label = badgeLabel(entry);
|
|
110
|
+
return (_jsx("span", { className: cn("inline-flex rounded px-1.5 py-0.5 text-xs font-medium", entry.status === "failed"
|
|
111
|
+
? "bg-card text-destructive border border-destructive"
|
|
112
|
+
: "bg-muted text-muted-foreground"), children: label }));
|
|
113
|
+
}
|
|
114
|
+
function badgeLabel(entry) {
|
|
115
|
+
switch (entry.status) {
|
|
116
|
+
case "applying":
|
|
117
|
+
return "Applying…";
|
|
118
|
+
case "applied":
|
|
119
|
+
return "Applied";
|
|
120
|
+
case "failed":
|
|
121
|
+
return "Failed";
|
|
122
|
+
case "skipped":
|
|
123
|
+
return "Skipped";
|
|
124
|
+
case "pending":
|
|
125
|
+
switch (entry.action) {
|
|
126
|
+
case "create":
|
|
127
|
+
return "Will create";
|
|
128
|
+
case "update":
|
|
129
|
+
return "Will update";
|
|
130
|
+
case "unknown":
|
|
131
|
+
return "Create or update";
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=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