@dotbep/core 0.2.7 → 0.2.9

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 (77) hide show
  1. package/dist/index.d.ts +7 -40
  2. package/dist/index.js +1142 -1179
  3. package/package.json +4 -1
  4. package/examples/01-participants.ts +0 -127
  5. package/examples/02-files.ts +0 -100
  6. package/examples/03-workflows.ts +0 -149
  7. package/examples/04-bim-uses.ts +0 -70
  8. package/examples/05-standards.ts +0 -60
  9. package/examples/06-schedule.ts +0 -124
  10. package/examples/07-loin.ts +0 -133
  11. package/examples/08-deliverables.ts +0 -126
  12. package/examples/09-notes.ts +0 -73
  13. package/examples/10-llm.ts +0 -109
  14. package/examples/11-resolved.ts +0 -133
  15. package/examples/12-history.ts +0 -166
  16. package/examples/13-engine.ts +0 -152
  17. package/examples/bep.d.ts +0 -38
  18. package/examples/example.bep +0 -0
  19. package/examples/run-all.ts +0 -38
  20. package/src/base/entity.ts +0 -148
  21. package/src/base/history.ts +0 -497
  22. package/src/base/index.ts +0 -5
  23. package/src/base/singleton.ts +0 -26
  24. package/src/entities/actions.ts +0 -25
  25. package/src/entities/adapters.ts +0 -16
  26. package/src/entities/annexes.ts +0 -17
  27. package/src/entities/assetTypes.ts +0 -30
  28. package/src/entities/automations.ts +0 -24
  29. package/src/entities/bimUses.ts +0 -50
  30. package/src/entities/deliverables.ts +0 -66
  31. package/src/entities/disciplines.ts +0 -21
  32. package/src/entities/effects.ts +0 -28
  33. package/src/entities/env.ts +0 -17
  34. package/src/entities/events.ts +0 -24
  35. package/src/entities/extensions.ts +0 -16
  36. package/src/entities/flags.ts +0 -17
  37. package/src/entities/guides.ts +0 -26
  38. package/src/entities/index.ts +0 -32
  39. package/src/entities/lbsNodes.ts +0 -193
  40. package/src/entities/lods.ts +0 -22
  41. package/src/entities/loin.ts +0 -127
  42. package/src/entities/lois.ts +0 -22
  43. package/src/entities/members.ts +0 -137
  44. package/src/entities/milestones.ts +0 -32
  45. package/src/entities/notes.ts +0 -27
  46. package/src/entities/objectives.ts +0 -17
  47. package/src/entities/phases.ts +0 -17
  48. package/src/entities/remoteData.ts +0 -17
  49. package/src/entities/resolvers.ts +0 -20
  50. package/src/entities/roles.ts +0 -29
  51. package/src/entities/softwares.ts +0 -26
  52. package/src/entities/standards.ts +0 -68
  53. package/src/entities/teams.ts +0 -42
  54. package/src/entities/workflows.ts +0 -256
  55. package/src/index.ts +0 -464
  56. package/src/runtime/Engine.ts +0 -352
  57. package/src/runtime/MemoryStorage.ts +0 -31
  58. package/src/runtime/Runtime.ts +0 -106
  59. package/src/runtime/index.ts +0 -4
  60. package/src/runtime/transitions.ts +0 -456
  61. package/src/runtime/types.ts +0 -279
  62. package/src/types/history.ts +0 -37
  63. package/src/types/index.ts +0 -24
  64. package/src/types/resolved.ts +0 -137
  65. package/src/types/schema.ts +0 -757
  66. package/src/utils/diff.ts +0 -109
  67. package/src/utils/index.ts +0 -9
  68. package/src/utils/integrity.ts +0 -108
  69. package/src/utils/lbs.ts +0 -116
  70. package/src/utils/mermaid.ts +0 -110
  71. package/src/utils/naming.ts +0 -62
  72. package/src/utils/nomenclature.ts +0 -107
  73. package/src/utils/normalize.ts +0 -35
  74. package/src/utils/raci.ts +0 -25
  75. package/src/utils/textFile.ts +0 -24
  76. package/tsconfig.json +0 -12
  77. package/vite.config.ts +0 -24
package/dist/index.d.ts CHANGED
@@ -21,25 +21,6 @@ export declare const ActionSchema: z.ZodObject<{
21
21
  guideIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
22
22
  }, z.core.$strip>;
23
23
 
24
- export declare type Adapter = z.infer<typeof AdapterSchema>;
25
-
26
- /**
27
- * Handler registered for a specific Adapter.id.
28
- * Receives the raw output of a resolver and returns a transformed payload
29
- * compatible with the target lens input schema.
30
- */
31
- export declare type AdapterHandler = (data: unknown) => unknown;
32
-
33
- export declare class Adapters extends Entity<Adapter> {
34
- constructor(getBep: () => BEP);
35
- }
36
-
37
- export declare const AdapterSchema: z.ZodObject<{
38
- id: z.ZodString;
39
- name: z.ZodString;
40
- description: z.ZodString;
41
- }, z.core.$strip>;
42
-
43
24
  /** Input type for add() on non-autoId entities — id is optional, validated by the Zod schema */
44
25
  declare type AddInput<T extends object> = Omit<T, 'id'> & {
45
26
  id?: string;
@@ -117,7 +98,6 @@ export declare class Bep {
117
98
  private _zip;
118
99
  readonly project: Singleton<Project>;
119
100
  readonly actions: Actions;
120
- readonly adapters: Adapters;
121
101
  readonly annexes: Annexes;
122
102
  readonly deliverables: Deliverables;
123
103
  readonly effects: Effects;
@@ -399,8 +379,8 @@ export declare const BEPSchema: z.ZodObject<{
399
379
  }, z.core.$strip>>;
400
380
  env: z.ZodArray<z.ZodObject<{
401
381
  key: z.ZodString;
402
- description: z.ZodOptional<z.ZodString>;
403
- secret: z.ZodOptional<z.ZodBoolean>;
382
+ description: z.ZodString;
383
+ sensitive: z.ZodOptional<z.ZodBoolean>;
404
384
  }, z.core.$strip>>;
405
385
  resolvers: z.ZodArray<z.ZodObject<{
406
386
  id: z.ZodString;
@@ -408,11 +388,6 @@ export declare const BEPSchema: z.ZodObject<{
408
388
  description: z.ZodString;
409
389
  envKeys: z.ZodArray<z.ZodString>;
410
390
  }, z.core.$strip>>;
411
- adapters: z.ZodArray<z.ZodObject<{
412
- id: z.ZodString;
413
- name: z.ZodString;
414
- description: z.ZodString;
415
- }, z.core.$strip>>;
416
391
  remoteData: z.ZodArray<z.ZodObject<{
417
392
  id: z.ZodUUID;
418
393
  name: z.ZodString;
@@ -608,7 +583,7 @@ export declare interface BepTypes {
608
583
  eventId: string;
609
584
  } & Record<string, unknown>>;
610
585
  resolvers: Record<string, (url: string, ...args: any[]) => unknown>;
611
- adapters: Record<string, (data: unknown) => unknown>;
586
+ env: Record<string, string>;
612
587
  }
613
588
 
614
589
  export declare type BEPVersion = z.infer<typeof BEPVersionSchema>;
@@ -930,11 +905,6 @@ export declare class Engine {
930
905
  * Throws if the remoteDataId does not exist in the BEP or has no resolver assigned.
931
906
  */
932
907
  getRemoteData(remoteDataId: string): Promise<unknown>;
933
- /**
934
- * Runs an adapter to transform data into a lens-compatible format.
935
- * Throws if the adapterId has no registered handler.
936
- */
937
- useAdapter(adapterId: string, data: unknown): unknown;
938
908
  private _assertInit;
939
909
  private _resolveBep;
940
910
  private _fire;
@@ -1002,8 +972,8 @@ export declare type EnvVar = z.infer<typeof EnvVarSchema>;
1002
972
 
1003
973
  export declare const EnvVarSchema: z.ZodObject<{
1004
974
  key: z.ZodString;
1005
- description: z.ZodOptional<z.ZodString>;
1006
- secret: z.ZodOptional<z.ZodBoolean>;
975
+ description: z.ZodString;
976
+ sensitive: z.ZodOptional<z.ZodBoolean>;
1007
977
  }, z.core.$strip>;
1008
978
 
1009
979
  /** Public result returned by Runtime.emit(). */
@@ -2251,20 +2221,17 @@ export declare class Runtime<T extends {
2251
2221
  effects: Record<string, any>;
2252
2222
  automations: Record<string, any>;
2253
2223
  resolvers: Record<string, any>;
2254
- adapters: Record<string, any>;
2224
+ env: Record<string, any>;
2255
2225
  } = BepTypes> {
2256
- protected readonly env: Record<string, string>;
2226
+ protected readonly env: T['env'];
2257
2227
  readonly effects: Record<string, EffectHandler>;
2258
2228
  readonly automations: Record<string, AutomationHandler>;
2259
2229
  readonly resolvers: Record<string, ResolverHandler>;
2260
- readonly adapters: Record<string, AdapterHandler>;
2261
2230
  constructor({ env }?: RuntimeOptions);
2262
2231
  protected effect<K extends keyof T['effects'] & string>(key: K, handler: (instance: WorkflowInstance, ...args: Parameters<T['effects'][K]>) => Promise<void>): this;
2263
2232
  protected automation<K extends keyof T['automations'] & string>(key: K, handler: (instance: WorkflowInstance, ...args: Parameters<T['automations'][K]>) => Promise<ReturnType<T['automations'][K]>>): this;
2264
2233
  protected resolver<K extends keyof T['resolvers'] & string>(key: K, handler: (...args: Parameters<T['resolvers'][K]>) => Promise<ReturnType<T['resolvers'][K]>>): this;
2265
- protected adapter<K extends keyof T['adapters'] & string>(key: K, handler: (...args: Parameters<T['adapters'][K]>) => ReturnType<T['adapters'][K]>): this;
2266
2234
  /* Excluded from this release type: _runResolver */
2267
- /* Excluded from this release type: _runAdapter */
2268
2235
  }
2269
2236
 
2270
2237
  /**