Recursive deploy ladder: Company + Org tiers, mesh mark, two-tier rail
Completes the scale ladder (single → team → company → org). Every tier is a
topology whose nodes are the tier below; running a parent recursively runs each
child's sub-topology down to the leaf claws.
Backend:
- migration 0011: companies/company_teams, orgs/org_companies, topology_runs.tier
- cm-db repos for companies + orgs (mirror teams)
- TurnRequest.attrs (forwarded from node.attrs) for child-id binding
- SubTopologyExecutor (recursive_exec.rs): a parent "turn" runs the child's
sub-topology; durability via parent updated_at keepalive + cancel propagation
+ depth cap; boxed future breaks the org→company recursion
- topology_worker selects executor by job.tier
- routes: /api/companies, /api/orgs (create/list/get/run) + unified
/api/structure/{level}/{id} for the zoom canvas
Frontend:
- MeshMark: node-mesh brand glyph (replaces the claw PNG), tier variants
- TopologyGraphView: optional onNodeClick/nodeMeta + dark-token theming
- StructureCanvas + Breadcrumb: one recursive zoom view for every tier
(drill down on node click, breadcrumb up); TeamRunPanel extracted + shared
- two-tier Discord-style rail: StructureRail (mesh mark + org/company/team
glyphs + tools popover + deploy + user) | RosterColumn (selected group's
children, or your claws); SecondaryNav for cross-cutting tools
- ComposeWizard (company/org) wired into DeployWizard; /companies + /orgs pages
Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
bba18a4687
commit
3eca4ed70c
@@ -0,0 +1,141 @@
|
||||
// The clawmates brand mark: a node-mesh / topology glyph. The product is a
|
||||
// platform for deploying meshes of agents at every scale (claw → team → company
|
||||
// → org), so the mark *is* a topology — nodes joined by edges, in coral. The
|
||||
// `variant` knob draws the same visual family at different node counts so the
|
||||
// rail's per-tier glyphs (team/company/org) read as one system.
|
||||
//
|
||||
// Pure SVG (no hooks) → usable in server or client components. Edges use
|
||||
// `currentColor` + non-scaling strokes so it stays crisp from 16px to 44px and
|
||||
// can inherit the surrounding text color where a caller wants a monochrome mark.
|
||||
|
||||
export type MeshVariant = "mark" | "org" | "company" | "team";
|
||||
|
||||
interface MeshShape {
|
||||
nodes: [number, number][];
|
||||
edges: [number, number][];
|
||||
}
|
||||
|
||||
// Geometry on a 24×24 grid. `mark` is a hub + triangle (the wordmark glyph);
|
||||
// team/company/org scale the node count up while keeping the meshy feel.
|
||||
const SHAPES: Record<MeshVariant, MeshShape> = {
|
||||
team: {
|
||||
nodes: [
|
||||
[12, 5],
|
||||
[5, 18],
|
||||
[19, 18],
|
||||
],
|
||||
edges: [
|
||||
[0, 1],
|
||||
[0, 2],
|
||||
[1, 2],
|
||||
],
|
||||
},
|
||||
mark: {
|
||||
nodes: [
|
||||
[12, 12],
|
||||
[12, 4],
|
||||
[5, 19],
|
||||
[19, 19],
|
||||
],
|
||||
edges: [
|
||||
[0, 1],
|
||||
[0, 2],
|
||||
[0, 3],
|
||||
[1, 2],
|
||||
[1, 3],
|
||||
[2, 3],
|
||||
],
|
||||
},
|
||||
company: {
|
||||
nodes: [
|
||||
[12, 4],
|
||||
[4, 11],
|
||||
[20, 11],
|
||||
[8, 20],
|
||||
[16, 20],
|
||||
],
|
||||
edges: [
|
||||
[0, 1],
|
||||
[0, 2],
|
||||
[1, 2],
|
||||
[1, 3],
|
||||
[2, 4],
|
||||
[3, 4],
|
||||
],
|
||||
},
|
||||
org: {
|
||||
nodes: [
|
||||
[12, 3],
|
||||
[4, 8],
|
||||
[20, 8],
|
||||
[4, 16],
|
||||
[20, 16],
|
||||
[12, 21],
|
||||
],
|
||||
edges: [
|
||||
[0, 1],
|
||||
[0, 2],
|
||||
[1, 2],
|
||||
[1, 3],
|
||||
[2, 4],
|
||||
[3, 4],
|
||||
[3, 5],
|
||||
[4, 5],
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
interface MeshMarkProps {
|
||||
size?: number;
|
||||
variant?: MeshVariant;
|
||||
className?: string;
|
||||
title?: string;
|
||||
/** Node fill (defaults to the coral token). */
|
||||
nodeFill?: string;
|
||||
/** Edge stroke (defaults to currentColor, so it inherits text color). */
|
||||
edgeStroke?: string;
|
||||
}
|
||||
|
||||
export function MeshMark({
|
||||
size = 24,
|
||||
variant = "mark",
|
||||
className,
|
||||
title = "clawmates",
|
||||
nodeFill = "var(--color-coral)",
|
||||
edgeStroke = "currentColor",
|
||||
}: MeshMarkProps) {
|
||||
const shape = SHAPES[variant];
|
||||
return (
|
||||
<svg
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 24 24"
|
||||
className={className}
|
||||
role="img"
|
||||
aria-label={title}
|
||||
fill="none"
|
||||
>
|
||||
{shape.edges.map(([a, b], i) => {
|
||||
const p = shape.nodes[a];
|
||||
const q = shape.nodes[b];
|
||||
return (
|
||||
<line
|
||||
key={`e${i}`}
|
||||
x1={p[0]}
|
||||
y1={p[1]}
|
||||
x2={q[0]}
|
||||
y2={q[1]}
|
||||
stroke={edgeStroke}
|
||||
strokeWidth={1.4}
|
||||
strokeOpacity={0.5}
|
||||
strokeLinecap="round"
|
||||
vectorEffect="non-scaling-stroke"
|
||||
/>
|
||||
);
|
||||
})}
|
||||
{shape.nodes.map(([x, y], i) => (
|
||||
<circle key={`n${i}`} cx={x} cy={y} r={2.3} fill={nodeFill} />
|
||||
))}
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user