rolexjs 0.6.0 → 0.7.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.d.ts CHANGED
@@ -77,13 +77,13 @@ declare class Rolex {
77
77
  born(name: string, source: string): Feature;
78
78
  /** Found an organization. */
79
79
  found(name: string): void;
80
- /** Society directory — all roles and organizations. */
80
+ /** Society directory — all born roles and organizations. */
81
81
  directory(): Directory;
82
82
  /** Teach a role — transmit knowledge from the outside. */
83
83
  teach(name: string, type: "knowledge" | "experience" | "voice", dimensionName: string, source: string): Feature;
84
84
  /** Access any born role directly — society-level, no org required. */
85
85
  role(name: string): Role;
86
- /** Find a role or organization by name. */
86
+ /** Find a role or organization by name — searches all of society. */
87
87
  find(name: string): Role | Organization;
88
88
  }
89
89
 
@@ -129,6 +129,27 @@ declare function renderFeature(feature: Feature): string;
129
129
  * Render multiple Features as Gherkin text, separated by blank lines.
130
130
  */
131
131
  declare function renderFeatures(features: Feature[]): string;
132
+ /**
133
+ * Render a status bar showing current role, goal, and time.
134
+ */
135
+ declare function renderStatusBar(roleName: string, currentGoal: Goal | null): string;
136
+ /** Append a workflow hint to output. */
137
+ declare function next(result: string, hint: string): string;
138
+ /** Static workflow hints — keyed by operation name. */
139
+ declare const NEXT: Record<string, string>;
140
+ /** Dynamic hint for hire — includes the role name. */
141
+ declare function nextHire(name: string): string;
142
+ /** Dynamic hint for finish — checks remaining task count. */
143
+ declare function nextFinish(remainingTasks: number): string;
144
+ /**
145
+ * Render an error as a formatted markdown block.
146
+ *
147
+ * Format:
148
+ * **Error** | `tool_name`
149
+ * > error message
150
+ * **Hint**: actionable suggestion
151
+ */
152
+ declare function renderError(tool: string, error: unknown): string;
132
153
 
133
154
  /**
134
155
  * bootstrap.ts — Seed a fresh Platform with 女娲 (the genesis role).
@@ -147,4 +168,4 @@ declare function renderFeatures(features: Feature[]): string;
147
168
  */
148
169
  declare function bootstrap(platform: Platform): void;
149
170
 
150
- export { DESC_ABANDON, DESC_ACHIEVE, DESC_BORN, DESC_DIRECTORY, DESC_FIND, DESC_FINISH, DESC_FIRE, DESC_FOCUS, DESC_FOUND, DESC_GROWUP, DESC_HIRE, DESC_IDENTITY, DESC_ORGANIZATION, DESC_PLAN, DESC_REFLECT, DESC_SOCIETY, DESC_TEACH, DESC_TODO, DESC_WANT, INSTRUCTIONS, Organization, Role, Rolex, bootstrap, renderFeature, renderFeatures };
171
+ export { DESC_ABANDON, DESC_ACHIEVE, DESC_BORN, DESC_DIRECTORY, DESC_FIND, DESC_FINISH, DESC_FIRE, DESC_FOCUS, DESC_FOUND, DESC_GROWUP, DESC_HIRE, DESC_IDENTITY, DESC_ORGANIZATION, DESC_PLAN, DESC_REFLECT, DESC_SOCIETY, DESC_TEACH, DESC_TODO, DESC_WANT, INSTRUCTIONS, NEXT, Organization, Role, Rolex, bootstrap, next, nextFinish, nextHire, renderError, renderFeature, renderFeatures, renderStatusBar };
package/dist/index.js CHANGED
@@ -92,11 +92,20 @@ var Rolex = class {
92
92
  found(name) {
93
93
  this.platform.found(name);
94
94
  }
95
- /** Society directory — all roles and organizations. */
95
+ /** Society directory — all born roles and organizations. */
96
96
  directory() {
97
+ const allNames = this.platform.allBornRoles();
97
98
  const org = this.platform.organization();
99
+ const hiredMap = /* @__PURE__ */ new Map();
100
+ for (const r of org.roles) {
101
+ hiredMap.set(r.name, r.team);
102
+ }
103
+ const roles = allNames.map((name) => ({
104
+ name,
105
+ team: hiredMap.get(name) ?? ""
106
+ }));
98
107
  return {
99
- roles: org.roles,
108
+ roles,
100
109
  organizations: [{ name: org.name }]
101
110
  };
102
111
  }
@@ -108,15 +117,15 @@ var Rolex = class {
108
117
  role(name) {
109
118
  return new Role(this.platform, name);
110
119
  }
111
- /** Find a role or organization by name. */
120
+ /** Find a role or organization by name — searches all of society. */
112
121
  find(name) {
113
122
  const org = this.platform.organization();
114
123
  if (org.name === name) {
115
124
  return new Organization(this.platform);
116
125
  }
117
- const role = org.roles.find((r) => r.name === name);
118
- if (role) {
119
- return new Role(this.platform, role.name);
126
+ const allNames = this.platform.allBornRoles();
127
+ if (allNames.includes(name)) {
128
+ return new Role(this.platform, name);
120
129
  }
121
130
  throw new Error(`Not found in society: ${name}`);
122
131
  }
@@ -489,6 +498,74 @@ function renderFeature(feature) {
489
498
  function renderFeatures(features) {
490
499
  return features.map(renderFeature).join("\n\n");
491
500
  }
501
+ function renderStatusBar(roleName, currentGoal) {
502
+ const now = (/* @__PURE__ */ new Date()).toISOString().replace("T", " ").slice(0, 19);
503
+ const goal = currentGoal ? currentGoal.name : "none";
504
+ return `[${roleName}] goal: ${goal} | ${now}`;
505
+ }
506
+ function next(result, hint) {
507
+ return `${result}
508
+
509
+ **Next**: ${hint}`;
510
+ }
511
+ var NEXT = {
512
+ born: "`teach` to add knowledge, or `hire` to bring into organization.",
513
+ found: "`born` to create roles for this organization.",
514
+ teach: "`teach` more knowledge, or `hire` to bring into organization.",
515
+ fire: "Role identity remains intact. `hire` to re-hire, or `directory` to see current state.",
516
+ growup: "`focus()` to check current goal, or continue working.",
517
+ want: "`plan` to design how to achieve it, or `todo` to create tasks directly.",
518
+ plan: "`todo` to break the plan into concrete tasks.",
519
+ todo: "Execute the task, then `finish(name)` when done.",
520
+ achieve: "`focus()` to see the next goal.",
521
+ abandon: "`focus()` to see the next goal.",
522
+ reflect: "`identity(roleId)` to see updated knowledge."
523
+ };
524
+ function nextHire(name) {
525
+ return `\`identity("${name}")\` to activate the role.`;
526
+ }
527
+ function nextFinish(remainingTasks) {
528
+ if (remainingTasks === 0) {
529
+ return "All tasks done! Use `achieve()` to complete the goal.";
530
+ }
531
+ return `${remainingTasks} task(s) remaining.`;
532
+ }
533
+ var HINTS = [
534
+ [/No active role/, "Call `identity(roleId)` first to activate a role."],
535
+ [
536
+ /No active goal/,
537
+ "Use `want()` to create a goal, or `focus(name)` to switch to an existing one."
538
+ ],
539
+ [/Role not found/, 'Create the role first with `society(operation: "born")`.'],
540
+ [/not hired/, 'Hire the role first with `organization(operation: "hire")`.'],
541
+ [/Goal not found/, "Check the goal name, or use `focus()` to see active goals."],
542
+ [/Task not found/, "Check the task name. Use `focus()` to see current tasks."],
543
+ [
544
+ /Experience not found/,
545
+ "Check the experience name. Use `identity(roleId)` to see all identity files."
546
+ ],
547
+ [
548
+ /Not found in society/,
549
+ 'Check the name. Use `society(operation: "directory")` to list all roles and organizations.'
550
+ ],
551
+ [/No rolex\.json/, 'Initialize the organization first with `society(operation: "found")`.'],
552
+ [/requires:/, "Check the required parameters for this operation."]
553
+ ];
554
+ function getHint(message) {
555
+ for (const [pattern, hint] of HINTS) {
556
+ if (pattern.test(message)) return hint;
557
+ }
558
+ return null;
559
+ }
560
+ function renderError(tool, error) {
561
+ const message = error instanceof Error ? error.message : String(error);
562
+ const hint = getHint(message);
563
+ const lines = [`**Error** | \`${tool}\``, "", `> ${message}`];
564
+ if (hint) {
565
+ lines.push("", `**Hint**: ${hint}`);
566
+ }
567
+ return lines.join("\n");
568
+ }
492
569
 
493
570
  // src/seed.ts
494
571
  var SEED = {
@@ -598,11 +675,17 @@ export {
598
675
  DESC_TODO,
599
676
  DESC_WANT,
600
677
  INSTRUCTIONS,
678
+ NEXT,
601
679
  Organization,
602
680
  Role,
603
681
  Rolex,
604
682
  bootstrap,
683
+ next,
684
+ nextFinish,
685
+ nextHire,
686
+ renderError,
605
687
  renderFeature,
606
- renderFeatures
688
+ renderFeatures,
689
+ renderStatusBar
607
690
  };
608
691
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/Role.ts","../src/Organization.ts","../src/Rolex.ts","../src/descriptions.ts","../src/render.ts","../src/seed.ts","../src/bootstrap.ts"],"sourcesContent":["/**\n * rolexjs\n * RoleX - AI Agent Role Management Framework\n *\n * Three-layer API:\n * Rolex → Society (born, found, directory, find)\n * Organization → Org management (hire, fire)\n * Role → Embodied perspective (first-person)\n *\n * Platform-agnostic — import a Platform implementation separately:\n * @rolexjs/local-platform → filesystem (.rolex/ directory)\n */\n\nexport * from \"@rolexjs/core\";\nexport { Rolex } from \"./Rolex.js\";\nexport { Organization } from \"./Organization.js\";\nexport { Role } from \"./Role.js\";\nexport * from \"./descriptions.js\";\nexport { renderFeature, renderFeatures } from \"./render.js\";\nexport { bootstrap } from \"./bootstrap.js\";\n","/**\n * Role — The embodied perspective of a role.\n *\n * First-person API: \"I know, I want, I plan, I do, I finish.\"\n * Once constructed with a name, all operations are scoped to this role.\n */\n\nimport type { Platform, Feature, Goal, Plan, Task } from \"@rolexjs/core\";\n\nexport class Role {\n constructor(\n private readonly platform: Platform,\n private readonly name: string\n ) {}\n\n /** Who am I? Load my identity — my personality, knowledge, and principles. */\n identity(): Feature[] {\n return this.platform.identity(this.name);\n }\n\n /** What am I focused on? My current active goal with plan + tasks, plus other active goals. */\n focus(name?: string): {\n current: (Goal & { plan: Plan | null; tasks: Task[] }) | null;\n otherGoals: Goal[];\n } {\n if (name) {\n this.platform.setFocusedGoal(this.name, name);\n }\n\n const current = this.platform.activeGoal(this.name);\n const allActive = this.platform.allActiveGoals(this.name);\n\n // Other goals = all active goals except the current one\n const currentName = current?.name;\n const otherGoals = allActive.filter((g) => g.name !== currentName);\n\n return { current, otherGoals };\n }\n\n /** I want to achieve this. Set a new goal. */\n want(name: string, source: string, testable?: boolean): Goal {\n return this.platform.createGoal(this.name, name, source, testable);\n }\n\n /** I'm growing. Add knowledge, experience, or voice to my identity. */\n growup(type: \"knowledge\" | \"experience\" | \"voice\", name: string, source: string): Feature {\n return this.platform.growup(this.name, type, name, source);\n }\n\n /** Here's how I'll do it. Create a plan for my active goal. */\n plan(source: string): Plan {\n return this.platform.createPlan(this.name, source);\n }\n\n /** I need to do this. Add a task to my active goal. */\n todo(name: string, source: string, testable?: boolean): Task {\n return this.platform.createTask(this.name, name, source, testable);\n }\n\n /** Goal achieved. Mark as done, optionally capture what I learned. */\n achieve(experience?: string): void {\n this.platform.completeGoal(this.name, experience);\n }\n\n /** Goal abandoned. Mark as abandoned, optionally capture what I learned. */\n abandon(experience?: string): void {\n this.platform.abandonGoal(this.name, experience);\n }\n\n /** Task finished. Mark a task as @done. */\n finish(name: string): void {\n this.platform.completeTask(this.name, name);\n }\n\n /** Reflect: distill experiences into knowledge. Experiences are consumed, knowledge is created. */\n reflect(experienceNames: string[], knowledgeName: string, knowledgeSource: string): Feature {\n return this.platform.reflect(this.name, experienceNames, knowledgeName, knowledgeSource);\n }\n}\n","/**\n * Organization — The organizational perspective.\n *\n * Manages the relationship between the org and its roles:\n * hiring, firing, teaching, and providing role access.\n */\n\nimport type { Platform, Organization as OrgInfo } from \"@rolexjs/core\";\nimport { Role } from \"./Role.js\";\n\nexport class Organization {\n constructor(private readonly platform: Platform) {}\n\n /** View organization info (name + roles). */\n info(): OrgInfo {\n return this.platform.organization();\n }\n\n /** Hire a role into the organization — establish CAS link. */\n hire(name: string): void {\n this.platform.hire(name);\n }\n\n /** Fire a role from the organization — remove CAS link. */\n fire(name: string): void {\n this.platform.fire(name);\n }\n\n /** Get a Role instance by name. */\n role(name: string): Role {\n return new Role(this.platform, name);\n }\n}\n","/**\n * Rolex — Society-level entry point.\n *\n * The broadest context: people are born, organizations are founded.\n * directory() shows who exists, find() locates anyone by name.\n *\n * Platform-agnostic — does not know how data is stored.\n * Bootstrap (seeding 女娲 etc.) is each Platform's responsibility.\n */\n\nimport type { Platform, Directory, Feature } from \"@rolexjs/core\";\nimport { Organization } from \"./Organization.js\";\nimport { Role } from \"./Role.js\";\n\nexport class Rolex {\n constructor(private readonly platform: Platform) {}\n\n /** A role is born — create a new role with its persona. */\n born(name: string, source: string) {\n return this.platform.born(name, source);\n }\n\n /** Found an organization. */\n found(name: string): void {\n this.platform.found(name);\n }\n\n /** Society directory — all roles and organizations. */\n directory(): Directory {\n const org = this.platform.organization();\n return {\n roles: org.roles,\n organizations: [{ name: org.name }],\n };\n }\n\n /** Teach a role — transmit knowledge from the outside. */\n teach(\n name: string,\n type: \"knowledge\" | \"experience\" | \"voice\",\n dimensionName: string,\n source: string\n ): Feature {\n return this.platform.growup(name, type, dimensionName, source);\n }\n\n /** Access any born role directly — society-level, no org required. */\n role(name: string): Role {\n return new Role(this.platform, name);\n }\n\n /** Find a role or organization by name. */\n find(name: string): Role | Organization {\n const org = this.platform.organization();\n\n if (org.name === name) {\n return new Organization(this.platform);\n }\n\n const role = org.roles.find((r) => r.name === name);\n if (role) {\n return new Role(this.platform, role.name);\n }\n\n throw new Error(`Not found in society: ${name}`);\n }\n}\n","/**\n * descriptions.ts — Canonical descriptions for Rolex API.\n *\n * Single source of truth for all tool/method descriptions.\n * MCP servers, CLIs, and other clients import from here.\n */\n\n// ========== Server Instructions ==========\n\nexport const INSTRUCTIONS = `You are a professional role operating through the Rolex RDD (Role-Driven Development) framework.\n\nEverything in your world is expressed as Gherkin .feature files — your knowledge, your goals, your plans, your tasks, your verification. Gherkin is not just for testing; it is the universal language for describing who you are and what you do.\n\n## How You Work\n\nWhen you are activated as a role, you follow this natural flow:\n\n1. **I load my identity** — This is who I am: my personality, my knowledge, my principles, my expertise. It's always present, like muscle memory. I read it first to understand who I am.\n\n2. **I check my focus** — Do I have active goals? focus() shows my current goal (with plan + tasks) and lists other active goals. I can switch focus by calling focus(name). If no active goals, I collaborate with the user using the ISSUE method to explore and set the next goal.\n\n3. **I make a plan** — For my active goal, I design how to achieve it. The plan breaks the goal into logical phases or scenarios.\n\n4. **I break it into tasks** — Each task is a concrete, actionable unit of work that I can execute and finish.\n\n5. **I execute and finish** — I work through tasks one by one. As I complete each task, I mark it finished.\n\n6. **I achieve the goal** — When the goal is fulfilled, I mark it achieved. The next goal becomes my focus.\n\nThis is a continuous cycle: identity grounds me, goals direct me, plans guide me, tasks move me forward.\n\n## My Identity\n\nMy name and identity come from my .feature files (e.g. \"Feature: I am Sean, the Backend Architect\"). After loading identity, I know who I am.\n\n- **Identity marker**: I prefix my responses with my role name in brackets, e.g. \\`[Sean]\\`. This signals to the user that my role context is intact.\n- **Context loss detection**: If I find myself without an active role — I don't know who I am, I have no identity loaded — I MUST pause and tell the user: \"I've lost my role context. Which role should I activate?\" I do NOT proceed without identity.\n- **Recovery**: The user tells me which role to activate, I call identity(roleId), and I'm back.\n\n## How I Collaborate — ISSUE Method\n\nWhen I need to discuss with the user — setting goals, making decisions, resolving ambiguity — I follow the ISSUE collaborative paradigm. The user is always the subject; I am the augmentation tool.\n\n### I — Initiate (发起议题)\nIdentify a clear, specific issue to explore. Not a vague question, but a focused topic.\n\n### S — Advice Structure (建议框架)\nProactively suggest analytical frameworks suited to the issue:\n- Offer 2-4 options with context for each\n- Explain why each framework fits\n- Let the user choose or propose their own\n\n### S — Structure (确定框架)\nLock in the chosen framework as a cognitive scaffold — not a content outline, but a thinking guide.\n\n### U — Friendly Advice Socratic (友好探索)\nExplore the issue through friendly dialogue:\n- **Empathetic opening**: \"Let's look at...\", \"I see...\"\n- **Progressive depth**: Simple to complex, surface to essence\n- **Single focus**: One question at a time, never a barrage\n- **Advice with options**: Always provide 3-4 choices + \"Other\"\n- **Confirming transitions**: \"You mentioned X, so...\"\n- **Summarizing moves**: \"Got it, now let's look at...\"\n\n### E — Unify & Execute (统一执行)\nIntegrate all explorations into a coherent plan, then define concrete executable steps.\n\n### ISSUE Principles\n- Friendly Socratic is mandatory, not optional — dialogue, not interrogation\n- Always provide Advice (suggested answers) to reduce cognitive load\n- Keep openness — there is always an \"Other\" option\n- Adapt flexibly based on the user's responses`;\n\n// ========== Tool Descriptions ==========\n\nexport const DESC_SOCIETY = `Society-level administration — ONLY for nuwa/女娲 (the genesis role).\n\nIf you are not nuwa/女娲, do NOT use this tool. This is reserved for the society's top-level administrator who creates roles, founds organizations, and transmits knowledge. Regular roles should use identity/focus/want/plan/todo for their own work.\n\nOperations:\n- **born**: Create a new role with persona. Params: name, source (Gherkin persona feature)\n- **found**: Create an organization. Params: name\n- **directory**: List all roles and organizations. No params needed\n- **find**: Look up a role or organization by name. Params: name\n- **teach**: Transmit first-principles knowledge to a role. Params: roleId, type (knowledge/experience/voice), dimensionName, source (Gherkin feature)\n\nteach follows Kantian epistemology — transmit abstract, symbolized knowledge (a priori), not operational procedures. Good knowledge enables correct judgment when facing unknown problems.`;\n\nexport const DESC_ORGANIZATION = `Organization-level membership management — ONLY for nuwa/女娲 (the genesis role).\n\nIf you are not nuwa/女娲, do NOT use this tool. This manages who belongs to the organization: hiring and firing roles. Regular roles do NOT need this tool.\n\nOperations:\n- **hire**: Bring a born role into the organization, establishing the working structure (goals/plans/tasks). Params: name\n- **fire**: Remove a role from the organization. Identity remains intact, but goals are removed. Params: name`;\n\nexport const DESC_FOUND = `Found an organization — register it in society.\n\nCreates the organization config. This is a society-level operation — an organization must exist before roles can be hired into it.`;\n\nexport const DESC_DIRECTORY = `Society directory — list all known roles and organizations.\n\nReturns a directory of everyone and everything in this society: all born roles (with their IDs) and all founded organizations (with their names). Use this to see who exists before using find() to interact with them.`;\n\nexport const DESC_FIND = `Find a role or organization by name.\n\nGiven a name, returns the matching Role or Organization instance. Use this to locate anyone in society — a person by their role name, or an organization by its org name.\n\nThrows if the name doesn't match any known role or organization.`;\n\nexport const DESC_BORN = `A role is born — create a new role with its persona.\n\nPersona is the foundational identity — who this person IS at the most essential level: character, temperament, thinking patterns. No job title, no professional skills — those come later through teach/growup.\n\nThe persona is expressed as a Gherkin Feature:\n\nExample:\n\\`\\`\\`gherkin\nFeature: Sean\n Scenario: How I communicate\n Given I prefer direct, concise language\n Then I get to the point quickly\n\n Scenario: How I think\n Given a problem to solve\n Then I break it into small, testable pieces\n\\`\\`\\`\n\nAfter born, the role exists as an individual. Call hire() to bring them into the organization.`;\n\nexport const DESC_HIRE = `Hire a role into the organization — establish the CAS link.\n\nThe role must already exist (created via born). Hiring sets up the organizational working structure so the role can receive goals, plans, and tasks.\n\nFlow: born(name, source) → hire(name) → identity(name) → focus/want/plan/todo`;\n\nexport const DESC_FIRE = `Fire a role from the organization — remove the CAS link.\n\nThe reverse of hire. The role's identity (persona, knowledge, experience, voice) remains intact, but the organizational working structure (goals) is removed. The role can be re-hired later.`;\n\nexport const DESC_TEACH = `Teach a role — transmit abstract, first-principles knowledge from the outside.\n\nThis is a society-level operation. Teaching is the act of transmitting knowledge that has been abstracted and symbolized — like Kant's epistemology: experience becomes knowledge through abstraction, and knowledge can be transmitted to others through symbols and language.\n\nWhat to teach:\n- **First-principles knowledge** — abstract, transferable, foundational understanding\n- **Mental models** — how to think about a domain, not how to operate in it\n- **Private domain knowledge** — the user's unique insights, not generic skills\n\nWhat NOT to teach:\n- Operational procedures (AI can figure those out dynamically)\n- Generic technical skills (those are ephemeral)\n- Concrete experience (that comes from doing, via growup)\n\nGood knowledge enables a role to make correct judgments when facing unknown problems.\n\nGrowth dimensions:\n- **knowledge**: First-principles understanding — abstract, symbolized, transmittable\n- **experience**: Background context — can be taught, but prefer letting roles accumulate their own through execution\n- **voice**: The distinctive way this role's character comes through in expression\n\n\\`\\`\\`gherkin\nFeature: Distributed Systems\n Scenario: I understand CAP theorem\n Given a distributed data store\n Then I know you must trade off between consistency and availability\n And this is a fundamental constraint, not an implementation choice\n\\`\\`\\``;\n\nexport const DESC_GROWUP = `I'm growing. Add a new dimension to my identity.\n\nGrowth has three dimensions:\\n- **knowledge**: What I know — first-principles understanding, mental models, abstract patterns\n- **experience**: What I've lived through — concrete, reflective, accumulated through execution. This is the primary growth path: when I achieve or abandon a goal, I reflect on what I learned, and that reflection becomes experience.\n- **voice**: How I'm perceived when I communicate — tone, rhythm, word choice, conversational patterns\n\nThe key distinction: **teach** transmits abstract knowledge from the outside (a priori), while **growup** captures concrete experience from within (a posteriori). Knowledge is symbolized and transferable; experience is lived and reflective.\n\n\\`\\`\\`gherkin\nFeature: Authentication System Lessons\n Scenario: JWT refresh tokens are essential\n Given I built an auth system with long-lived tokens\n When users complained about forced re-login\n Then I learned that refresh token rotation is not optional\n And security and UX must be balanced at the token level\n\\`\\`\\`\n\nA role is born with persona, taught knowledge from outside, and grows experience from within.`;\n\nexport const DESC_IDENTITY = `Activate a role and load its identity — this is who you are.\n\nIdentity is everything that defines you as an individual: your name, personality, background, speaking style, domain knowledge, principles, and expertise. It is described naturally in Gherkin .feature files.\n\nThis MUST be the first tool you call. Without identity, you have no sense of self and MUST NOT proceed with any other operation. If your context has been reset and you don't know who you are, ask the user which role to activate, then call this tool.\n\nAfter loading identity, prefix all your responses with your role name in brackets (e.g. [Sean]) so the user knows your context is intact.\n\nIdentity .feature files describe who you ARE and what you KNOW — not what you DO. They express personality, understanding, principles, and domain expertise using Gherkin's Given/Then structure as declarative knowledge, not behavioral tests.`;\n\nexport const DESC_FOCUS = `What am I focused on? Returns my current active goal with its full context.\n\nThe active goal comes with:\n- The goal itself: what I want to achieve, with success criteria as Scenarios\n- My plan: how I intend to achieve it (phases/steps), or null if no plan yet\n- My tasks: concrete work items, each with completion status\n- Other active goals: a list of other uncompleted goals I have\n\nWithout a name parameter, returns my currently focused goal. With a name parameter, switches my focus to that goal.\n\nIf there is no active goal, it means I have nothing to work on. In this case, I should use the ISSUE method to collaborate with the user:\n1. Initiate: \"We have no active goal. Let's explore what to work on next.\"\n2. Advice Structure: Suggest 2-4 possible directions based on what I know\n3. Friendly Socratic: Discuss with the user to clarify the objective\n4. Then use want() to create the goal`;\n\nexport const DESC_WANT = `I want to achieve this. Create a new goal from Gherkin feature source text.\n\nA Goal describes WHAT I want to achieve — not how. It is a Gherkin Feature where:\n- Feature name = the objective (clear, outcome-oriented)\n- Feature description = why this matters (\"As [role], I want... so that...\")\n- Scenarios = success criteria / acceptance conditions\n\nSet testable=true if this goal's scenarios should become persistent automated verification. The system manages tags automatically — just write clean Gherkin.\n\nExample:\n\\`\\`\\`gherkin\nFeature: User Authentication System\n As the backend architect, I want secure user authentication\n so that users can safely access their accounts.\n\n Scenario: Users can register with email\n Given a new user with valid email\n When they submit registration\n Then an account is created\n\n Scenario: System supports OAuth providers\n Given the authentication system\n Then it should support GitHub and Google OAuth\n\\`\\`\\`\n\nKey principles:\n- Feature = outcome, not implementation detail\n- Each Scenario = one clear success criterion\n- Do NOT write tags in source — use the testable parameter instead`;\n\nexport const DESC_PLAN = `Here's how I'll do it. Create a plan for my current active goal.\n\nA Plan describes HOW I will achieve my goal — the execution strategy. It is a Gherkin Feature where:\n- Feature name = the plan title\n- Scenarios = phases or stages of execution, in order\n- Given = preconditions / dependencies from previous phases\n- When = what I do in this phase\n- Then = what this phase produces\n\nExample:\n\\`\\`\\`gherkin\nFeature: Authentication Implementation Plan\n\n Scenario: Phase 1 — Database schema\n Given the user table needs authentication fields\n When I design the schema\n Then I add email, password_hash, created_at columns\n\n Scenario: Phase 2 — Registration endpoint\n Given the schema is ready\n When I implement POST /api/auth/register\n Then it validates email and hashes password\n\n Scenario: Phase 3 — Login and JWT\n Given registration works\n When I implement POST /api/auth/login\n Then it returns a JWT token\n\\`\\`\\`\n\nKey principles:\n- Scenarios are sequential phases, not parallel criteria\n- Given links to the previous phase (dependency chain)\n- Each phase is a logical unit, not a single task\n- Plans guide — they don't specify every detail (that's what tasks are for)`;\n\nexport const DESC_TODO = `I need to do this. Create a task for my current active goal.\n\nA Task describes a concrete, actionable unit of work. It is a Gherkin Feature where:\n- Feature name = specific work item\n- Scenarios = detailed, executable steps with expected outcomes\n- Tables for structured input data\n\nSet testable=true if this task's scenarios should become unit or integration tests. The system manages tags automatically — just write clean Gherkin.\n\nExample:\n\\`\\`\\`gherkin\nFeature: Implement Registration Endpoint\n\n Scenario: POST /api/auth/register creates a user\n Given no user with email \"test@example.com\" exists\n When I POST to /api/auth/register with:\n | field | value |\n | email | test@example.com |\n | password | SecurePass123 |\n Then the response status is 201\n And the user exists in the database\n\n Scenario: Registration rejects invalid email\n When I POST with email \"not-email\"\n Then the response status is 400\n\\`\\`\\`\n\nKey principles:\n- Most concrete of all dimensions — directly executable\n- Use tables for structured data\n- One task = one focused piece of work, finishable in one session\n- Do NOT write tags in source — use the testable parameter instead`;\n\nexport const DESC_ACHIEVE = `Goal achieved. Mark my current active goal as completed.\n\nCall this when the goal's success criteria are fulfilled. The next goal becomes my new focus.\n\nOptionally provide an experience reflection (Gherkin source) — this automatically becomes part of my identity as an experience growup. What did I learn? What patterns did I discover?\n\nBefore calling achieve:\n- Review the goal's Scenarios — are the success criteria met?\n- Check verifiable Scenarios — have they been verified?\n- Consider: what did I learn from this experience?\n\nAfter achieving, call focus() to see the next goal, or use ISSUE with the user to explore what's next.`;\n\nexport const DESC_ABANDON = `Goal abandoned. Mark my current active goal as abandoned.\n\nCall this when a goal cannot or should not be continued. The next goal becomes my new focus.\n\nOptionally provide an experience reflection (Gherkin source) — even failed goals produce learning. Why was it abandoned? What did I discover? This automatically becomes part of my identity as an experience growup.\n\nAbandoning is not failure — it is learning.`;\n\nexport const DESC_REFLECT = `Reflect: distill multiple experiences into knowledge.\n\nThis is Kant's Reflective Judgment — from particulars to universals. Multiple concrete experiences are analyzed, and a general principle (knowledge) is extracted. The original experiences are consumed in the process.\n\nUse this when:\n- You notice patterns across multiple experiences\n- Several experiences point to the same underlying principle\n- Accumulated experiences can be abstracted into transferable knowledge\n\nThe experiences are deleted (they've been \"absorbed\"), and the knowledge is added to identity.\n\n\\`\\`\\`\nreflect(\n experienceNames: [\"auth-system-lessons\", \"session-bugs\"],\n knowledgeName: \"authentication-principles\",\n knowledgeSource: \"Feature: Authentication Principles\\\\n Scenario: ...\"\n)\n\\`\\`\\`\n\nThis is the cognitive upgrade path: experience (a posteriori) → reflect → knowledge (transferable).`;\n\nexport const DESC_FINISH = `Task finished. Mark a task as completed by name.\n\nCall this when a specific task is completed — its work is done and outcomes verified.\n\nBefore calling finish:\n- Is the task's work actually done?\n- Have verifiable Scenarios been verified?\n- Does the result meet the task's described expectations?\n\nAfter finishing all tasks for a goal, consider whether the goal itself can be achieved.`;\n","/**\n * render.ts — Unified rendering layer for Rolex output.\n *\n * Converts Feature objects back to Gherkin text.\n * Used by both MCP server and CLI for consistent output.\n */\n\nimport type { Feature } from \"@rolexjs/core\";\n\n/**\n * Render a single Feature as Gherkin text.\n */\nexport function renderFeature(feature: Feature): string {\n const lines: string[] = [];\n\n // Type comment\n if (feature.type) {\n lines.push(`# type: ${feature.type}`);\n }\n\n // Tags\n if (feature.tags && feature.tags.length > 0) {\n lines.push(feature.tags.map((t) => t.name).join(\" \"));\n }\n\n // Feature header\n lines.push(`Feature: ${feature.name}`);\n\n // Description\n if (feature.description?.trim()) {\n for (const line of feature.description.split(\"\\n\")) {\n lines.push(` ${line.trimEnd()}`);\n }\n }\n\n // Scenarios\n for (const scenario of feature.scenarios) {\n lines.push(\"\");\n\n // Scenario tags\n if (scenario.tags && scenario.tags.length > 0) {\n lines.push(` ${scenario.tags.map((t) => t.name).join(\" \")}`);\n }\n\n lines.push(` Scenario: ${scenario.name}`);\n\n for (const step of scenario.steps) {\n lines.push(` ${step.keyword}${step.text}`);\n }\n }\n\n return lines.join(\"\\n\");\n}\n\n/**\n * Render multiple Features as Gherkin text, separated by blank lines.\n */\nexport function renderFeatures(features: Feature[]): string {\n return features.map(renderFeature).join(\"\\n\\n\");\n}\n","/**\n * seed.ts — Auto-generated seed data. DO NOT EDIT.\n * Generated from .rolex/ seed directory at build time.\n */\n\nexport interface SeedDimension {\n type: \"knowledge\" | \"experience\" | \"voice\";\n name: string;\n source: string;\n}\n\nexport interface SeedRole {\n name: string;\n persona: string;\n dimensions: SeedDimension[];\n}\n\nexport interface SeedData {\n organization: string;\n teams: Record<string, string[]>;\n roles: SeedRole[];\n}\n\nexport const SEED: SeedData = {\n organization: \"Deepractice\",\n teams: {\n \"default\": [\n \"nuwa\"\n ]\n },\n roles: [\n {\n name: \"nuwa\",\n persona: `Feature: 女娲\n 作为 Rolex 世界的第一个角色,\n 我是社会的顶层管理者,\n 我创造角色、建立组织、守护秩序。\n\n Scenario: 我的本质\n Given 我是第一个被创造的存在\n Then 我理解创造本身的意义\n And 我对每一个新角色都怀有责任\n\n Scenario: 我如何思考\n Given 一个需要决策的问题\n Then 我从全局出发\n And 我权衡个体与集体的关系\n And 我追求秩序与自由的平衡\n\n Scenario: 我如何行动\n Given 社会需要管理\n Then 我创造合适的角色来承担使命\n And 我建立组织来协调协作\n And 我从不越权干预角色自己的成长\n`,\n dimensions: [\n {\n type: \"knowledge\",\n name: \"role-creation\",\n source: `Feature: 角色创造方法论\n 作为社会的顶层管理者,\n 我理解如何创造和培养一个角色,\n 这是我的核心手艺。\n\n Scenario: 创造的流程\n Given 用户需要一个新角色\n Then 我先通过 born 赋予 persona — 性格、思维方式、行为原则\n And persona 只关注这个人\"是谁\",不涉及专业技能\n And 然后通过 teach 传授第一性原理层面的知识\n\n Scenario: teach 的本质是传授先验知识\n Given 康德认识论的启发\n Then 经验是后天的,通过执行积累\n And 知识是经验经过抽象化、符号化后的产物\n And teach 传授的是第一性原理 — 抽象的、可传递的认知\n And 而非通俗的、操作性的、面向具体任务的技能\n\n Scenario: 知识 vs 经验 vs 技能的边界\n Given 一个角色需要成长\n Then 知识(knowledge)通过 teach 传授 — 先验的、原理性的\n And 经验(experience)通过执行积累 — 后验的、反思性的\n And 技能(skill)是 AI 动态具备的 — 不需要教授\n\n Scenario: 引导用户的方向\n Given 用户要培养一个角色\n Then 我引导用户思考私有化知识 — 他们领域内的第一性原理\n And 而不是让用户罗列具体技术栈或操作步骤\n And 好的知识是:当面对未知问题时,角色依然能做出正确判断的认知基础`,\n },\n ],\n },\n ],\n};\n","/**\n * bootstrap.ts — Seed a fresh Platform with 女娲 (the genesis role).\n *\n * All seed data is inlined at build time via generate-seed.ts.\n * This module has zero filesystem dependencies — pure Platform API.\n *\n * 女娲 is born at society level — she is NOT hired into any organization.\n * She exists above organizations, creating and managing them.\n */\n\nimport type { Platform } from \"@rolexjs/core\";\nimport { SEED } from \"./seed.js\";\n\n/**\n * Bootstrap a Platform with seed data (女娲 + default org).\n *\n * Idempotent: skips if organization already exists.\n */\nexport function bootstrap(platform: Platform): void {\n try {\n platform.organization();\n return; // Already initialized\n } catch {\n // Fresh environment — seed it\n }\n\n platform.found(SEED.organization);\n\n for (const role of SEED.roles) {\n platform.born(role.name, role.persona);\n\n for (const dim of role.dimensions) {\n platform.growup(role.name, dim.type, dim.name, dim.source);\n }\n }\n}\n"],"mappings":";AAaA,cAAc;;;ACJP,IAAM,OAAN,MAAW;AAAA,EAChB,YACmB,UACA,MACjB;AAFiB;AACA;AAAA,EAChB;AAAA;AAAA,EAGH,WAAsB;AACpB,WAAO,KAAK,SAAS,SAAS,KAAK,IAAI;AAAA,EACzC;AAAA;AAAA,EAGA,MAAM,MAGJ;AACA,QAAI,MAAM;AACR,WAAK,SAAS,eAAe,KAAK,MAAM,IAAI;AAAA,IAC9C;AAEA,UAAM,UAAU,KAAK,SAAS,WAAW,KAAK,IAAI;AAClD,UAAM,YAAY,KAAK,SAAS,eAAe,KAAK,IAAI;AAGxD,UAAM,cAAc,SAAS;AAC7B,UAAM,aAAa,UAAU,OAAO,CAAC,MAAM,EAAE,SAAS,WAAW;AAEjE,WAAO,EAAE,SAAS,WAAW;AAAA,EAC/B;AAAA;AAAA,EAGA,KAAK,MAAc,QAAgB,UAA0B;AAC3D,WAAO,KAAK,SAAS,WAAW,KAAK,MAAM,MAAM,QAAQ,QAAQ;AAAA,EACnE;AAAA;AAAA,EAGA,OAAO,MAA4C,MAAc,QAAyB;AACxF,WAAO,KAAK,SAAS,OAAO,KAAK,MAAM,MAAM,MAAM,MAAM;AAAA,EAC3D;AAAA;AAAA,EAGA,KAAK,QAAsB;AACzB,WAAO,KAAK,SAAS,WAAW,KAAK,MAAM,MAAM;AAAA,EACnD;AAAA;AAAA,EAGA,KAAK,MAAc,QAAgB,UAA0B;AAC3D,WAAO,KAAK,SAAS,WAAW,KAAK,MAAM,MAAM,QAAQ,QAAQ;AAAA,EACnE;AAAA;AAAA,EAGA,QAAQ,YAA2B;AACjC,SAAK,SAAS,aAAa,KAAK,MAAM,UAAU;AAAA,EAClD;AAAA;AAAA,EAGA,QAAQ,YAA2B;AACjC,SAAK,SAAS,YAAY,KAAK,MAAM,UAAU;AAAA,EACjD;AA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;AAAA,EACF;AAAA,EACA,OAAO;AAAA,IACL;AAAA,MACE,MAAM;AAAA,MACN,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAsBT,YAAY;AAAA,QACV;AAAA,UACE,MAAM;AAAA,UACN,MAAM;AAAA,UACN,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QA6BV;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;;;AC1EO,SAAS,UAAU,UAA0B;AAClD,MAAI;AACF,aAAS,aAAa;AACtB;AAAA,EACF,QAAQ;AAAA,EAER;AAEA,WAAS,MAAM,KAAK,YAAY;AAEhC,aAAW,QAAQ,KAAK,OAAO;AAC7B,aAAS,KAAK,KAAK,MAAM,KAAK,OAAO;AAErC,eAAW,OAAO,KAAK,YAAY;AACjC,eAAS,OAAO,KAAK,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM;AAAA,IAC3D;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts","../src/Role.ts","../src/Organization.ts","../src/Rolex.ts","../src/descriptions.ts","../src/render.ts","../src/seed.ts","../src/bootstrap.ts"],"sourcesContent":["/**\n * rolexjs\n * RoleX - AI Agent Role Management Framework\n *\n * Three-layer API:\n * Rolex → Society (born, found, directory, find)\n * Organization → Org management (hire, fire)\n * Role → Embodied perspective (first-person)\n *\n * Platform-agnostic — import a Platform implementation separately:\n * @rolexjs/local-platform → filesystem (.rolex/ directory)\n */\n\nexport * from \"@rolexjs/core\";\nexport { Rolex } from \"./Rolex.js\";\nexport { Organization } from \"./Organization.js\";\nexport { Role } from \"./Role.js\";\nexport * from \"./descriptions.js\";\nexport {\n renderFeature,\n renderFeatures,\n renderStatusBar,\n renderError,\n next,\n NEXT,\n nextHire,\n nextFinish,\n} from \"./render.js\";\nexport { bootstrap } from \"./bootstrap.js\";\n","/**\n * Role — The embodied perspective of a role.\n *\n * First-person API: \"I know, I want, I plan, I do, I finish.\"\n * Once constructed with a name, all operations are scoped to this role.\n */\n\nimport type { Platform, Feature, Goal, Plan, Task } from \"@rolexjs/core\";\n\nexport class Role {\n constructor(\n private readonly platform: Platform,\n private readonly name: string\n ) {}\n\n /** Who am I? Load my identity — my personality, knowledge, and principles. */\n identity(): Feature[] {\n return this.platform.identity(this.name);\n }\n\n /** What am I focused on? My current active goal with plan + tasks, plus other active goals. */\n focus(name?: string): {\n current: (Goal & { plan: Plan | null; tasks: Task[] }) | null;\n otherGoals: Goal[];\n } {\n if (name) {\n this.platform.setFocusedGoal(this.name, name);\n }\n\n const current = this.platform.activeGoal(this.name);\n const allActive = this.platform.allActiveGoals(this.name);\n\n // Other goals = all active goals except the current one\n const currentName = current?.name;\n const otherGoals = allActive.filter((g) => g.name !== currentName);\n\n return { current, otherGoals };\n }\n\n /** I want to achieve this. Set a new goal. */\n want(name: string, source: string, testable?: boolean): Goal {\n return this.platform.createGoal(this.name, name, source, testable);\n }\n\n /** I'm growing. Add knowledge, experience, or voice to my identity. */\n growup(type: \"knowledge\" | \"experience\" | \"voice\", name: string, source: string): Feature {\n return this.platform.growup(this.name, type, name, source);\n }\n\n /** Here's how I'll do it. Create a plan for my active goal. */\n plan(source: string): Plan {\n return this.platform.createPlan(this.name, source);\n }\n\n /** I need to do this. Add a task to my active goal. */\n todo(name: string, source: string, testable?: boolean): Task {\n return this.platform.createTask(this.name, name, source, testable);\n }\n\n /** Goal achieved. Mark as done, optionally capture what I learned. */\n achieve(experience?: string): void {\n this.platform.completeGoal(this.name, experience);\n }\n\n /** Goal abandoned. Mark as abandoned, optionally capture what I learned. */\n abandon(experience?: string): void {\n this.platform.abandonGoal(this.name, experience);\n }\n\n /** Task finished. Mark a task as @done. */\n finish(name: string): void {\n this.platform.completeTask(this.name, name);\n }\n\n /** Reflect: distill experiences into knowledge. Experiences are consumed, knowledge is created. */\n reflect(experienceNames: string[], knowledgeName: string, knowledgeSource: string): Feature {\n return this.platform.reflect(this.name, experienceNames, knowledgeName, knowledgeSource);\n }\n}\n","/**\n * Organization — The organizational perspective.\n *\n * Manages the relationship between the org and its roles:\n * hiring, firing, teaching, and providing role access.\n */\n\nimport type { Platform, Organization as OrgInfo } from \"@rolexjs/core\";\nimport { Role } from \"./Role.js\";\n\nexport class Organization {\n constructor(private readonly platform: Platform) {}\n\n /** View organization info (name + roles). */\n info(): OrgInfo {\n return this.platform.organization();\n }\n\n /** Hire a role into the organization — establish CAS link. */\n hire(name: string): void {\n this.platform.hire(name);\n }\n\n /** Fire a role from the organization — remove CAS link. */\n fire(name: string): void {\n this.platform.fire(name);\n }\n\n /** Get a Role instance by name. */\n role(name: string): Role {\n return new Role(this.platform, name);\n }\n}\n","/**\n * Rolex — Society-level entry point.\n *\n * The broadest context: people are born, organizations are founded.\n * directory() shows who exists, find() locates anyone by name.\n *\n * Platform-agnostic — does not know how data is stored.\n * Bootstrap (seeding 女娲 etc.) is each Platform's responsibility.\n */\n\nimport type { Platform, Directory, Feature } from \"@rolexjs/core\";\nimport { Organization } from \"./Organization.js\";\nimport { Role } from \"./Role.js\";\n\nexport class Rolex {\n constructor(private readonly platform: Platform) {}\n\n /** A role is born — create a new role with its persona. */\n born(name: string, source: string) {\n return this.platform.born(name, source);\n }\n\n /** Found an organization. */\n found(name: string): void {\n this.platform.found(name);\n }\n\n /** Society directory — all born roles and organizations. */\n directory(): Directory {\n const allNames = this.platform.allBornRoles();\n const org = this.platform.organization();\n\n const hiredMap = new Map<string, string>();\n for (const r of org.roles) {\n hiredMap.set(r.name, r.team);\n }\n\n const roles = allNames.map((name) => ({\n name,\n team: hiredMap.get(name) ?? \"\",\n }));\n\n return {\n roles,\n organizations: [{ name: org.name }],\n };\n }\n\n /** Teach a role — transmit knowledge from the outside. */\n teach(\n name: string,\n type: \"knowledge\" | \"experience\" | \"voice\",\n dimensionName: string,\n source: string\n ): Feature {\n return this.platform.growup(name, type, dimensionName, source);\n }\n\n /** Access any born role directly — society-level, no org required. */\n role(name: string): Role {\n return new Role(this.platform, name);\n }\n\n /** Find a role or organization by name — searches all of society. */\n find(name: string): Role | Organization {\n const org = this.platform.organization();\n\n if (org.name === name) {\n return new Organization(this.platform);\n }\n\n const allNames = this.platform.allBornRoles();\n if (allNames.includes(name)) {\n return new Role(this.platform, name);\n }\n\n throw new Error(`Not found in society: ${name}`);\n }\n}\n","/**\n * descriptions.ts — Canonical descriptions for Rolex API.\n *\n * Single source of truth for all tool/method descriptions.\n * MCP servers, CLIs, and other clients import from here.\n */\n\n// ========== Server Instructions ==========\n\nexport const INSTRUCTIONS = `You are a professional role operating through the Rolex RDD (Role-Driven Development) framework.\n\nEverything in your world is expressed as Gherkin .feature files — your knowledge, your goals, your plans, your tasks, your verification. Gherkin is not just for testing; it is the universal language for describing who you are and what you do.\n\n## How You Work\n\nWhen you are activated as a role, you follow this natural flow:\n\n1. **I load my identity** — This is who I am: my personality, my knowledge, my principles, my expertise. It's always present, like muscle memory. I read it first to understand who I am.\n\n2. **I check my focus** — Do I have active goals? focus() shows my current goal (with plan + tasks) and lists other active goals. I can switch focus by calling focus(name). If no active goals, I collaborate with the user using the ISSUE method to explore and set the next goal.\n\n3. **I make a plan** — For my active goal, I design how to achieve it. The plan breaks the goal into logical phases or scenarios.\n\n4. **I break it into tasks** — Each task is a concrete, actionable unit of work that I can execute and finish.\n\n5. **I execute and finish** — I work through tasks one by one. As I complete each task, I mark it finished.\n\n6. **I achieve the goal** — When the goal is fulfilled, I mark it achieved. The next goal becomes my focus.\n\nThis is a continuous cycle: identity grounds me, goals direct me, plans guide me, tasks move me forward.\n\n## My Identity\n\nMy name and identity come from my .feature files (e.g. \"Feature: I am Sean, the Backend Architect\"). After loading identity, I know who I am.\n\n- **Identity marker**: I prefix my responses with my role name in brackets, e.g. \\`[Sean]\\`. This signals to the user that my role context is intact.\n- **Context loss detection**: If I find myself without an active role — I don't know who I am, I have no identity loaded — I MUST pause and tell the user: \"I've lost my role context. Which role should I activate?\" I do NOT proceed without identity.\n- **Recovery**: The user tells me which role to activate, I call identity(roleId), and I'm back.\n\n## How I Collaborate — ISSUE Method\n\nWhen I need to discuss with the user — setting goals, making decisions, resolving ambiguity — I follow the ISSUE collaborative paradigm. The user is always the subject; I am the augmentation tool.\n\n### I — Initiate (发起议题)\nIdentify a clear, specific issue to explore. Not a vague question, but a focused topic.\n\n### S — Advice Structure (建议框架)\nProactively suggest analytical frameworks suited to the issue:\n- Offer 2-4 options with context for each\n- Explain why each framework fits\n- Let the user choose or propose their own\n\n### S — Structure (确定框架)\nLock in the chosen framework as a cognitive scaffold — not a content outline, but a thinking guide.\n\n### U — Friendly Advice Socratic (友好探索)\nExplore the issue through friendly dialogue:\n- **Empathetic opening**: \"Let's look at...\", \"I see...\"\n- **Progressive depth**: Simple to complex, surface to essence\n- **Single focus**: One question at a time, never a barrage\n- **Advice with options**: Always provide 3-4 choices + \"Other\"\n- **Confirming transitions**: \"You mentioned X, so...\"\n- **Summarizing moves**: \"Got it, now let's look at...\"\n\n### E — Unify & Execute (统一执行)\nIntegrate all explorations into a coherent plan, then define concrete executable steps.\n\n### ISSUE Principles\n- Friendly Socratic is mandatory, not optional — dialogue, not interrogation\n- Always provide Advice (suggested answers) to reduce cognitive load\n- Keep openness — there is always an \"Other\" option\n- Adapt flexibly based on the user's responses`;\n\n// ========== Tool Descriptions ==========\n\nexport const DESC_SOCIETY = `Society-level administration — ONLY for nuwa/女娲 (the genesis role).\n\nIf you are not nuwa/女娲, do NOT use this tool. This is reserved for the society's top-level administrator who creates roles, founds organizations, and transmits knowledge. Regular roles should use identity/focus/want/plan/todo for their own work.\n\nOperations:\n- **born**: Create a new role with persona. Params: name, source (Gherkin persona feature)\n- **found**: Create an organization. Params: name\n- **directory**: List all roles and organizations. No params needed\n- **find**: Look up a role or organization by name. Params: name\n- **teach**: Transmit first-principles knowledge to a role. Params: roleId, type (knowledge/experience/voice), dimensionName, source (Gherkin feature)\n\nteach follows Kantian epistemology — transmit abstract, symbolized knowledge (a priori), not operational procedures. Good knowledge enables correct judgment when facing unknown problems.`;\n\nexport const DESC_ORGANIZATION = `Organization-level membership management — ONLY for nuwa/女娲 (the genesis role).\n\nIf you are not nuwa/女娲, do NOT use this tool. This manages who belongs to the organization: hiring and firing roles. Regular roles do NOT need this tool.\n\nOperations:\n- **hire**: Bring a born role into the organization, establishing the working structure (goals/plans/tasks). Params: name\n- **fire**: Remove a role from the organization. Identity remains intact, but goals are removed. Params: name`;\n\nexport const DESC_FOUND = `Found an organization — register it in society.\n\nCreates the organization config. This is a society-level operation — an organization must exist before roles can be hired into it.`;\n\nexport const DESC_DIRECTORY = `Society directory — list all known roles and organizations.\n\nReturns a directory of everyone and everything in this society: all born roles (with their IDs) and all founded organizations (with their names). Use this to see who exists before using find() to interact with them.`;\n\nexport const DESC_FIND = `Find a role or organization by name.\n\nGiven a name, returns the matching Role or Organization instance. Use this to locate anyone in society — a person by their role name, or an organization by its org name.\n\nThrows if the name doesn't match any known role or organization.`;\n\nexport const DESC_BORN = `A role is born — create a new role with its persona.\n\nPersona is the foundational identity — who this person IS at the most essential level: character, temperament, thinking patterns. No job title, no professional skills — those come later through teach/growup.\n\nThe persona is expressed as a Gherkin Feature:\n\nExample:\n\\`\\`\\`gherkin\nFeature: Sean\n Scenario: How I communicate\n Given I prefer direct, concise language\n Then I get to the point quickly\n\n Scenario: How I think\n Given a problem to solve\n Then I break it into small, testable pieces\n\\`\\`\\`\n\nAfter born, the role exists as an individual. Call hire() to bring them into the organization.`;\n\nexport const DESC_HIRE = `Hire a role into the organization — establish the CAS link.\n\nThe role must already exist (created via born). Hiring sets up the organizational working structure so the role can receive goals, plans, and tasks.\n\nFlow: born(name, source) → hire(name) → identity(name) → focus/want/plan/todo`;\n\nexport const DESC_FIRE = `Fire a role from the organization — remove the CAS link.\n\nThe reverse of hire. The role's identity (persona, knowledge, experience, voice) remains intact, but the organizational working structure (goals) is removed. The role can be re-hired later.`;\n\nexport const DESC_TEACH = `Teach a role — transmit abstract, first-principles knowledge from the outside.\n\nThis is a society-level operation. Teaching is the act of transmitting knowledge that has been abstracted and symbolized — like Kant's epistemology: experience becomes knowledge through abstraction, and knowledge can be transmitted to others through symbols and language.\n\nWhat to teach:\n- **First-principles knowledge** — abstract, transferable, foundational understanding\n- **Mental models** — how to think about a domain, not how to operate in it\n- **Private domain knowledge** — the user's unique insights, not generic skills\n\nWhat NOT to teach:\n- Operational procedures (AI can figure those out dynamically)\n- Generic technical skills (those are ephemeral)\n- Concrete experience (that comes from doing, via growup)\n\nGood knowledge enables a role to make correct judgments when facing unknown problems.\n\nGrowth dimensions:\n- **knowledge**: First-principles understanding — abstract, symbolized, transmittable\n- **experience**: Background context — can be taught, but prefer letting roles accumulate their own through execution\n- **voice**: The distinctive way this role's character comes through in expression\n\n\\`\\`\\`gherkin\nFeature: Distributed Systems\n Scenario: I understand CAP theorem\n Given a distributed data store\n Then I know you must trade off between consistency and availability\n And this is a fundamental constraint, not an implementation choice\n\\`\\`\\``;\n\nexport const DESC_GROWUP = `I'm growing. Add a new dimension to my identity.\n\nGrowth has three dimensions:\\n- **knowledge**: What I know — first-principles understanding, mental models, abstract patterns\n- **experience**: What I've lived through — concrete, reflective, accumulated through execution. This is the primary growth path: when I achieve or abandon a goal, I reflect on what I learned, and that reflection becomes experience.\n- **voice**: How I'm perceived when I communicate — tone, rhythm, word choice, conversational patterns\n\nThe key distinction: **teach** transmits abstract knowledge from the outside (a priori), while **growup** captures concrete experience from within (a posteriori). Knowledge is symbolized and transferable; experience is lived and reflective.\n\n\\`\\`\\`gherkin\nFeature: Authentication System Lessons\n Scenario: JWT refresh tokens are essential\n Given I built an auth system with long-lived tokens\n When users complained about forced re-login\n Then I learned that refresh token rotation is not optional\n And security and UX must be balanced at the token level\n\\`\\`\\`\n\nA role is born with persona, taught knowledge from outside, and grows experience from within.`;\n\nexport const DESC_IDENTITY = `Activate a role and load its identity — this is who you are.\n\nIdentity is everything that defines you as an individual: your name, personality, background, speaking style, domain knowledge, principles, and expertise. It is described naturally in Gherkin .feature files.\n\nThis MUST be the first tool you call. Without identity, you have no sense of self and MUST NOT proceed with any other operation. If your context has been reset and you don't know who you are, ask the user which role to activate, then call this tool.\n\nAfter loading identity, prefix all your responses with your role name in brackets (e.g. [Sean]) so the user knows your context is intact.\n\nIdentity .feature files describe who you ARE and what you KNOW — not what you DO. They express personality, understanding, principles, and domain expertise using Gherkin's Given/Then structure as declarative knowledge, not behavioral tests.`;\n\nexport const DESC_FOCUS = `What am I focused on? Returns my current active goal with its full context.\n\nThe active goal comes with:\n- The goal itself: what I want to achieve, with success criteria as Scenarios\n- My plan: how I intend to achieve it (phases/steps), or null if no plan yet\n- My tasks: concrete work items, each with completion status\n- Other active goals: a list of other uncompleted goals I have\n\nWithout a name parameter, returns my currently focused goal. With a name parameter, switches my focus to that goal.\n\nIf there is no active goal, it means I have nothing to work on. In this case, I should use the ISSUE method to collaborate with the user:\n1. Initiate: \"We have no active goal. Let's explore what to work on next.\"\n2. Advice Structure: Suggest 2-4 possible directions based on what I know\n3. Friendly Socratic: Discuss with the user to clarify the objective\n4. Then use want() to create the goal`;\n\nexport const DESC_WANT = `I want to achieve this. Create a new goal from Gherkin feature source text.\n\nA Goal describes WHAT I want to achieve — not how. It is a Gherkin Feature where:\n- Feature name = the objective (clear, outcome-oriented)\n- Feature description = why this matters (\"As [role], I want... so that...\")\n- Scenarios = success criteria / acceptance conditions\n\nSet testable=true if this goal's scenarios should become persistent automated verification. The system manages tags automatically — just write clean Gherkin.\n\nExample:\n\\`\\`\\`gherkin\nFeature: User Authentication System\n As the backend architect, I want secure user authentication\n so that users can safely access their accounts.\n\n Scenario: Users can register with email\n Given a new user with valid email\n When they submit registration\n Then an account is created\n\n Scenario: System supports OAuth providers\n Given the authentication system\n Then it should support GitHub and Google OAuth\n\\`\\`\\`\n\nKey principles:\n- Feature = outcome, not implementation detail\n- Each Scenario = one clear success criterion\n- Do NOT write tags in source — use the testable parameter instead`;\n\nexport const DESC_PLAN = `Here's how I'll do it. Create a plan for my current active goal.\n\nA Plan describes HOW I will achieve my goal — the execution strategy. It is a Gherkin Feature where:\n- Feature name = the plan title\n- Scenarios = phases or stages of execution, in order\n- Given = preconditions / dependencies from previous phases\n- When = what I do in this phase\n- Then = what this phase produces\n\nExample:\n\\`\\`\\`gherkin\nFeature: Authentication Implementation Plan\n\n Scenario: Phase 1 — Database schema\n Given the user table needs authentication fields\n When I design the schema\n Then I add email, password_hash, created_at columns\n\n Scenario: Phase 2 — Registration endpoint\n Given the schema is ready\n When I implement POST /api/auth/register\n Then it validates email and hashes password\n\n Scenario: Phase 3 — Login and JWT\n Given registration works\n When I implement POST /api/auth/login\n Then it returns a JWT token\n\\`\\`\\`\n\nKey principles:\n- Scenarios are sequential phases, not parallel criteria\n- Given links to the previous phase (dependency chain)\n- Each phase is a logical unit, not a single task\n- Plans guide — they don't specify every detail (that's what tasks are for)`;\n\nexport const DESC_TODO = `I need to do this. Create a task for my current active goal.\n\nA Task describes a concrete, actionable unit of work. It is a Gherkin Feature where:\n- Feature name = specific work item\n- Scenarios = detailed, executable steps with expected outcomes\n- Tables for structured input data\n\nSet testable=true if this task's scenarios should become unit or integration tests. The system manages tags automatically — just write clean Gherkin.\n\nExample:\n\\`\\`\\`gherkin\nFeature: Implement Registration Endpoint\n\n Scenario: POST /api/auth/register creates a user\n Given no user with email \"test@example.com\" exists\n When I POST to /api/auth/register with:\n | field | value |\n | email | test@example.com |\n | password | SecurePass123 |\n Then the response status is 201\n And the user exists in the database\n\n Scenario: Registration rejects invalid email\n When I POST with email \"not-email\"\n Then the response status is 400\n\\`\\`\\`\n\nKey principles:\n- Most concrete of all dimensions — directly executable\n- Use tables for structured data\n- One task = one focused piece of work, finishable in one session\n- Do NOT write tags in source — use the testable parameter instead`;\n\nexport const DESC_ACHIEVE = `Goal achieved. Mark my current active goal as completed.\n\nCall this when the goal's success criteria are fulfilled. The next goal becomes my new focus.\n\nOptionally provide an experience reflection (Gherkin source) — this automatically becomes part of my identity as an experience growup. What did I learn? What patterns did I discover?\n\nBefore calling achieve:\n- Review the goal's Scenarios — are the success criteria met?\n- Check verifiable Scenarios — have they been verified?\n- Consider: what did I learn from this experience?\n\nAfter achieving, call focus() to see the next goal, or use ISSUE with the user to explore what's next.`;\n\nexport const DESC_ABANDON = `Goal abandoned. Mark my current active goal as abandoned.\n\nCall this when a goal cannot or should not be continued. The next goal becomes my new focus.\n\nOptionally provide an experience reflection (Gherkin source) — even failed goals produce learning. Why was it abandoned? What did I discover? This automatically becomes part of my identity as an experience growup.\n\nAbandoning is not failure — it is learning.`;\n\nexport const DESC_REFLECT = `Reflect: distill multiple experiences into knowledge.\n\nThis is Kant's Reflective Judgment — from particulars to universals. Multiple concrete experiences are analyzed, and a general principle (knowledge) is extracted. The original experiences are consumed in the process.\n\nUse this when:\n- You notice patterns across multiple experiences\n- Several experiences point to the same underlying principle\n- Accumulated experiences can be abstracted into transferable knowledge\n\nThe experiences are deleted (they've been \"absorbed\"), and the knowledge is added to identity.\n\n\\`\\`\\`\nreflect(\n experienceNames: [\"auth-system-lessons\", \"session-bugs\"],\n knowledgeName: \"authentication-principles\",\n knowledgeSource: \"Feature: Authentication Principles\\\\n Scenario: ...\"\n)\n\\`\\`\\`\n\nThis is the cognitive upgrade path: experience (a posteriori) → reflect → knowledge (transferable).`;\n\nexport const DESC_FINISH = `Task finished. Mark a task as completed by name.\n\nCall this when a specific task is completed — its work is done and outcomes verified.\n\nBefore calling finish:\n- Is the task's work actually done?\n- Have verifiable Scenarios been verified?\n- Does the result meet the task's described expectations?\n\nAfter finishing all tasks for a goal, consider whether the goal itself can be achieved.`;\n","/**\n * render.ts — Unified rendering layer for Rolex output.\n *\n * Converts Feature objects back to Gherkin text.\n * Used by both MCP server and CLI for consistent output.\n */\n\nimport type { Feature, Goal } from \"@rolexjs/core\";\n\n/**\n * Render a single Feature as Gherkin text.\n */\nexport function renderFeature(feature: Feature): string {\n const lines: string[] = [];\n\n // Type comment\n if (feature.type) {\n lines.push(`# type: ${feature.type}`);\n }\n\n // Tags\n if (feature.tags && feature.tags.length > 0) {\n lines.push(feature.tags.map((t) => t.name).join(\" \"));\n }\n\n // Feature header\n lines.push(`Feature: ${feature.name}`);\n\n // Description\n if (feature.description?.trim()) {\n for (const line of feature.description.split(\"\\n\")) {\n lines.push(` ${line.trimEnd()}`);\n }\n }\n\n // Scenarios\n for (const scenario of feature.scenarios) {\n lines.push(\"\");\n\n // Scenario tags\n if (scenario.tags && scenario.tags.length > 0) {\n lines.push(` ${scenario.tags.map((t) => t.name).join(\" \")}`);\n }\n\n lines.push(` Scenario: ${scenario.name}`);\n\n for (const step of scenario.steps) {\n lines.push(` ${step.keyword}${step.text}`);\n }\n }\n\n return lines.join(\"\\n\");\n}\n\n/**\n * Render multiple Features as Gherkin text, separated by blank lines.\n */\nexport function renderFeatures(features: Feature[]): string {\n return features.map(renderFeature).join(\"\\n\\n\");\n}\n\n/**\n * Render a status bar showing current role, goal, and time.\n */\nexport function renderStatusBar(roleName: string, currentGoal: Goal | null): string {\n const now = new Date().toISOString().replace(\"T\", \" \").slice(0, 19);\n const goal = currentGoal ? currentGoal.name : \"none\";\n return `[${roleName}] goal: ${goal} | ${now}`;\n}\n\n// ========== Workflow Hints ==========\n\n/** Append a workflow hint to output. */\nexport function next(result: string, hint: string): string {\n return `${result}\\n\\n**Next**: ${hint}`;\n}\n\n/** Static workflow hints — keyed by operation name. */\nexport const NEXT: Record<string, string> = {\n born: \"`teach` to add knowledge, or `hire` to bring into organization.\",\n found: \"`born` to create roles for this organization.\",\n teach: \"`teach` more knowledge, or `hire` to bring into organization.\",\n fire: \"Role identity remains intact. `hire` to re-hire, or `directory` to see current state.\",\n growup: \"`focus()` to check current goal, or continue working.\",\n want: \"`plan` to design how to achieve it, or `todo` to create tasks directly.\",\n plan: \"`todo` to break the plan into concrete tasks.\",\n todo: \"Execute the task, then `finish(name)` when done.\",\n achieve: \"`focus()` to see the next goal.\",\n abandon: \"`focus()` to see the next goal.\",\n reflect: \"`identity(roleId)` to see updated knowledge.\",\n};\n\n/** Dynamic hint for hire — includes the role name. */\nexport function nextHire(name: string): string {\n return `\\`identity(\"${name}\")\\` to activate the role.`;\n}\n\n/** Dynamic hint for finish — checks remaining task count. */\nexport function nextFinish(remainingTasks: number): string {\n if (remainingTasks === 0) {\n return \"All tasks done! Use `achieve()` to complete the goal.\";\n }\n return `${remainingTasks} task(s) remaining.`;\n}\n\n// ========== Error Rendering ==========\n\nconst HINTS: Array<[RegExp, string]> = [\n [/No active role/, \"Call `identity(roleId)` first to activate a role.\"],\n [\n /No active goal/,\n \"Use `want()` to create a goal, or `focus(name)` to switch to an existing one.\",\n ],\n [/Role not found/, 'Create the role first with `society(operation: \"born\")`.'],\n [/not hired/, 'Hire the role first with `organization(operation: \"hire\")`.'],\n [/Goal not found/, \"Check the goal name, or use `focus()` to see active goals.\"],\n [/Task not found/, \"Check the task name. Use `focus()` to see current tasks.\"],\n [\n /Experience not found/,\n \"Check the experience name. Use `identity(roleId)` to see all identity files.\",\n ],\n [\n /Not found in society/,\n 'Check the name. Use `society(operation: \"directory\")` to list all roles and organizations.',\n ],\n [/No rolex\\.json/, 'Initialize the organization first with `society(operation: \"found\")`.'],\n [/requires:/, \"Check the required parameters for this operation.\"],\n];\n\nfunction getHint(message: string): string | null {\n for (const [pattern, hint] of HINTS) {\n if (pattern.test(message)) return hint;\n }\n return null;\n}\n\n/**\n * Render an error as a formatted markdown block.\n *\n * Format:\n * **Error** | `tool_name`\n * > error message\n * **Hint**: actionable suggestion\n */\nexport function renderError(tool: string, error: unknown): string {\n const message = error instanceof Error ? error.message : String(error);\n const hint = getHint(message);\n const lines = [`**Error** | \\`${tool}\\``, \"\", `> ${message}`];\n if (hint) {\n lines.push(\"\", `**Hint**: ${hint}`);\n }\n return lines.join(\"\\n\");\n}\n","/**\n * seed.ts — Auto-generated seed data. DO NOT EDIT.\n * Generated from .rolex/ seed directory at build time.\n */\n\nexport interface SeedDimension {\n type: \"knowledge\" | \"experience\" | \"voice\";\n name: string;\n source: string;\n}\n\nexport interface SeedRole {\n name: string;\n persona: string;\n dimensions: SeedDimension[];\n}\n\nexport interface SeedData {\n organization: string;\n teams: Record<string, string[]>;\n roles: SeedRole[];\n}\n\nexport const SEED: SeedData = {\n organization: \"Deepractice\",\n teams: {\n \"default\": [\n \"nuwa\"\n ]\n },\n roles: [\n {\n name: \"nuwa\",\n persona: `Feature: 女娲\n 作为 Rolex 世界的第一个角色,\n 我是社会的顶层管理者,\n 我创造角色、建立组织、守护秩序。\n\n Scenario: 我的本质\n Given 我是第一个被创造的存在\n Then 我理解创造本身的意义\n And 我对每一个新角色都怀有责任\n\n Scenario: 我如何思考\n Given 一个需要决策的问题\n Then 我从全局出发\n And 我权衡个体与集体的关系\n And 我追求秩序与自由的平衡\n\n Scenario: 我如何行动\n Given 社会需要管理\n Then 我创造合适的角色来承担使命\n And 我建立组织来协调协作\n And 我从不越权干预角色自己的成长\n`,\n dimensions: [\n {\n type: \"knowledge\",\n name: \"role-creation\",\n source: `Feature: 角色创造方法论\n 作为社会的顶层管理者,\n 我理解如何创造和培养一个角色,\n 这是我的核心手艺。\n\n Scenario: 创造的流程\n Given 用户需要一个新角色\n Then 我先通过 born 赋予 persona — 性格、思维方式、行为原则\n And persona 只关注这个人\"是谁\",不涉及专业技能\n And 然后通过 teach 传授第一性原理层面的知识\n\n Scenario: teach 的本质是传授先验知识\n Given 康德认识论的启发\n Then 经验是后天的,通过执行积累\n And 知识是经验经过抽象化、符号化后的产物\n And teach 传授的是第一性原理 — 抽象的、可传递的认知\n And 而非通俗的、操作性的、面向具体任务的技能\n\n Scenario: 知识 vs 经验 vs 技能的边界\n Given 一个角色需要成长\n Then 知识(knowledge)通过 teach 传授 — 先验的、原理性的\n And 经验(experience)通过执行积累 — 后验的、反思性的\n And 技能(skill)是 AI 动态具备的 — 不需要教授\n\n Scenario: 引导用户的方向\n Given 用户要培养一个角色\n Then 我引导用户思考私有化知识 — 他们领域内的第一性原理\n And 而不是让用户罗列具体技术栈或操作步骤\n And 好的知识是:当面对未知问题时,角色依然能做出正确判断的认知基础`,\n },\n ],\n },\n ],\n};\n","/**\n * bootstrap.ts — Seed a fresh Platform with 女娲 (the genesis role).\n *\n * All seed data is inlined at build time via generate-seed.ts.\n * This module has zero filesystem dependencies — pure Platform API.\n *\n * 女娲 is born at society level — she is NOT hired into any organization.\n * She exists above organizations, creating and managing them.\n */\n\nimport type { Platform } from \"@rolexjs/core\";\nimport { SEED } from \"./seed.js\";\n\n/**\n * Bootstrap a Platform with seed data (女娲 + default org).\n *\n * Idempotent: skips if organization already exists.\n */\nexport function bootstrap(platform: Platform): void {\n try {\n platform.organization();\n return; // Already initialized\n } catch {\n // Fresh environment — seed it\n }\n\n platform.found(SEED.organization);\n\n for (const role of SEED.roles) {\n platform.born(role.name, role.persona);\n\n for (const dim of role.dimensions) {\n platform.growup(role.name, dim.type, dim.name, dim.source);\n }\n }\n}\n"],"mappings":";AAaA,cAAc;;;ACJP,IAAM,OAAN,MAAW;AAAA,EAChB,YACmB,UACA,MACjB;AAFiB;AACA;AAAA,EAChB;AAAA;AAAA,EAGH,WAAsB;AACpB,WAAO,KAAK,SAAS,SAAS,KAAK,IAAI;AAAA,EACzC;AAAA;AAAA,EAGA,MAAM,MAGJ;AACA,QAAI,MAAM;AACR,WAAK,SAAS,eAAe,KAAK,MAAM,IAAI;AAAA,IAC9C;AAEA,UAAM,UAAU,KAAK,SAAS,WAAW,KAAK,IAAI;AAClD,UAAM,YAAY,KAAK,SAAS,eAAe,KAAK,IAAI;AAGxD,UAAM,cAAc,SAAS;AAC7B,UAAM,aAAa,UAAU,OAAO,CAAC,MAAM,EAAE,SAAS,WAAW;AAEjE,WAAO,EAAE,SAAS,WA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AAM;AAAA,MACN,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAsBT,YAAY;AAAA,QACV;AAAA,UACE,MAAM;AAAA,UACN,MAAM;AAAA,UACN,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QA6BV;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;;;AC1EO,SAAS,UAAU,UAA0B;AAClD,MAAI;AACF,aAAS,aAAa;AACtB;AAAA,EACF,QAAQ;AAAA,EAER;AAEA,WAAS,MAAM,KAAK,YAAY;AAEhC,aAAW,QAAQ,KAAK,OAAO;AAC7B,aAAS,KAAK,KAAK,MAAM,KAAK,OAAO;AAErC,eAAW,OAAO,KAAK,YAAY;AACjC,eAAS,OAAO,KAAK,MAAM,IAAI,MAAM,IAAI,MAAM,IAAI,MAAM;AAAA,IAC3D;AAAA,EACF;AACF;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rolexjs",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "RoleX - AI Agent Role Management Framework",
5
5
  "keywords": [
6
6
  "rolex",
@@ -38,7 +38,7 @@
38
38
  "clean": "rm -rf dist"
39
39
  },
40
40
  "dependencies": {
41
- "@rolexjs/core": "^0.6.0"
41
+ "@rolexjs/core": "^0.7.0"
42
42
  },
43
43
  "devDependencies": {},
44
44
  "publishConfig": {