feat(augment): Phase C -- SonataFlow approval workflow integration#3233
Conversation
|
Important This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior. Changed Packages
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3233 +/- ##
==========================================
- Coverage 53.78% 46.36% -7.42%
==========================================
Files 2362 641 -1721
Lines 84847 36899 -47948
Branches 23510 11623 -11887
==========================================
- Hits 45634 17110 -28524
+ Misses 37755 19722 -18033
+ Partials 1458 67 -1391
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
f6e99f0 to
6cdaf16
Compare
…1-C4) - C1: Add AgentApprovalWorkflowService for SonataFlow integration with CloudEvents-based decision sending and workflow lifecycle - C2: Wire dual-mode approval into router.ts and add agentApproval config schema to config.d.ts - C3: Add PUT /agents/:agentId/request-unpublish endpoint with pendingAction tracking and optional SonataFlow workflow start - C4: Add PUT /agents/:agentId/withdraw endpoint for owners to cancel pending requests Also updates SESSION_WORK_LOG.md to mark phases A, B, H as complete.
6cdaf16 to
b5fc2e8
Compare
- D1: Config-seeded agent discovery fallback in KagentiProvider -- when API returns 0 agents, uses augment.kagenti.agents config to fetch agent cards as fallback - D2: SSE streaming already implemented (chatStream with fallback) - D3: TLS fix in DevSpacesService -- use undici.Agent with rejectUnauthorized:false for self-signed cluster certs - D4: Add resolveNamespaceForUser() to derive DevSpaces namespace from Backstage user entity ref (user:default/jsmith -> jsmith-devspaces)
…nd routes - E1: Add augment.skillsMarketplace config to app-config.yaml with runtimes (DocsClaw, ZeroClaw, OpenFang) and marketplace endpoints - E2: Add chatEndpoint field to ChatAgentConfig and ChatAgent interfaces for skill agents with direct chat endpoints - E3: Create skillsRoutes.ts with GET /skills (proxy to marketplace), GET /skills/runtimes (from config), GET /skills/domains (extracted) - Register skills routes in router.ts and routes index - Regenerate API reports for augment-common
- E4: K8s manifest builder (skillsManifestBuilder.ts) with init container for OCI skill extraction, DocsClaw runtime, Service, and ConfigMap - E5: LLM secret manifest generation in buildManifests - E6: Governance registration for skill agents via POST /agents/from-skills with chatEndpoint and framework:'docsclaw' - E7: Chat proxy placeholder (TODO in skillsRoutes) - E8: K8s cleanup placeholder (TODO in agentRoutes DELETE handler) - E9: Frontend components -- RuntimePicker, SkillBrowser, SkillAgentConfigForm - C2 gap: Add agentApproval config section to app-config.yaml - C4 gap: Call cancelWorkflow on withdraw when SonataFlow is enabled
…llBrowser, G1 validation polish
- Use localeCompare for domain sort (SonarCloud S2871 reliability bug)
- Use toLocaleLowerCase('en-US') instead of toLowerCase (ESLint)
- G1: Add End node warning and disconnected agent detection in PublishDialog
- F1: Redesign AgentCreateIntentDialog with two top-level cards and 2x2 sub-option grid using theme.palette colors - F2: All creation flows end on My Agents tab - F3: Skill Agent badge and chatEndpoint display in WorkflowAgentDetail, DocsClaw framework label/color in marketplace constants - Fix nested ternaries (ESLint no-nested-ternary) with helper functions
|
@jordigilh: changing LGTM is restricted to collaborators DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
046dbba to
4502bc2
Compare
…-code builder Skills-based agent creation: - K8s deploy via OpenShift API with init container OCI V2 flow - Skill chat proxy via K8s service proxy - Deploy progress UX with pod readiness polling - Live agent info endpoint (health, skills, system prompt) Agent lifecycle (Draft -> Pending -> Published -> Archived): - Review Queue: Approve and Publish / Reject / Approve Removal / Keep Published - SonataFlow dual-mode with callback loop prevention - Agent Registry: In Review Queue chip, bulk workflow guard, skill runtime info No-code builder: onPublish stays draft, Edit in Builder, save indicator DevSpaces: framework picker from API, K8s creds from app-config, Open DevSpace button
4502bc2 to
cbefade
Compare
PreviewChatPanel.tsx was missing X-Backstage-Request header on the
POST /workflows/{id}/run/stream call, causing 403 in the builder's
chat preview panel.
- Auto-save workflow to backend before opening preview (PUT then POST fallback) - User-friendly error messages in preview chat (404 -> save-first hint, 403 -> permissions) - Persist error shown as Snackbar if auto-save fails - Fix FEATURE_SPEC.md prettier formatting (CI blocker)
Regenerated knip-report.md to match CI expectations after useAgentTemplates.ts changes (catalog-model now unlisted dependency).
- Toolbar button: "Publish" -> "Save to My Agents" (green, with tooltip) - Back button: "Back to Marketplace" -> "Back to My Agents" - Matches actual behavior: saves workflow as draft, lands on My Agents tab
Delete, rename, duplicate, and create workflow calls in WorkflowDashboard.tsx and ChatView.onCreateWorkflow were all missing the X-Backstage-Request header, causing silent 403 failures.
Agent Registry: - Add delete button for draft agents (trash icon with confirmation dialog) - Guard bulk Publish/Unpublish by stage (only pending->published, published->pending) - Tooltips explain why bulk actions are disabled - Simplify unregistered agent banner text CI: - Fix knip-report.md trailing newline to match backstage-repo-tools output
- DELETE /agents/:agentId now also deletes workflow definition + versions
for wf-* agents (was only removing chatAgents, leaving workflow orphan)
- WorkflowConfigService.deleteWorkflow now also cleans up chatAgents
entries (workflow-level + per-node wf/{id}/* entries)
- Both paths now fully clean up all resources for their agent type
…ides + Conversation Starters) Removed Display Overrides (accent color, avatar URL, greeting message, display name) and Conversation Starters sections from the expanded agent row in Agent Registry. Admins configure these from the agent detail view, not the registry list. Keeps: Type, Framework, Agent ID, Lifecycle, Version, Endpoint, Runtime Info, System Prompt, Description.
My Agents filter was too restrictive -- only showed workflow-builder and docsclaw framework agents. Now shows ALL governance-registered agents that are not yet published (Draft, Pending, Archived), plus all user-created and unregistered agents. Kagenti and orchestration agents now visible in My Agents when in draft/pending.
- Remove "New Tool" button from Command Center Platform > Tools (tools are created via self-service from My Agents, not admin panel) - Add "Agent Ops" as a dedicated sub-tab under Platform, next to Config and Observability (was buried inside Config > Model tab)
…lure Add public discoverBackendTools(deps) wrapper on OpenAIAgentsOrchestrator to fix "orchestrator.discoverBackendTools is not a function" caused by the method being extracted to a standalone function without updating CoordinatorChatOps. Remove unused AddIcon import that broke CI. Clean up Command Center: remove redundant Tools sub-tab and inner tab from Config, remove Agent Ops section from Config (now its own sub-tab).
- ModelToolsPanel.test: remove Tools tab assertions (tab was removed) - KagentiToolsPanel.test: remove New Tool button assertion (button removed) - KagentiAgentsPanel.test: add discoveryApiRef mock for child components - shared.test: update to expect 'request-unpublish' action name - agentRoutes.test: skip startup reconciliation in test env to prevent async race that auto-registers agents before tests run
|



Summary
AgentApprovalWorkflowServicefor SonataFlow integration with CloudEvents-based decision sending and workflow lifecycle managementrouter.ts-- whenaugment.agentApproval.enabledis true, transitions go through SonataFlow; when false, they happen immediatelyPUT /agents/:agentId/request-unpublishendpoint withpendingActiontracking and optional SonataFlow workflow startPUT /agents/:agentId/withdrawendpoint for owners to cancel pending requestsagentApprovalconfig schema toconfig.d.tsSESSION_WORK_LOG.mdto mark phases A, B, H as completeTest plan
yarn tsc:fullpassesyarn lintpasses on all changed filesyarn prettier --checkpasses/agents/:agentId/request-unpublishand/agents/:agentId/withdrawendpoints respond correctly