@stigmer/react 3.2.3 → 3.3.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/BaselineEditor.d.ts +9 -0
- package/billing/BaselineEditor.d.ts.map +1 -0
- package/billing/BaselineEditor.js +253 -0
- package/billing/BaselineEditor.js.map +1 -0
- package/billing/ModelCatalogPanel.d.ts +28 -0
- package/billing/ModelCatalogPanel.d.ts.map +1 -0
- package/billing/ModelCatalogPanel.js +102 -0
- package/billing/ModelCatalogPanel.js.map +1 -0
- package/billing/ModelGovernanceDetail.d.ts +8 -0
- package/billing/ModelGovernanceDetail.d.ts.map +1 -0
- package/billing/ModelGovernanceDetail.js +64 -0
- package/billing/ModelGovernanceDetail.js.map +1 -0
- package/billing/OperatorAccessNotice.d.ts +12 -0
- package/billing/OperatorAccessNotice.d.ts.map +1 -0
- package/billing/OperatorAccessNotice.js +15 -0
- package/billing/OperatorAccessNotice.js.map +1 -0
- package/billing/PricingGovernanceConsole.d.ts +57 -0
- package/billing/PricingGovernanceConsole.d.ts.map +1 -0
- package/billing/PricingGovernanceConsole.js +164 -0
- package/billing/PricingGovernanceConsole.js.map +1 -0
- package/billing/PricingGovernancePanel.d.ts +26 -0
- package/billing/PricingGovernancePanel.d.ts.map +1 -0
- package/billing/PricingGovernancePanel.js +64 -0
- package/billing/PricingGovernancePanel.js.map +1 -0
- package/billing/RetireConfirm.d.ts +9 -0
- package/billing/RetireConfirm.d.ts.map +1 -0
- package/billing/RetireConfirm.js +19 -0
- package/billing/RetireConfirm.js.map +1 -0
- package/billing/form-primitives.d.ts +18 -0
- package/billing/form-primitives.d.ts.map +1 -0
- package/billing/form-primitives.js +19 -0
- package/billing/form-primitives.js.map +1 -0
- package/billing/governance-primitives.d.ts +33 -0
- package/billing/governance-primitives.d.ts.map +1 -0
- package/billing/governance-primitives.js +43 -0
- package/billing/governance-primitives.js.map +1 -0
- package/billing/index.d.ts +18 -0
- package/billing/index.d.ts.map +1 -1
- package/billing/index.js +9 -0
- package/billing/index.js.map +1 -1
- package/billing/pricing-format.d.ts +12 -0
- package/billing/pricing-format.d.ts.map +1 -0
- package/billing/pricing-format.js +50 -0
- package/billing/pricing-format.js.map +1 -0
- package/billing/useDecidePricingOverride.d.ts +46 -0
- package/billing/useDecidePricingOverride.d.ts.map +1 -0
- package/billing/useDecidePricingOverride.js +44 -0
- package/billing/useDecidePricingOverride.js.map +1 -0
- package/billing/useModelGovernanceView.d.ts +103 -0
- package/billing/useModelGovernanceView.d.ts.map +1 -0
- package/billing/useModelGovernanceView.js +144 -0
- package/billing/useModelGovernanceView.js.map +1 -0
- package/billing/useModelPricingBaselines.d.ts +40 -0
- package/billing/useModelPricingBaselines.d.ts.map +1 -0
- package/billing/useModelPricingBaselines.js +32 -0
- package/billing/useModelPricingBaselines.js.map +1 -0
- package/billing/usePricingGovernance.d.ts +39 -0
- package/billing/usePricingGovernance.d.ts.map +1 -0
- package/billing/usePricingGovernance.js +31 -0
- package/billing/usePricingGovernance.js.map +1 -0
- package/billing/useRetireModelPricingBaseline.d.ts +31 -0
- package/billing/useRetireModelPricingBaseline.d.ts.map +1 -0
- package/billing/useRetireModelPricingBaseline.js +36 -0
- package/billing/useRetireModelPricingBaseline.js.map +1 -0
- package/billing/useUpsertModelPricingBaseline.d.ts +38 -0
- package/billing/useUpsertModelPricingBaseline.d.ts.map +1 -0
- package/billing/useUpsertModelPricingBaseline.js +37 -0
- package/billing/useUpsertModelPricingBaseline.js.map +1 -0
- 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 +28 -0
- package/cursor-accounts/CursorAccountEditor.d.ts.map +1 -0
- package/cursor-accounts/CursorAccountEditor.js +51 -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 +28 -0
- package/cursor-accounts/CursorAccountsConsole.d.ts.map +1 -0
- package/cursor-accounts/CursorAccountsConsole.js +275 -0
- package/cursor-accounts/CursorAccountsConsole.js.map +1 -0
- package/cursor-accounts/cursor-account-format.d.ts +10 -0
- package/cursor-accounts/cursor-account-format.d.ts.map +1 -0
- package/cursor-accounts/cursor-account-format.js +26 -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 +209 -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 +30 -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 +54 -0
- package/datastore/recordFilter.d.ts.map +1 -0
- package/datastore/recordFilter.js +93 -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/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 -6
- package/index.d.ts.map +1 -1
- package/index.js +14 -3
- package/index.js.map +1 -1
- 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/resource-creation/templates/workflow-templates.js +4 -4
- package/session/useEditSessionPrep.js +3 -3
- package/session/useEditSessionPrep.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/BaselineEditor.tsx +619 -0
- package/src/billing/ModelCatalogPanel.tsx +283 -0
- package/src/billing/ModelGovernanceDetail.tsx +289 -0
- package/src/billing/OperatorAccessNotice.tsx +32 -0
- package/src/billing/PricingGovernanceConsole.tsx +465 -0
- package/src/billing/PricingGovernancePanel.tsx +166 -0
- package/src/billing/RetireConfirm.tsx +82 -0
- package/src/billing/__tests__/ModelCatalogPanel.test.tsx +253 -0
- package/src/billing/__tests__/PricingGovernanceConsole.test.tsx +410 -0
- package/src/billing/__tests__/useModelGovernanceView.test.tsx +308 -0
- package/src/billing/form-primitives.tsx +68 -0
- package/src/billing/governance-primitives.tsx +133 -0
- package/src/billing/index.ts +37 -0
- package/src/billing/pricing-format.ts +53 -0
- package/src/billing/useDecidePricingOverride.ts +78 -0
- package/src/billing/useModelGovernanceView.ts +290 -0
- package/src/billing/useModelPricingBaselines.ts +69 -0
- package/src/billing/usePricingGovernance.ts +57 -0
- package/src/billing/useRetireModelPricingBaseline.ts +65 -0
- package/src/billing/useUpsertModelPricingBaseline.ts +72 -0
- package/src/channel/AgentChannelsPanel.tsx +27 -1
- package/src/composer/SessionComposer.tsx +1 -1
- package/src/cursor-accounts/CursorAccountEditor.tsx +181 -0
- package/src/cursor-accounts/CursorAccountsAccessNotice.tsx +36 -0
- package/src/cursor-accounts/CursorAccountsConsole.tsx +810 -0
- package/src/cursor-accounts/__tests__/CursorAccountsConsole.test.tsx +384 -0
- package/src/cursor-accounts/cursor-account-format.ts +29 -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 +544 -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 +411 -0
- package/src/datastore/RecordFormPanel.tsx +432 -0
- package/src/datastore/__tests__/CollectionRecordsBrowser.test.tsx +207 -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 +141 -0
- package/src/datastore/__tests__/RecordFormPanel.test.tsx +227 -0
- package/src/datastore/__tests__/recordFilter.test.ts +156 -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 +140 -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/__tests__/useArtifactInspection.test.tsx +12 -2
- 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 +163 -13
- 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/resource-creation/templates/workflow-templates.ts +4 -4
- package/src/session/useEditSessionPrep.ts +3 -3
- 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
|
@@ -1,407 +0,0 @@
|
|
|
1
|
-
import { parse as parseYaml } from "yaml";
|
|
2
|
-
/**
|
|
3
|
-
* Parses a Stigmer resource YAML string into the corresponding SDK input
|
|
4
|
-
* type for use with `stigmer.agent.apply()` or `stigmer.mcpServer.apply()`.
|
|
5
|
-
*
|
|
6
|
-
* Handles the conversion from proto-style snake_case YAML field names to
|
|
7
|
-
* the camelCase TypeScript SDK input types, including nested structures
|
|
8
|
-
* like `mcp_server_usages`, `sub_agents`, and `env`.
|
|
9
|
-
*
|
|
10
|
-
* The `org` parameter **always overrides** `metadata.org` in the YAML.
|
|
11
|
-
* This matches the UX intent of "Apply to [my-org]" — the user explicitly
|
|
12
|
-
* chooses the target organization.
|
|
13
|
-
*
|
|
14
|
-
* **Throws** with descriptive, user-facing error messages when the YAML
|
|
15
|
-
* is malformed or missing required fields. These messages are designed
|
|
16
|
-
* for display in error UI components.
|
|
17
|
-
*
|
|
18
|
-
* @param content - Raw YAML content string (typically from {@link useArtifactContent}).
|
|
19
|
-
* @param org - Target organization slug. Overrides `metadata.org` in the YAML.
|
|
20
|
-
* @returns A discriminated union with the parsed SDK input.
|
|
21
|
-
* @throws {Error} When the content is not valid YAML, not a recognized
|
|
22
|
-
* Stigmer resource, or is missing required fields.
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```ts
|
|
26
|
-
* import { parseResourceYaml } from "@stigmer/react";
|
|
27
|
-
*
|
|
28
|
-
* const parsed = parseResourceYaml(yamlContent, "my-org");
|
|
29
|
-
* if (parsed.kind === "Agent") {
|
|
30
|
-
* await stigmer.agent.apply(parsed.input);
|
|
31
|
-
* } else {
|
|
32
|
-
* await stigmer.mcpServer.apply(parsed.input);
|
|
33
|
-
* }
|
|
34
|
-
* ```
|
|
35
|
-
*
|
|
36
|
-
* @see {@link useApplyResource} for the React hook that wraps this function
|
|
37
|
-
* @see {@link detectStigmerResource} for lightweight detection without full parsing
|
|
38
|
-
*/
|
|
39
|
-
export function parseResourceYaml(content, org) {
|
|
40
|
-
const doc = parseYamlDocument(content);
|
|
41
|
-
const { kind, metadata, spec } = validateResourceStructure(doc);
|
|
42
|
-
const name = extractRequiredString(metadata, "name", "metadata.name");
|
|
43
|
-
const slug = extractOptionalString(metadata, "slug");
|
|
44
|
-
const labels = extractOptionalStringRecord(metadata, "labels");
|
|
45
|
-
switch (kind) {
|
|
46
|
-
case "Agent":
|
|
47
|
-
return {
|
|
48
|
-
kind: "Agent",
|
|
49
|
-
input: buildAgentInput(name, slug, org, labels, spec),
|
|
50
|
-
};
|
|
51
|
-
case "McpServer":
|
|
52
|
-
return {
|
|
53
|
-
kind: "McpServer",
|
|
54
|
-
input: buildMcpServerInput(name, slug, org, labels, spec),
|
|
55
|
-
};
|
|
56
|
-
default:
|
|
57
|
-
throw new Error(`Unsupported resource kind: "${kind}". ` +
|
|
58
|
-
"Only Agent and McpServer can be applied from artifacts.");
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
// ---------------------------------------------------------------------------
|
|
62
|
-
// YAML parsing
|
|
63
|
-
// ---------------------------------------------------------------------------
|
|
64
|
-
function parseYamlDocument(content) {
|
|
65
|
-
let parsed;
|
|
66
|
-
try {
|
|
67
|
-
parsed = parseYaml(content);
|
|
68
|
-
}
|
|
69
|
-
catch {
|
|
70
|
-
throw new Error("Failed to parse artifact content as YAML.");
|
|
71
|
-
}
|
|
72
|
-
if (!isPlainObject(parsed)) {
|
|
73
|
-
throw new Error("Failed to parse artifact content as YAML: expected a mapping document.");
|
|
74
|
-
}
|
|
75
|
-
return parsed;
|
|
76
|
-
}
|
|
77
|
-
const STIGMER_API_VERSION_PATTERN = /^[a-z]+\.stigmer\.ai\/v\d+$/;
|
|
78
|
-
const APPLICABLE_KINDS = new Set([
|
|
79
|
-
"Agent",
|
|
80
|
-
"McpServer",
|
|
81
|
-
]);
|
|
82
|
-
function validateResourceStructure(doc) {
|
|
83
|
-
const apiVersion = doc.apiVersion ?? doc.api_version;
|
|
84
|
-
if (typeof apiVersion !== "string" ||
|
|
85
|
-
!STIGMER_API_VERSION_PATTERN.test(apiVersion)) {
|
|
86
|
-
throw new Error("Resource YAML is missing required field: apiVersion " +
|
|
87
|
-
"(expected pattern: *.stigmer.ai/v*).");
|
|
88
|
-
}
|
|
89
|
-
const kind = doc.kind;
|
|
90
|
-
if (typeof kind !== "string" || kind.length === 0) {
|
|
91
|
-
throw new Error("Resource YAML is missing required field: kind.");
|
|
92
|
-
}
|
|
93
|
-
if (!APPLICABLE_KINDS.has(kind)) {
|
|
94
|
-
throw new Error(`Unsupported resource kind: "${kind}". ` +
|
|
95
|
-
"Only Agent and McpServer can be applied from artifacts.");
|
|
96
|
-
}
|
|
97
|
-
const metadata = doc.metadata;
|
|
98
|
-
if (!isPlainObject(metadata)) {
|
|
99
|
-
throw new Error("Resource YAML is missing required field: metadata.");
|
|
100
|
-
}
|
|
101
|
-
const spec = doc.spec;
|
|
102
|
-
if (!isPlainObject(spec)) {
|
|
103
|
-
throw new Error("Resource YAML is missing required field: spec.");
|
|
104
|
-
}
|
|
105
|
-
return { kind, metadata, spec };
|
|
106
|
-
}
|
|
107
|
-
// ---------------------------------------------------------------------------
|
|
108
|
-
// Agent conversion
|
|
109
|
-
// ---------------------------------------------------------------------------
|
|
110
|
-
function buildAgentInput(name, slug, org, labels, spec) {
|
|
111
|
-
return {
|
|
112
|
-
name,
|
|
113
|
-
org,
|
|
114
|
-
...(slug !== undefined && { slug }),
|
|
115
|
-
...(labels !== undefined && { labels }),
|
|
116
|
-
...optionalString(spec, "description", "description"),
|
|
117
|
-
...optionalSnakeToCamel(spec, "icon_url", "iconUrl"),
|
|
118
|
-
...optionalString(spec, "instructions", "instructions"),
|
|
119
|
-
...optionalField("mcpServerUsages", extractMcpServerUsages(spec)),
|
|
120
|
-
...optionalField("skillRefs", extractResourceRefs(spec, "skill_refs")),
|
|
121
|
-
...optionalField("subAgents", extractSubAgents(spec)),
|
|
122
|
-
...optionalField("env", extractEnv(spec)),
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
function extractMcpServerUsages(spec) {
|
|
126
|
-
const raw = spec.mcp_server_usages ?? spec.mcpServerUsages;
|
|
127
|
-
if (!Array.isArray(raw) || raw.length === 0)
|
|
128
|
-
return undefined;
|
|
129
|
-
return raw.filter(isPlainObject).map((entry) => {
|
|
130
|
-
const refObj = entry.mcp_server_ref ?? entry.mcpServerRef;
|
|
131
|
-
if (!isPlainObject(refObj)) {
|
|
132
|
-
throw new Error("Agent YAML: each mcp_server_usages entry must have a mcp_server_ref.");
|
|
133
|
-
}
|
|
134
|
-
return {
|
|
135
|
-
mcpServerRef: extractResourceRef(refObj),
|
|
136
|
-
...optionalStringArray(entry, "enabled_tools", "enabledTools"),
|
|
137
|
-
...optionalMappedArray(entry, "tool_approval_overrides", "toolApprovalOverrides", extractToolApprovalOverride),
|
|
138
|
-
};
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
function extractToolApprovalOverride(raw) {
|
|
142
|
-
return {
|
|
143
|
-
...optionalSnakeToCamel(raw, "tool_name", "toolName"),
|
|
144
|
-
...optionalSnakeToCamelBool(raw, "requires_approval", "requiresApproval"),
|
|
145
|
-
...optionalString(raw, "message", "message"),
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
function extractSubAgents(spec) {
|
|
149
|
-
const raw = spec.sub_agents ?? spec.subAgents;
|
|
150
|
-
if (!Array.isArray(raw) || raw.length === 0)
|
|
151
|
-
return undefined;
|
|
152
|
-
return raw.filter(isPlainObject).map((entry) => {
|
|
153
|
-
const entryName = entry.name;
|
|
154
|
-
if (typeof entryName !== "string" || entryName.length === 0) {
|
|
155
|
-
throw new Error("Agent YAML: each sub_agents entry must have a non-empty name.");
|
|
156
|
-
}
|
|
157
|
-
return {
|
|
158
|
-
name: entryName,
|
|
159
|
-
...optionalString(entry, "description", "description"),
|
|
160
|
-
...optionalString(entry, "instructions", "instructions"),
|
|
161
|
-
...optionalSnakeToCamel(entry, "model_override", "modelOverride"),
|
|
162
|
-
...optionalMappedArray(entry, "mcp_access", "mcpAccess", extractMcpAccess),
|
|
163
|
-
...optionalField("skillRefs", extractResourceRefs(entry, "skill_refs")),
|
|
164
|
-
};
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
function extractMcpAccess(raw) {
|
|
168
|
-
const mcpServer = raw.mcp_server ?? raw.mcpServer;
|
|
169
|
-
if (typeof mcpServer !== "string" || mcpServer.length === 0) {
|
|
170
|
-
throw new Error("Agent YAML: each mcp_access entry must have a non-empty mcp_server.");
|
|
171
|
-
}
|
|
172
|
-
return {
|
|
173
|
-
mcpServer,
|
|
174
|
-
...optionalStringArray(raw, "enabled_tools", "enabledTools"),
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
// ---------------------------------------------------------------------------
|
|
178
|
-
// McpServer conversion
|
|
179
|
-
// ---------------------------------------------------------------------------
|
|
180
|
-
function buildMcpServerInput(name, slug, org, labels, spec) {
|
|
181
|
-
const stdio = extractStdioConfig(spec);
|
|
182
|
-
const http = extractHttpConfig(spec);
|
|
183
|
-
if (!stdio && !http) {
|
|
184
|
-
throw new Error("McpServer YAML must specify either spec.stdio or spec.http.");
|
|
185
|
-
}
|
|
186
|
-
return {
|
|
187
|
-
name,
|
|
188
|
-
org,
|
|
189
|
-
...(slug !== undefined && { slug }),
|
|
190
|
-
...(labels !== undefined && { labels }),
|
|
191
|
-
...optionalString(spec, "description", "description"),
|
|
192
|
-
...optionalSnakeToCamel(spec, "icon_url", "iconUrl"),
|
|
193
|
-
...optionalField("stdio", stdio),
|
|
194
|
-
...optionalField("http", http),
|
|
195
|
-
...optionalStringArrayFromSnake(spec, "default_enabled_tools", "defaultEnabledTools"),
|
|
196
|
-
...optionalMappedArray(spec, "pinned_tool_approvals", "pinnedToolApprovals", extractToolApprovalPolicy),
|
|
197
|
-
...optionalField("env", extractEnv(spec)),
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
function extractStdioConfig(spec) {
|
|
201
|
-
const raw = spec.stdio;
|
|
202
|
-
if (!isPlainObject(raw))
|
|
203
|
-
return undefined;
|
|
204
|
-
const command = raw.command;
|
|
205
|
-
if (typeof command !== "string" || command.length === 0) {
|
|
206
|
-
throw new Error("McpServer YAML: spec.stdio must have a non-empty command.");
|
|
207
|
-
}
|
|
208
|
-
return {
|
|
209
|
-
command,
|
|
210
|
-
...optionalStringArray(raw, "args", "args"),
|
|
211
|
-
...optionalSnakeToCamel(raw, "working_dir", "workingDir"),
|
|
212
|
-
};
|
|
213
|
-
}
|
|
214
|
-
function extractHttpConfig(spec) {
|
|
215
|
-
const raw = spec.http;
|
|
216
|
-
if (!isPlainObject(raw))
|
|
217
|
-
return undefined;
|
|
218
|
-
const url = raw.url;
|
|
219
|
-
if (typeof url !== "string" || url.length === 0) {
|
|
220
|
-
throw new Error("McpServer YAML: spec.http must have a non-empty url.");
|
|
221
|
-
}
|
|
222
|
-
return {
|
|
223
|
-
url,
|
|
224
|
-
...optionalStringRecord(raw, "headers", "headers"),
|
|
225
|
-
...optionalStringRecordSnake(raw, "query_params", "queryParams"),
|
|
226
|
-
...optionalSnakeToCamelNumber(raw, "timeout_seconds", "timeoutSeconds"),
|
|
227
|
-
};
|
|
228
|
-
}
|
|
229
|
-
function extractToolApprovalPolicy(raw) {
|
|
230
|
-
return {
|
|
231
|
-
...optionalSnakeToCamel(raw, "tool_name", "toolName"),
|
|
232
|
-
...optionalString(raw, "message", "message"),
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
// ---------------------------------------------------------------------------
|
|
236
|
-
// Shared extractors
|
|
237
|
-
// ---------------------------------------------------------------------------
|
|
238
|
-
function extractEnv(spec) {
|
|
239
|
-
// Support both new flat `env` and legacy nested `env_spec.data` / `envSpec.data`.
|
|
240
|
-
let envMap;
|
|
241
|
-
const envRaw = spec.env;
|
|
242
|
-
if (isPlainObject(envRaw)) {
|
|
243
|
-
envMap = envRaw;
|
|
244
|
-
}
|
|
245
|
-
else {
|
|
246
|
-
const envSpecRaw = spec.env_spec ?? spec.envSpec;
|
|
247
|
-
if (isPlainObject(envSpecRaw)) {
|
|
248
|
-
const data = envSpecRaw.data ?? envSpecRaw.variables;
|
|
249
|
-
if (isPlainObject(data)) {
|
|
250
|
-
envMap = data;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
if (!envMap)
|
|
255
|
-
return undefined;
|
|
256
|
-
const result = {};
|
|
257
|
-
let hasEntries = false;
|
|
258
|
-
for (const [key, val] of Object.entries(envMap)) {
|
|
259
|
-
if (!isPlainObject(val))
|
|
260
|
-
continue;
|
|
261
|
-
const isSecret = val.is_secret ?? val.isSecret;
|
|
262
|
-
const description = val.description;
|
|
263
|
-
const optional = val.optional;
|
|
264
|
-
result[key] = {
|
|
265
|
-
...(typeof isSecret === "boolean" && { isSecret }),
|
|
266
|
-
...(typeof description === "string" && { description }),
|
|
267
|
-
...(typeof optional === "boolean" && { optional }),
|
|
268
|
-
};
|
|
269
|
-
hasEntries = true;
|
|
270
|
-
}
|
|
271
|
-
return hasEntries ? result : undefined;
|
|
272
|
-
}
|
|
273
|
-
function extractResourceRef(raw) {
|
|
274
|
-
const org = raw.org;
|
|
275
|
-
const slug = raw.slug;
|
|
276
|
-
if (typeof org !== "string" || org.length === 0) {
|
|
277
|
-
throw new Error("Resource reference must have a non-empty org.");
|
|
278
|
-
}
|
|
279
|
-
if (typeof slug !== "string" || slug.length === 0) {
|
|
280
|
-
throw new Error("Resource reference must have a non-empty slug.");
|
|
281
|
-
}
|
|
282
|
-
return {
|
|
283
|
-
org,
|
|
284
|
-
slug,
|
|
285
|
-
...(typeof raw.version === "string" &&
|
|
286
|
-
raw.version.length > 0 && { version: raw.version }),
|
|
287
|
-
...(typeof raw.kind === "number" && { kind: raw.kind }),
|
|
288
|
-
};
|
|
289
|
-
}
|
|
290
|
-
function extractResourceRefs(container, snakeKey) {
|
|
291
|
-
const camelKey = snakeToCamel(snakeKey);
|
|
292
|
-
const raw = container[snakeKey] ?? container[camelKey];
|
|
293
|
-
if (!Array.isArray(raw) || raw.length === 0)
|
|
294
|
-
return undefined;
|
|
295
|
-
return raw.filter(isPlainObject).map(extractResourceRef);
|
|
296
|
-
}
|
|
297
|
-
// ---------------------------------------------------------------------------
|
|
298
|
-
// Field extraction helpers — return spreadable partials
|
|
299
|
-
// ---------------------------------------------------------------------------
|
|
300
|
-
function optionalField(key, value) {
|
|
301
|
-
if (value === undefined)
|
|
302
|
-
return undefined;
|
|
303
|
-
return { [key]: value };
|
|
304
|
-
}
|
|
305
|
-
function optionalString(obj, sourceKey, targetKey) {
|
|
306
|
-
const val = obj[sourceKey];
|
|
307
|
-
if (typeof val !== "string")
|
|
308
|
-
return undefined;
|
|
309
|
-
return { [targetKey]: val };
|
|
310
|
-
}
|
|
311
|
-
function optionalSnakeToCamel(obj, snakeKey, camelKey) {
|
|
312
|
-
const val = obj[snakeKey] ?? obj[camelKey];
|
|
313
|
-
if (typeof val !== "string")
|
|
314
|
-
return undefined;
|
|
315
|
-
return { [camelKey]: val };
|
|
316
|
-
}
|
|
317
|
-
function optionalSnakeToCamelBool(obj, snakeKey, camelKey) {
|
|
318
|
-
const val = obj[snakeKey] ?? obj[camelKey];
|
|
319
|
-
if (typeof val !== "boolean")
|
|
320
|
-
return undefined;
|
|
321
|
-
return { [camelKey]: val };
|
|
322
|
-
}
|
|
323
|
-
function optionalSnakeToCamelNumber(obj, snakeKey, camelKey) {
|
|
324
|
-
const val = obj[snakeKey] ?? obj[camelKey];
|
|
325
|
-
if (typeof val !== "number" || !Number.isFinite(val))
|
|
326
|
-
return undefined;
|
|
327
|
-
return { [camelKey]: val };
|
|
328
|
-
}
|
|
329
|
-
function optionalStringArray(obj, sourceKey, targetKey) {
|
|
330
|
-
const val = obj[sourceKey] ?? obj[targetKey];
|
|
331
|
-
if (!Array.isArray(val))
|
|
332
|
-
return undefined;
|
|
333
|
-
const filtered = val.filter((v) => typeof v === "string");
|
|
334
|
-
if (filtered.length === 0)
|
|
335
|
-
return undefined;
|
|
336
|
-
return { [targetKey]: filtered };
|
|
337
|
-
}
|
|
338
|
-
function optionalStringArrayFromSnake(obj, snakeKey, camelKey) {
|
|
339
|
-
const val = obj[snakeKey] ?? obj[camelKey];
|
|
340
|
-
if (!Array.isArray(val))
|
|
341
|
-
return undefined;
|
|
342
|
-
const filtered = val.filter((v) => typeof v === "string");
|
|
343
|
-
if (filtered.length === 0)
|
|
344
|
-
return undefined;
|
|
345
|
-
return { [camelKey]: filtered };
|
|
346
|
-
}
|
|
347
|
-
function optionalStringRecord(obj, sourceKey, targetKey) {
|
|
348
|
-
const val = obj[sourceKey];
|
|
349
|
-
if (!isPlainObject(val))
|
|
350
|
-
return undefined;
|
|
351
|
-
return { [targetKey]: toStringRecord(val) };
|
|
352
|
-
}
|
|
353
|
-
function optionalStringRecordSnake(obj, snakeKey, camelKey) {
|
|
354
|
-
const val = obj[snakeKey] ?? obj[camelKey];
|
|
355
|
-
if (!isPlainObject(val))
|
|
356
|
-
return undefined;
|
|
357
|
-
return { [camelKey]: toStringRecord(val) };
|
|
358
|
-
}
|
|
359
|
-
function optionalMappedArray(obj, snakeKey, camelKey, mapper) {
|
|
360
|
-
const raw = obj[snakeKey] ?? obj[camelKey];
|
|
361
|
-
if (!Array.isArray(raw) || raw.length === 0)
|
|
362
|
-
return undefined;
|
|
363
|
-
const mapped = raw.filter(isPlainObject).map(mapper);
|
|
364
|
-
if (mapped.length === 0)
|
|
365
|
-
return undefined;
|
|
366
|
-
return { [camelKey]: mapped };
|
|
367
|
-
}
|
|
368
|
-
// ---------------------------------------------------------------------------
|
|
369
|
-
// Primitive helpers
|
|
370
|
-
// ---------------------------------------------------------------------------
|
|
371
|
-
function extractRequiredString(obj, key, displayPath) {
|
|
372
|
-
const val = obj[key];
|
|
373
|
-
if (typeof val !== "string" || val.length === 0) {
|
|
374
|
-
throw new Error(`Resource YAML is missing required field: ${displayPath}.`);
|
|
375
|
-
}
|
|
376
|
-
return val;
|
|
377
|
-
}
|
|
378
|
-
function extractOptionalString(obj, key) {
|
|
379
|
-
const val = obj[key];
|
|
380
|
-
return typeof val === "string" && val.length > 0 ? val : undefined;
|
|
381
|
-
}
|
|
382
|
-
function extractOptionalStringRecord(obj, key) {
|
|
383
|
-
const val = obj[key];
|
|
384
|
-
if (!isPlainObject(val))
|
|
385
|
-
return undefined;
|
|
386
|
-
return toStringRecord(val);
|
|
387
|
-
}
|
|
388
|
-
// ---------------------------------------------------------------------------
|
|
389
|
-
// Utilities
|
|
390
|
-
// ---------------------------------------------------------------------------
|
|
391
|
-
function isPlainObject(value) {
|
|
392
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
393
|
-
}
|
|
394
|
-
function toStringRecord(obj) {
|
|
395
|
-
const result = {};
|
|
396
|
-
for (const [k, v] of Object.entries(obj)) {
|
|
397
|
-
if (typeof v === "string")
|
|
398
|
-
result[k] = v;
|
|
399
|
-
else if (v !== null && v !== undefined)
|
|
400
|
-
result[k] = String(v);
|
|
401
|
-
}
|
|
402
|
-
return result;
|
|
403
|
-
}
|
|
404
|
-
function snakeToCamel(key) {
|
|
405
|
-
return key.replace(/_([a-z])/g, (_, c) => c.toUpperCase());
|
|
406
|
-
}
|
|
407
|
-
//# sourceMappingURL=parse-resource-yaml.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"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S,CAAC;IAC1C,OAAO,cAAc,CAAC,GAAG,CAAC,CAAC;AAC7B,CAAC;AAED,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,cAAc,CAAC,GAA4B;IAClD,MAAM,MAAM,GAA2B,EAAE,CAAC;IAC1C,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACzC,IAAI,OAAO,CAAC,KAAK,QAAQ;YAAE,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;aACpC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,SAAS;YAAE,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,YAAY,CAAC,GAAW;IAC/B,OAAO,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AACrE,CAAC"}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import type { AgentInput, McpServerInput } from "@stigmer/sdk";
|
|
2
|
-
import type { Agent } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/api_pb";
|
|
3
|
-
import type { McpServer } from "@stigmer/protos/ai/stigmer/agentic/mcpserver/v1/api_pb";
|
|
4
|
-
/**
|
|
5
|
-
* Serializes a proto `Agent` into the canonical Stigmer YAML format.
|
|
6
|
-
*
|
|
7
|
-
* This is the inverse of {@link parseResourceYaml} — the serialized YAML
|
|
8
|
-
* is round-trip compatible and can be fed back through `parseResourceYaml`
|
|
9
|
-
* to produce a valid `AgentInput`.
|
|
10
|
-
*
|
|
11
|
-
* Only emits `apiVersion`, `kind`, `metadata`, and `spec`. The `status`
|
|
12
|
-
* field is system-managed and never included in the YAML output.
|
|
13
|
-
*
|
|
14
|
-
* Uses snake_case field names in the YAML to match the proto canonical form,
|
|
15
|
-
* which is the format expected by both the backend and `parseResourceYaml`.
|
|
16
|
-
*
|
|
17
|
-
* @param agent - The proto `Agent` resource to serialize.
|
|
18
|
-
* @returns A YAML string suitable for editing and re-applying.
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```ts
|
|
22
|
-
* import { serializeAgentYaml } from "@stigmer/react";
|
|
23
|
-
*
|
|
24
|
-
* const yaml = serializeAgentYaml(agent);
|
|
25
|
-
* const file = new File([yaml], "my-agent.yaml", { type: "text/yaml" });
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* @see {@link parseResourceYaml} for the inverse operation
|
|
29
|
-
*/
|
|
30
|
-
export declare function serializeAgentYaml(agent: Agent): string;
|
|
31
|
-
/**
|
|
32
|
-
* Serializes a proto `McpServer` into the canonical Stigmer YAML format.
|
|
33
|
-
*
|
|
34
|
-
* This is the inverse of {@link parseResourceYaml} for McpServer resources.
|
|
35
|
-
* Same round-trip guarantee and snake_case convention as {@link serializeAgentYaml}.
|
|
36
|
-
*
|
|
37
|
-
* @param mcpServer - The proto `McpServer` resource to serialize.
|
|
38
|
-
* @returns A YAML string suitable for editing and re-applying.
|
|
39
|
-
*
|
|
40
|
-
* @example
|
|
41
|
-
* ```ts
|
|
42
|
-
* import { serializeMcpServerYaml } from "@stigmer/react";
|
|
43
|
-
*
|
|
44
|
-
* const yaml = serializeMcpServerYaml(mcpServer);
|
|
45
|
-
* const file = new File([yaml], "my-server.yaml", { type: "text/yaml" });
|
|
46
|
-
* ```
|
|
47
|
-
*
|
|
48
|
-
* @see {@link parseResourceYaml} for the inverse operation
|
|
49
|
-
*/
|
|
50
|
-
export declare function serializeMcpServerYaml(mcpServer: McpServer): string;
|
|
51
|
-
/**
|
|
52
|
-
* Serializes an {@link AgentInput} (SDK input type) into the canonical
|
|
53
|
-
* Stigmer YAML format.
|
|
54
|
-
*
|
|
55
|
-
* Unlike {@link serializeAgentYaml} which takes a proto `Agent`, this
|
|
56
|
-
* function works from the SDK input type — the same shape used by
|
|
57
|
-
* `stigmer.agent.apply()`. This is used by the creation wizard to
|
|
58
|
-
* preview the YAML before submission.
|
|
59
|
-
*
|
|
60
|
-
* The output is round-trip compatible with {@link parseResourceYaml}.
|
|
61
|
-
*
|
|
62
|
-
* @param input - The SDK `AgentInput` to serialize.
|
|
63
|
-
* @returns A YAML string in the canonical Stigmer resource format.
|
|
64
|
-
*
|
|
65
|
-
* @example
|
|
66
|
-
* ```ts
|
|
67
|
-
* import { serializeAgentInputYaml } from "@stigmer/react";
|
|
68
|
-
*
|
|
69
|
-
* const yaml = serializeAgentInputYaml({
|
|
70
|
-
* name: "my-agent",
|
|
71
|
-
* org: "acme",
|
|
72
|
-
* instructions: "You are a helpful assistant.",
|
|
73
|
-
* });
|
|
74
|
-
* ```
|
|
75
|
-
*/
|
|
76
|
-
export declare function serializeAgentInputYaml(input: AgentInput): string;
|
|
77
|
-
/**
|
|
78
|
-
* Serializes a {@link McpServerInput} (SDK input type) into the canonical
|
|
79
|
-
* Stigmer YAML format.
|
|
80
|
-
*
|
|
81
|
-
* Unlike {@link serializeMcpServerYaml} which takes a proto `McpServer`,
|
|
82
|
-
* this function works from the SDK input type — the same shape used by
|
|
83
|
-
* `stigmer.mcpServer.apply()`. This is used by the creation wizard to
|
|
84
|
-
* preview the YAML before submission.
|
|
85
|
-
*
|
|
86
|
-
* The output is round-trip compatible with {@link parseResourceYaml}.
|
|
87
|
-
*
|
|
88
|
-
* @param input - The SDK `McpServerInput` to serialize.
|
|
89
|
-
* @returns A YAML string in the canonical Stigmer resource format.
|
|
90
|
-
*
|
|
91
|
-
* @example
|
|
92
|
-
* ```ts
|
|
93
|
-
* import { serializeMcpServerInputYaml } from "@stigmer/react";
|
|
94
|
-
*
|
|
95
|
-
* const yaml = serializeMcpServerInputYaml({
|
|
96
|
-
* name: "github",
|
|
97
|
-
* org: "acme",
|
|
98
|
-
* http: { url: "https://mcp.github.com/sse" },
|
|
99
|
-
* });
|
|
100
|
-
* ```
|
|
101
|
-
*/
|
|
102
|
-
export declare function serializeMcpServerInputYaml(input: McpServerInput): string;
|
|
103
|
-
//# sourceMappingURL=serialize-resource-yaml.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serialize-resource-yaml.d.ts","sourceRoot":"","sources":["../../src/library/serialize-resource-yaml.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EAMf,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oDAAoD,CAAC;AAQhF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wDAAwD,CAAC;AAUxF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CASvD;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CASnE;AAiUD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CASjE;AA8KD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CASzE"}
|