@rolexjs/core 0.6.0 → 0.8.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +27 -4
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -141,7 +141,28 @@ interface RoleEntry {
141
141
  readonly team: string;
142
142
  }
143
143
  /**
144
- * Organization structure.
144
+ * Organization config within RolexConfig.
145
+ */
146
+ interface OrganizationConfig {
147
+ readonly name: string;
148
+ readonly teams: Readonly<Record<string, readonly string[]>>;
149
+ }
150
+ /**
151
+ * RolexConfig — The single source of truth for society state.
152
+ *
153
+ * Always exists. Defined in core, persisted by Platform.
154
+ * - roles: all born role names (CAS — no scanning needed)
155
+ * - organization: optional org with teams (null if no org founded)
156
+ */
157
+ interface RolexConfig {
158
+ roles: string[];
159
+ organization: {
160
+ name: string;
161
+ teams: Record<string, string[]>;
162
+ } | null;
163
+ }
164
+ /**
165
+ * Organization structure (runtime view).
145
166
  */
146
167
  interface Organization {
147
168
  readonly name: string;
@@ -163,8 +184,10 @@ interface Directory {
163
184
  interface Platform {
164
185
  /** Found an organization */
165
186
  found(name: string): void;
166
- /** Get the organization structure (teams + roles) */
167
- organization(): Organization;
187
+ /** Get the organization structure (teams + roles), or null if no org exists */
188
+ organization(): Organization | null;
189
+ /** List all born roles in society (regardless of organization membership) */
190
+ allBornRoles(): string[];
168
191
  /** Create a new role with its persona */
169
192
  born(name: string, source: string): Feature;
170
193
  /** Hire a role into the organization — establish CAS link */
@@ -202,4 +225,4 @@ interface Platform {
202
225
  reflect(roleId: string, experienceNames: string[], knowledgeName: string, knowledgeSource: string): Feature;
203
226
  }
204
227
 
205
- export type { Directory, Feature, Goal, Identity, Organization, Plan, Platform, Role, RoleEntry, Scenario, Skill, Task };
228
+ export type { Directory, Feature, Goal, Identity, Organization, OrganizationConfig, Plan, Platform, Role, RoleEntry, RolexConfig, Scenario, Skill, Task };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolexjs/core",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "description": "RoleX Core - AI Agent Role Management Framework",
5
5
  "keywords": [
6
6
  "rolex",