@rolexjs/core 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.d.ts CHANGED
@@ -1,10 +1,6 @@
1
1
  import * as _rolexjs_system from '@rolexjs/system';
2
2
  import { Runtime, Initializer, Structure, State } from '@rolexjs/system';
3
3
  export { Create, GraphOp, Link, Process, Relation, Remove, Runtime, State, Structure, Transform, Unlink, create, createRuntime, link, process, relation, remove, structure, transform, unlink } from '@rolexjs/system';
4
- import { IssueXProvider } from '@issuexjs/core';
5
- import { ResourceXProvider, CustomExecutor } from '@resourcexjs/core';
6
- import { IssueX, Issue, Comment } from 'issuexjs';
7
- import { ResourceX, Resource, RXM } from 'resourcexjs';
8
4
 
9
5
  /**
10
6
  * Platform — external integration point for RoleX.
@@ -79,12 +75,6 @@ interface RoleXRepository {
79
75
  interface Platform {
80
76
  /** Unified data access layer — graph, prototypes, contexts. */
81
77
  readonly repository: RoleXRepository;
82
- /** ResourceX provider — injected storage backend for resource management. */
83
- readonly resourcexProvider?: ResourceXProvider;
84
- /** Custom executor for ResourceX resolver execution (e.g., QuickJS Wasm for Workers). */
85
- readonly resourcexExecutor?: CustomExecutor;
86
- /** IssueX provider — injected storage backend for issue tracking. */
87
- readonly issuexProvider?: IssueXProvider;
88
78
  /** Initializer — bootstrap the world on first run. */
89
79
  readonly initializer?: Initializer;
90
80
  }
@@ -118,6 +108,8 @@ declare const strategy: _rolexjs_system.Structure;
118
108
  declare const spec: _rolexjs_system.Structure;
119
109
  declare const release: _rolexjs_system.Structure;
120
110
  declare const channel: _rolexjs_system.Structure;
111
+ declare const issue: _rolexjs_system.Structure;
112
+ declare const comment: _rolexjs_system.Structure;
121
113
 
122
114
  declare const activate: _rolexjs_system.Process;
123
115
  declare const want: _rolexjs_system.Process;
@@ -204,10 +196,7 @@ interface CommandContext {
204
196
  resolve(id: string): Structure | Promise<Structure>;
205
197
  find(id: string): (Structure | null) | Promise<Structure | null>;
206
198
  project: Projection;
207
- resourcex?: ResourceX;
208
- issuex?: IssueX;
209
199
  prototype?: PrototypeRepository;
210
- direct?(locator: string, args?: Record<string, unknown>): Promise<unknown>;
211
200
  }
212
201
  /**
213
202
  * CommandResultMap — typed return type for every command.
@@ -233,7 +222,6 @@ interface CommandResultMap {
233
222
  "role.realize": CommandResult;
234
223
  "role.master": CommandResult;
235
224
  "role.forget": CommandResult;
236
- "role.skill": string;
237
225
  "project.scope": CommandResult;
238
226
  "project.milestone": CommandResult;
239
227
  "project.achieve": CommandResult;
@@ -269,25 +257,17 @@ interface CommandResultMap {
269
257
  "society.crown": CommandResult;
270
258
  "society.uncrown": CommandResult;
271
259
  "survey.list": CommandResult;
272
- "issue.publish": Issue;
273
- "issue.get": Issue | null;
274
- "issue.list": Issue[];
275
- "issue.update": Issue;
276
- "issue.close": Issue;
277
- "issue.reopen": Issue;
278
- "issue.assign": Issue;
279
- "issue.comment": Comment;
280
- "issue.comments": Comment[];
281
- "issue.label": Issue | null;
282
- "issue.unlabel": Issue | null;
283
- "resource.add": Resource;
284
- "resource.search": string[];
285
- "resource.has": boolean;
286
- "resource.info": Resource;
287
- "resource.remove": undefined;
288
- "resource.push": RXM;
289
- "resource.pull": undefined;
290
- "resource.clearCache": undefined;
260
+ "issue.publish": CommandResult;
261
+ "issue.get": CommandResult;
262
+ "issue.list": CommandResult;
263
+ "issue.update": CommandResult;
264
+ "issue.close": CommandResult;
265
+ "issue.reopen": CommandResult;
266
+ "issue.assign": CommandResult;
267
+ "issue.comment": CommandResult;
268
+ "issue.comments": CommandResult;
269
+ "issue.label": CommandResult;
270
+ "issue.unlabel": CommandResult;
291
271
  }
292
272
  type Commands = Record<string, (...args: any[]) => any>;
293
273
 
@@ -359,10 +339,6 @@ interface RoleDeps {
359
339
  commands: Commands;
360
340
  renderer: Renderer;
361
341
  onSave(snapshot: RoleSnapshot): void | Promise<void>;
362
- /** Direct execution — for `use` method. Provided by RoleXService. */
363
- direct?<T>(locator: string, args?: Record<string, unknown>): Promise<T>;
364
- /** Post-process `use` results (e.g., issue rendering). Provided by upper layer. */
365
- transformUseResult?<T>(locator: string, result: T): Promise<T>;
366
342
  }
367
343
  declare class Role {
368
344
  readonly id: string;
@@ -411,10 +387,6 @@ declare class Role {
411
387
  master(procedure: string, id?: string, experiences?: string[]): Promise<string>;
412
388
  /** Forget: remove any node under this individual by id. */
413
389
  forget(nodeId: string): Promise<string>;
414
- /** Skill: load full skill content by locator. */
415
- skill(locator: string): Promise<string>;
416
- /** Use: subjective execution — `!ns.method` or ResourceX locator. */
417
- use<T = unknown>(locator: string, args?: Record<string, unknown>): Promise<T>;
418
390
  private cognitiveHint;
419
391
  }
420
392
 
@@ -447,8 +419,6 @@ declare class RoleXService implements RoleX {
447
419
  private rt;
448
420
  private commands;
449
421
  private project;
450
- private resourcex?;
451
- private issuex?;
452
422
  private repo;
453
423
  private readonly initializer?;
454
424
  private readonly renderer;
@@ -721,76 +691,48 @@ interface IssueNamespace {
721
691
  body: string;
722
692
  author: string;
723
693
  assignee?: string;
724
- }): Promise<Issue>;
694
+ }): Promise<CommandResult>;
725
695
  get(params: {
726
696
  number: number;
727
- }): Promise<Issue | null>;
697
+ }): Promise<CommandResult>;
728
698
  list(params?: {
729
699
  status?: string;
730
700
  author?: string;
731
701
  assignee?: string;
732
702
  label?: string;
733
- }): Promise<Issue[]>;
703
+ }): Promise<CommandResult>;
734
704
  update(params: {
735
705
  number: number;
736
706
  title?: string;
737
707
  body?: string;
738
708
  assignee?: string;
739
- }): Promise<Issue>;
709
+ }): Promise<CommandResult>;
740
710
  close(params: {
741
711
  number: number;
742
- }): Promise<Issue>;
712
+ }): Promise<CommandResult>;
743
713
  reopen(params: {
744
714
  number: number;
745
- }): Promise<Issue>;
715
+ }): Promise<CommandResult>;
746
716
  assign(params: {
747
717
  number: number;
748
718
  assignee: string;
749
- }): Promise<Issue>;
719
+ }): Promise<CommandResult>;
750
720
  comment(params: {
751
721
  number: number;
752
722
  body: string;
753
723
  author: string;
754
- }): Promise<Comment>;
724
+ }): Promise<CommandResult>;
755
725
  comments(params: {
756
726
  number: number;
757
- }): Promise<Comment[]>;
727
+ }): Promise<CommandResult>;
758
728
  label(params: {
759
729
  number: number;
760
730
  label: string;
761
- }): Promise<Issue | null>;
731
+ }): Promise<CommandResult>;
762
732
  unlabel(params: {
763
733
  number: number;
764
734
  label: string;
765
- }): Promise<Issue | null>;
766
- }
767
- interface ResourceNamespace {
768
- add(params: {
769
- path: string;
770
- }): Promise<Resource>;
771
- search(params?: {
772
- query?: string;
773
- }): Promise<string[]>;
774
- has(params: {
775
- locator: string;
776
- }): Promise<boolean>;
777
- info(params: {
778
- locator: string;
779
- }): Promise<Resource>;
780
- remove(params: {
781
- locator: string;
782
- }): Promise<undefined>;
783
- push(params: {
784
- locator: string;
785
- registry?: string;
786
- }): Promise<RXM>;
787
- pull(params: {
788
- locator: string;
789
- registry?: string;
790
- }): Promise<undefined>;
791
- clearCache(params?: {
792
- registry?: string;
793
- }): Promise<undefined>;
735
+ }): Promise<CommandResult>;
794
736
  }
795
737
 
796
738
  /**
@@ -885,8 +827,6 @@ interface RoleXBuilder {
885
827
  readonly product: ProductNamespace;
886
828
  /** Issue tracking integration. */
887
829
  readonly issue: IssueNamespace;
888
- /** Resource management integration. */
889
- readonly resource: ResourceNamespace;
890
830
  /** Inspect any node's full state — world-level observation. */
891
831
  inspect(params: {
892
832
  id: string;
@@ -964,7 +904,7 @@ declare function applyPrototype(data: PrototypeData, repo: PrototypeRepository,
964
904
  *
965
905
  * DO NOT EDIT MANUALLY. Run `bun run gen:desc` to regenerate.
966
906
  *
967
- * Source: descriptions/{system}/{process}.feature (71 files)
907
+ * Source: descriptions/{system}/{process}.feature (69 files)
968
908
  */
969
909
  declare const WORLD_TOPICS: readonly ["cognition", "cognitive-priority", "command-system", "communication", "execution", "gherkin", "identity-ethics", "inspect", "issue", "memory", "role-identity", "skill-system", "state-origin", "survey", "use-protocol"];
970
910
  type WorldTopic = (typeof WORLD_TOPICS)[number];
@@ -996,4 +936,4 @@ declare function toArgs(op: string, args: Record<string, unknown>): unknown[];
996
936
 
997
937
  declare const instructions: Record<string, InstructionDef>;
998
938
 
999
- export { type ApplyResult, type ArgEntry, type BuilderConfig, type Caller, type CommandContext, type CommandResult, type CommandResultMap, type Commands, type ContextData, type IndividualNamespace, type InstructionDef, type IssueNamespace, type JsonRpcError, type JsonRpcRequest, type JsonRpcResponse, type Migration, type MigrationRecord, type OrgNamespace, type ParamDef, type ParamType, type Platform, type PositionNamespace, type ProductNamespace, type ProjectNamespace, type Protocol, type PrototypeData, type PrototypeRepository, type Renderer, RendererRouter, type ResourceNamespace, Role, type RoleDeps, type RoleSnapshot, type RoleX, type RoleXBuilder, type RoleXInternal, type RoleXRepository, RoleXService, RpcHandler, type SocietyNamespace, type ToolDef, abandon, abolish, activate, applyPrototype, appoint, archive, background, born, channel, channelProduct, charge, charter, charterOrg, complete, createBuilder, createCommands, deliverProject, deliverable, deprecate, die, directives, dismiss, disownProduct, dissolve, duty, encounter, enroll, establish, experience, findInState, finish, fire, found, goal, hire, identity, individual, instructions, launch, master, milestone, milestoneProject, mindset, organization, ownProduct, past, plan, planGoal, position, principle, procedure, processes, produceProject, product, project, protocol, realize, reflect, rehire, release, releaseProduct, removeParticipant, requirement, retire, scope, scopeProject, society, spec, specProduct, strategy, strategyProduct, task, toArgs, todo, tone, want, wiki, wikiProject, world };
939
+ export { type ApplyResult, type ArgEntry, type BuilderConfig, type Caller, type CommandContext, type CommandResult, type CommandResultMap, type Commands, type ContextData, type IndividualNamespace, type InstructionDef, type IssueNamespace, type JsonRpcError, type JsonRpcRequest, type JsonRpcResponse, type Migration, type MigrationRecord, type OrgNamespace, type ParamDef, type ParamType, type Platform, type PositionNamespace, type ProductNamespace, type ProjectNamespace, type Protocol, type PrototypeData, type PrototypeRepository, type Renderer, RendererRouter, Role, type RoleDeps, type RoleSnapshot, type RoleX, type RoleXBuilder, type RoleXInternal, type RoleXRepository, RoleXService, RpcHandler, type SocietyNamespace, type ToolDef, abandon, abolish, activate, applyPrototype, appoint, archive, background, born, channel, channelProduct, charge, charter, charterOrg, comment, complete, createBuilder, createCommands, deliverProject, deliverable, deprecate, die, directives, dismiss, disownProduct, dissolve, duty, encounter, enroll, establish, experience, findInState, finish, fire, found, goal, hire, identity, individual, instructions, issue, launch, master, milestone, milestoneProject, mindset, organization, ownProduct, past, plan, planGoal, position, principle, procedure, processes, produceProject, product, project, protocol, realize, reflect, rehire, release, releaseProduct, removeParticipant, requirement, retire, scope, scopeProject, society, spec, specProduct, strategy, strategyProduct, task, toArgs, todo, tone, want, wiki, wikiProject, world };