@rolexjs/core 0.7.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.
- package/dist/index.d.ts +25 -4
- 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
|
|
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,8 @@ 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;
|
|
168
189
|
/** List all born roles in society (regardless of organization membership) */
|
|
169
190
|
allBornRoles(): string[];
|
|
170
191
|
/** Create a new role with its persona */
|
|
@@ -204,4 +225,4 @@ interface Platform {
|
|
|
204
225
|
reflect(roleId: string, experienceNames: string[], knowledgeName: string, knowledgeSource: string): Feature;
|
|
205
226
|
}
|
|
206
227
|
|
|
207
|
-
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 };
|