The Web UI and messaging channels now read and write Archie's runtime settings through one versioned, audited control-plane API hosted on the State Store's existing gRPC server: catalog, query, command, watch. Each feature owns its resource, validation and commands; storage only writes versions and audit records. Workflows move with it. Definitions become portable YAML compiled through a closed, typed step registry and stored as a control-plane resource, so the yaegi interpretation paths (internal/gate, wfeval, wfextract, gateeval, gateextract, skillbuild) are deleted rather than carried. The UI process reads definitions as data: the JSON projection lives in internal/domain/workflow/task so a dashboard decodes the stored collection without linking the workflow engine, which cmd/archie-ui's deletion gate forbids. Shipped definitions ride the catalog descriptor rather than a bespoke REST route, keeping the API to its four operations. archie-messaging gains -state-store-target/-state-store-token and reads channel settings from the database, failing closed when the State Store is unreachable: the database is authoritative for those settings.
44 lines
1.4 KiB
Vue
44 lines
1.4 KiB
Vue
<script lang="ts">
|
|
/** A conversational front-end, as /api/channels serialises it. */
|
|
export interface Channel {
|
|
id?: string;
|
|
name: string;
|
|
state?: string;
|
|
configured?: boolean;
|
|
description?: string;
|
|
detail?: string;
|
|
reload_supported?: boolean;
|
|
}
|
|
</script>
|
|
|
|
<script setup lang="ts">
|
|
import { computed } from "vue";
|
|
|
|
import { Badge } from "@/components/ui/badge";
|
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
|
import type { StatusKind } from "@/lib/status";
|
|
|
|
const props = defineProps<{ channel: Channel }>();
|
|
|
|
function tone(state: string | undefined, configured: boolean | undefined): StatusKind {
|
|
if (state === "running") return "ok";
|
|
if (state === "failed" || state === "degraded") return "warn";
|
|
return configured ? "idle" : "idle";
|
|
}
|
|
|
|
const label = computed(() => props.channel.state || (props.channel.configured ? "configured" : "stopped"));
|
|
</script>
|
|
|
|
<template>
|
|
<Card>
|
|
<CardHeader>
|
|
<CardTitle>{{ props.channel.name }}</CardTitle>
|
|
<CardDescription v-if="props.channel.description">{{ props.channel.description }}</CardDescription>
|
|
<Badge :variant="tone(props.channel.state, props.channel.configured)">{{ label }}</Badge>
|
|
</CardHeader>
|
|
<CardContent>
|
|
<p v-if="props.channel.detail" class="text-sm text-fg-muted">{{ props.channel.detail }}</p>
|
|
</CardContent>
|
|
</Card>
|
|
</template>
|