@powerhousedao/ph-clint-app 0.1.0-dev.73 → 0.1.0-dev.75
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/dist/browser/document-models/index.js +1 -1
- package/dist/browser/document-models/ph-clint-project/index.js +3 -3
- package/dist/browser/{editor-DL0W2XOS.js → editor-Z7QJIYOp.js} +988 -450
- package/dist/browser/{editor-DL0W2XOS.js.map → editor-Z7QJIYOp.js.map} +1 -1
- package/dist/browser/editors/ph-clint-project-editor/module.js +1 -1
- package/dist/browser/index.js +3 -3
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/{module-DoAlHsjp.js → module-BZ6W31hV.js} +1943 -1012
- package/dist/browser/module-BZ6W31hV.js.map +1 -0
- package/dist/browser/{ph-clint-project-D634z5c5.js → ph-clint-project-3b5ZHznW.js} +4 -6
- package/dist/browser/ph-clint-project-3b5ZHznW.js.map +1 -0
- package/dist/connect/assets/editor-CEMUd4Ju.js +2 -0
- package/dist/connect/assets/editor-CEMUd4Ju.js.map +1 -0
- package/dist/connect/assets/{index-BXAErAWR.js → index-BxEnFQyj.js} +20 -20
- package/dist/connect/assets/index-BxEnFQyj.js.map +1 -0
- package/dist/connect/assets/index-cjUwUwMU.css +2 -0
- package/dist/connect/assets/ph-clint-project-C_SSQ38p.js +1112 -0
- package/dist/connect/assets/ph-clint-project-C_SSQ38p.js.map +1 -0
- package/dist/connect/index.html +3 -3
- package/dist/connect/ph-packages.json +1 -1
- package/dist/document-models/document-models.d.ts +1 -1
- package/dist/document-models/index.d.ts +1 -1
- package/dist/document-models/ph-clint-project/index.d.ts +2 -2
- package/dist/document-models/ph-clint-project/upgrades/index.d.ts +2 -2
- package/dist/document-models/ph-clint-project/upgrades/upgrade-manifest.d.ts +2 -2
- package/dist/document-models/ph-clint-project/upgrades/upgrade-manifest.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/actions.d.ts +27 -16
- package/dist/document-models/ph-clint-project/v1/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/actions.d.ts +29 -19
- package/dist/document-models/ph-clint-project/v1/gen/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/controller.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/controller.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/creators.d.ts +28 -18
- package/dist/document-models/ph-clint-project/v1/gen/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/deployment/actions.d.ts +6 -6
- package/dist/document-models/ph-clint-project/v1/gen/deployment/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/deployment/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/deployment/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/deployment/error.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/deployment/operations.d.ts +3 -3
- package/dist/document-models/ph-clint-project/v1/gen/deployment/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/document-model.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/document-schema.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/document-schema.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/actions.d.ts +6 -6
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/error.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/error.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/operations.d.ts +3 -3
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/actions.d.ts +6 -54
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/creators.d.ts +2 -14
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/error.d.ts +1 -78
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/error.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/operations.d.ts +3 -15
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/actions.d.ts +3 -3
- package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/error.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/operations.d.ts +3 -3
- package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-routine/actions.d.ts +4 -4
- package/dist/document-models/ph-clint-project/v1/gen/features-routine/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-routine/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/features-routine/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-routine/operations.d.ts +3 -3
- package/dist/document-models/ph-clint-project/v1/gen/features-routine/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/identity/actions.d.ts +5 -5
- package/dist/document-models/ph-clint-project/v1/gen/identity/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/identity/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/identity/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/identity/error.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/identity/error.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/identity/operations.d.ts +3 -3
- package/dist/document-models/ph-clint-project/v1/gen/identity/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/index.d.ts +25 -20
- package/dist/document-models/ph-clint-project/v1/gen/index.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/lifecycle/actions.d.ts +3 -3
- package/dist/document-models/ph-clint-project/v1/gen/lifecycle/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/lifecycle/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/lifecycle/error.d.ts +13 -1
- package/dist/document-models/ph-clint-project/v1/gen/lifecycle/error.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/lifecycle/operations.d.ts +3 -3
- package/dist/document-models/ph-clint-project/v1/gen/lifecycle/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/mastra-agent-bindings/actions.d.ts +40 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-agent-bindings/actions.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-agent-bindings/creators.d.ts +11 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-agent-bindings/creators.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-agent-bindings/error.d.ts +79 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-agent-bindings/error.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-agent-bindings/operations.d.ts +18 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-agent-bindings/operations.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-main-agent/actions.d.ts +28 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-main-agent/actions.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-main-agent/creators.d.ts +8 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-main-agent/creators.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-main-agent/error.d.ts +36 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-main-agent/error.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-main-agent/operations.d.ts +15 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-main-agent/operations.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-models/actions.d.ts +16 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-models/actions.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-models/creators.d.ts +5 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-models/creators.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-models/error.d.ts +37 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-models/error.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-models/operations.d.ts +12 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-models/operations.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-profiles/actions.d.ts +24 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-profiles/actions.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-profiles/creators.d.ts +7 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-profiles/creators.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-profiles/error.d.ts +46 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-profiles/error.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-profiles/operations.d.ts +14 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-profiles/operations.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-sub-agents/actions.d.ts +24 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-sub-agents/actions.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-sub-agents/creators.d.ts +7 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-sub-agents/creators.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-sub-agents/error.d.ts +51 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-sub-agents/error.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-sub-agents/operations.d.ts +14 -0
- package/dist/document-models/ph-clint-project/v1/gen/mastra-sub-agents/operations.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/gen/ph-factories.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/ph-factories.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/actions.d.ts +7 -7
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/error.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/error.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/operations.d.ts +3 -3
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/publishing/actions.d.ts +7 -7
- package/dist/document-models/ph-clint-project/v1/gen/publishing/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/publishing/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/publishing/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/publishing/error.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/publishing/operations.d.ts +3 -3
- package/dist/document-models/ph-clint-project/v1/gen/publishing/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/reducer.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/schema/index.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/schema/types.d.ts +210 -131
- package/dist/document-models/ph-clint-project/v1/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/schema/zod.d.ts +23 -8
- package/dist/document-models/ph-clint-project/v1/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/types.d.ts +5 -5
- package/dist/document-models/ph-clint-project/v1/gen/types.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/utils.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/utils.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/hooks.d.ts +6 -3
- package/dist/document-models/ph-clint-project/v1/hooks.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/index.d.ts +6 -6
- package/dist/document-models/ph-clint-project/v1/module.d.ts +27 -16
- package/dist/document-models/ph-clint-project/v1/module.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/index.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/deployment.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/deployment.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/external-skills.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/external-skills.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/features-mastra.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/features-mastra.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/features-powerhouse.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/features-powerhouse.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/features-routine.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/features-routine.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/identity.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/identity.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/lifecycle.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/lifecycle.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-agent-bindings.d.ts +3 -0
- package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-agent-bindings.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-main-agent.d.ts +3 -0
- package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-main-agent.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-models.d.ts +3 -0
- package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-models.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-profiles.d.ts +3 -0
- package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-profiles.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-sub-agents.d.ts +3 -0
- package/dist/document-models/ph-clint-project/v1/src/reducers/mastra-sub-agents.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/src/reducers/powerhouse-packages.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/powerhouse-packages.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/publishing.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/publishing.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/tests/mastra-agent-bindings.test.d.ts +2 -0
- package/dist/document-models/ph-clint-project/v1/tests/mastra-agent-bindings.test.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/tests/mastra-main-agent.test.d.ts +2 -0
- package/dist/document-models/ph-clint-project/v1/tests/mastra-main-agent.test.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/tests/mastra-models.test.d.ts +2 -0
- package/dist/document-models/ph-clint-project/v1/tests/mastra-models.test.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/tests/mastra-profiles.test.d.ts +2 -0
- package/dist/document-models/ph-clint-project/v1/tests/mastra-profiles.test.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/tests/mastra-sub-agents.test.d.ts +2 -0
- package/dist/document-models/ph-clint-project/v1/tests/mastra-sub-agents.test.d.ts.map +1 -0
- package/dist/document-models/ph-clint-project/v1/utils.d.ts +2 -2
- package/dist/document-models/upgrade-manifests.d.ts +1 -1
- package/dist/document-models/upgrade-manifests.d.ts.map +1 -1
- package/dist/editors/ph-clint-project-editor/editor.d.ts.map +1 -1
- package/dist/node/document-models/index.mjs +1 -1
- package/dist/node/document-models/ph-clint-project/index.mjs +3 -3
- package/dist/node/{editor-mM5FSNXc.mjs → editor-C82Trmk4.mjs} +988 -450
- package/dist/node/{editor-mM5FSNXc.mjs.map → editor-C82Trmk4.mjs.map} +1 -1
- package/dist/node/editors/ph-clint-project-editor/module.mjs +1 -1
- package/dist/node/index.mjs +3 -3
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/{module-DayL4J7r.mjs → module-ZwrJ5kaI.mjs} +1943 -1012
- package/dist/node/module-ZwrJ5kaI.mjs.map +1 -0
- package/dist/node/{ph-clint-project-Btx_kiiQ.mjs → ph-clint-project-YqV6kGMs.mjs} +4 -6
- package/dist/node/ph-clint-project-YqV6kGMs.mjs.map +1 -0
- package/dist/style.css +33 -29
- package/package.json +1 -1
- package/dist/browser/module-DoAlHsjp.js.map +0 -1
- package/dist/browser/ph-clint-project-D634z5c5.js.map +0 -1
- package/dist/connect/assets/editor-DgkuaKuV.js +0 -2
- package/dist/connect/assets/editor-DgkuaKuV.js.map +0 -1
- package/dist/connect/assets/index-BSq-9kCR.css +0 -2
- package/dist/connect/assets/index-BXAErAWR.js.map +0 -1
- package/dist/connect/assets/ph-clint-project-BRYYVNTj.js +0 -758
- package/dist/connect/assets/ph-clint-project-BRYYVNTj.js.map +0 -1
- package/dist/node/module-DayL4J7r.mjs.map +0 -1
- package/dist/node/ph-clint-project-Btx_kiiQ.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __commonJSMin } from "./chunk-YKewjYmz.js";
|
|
2
|
-
import {
|
|
3
|
-
import { c as exportDocument, d as showRevisionHistory, f as useGetSwitchboardLink, g as useDocumentById, h as useSelectedDocumentSafe, l as setSelectedNode, m as useNodeParentFolderById, p as useNodeActions, s as useSelectedPhClintProjectDocument, u as setSelectedTimelineItem } from "./ph-clint-project-
|
|
2
|
+
import { g as actions, gr as undo, kr as generateId, pr as redo } from "./module-BZ6W31hV.js";
|
|
3
|
+
import { c as exportDocument, d as showRevisionHistory, f as useGetSwitchboardLink, g as useDocumentById, h as useSelectedDocumentSafe, l as setSelectedNode, m as useNodeParentFolderById, p as useNodeActions, s as useSelectedPhClintProjectDocument, u as setSelectedTimelineItem } from "./ph-clint-project-3b5ZHznW.js";
|
|
4
4
|
import { n as Icon, r as twMerge } from "./document-timeline-FWiQhfIq-DO4emW6K.js";
|
|
5
5
|
import { Suspense, lazy, useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -646,6 +646,13 @@ const POWERHOUSE_LEVELS = [
|
|
|
646
646
|
description: "Web UI for document management"
|
|
647
647
|
}
|
|
648
648
|
];
|
|
649
|
+
/** Patch-bump a semver-ish version string: 0.0.1 → 0.0.2. Falls back to "<version>.1" when unparseable. */
|
|
650
|
+
function bumpPatch(version) {
|
|
651
|
+
const m = /^(\d+)\.(\d+)\.(\d+)/.exec(version);
|
|
652
|
+
if (!m) return `${version}.1`;
|
|
653
|
+
const [, major, minor, patch] = m;
|
|
654
|
+
return `${major}.${minor}.${Number(patch) + 1}`;
|
|
655
|
+
}
|
|
649
656
|
function TextField(props) {
|
|
650
657
|
return /* @__PURE__ */ jsxs("label", {
|
|
651
658
|
className: props.compact ? "my-1 block" : "my-3 block",
|
|
@@ -689,11 +696,37 @@ function Toggle(props) {
|
|
|
689
696
|
]
|
|
690
697
|
});
|
|
691
698
|
}
|
|
699
|
+
const TAB_LABELS = [
|
|
700
|
+
{
|
|
701
|
+
value: "cli",
|
|
702
|
+
label: "CLI"
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
value: "agents",
|
|
706
|
+
label: "Agents"
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
value: "profiles",
|
|
710
|
+
label: "Profiles"
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
value: "skills",
|
|
714
|
+
label: "Skills"
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
value: "powerhouse",
|
|
718
|
+
label: "Powerhouse"
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
value: "publish",
|
|
722
|
+
label: "Publish"
|
|
723
|
+
}
|
|
724
|
+
];
|
|
692
725
|
function Editor() {
|
|
693
726
|
const [document, dispatch] = useSelectedPhClintProjectDocument();
|
|
694
727
|
const state = document.state.global;
|
|
695
728
|
const { powerhouse, mastra, routine } = state.features;
|
|
696
|
-
const [activeTab, setActiveTab] = useState("
|
|
729
|
+
const [activeTab, setActiveTab] = useState("cli");
|
|
697
730
|
const setPackageIdentifier = (identifier) => dispatch(actions.setPackageIdentifier({ identifier }));
|
|
698
731
|
const setVersion = (version) => dispatch(actions.setVersion({ version }));
|
|
699
732
|
const setDescription = (description) => dispatch(actions.setDescription({ description }));
|
|
@@ -745,14 +778,28 @@ function Editor() {
|
|
|
745
778
|
id: generateId(),
|
|
746
779
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
747
780
|
}));
|
|
748
|
-
const
|
|
749
|
-
const
|
|
750
|
-
const
|
|
781
|
+
const setMainAgentName = (name) => dispatch(actions.setMainAgentName({ name }));
|
|
782
|
+
const setMainAgentDescription = (description) => dispatch(actions.setMainAgentDescription({ description }));
|
|
783
|
+
const clearMainAgentDescription = () => dispatch(actions.clearMainAgentDescription({ _: true }));
|
|
784
|
+
const setMainAgentImage = (image) => dispatch(actions.setMainAgentImage({ image }));
|
|
785
|
+
const clearMainAgentImage = () => dispatch(actions.clearMainAgentImage({ _: true }));
|
|
786
|
+
const addSubAgent = (id, name, description, modelId) => dispatch(actions.addSubAgent({
|
|
787
|
+
id,
|
|
788
|
+
name,
|
|
789
|
+
description,
|
|
790
|
+
modelId
|
|
791
|
+
}));
|
|
792
|
+
const removeSubAgent = (id) => dispatch(actions.removeSubAgent({ id }));
|
|
793
|
+
const setSubAgentName = (id, name) => dispatch(actions.setSubAgentName({
|
|
751
794
|
id,
|
|
752
|
-
|
|
795
|
+
name
|
|
753
796
|
}));
|
|
797
|
+
const setSubAgentDescription = (id, description) => dispatch(actions.setSubAgentDescription({
|
|
798
|
+
id,
|
|
799
|
+
description
|
|
800
|
+
}));
|
|
801
|
+
const addModel = (id) => dispatch(actions.addModel({ id }));
|
|
754
802
|
const removeModel = (id) => dispatch(actions.removeModel({ id }));
|
|
755
|
-
const setDefaultModel = (id) => dispatch(actions.setDefaultModel({ id }));
|
|
756
803
|
const addProfile = (id, title, content, insertBefore) => dispatch(actions.addProfile({
|
|
757
804
|
id,
|
|
758
805
|
title,
|
|
@@ -769,9 +816,40 @@ function Editor() {
|
|
|
769
816
|
ids,
|
|
770
817
|
insertBefore
|
|
771
818
|
}));
|
|
772
|
-
const
|
|
773
|
-
|
|
774
|
-
|
|
819
|
+
const setAgentModel = (agentId, modelId) => dispatch(actions.setAgentModel({
|
|
820
|
+
agentId,
|
|
821
|
+
modelId
|
|
822
|
+
}));
|
|
823
|
+
const addAgentProfileRef = (agentId, profileId, insertBefore) => dispatch(actions.addAgentProfileRef({
|
|
824
|
+
agentId,
|
|
825
|
+
profileId,
|
|
826
|
+
insertBefore
|
|
827
|
+
}));
|
|
828
|
+
const removeAgentProfileRef = (agentId, profileId) => dispatch(actions.removeAgentProfileRef({
|
|
829
|
+
agentId,
|
|
830
|
+
profileId
|
|
831
|
+
}));
|
|
832
|
+
const reorderAgentProfileRefs = (agentId, ids, insertBefore) => dispatch(actions.reorderAgentProfileRefs({
|
|
833
|
+
agentId,
|
|
834
|
+
ids,
|
|
835
|
+
insertBefore
|
|
836
|
+
}));
|
|
837
|
+
const addAgentSkill = (agentId, name) => dispatch(actions.addAgentSkill({
|
|
838
|
+
agentId,
|
|
839
|
+
name
|
|
840
|
+
}));
|
|
841
|
+
const removeAgentSkill = (agentId, name) => dispatch(actions.removeAgentSkill({
|
|
842
|
+
agentId,
|
|
843
|
+
name
|
|
844
|
+
}));
|
|
845
|
+
const addAgentToolPattern = (agentId, pattern) => dispatch(actions.addAgentToolPattern({
|
|
846
|
+
agentId,
|
|
847
|
+
pattern
|
|
848
|
+
}));
|
|
849
|
+
const removeAgentToolPattern = (agentId, pattern) => dispatch(actions.removeAgentToolPattern({
|
|
850
|
+
agentId,
|
|
851
|
+
pattern
|
|
852
|
+
}));
|
|
775
853
|
const setEnableChat = (enabled) => dispatch(actions.setEnableChat({ enabled }));
|
|
776
854
|
const setProxyEnabled = (enabled) => dispatch(actions.setProxyEnabled({ enabled }));
|
|
777
855
|
const setObservabilityEnabled = (enabled) => dispatch(actions.setObservabilityEnabled({ enabled }));
|
|
@@ -788,37 +866,15 @@ function Editor() {
|
|
|
788
866
|
className: "mt-4 text-xl font-bold",
|
|
789
867
|
children: "ph-clint Project Spec"
|
|
790
868
|
}),
|
|
791
|
-
/* @__PURE__ */
|
|
869
|
+
/* @__PURE__ */ jsx("nav", {
|
|
792
870
|
className: "my-4 flex border-b border-gray-200",
|
|
793
|
-
children:
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
}),
|
|
799
|
-
/* @__PURE__ */ jsx("button", {
|
|
800
|
-
className: tabClasses("agent"),
|
|
801
|
-
onClick: () => setActiveTab("agent"),
|
|
802
|
-
children: "Agent"
|
|
803
|
-
}),
|
|
804
|
-
/* @__PURE__ */ jsx("button", {
|
|
805
|
-
className: tabClasses("powerhouse"),
|
|
806
|
-
onClick: () => setActiveTab("powerhouse"),
|
|
807
|
-
children: "Powerhouse"
|
|
808
|
-
}),
|
|
809
|
-
/* @__PURE__ */ jsx("button", {
|
|
810
|
-
className: tabClasses("skills"),
|
|
811
|
-
onClick: () => setActiveTab("skills"),
|
|
812
|
-
children: "Skills"
|
|
813
|
-
}),
|
|
814
|
-
/* @__PURE__ */ jsx("button", {
|
|
815
|
-
className: tabClasses("publish"),
|
|
816
|
-
onClick: () => setActiveTab("publish"),
|
|
817
|
-
children: "Publish"
|
|
818
|
-
})
|
|
819
|
-
]
|
|
871
|
+
children: TAB_LABELS.map((t) => /* @__PURE__ */ jsx("button", {
|
|
872
|
+
className: tabClasses(t.value),
|
|
873
|
+
onClick: () => setActiveTab(t.value),
|
|
874
|
+
children: t.label
|
|
875
|
+
}, t.value))
|
|
820
876
|
}),
|
|
821
|
-
activeTab === "
|
|
877
|
+
activeTab === "cli" && /* @__PURE__ */ jsx(CliTab, {
|
|
822
878
|
state,
|
|
823
879
|
powerhouse,
|
|
824
880
|
mastra,
|
|
@@ -829,25 +885,43 @@ function Editor() {
|
|
|
829
885
|
setDescription,
|
|
830
886
|
setPowerhouseLevel,
|
|
831
887
|
toggleMastra,
|
|
832
|
-
toggleRoutine
|
|
833
|
-
}),
|
|
834
|
-
activeTab === "agent" && /* @__PURE__ */ jsx(AgentTab, {
|
|
835
|
-
mastra,
|
|
836
|
-
isAboveDisabled,
|
|
837
|
-
setAgentId,
|
|
838
|
-
setAgentName,
|
|
839
|
-
setAgentDescription,
|
|
840
|
-
setAgentImage,
|
|
841
|
-
clearAgentImage,
|
|
888
|
+
toggleRoutine,
|
|
842
889
|
setEnableChat,
|
|
843
890
|
addModel,
|
|
844
|
-
removeModel
|
|
845
|
-
|
|
891
|
+
removeModel
|
|
892
|
+
}),
|
|
893
|
+
activeTab === "agents" && /* @__PURE__ */ jsx(AgentsTab, {
|
|
894
|
+
mastra,
|
|
895
|
+
setMainAgentName,
|
|
896
|
+
setMainAgentDescription,
|
|
897
|
+
clearMainAgentDescription,
|
|
898
|
+
setMainAgentImage,
|
|
899
|
+
clearMainAgentImage,
|
|
900
|
+
addSubAgent,
|
|
901
|
+
removeSubAgent,
|
|
902
|
+
setSubAgentName,
|
|
903
|
+
setSubAgentDescription,
|
|
904
|
+
setAgentModel,
|
|
905
|
+
addAgentProfileRef,
|
|
906
|
+
removeAgentProfileRef,
|
|
907
|
+
reorderAgentProfileRefs,
|
|
908
|
+
addAgentSkill,
|
|
909
|
+
removeAgentSkill,
|
|
910
|
+
addAgentToolPattern,
|
|
911
|
+
removeAgentToolPattern
|
|
912
|
+
}),
|
|
913
|
+
activeTab === "profiles" && /* @__PURE__ */ jsx(ProfilesTab, {
|
|
914
|
+
mastra,
|
|
846
915
|
addProfile,
|
|
847
916
|
updateProfile,
|
|
848
917
|
removeProfile,
|
|
849
918
|
reorderProfiles
|
|
850
919
|
}),
|
|
920
|
+
activeTab === "skills" && /* @__PURE__ */ jsx(SkillsTab, {
|
|
921
|
+
skills: state.externalSkills,
|
|
922
|
+
addSkill,
|
|
923
|
+
removeSkill
|
|
924
|
+
}),
|
|
851
925
|
activeTab === "powerhouse" && /* @__PURE__ */ jsx(PowerhouseTab, {
|
|
852
926
|
packages: state.packages,
|
|
853
927
|
isAboveDisabled,
|
|
@@ -856,11 +930,6 @@ function Editor() {
|
|
|
856
930
|
addDocType,
|
|
857
931
|
removeDocType
|
|
858
932
|
}),
|
|
859
|
-
activeTab === "skills" && /* @__PURE__ */ jsx(SkillsTab, {
|
|
860
|
-
skills: state.externalSkills,
|
|
861
|
-
addSkill,
|
|
862
|
-
removeSkill
|
|
863
|
-
}),
|
|
864
933
|
activeTab === "publish" && /* @__PURE__ */ jsx(PublishTab, {
|
|
865
934
|
version: state.version,
|
|
866
935
|
publishHistory: state.publishHistory,
|
|
@@ -879,8 +948,8 @@ function Editor() {
|
|
|
879
948
|
})]
|
|
880
949
|
});
|
|
881
950
|
}
|
|
882
|
-
function
|
|
883
|
-
const { state } = props;
|
|
951
|
+
function CliTab(props) {
|
|
952
|
+
const { state, mastra } = props;
|
|
884
953
|
const packageIdentifier = `${state.scope ? state.scope + "/" : ""}${state.name ?? ""}`;
|
|
885
954
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
886
955
|
/* @__PURE__ */ jsxs("section", {
|
|
@@ -957,14 +1026,32 @@ function SpecTab(props) {
|
|
|
957
1026
|
})
|
|
958
1027
|
]
|
|
959
1028
|
}),
|
|
960
|
-
/* @__PURE__ */
|
|
1029
|
+
/* @__PURE__ */ jsxs("div", {
|
|
961
1030
|
className: "my-4 rounded border border-gray-200 bg-white p-4",
|
|
962
|
-
children: /* @__PURE__ */ jsx(Toggle, {
|
|
1031
|
+
children: [/* @__PURE__ */ jsx(Toggle, {
|
|
963
1032
|
label: "Mastra",
|
|
964
|
-
checked:
|
|
1033
|
+
checked: mastra.enabled,
|
|
965
1034
|
hint: "AI agent framework",
|
|
966
1035
|
onChange: props.toggleMastra
|
|
967
|
-
})
|
|
1036
|
+
}), mastra.enabled && /* @__PURE__ */ jsxs("div", {
|
|
1037
|
+
className: "mt-4 space-y-4 border-t border-gray-100 pt-4",
|
|
1038
|
+
children: [/* @__PURE__ */ jsx(ModelsSection, {
|
|
1039
|
+
models: mastra.models,
|
|
1040
|
+
main: mastra.mainAgent,
|
|
1041
|
+
subAgents: mastra.subAgents,
|
|
1042
|
+
addModel: props.addModel,
|
|
1043
|
+
removeModel: props.removeModel
|
|
1044
|
+
}), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h4", {
|
|
1045
|
+
className: "text-sm font-semibold text-gray-700",
|
|
1046
|
+
children: "Common"
|
|
1047
|
+
}), /* @__PURE__ */ jsx(Toggle, {
|
|
1048
|
+
label: "Enable Chat",
|
|
1049
|
+
checked: mastra.common.enableChat,
|
|
1050
|
+
disabled: !props.isAboveDisabled,
|
|
1051
|
+
hint: props.isAboveDisabled ? "Chat session integration via clint-common" : "Requires Powerhouse to be enabled",
|
|
1052
|
+
onChange: props.setEnableChat
|
|
1053
|
+
})] })]
|
|
1054
|
+
})]
|
|
968
1055
|
}),
|
|
969
1056
|
/* @__PURE__ */ jsx("div", {
|
|
970
1057
|
className: "my-4 rounded border border-gray-200 bg-white p-4",
|
|
@@ -979,115 +1066,535 @@ function SpecTab(props) {
|
|
|
979
1066
|
})
|
|
980
1067
|
] });
|
|
981
1068
|
}
|
|
982
|
-
function
|
|
983
|
-
if (!props.isAboveDisabled) return /* @__PURE__ */ jsxs("section", {
|
|
984
|
-
className: "my-6 rounded border border-dashed border-gray-300 bg-white p-8 text-center text-gray-500",
|
|
985
|
-
children: [/* @__PURE__ */ jsx("h3", {
|
|
986
|
-
className: "text-lg font-semibold",
|
|
987
|
-
children: "Powerhouse"
|
|
988
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
989
|
-
className: "mt-2",
|
|
990
|
-
children: "Enable Powerhouse in the Spec tab (set level to Reactor or above) to manage packages."
|
|
991
|
-
})]
|
|
992
|
-
});
|
|
993
|
-
return /* @__PURE__ */ jsx(PackagesSection, {
|
|
994
|
-
packages: props.packages,
|
|
995
|
-
addPackage: props.addPackage,
|
|
996
|
-
removePackage: props.removePackage,
|
|
997
|
-
addDocType: props.addDocType,
|
|
998
|
-
removeDocType: props.removeDocType
|
|
999
|
-
});
|
|
1000
|
-
}
|
|
1001
|
-
function AgentTab(props) {
|
|
1069
|
+
function AgentsTab(props) {
|
|
1002
1070
|
const { mastra } = props;
|
|
1003
|
-
|
|
1071
|
+
const main = mastra.mainAgent;
|
|
1072
|
+
const [showAddForm, setShowAddForm] = useState(false);
|
|
1073
|
+
if (!mastra.enabled || !main) return /* @__PURE__ */ jsxs("section", {
|
|
1004
1074
|
className: "my-6 rounded border border-dashed border-gray-300 bg-white p-8 text-center text-gray-500",
|
|
1005
1075
|
children: [/* @__PURE__ */ jsx("h3", {
|
|
1006
1076
|
className: "text-lg font-semibold",
|
|
1007
|
-
children: "
|
|
1077
|
+
children: "Agents"
|
|
1008
1078
|
}), /* @__PURE__ */ jsx("p", {
|
|
1009
1079
|
className: "mt-2",
|
|
1010
|
-
children: "Enable Mastra in the
|
|
1080
|
+
children: "Enable Mastra in the CLI tab to configure agents."
|
|
1011
1081
|
})]
|
|
1012
1082
|
});
|
|
1083
|
+
const allAgentIds = [main.id, ...mastra.subAgents.map((s) => s.id)];
|
|
1013
1084
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1085
|
+
/* @__PURE__ */ jsx(MainAgentCard, {
|
|
1086
|
+
main,
|
|
1087
|
+
models: mastra.models,
|
|
1088
|
+
profiles: mastra.profiles,
|
|
1089
|
+
setMainAgentName: props.setMainAgentName,
|
|
1090
|
+
setMainAgentDescription: props.setMainAgentDescription,
|
|
1091
|
+
clearMainAgentDescription: props.clearMainAgentDescription,
|
|
1092
|
+
setMainAgentImage: props.setMainAgentImage,
|
|
1093
|
+
clearMainAgentImage: props.clearMainAgentImage,
|
|
1094
|
+
setAgentModel: props.setAgentModel,
|
|
1095
|
+
addAgentProfileRef: props.addAgentProfileRef,
|
|
1096
|
+
removeAgentProfileRef: props.removeAgentProfileRef,
|
|
1097
|
+
reorderAgentProfileRefs: props.reorderAgentProfileRefs,
|
|
1098
|
+
addAgentSkill: props.addAgentSkill,
|
|
1099
|
+
removeAgentSkill: props.removeAgentSkill,
|
|
1100
|
+
addAgentToolPattern: props.addAgentToolPattern,
|
|
1101
|
+
removeAgentToolPattern: props.removeAgentToolPattern
|
|
1102
|
+
}),
|
|
1103
|
+
mastra.subAgents.map((sub) => /* @__PURE__ */ jsx(SubAgentCard, {
|
|
1104
|
+
sub,
|
|
1105
|
+
models: mastra.models,
|
|
1106
|
+
profiles: mastra.profiles,
|
|
1107
|
+
removeSubAgent: props.removeSubAgent,
|
|
1108
|
+
setSubAgentName: props.setSubAgentName,
|
|
1109
|
+
setSubAgentDescription: props.setSubAgentDescription,
|
|
1110
|
+
setAgentModel: props.setAgentModel,
|
|
1111
|
+
addAgentProfileRef: props.addAgentProfileRef,
|
|
1112
|
+
removeAgentProfileRef: props.removeAgentProfileRef,
|
|
1113
|
+
reorderAgentProfileRefs: props.reorderAgentProfileRefs,
|
|
1114
|
+
addAgentSkill: props.addAgentSkill,
|
|
1115
|
+
removeAgentSkill: props.removeAgentSkill,
|
|
1116
|
+
addAgentToolPattern: props.addAgentToolPattern,
|
|
1117
|
+
removeAgentToolPattern: props.removeAgentToolPattern
|
|
1118
|
+
}, sub.id)),
|
|
1014
1119
|
/* @__PURE__ */ jsx("section", {
|
|
1015
1120
|
className: "my-6",
|
|
1016
|
-
children: /* @__PURE__ */
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1121
|
+
children: showAddForm ? /* @__PURE__ */ jsx(AddSubAgentForm, {
|
|
1122
|
+
models: mastra.models,
|
|
1123
|
+
existingAgentIds: allAgentIds,
|
|
1124
|
+
onAdd: (id, name, description, modelId) => {
|
|
1125
|
+
props.addSubAgent(id, name, description, modelId);
|
|
1126
|
+
setShowAddForm(false);
|
|
1020
1127
|
},
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1128
|
+
onCancel: () => setShowAddForm(false)
|
|
1129
|
+
}) : /* @__PURE__ */ jsx("button", {
|
|
1130
|
+
className: "rounded bg-blue-500 px-3 py-2 text-sm text-white hover:bg-blue-600 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1131
|
+
disabled: mastra.models.length === 0,
|
|
1132
|
+
title: mastra.models.length === 0 ? "Add a model first (CLI tab → Mastra)" : "",
|
|
1133
|
+
onClick: () => setShowAddForm(true),
|
|
1134
|
+
children: "+ Add Sub-agent"
|
|
1135
|
+
})
|
|
1136
|
+
})
|
|
1137
|
+
] });
|
|
1138
|
+
}
|
|
1139
|
+
function MainAgentCard(props) {
|
|
1140
|
+
const { main } = props;
|
|
1141
|
+
const [expanded, setExpanded] = useState(true);
|
|
1142
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1143
|
+
className: "my-3 rounded border border-gray-200 bg-white p-4",
|
|
1144
|
+
children: [
|
|
1145
|
+
/* @__PURE__ */ jsx("div", {
|
|
1146
|
+
className: "flex items-center justify-between",
|
|
1147
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
1148
|
+
className: "flex items-center gap-3",
|
|
1149
|
+
children: [
|
|
1150
|
+
/* @__PURE__ */ jsx("button", {
|
|
1151
|
+
className: "text-sm text-gray-400 hover:text-gray-700",
|
|
1152
|
+
onClick: () => setExpanded(!expanded),
|
|
1153
|
+
title: expanded ? "Collapse" : "Expand",
|
|
1154
|
+
children: expanded ? "▾" : "▸"
|
|
1155
|
+
}),
|
|
1156
|
+
/* @__PURE__ */ jsx("span", {
|
|
1157
|
+
className: "rounded bg-gray-100 px-2 py-0.5 font-mono text-xs text-gray-500",
|
|
1158
|
+
children: main.id
|
|
1159
|
+
}),
|
|
1160
|
+
/* @__PURE__ */ jsx("span", {
|
|
1161
|
+
className: "font-semibold",
|
|
1162
|
+
children: main.name
|
|
1163
|
+
}),
|
|
1164
|
+
/* @__PURE__ */ jsx("span", {
|
|
1165
|
+
className: "rounded bg-blue-100 px-2 py-0.5 text-xs font-semibold text-blue-700",
|
|
1166
|
+
children: "Main"
|
|
1167
|
+
})
|
|
1168
|
+
]
|
|
1169
|
+
})
|
|
1170
|
+
}),
|
|
1171
|
+
main.description && /* @__PURE__ */ jsx("p", {
|
|
1172
|
+
className: "ml-7 text-sm text-gray-600",
|
|
1173
|
+
children: main.description
|
|
1174
|
+
}),
|
|
1175
|
+
expanded && /* @__PURE__ */ jsxs("div", {
|
|
1176
|
+
className: "mt-4 space-y-3 border-t border-gray-100 pt-4",
|
|
1177
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
1032
1178
|
style: {
|
|
1033
|
-
|
|
1034
|
-
|
|
1179
|
+
display: "flex",
|
|
1180
|
+
gap: "1.5rem"
|
|
1035
1181
|
},
|
|
1036
|
-
children: [/* @__PURE__ */
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1182
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
1183
|
+
style: {
|
|
1184
|
+
flexShrink: 0,
|
|
1185
|
+
width: "7rem"
|
|
1186
|
+
},
|
|
1187
|
+
children: /* @__PURE__ */ jsx(AgentImageField, {
|
|
1188
|
+
image: main.image ?? null,
|
|
1189
|
+
onSetImage: props.setMainAgentImage,
|
|
1190
|
+
onClearImage: props.clearMainAgentImage
|
|
1191
|
+
})
|
|
1192
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
1193
|
+
style: {
|
|
1194
|
+
flex: 1,
|
|
1195
|
+
minWidth: 0
|
|
1196
|
+
},
|
|
1197
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
1198
|
+
className: "grid grid-cols-[1fr_2fr] gap-4",
|
|
1199
|
+
children: [/* @__PURE__ */ jsx(TextField, {
|
|
1200
|
+
compact: true,
|
|
1201
|
+
readOnly: true,
|
|
1202
|
+
label: "Agent ID",
|
|
1203
|
+
value: main.id,
|
|
1204
|
+
onCommit: () => {}
|
|
1205
|
+
}), /* @__PURE__ */ jsx(TextField, {
|
|
1206
|
+
compact: true,
|
|
1207
|
+
label: "Agent Name",
|
|
1208
|
+
value: main.name,
|
|
1209
|
+
placeholder: "My Agent",
|
|
1210
|
+
onCommit: props.setMainAgentName
|
|
1211
|
+
})]
|
|
1212
|
+
}), /* @__PURE__ */ jsx(DescriptionField, {
|
|
1213
|
+
value: main.description,
|
|
1214
|
+
placeholder: "A brief description of what this agent does",
|
|
1215
|
+
onSet: props.setMainAgentDescription,
|
|
1216
|
+
onClear: props.clearMainAgentDescription
|
|
1050
1217
|
})]
|
|
1218
|
+
})]
|
|
1219
|
+
}), /* @__PURE__ */ jsx(AgentBindings, {
|
|
1220
|
+
agentId: main.id,
|
|
1221
|
+
isMain: true,
|
|
1222
|
+
modelId: main.modelId,
|
|
1223
|
+
profileIds: main.profileIds,
|
|
1224
|
+
skills: main.skills,
|
|
1225
|
+
toolPatterns: main.toolPatterns,
|
|
1226
|
+
models: props.models,
|
|
1227
|
+
profiles: props.profiles,
|
|
1228
|
+
setAgentModel: props.setAgentModel,
|
|
1229
|
+
addAgentProfileRef: props.addAgentProfileRef,
|
|
1230
|
+
removeAgentProfileRef: props.removeAgentProfileRef,
|
|
1231
|
+
reorderAgentProfileRefs: props.reorderAgentProfileRefs,
|
|
1232
|
+
addAgentSkill: props.addAgentSkill,
|
|
1233
|
+
removeAgentSkill: props.removeAgentSkill,
|
|
1234
|
+
addAgentToolPattern: props.addAgentToolPattern,
|
|
1235
|
+
removeAgentToolPattern: props.removeAgentToolPattern
|
|
1236
|
+
})]
|
|
1237
|
+
})
|
|
1238
|
+
]
|
|
1239
|
+
});
|
|
1240
|
+
}
|
|
1241
|
+
function DescriptionField(props) {
|
|
1242
|
+
return /* @__PURE__ */ jsxs("label", {
|
|
1243
|
+
className: "my-1 block",
|
|
1244
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
1245
|
+
className: "text-xs text-gray-600",
|
|
1246
|
+
children: "Description"
|
|
1247
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1248
|
+
className: "flex items-center gap-2",
|
|
1249
|
+
children: /* @__PURE__ */ jsx("input", {
|
|
1250
|
+
type: "text",
|
|
1251
|
+
defaultValue: props.value ?? "",
|
|
1252
|
+
placeholder: props.placeholder,
|
|
1253
|
+
onBlur: (e) => {
|
|
1254
|
+
const next = e.target.value.trim();
|
|
1255
|
+
if (next && next !== (props.value ?? "")) props.onSet(next);
|
|
1256
|
+
else if (!next && props.value !== null) props.onClear();
|
|
1257
|
+
},
|
|
1258
|
+
onKeyDown: (e) => {
|
|
1259
|
+
if (e.key === "Enter") e.currentTarget.blur();
|
|
1260
|
+
},
|
|
1261
|
+
className: "w-full font-mono"
|
|
1262
|
+
})
|
|
1263
|
+
})]
|
|
1264
|
+
});
|
|
1265
|
+
}
|
|
1266
|
+
function AddSubAgentForm(props) {
|
|
1267
|
+
const [id, setId] = useState("");
|
|
1268
|
+
const [name, setName] = useState("");
|
|
1269
|
+
const [description, setDescription] = useState("");
|
|
1270
|
+
const [modelId, setModelId] = useState(props.models[0]?.id ?? "");
|
|
1271
|
+
const canAdd = /^[a-z][a-z0-9-]*$/.test(id) && !props.existingAgentIds.includes(id) && name.trim() && description.trim() && modelId;
|
|
1272
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1273
|
+
className: "my-3 rounded border border-blue-200 bg-blue-50 p-4",
|
|
1274
|
+
children: [
|
|
1275
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1276
|
+
className: "grid grid-cols-2 gap-3",
|
|
1277
|
+
children: [/* @__PURE__ */ jsxs("label", {
|
|
1278
|
+
className: "block",
|
|
1279
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1280
|
+
className: "text-xs text-gray-600",
|
|
1281
|
+
children: "Sub-agent ID"
|
|
1282
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
1283
|
+
type: "text",
|
|
1284
|
+
value: id,
|
|
1285
|
+
placeholder: "summarizer",
|
|
1286
|
+
onChange: (e) => setId(e.target.value.trim()),
|
|
1287
|
+
className: "w-full rounded border p-2 font-mono text-sm"
|
|
1288
|
+
})]
|
|
1289
|
+
}), /* @__PURE__ */ jsxs("label", {
|
|
1290
|
+
className: "block",
|
|
1291
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1292
|
+
className: "text-xs text-gray-600",
|
|
1293
|
+
children: "Display name"
|
|
1294
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
1295
|
+
type: "text",
|
|
1296
|
+
value: name,
|
|
1297
|
+
placeholder: "Summarizer",
|
|
1298
|
+
onChange: (e) => setName(e.target.value),
|
|
1299
|
+
className: "w-full rounded border p-2 text-sm"
|
|
1300
|
+
})]
|
|
1301
|
+
})]
|
|
1302
|
+
}),
|
|
1303
|
+
/* @__PURE__ */ jsxs("label", {
|
|
1304
|
+
className: "my-2 block",
|
|
1305
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1306
|
+
className: "text-xs text-gray-600",
|
|
1307
|
+
children: "Description (the main agent uses this to decide when to delegate)"
|
|
1308
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
1309
|
+
type: "text",
|
|
1310
|
+
value: description,
|
|
1311
|
+
placeholder: "Summarizes long documents into bullet points",
|
|
1312
|
+
onChange: (e) => setDescription(e.target.value),
|
|
1313
|
+
className: "w-full rounded border p-2 text-sm"
|
|
1314
|
+
})]
|
|
1315
|
+
}),
|
|
1316
|
+
/* @__PURE__ */ jsxs("label", {
|
|
1317
|
+
className: "my-2 block",
|
|
1318
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1319
|
+
className: "text-xs text-gray-600",
|
|
1320
|
+
children: "Model"
|
|
1321
|
+
}), /* @__PURE__ */ jsx("select", {
|
|
1322
|
+
value: modelId,
|
|
1323
|
+
onChange: (e) => setModelId(e.target.value),
|
|
1324
|
+
className: "w-full rounded border p-2 font-mono text-sm",
|
|
1325
|
+
children: props.models.map((m) => /* @__PURE__ */ jsx("option", {
|
|
1326
|
+
value: m.id,
|
|
1327
|
+
children: m.id
|
|
1328
|
+
}, m.id))
|
|
1329
|
+
})]
|
|
1330
|
+
}),
|
|
1331
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1332
|
+
className: "mt-2 flex items-center gap-2",
|
|
1333
|
+
children: [/* @__PURE__ */ jsx("button", {
|
|
1334
|
+
className: "rounded bg-blue-500 px-3 py-2 text-sm text-white hover:bg-blue-600 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1335
|
+
disabled: !canAdd,
|
|
1336
|
+
onClick: () => props.onAdd(id, name.trim(), description.trim(), modelId),
|
|
1337
|
+
children: "Add"
|
|
1338
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
1339
|
+
className: "text-sm text-gray-500 hover:text-gray-700",
|
|
1340
|
+
onClick: props.onCancel,
|
|
1341
|
+
children: "Cancel"
|
|
1342
|
+
})]
|
|
1343
|
+
})
|
|
1344
|
+
]
|
|
1345
|
+
});
|
|
1346
|
+
}
|
|
1347
|
+
function SubAgentCard(props) {
|
|
1348
|
+
const { sub } = props;
|
|
1349
|
+
const [expanded, setExpanded] = useState(false);
|
|
1350
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1351
|
+
className: "my-3 rounded border border-gray-200 bg-white p-4",
|
|
1352
|
+
children: [
|
|
1353
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1354
|
+
className: "flex items-center justify-between",
|
|
1355
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
1356
|
+
className: "flex items-center gap-3",
|
|
1357
|
+
children: [
|
|
1358
|
+
/* @__PURE__ */ jsx("button", {
|
|
1359
|
+
className: "text-sm text-gray-400 hover:text-gray-700",
|
|
1360
|
+
onClick: () => setExpanded(!expanded),
|
|
1361
|
+
title: expanded ? "Collapse" : "Expand",
|
|
1362
|
+
children: expanded ? "▾" : "▸"
|
|
1363
|
+
}),
|
|
1364
|
+
/* @__PURE__ */ jsx("span", {
|
|
1365
|
+
className: "rounded bg-gray-100 px-2 py-0.5 font-mono text-xs text-gray-500",
|
|
1366
|
+
children: sub.id
|
|
1367
|
+
}),
|
|
1368
|
+
/* @__PURE__ */ jsx("span", {
|
|
1369
|
+
className: "font-semibold",
|
|
1370
|
+
children: sub.name
|
|
1371
|
+
})
|
|
1372
|
+
]
|
|
1373
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
1374
|
+
className: "text-sm text-red-500 hover:text-red-700",
|
|
1375
|
+
onClick: () => props.removeSubAgent(sub.id),
|
|
1376
|
+
children: "Remove"
|
|
1377
|
+
})]
|
|
1378
|
+
}),
|
|
1379
|
+
/* @__PURE__ */ jsx("p", {
|
|
1380
|
+
className: "ml-7 text-sm text-gray-600",
|
|
1381
|
+
children: sub.description
|
|
1382
|
+
}),
|
|
1383
|
+
expanded && /* @__PURE__ */ jsxs("div", {
|
|
1384
|
+
className: "mt-4 space-y-3 border-t border-gray-100 pt-4",
|
|
1385
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
1386
|
+
className: "grid grid-cols-2 gap-3",
|
|
1387
|
+
children: [/* @__PURE__ */ jsx(TextField, {
|
|
1388
|
+
compact: true,
|
|
1389
|
+
label: "Name",
|
|
1390
|
+
value: sub.name,
|
|
1391
|
+
onCommit: (v) => props.setSubAgentName(sub.id, v)
|
|
1051
1392
|
}), /* @__PURE__ */ jsx(TextField, {
|
|
1052
1393
|
compact: true,
|
|
1053
|
-
label: "
|
|
1054
|
-
value:
|
|
1055
|
-
|
|
1056
|
-
onCommit: props.setAgentDescription
|
|
1394
|
+
label: "Description",
|
|
1395
|
+
value: sub.description,
|
|
1396
|
+
onCommit: (v) => props.setSubAgentDescription(sub.id, v)
|
|
1057
1397
|
})]
|
|
1398
|
+
}), /* @__PURE__ */ jsx(AgentBindings, {
|
|
1399
|
+
agentId: sub.id,
|
|
1400
|
+
isMain: false,
|
|
1401
|
+
modelId: sub.modelId,
|
|
1402
|
+
profileIds: sub.profileIds,
|
|
1403
|
+
skills: sub.skills,
|
|
1404
|
+
toolPatterns: sub.toolPatterns,
|
|
1405
|
+
models: props.models,
|
|
1406
|
+
profiles: props.profiles,
|
|
1407
|
+
setAgentModel: props.setAgentModel,
|
|
1408
|
+
addAgentProfileRef: props.addAgentProfileRef,
|
|
1409
|
+
removeAgentProfileRef: props.removeAgentProfileRef,
|
|
1410
|
+
reorderAgentProfileRefs: props.reorderAgentProfileRefs,
|
|
1411
|
+
addAgentSkill: props.addAgentSkill,
|
|
1412
|
+
removeAgentSkill: props.removeAgentSkill,
|
|
1413
|
+
addAgentToolPattern: props.addAgentToolPattern,
|
|
1414
|
+
removeAgentToolPattern: props.removeAgentToolPattern
|
|
1058
1415
|
})]
|
|
1059
1416
|
})
|
|
1417
|
+
]
|
|
1418
|
+
});
|
|
1419
|
+
}
|
|
1420
|
+
function AgentBindings(props) {
|
|
1421
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1422
|
+
className: "space-y-3",
|
|
1423
|
+
children: [
|
|
1424
|
+
/* @__PURE__ */ jsxs("label", {
|
|
1425
|
+
className: "block",
|
|
1426
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1427
|
+
className: "text-xs text-gray-600",
|
|
1428
|
+
children: "Model"
|
|
1429
|
+
}), /* @__PURE__ */ jsx("select", {
|
|
1430
|
+
value: props.modelId,
|
|
1431
|
+
onChange: (e) => props.setAgentModel(props.agentId, e.target.value),
|
|
1432
|
+
className: "mt-1 w-full rounded border p-2 font-mono text-sm",
|
|
1433
|
+
children: props.models.map((m) => /* @__PURE__ */ jsx("option", {
|
|
1434
|
+
value: m.id,
|
|
1435
|
+
children: m.id
|
|
1436
|
+
}, m.id))
|
|
1437
|
+
})]
|
|
1438
|
+
}),
|
|
1439
|
+
/* @__PURE__ */ jsx(ProfileRefsEditor, {
|
|
1440
|
+
agentId: props.agentId,
|
|
1441
|
+
profileIds: props.profileIds,
|
|
1442
|
+
allProfiles: props.profiles,
|
|
1443
|
+
onAdd: (profileId) => props.addAgentProfileRef(props.agentId, profileId),
|
|
1444
|
+
onRemove: (profileId) => props.removeAgentProfileRef(props.agentId, profileId),
|
|
1445
|
+
onReorder: (ids, insertBefore) => props.reorderAgentProfileRefs(props.agentId, ids, insertBefore)
|
|
1446
|
+
}),
|
|
1447
|
+
/* @__PURE__ */ jsx(ChipListEditor, {
|
|
1448
|
+
label: "Skills",
|
|
1449
|
+
hint: "Reference skills by name. tpl wins over ext if both exist.",
|
|
1450
|
+
values: props.skills,
|
|
1451
|
+
placeholder: "skill-name",
|
|
1452
|
+
validator: (v) => /^[a-z][a-z0-9-]*$/.test(v),
|
|
1453
|
+
onAdd: (v) => props.addAgentSkill(props.agentId, v),
|
|
1454
|
+
onRemove: (v) => props.removeAgentSkill(props.agentId, v)
|
|
1455
|
+
}),
|
|
1456
|
+
/* @__PURE__ */ jsx(ChipListEditor, {
|
|
1457
|
+
label: "Tool patterns",
|
|
1458
|
+
hint: props.isMain ? "Glob patterns over tool names (e.g. clint-project-*, *-mcp__*). Empty = all tools." : "Glob patterns over tool names. Empty = no tools.",
|
|
1459
|
+
values: props.toolPatterns,
|
|
1460
|
+
placeholder: "pattern*",
|
|
1461
|
+
validator: (v) => v.length > 0,
|
|
1462
|
+
onAdd: (v) => props.addAgentToolPattern(props.agentId, v),
|
|
1463
|
+
onRemove: (v) => props.removeAgentToolPattern(props.agentId, v)
|
|
1464
|
+
})
|
|
1465
|
+
]
|
|
1466
|
+
});
|
|
1467
|
+
}
|
|
1468
|
+
function ProfileRefsEditor(props) {
|
|
1469
|
+
const available = props.allProfiles.filter((p) => !props.profileIds.includes(p.id));
|
|
1470
|
+
const moveUp = (index) => {
|
|
1471
|
+
if (index === 0) return;
|
|
1472
|
+
const id = props.profileIds[index];
|
|
1473
|
+
const beforeId = props.profileIds[index - 1];
|
|
1474
|
+
props.onReorder([id], beforeId);
|
|
1475
|
+
};
|
|
1476
|
+
const moveDown = (index) => {
|
|
1477
|
+
if (index >= props.profileIds.length - 1) return;
|
|
1478
|
+
const id = props.profileIds[index];
|
|
1479
|
+
const afterNext = index + 2 < props.profileIds.length ? props.profileIds[index + 2] : null;
|
|
1480
|
+
props.onReorder([id], afterNext);
|
|
1481
|
+
};
|
|
1482
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
1483
|
+
/* @__PURE__ */ jsx("span", {
|
|
1484
|
+
className: "text-xs text-gray-600",
|
|
1485
|
+
children: "Profiles (instructions, in order)"
|
|
1060
1486
|
}),
|
|
1061
|
-
/* @__PURE__ */
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1487
|
+
/* @__PURE__ */ jsxs("ul", {
|
|
1488
|
+
className: "my-1 space-y-1",
|
|
1489
|
+
children: [props.profileIds.map((profileId, i) => {
|
|
1490
|
+
const profile = props.allProfiles.find((p) => p.id === profileId);
|
|
1491
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
1492
|
+
className: "flex items-center gap-2 rounded bg-gray-50 px-2 py-1",
|
|
1493
|
+
children: [
|
|
1494
|
+
/* @__PURE__ */ jsx("button", {
|
|
1495
|
+
className: "text-gray-400 hover:text-gray-600 disabled:opacity-30",
|
|
1496
|
+
disabled: i === 0,
|
|
1497
|
+
onClick: () => moveUp(i),
|
|
1498
|
+
title: "Move up",
|
|
1499
|
+
children: "↑"
|
|
1500
|
+
}),
|
|
1501
|
+
/* @__PURE__ */ jsx("button", {
|
|
1502
|
+
className: "text-gray-400 hover:text-gray-600 disabled:opacity-30",
|
|
1503
|
+
disabled: i === props.profileIds.length - 1,
|
|
1504
|
+
onClick: () => moveDown(i),
|
|
1505
|
+
title: "Move down",
|
|
1506
|
+
children: "↓"
|
|
1507
|
+
}),
|
|
1508
|
+
/* @__PURE__ */ jsx("span", {
|
|
1509
|
+
className: "font-mono text-xs text-gray-500",
|
|
1510
|
+
children: profileId
|
|
1511
|
+
}),
|
|
1512
|
+
/* @__PURE__ */ jsx("span", {
|
|
1513
|
+
className: "flex-1 text-sm",
|
|
1514
|
+
children: profile?.title ?? /* @__PURE__ */ jsx("em", {
|
|
1515
|
+
className: "text-red-500",
|
|
1516
|
+
children: "(missing in library)"
|
|
1517
|
+
})
|
|
1518
|
+
}),
|
|
1519
|
+
/* @__PURE__ */ jsx("button", {
|
|
1520
|
+
className: "text-sm text-red-500 hover:text-red-700",
|
|
1521
|
+
onClick: () => props.onRemove(profileId),
|
|
1522
|
+
children: "Remove"
|
|
1523
|
+
})
|
|
1524
|
+
]
|
|
1525
|
+
}, profileId);
|
|
1526
|
+
}), props.profileIds.length === 0 && /* @__PURE__ */ jsx("li", {
|
|
1527
|
+
className: "px-2 py-1 text-sm italic text-gray-400",
|
|
1528
|
+
children: "No profiles assigned"
|
|
1529
|
+
})]
|
|
1067
1530
|
}),
|
|
1068
|
-
/* @__PURE__ */
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1531
|
+
available.length > 0 && /* @__PURE__ */ jsxs("select", {
|
|
1532
|
+
value: "",
|
|
1533
|
+
onChange: (e) => {
|
|
1534
|
+
if (e.target.value) props.onAdd(e.target.value);
|
|
1535
|
+
},
|
|
1536
|
+
className: "rounded border p-1 text-sm",
|
|
1537
|
+
children: [/* @__PURE__ */ jsx("option", {
|
|
1538
|
+
value: "",
|
|
1539
|
+
children: "+ Add profile…"
|
|
1540
|
+
}), available.map((p) => /* @__PURE__ */ jsxs("option", {
|
|
1541
|
+
value: p.id,
|
|
1542
|
+
children: [
|
|
1543
|
+
p.title,
|
|
1544
|
+
" (",
|
|
1545
|
+
p.id,
|
|
1546
|
+
")"
|
|
1547
|
+
]
|
|
1548
|
+
}, p.id))]
|
|
1549
|
+
})
|
|
1550
|
+
] });
|
|
1551
|
+
}
|
|
1552
|
+
function ChipListEditor(props) {
|
|
1553
|
+
const [input, setInput] = useState("");
|
|
1554
|
+
const valid = props.validator(input.trim());
|
|
1555
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
1556
|
+
/* @__PURE__ */ jsx("span", {
|
|
1557
|
+
className: "text-xs text-gray-600",
|
|
1558
|
+
children: props.label
|
|
1075
1559
|
}),
|
|
1076
|
-
/* @__PURE__ */ jsx("
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
className: "
|
|
1084
|
-
children: /* @__PURE__ */ jsx(
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1560
|
+
/* @__PURE__ */ jsx("p", {
|
|
1561
|
+
className: "text-xs text-gray-500",
|
|
1562
|
+
children: props.hint
|
|
1563
|
+
}),
|
|
1564
|
+
/* @__PURE__ */ jsx("div", {
|
|
1565
|
+
className: "my-1 flex flex-wrap items-center gap-1",
|
|
1566
|
+
children: props.values.map((v) => /* @__PURE__ */ jsxs("span", {
|
|
1567
|
+
className: "flex items-center gap-1 rounded bg-gray-100 px-2 py-1 font-mono text-xs",
|
|
1568
|
+
children: [v, /* @__PURE__ */ jsx("button", {
|
|
1569
|
+
className: "text-red-500 hover:text-red-700",
|
|
1570
|
+
onClick: () => props.onRemove(v),
|
|
1571
|
+
title: "Remove",
|
|
1572
|
+
children: "×"
|
|
1573
|
+
})]
|
|
1574
|
+
}, v))
|
|
1575
|
+
}),
|
|
1576
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1577
|
+
className: "flex items-center gap-2",
|
|
1578
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
1579
|
+
type: "text",
|
|
1580
|
+
placeholder: props.placeholder,
|
|
1581
|
+
value: input,
|
|
1582
|
+
onChange: (e) => setInput(e.target.value),
|
|
1583
|
+
onKeyDown: (e) => {
|
|
1584
|
+
if (e.key === "Enter" && valid) {
|
|
1585
|
+
props.onAdd(input.trim());
|
|
1586
|
+
setInput("");
|
|
1587
|
+
}
|
|
1588
|
+
},
|
|
1589
|
+
className: "flex-1 rounded border p-1 font-mono text-sm"
|
|
1590
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
1591
|
+
className: "rounded bg-blue-500 px-2 py-1 text-xs text-white hover:bg-blue-600 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1592
|
+
disabled: !valid,
|
|
1593
|
+
onClick: () => {
|
|
1594
|
+
props.onAdd(input.trim());
|
|
1595
|
+
setInput("");
|
|
1596
|
+
},
|
|
1597
|
+
children: "Add"
|
|
1091
1598
|
})]
|
|
1092
1599
|
})
|
|
1093
1600
|
] });
|
|
@@ -1192,6 +1699,12 @@ function AgentImageField(props) {
|
|
|
1192
1699
|
}
|
|
1193
1700
|
function ModelsSection(props) {
|
|
1194
1701
|
const [newModelId, setNewModelId] = useState("");
|
|
1702
|
+
const usersOf = (modelId) => {
|
|
1703
|
+
const u = [];
|
|
1704
|
+
if (props.main?.modelId === modelId) u.push(props.main.id);
|
|
1705
|
+
for (const s of props.subAgents) if (s.modelId === modelId) u.push(s.id);
|
|
1706
|
+
return u;
|
|
1707
|
+
};
|
|
1195
1708
|
const handleAdd = () => {
|
|
1196
1709
|
const id = newModelId.trim();
|
|
1197
1710
|
if (id) {
|
|
@@ -1199,95 +1712,113 @@ function ModelsSection(props) {
|
|
|
1199
1712
|
setNewModelId("");
|
|
1200
1713
|
}
|
|
1201
1714
|
};
|
|
1202
|
-
return /* @__PURE__ */ jsxs("
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1715
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
1716
|
+
/* @__PURE__ */ jsx("h4", {
|
|
1717
|
+
className: "text-sm font-semibold text-gray-700",
|
|
1718
|
+
children: "Models"
|
|
1719
|
+
}),
|
|
1720
|
+
/* @__PURE__ */ jsxs("p", {
|
|
1721
|
+
className: "text-xs text-gray-500",
|
|
1722
|
+
children: [
|
|
1723
|
+
"Provider/model format (e.g. ",
|
|
1724
|
+
/* @__PURE__ */ jsx("code", { children: "anthropic/claude-sonnet-4-5" }),
|
|
1725
|
+
"). Each agent picks one from this list."
|
|
1726
|
+
]
|
|
1727
|
+
}),
|
|
1728
|
+
props.models.length > 0 && /* @__PURE__ */ jsxs("table", {
|
|
1729
|
+
className: "mt-2 w-full text-sm",
|
|
1730
|
+
children: [/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", {
|
|
1731
|
+
className: "border-b text-left text-gray-500",
|
|
1732
|
+
children: [
|
|
1733
|
+
/* @__PURE__ */ jsx("th", {
|
|
1734
|
+
className: "py-1",
|
|
1735
|
+
children: "Model"
|
|
1736
|
+
}),
|
|
1737
|
+
/* @__PURE__ */ jsx("th", {
|
|
1738
|
+
className: "py-1",
|
|
1739
|
+
children: "Used by"
|
|
1740
|
+
}),
|
|
1741
|
+
/* @__PURE__ */ jsx("th", { className: "py-1" })
|
|
1742
|
+
]
|
|
1743
|
+
}) }), /* @__PURE__ */ jsx("tbody", { children: props.models.map((m) => {
|
|
1744
|
+
const users = usersOf(m.id);
|
|
1745
|
+
const inUse = users.length > 0;
|
|
1746
|
+
return /* @__PURE__ */ jsxs("tr", {
|
|
1747
|
+
className: "border-b border-gray-100",
|
|
1217
1748
|
children: [
|
|
1218
|
-
/* @__PURE__ */ jsx("
|
|
1219
|
-
className: "py-
|
|
1220
|
-
children:
|
|
1749
|
+
/* @__PURE__ */ jsx("td", {
|
|
1750
|
+
className: "py-2 font-mono",
|
|
1751
|
+
children: m.id
|
|
1221
1752
|
}),
|
|
1222
|
-
/* @__PURE__ */ jsx("
|
|
1223
|
-
className: "py-
|
|
1224
|
-
children: "
|
|
1753
|
+
/* @__PURE__ */ jsx("td", {
|
|
1754
|
+
className: "py-2 text-xs text-gray-500",
|
|
1755
|
+
children: users.length === 0 ? /* @__PURE__ */ jsx("em", { children: "—" }) : users.join(", ")
|
|
1225
1756
|
}),
|
|
1226
|
-
/* @__PURE__ */ jsx("
|
|
1227
|
-
className: "py-
|
|
1228
|
-
children: "
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
return /* @__PURE__ */ jsxs("tr", {
|
|
1235
|
-
className: "border-b border-gray-100",
|
|
1236
|
-
children: [
|
|
1237
|
-
/* @__PURE__ */ jsx("td", {
|
|
1238
|
-
className: "py-2",
|
|
1239
|
-
children: /* @__PURE__ */ jsx("input", {
|
|
1240
|
-
type: "radio",
|
|
1241
|
-
name: "default-model",
|
|
1242
|
-
checked: m.isDefault,
|
|
1243
|
-
onChange: () => props.setDefaultModel(m.id)
|
|
1244
|
-
})
|
|
1245
|
-
}),
|
|
1246
|
-
/* @__PURE__ */ jsx("td", {
|
|
1247
|
-
className: "py-2 font-mono",
|
|
1248
|
-
children: m.id
|
|
1249
|
-
}),
|
|
1250
|
-
/* @__PURE__ */ jsx("td", {
|
|
1251
|
-
className: "py-2 text-gray-500",
|
|
1252
|
-
children: provider
|
|
1253
|
-
}),
|
|
1254
|
-
/* @__PURE__ */ jsx("td", {
|
|
1255
|
-
className: "py-2 text-right",
|
|
1256
|
-
children: /* @__PURE__ */ jsx("button", {
|
|
1257
|
-
className: "text-red-500 hover:text-red-700",
|
|
1258
|
-
onClick: () => props.removeModel(m.id),
|
|
1259
|
-
children: "Remove"
|
|
1260
|
-
})
|
|
1757
|
+
/* @__PURE__ */ jsx("td", {
|
|
1758
|
+
className: "py-2 text-right",
|
|
1759
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
1760
|
+
className: "text-red-500 hover:text-red-700 disabled:cursor-not-allowed disabled:text-gray-300",
|
|
1761
|
+
disabled: inUse,
|
|
1762
|
+
title: inUse ? `In use by ${users.join(", ")}` : "",
|
|
1763
|
+
onClick: () => props.removeModel(m.id),
|
|
1764
|
+
children: "Remove"
|
|
1261
1765
|
})
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
}
|
|
1265
|
-
})
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
})
|
|
1284
|
-
|
|
1766
|
+
})
|
|
1767
|
+
]
|
|
1768
|
+
}, m.id);
|
|
1769
|
+
}) })]
|
|
1770
|
+
}),
|
|
1771
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1772
|
+
className: "mt-2 flex items-center gap-2",
|
|
1773
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
1774
|
+
type: "text",
|
|
1775
|
+
placeholder: "provider/model-name",
|
|
1776
|
+
value: newModelId,
|
|
1777
|
+
onChange: (e) => setNewModelId(e.target.value),
|
|
1778
|
+
onKeyDown: (e) => {
|
|
1779
|
+
if (e.key === "Enter") handleAdd();
|
|
1780
|
+
},
|
|
1781
|
+
className: "flex-1 rounded border p-2 font-mono text-sm"
|
|
1782
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
1783
|
+
className: "rounded bg-blue-500 px-3 py-2 text-sm text-white hover:bg-blue-600 disabled:opacity-50",
|
|
1784
|
+
disabled: !newModelId.trim(),
|
|
1785
|
+
onClick: handleAdd,
|
|
1786
|
+
children: "Add Model"
|
|
1787
|
+
})]
|
|
1788
|
+
})
|
|
1789
|
+
] });
|
|
1790
|
+
}
|
|
1791
|
+
function ProfilesTab(props) {
|
|
1792
|
+
if (!props.mastra.enabled) return /* @__PURE__ */ jsxs("section", {
|
|
1793
|
+
className: "my-6 rounded border border-dashed border-gray-300 bg-white p-8 text-center text-gray-500",
|
|
1794
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
1795
|
+
className: "text-lg font-semibold",
|
|
1796
|
+
children: "Profiles"
|
|
1797
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
1798
|
+
className: "mt-2",
|
|
1799
|
+
children: "Enable Mastra in the CLI tab to manage agent profiles."
|
|
1800
|
+
})]
|
|
1801
|
+
});
|
|
1802
|
+
return /* @__PURE__ */ jsx(ProfilesSection, {
|
|
1803
|
+
profiles: props.mastra.profiles,
|
|
1804
|
+
main: props.mastra.mainAgent,
|
|
1805
|
+
subAgents: props.mastra.subAgents,
|
|
1806
|
+
addProfile: props.addProfile,
|
|
1807
|
+
updateProfile: props.updateProfile,
|
|
1808
|
+
removeProfile: props.removeProfile,
|
|
1809
|
+
reorderProfiles: props.reorderProfiles
|
|
1285
1810
|
});
|
|
1286
1811
|
}
|
|
1287
1812
|
function ProfilesSection(props) {
|
|
1288
1813
|
const [showAddForm, setShowAddForm] = useState(false);
|
|
1289
1814
|
const [newId, setNewId] = useState("");
|
|
1290
1815
|
const [newTitle, setNewTitle] = useState("");
|
|
1816
|
+
const usersOf = (profileId) => {
|
|
1817
|
+
const u = [];
|
|
1818
|
+
if (props.main?.profileIds.includes(profileId)) u.push(props.main.id);
|
|
1819
|
+
for (const s of props.subAgents) if (s.profileIds.includes(profileId)) u.push(s.id);
|
|
1820
|
+
return u;
|
|
1821
|
+
};
|
|
1291
1822
|
const handleAdd = () => {
|
|
1292
1823
|
const id = newId.trim();
|
|
1293
1824
|
const title = newTitle.trim();
|
|
@@ -1319,64 +1850,78 @@ function ProfilesSection(props) {
|
|
|
1319
1850
|
}),
|
|
1320
1851
|
/* @__PURE__ */ jsx("p", {
|
|
1321
1852
|
className: "text-sm text-gray-600",
|
|
1322
|
-
children: "Markdown sections that compose into
|
|
1853
|
+
children: "Markdown sections that compose into agents' instructions. Reference these from each agent's profile list."
|
|
1323
1854
|
}),
|
|
1324
|
-
props.profiles.map((profile, i) =>
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1855
|
+
props.profiles.map((profile, i) => {
|
|
1856
|
+
const users = usersOf(profile.id);
|
|
1857
|
+
const inUse = users.length > 0;
|
|
1858
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1859
|
+
className: "my-3 rounded border border-gray-200 bg-white p-4",
|
|
1328
1860
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
1329
|
-
className: "flex items-center
|
|
1330
|
-
children: [/* @__PURE__ */
|
|
1331
|
-
className: "
|
|
1332
|
-
children:
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1861
|
+
className: "flex items-center justify-between",
|
|
1862
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
1863
|
+
className: "flex items-center gap-2",
|
|
1864
|
+
children: [
|
|
1865
|
+
/* @__PURE__ */ jsx("span", {
|
|
1866
|
+
className: "rounded bg-gray-100 px-2 py-0.5 font-mono text-xs text-gray-500",
|
|
1867
|
+
children: profile.id
|
|
1868
|
+
}),
|
|
1869
|
+
/* @__PURE__ */ jsx("input", {
|
|
1870
|
+
type: "text",
|
|
1871
|
+
defaultValue: profile.title,
|
|
1872
|
+
onBlur: (e) => {
|
|
1873
|
+
const next = e.target.value.trim();
|
|
1874
|
+
if (next && next !== profile.title) props.updateProfile(profile.id, next);
|
|
1875
|
+
},
|
|
1876
|
+
onKeyDown: (e) => {
|
|
1877
|
+
if (e.key === "Enter") e.currentTarget.blur();
|
|
1878
|
+
},
|
|
1879
|
+
className: "border-b border-transparent font-semibold hover:border-gray-300 focus:border-blue-500"
|
|
1880
|
+
}),
|
|
1881
|
+
users.length > 0 && /* @__PURE__ */ jsxs("span", {
|
|
1882
|
+
className: "rounded bg-blue-50 px-2 py-0.5 text-xs text-blue-700",
|
|
1883
|
+
title: users.join(", "),
|
|
1884
|
+
children: ["used by: ", users.join(", ")]
|
|
1885
|
+
})
|
|
1886
|
+
]
|
|
1887
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
1888
|
+
className: "flex items-center gap-1",
|
|
1889
|
+
children: [
|
|
1890
|
+
/* @__PURE__ */ jsx("button", {
|
|
1891
|
+
className: "px-1 text-gray-400 hover:text-gray-600 disabled:opacity-30",
|
|
1892
|
+
disabled: i === 0,
|
|
1893
|
+
onClick: () => moveUp(i),
|
|
1894
|
+
title: "Move up",
|
|
1895
|
+
children: "↑"
|
|
1896
|
+
}),
|
|
1897
|
+
/* @__PURE__ */ jsx("button", {
|
|
1898
|
+
className: "px-1 text-gray-400 hover:text-gray-600 disabled:opacity-30",
|
|
1899
|
+
disabled: i === props.profiles.length - 1,
|
|
1900
|
+
onClick: () => moveDown(i),
|
|
1901
|
+
title: "Move down",
|
|
1902
|
+
children: "↓"
|
|
1903
|
+
}),
|
|
1904
|
+
/* @__PURE__ */ jsx("button", {
|
|
1905
|
+
className: "ml-2 text-sm text-red-500 hover:text-red-700 disabled:cursor-not-allowed disabled:text-gray-300",
|
|
1906
|
+
disabled: inUse,
|
|
1907
|
+
title: inUse ? `In use by ${users.join(", ")}` : "",
|
|
1908
|
+
onClick: () => props.removeProfile(profile.id),
|
|
1909
|
+
children: "Remove"
|
|
1910
|
+
})
|
|
1911
|
+
]
|
|
1344
1912
|
})]
|
|
1345
|
-
}), /* @__PURE__ */
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
}),
|
|
1355
|
-
/* @__PURE__ */ jsx("button", {
|
|
1356
|
-
className: "px-1 text-gray-400 hover:text-gray-600 disabled:opacity-30",
|
|
1357
|
-
disabled: i === props.profiles.length - 1,
|
|
1358
|
-
onClick: () => moveDown(i),
|
|
1359
|
-
title: "Move down",
|
|
1360
|
-
children: "↓"
|
|
1361
|
-
}),
|
|
1362
|
-
/* @__PURE__ */ jsx("button", {
|
|
1363
|
-
className: "ml-2 text-sm text-red-500 hover:text-red-700",
|
|
1364
|
-
onClick: () => props.removeProfile(profile.id),
|
|
1365
|
-
children: "Remove"
|
|
1366
|
-
})
|
|
1367
|
-
]
|
|
1913
|
+
}), /* @__PURE__ */ jsx("textarea", {
|
|
1914
|
+
defaultValue: profile.content,
|
|
1915
|
+
onBlur: (e) => {
|
|
1916
|
+
const next = e.target.value;
|
|
1917
|
+
if (next !== profile.content) props.updateProfile(profile.id, void 0, next);
|
|
1918
|
+
},
|
|
1919
|
+
placeholder: "Markdown content for this profile section...",
|
|
1920
|
+
rows: 4,
|
|
1921
|
+
className: "mt-2 w-full rounded border border-gray-200 p-2 font-mono text-sm"
|
|
1368
1922
|
})]
|
|
1369
|
-
}
|
|
1370
|
-
|
|
1371
|
-
onBlur: (e) => {
|
|
1372
|
-
const next = e.target.value;
|
|
1373
|
-
if (next !== profile.content) props.updateProfile(profile.id, void 0, next);
|
|
1374
|
-
},
|
|
1375
|
-
placeholder: "Markdown content for this profile section...",
|
|
1376
|
-
rows: 4,
|
|
1377
|
-
className: "mt-2 w-full rounded border border-gray-200 p-2 font-mono text-sm"
|
|
1378
|
-
})]
|
|
1379
|
-
}, profile.id)),
|
|
1923
|
+
}, profile.id);
|
|
1924
|
+
}),
|
|
1380
1925
|
showAddForm ? /* @__PURE__ */ jsx("div", {
|
|
1381
1926
|
className: "my-3 rounded border border-blue-200 bg-blue-50 p-4",
|
|
1382
1927
|
children: /* @__PURE__ */ jsxs("div", {
|
|
@@ -1513,8 +2058,28 @@ function ExternalSkillsSection(props) {
|
|
|
1513
2058
|
]
|
|
1514
2059
|
});
|
|
1515
2060
|
}
|
|
2061
|
+
function PowerhouseTab(props) {
|
|
2062
|
+
if (!props.isAboveDisabled) return /* @__PURE__ */ jsxs("section", {
|
|
2063
|
+
className: "my-6 rounded border border-dashed border-gray-300 bg-white p-8 text-center text-gray-500",
|
|
2064
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
2065
|
+
className: "text-lg font-semibold",
|
|
2066
|
+
children: "Powerhouse"
|
|
2067
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
2068
|
+
className: "mt-2",
|
|
2069
|
+
children: "Enable Powerhouse in the CLI tab (set level to Reactor or above) to manage packages."
|
|
2070
|
+
})]
|
|
2071
|
+
});
|
|
2072
|
+
return /* @__PURE__ */ jsx(PackagesSection, {
|
|
2073
|
+
packages: props.packages,
|
|
2074
|
+
addPackage: props.addPackage,
|
|
2075
|
+
removePackage: props.removePackage,
|
|
2076
|
+
addDocType: props.addDocType,
|
|
2077
|
+
removeDocType: props.removeDocType
|
|
2078
|
+
});
|
|
2079
|
+
}
|
|
1516
2080
|
function PublishTab(props) {
|
|
1517
2081
|
const recentHistory = props.publishHistory.slice(-5).reverse();
|
|
2082
|
+
const nextPatch = bumpPatch(props.version);
|
|
1518
2083
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1519
2084
|
/* @__PURE__ */ jsxs("section", {
|
|
1520
2085
|
className: "my-6",
|
|
@@ -1525,35 +2090,56 @@ function PublishTab(props) {
|
|
|
1525
2090
|
}),
|
|
1526
2091
|
/* @__PURE__ */ jsxs("div", {
|
|
1527
2092
|
className: "my-3 rounded border border-gray-200 bg-white p-4",
|
|
1528
|
-
children: [
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
children: "
|
|
1544
|
-
}),
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
2093
|
+
children: [
|
|
2094
|
+
/* @__PURE__ */ jsxs("div", {
|
|
2095
|
+
className: "flex items-center gap-4",
|
|
2096
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
2097
|
+
className: "text-sm text-gray-600",
|
|
2098
|
+
children: "Current version:"
|
|
2099
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
2100
|
+
className: "font-mono font-semibold",
|
|
2101
|
+
children: props.version
|
|
2102
|
+
})]
|
|
2103
|
+
}),
|
|
2104
|
+
/* @__PURE__ */ jsxs("div", {
|
|
2105
|
+
className: "mt-3 flex items-center gap-2",
|
|
2106
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
2107
|
+
className: "text-sm text-gray-600",
|
|
2108
|
+
children: "Bump version to:"
|
|
2109
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
2110
|
+
type: "text",
|
|
2111
|
+
placeholder: nextPatch,
|
|
2112
|
+
onKeyDown: (e) => {
|
|
2113
|
+
if (e.key === "Enter") {
|
|
2114
|
+
const v = e.currentTarget.value.trim();
|
|
2115
|
+
if (v) props.bumpVersion(v);
|
|
2116
|
+
e.currentTarget.value = "";
|
|
2117
|
+
}
|
|
2118
|
+
},
|
|
2119
|
+
className: "rounded border p-1 font-mono text-sm"
|
|
2120
|
+
})]
|
|
2121
|
+
}),
|
|
2122
|
+
/* @__PURE__ */ jsxs("div", {
|
|
2123
|
+
className: "mt-4 flex items-center gap-2",
|
|
2124
|
+
children: [
|
|
2125
|
+
/* @__PURE__ */ jsx("button", {
|
|
2126
|
+
className: "rounded bg-gray-600 px-3 py-2 text-sm text-white hover:bg-gray-700",
|
|
2127
|
+
onClick: props.publishDev,
|
|
2128
|
+
children: "Publish Dev"
|
|
2129
|
+
}),
|
|
2130
|
+
/* @__PURE__ */ jsx("button", {
|
|
2131
|
+
className: "rounded bg-amber-600 px-3 py-2 text-sm text-white hover:bg-amber-700",
|
|
2132
|
+
onClick: props.publishStaging,
|
|
2133
|
+
children: "Publish Staging"
|
|
2134
|
+
}),
|
|
2135
|
+
/* @__PURE__ */ jsx("button", {
|
|
2136
|
+
className: "rounded bg-green-600 px-3 py-2 text-sm text-white hover:bg-green-700",
|
|
2137
|
+
onClick: props.publishProduction,
|
|
2138
|
+
children: "Publish Production"
|
|
2139
|
+
})
|
|
2140
|
+
]
|
|
2141
|
+
})
|
|
2142
|
+
]
|
|
1557
2143
|
}),
|
|
1558
2144
|
recentHistory.length > 0 && /* @__PURE__ */ jsxs("div", {
|
|
1559
2145
|
className: "mt-3",
|
|
@@ -1594,44 +2180,31 @@ function PublishTab(props) {
|
|
|
1594
2180
|
}),
|
|
1595
2181
|
/* @__PURE__ */ jsx("hr", {}),
|
|
1596
2182
|
/* @__PURE__ */ jsxs("section", {
|
|
1597
|
-
className: "my-6
|
|
1598
|
-
children: [/* @__PURE__ */
|
|
1599
|
-
className: "text-
|
|
1600
|
-
children: "Document
|
|
1601
|
-
}), /* @__PURE__ */
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
2183
|
+
className: "my-6",
|
|
2184
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
2185
|
+
className: "text-lg font-semibold",
|
|
2186
|
+
children: "Document"
|
|
2187
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
2188
|
+
className: "my-3 rounded border border-gray-200 bg-white p-4",
|
|
2189
|
+
children: [/* @__PURE__ */ jsxs("p", {
|
|
2190
|
+
className: "text-sm text-gray-600",
|
|
2191
|
+
children: ["Document ID: ", /* @__PURE__ */ jsx("span", {
|
|
2192
|
+
className: "font-mono",
|
|
2193
|
+
children: props.documentHeader.id
|
|
2194
|
+
})]
|
|
2195
|
+
}), /* @__PURE__ */ jsxs("p", {
|
|
2196
|
+
className: "text-sm text-gray-600",
|
|
2197
|
+
children: ["Type: ", /* @__PURE__ */ jsx("span", {
|
|
2198
|
+
className: "font-mono",
|
|
2199
|
+
children: props.documentHeader.documentType
|
|
2200
|
+
})]
|
|
2201
|
+
})]
|
|
2202
|
+
})]
|
|
1614
2203
|
})
|
|
1615
2204
|
] });
|
|
1616
2205
|
}
|
|
1617
|
-
const KNOWN_RESOURCES = [
|
|
1618
|
-
"vetra-agent-s",
|
|
1619
|
-
"vetra-agent-m",
|
|
1620
|
-
"vetra-agent-l",
|
|
1621
|
-
"vetra-agent-xl",
|
|
1622
|
-
"vetra-agent-xxl"
|
|
1623
|
-
];
|
|
1624
2206
|
function DeploymentSection(props) {
|
|
1625
2207
|
const [newResource, setNewResource] = useState("");
|
|
1626
|
-
const { deployment } = props;
|
|
1627
|
-
const customResources = deployment.supportedResources.filter((r) => !KNOWN_RESOURCES.includes(r));
|
|
1628
|
-
const handleAddCustom = () => {
|
|
1629
|
-
const resource = newResource.trim();
|
|
1630
|
-
if (resource) {
|
|
1631
|
-
props.addSupportedResource(resource);
|
|
1632
|
-
setNewResource("");
|
|
1633
|
-
}
|
|
1634
|
-
};
|
|
1635
2208
|
return /* @__PURE__ */ jsxs("section", {
|
|
1636
2209
|
className: "my-6",
|
|
1637
2210
|
children: [
|
|
@@ -1640,17 +2213,17 @@ function DeploymentSection(props) {
|
|
|
1640
2213
|
children: "Deployment"
|
|
1641
2214
|
}),
|
|
1642
2215
|
/* @__PURE__ */ jsxs("div", {
|
|
1643
|
-
className: "my-3 rounded border border-gray-200 bg-white p-4
|
|
2216
|
+
className: "my-3 rounded border border-gray-200 bg-white p-4",
|
|
1644
2217
|
children: [/* @__PURE__ */ jsx(Toggle, {
|
|
1645
|
-
label: "Proxy",
|
|
1646
|
-
checked: deployment.proxyEnabled,
|
|
1647
|
-
|
|
1648
|
-
|
|
2218
|
+
label: "Proxy enabled",
|
|
2219
|
+
checked: props.deployment.proxyEnabled,
|
|
2220
|
+
onChange: props.setProxyEnabled,
|
|
2221
|
+
hint: "Embedded reverse proxy"
|
|
1649
2222
|
}), /* @__PURE__ */ jsx(Toggle, {
|
|
1650
|
-
label: "Observability",
|
|
1651
|
-
checked: deployment.observabilityEnabled,
|
|
1652
|
-
|
|
1653
|
-
|
|
2223
|
+
label: "Observability enabled",
|
|
2224
|
+
checked: props.deployment.observabilityEnabled,
|
|
2225
|
+
onChange: props.setObservabilityEnabled,
|
|
2226
|
+
hint: "Sentry + OpenTelemetry"
|
|
1654
2227
|
})]
|
|
1655
2228
|
}),
|
|
1656
2229
|
/* @__PURE__ */ jsxs("div", {
|
|
@@ -1658,67 +2231,43 @@ function DeploymentSection(props) {
|
|
|
1658
2231
|
children: [
|
|
1659
2232
|
/* @__PURE__ */ jsx("h4", {
|
|
1660
2233
|
className: "text-base font-semibold",
|
|
1661
|
-
children: "Supported
|
|
1662
|
-
}),
|
|
1663
|
-
/* @__PURE__ */ jsx("p", {
|
|
1664
|
-
className: "text-sm text-gray-600",
|
|
1665
|
-
children: "Resource tiers this project supports."
|
|
1666
|
-
}),
|
|
1667
|
-
/* @__PURE__ */ jsx("div", {
|
|
1668
|
-
className: "mt-3 space-y-1",
|
|
1669
|
-
children: KNOWN_RESOURCES.map((resource) => {
|
|
1670
|
-
const checked = deployment.supportedResources.includes(resource);
|
|
1671
|
-
return /* @__PURE__ */ jsxs("label", {
|
|
1672
|
-
className: "flex items-center gap-2",
|
|
1673
|
-
children: [/* @__PURE__ */ jsx("input", {
|
|
1674
|
-
type: "checkbox",
|
|
1675
|
-
checked,
|
|
1676
|
-
onChange: () => {
|
|
1677
|
-
if (checked) props.removeSupportedResource(resource);
|
|
1678
|
-
else props.addSupportedResource(resource);
|
|
1679
|
-
}
|
|
1680
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
1681
|
-
className: "font-mono text-sm",
|
|
1682
|
-
children: resource
|
|
1683
|
-
})]
|
|
1684
|
-
}, resource);
|
|
1685
|
-
})
|
|
2234
|
+
children: "Supported resources"
|
|
1686
2235
|
}),
|
|
1687
|
-
|
|
1688
|
-
className: "
|
|
1689
|
-
children:
|
|
1690
|
-
className: "
|
|
1691
|
-
children: "
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
className: "
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
className: "text-xs text-red-400 hover:text-red-600",
|
|
1701
|
-
onClick: () => props.removeSupportedResource(resource),
|
|
1702
|
-
children: "x"
|
|
1703
|
-
})]
|
|
1704
|
-
}, resource))
|
|
1705
|
-
})]
|
|
2236
|
+
/* @__PURE__ */ jsx("ul", {
|
|
2237
|
+
className: "my-2 space-y-1",
|
|
2238
|
+
children: props.deployment.supportedResources.map((r) => /* @__PURE__ */ jsxs("li", {
|
|
2239
|
+
className: "flex items-center justify-between text-sm",
|
|
2240
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
2241
|
+
className: "font-mono",
|
|
2242
|
+
children: r
|
|
2243
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
2244
|
+
className: "text-red-500 hover:text-red-700",
|
|
2245
|
+
onClick: () => props.removeSupportedResource(r),
|
|
2246
|
+
children: "Remove"
|
|
2247
|
+
})]
|
|
2248
|
+
}, r))
|
|
1706
2249
|
}),
|
|
1707
2250
|
/* @__PURE__ */ jsxs("div", {
|
|
1708
|
-
className: "mt-
|
|
2251
|
+
className: "mt-2 flex items-center gap-2",
|
|
1709
2252
|
children: [/* @__PURE__ */ jsx("input", {
|
|
1710
2253
|
type: "text",
|
|
1711
|
-
placeholder: "
|
|
2254
|
+
placeholder: "vetra-agent-...",
|
|
1712
2255
|
value: newResource,
|
|
1713
2256
|
onChange: (e) => setNewResource(e.target.value),
|
|
1714
2257
|
onKeyDown: (e) => {
|
|
1715
|
-
if (e.key === "Enter"
|
|
2258
|
+
if (e.key === "Enter" && newResource.trim()) {
|
|
2259
|
+
props.addSupportedResource(newResource.trim());
|
|
2260
|
+
setNewResource("");
|
|
2261
|
+
}
|
|
1716
2262
|
},
|
|
1717
|
-
className: "flex-1 rounded border p-
|
|
2263
|
+
className: "flex-1 rounded border p-1 font-mono text-sm"
|
|
1718
2264
|
}), /* @__PURE__ */ jsx("button", {
|
|
1719
|
-
className: "rounded bg-blue-500 px-
|
|
2265
|
+
className: "rounded bg-blue-500 px-2 py-1 text-xs text-white hover:bg-blue-600 disabled:opacity-50",
|
|
1720
2266
|
disabled: !newResource.trim(),
|
|
1721
|
-
onClick:
|
|
2267
|
+
onClick: () => {
|
|
2268
|
+
props.addSupportedResource(newResource.trim());
|
|
2269
|
+
setNewResource("");
|
|
2270
|
+
},
|
|
1722
2271
|
children: "Add"
|
|
1723
2272
|
})]
|
|
1724
2273
|
})
|
|
@@ -1728,17 +2277,13 @@ function DeploymentSection(props) {
|
|
|
1728
2277
|
});
|
|
1729
2278
|
}
|
|
1730
2279
|
function PackagesSection(props) {
|
|
1731
|
-
const [
|
|
2280
|
+
const [newPackage, setNewPackage] = useState("");
|
|
1732
2281
|
return /* @__PURE__ */ jsxs("section", {
|
|
1733
2282
|
className: "my-6",
|
|
1734
2283
|
children: [
|
|
1735
2284
|
/* @__PURE__ */ jsx("h3", {
|
|
1736
2285
|
className: "text-lg font-semibold",
|
|
1737
|
-
children: "
|
|
1738
|
-
}),
|
|
1739
|
-
/* @__PURE__ */ jsx("p", {
|
|
1740
|
-
className: "text-sm text-gray-600",
|
|
1741
|
-
children: "Reactor packages and their document types. Managed packages are framework-controlled."
|
|
2286
|
+
children: "Reactor Packages"
|
|
1742
2287
|
}),
|
|
1743
2288
|
props.packages.map((pkg) => /* @__PURE__ */ jsx(PackageCard, {
|
|
1744
2289
|
pkg,
|
|
@@ -1747,25 +2292,25 @@ function PackagesSection(props) {
|
|
|
1747
2292
|
removePackage: props.removePackage
|
|
1748
2293
|
}, pkg.id)),
|
|
1749
2294
|
/* @__PURE__ */ jsxs("div", {
|
|
1750
|
-
className: "
|
|
2295
|
+
className: "my-3 flex items-center gap-2",
|
|
1751
2296
|
children: [/* @__PURE__ */ jsx("input", {
|
|
1752
2297
|
type: "text",
|
|
1753
|
-
placeholder: "@
|
|
1754
|
-
value:
|
|
1755
|
-
onChange: (e) =>
|
|
2298
|
+
placeholder: "@scope/package-name",
|
|
2299
|
+
value: newPackage,
|
|
2300
|
+
onChange: (e) => setNewPackage(e.target.value),
|
|
1756
2301
|
onKeyDown: (e) => {
|
|
1757
|
-
if (e.key === "Enter" &&
|
|
1758
|
-
props.addPackage(
|
|
1759
|
-
|
|
2302
|
+
if (e.key === "Enter" && newPackage.trim()) {
|
|
2303
|
+
props.addPackage(newPackage.trim());
|
|
2304
|
+
setNewPackage("");
|
|
1760
2305
|
}
|
|
1761
2306
|
},
|
|
1762
2307
|
className: "flex-1 rounded border p-2 font-mono text-sm"
|
|
1763
2308
|
}), /* @__PURE__ */ jsx("button", {
|
|
1764
2309
|
className: "rounded bg-blue-500 px-3 py-2 text-sm text-white hover:bg-blue-600 disabled:opacity-50",
|
|
1765
|
-
disabled: !
|
|
2310
|
+
disabled: !newPackage.trim(),
|
|
1766
2311
|
onClick: () => {
|
|
1767
|
-
props.addPackage(
|
|
1768
|
-
|
|
2312
|
+
props.addPackage(newPackage.trim());
|
|
2313
|
+
setNewPackage("");
|
|
1769
2314
|
},
|
|
1770
2315
|
children: "Add Package"
|
|
1771
2316
|
})]
|
|
@@ -1775,8 +2320,6 @@ function PackagesSection(props) {
|
|
|
1775
2320
|
}
|
|
1776
2321
|
function PackageCard(props) {
|
|
1777
2322
|
const [newDocType, setNewDocType] = useState("");
|
|
1778
|
-
const { pkg } = props;
|
|
1779
|
-
const hasWildcard = pkg.documentTypes.includes("*/*");
|
|
1780
2323
|
return /* @__PURE__ */ jsxs("div", {
|
|
1781
2324
|
className: "my-3 rounded border border-gray-200 bg-white p-4",
|
|
1782
2325
|
children: [
|
|
@@ -1785,58 +2328,58 @@ function PackageCard(props) {
|
|
|
1785
2328
|
children: [/* @__PURE__ */ jsxs("div", { children: [
|
|
1786
2329
|
/* @__PURE__ */ jsx("span", {
|
|
1787
2330
|
className: "font-mono font-semibold",
|
|
1788
|
-
children: pkg.packageName
|
|
2331
|
+
children: props.pkg.packageName
|
|
1789
2332
|
}),
|
|
1790
|
-
pkg.managed && /* @__PURE__ */ jsx("span", {
|
|
2333
|
+
props.pkg.managed && /* @__PURE__ */ jsx("span", {
|
|
1791
2334
|
className: "ml-2 rounded bg-blue-100 px-2 py-0.5 text-xs text-blue-700",
|
|
1792
2335
|
children: "managed"
|
|
1793
2336
|
}),
|
|
1794
|
-
pkg.version && /* @__PURE__ */ jsxs("span", {
|
|
1795
|
-
className: "ml-2 text-
|
|
1796
|
-
children: ["v", pkg.version]
|
|
2337
|
+
props.pkg.version && /* @__PURE__ */ jsxs("span", {
|
|
2338
|
+
className: "ml-2 text-sm text-gray-500",
|
|
2339
|
+
children: ["v", props.pkg.version]
|
|
1797
2340
|
})
|
|
1798
|
-
] }), !pkg.managed && /* @__PURE__ */ jsx("button", {
|
|
2341
|
+
] }), !props.pkg.managed && /* @__PURE__ */ jsx("button", {
|
|
1799
2342
|
className: "text-sm text-red-500 hover:text-red-700",
|
|
1800
|
-
onClick: () => props.removePackage(pkg.id),
|
|
1801
|
-
children: "Remove"
|
|
2343
|
+
onClick: () => props.removePackage(props.pkg.id),
|
|
2344
|
+
children: "Remove Package"
|
|
1802
2345
|
})]
|
|
1803
2346
|
}),
|
|
1804
|
-
|
|
1805
|
-
className: "
|
|
1806
|
-
children: pkg.documentTypes.map((dt) => /* @__PURE__ */ jsxs("li", {
|
|
1807
|
-
className: "flex items-center
|
|
2347
|
+
/* @__PURE__ */ jsx("ul", {
|
|
2348
|
+
className: "my-2 space-y-1",
|
|
2349
|
+
children: props.pkg.documentTypes.map((dt) => /* @__PURE__ */ jsxs("li", {
|
|
2350
|
+
className: "flex items-center justify-between text-sm",
|
|
1808
2351
|
children: [/* @__PURE__ */ jsx("span", {
|
|
1809
2352
|
className: "font-mono",
|
|
1810
|
-
children: dt
|
|
2353
|
+
children: dt
|
|
1811
2354
|
}), /* @__PURE__ */ jsx("button", {
|
|
1812
|
-
className: "text-
|
|
1813
|
-
onClick: () => props.removeDocType(pkg.id, dt),
|
|
1814
|
-
children: "
|
|
2355
|
+
className: "text-red-500 hover:text-red-700",
|
|
2356
|
+
onClick: () => props.removeDocType(props.pkg.id, dt),
|
|
2357
|
+
children: "×"
|
|
1815
2358
|
})]
|
|
1816
2359
|
}, dt))
|
|
1817
2360
|
}),
|
|
1818
|
-
|
|
2361
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1819
2362
|
className: "mt-2 flex items-center gap-2",
|
|
1820
2363
|
children: [/* @__PURE__ */ jsx("input", {
|
|
1821
2364
|
type: "text",
|
|
1822
|
-
placeholder: "org/
|
|
2365
|
+
placeholder: "org/doc-type or */*",
|
|
1823
2366
|
value: newDocType,
|
|
1824
2367
|
onChange: (e) => setNewDocType(e.target.value),
|
|
1825
2368
|
onKeyDown: (e) => {
|
|
1826
2369
|
if (e.key === "Enter" && newDocType.trim()) {
|
|
1827
|
-
props.addDocType(pkg.id, newDocType.trim());
|
|
2370
|
+
props.addDocType(props.pkg.id, newDocType.trim());
|
|
1828
2371
|
setNewDocType("");
|
|
1829
2372
|
}
|
|
1830
2373
|
},
|
|
1831
2374
|
className: "flex-1 rounded border p-1 font-mono text-sm"
|
|
1832
2375
|
}), /* @__PURE__ */ jsx("button", {
|
|
1833
|
-
className: "
|
|
2376
|
+
className: "rounded bg-blue-500 px-2 py-1 text-xs text-white hover:bg-blue-600 disabled:opacity-50",
|
|
1834
2377
|
disabled: !newDocType.trim(),
|
|
1835
2378
|
onClick: () => {
|
|
1836
|
-
props.addDocType(pkg.id, newDocType.trim());
|
|
2379
|
+
props.addDocType(props.pkg.id, newDocType.trim());
|
|
1837
2380
|
setNewDocType("");
|
|
1838
2381
|
},
|
|
1839
|
-
children: "
|
|
2382
|
+
children: "Add Doc Type"
|
|
1840
2383
|
})]
|
|
1841
2384
|
})
|
|
1842
2385
|
]
|
|
@@ -1844,16 +2387,11 @@ function PackageCard(props) {
|
|
|
1844
2387
|
}
|
|
1845
2388
|
function StatusBadge(props) {
|
|
1846
2389
|
return /* @__PURE__ */ jsx("span", {
|
|
1847
|
-
className: `rounded px-2 py-0.5 text-xs ${
|
|
1848
|
-
Pending: "bg-yellow-100 text-yellow-700",
|
|
1849
|
-
InProgress: "bg-blue-100 text-blue-700",
|
|
1850
|
-
Succeeded: "bg-green-100 text-green-700",
|
|
1851
|
-
Failed: "bg-red-100 text-red-700"
|
|
1852
|
-
}[props.status] ?? "bg-gray-100 text-gray-700"}`,
|
|
2390
|
+
className: `rounded px-2 py-0.5 text-xs ${props.status === "Succeeded" ? "bg-green-100 text-green-700" : props.status === "Failed" ? "bg-red-100 text-red-700" : props.status === "InProgress" ? "bg-amber-100 text-amber-700" : "bg-gray-100 text-gray-700"}`,
|
|
1853
2391
|
children: props.status
|
|
1854
2392
|
});
|
|
1855
2393
|
}
|
|
1856
2394
|
//#endregion
|
|
1857
2395
|
export { Editor as default };
|
|
1858
2396
|
|
|
1859
|
-
//# sourceMappingURL=editor-
|
|
2397
|
+
//# sourceMappingURL=editor-Z7QJIYOp.js.map
|