rolexjs 1.5.0-dev-20260317075835 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +18 -18
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -133,7 +133,7 @@ function renderState(state, depth = 1, options) {
|
|
|
133
133
|
const heading = "#".repeat(level);
|
|
134
134
|
const idPart = state.id ? ` (${state.id})` : "";
|
|
135
135
|
const originPart = state.origin ? ` {${state.origin}}` : "";
|
|
136
|
-
const tagPart = state.
|
|
136
|
+
const tagPart = state.tags?.length ? ` ${state.tags.map((t) => `#${t}`).join(" ")}` : "";
|
|
137
137
|
const progressPart = state.name === "goal" ? goalProgress(state) : "";
|
|
138
138
|
lines.push(`${heading} [${state.name}]${idPart}${originPart}${tagPart}${progressPart}`);
|
|
139
139
|
if (options?.fold?.(state)) {
|
|
@@ -150,7 +150,7 @@ function renderState(state, depth = 1, options) {
|
|
|
150
150
|
const expanded = allCompact ? [] : state.links.filter((l) => !compactRelations.has(l.relation));
|
|
151
151
|
for (const link of compact) {
|
|
152
152
|
const targetId = link.target.id ? ` (${link.target.id})` : "";
|
|
153
|
-
const targetTag = link.target.
|
|
153
|
+
const targetTag = link.target.tags?.length ? ` ${link.target.tags.map((t) => `#${t}`).join(" ")}` : "";
|
|
154
154
|
lines.push(`> ${link.relation}: [${link.target.name}]${targetId}${targetTag}`);
|
|
155
155
|
}
|
|
156
156
|
if (expanded.length > 0) {
|
|
@@ -245,10 +245,10 @@ function goalProgress(goal) {
|
|
|
245
245
|
function walk(node) {
|
|
246
246
|
if (node.name === "plan") {
|
|
247
247
|
plans++;
|
|
248
|
-
if (node.
|
|
248
|
+
if (node.tags?.includes("done") || node.tags?.includes("abandoned")) plansDone++;
|
|
249
249
|
} else if (node.name === "task") {
|
|
250
250
|
tasks++;
|
|
251
|
-
if (node.
|
|
251
|
+
if (node.tags?.includes("done")) tasksDone++;
|
|
252
252
|
}
|
|
253
253
|
for (const child of node.children ?? []) walk(child);
|
|
254
254
|
}
|
|
@@ -276,8 +276,8 @@ function sortByConceptOrder(children) {
|
|
|
276
276
|
function renderProduct(state) {
|
|
277
277
|
const lines = [];
|
|
278
278
|
const id = state.id ?? "(no id)";
|
|
279
|
-
const
|
|
280
|
-
lines.push(`# ${id}${
|
|
279
|
+
const tagPart = state.tags?.length ? ` ${state.tags.map((t) => `#${t}`).join(" ")}` : "";
|
|
280
|
+
lines.push(`# ${id}${tagPart}`);
|
|
281
281
|
if (state.information) {
|
|
282
282
|
lines.push("");
|
|
283
283
|
lines.push(state.information);
|
|
@@ -315,9 +315,9 @@ function renderProduct(state) {
|
|
|
315
315
|
lines.push("");
|
|
316
316
|
lines.push("## Releases");
|
|
317
317
|
for (const r of releases) {
|
|
318
|
-
const
|
|
318
|
+
const rTag = r.tags?.length ? ` ${r.tags.map((t) => `#${t}`).join(" ")}` : "";
|
|
319
319
|
const title = r.id ?? extractFeatureTitle(r.information);
|
|
320
|
-
lines.push(`- ${title}${
|
|
320
|
+
lines.push(`- ${title}${rTag}`);
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
323
|
if (channels.length > 0) {
|
|
@@ -355,8 +355,8 @@ function extractFeatureTitle(information) {
|
|
|
355
355
|
function renderProject(state) {
|
|
356
356
|
const lines = [];
|
|
357
357
|
const id = state.id ?? "(no id)";
|
|
358
|
-
const
|
|
359
|
-
lines.push(`# ${id}${
|
|
358
|
+
const tagPart = state.tags?.length ? ` ${state.tags.map((t) => `#${t}`).join(" ")}` : "";
|
|
359
|
+
lines.push(`# ${id}${tagPart}`);
|
|
360
360
|
if (state.information) {
|
|
361
361
|
lines.push("");
|
|
362
362
|
lines.push(state.information);
|
|
@@ -386,10 +386,10 @@ function renderProject(state) {
|
|
|
386
386
|
lines.push("");
|
|
387
387
|
lines.push("## Milestones");
|
|
388
388
|
for (const m of milestones) {
|
|
389
|
-
const
|
|
390
|
-
const marker = m.
|
|
389
|
+
const mTag = m.tags?.length ? ` ${m.tags.map((t) => `#${t}`).join(" ")}` : "";
|
|
390
|
+
const marker = m.tags?.includes("done") ? "[x]" : "[ ]";
|
|
391
391
|
const title = extractFeatureTitle2(m.information);
|
|
392
|
-
lines.push(`- ${marker} ${m.id ?? title}${
|
|
392
|
+
lines.push(`- ${marker} ${m.id ?? title}${mTag}`);
|
|
393
393
|
if (m.information && m.id) {
|
|
394
394
|
const desc = extractFeatureTitle2(m.information);
|
|
395
395
|
if (desc && desc !== m.id) lines.push(` ${desc}`);
|
|
@@ -553,7 +553,7 @@ var SurveyRenderer = class {
|
|
|
553
553
|
renderFlat(items) {
|
|
554
554
|
const lines = [];
|
|
555
555
|
for (const item of items) {
|
|
556
|
-
const tag = item.
|
|
556
|
+
const tag = item.tags?.length ? ` ${item.tags.map((t) => `#${t}`).join(" ")}` : "";
|
|
557
557
|
const alias = Array.isArray(item.alias) && item.alias.length ? ` (${item.alias.join(", ")})` : "";
|
|
558
558
|
lines.push(`${item.id ?? "(no id)"}${alias}${tag}`);
|
|
559
559
|
}
|
|
@@ -576,12 +576,12 @@ var SurveyRenderer = class {
|
|
|
576
576
|
const lines = [];
|
|
577
577
|
for (const org of orgs) {
|
|
578
578
|
const alias = Array.isArray(org.alias) && org.alias.length ? ` (${org.alias.join(", ")})` : "";
|
|
579
|
-
const tag = org.
|
|
579
|
+
const tag = org.tags?.length ? ` ${org.tags.map((t) => `#${t}`).join(" ")}` : "";
|
|
580
580
|
lines.push(`${org.id}${alias}${tag}`);
|
|
581
581
|
const projects = org.links?.filter((l) => l.relation === "project") ?? [];
|
|
582
582
|
for (const p of projects) {
|
|
583
583
|
const pAlias = Array.isArray(p.target.alias) && p.target.alias.length ? ` (${p.target.alias.join(", ")})` : "";
|
|
584
|
-
const pTag = p.target.
|
|
584
|
+
const pTag = p.target.tags?.length ? ` ${p.target.tags.map((t) => `#${t}`).join(" ")}` : "";
|
|
585
585
|
lines.push(` \u{1F4E6} ${p.target.id ?? "(no id)"}${pAlias}${pTag}`);
|
|
586
586
|
}
|
|
587
587
|
const members = org.links?.filter((l) => l.relation === "membership") ?? [];
|
|
@@ -591,7 +591,7 @@ var SurveyRenderer = class {
|
|
|
591
591
|
for (const m of members) {
|
|
592
592
|
affiliatedIndividuals.add(m.target.id ?? "");
|
|
593
593
|
const mAlias = Array.isArray(m.target.alias) && m.target.alias.length ? ` (${m.target.alias.join(", ")})` : "";
|
|
594
|
-
const mTag = m.target.
|
|
594
|
+
const mTag = m.target.tags?.length ? ` ${m.target.tags.map((t) => `#${t}`).join(" ")}` : "";
|
|
595
595
|
const posLabels = individualPositions.get(m.target.id ?? "");
|
|
596
596
|
const posStr = posLabels?.length ? ` \u2014 ${posLabels.join(", ")}` : "";
|
|
597
597
|
lines.push(` ${m.target.id}${mAlias}${mTag}${posStr}`);
|
|
@@ -603,7 +603,7 @@ var SurveyRenderer = class {
|
|
|
603
603
|
lines.push("\u2500\u2500\u2500 unaffiliated \u2500\u2500\u2500");
|
|
604
604
|
for (const ind of unaffiliated) {
|
|
605
605
|
const alias = Array.isArray(ind.alias) && ind.alias.length ? ` (${ind.alias.join(", ")})` : "";
|
|
606
|
-
const tag = ind.
|
|
606
|
+
const tag = ind.tags?.length ? ` ${ind.tags.map((t) => `#${t}`).join(" ")}` : "";
|
|
607
607
|
const posLabels = individualPositions.get(ind.id ?? "");
|
|
608
608
|
const posStr = posLabels?.length ? ` \u2014 ${posLabels.join(", ")}` : "";
|
|
609
609
|
lines.push(` ${ind.id}${alias}${tag}${posStr}`);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/render.ts","../src/product-render.ts","../src/project-render.ts","../src/rolex.ts","../src/renderers/index.ts","../src/renderers/inspect.ts","../src/renderers/org.ts","../src/renderers/position.ts","../src/renderers/product.ts","../src/renderers/project.ts","../src/renderers/role.ts","../src/renderers/society.ts","../src/renderers/survey.ts"],"sourcesContent":["/**\n * rolexjs — RoleX unified entry point.\n *\n * Usage:\n * import { createRoleX } from \"rolexjs\";\n *\n * const rx = createRoleX({ platform });\n * const role = await rx.individual.activate({ individual: \"sean\" });\n * await role.want(\"Feature: Ship v1\", \"ship-v1\");\n */\n\n// Re-export core (structures, processes, Role, types)\nexport * from \"@rolexjs/core\";\n// Product Render\nexport type { ProductAction } from \"./product-render.js\";\nexport { renderProduct, renderProductResult } from \"./product-render.js\";\n// Project Render\nexport type { ProjectAction } from \"./project-render.js\";\nexport { renderProjectResult } from \"./project-render.js\";\n// API\nexport type { RoleXConfig } from \"./rolex.js\";\nexport { createRoleX } from \"./rolex.js\";\n","/**\n * Render — 3-layer output for all Rolex operations.\n *\n * Layer 1: Status — what just happened (describe)\n * Layer 2: Hint — what to do next (hint + cognitive hint)\n * Layer 3: Projection — full state tree as markdown (renderState)\n *\n * render() composes the 3 layers. MCP and CLI are pure pass-through.\n */\nimport type { Permission, State } from \"@rolexjs/system\";\n\n// ================================================================\n// Description — what happened\n// ================================================================\n\nconst descriptions: Record<string, (name: string, state: State) => string> = {\n // Lifecycle\n born: (n) => `Individual \"${n}\" is born.`,\n found: (n) => `Organization \"${n}\" is founded.`,\n establish: (n) => `Position \"${n}\" is established.`,\n charter: (n) => `Charter defined for \"${n}\".`,\n charge: (n) => `Duty \"${n}\" assigned.`,\n retire: (n) => `\"${n}\" retired.`,\n die: (n) => `\"${n}\" is gone.`,\n dissolve: (n) => `Organization \"${n}\" dissolved.`,\n abolish: (n) => `Position \"${n}\" abolished.`,\n rehire: (n) => `\"${n}\" is back.`,\n\n // Organization\n hire: (n) => `\"${n}\" hired.`,\n fire: (n) => `\"${n}\" fired.`,\n appoint: (n) => `\"${n}\" appointed.`,\n dismiss: (n) => `\"${n}\" dismissed.`,\n\n // Project\n launch: (n) => `Project \"${n}\" launched.`,\n scope: (n) => `Scope defined for \"${n}\".`,\n milestone: (n) => `Milestone \"${n}\" added.`,\n achieve: (n) => `Milestone \"${n}\" achieved.`,\n enroll: (n) => `\"${n}\" enrolled.`,\n remove: (n) => `\"${n}\" removed.`,\n deliver: (n) => `Deliverable \"${n}\" added.`,\n wiki: (n) => `Wiki entry \"${n}\" added.`,\n archive: (n) => `Project \"${n}\" archived.`,\n produce: (n) => `Product \"${n}\" produced.`,\n\n // Product\n strategy: (n) => `Strategy defined for \"${n}\".`,\n spec: (n) => `Spec \"${n}\" added.`,\n release: (n) => `Release \"${n}\" published.`,\n channel: (n) => `Channel \"${n}\" added.`,\n own: (n) => `Owner assigned to \"${n}\".`,\n disown: (n) => `Owner removed from \"${n}\".`,\n deprecate: (n) => `Product \"${n}\" deprecated.`,\n\n // Society\n crown: (n) => `\"${n}\" crowned — sovereign permissions granted.`,\n uncrown: (n) => `\"${n}\" uncrowned — sovereign permissions revoked.`,\n\n // Top-level perception\n inspect: (n) => `Inspecting \"${n}\".`,\n\n // Role\n activate: (n) => `Role \"${n}\" activated.`,\n focus: (n) => `Focused on goal \"${n}\".`,\n\n // Execution\n want: (n) => `Goal \"${n}\" declared.`,\n plan: (n) => `Plan created for \"${n}\".`,\n todo: (n) => `Task \"${n}\" added.`,\n finish: (n) => `Task \"${n}\" finished → encounter recorded.`,\n complete: (n) => `Plan \"${n}\" completed → encounter recorded.`,\n abandon: (n) => `Plan \"${n}\" abandoned → encounter recorded.`,\n\n // Cognition\n reflect: (n) => `Reflected on \"${n}\" → experience gained.`,\n realize: (n) => `Realized principle from \"${n}\".`,\n master: (n) => `Mastered procedure from \"${n}\".`,\n\n // Knowledge management\n forget: (n) => `\"${n}\" forgotten.`,\n};\n\nexport function describe(process: string, name: string, state: State): string {\n const fn = descriptions[process];\n return fn ? fn(name, state) : `${process} completed.`;\n}\n\n// ================================================================\n// Hint — what to do next\n// ================================================================\n\nconst hints: Record<string, string> = {\n // Lifecycle\n born: \"hire into an organization, or activate to start working.\",\n found: \"define a charter for the organization.\",\n establish: \"charge with duties, then appoint members.\",\n charter: \"establish positions for the organization.\",\n charge: \"appoint someone to this position.\",\n retire: \"rehire if needed later.\",\n die: \"this individual is permanently gone.\",\n dissolve: \"the organization no longer exists.\",\n abolish: \"the position no longer exists.\",\n rehire: \"activate to resume working.\",\n\n // Organization\n hire: \"appoint to a position, or activate to start working.\",\n fire: \"the individual is no longer a member.\",\n appoint: \"the individual now holds this position.\",\n dismiss: \"the position is now vacant.\",\n\n // Project\n launch: \"define scope, add milestones, or enroll members.\",\n scope: \"add milestones to break down the project.\",\n milestone: \"enroll members and start working.\",\n achieve: \"continue with remaining milestones, or archive the project.\",\n enroll: \"assign milestones and start working.\",\n remove: \"the individual is no longer a participant.\",\n deliver: \"deliverable recorded.\",\n wiki: \"knowledge entry recorded.\",\n archive: \"the project is archived.\",\n produce: \"define strategy, add specs, or assign an owner.\",\n\n // Product\n strategy: \"add behavior specs (BDD contracts) for the product.\",\n spec: \"add more specs, or publish a release.\",\n release: \"add distribution channels, or continue adding specs.\",\n channel: \"distribution channel recorded.\",\n own: \"the individual is now the product owner.\",\n disown: \"the individual is no longer the product owner.\",\n deprecate: \"the product is deprecated.\",\n\n // Society\n crown: \"the individual now has sovereign permissions over society.\",\n uncrown: \"the individual no longer has sovereign permissions.\",\n\n // Top-level perception\n inspect: \"use inspect on child nodes for deeper detail, or activate to work as a role.\",\n\n // Role\n activate: \"want a goal, or check the current state.\",\n focus: \"plan how to work toward it, or add tasks.\",\n\n // Execution\n want: \"plan how to work toward it.\",\n plan: \"add tasks with todo.\",\n todo: \"start working, finish when done.\",\n finish: \"continue with remaining tasks, or complete the plan.\",\n complete: \"reflect on encounters to gain experience.\",\n abandon: \"reflect on encounters to learn from the experience.\",\n\n // Cognition\n reflect: \"realize principles or master procedures from experience.\",\n realize: \"principle added.\",\n master: \"procedure added.\",\n\n // Knowledge management\n forget: \"the node has been removed.\",\n};\n\nexport function hint(process: string): string {\n const h = hints[process];\n return h ? `Next: ${h}` : \"What would you like to do next?\";\n}\n\n// ================================================================\n// Detail — longer process descriptions (from .feature files)\n// ================================================================\n\nimport { directives, processes, world } from \"@rolexjs/core\";\n\n/** Full Gherkin feature content for a process — sourced from .feature files. */\nexport function detail(process: string): string {\n return processes[process] ?? \"\";\n}\n\n/** World feature descriptions — framework-level instructions. */\nexport { world };\n\n// ================================================================\n// Directive — system-level commands at decision points\n// ================================================================\n\n/** Get a directive by topic and scenario. Returns empty string if not found. */\nexport function directive(topic: string, scenario: string): string {\n return directives[topic]?.[scenario] ?? \"\";\n}\n\n// ================================================================\n// Generic State renderer — renders any State tree as markdown\n// ================================================================\n\n/**\n * renderState — markdown renderer for State trees.\n *\n * Rules:\n * - Heading: \"#\" repeated to depth + \" [name]\"\n * - Body: raw information field as-is (full Gherkin preserved)\n * - Links: \"> → relation [target.name]\" with target feature name\n * - Children: sorted by concept hierarchy, then rendered at depth+1\n * - Fold: when fold(node) returns true, render heading only (no body/links/children)\n *\n * Markdown heading depth caps at 6 (######).\n */\nexport interface RenderStateOptions {\n /** When returns true, render only the heading — skip body, links, and children. */\n fold?: (node: State) => boolean;\n /** When true, all links render as compact references (name + id only, no subtree). */\n compactLinks?: boolean;\n}\n\nexport function renderState(state: State, depth = 1, options?: RenderStateOptions): string {\n const lines: string[] = [];\n const level = Math.min(depth, 6);\n const heading = \"#\".repeat(level);\n\n // Heading: [name] (id) {origin} #tag [progress]\n const idPart = state.id ? ` (${state.id})` : \"\";\n const originPart = state.origin ? ` {${state.origin}}` : \"\";\n const tagPart = state.tag ? ` #${state.tag}` : \"\";\n const progressPart = state.name === \"goal\" ? goalProgress(state) : \"\";\n lines.push(`${heading} [${state.name}]${idPart}${originPart}${tagPart}${progressPart}`);\n\n // Folded: heading only\n if (options?.fold?.(state)) {\n return lines.join(\"\\n\");\n }\n\n // Body: full information as-is\n if (state.information) {\n lines.push(\"\");\n lines.push(state.information);\n }\n\n // Links — compact shows reference only, expanded shows full subtree\n if (state.links && state.links.length > 0) {\n const compactRelations = new Set([\"after\", \"before\", \"fallback\", \"fallback-for\"]);\n const allCompact = options?.compactLinks;\n const compact = allCompact\n ? state.links\n : state.links.filter((l) => compactRelations.has(l.relation));\n const expanded = allCompact ? [] : state.links.filter((l) => !compactRelations.has(l.relation));\n for (const link of compact) {\n const targetId = link.target.id ? ` (${link.target.id})` : \"\";\n const targetTag = link.target.tag ? ` #${link.target.tag}` : \"\";\n lines.push(`> ${link.relation}: [${link.target.name}]${targetId}${targetTag}`);\n }\n if (expanded.length > 0) {\n const targets = sortByConceptOrder(expanded.map((l) => l.target));\n for (const target of targets) {\n lines.push(\"\");\n lines.push(renderState(target, depth + 1, options));\n }\n }\n }\n\n // Children — sorted by concept hierarchy, empty nodes filtered out\n if (state.children && state.children.length > 0) {\n const sorted = sortByConceptOrder(state.children.filter((c) => !isEmpty(c)));\n for (const child of sorted) {\n lines.push(\"\");\n lines.push(renderState(child, depth + 1, options));\n }\n }\n\n return lines.join(\"\\n\");\n}\n\n// ================================================================\n// Permissions — collect and render from link tree\n// ================================================================\n\n/** Recursively collect all permissions from a state tree's links. */\nexport function collectPermissions(state: State): Permission[] {\n const seen = new Set<string>();\n const result: Permission[] = [];\n\n const walk = (s: State) => {\n if (s.links) {\n for (const link of s.links) {\n if (link.permissions) {\n for (const p of link.permissions) {\n if (!seen.has(p.command)) {\n seen.add(p.command);\n result.push(p);\n }\n }\n }\n // Don't recurse into link targets — they are compact references\n }\n }\n if (s.children) {\n for (const child of s.children) {\n walk(child);\n }\n }\n };\n\n walk(state);\n return result;\n}\n\n/** Render permissions as a markdown section. */\nexport function renderPermissions(permissions: readonly Permission[]): string {\n if (permissions.length === 0) return \"\";\n\n const lines: string[] = [];\n lines.push(\"# Permissions\\n\");\n for (const p of permissions) {\n lines.push(p.content);\n lines.push(\"\");\n }\n return lines.join(\"\\n\");\n}\n\n// ================================================================\n// Concept ordering — children sorted by structure hierarchy\n// ================================================================\n\n/** Concept tree order: identity → cognition → knowledge → execution → organization. */\nconst CONCEPT_ORDER: readonly string[] = [\n // Individual — Identity\n \"identity\",\n \"background\",\n \"tone\",\n \"mindset\",\n // Individual — Cognition\n \"encounter\",\n \"experience\",\n // Individual — Knowledge\n \"principle\",\n \"procedure\",\n // Individual — Execution\n \"goal\",\n \"plan\",\n \"task\",\n // Organization\n \"charter\",\n // Position\n \"position\",\n \"duty\",\n // Project\n \"scope\",\n \"milestone\",\n \"deliverable\",\n \"wiki\",\n // Product\n \"strategy\",\n \"spec\",\n \"release\",\n \"channel\",\n];\n\n/** Summarize plan/task completion for a goal heading. */\nfunction goalProgress(goal: State): string {\n let plans = 0;\n let plansDone = 0;\n let tasks = 0;\n let tasksDone = 0;\n\n function walk(node: State): void {\n if (node.name === \"plan\") {\n plans++;\n if (node.tag === \"done\" || node.tag === \"abandoned\") plansDone++;\n } else if (node.name === \"task\") {\n tasks++;\n if (node.tag === \"done\") tasksDone++;\n }\n for (const child of node.children ?? []) walk(child);\n }\n\n for (const child of goal.children ?? []) walk(child);\n if (plans === 0 && tasks === 0) return \"\";\n const parts: string[] = [];\n if (plans > 0) parts.push(`${plansDone}/${plans} plans`);\n if (tasks > 0) parts.push(`${tasksDone}/${tasks} tasks`);\n return ` [${parts.join(\", \")}]`;\n}\n\n/** A node is empty when it has no id, no information, and no children. */\nfunction isEmpty(node: State): boolean {\n return !node.id && !node.information && (!node.children || node.children.length === 0);\n}\n\n/** Sort children by concept hierarchy order. Unknown names go to the end, preserving relative order. */\nfunction sortByConceptOrder(children: readonly State[]): readonly State[] {\n return [...children].sort((a, b) => {\n const ai = CONCEPT_ORDER.indexOf(a.name);\n const bi = CONCEPT_ORDER.indexOf(b.name);\n const aOrder = ai >= 0 ? ai : CONCEPT_ORDER.length;\n const bOrder = bi >= 0 ? bi : CONCEPT_ORDER.length;\n return aOrder - bOrder;\n });\n}\n\n// ================================================================\n// Render — 3-layer output for tool results\n// ================================================================\n\nexport interface RenderOptions {\n /** The process that was executed. */\n process: string;\n /** Display name for the primary node. */\n name: string;\n /** State projection of the affected node. */\n state: State;\n /** AI cognitive hint — first-person, state-aware self-direction cue. */\n cognitiveHint?: string | null;\n /** Fold predicate — folded nodes render heading only. */\n fold?: RenderStateOptions[\"fold\"];\n}\n\n/** Render a full 3-layer output string. */\nexport function render(opts: RenderOptions): string {\n const { process, name, state, cognitiveHint, fold } = opts;\n const lines: string[] = [];\n\n // Layer 1: Status\n lines.push(describe(process, name, state));\n\n // Layer 2: Hint (static) + Cognitive hint (state-aware)\n lines.push(hint(process));\n if (cognitiveHint) {\n lines.push(`I → ${cognitiveHint}`);\n }\n\n // Layer 3: Projection — generic markdown rendering of the full state tree\n lines.push(\"\");\n lines.push(renderState(state, 1, fold ? { fold } : undefined));\n\n return lines.join(\"\\n\");\n}\n","/**\n * Product Render — format product state as readable text.\n *\n * Renders product operations into human-readable summaries.\n * Ownership links show owner names only (not full individual trees).\n * Specs show behavior contract titles for quick overview.\n */\nimport type { State } from \"@rolexjs/system\";\nimport { describe, hint } from \"./render.js\";\n\n// ================================================================\n// Types\n// ================================================================\n\nexport type ProductAction =\n | \"produce\"\n | \"strategy\"\n | \"spec\"\n | \"release\"\n | \"channel\"\n | \"own\"\n | \"disown\"\n | \"deprecate\";\n\n// ================================================================\n// Product Overview\n// ================================================================\n\nexport function renderProduct(state: State): string {\n const lines: string[] = [];\n const id = state.id ?? \"(no id)\";\n const tag = state.tag ? ` #${state.tag}` : \"\";\n\n // Title\n lines.push(`# ${id}${tag}`);\n\n // Feature body (vision)\n if (state.information) {\n lines.push(\"\");\n lines.push(state.information);\n }\n\n // Owners (ownership links — compact)\n const owners = state.links?.filter((l) => l.relation === \"ownership\") ?? [];\n if (owners.length > 0) {\n lines.push(\"\");\n lines.push(\"## Owner\");\n for (const o of owners) {\n const alias =\n Array.isArray(o.target.alias) && o.target.alias.length\n ? ` (${o.target.alias.join(\", \")})`\n : \"\";\n lines.push(`- ${o.target.id ?? \"(no id)\"}${alias}`);\n }\n }\n\n // Children by type\n const children = state.children ?? [];\n\n const strategies = children.filter((c) => c.name === \"strategy\");\n const specs = children.filter((c) => c.name === \"spec\");\n const releases = children.filter((c) => c.name === \"release\");\n const channels = children.filter((c) => c.name === \"channel\");\n\n if (strategies.length > 0) {\n lines.push(\"\");\n lines.push(\"## Strategy\");\n for (const s of strategies) {\n if (s.information) lines.push(s.information);\n }\n }\n\n if (specs.length > 0) {\n lines.push(\"\");\n lines.push(\"## Specs\");\n for (const s of specs) {\n const title = s.id ?? extractFeatureTitle(s.information);\n lines.push(`- ${title}`);\n }\n }\n\n if (releases.length > 0) {\n lines.push(\"\");\n lines.push(\"## Releases\");\n for (const r of releases) {\n const tag = r.tag ? ` #${r.tag}` : \"\";\n const title = r.id ?? extractFeatureTitle(r.information);\n lines.push(`- ${title}${tag}`);\n }\n }\n\n if (channels.length > 0) {\n lines.push(\"\");\n lines.push(\"## Channels\");\n for (const c of channels) {\n const title = c.id ?? extractFeatureTitle(c.information);\n lines.push(`- ${title}`);\n }\n }\n\n return lines.join(\"\\n\");\n}\n\n// ================================================================\n// Compose — main entry point\n// ================================================================\n\n/**\n * Render a product operation result as readable text.\n * Returns status + hint + product overview.\n */\nexport function renderProductResult(action: ProductAction, state: State): string {\n const name = state.id ?? state.name;\n const lines: string[] = [];\n\n // Layer 1: Status\n lines.push(describe(action, name, state));\n\n // Layer 2: Hint\n lines.push(hint(action));\n\n // Layer 3: Product overview\n const productState = isProductNode(state) ? state : null;\n if (productState) {\n lines.push(\"\");\n lines.push(renderProduct(productState));\n }\n\n return lines.join(\"\\n\");\n}\n\n// ================================================================\n// Helpers\n// ================================================================\n\nfunction isProductNode(state: State): boolean {\n return state.name === \"product\";\n}\n\nfunction extractFeatureTitle(information?: string | null): string {\n if (!information) return \"(untitled)\";\n const match = information.match(/^Feature:\\s*(.+)$/m);\n return match?.[1]?.trim() ?? information.split(\"\\n\")[0].trim();\n}\n","/**\n * Project Render — format project state as readable text.\n *\n * Renders project operations into human-readable summaries.\n * Participation links show member names only (not full individual trees).\n * Milestones show progress status (#done or pending).\n */\nimport type { State } from \"@rolexjs/system\";\nimport { describe, hint } from \"./render.js\";\n\n// ================================================================\n// Types\n// ================================================================\n\nexport type ProjectAction =\n | \"launch\"\n | \"scope\"\n | \"milestone\"\n | \"achieve\"\n | \"enroll\"\n | \"remove\"\n | \"deliver\"\n | \"wiki\"\n | \"archive\"\n | \"produce\";\n\n// ================================================================\n// Project Overview\n// ================================================================\n\nexport function renderProject(state: State): string {\n const lines: string[] = [];\n const id = state.id ?? \"(no id)\";\n const tag = state.tag ? ` #${state.tag}` : \"\";\n\n // Title\n lines.push(`# ${id}${tag}`);\n\n // Feature body\n if (state.information) {\n lines.push(\"\");\n lines.push(state.information);\n }\n\n // Members (participation links — compact)\n const members = state.links?.filter((l) => l.relation === \"participation\") ?? [];\n if (members.length > 0) {\n lines.push(\"\");\n lines.push(\"## Members\");\n for (const m of members) {\n const alias =\n Array.isArray(m.target.alias) && m.target.alias.length\n ? ` (${m.target.alias.join(\", \")})`\n : \"\";\n lines.push(`- ${m.target.id ?? \"(no id)\"}${alias}`);\n }\n }\n\n // Children by type\n const children = state.children ?? [];\n\n const scopes = children.filter((c) => c.name === \"scope\");\n const milestones = children.filter((c) => c.name === \"milestone\");\n const deliverables = children.filter((c) => c.name === \"deliverable\");\n const wikis = children.filter((c) => c.name === \"wiki\");\n\n if (scopes.length > 0) {\n lines.push(\"\");\n lines.push(\"## Scope\");\n for (const s of scopes) {\n if (s.information) lines.push(s.information);\n }\n }\n\n if (milestones.length > 0) {\n lines.push(\"\");\n lines.push(\"## Milestones\");\n for (const m of milestones) {\n const tag = m.tag ? ` #${m.tag}` : \"\";\n const marker = m.tag === \"done\" ? \"[x]\" : \"[ ]\";\n const title = extractFeatureTitle(m.information);\n lines.push(`- ${marker} ${m.id ?? title}${tag}`);\n if (m.information && m.id) {\n const desc = extractFeatureTitle(m.information);\n if (desc && desc !== m.id) lines.push(` ${desc}`);\n }\n }\n }\n\n if (deliverables.length > 0) {\n lines.push(\"\");\n lines.push(\"## Deliverables\");\n for (const d of deliverables) {\n const title = d.id ?? extractFeatureTitle(d.information);\n lines.push(`- ${title}`);\n }\n }\n\n if (wikis.length > 0) {\n lines.push(\"\");\n lines.push(\"## Wiki\");\n for (const w of wikis) {\n const title = w.id ?? extractFeatureTitle(w.information);\n lines.push(`- ${title}`);\n }\n }\n\n return lines.join(\"\\n\");\n}\n\n// ================================================================\n// Compose — main entry point\n// ================================================================\n\n/**\n * Render a project operation result as readable text.\n * Returns status + hint + project overview.\n */\nexport function renderProjectResult(action: ProjectAction, state: State): string {\n const name = state.id ?? state.name;\n const lines: string[] = [];\n\n // Layer 1: Status\n lines.push(describe(action, name, state));\n\n // Layer 2: Hint\n lines.push(hint(action));\n\n // Layer 3: Project overview\n // For child operations (scope, milestone, etc.), find the project parent\n const projectState = isProjectNode(state) ? state : null;\n if (projectState) {\n lines.push(\"\");\n lines.push(renderProject(projectState));\n }\n\n return lines.join(\"\\n\");\n}\n\n// ================================================================\n// Helpers\n// ================================================================\n\nfunction isProjectNode(state: State): boolean {\n return state.name === \"project\";\n}\n\nfunction extractFeatureTitle(information?: string | null): string {\n if (!information) return \"(untitled)\";\n const match = information.match(/^Feature:\\s*(.+)$/m);\n return match?.[1]?.trim() ?? information.split(\"\\n\")[0].trim();\n}\n","/**\n * RoleX — builder entry point.\n *\n * Usage:\n * import { createRoleX } from \"rolexjs\";\n *\n * const rx = createRoleX({ platform });\n * const role = await rx.individual.activate({ individual: \"sean\" });\n * await rx.society.born({ id: \"alice\", content: \"Feature: Alice\" });\n */\n\nimport { createBuilder, type Platform, type Renderer, type RoleXBuilder } from \"@rolexjs/core\";\nimport { genesis } from \"@rolexjs/genesis\";\nimport { createRendererRouter } from \"./renderers/index.js\";\n\nexport interface RoleXConfig {\n platform: Platform;\n renderer?: Renderer;\n}\n\n/** Create a RoleX builder. Synchronous — initialization is lazy. Genesis is built-in. */\nexport function createRoleX(config: RoleXConfig): RoleXBuilder {\n return createBuilder({\n platform: config.platform,\n renderer: config.renderer ?? createRendererRouter(),\n prototypes: [genesis],\n });\n}\n","/**\n * Renderers — business-domain Markdown renderers for AI readability.\n *\n * Each renderer handles a command namespace and transforms\n * CommandResult into AI-readable Markdown.\n *\n * createRendererRouter() wires all renderers into a RendererRouter.\n */\n\nimport { RendererRouter } from \"@rolexjs/core\";\n\n/** @deprecated Use SocietyRenderer — individual.* commands moved to society.* */\nexport { IndividualRenderer } from \"./individual.js\";\n\nimport { InspectRenderer } from \"./inspect.js\";\nimport { OrgRenderer } from \"./org.js\";\nimport { PositionRenderer } from \"./position.js\";\nimport { ProductRenderer } from \"./product.js\";\nimport { ProjectRenderer } from \"./project.js\";\nimport { RoleRenderer } from \"./role.js\";\nimport { SocietyRenderer } from \"./society.js\";\nimport { SurveyRenderer } from \"./survey.js\";\n\nexport { InspectRenderer } from \"./inspect.js\";\nexport { OrgRenderer } from \"./org.js\";\nexport { PositionRenderer } from \"./position.js\";\nexport { ProductRenderer } from \"./product.js\";\nexport { ProjectRenderer } from \"./project.js\";\nexport type { Renderer } from \"./renderer.js\";\nexport { RoleRenderer } from \"./role.js\";\nexport { SocietyRenderer } from \"./society.js\";\nexport { SurveyRenderer } from \"./survey.js\";\n\n/** Create a RendererRouter with all business renderers registered. */\nexport function createRendererRouter(): RendererRouter {\n return new RendererRouter()\n .register(\"role\", new RoleRenderer())\n .register(\"org\", new OrgRenderer())\n .register(\"position\", new PositionRenderer())\n .register(\"product\", new ProductRenderer())\n .register(\"project\", new ProjectRenderer())\n .register(\"society\", new SocietyRenderer())\n .register(\"survey\", new SurveyRenderer())\n .register(\"inspect\", new InspectRenderer());\n}\n","/**\n * InspectRenderer — Markdown rendering for the inspect top-level operation.\n *\n * Renders any node's full subtree using the generic renderState renderer.\n */\n\nimport type { CommandResult } from \"@rolexjs/core\";\nimport { describe, hint, renderState } from \"../render.js\";\nimport type { Renderer } from \"./renderer.js\";\n\nexport class InspectRenderer implements Renderer {\n render(_command: string, result: CommandResult): string {\n const name = result.state.id ?? result.state.name;\n const lines: string[] = [];\n\n lines.push(describe(result.process, name, result.state));\n lines.push(hint(result.process));\n lines.push(\"\");\n lines.push(renderState(result.state, 1, { compactLinks: true }));\n\n return lines.join(\"\\n\");\n }\n}\n","/**\n * OrgRenderer — Markdown rendering for org.* commands.\n *\n * Covers: charter, hire, fire.\n * (found and dissolve moved to society.* namespace)\n */\n\nimport type { CommandResult } from \"@rolexjs/core\";\nimport { describe, hint, renderState } from \"../render.js\";\nimport type { Renderer } from \"./renderer.js\";\n\nexport class OrgRenderer implements Renderer {\n render(command: string, result: CommandResult): string {\n const process = command.startsWith(\"org.\") ? command.slice(\"org.\".length) : command;\n const name = result.state.id ?? result.state.name;\n const lines: string[] = [];\n\n lines.push(describe(process, name, result.state));\n lines.push(hint(process));\n lines.push(\"\");\n lines.push(renderState(result.state));\n\n return lines.join(\"\\n\");\n }\n}\n","/**\n * PositionRenderer — Markdown rendering for position.* commands.\n *\n * Covers: establish, charge, require, abolish, appoint, dismiss.\n */\n\nimport type { CommandResult } from \"@rolexjs/core\";\nimport { describe, hint, renderState } from \"../render.js\";\nimport type { Renderer } from \"./renderer.js\";\n\nexport class PositionRenderer implements Renderer {\n render(command: string, result: CommandResult): string {\n const process = command.startsWith(\"position.\") ? command.slice(\"position.\".length) : command;\n const name = result.state.id ?? result.state.name;\n const lines: string[] = [];\n\n lines.push(describe(process, name, result.state));\n lines.push(hint(process));\n lines.push(\"\");\n lines.push(renderState(result.state));\n\n return lines.join(\"\\n\");\n }\n}\n","/**\n * ProductRenderer — Markdown rendering for product.* commands.\n *\n * Covers: create, strategy, spec, release, channel, own, disown, deprecate.\n * Uses specialized product layout (owner, strategy, specs, releases, channels).\n */\n\nimport type { CommandResult } from \"@rolexjs/core\";\nimport { type ProductAction, renderProductResult } from \"../product-render.js\";\nimport type { Renderer } from \"./renderer.js\";\n\nexport class ProductRenderer implements Renderer {\n render(command: string, result: CommandResult): string {\n const action = (\n command.startsWith(\"product.\") ? command.slice(\"product.\".length) : command\n ) as ProductAction;\n return renderProductResult(action, result.state);\n }\n}\n","/**\n * ProjectRenderer — Markdown rendering for project.* commands.\n *\n * Covers: launch, scope, milestone, achieve, enroll, remove, deliver, wiki, archive, produce.\n * Uses specialized project layout (members, milestones, deliverables, wiki sections).\n * \"produce\" delegates to ProductRenderer since it returns product state.\n */\n\nimport type { CommandResult } from \"@rolexjs/core\";\nimport { type ProductAction, renderProductResult } from \"../product-render.js\";\nimport { type ProjectAction, renderProjectResult } from \"../project-render.js\";\nimport type { Renderer } from \"./renderer.js\";\n\nexport class ProjectRenderer implements Renderer {\n render(command: string, result: CommandResult): string {\n const action = (\n command.startsWith(\"project.\") ? command.slice(\"project.\".length) : command\n ) as ProjectAction;\n // produce returns product state, delegate to product renderer\n if (action === \"produce\") {\n return renderProductResult(action as unknown as ProductAction, result.state);\n }\n return renderProjectResult(action, result.state);\n }\n}\n","/**\n * RoleRenderer — Markdown rendering for role.* commands.\n *\n * Covers: focus, want, plan, todo, finish, complete, abandon,\n * reflect, realize, master, forget, skill.\n */\n\nimport type { CommandResult } from \"@rolexjs/core\";\nimport { collectPermissions, describe, hint, renderPermissions, renderState } from \"../render.js\";\nimport type { Renderer } from \"./renderer.js\";\n\nexport class RoleRenderer implements Renderer {\n render(command: string, result: CommandResult): string {\n const process = command.startsWith(\"role.\") ? command.slice(\"role.\".length) : command;\n const name = result.state.id ?? result.state.name;\n const lines: string[] = [];\n\n lines.push(describe(process, name, result.state));\n lines.push(hint(process));\n lines.push(\"\");\n lines.push(renderState(result.state));\n\n // Activate: append permissions collected from links\n if (process === \"activate\") {\n const permissions = collectPermissions(result.state);\n if (permissions.length > 0) {\n lines.push(\"\");\n lines.push(renderPermissions(permissions));\n }\n }\n\n return lines.join(\"\\n\");\n }\n}\n","/**\n * SocietyRenderer — Markdown rendering for society.* commands.\n *\n * Covers: born, retire, die, rehire, teach, train, found, dissolve, crown, uncrown.\n */\n\nimport type { CommandResult } from \"@rolexjs/core\";\nimport { describe, hint, renderState } from \"../render.js\";\nimport type { Renderer } from \"./renderer.js\";\n\nexport class SocietyRenderer implements Renderer {\n render(command: string, result: CommandResult): string {\n const process = command.startsWith(\"society.\") ? command.slice(\"society.\".length) : command;\n const name = result.state.id ?? result.state.name;\n const lines: string[] = [];\n\n lines.push(describe(process, name, result.state));\n lines.push(hint(process));\n lines.push(\"\");\n lines.push(renderState(result.state));\n\n return lines.join(\"\\n\");\n }\n}\n","/**\n * SurveyRenderer — Markdown rendering for survey.* commands.\n *\n * Renders the organization-centric tree view:\n * orgs → projects + members (with positions) → unaffiliated individuals.\n */\n\nimport type { CommandResult } from \"@rolexjs/core\";\nimport type { State } from \"@rolexjs/system\";\nimport type { Renderer } from \"./renderer.js\";\n\nexport class SurveyRenderer implements Renderer {\n render(_command: string, result: CommandResult): string {\n const children = result.state.children ?? [];\n\n if (children.length === 0) {\n return \"Society is empty.\";\n }\n\n // Check if all children are the same type (filtered by type)\n const types = new Set(children.map((c) => c.name));\n if (types.size === 1 && !types.has(\"organization\")) {\n return this.renderFlat(children);\n }\n\n return this.renderTree(children);\n }\n\n private renderFlat(items: readonly State[]): string {\n const lines: string[] = [];\n for (const item of items) {\n const tag = item.tag ? ` #${item.tag}` : \"\";\n const alias =\n Array.isArray(item.alias) && item.alias.length ? ` (${item.alias.join(\", \")})` : \"\";\n lines.push(`${item.id ?? \"(no id)\"}${alias}${tag}`);\n }\n return lines.join(\"\\n\");\n }\n\n private renderTree(children: readonly State[]): string {\n const orgs = children.filter((c) => c.name === \"organization\");\n const individuals = children.filter((c) => c.name === \"individual\");\n\n // Build a map: individual id → positions they serve\n const individualPositions = new Map<string, string[]>();\n for (const ind of individuals) {\n const serves = ind.links?.filter((l) => l.relation === \"serve\") ?? [];\n if (serves.length > 0) {\n individualPositions.set(\n ind.id ?? \"\",\n serves.map((l) => l.target.id ?? \"(no id)\")\n );\n }\n }\n\n const affiliatedIndividuals = new Set<string>();\n const lines: string[] = [];\n\n for (const org of orgs) {\n const alias =\n Array.isArray(org.alias) && org.alias.length ? ` (${org.alias.join(\", \")})` : \"\";\n const tag = org.tag ? ` #${org.tag}` : \"\";\n lines.push(`${org.id}${alias}${tag}`);\n\n // Projects owned by this org\n const projects = org.links?.filter((l) => l.relation === \"project\") ?? [];\n for (const p of projects) {\n const pAlias =\n Array.isArray(p.target.alias) && p.target.alias.length\n ? ` (${p.target.alias.join(\", \")})`\n : \"\";\n const pTag = p.target.tag ? ` #${p.target.tag}` : \"\";\n lines.push(` 📦 ${p.target.id ?? \"(no id)\"}${pAlias}${pTag}`);\n }\n\n // Members of this org\n const members = org.links?.filter((l) => l.relation === \"membership\") ?? [];\n if (members.length === 0 && projects.length === 0) {\n lines.push(\" (empty)\");\n }\n for (const m of members) {\n affiliatedIndividuals.add(m.target.id ?? \"\");\n const mAlias =\n Array.isArray(m.target.alias) && m.target.alias.length\n ? ` (${m.target.alias.join(\", \")})`\n : \"\";\n const mTag = m.target.tag ? ` #${m.target.tag}` : \"\";\n const posLabels = individualPositions.get(m.target.id ?? \"\");\n const posStr = posLabels?.length ? ` — ${posLabels.join(\", \")}` : \"\";\n lines.push(` ${m.target.id}${mAlias}${mTag}${posStr}`);\n }\n lines.push(\"\");\n }\n\n // Unaffiliated individuals\n const unaffiliated = individuals.filter((ind) => !affiliatedIndividuals.has(ind.id ?? \"\"));\n if (unaffiliated.length > 0) {\n lines.push(\"─── unaffiliated ───\");\n for (const ind of unaffiliated) {\n const alias =\n Array.isArray(ind.alias) && ind.alias.length ? ` (${ind.alias.join(\", \")})` : \"\";\n const tag = ind.tag ? ` #${ind.tag}` : \"\";\n const posLabels = individualPositions.get(ind.id ?? \"\");\n const posStr = posLabels?.length ? ` — ${posLabels.join(\", \")}` : \"\";\n lines.push(` ${ind.id}${alias}${tag}${posStr}`);\n }\n }\n\n return lines.join(\"\\n\");\n }\n}\n"],"mappings":";AAYA,cAAc;;;AC6Jd,SAAS,YAAY,WAAW,aAAa;AA1J7C,IAAM,eAAuE;AAAA;AAAA,EAE3E,MAAM,CAAC,MAAM,eAAe,CAAC;AAAA,EAC7B,OAAO,CAAC,MAAM,iBAAiB,CAAC;AAAA,EAChC,WAAW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AC,EACzC,SAAS,UAAU,IAAI,eAAe,CAAC,EACvC,SAAS,WAAW,IAAI,gBAAgB,CAAC;AAC9C;;;ADvBO,SAAS,YAAY,QAAmC;AAC7D,SAAO,cAAc;AAAA,IACnB,UAAU,OAAO;AAAA,IACjB,UAAU,OAAO,YAAY,qBAAqB;AAAA,IAClD,YAAY,CAAC,OAAO;AAAA,EACtB,CAAC;AACH;","names":["tag","tag","extractFeatureTitle"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/render.ts","../src/product-render.ts","../src/project-render.ts","../src/rolex.ts","../src/renderers/index.ts","../src/renderers/inspect.ts","../src/renderers/org.ts","../src/renderers/position.ts","../src/renderers/product.ts","../src/renderers/project.ts","../src/renderers/role.ts","../src/renderers/society.ts","../src/renderers/survey.ts"],"sourcesContent":["/**\n * rolexjs — RoleX unified entry point.\n *\n * Usage:\n * import { createRoleX } from \"rolexjs\";\n *\n * const rx = createRoleX({ platform });\n * const role = await rx.individual.activate({ individual: \"sean\" });\n * await role.want(\"Feature: Ship v1\", \"ship-v1\");\n */\n\n// Re-export core (structures, processes, Role, types)\nexport * from \"@rolexjs/core\";\n// Product Render\nexport type { ProductAction } from \"./product-render.js\";\nexport { renderProduct, renderProductResult } from \"./product-render.js\";\n// Project Render\nexport type { ProjectAction } from \"./project-render.js\";\nexport { renderProjectResult } from \"./project-render.js\";\n// API\nexport type { RoleXConfig } from \"./rolex.js\";\nexport { createRoleX } from \"./rolex.js\";\n","/**\n * Render — 3-layer output for all Rolex operations.\n *\n * Layer 1: Status — what just happened (describe)\n * Layer 2: Hint — what to do next (hint + cognitive hint)\n * Layer 3: Projection — full state tree as markdown (renderState)\n *\n * render() composes the 3 layers. MCP and CLI are pure pass-through.\n */\nimport type { Permission, State } from \"@rolexjs/system\";\n\n// ================================================================\n// Description — what happened\n// ================================================================\n\nconst descriptions: Record<string, (name: string, state: State) => string> = {\n // Lifecycle\n born: (n) => `Individual \"${n}\" is born.`,\n found: (n) => `Organization \"${n}\" is founded.`,\n establish: (n) => `Position \"${n}\" is established.`,\n charter: (n) => `Charter defined for \"${n}\".`,\n charge: (n) => `Duty \"${n}\" assigned.`,\n retire: (n) => `\"${n}\" retired.`,\n die: (n) => `\"${n}\" is gone.`,\n dissolve: (n) => `Organization \"${n}\" dissolved.`,\n abolish: (n) => `Position \"${n}\" abolished.`,\n rehire: (n) => `\"${n}\" is back.`,\n\n // Organization\n hire: (n) => `\"${n}\" hired.`,\n fire: (n) => `\"${n}\" fired.`,\n appoint: (n) => `\"${n}\" appointed.`,\n dismiss: (n) => `\"${n}\" dismissed.`,\n\n // Project\n launch: (n) => `Project \"${n}\" launched.`,\n scope: (n) => `Scope defined for \"${n}\".`,\n milestone: (n) => `Milestone \"${n}\" added.`,\n achieve: (n) => `Milestone \"${n}\" achieved.`,\n enroll: (n) => `\"${n}\" enrolled.`,\n remove: (n) => `\"${n}\" removed.`,\n deliver: (n) => `Deliverable \"${n}\" added.`,\n wiki: (n) => `Wiki entry \"${n}\" added.`,\n archive: (n) => `Project \"${n}\" archived.`,\n produce: (n) => `Product \"${n}\" produced.`,\n\n // Product\n strategy: (n) => `Strategy defined for \"${n}\".`,\n spec: (n) => `Spec \"${n}\" added.`,\n release: (n) => `Release \"${n}\" published.`,\n channel: (n) => `Channel \"${n}\" added.`,\n own: (n) => `Owner assigned to \"${n}\".`,\n disown: (n) => `Owner removed from \"${n}\".`,\n deprecate: (n) => `Product \"${n}\" deprecated.`,\n\n // Society\n crown: (n) => `\"${n}\" crowned — sovereign permissions granted.`,\n uncrown: (n) => `\"${n}\" uncrowned — sovereign permissions revoked.`,\n\n // Top-level perception\n inspect: (n) => `Inspecting \"${n}\".`,\n\n // Role\n activate: (n) => `Role \"${n}\" activated.`,\n focus: (n) => `Focused on goal \"${n}\".`,\n\n // Execution\n want: (n) => `Goal \"${n}\" declared.`,\n plan: (n) => `Plan created for \"${n}\".`,\n todo: (n) => `Task \"${n}\" added.`,\n finish: (n) => `Task \"${n}\" finished → encounter recorded.`,\n complete: (n) => `Plan \"${n}\" completed → encounter recorded.`,\n abandon: (n) => `Plan \"${n}\" abandoned → encounter recorded.`,\n\n // Cognition\n reflect: (n) => `Reflected on \"${n}\" → experience gained.`,\n realize: (n) => `Realized principle from \"${n}\".`,\n master: (n) => `Mastered procedure from \"${n}\".`,\n\n // Knowledge management\n forget: (n) => `\"${n}\" forgotten.`,\n};\n\nexport function describe(process: string, name: string, state: State): string {\n const fn = descriptions[process];\n return fn ? fn(name, state) : `${process} completed.`;\n}\n\n// ================================================================\n// Hint — what to do next\n// ================================================================\n\nconst hints: Record<string, string> = {\n // Lifecycle\n born: \"hire into an organization, or activate to start working.\",\n found: \"define a charter for the organization.\",\n establish: \"charge with duties, then appoint members.\",\n charter: \"establish positions for the organization.\",\n charge: \"appoint someone to this position.\",\n retire: \"rehire if needed later.\",\n die: \"this individual is permanently gone.\",\n dissolve: \"the organization no longer exists.\",\n abolish: \"the position no longer exists.\",\n rehire: \"activate to resume working.\",\n\n // Organization\n hire: \"appoint to a position, or activate to start working.\",\n fire: \"the individual is no longer a member.\",\n appoint: \"the individual now holds this position.\",\n dismiss: \"the position is now vacant.\",\n\n // Project\n launch: \"define scope, add milestones, or enroll members.\",\n scope: \"add milestones to break down the project.\",\n milestone: \"enroll members and start working.\",\n achieve: \"continue with remaining milestones, or archive the project.\",\n enroll: \"assign milestones and start working.\",\n remove: \"the individual is no longer a participant.\",\n deliver: \"deliverable recorded.\",\n wiki: \"knowledge entry recorded.\",\n archive: \"the project is archived.\",\n produce: \"define strategy, add specs, or assign an owner.\",\n\n // Product\n strategy: \"add behavior specs (BDD contracts) for the product.\",\n spec: \"add more specs, or publish a release.\",\n release: \"add distribution channels, or continue adding specs.\",\n channel: \"distribution channel recorded.\",\n own: \"the individual is now the product owner.\",\n disown: \"the individual is no longer the product owner.\",\n deprecate: \"the product is deprecated.\",\n\n // Society\n crown: \"the individual now has sovereign permissions over society.\",\n uncrown: \"the individual no longer has sovereign permissions.\",\n\n // Top-level perception\n inspect: \"use inspect on child nodes for deeper detail, or activate to work as a role.\",\n\n // Role\n activate: \"want a goal, or check the current state.\",\n focus: \"plan how to work toward it, or add tasks.\",\n\n // Execution\n want: \"plan how to work toward it.\",\n plan: \"add tasks with todo.\",\n todo: \"start working, finish when done.\",\n finish: \"continue with remaining tasks, or complete the plan.\",\n complete: \"reflect on encounters to gain experience.\",\n abandon: \"reflect on encounters to learn from the experience.\",\n\n // Cognition\n reflect: \"realize principles or master procedures from experience.\",\n realize: \"principle added.\",\n master: \"procedure added.\",\n\n // Knowledge management\n forget: \"the node has been removed.\",\n};\n\nexport function hint(process: string): string {\n const h = hints[process];\n return h ? `Next: ${h}` : \"What would you like to do next?\";\n}\n\n// ================================================================\n// Detail — longer process descriptions (from .feature files)\n// ================================================================\n\nimport { directives, processes, world } from \"@rolexjs/core\";\n\n/** Full Gherkin feature content for a process — sourced from .feature files. */\nexport function detail(process: string): string {\n return processes[process] ?? \"\";\n}\n\n/** World feature descriptions — framework-level instructions. */\nexport { world };\n\n// ================================================================\n// Directive — system-level commands at decision points\n// ================================================================\n\n/** Get a directive by topic and scenario. Returns empty string if not found. */\nexport function directive(topic: string, scenario: string): string {\n return directives[topic]?.[scenario] ?? \"\";\n}\n\n// ================================================================\n// Generic State renderer — renders any State tree as markdown\n// ================================================================\n\n/**\n * renderState — markdown renderer for State trees.\n *\n * Rules:\n * - Heading: \"#\" repeated to depth + \" [name]\"\n * - Body: raw information field as-is (full Gherkin preserved)\n * - Links: \"> → relation [target.name]\" with target feature name\n * - Children: sorted by concept hierarchy, then rendered at depth+1\n * - Fold: when fold(node) returns true, render heading only (no body/links/children)\n *\n * Markdown heading depth caps at 6 (######).\n */\nexport interface RenderStateOptions {\n /** When returns true, render only the heading — skip body, links, and children. */\n fold?: (node: State) => boolean;\n /** When true, all links render as compact references (name + id only, no subtree). */\n compactLinks?: boolean;\n}\n\nexport function renderState(state: State, depth = 1, options?: RenderStateOptions): string {\n const lines: string[] = [];\n const level = Math.min(depth, 6);\n const heading = \"#\".repeat(level);\n\n // Heading: [name] (id) {origin} #tag [progress]\n const idPart = state.id ? ` (${state.id})` : \"\";\n const originPart = state.origin ? ` {${state.origin}}` : \"\";\n const tagPart = state.tags?.length ? ` ${state.tags.map((t) => `#${t}`).join(\" \")}` : \"\";\n const progressPart = state.name === \"goal\" ? goalProgress(state) : \"\";\n lines.push(`${heading} [${state.name}]${idPart}${originPart}${tagPart}${progressPart}`);\n\n // Folded: heading only\n if (options?.fold?.(state)) {\n return lines.join(\"\\n\");\n }\n\n // Body: full information as-is\n if (state.information) {\n lines.push(\"\");\n lines.push(state.information);\n }\n\n // Links — compact shows reference only, expanded shows full subtree\n if (state.links && state.links.length > 0) {\n const compactRelations = new Set([\"after\", \"before\", \"fallback\", \"fallback-for\"]);\n const allCompact = options?.compactLinks;\n const compact = allCompact\n ? state.links\n : state.links.filter((l) => compactRelations.has(l.relation));\n const expanded = allCompact ? [] : state.links.filter((l) => !compactRelations.has(l.relation));\n for (const link of compact) {\n const targetId = link.target.id ? ` (${link.target.id})` : \"\";\n const targetTag = link.target.tags?.length\n ? ` ${link.target.tags.map((t) => `#${t}`).join(\" \")}`\n : \"\";\n lines.push(`> ${link.relation}: [${link.target.name}]${targetId}${targetTag}`);\n }\n if (expanded.length > 0) {\n const targets = sortByConceptOrder(expanded.map((l) => l.target));\n for (const target of targets) {\n lines.push(\"\");\n lines.push(renderState(target, depth + 1, options));\n }\n }\n }\n\n // Children — sorted by concept hierarchy, empty nodes filtered out\n if (state.children && state.children.length > 0) {\n const sorted = sortByConceptOrder(state.children.filter((c) => !isEmpty(c)));\n for (const child of sorted) {\n lines.push(\"\");\n lines.push(renderState(child, depth + 1, options));\n }\n }\n\n return lines.join(\"\\n\");\n}\n\n// ================================================================\n// Permissions — collect and render from link tree\n// ================================================================\n\n/** Recursively collect all permissions from a state tree's links. */\nexport function collectPermissions(state: State): Permission[] {\n const seen = new Set<string>();\n const result: Permission[] = [];\n\n const walk = (s: State) => {\n if (s.links) {\n for (const link of s.links) {\n if (link.permissions) {\n for (const p of link.permissions) {\n if (!seen.has(p.command)) {\n seen.add(p.command);\n result.push(p);\n }\n }\n }\n // Don't recurse into link targets — they are compact references\n }\n }\n if (s.children) {\n for (const child of s.children) {\n walk(child);\n }\n }\n };\n\n walk(state);\n return result;\n}\n\n/** Render permissions as a markdown section. */\nexport function renderPermissions(permissions: readonly Permission[]): string {\n if (permissions.length === 0) return \"\";\n\n const lines: string[] = [];\n lines.push(\"# Permissions\\n\");\n for (const p of permissions) {\n lines.push(p.content);\n lines.push(\"\");\n }\n return lines.join(\"\\n\");\n}\n\n// ================================================================\n// Concept ordering — children sorted by structure hierarchy\n// ================================================================\n\n/** Concept tree order: identity → cognition → knowledge → execution → organization. */\nconst CONCEPT_ORDER: readonly string[] = [\n // Individual — Identity\n \"identity\",\n \"background\",\n \"tone\",\n \"mindset\",\n // Individual — Cognition\n \"encounter\",\n \"experience\",\n // Individual — Knowledge\n \"principle\",\n \"procedure\",\n // Individual — Execution\n \"goal\",\n \"plan\",\n \"task\",\n // Organization\n \"charter\",\n // Position\n \"position\",\n \"duty\",\n // Project\n \"scope\",\n \"milestone\",\n \"deliverable\",\n \"wiki\",\n // Product\n \"strategy\",\n \"spec\",\n \"release\",\n \"channel\",\n];\n\n/** Summarize plan/task completion for a goal heading. */\nfunction goalProgress(goal: State): string {\n let plans = 0;\n let plansDone = 0;\n let tasks = 0;\n let tasksDone = 0;\n\n function walk(node: State): void {\n if (node.name === \"plan\") {\n plans++;\n if (node.tags?.includes(\"done\") || node.tags?.includes(\"abandoned\")) plansDone++;\n } else if (node.name === \"task\") {\n tasks++;\n if (node.tags?.includes(\"done\")) tasksDone++;\n }\n for (const child of node.children ?? []) walk(child);\n }\n\n for (const child of goal.children ?? []) walk(child);\n if (plans === 0 && tasks === 0) return \"\";\n const parts: string[] = [];\n if (plans > 0) parts.push(`${plansDone}/${plans} plans`);\n if (tasks > 0) parts.push(`${tasksDone}/${tasks} tasks`);\n return ` [${parts.join(\", \")}]`;\n}\n\n/** A node is empty when it has no id, no information, and no children. */\nfunction isEmpty(node: State): boolean {\n return !node.id && !node.information && (!node.children || node.children.length === 0);\n}\n\n/** Sort children by concept hierarchy order. Unknown names go to the end, preserving relative order. */\nfunction sortByConceptOrder(children: readonly State[]): readonly State[] {\n return [...children].sort((a, b) => {\n const ai = CONCEPT_ORDER.indexOf(a.name);\n const bi = CONCEPT_ORDER.indexOf(b.name);\n const aOrder = ai >= 0 ? ai : CONCEPT_ORDER.length;\n const bOrder = bi >= 0 ? bi : CONCEPT_ORDER.length;\n return aOrder - bOrder;\n });\n}\n\n// ================================================================\n// Render — 3-layer output for tool results\n// ================================================================\n\nexport interface RenderOptions {\n /** The process that was executed. */\n process: string;\n /** Display name for the primary node. */\n name: string;\n /** State projection of the affected node. */\n state: State;\n /** AI cognitive hint — first-person, state-aware self-direction cue. */\n cognitiveHint?: string | null;\n /** Fold predicate — folded nodes render heading only. */\n fold?: RenderStateOptions[\"fold\"];\n}\n\n/** Render a full 3-layer output string. */\nexport function render(opts: RenderOptions): string {\n const { process, name, state, cognitiveHint, fold } = opts;\n const lines: string[] = [];\n\n // Layer 1: Status\n lines.push(describe(process, name, state));\n\n // Layer 2: Hint (static) + Cognitive hint (state-aware)\n lines.push(hint(process));\n if (cognitiveHint) {\n lines.push(`I → ${cognitiveHint}`);\n }\n\n // Layer 3: Projection — generic markdown rendering of the full state tree\n lines.push(\"\");\n lines.push(renderState(state, 1, fold ? { fold } : undefined));\n\n return lines.join(\"\\n\");\n}\n","/**\n * Product Render — format product state as readable text.\n *\n * Renders product operations into human-readable summaries.\n * Ownership links show owner names only (not full individual trees).\n * Specs show behavior contract titles for quick overview.\n */\nimport type { State } from \"@rolexjs/system\";\nimport { describe, hint } from \"./render.js\";\n\n// ================================================================\n// Types\n// ================================================================\n\nexport type ProductAction =\n | \"produce\"\n | \"strategy\"\n | \"spec\"\n | \"release\"\n | \"channel\"\n | \"own\"\n | \"disown\"\n | \"deprecate\";\n\n// ================================================================\n// Product Overview\n// ================================================================\n\nexport function renderProduct(state: State): string {\n const lines: string[] = [];\n const id = state.id ?? \"(no id)\";\n const tagPart = state.tags?.length ? ` ${state.tags.map((t) => `#${t}`).join(\" \")}` : \"\";\n\n // Title\n lines.push(`# ${id}${tagPart}`);\n\n // Feature body (vision)\n if (state.information) {\n lines.push(\"\");\n lines.push(state.information);\n }\n\n // Owners (ownership links — compact)\n const owners = state.links?.filter((l) => l.relation === \"ownership\") ?? [];\n if (owners.length > 0) {\n lines.push(\"\");\n lines.push(\"## Owner\");\n for (const o of owners) {\n const alias =\n Array.isArray(o.target.alias) && o.target.alias.length\n ? ` (${o.target.alias.join(\", \")})`\n : \"\";\n lines.push(`- ${o.target.id ?? \"(no id)\"}${alias}`);\n }\n }\n\n // Children by type\n const children = state.children ?? [];\n\n const strategies = children.filter((c) => c.name === \"strategy\");\n const specs = children.filter((c) => c.name === \"spec\");\n const releases = children.filter((c) => c.name === \"release\");\n const channels = children.filter((c) => c.name === \"channel\");\n\n if (strategies.length > 0) {\n lines.push(\"\");\n lines.push(\"## Strategy\");\n for (const s of strategies) {\n if (s.information) lines.push(s.information);\n }\n }\n\n if (specs.length > 0) {\n lines.push(\"\");\n lines.push(\"## Specs\");\n for (const s of specs) {\n const title = s.id ?? extractFeatureTitle(s.information);\n lines.push(`- ${title}`);\n }\n }\n\n if (releases.length > 0) {\n lines.push(\"\");\n lines.push(\"## Releases\");\n for (const r of releases) {\n const rTag = r.tags?.length ? ` ${r.tags.map((t) => `#${t}`).join(\" \")}` : \"\";\n const title = r.id ?? extractFeatureTitle(r.information);\n lines.push(`- ${title}${rTag}`);\n }\n }\n\n if (channels.length > 0) {\n lines.push(\"\");\n lines.push(\"## Channels\");\n for (const c of channels) {\n const title = c.id ?? extractFeatureTitle(c.information);\n lines.push(`- ${title}`);\n }\n }\n\n return lines.join(\"\\n\");\n}\n\n// ================================================================\n// Compose — main entry point\n// ================================================================\n\n/**\n * Render a product operation result as readable text.\n * Returns status + hint + product overview.\n */\nexport function renderProductResult(action: ProductAction, state: State): string {\n const name = state.id ?? state.name;\n const lines: string[] = [];\n\n // Layer 1: Status\n lines.push(describe(action, name, state));\n\n // Layer 2: Hint\n lines.push(hint(action));\n\n // Layer 3: Product overview\n const productState = isProductNode(state) ? state : null;\n if (productState) {\n lines.push(\"\");\n lines.push(renderProduct(productState));\n }\n\n return lines.join(\"\\n\");\n}\n\n// ================================================================\n// Helpers\n// ================================================================\n\nfunction isProductNode(state: State): boolean {\n return state.name === \"product\";\n}\n\nfunction extractFeatureTitle(information?: string | null): string {\n if (!information) return \"(untitled)\";\n const match = information.match(/^Feature:\\s*(.+)$/m);\n return match?.[1]?.trim() ?? information.split(\"\\n\")[0].trim();\n}\n","/**\n * Project Render — format project state as readable text.\n *\n * Renders project operations into human-readable summaries.\n * Participation links show member names only (not full individual trees).\n * Milestones show progress status (#done or pending).\n */\nimport type { State } from \"@rolexjs/system\";\nimport { describe, hint } from \"./render.js\";\n\n// ================================================================\n// Types\n// ================================================================\n\nexport type ProjectAction =\n | \"launch\"\n | \"scope\"\n | \"milestone\"\n | \"achieve\"\n | \"enroll\"\n | \"remove\"\n | \"deliver\"\n | \"wiki\"\n | \"archive\"\n | \"produce\";\n\n// ================================================================\n// Project Overview\n// ================================================================\n\nexport function renderProject(state: State): string {\n const lines: string[] = [];\n const id = state.id ?? \"(no id)\";\n const tagPart = state.tags?.length ? ` ${state.tags.map((t) => `#${t}`).join(\" \")}` : \"\";\n\n // Title\n lines.push(`# ${id}${tagPart}`);\n\n // Feature body\n if (state.information) {\n lines.push(\"\");\n lines.push(state.information);\n }\n\n // Members (participation links — compact)\n const members = state.links?.filter((l) => l.relation === \"participation\") ?? [];\n if (members.length > 0) {\n lines.push(\"\");\n lines.push(\"## Members\");\n for (const m of members) {\n const alias =\n Array.isArray(m.target.alias) && m.target.alias.length\n ? ` (${m.target.alias.join(\", \")})`\n : \"\";\n lines.push(`- ${m.target.id ?? \"(no id)\"}${alias}`);\n }\n }\n\n // Children by type\n const children = state.children ?? [];\n\n const scopes = children.filter((c) => c.name === \"scope\");\n const milestones = children.filter((c) => c.name === \"milestone\");\n const deliverables = children.filter((c) => c.name === \"deliverable\");\n const wikis = children.filter((c) => c.name === \"wiki\");\n\n if (scopes.length > 0) {\n lines.push(\"\");\n lines.push(\"## Scope\");\n for (const s of scopes) {\n if (s.information) lines.push(s.information);\n }\n }\n\n if (milestones.length > 0) {\n lines.push(\"\");\n lines.push(\"## Milestones\");\n for (const m of milestones) {\n const mTag = m.tags?.length ? ` ${m.tags.map((t) => `#${t}`).join(\" \")}` : \"\";\n const marker = m.tags?.includes(\"done\") ? \"[x]\" : \"[ ]\";\n const title = extractFeatureTitle(m.information);\n lines.push(`- ${marker} ${m.id ?? title}${mTag}`);\n if (m.information && m.id) {\n const desc = extractFeatureTitle(m.information);\n if (desc && desc !== m.id) lines.push(` ${desc}`);\n }\n }\n }\n\n if (deliverables.length > 0) {\n lines.push(\"\");\n lines.push(\"## Deliverables\");\n for (const d of deliverables) {\n const title = d.id ?? extractFeatureTitle(d.information);\n lines.push(`- ${title}`);\n }\n }\n\n if (wikis.length > 0) {\n lines.push(\"\");\n lines.push(\"## Wiki\");\n for (const w of wikis) {\n const title = w.id ?? extractFeatureTitle(w.information);\n lines.push(`- ${title}`);\n }\n }\n\n return lines.join(\"\\n\");\n}\n\n// ================================================================\n// Compose — main entry point\n// ================================================================\n\n/**\n * Render a project operation result as readable text.\n * Returns status + hint + project overview.\n */\nexport function renderProjectResult(action: ProjectAction, state: State): string {\n const name = state.id ?? state.name;\n const lines: string[] = [];\n\n // Layer 1: Status\n lines.push(describe(action, name, state));\n\n // Layer 2: Hint\n lines.push(hint(action));\n\n // Layer 3: Project overview\n // For child operations (scope, milestone, etc.), find the project parent\n const projectState = isProjectNode(state) ? state : null;\n if (projectState) {\n lines.push(\"\");\n lines.push(renderProject(projectState));\n }\n\n return lines.join(\"\\n\");\n}\n\n// ================================================================\n// Helpers\n// ================================================================\n\nfunction isProjectNode(state: State): boolean {\n return state.name === \"project\";\n}\n\nfunction extractFeatureTitle(information?: string | null): string {\n if (!information) return \"(untitled)\";\n const match = information.match(/^Feature:\\s*(.+)$/m);\n return match?.[1]?.trim() ?? information.split(\"\\n\")[0].trim();\n}\n","/**\n * RoleX — builder entry point.\n *\n * Usage:\n * import { createRoleX } from \"rolexjs\";\n *\n * const rx = createRoleX({ platform });\n * const role = await rx.individual.activate({ individual: \"sean\" });\n * await rx.society.born({ id: \"alice\", content: \"Feature: Alice\" });\n */\n\nimport { createBuilder, type Platform, type Renderer, type RoleXBuilder } from \"@rolexjs/core\";\nimport { genesis } from \"@rolexjs/genesis\";\nimport { createRendererRouter } from \"./renderers/index.js\";\n\nexport interface RoleXConfig {\n platform: Platform;\n renderer?: Renderer;\n}\n\n/** Create a RoleX builder. Synchronous — initialization is lazy. Genesis is built-in. */\nexport function createRoleX(config: RoleXConfig): RoleXBuilder {\n return createBuilder({\n platform: config.platform,\n renderer: config.renderer ?? createRendererRouter(),\n prototypes: [genesis],\n });\n}\n","/**\n * Renderers — business-domain Markdown renderers for AI readability.\n *\n * Each renderer handles a command namespace and transforms\n * CommandResult into AI-readable Markdown.\n *\n * createRendererRouter() wires all renderers into a RendererRouter.\n */\n\nimport { RendererRouter } from \"@rolexjs/core\";\n\n/** @deprecated Use SocietyRenderer — individual.* commands moved to society.* */\nexport { IndividualRenderer } from \"./individual.js\";\n\nimport { InspectRenderer } from \"./inspect.js\";\nimport { OrgRenderer } from \"./org.js\";\nimport { PositionRenderer } from \"./position.js\";\nimport { ProductRenderer } from \"./product.js\";\nimport { ProjectRenderer } from \"./project.js\";\nimport { RoleRenderer } from \"./role.js\";\nimport { SocietyRenderer } from \"./society.js\";\nimport { SurveyRenderer } from \"./survey.js\";\n\nexport { InspectRenderer } from \"./inspect.js\";\nexport { OrgRenderer } from \"./org.js\";\nexport { PositionRenderer } from \"./position.js\";\nexport { ProductRenderer } from \"./product.js\";\nexport { ProjectRenderer } from \"./project.js\";\nexport type { Renderer } from \"./renderer.js\";\nexport { RoleRenderer } from \"./role.js\";\nexport { SocietyRenderer } from \"./society.js\";\nexport { SurveyRenderer } from \"./survey.js\";\n\n/** Create a RendererRouter with all business renderers registered. */\nexport function createRendererRouter(): RendererRouter {\n return new RendererRouter()\n .register(\"role\", new RoleRenderer())\n .register(\"org\", new OrgRenderer())\n .register(\"position\", new PositionRenderer())\n .register(\"product\", new ProductRenderer())\n .register(\"project\", new ProjectRenderer())\n .register(\"society\", new SocietyRenderer())\n .register(\"survey\", new SurveyRenderer())\n .register(\"inspect\", new InspectRenderer());\n}\n","/**\n * InspectRenderer — Markdown rendering for the inspect top-level operation.\n *\n * Renders any node's full subtree using the generic renderState renderer.\n */\n\nimport type { CommandResult } from \"@rolexjs/core\";\nimport { describe, hint, renderState } from \"../render.js\";\nimport type { Renderer } from \"./renderer.js\";\n\nexport class InspectRenderer implements Renderer {\n render(_command: string, result: CommandResult): string {\n const name = result.state.id ?? result.state.name;\n const lines: string[] = [];\n\n lines.push(describe(result.process, name, result.state));\n lines.push(hint(result.process));\n lines.push(\"\");\n lines.push(renderState(result.state, 1, { compactLinks: true }));\n\n return lines.join(\"\\n\");\n }\n}\n","/**\n * OrgRenderer — Markdown rendering for org.* commands.\n *\n * Covers: charter, hire, fire.\n * (found and dissolve moved to society.* namespace)\n */\n\nimport type { CommandResult } from \"@rolexjs/core\";\nimport { describe, hint, renderState } from \"../render.js\";\nimport type { Renderer } from \"./renderer.js\";\n\nexport class OrgRenderer implements Renderer {\n render(command: string, result: CommandResult): string {\n const process = command.startsWith(\"org.\") ? command.slice(\"org.\".length) : command;\n const name = result.state.id ?? result.state.name;\n const lines: string[] = [];\n\n lines.push(describe(process, name, result.state));\n lines.push(hint(process));\n lines.push(\"\");\n lines.push(renderState(result.state));\n\n return lines.join(\"\\n\");\n }\n}\n","/**\n * PositionRenderer — Markdown rendering for position.* commands.\n *\n * Covers: establish, charge, require, abolish, appoint, dismiss.\n */\n\nimport type { CommandResult } from \"@rolexjs/core\";\nimport { describe, hint, renderState } from \"../render.js\";\nimport type { Renderer } from \"./renderer.js\";\n\nexport class PositionRenderer implements Renderer {\n render(command: string, result: CommandResult): string {\n const process = command.startsWith(\"position.\") ? command.slice(\"position.\".length) : command;\n const name = result.state.id ?? result.state.name;\n const lines: string[] = [];\n\n lines.push(describe(process, name, result.state));\n lines.push(hint(process));\n lines.push(\"\");\n lines.push(renderState(result.state));\n\n return lines.join(\"\\n\");\n }\n}\n","/**\n * ProductRenderer — Markdown rendering for product.* commands.\n *\n * Covers: create, strategy, spec, release, channel, own, disown, deprecate.\n * Uses specialized product layout (owner, strategy, specs, releases, channels).\n */\n\nimport type { CommandResult } from \"@rolexjs/core\";\nimport { type ProductAction, renderProductResult } from \"../product-render.js\";\nimport type { Renderer } from \"./renderer.js\";\n\nexport class ProductRenderer implements Renderer {\n render(command: string, result: CommandResult): string {\n const action = (\n command.startsWith(\"product.\") ? command.slice(\"product.\".length) : command\n ) as ProductAction;\n return renderProductResult(action, result.state);\n }\n}\n","/**\n * ProjectRenderer — Markdown rendering for project.* commands.\n *\n * Covers: launch, scope, milestone, achieve, enroll, remove, deliver, wiki, archive, produce.\n * Uses specialized project layout (members, milestones, deliverables, wiki sections).\n * \"produce\" delegates to ProductRenderer since it returns product state.\n */\n\nimport type { CommandResult } from \"@rolexjs/core\";\nimport { type ProductAction, renderProductResult } from \"../product-render.js\";\nimport { type ProjectAction, renderProjectResult } from \"../project-render.js\";\nimport type { Renderer } from \"./renderer.js\";\n\nexport class ProjectRenderer implements Renderer {\n render(command: string, result: CommandResult): string {\n const action = (\n command.startsWith(\"project.\") ? command.slice(\"project.\".length) : command\n ) as ProjectAction;\n // produce returns product state, delegate to product renderer\n if (action === \"produce\") {\n return renderProductResult(action as unknown as ProductAction, result.state);\n }\n return renderProjectResult(action, result.state);\n }\n}\n","/**\n * RoleRenderer — Markdown rendering for role.* commands.\n *\n * Covers: focus, want, plan, todo, finish, complete, abandon,\n * reflect, realize, master, forget, skill.\n */\n\nimport type { CommandResult } from \"@rolexjs/core\";\nimport { collectPermissions, describe, hint, renderPermissions, renderState } from \"../render.js\";\nimport type { Renderer } from \"./renderer.js\";\n\nexport class RoleRenderer implements Renderer {\n render(command: string, result: CommandResult): string {\n const process = command.startsWith(\"role.\") ? command.slice(\"role.\".length) : command;\n const name = result.state.id ?? result.state.name;\n const lines: string[] = [];\n\n lines.push(describe(process, name, result.state));\n lines.push(hint(process));\n lines.push(\"\");\n lines.push(renderState(result.state));\n\n // Activate: append permissions collected from links\n if (process === \"activate\") {\n const permissions = collectPermissions(result.state);\n if (permissions.length > 0) {\n lines.push(\"\");\n lines.push(renderPermissions(permissions));\n }\n }\n\n return lines.join(\"\\n\");\n }\n}\n","/**\n * SocietyRenderer — Markdown rendering for society.* commands.\n *\n * Covers: born, retire, die, rehire, teach, train, found, dissolve, crown, uncrown.\n */\n\nimport type { CommandResult } from \"@rolexjs/core\";\nimport { describe, hint, renderState } from \"../render.js\";\nimport type { Renderer } from \"./renderer.js\";\n\nexport class SocietyRenderer implements Renderer {\n render(command: string, result: CommandResult): string {\n const process = command.startsWith(\"society.\") ? command.slice(\"society.\".length) : command;\n const name = result.state.id ?? result.state.name;\n const lines: string[] = [];\n\n lines.push(describe(process, name, result.state));\n lines.push(hint(process));\n lines.push(\"\");\n lines.push(renderState(result.state));\n\n return lines.join(\"\\n\");\n }\n}\n","/**\n * SurveyRenderer — Markdown rendering for survey.* commands.\n *\n * Renders the organization-centric tree view:\n * orgs → projects + members (with positions) → unaffiliated individuals.\n */\n\nimport type { CommandResult } from \"@rolexjs/core\";\nimport type { State } from \"@rolexjs/system\";\nimport type { Renderer } from \"./renderer.js\";\n\nexport class SurveyRenderer implements Renderer {\n render(_command: string, result: CommandResult): string {\n const children = result.state.children ?? [];\n\n if (children.length === 0) {\n return \"Society is empty.\";\n }\n\n // Check if all children are the same type (filtered by type)\n const types = new Set(children.map((c) => c.name));\n if (types.size === 1 && !types.has(\"organization\")) {\n return this.renderFlat(children);\n }\n\n return this.renderTree(children);\n }\n\n private renderFlat(items: readonly State[]): string {\n const lines: string[] = [];\n for (const item of items) {\n const tag = item.tags?.length ? ` ${item.tags.map((t) => `#${t}`).join(\" \")}` : \"\";\n const alias =\n Array.isArray(item.alias) && item.alias.length ? ` (${item.alias.join(\", \")})` : \"\";\n lines.push(`${item.id ?? \"(no id)\"}${alias}${tag}`);\n }\n return lines.join(\"\\n\");\n }\n\n private renderTree(children: readonly State[]): string {\n const orgs = children.filter((c) => c.name === \"organization\");\n const individuals = children.filter((c) => c.name === \"individual\");\n\n // Build a map: individual id → positions they serve\n const individualPositions = new Map<string, string[]>();\n for (const ind of individuals) {\n const serves = ind.links?.filter((l) => l.relation === \"serve\") ?? [];\n if (serves.length > 0) {\n individualPositions.set(\n ind.id ?? \"\",\n serves.map((l) => l.target.id ?? \"(no id)\")\n );\n }\n }\n\n const affiliatedIndividuals = new Set<string>();\n const lines: string[] = [];\n\n for (const org of orgs) {\n const alias =\n Array.isArray(org.alias) && org.alias.length ? ` (${org.alias.join(\", \")})` : \"\";\n const tag = org.tags?.length ? ` ${org.tags.map((t) => `#${t}`).join(\" \")}` : \"\";\n lines.push(`${org.id}${alias}${tag}`);\n\n // Projects owned by this org\n const projects = org.links?.filter((l) => l.relation === \"project\") ?? [];\n for (const p of projects) {\n const pAlias =\n Array.isArray(p.target.alias) && p.target.alias.length\n ? ` (${p.target.alias.join(\", \")})`\n : \"\";\n const pTag = p.target.tags?.length ? ` ${p.target.tags.map((t) => `#${t}`).join(\" \")}` : \"\";\n lines.push(` 📦 ${p.target.id ?? \"(no id)\"}${pAlias}${pTag}`);\n }\n\n // Members of this org\n const members = org.links?.filter((l) => l.relation === \"membership\") ?? [];\n if (members.length === 0 && projects.length === 0) {\n lines.push(\" (empty)\");\n }\n for (const m of members) {\n affiliatedIndividuals.add(m.target.id ?? \"\");\n const mAlias =\n Array.isArray(m.target.alias) && m.target.alias.length\n ? ` (${m.target.alias.join(\", \")})`\n : \"\";\n const mTag = m.target.tags?.length ? ` ${m.target.tags.map((t) => `#${t}`).join(\" \")}` : \"\";\n const posLabels = individualPositions.get(m.target.id ?? \"\");\n const posStr = posLabels?.length ? ` — ${posLabels.join(\", \")}` : \"\";\n lines.push(` ${m.target.id}${mAlias}${mTag}${posStr}`);\n }\n lines.push(\"\");\n }\n\n // Unaffiliated individuals\n const unaffiliated = individuals.filter((ind) => !affiliatedIndividuals.has(ind.id ?? \"\"));\n if (unaffiliated.length > 0) {\n lines.push(\"─── unaffiliated ───\");\n for (const ind of unaffiliated) {\n const alias =\n Array.isArray(ind.alias) && ind.alias.length ? ` (${ind.alias.join(\", \")})` : \"\";\n const tag = ind.tags?.length ? ` ${ind.tags.map((t) => `#${t}`).join(\" \")}` : \"\";\n const posLabels = individualPositions.get(ind.id ?? \"\");\n const posStr = posLabels?.length ? ` — ${posLabels.join(\", \")}` : \"\";\n lines.push(` ${ind.id}${alias}${tag}${posStr}`);\n }\n }\n\n return lines.join(\"\\n\");\n }\n}\n"],"mappings":";AAYA,cAAc;;;AC6Jd,SAAS,YAAY,WAAW,aAAa;AA1J7C,IAAM,eAAuE;AAAA;AAAA,EAE3E,MAAM,CAAC,MAAM,eAAe,CAAC;AAAA,EAC7B,OAAO,CAAC,MAAM,iBAAiB,CAAC;AAAA,EAChC,WAAW,CAAC,MAAM,aAAa,CAAC;AAAA,EAChC,SAAS,CAAC,MAAM,wBAAwB,CAAC;AAAA,EACzC,QAAQ,CAAC,MAAM,SAAS,CAAC;AAAA,EACzB,QAAQ,CAAC,MAAM,IAAI,CAAC;AAAA,EACpB,KAAK,CAAC,MAAM,IAAI,CAAC;AAAA,EACjB,UAAU,CAAC,MAAM,iBAAiB,CAAC;AAAA,EACnC,SAAS,CAAC,MAAM,aAAa,CAAC;AAAA,EAC9B,QAAQ,CAAC,MAAM,IAAI,CAAC;AAAA;AAAA,EAGpB,MAAM,CAAC,MAAM,IAAI,CAAC;AAAA,EA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K,GAAG,GAAG,GAAG,MAAM,EAAE;AAAA,MACjD;AAAA,IACF;AAEA,WAAO,MAAM,KAAK,IAAI;AAAA,EACxB;AACF;;;AR5EO,SAAS,uBAAuC;AACrD,SAAO,IAAI,eAAe,EACvB,SAAS,QAAQ,IAAI,aAAa,CAAC,EACnC,SAAS,OAAO,IAAI,YAAY,CAAC,EACjC,SAAS,YAAY,IAAI,iBAAiB,CAAC,EAC3C,SAAS,WAAW,IAAI,gBAAgB,CAAC,EACzC,SAAS,WAAW,IAAI,gBAAgB,CAAC,EACzC,SAAS,WAAW,IAAI,gBAAgB,CAAC,EACzC,SAAS,UAAU,IAAI,eAAe,CAAC,EACvC,SAAS,WAAW,IAAI,gBAAgB,CAAC;AAC9C;;;ADvBO,SAAS,YAAY,QAAmC;AAC7D,SAAO,cAAc;AAAA,IACnB,UAAU,OAAO;AAAA,IACjB,UAAU,OAAO,YAAY,qBAAqB;AAAA,IAClD,YAAY,CAAC,OAAO;AAAA,EACtB,CAAC;AACH;","names":["extractFeatureTitle"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rolexjs",
|
|
3
|
-
"version": "1.5.0
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "RoleX - AI Agent Role Management Framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rolex",
|
|
@@ -38,15 +38,15 @@
|
|
|
38
38
|
"clean": "rm -rf dist"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@rolexjs/core": "1.5.0
|
|
42
|
-
"@rolexjs/genesis": "1.5.0
|
|
43
|
-
"@rolexjs/system": "1.5.0
|
|
44
|
-
"@rolexjs/parser": "1.5.0
|
|
41
|
+
"@rolexjs/core": "^1.5.0",
|
|
42
|
+
"@rolexjs/genesis": "^1.5.0",
|
|
43
|
+
"@rolexjs/system": "^1.5.0",
|
|
44
|
+
"@rolexjs/parser": "^1.5.0",
|
|
45
45
|
"issuexjs": "^0.2.0",
|
|
46
46
|
"resourcexjs": "^2.14.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@rolexjs/local-platform": "1.5.0
|
|
49
|
+
"@rolexjs/local-platform": "^1.5.0"
|
|
50
50
|
},
|
|
51
51
|
"publishConfig": {
|
|
52
52
|
"access": "public"
|