@dougongjs/core 0.0.1

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 (50) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +18 -0
  3. package/dist/application-api.d.ts +51 -0
  4. package/dist/application-api.d.ts.map +1 -0
  5. package/dist/application-runtime.d.ts +36 -0
  6. package/dist/application-runtime.d.ts.map +1 -0
  7. package/dist/application.d.ts +6 -0
  8. package/dist/application.d.ts.map +1 -0
  9. package/dist/change-set.d.ts +51 -0
  10. package/dist/change-set.d.ts.map +1 -0
  11. package/dist/contract-registry.d.ts +19 -0
  12. package/dist/contract-registry.d.ts.map +1 -0
  13. package/dist/contracts.d.ts +30 -0
  14. package/dist/contracts.d.ts.map +1 -0
  15. package/dist/diagnostics.d.ts +35 -0
  16. package/dist/diagnostics.d.ts.map +1 -0
  17. package/dist/errors.d.ts +19 -0
  18. package/dist/errors.d.ts.map +1 -0
  19. package/dist/event-hub.d.ts +10 -0
  20. package/dist/event-hub.d.ts.map +1 -0
  21. package/dist/extension-store.d.ts +46 -0
  22. package/dist/extension-store.d.ts.map +1 -0
  23. package/dist/group-coordinator.d.ts +46 -0
  24. package/dist/group-coordinator.d.ts.map +1 -0
  25. package/dist/group-lifecycle.d.ts +19 -0
  26. package/dist/group-lifecycle.d.ts.map +1 -0
  27. package/dist/group.d.ts +31 -0
  28. package/dist/group.d.ts.map +1 -0
  29. package/dist/index.d.ts +12 -0
  30. package/dist/index.d.ts.map +1 -0
  31. package/dist/index.js +2344 -0
  32. package/dist/lifetime-diagnostics.d.ts +36 -0
  33. package/dist/lifetime-diagnostics.d.ts.map +1 -0
  34. package/dist/lifetime.d.ts +77 -0
  35. package/dist/lifetime.d.ts.map +1 -0
  36. package/dist/plugin-graph.d.ts +17 -0
  37. package/dist/plugin-graph.d.ts.map +1 -0
  38. package/dist/plugin-installation.d.ts +44 -0
  39. package/dist/plugin-installation.d.ts.map +1 -0
  40. package/dist/plugin.d.ts +30 -0
  41. package/dist/plugin.d.ts.map +1 -0
  42. package/dist/readonly-map.d.ts +14 -0
  43. package/dist/readonly-map.d.ts.map +1 -0
  44. package/dist/resource.d.ts +13 -0
  45. package/dist/resource.d.ts.map +1 -0
  46. package/dist/serial-queue.d.ts +7 -0
  47. package/dist/serial-queue.d.ts.map +1 -0
  48. package/dist/snapshot-view.d.ts +15 -0
  49. package/dist/snapshot-view.d.ts.map +1 -0
  50. package/package.json +49 -0
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Dougong contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
package/README.md ADDED
@@ -0,0 +1,18 @@
1
+ # @dougongjs/core
2
+
3
+ 能力组合与结构化生命周期内核。
4
+
5
+ - `Service` 稳定的一对一能力,依赖通过 `requires` 显式声明
6
+ - `Extension` 可动态增减的开放贡献集合
7
+ - `Event` 不保留状态的瞬时事实
8
+ - `Lifetime` 监听、贡献、任务与资源的结构化所有权
9
+ - `Application` / `ChangeSet` 事务化的安装图,失败回滚或 fail closed
10
+
11
+ 不使用 Service Locator、环境作用域、原型链注入或 Proxy。运行时依赖只有 `@standard-schema/spec`。
12
+
13
+ - 文档站:https://tangerg.github.io/dougong/
14
+ - 仓库:https://github.com/Tangerg/dougong
15
+
16
+ > 早期开发阶段(0.0.x),当前不承诺向后兼容。需要 Node.js >= 22 或等价的 ES2024 宿主。
17
+
18
+ MIT
@@ -0,0 +1,51 @@
1
+ import { ApplicationSnapshot, ApplicationStatus } from './diagnostics';
2
+ import { Logger } from './lifetime';
3
+ import { InstallationStatus } from './plugin-installation';
4
+ import { PluginDefinition, Provisions, Requirements } from './plugin';
5
+ import { Service } from './contracts';
6
+ import { SnapshotView } from './snapshot-view';
7
+ export type PluginUpdate<Config, Requires extends Requirements = Requirements, Provides extends Provisions = Provisions, ConfigInput = Config> = {
8
+ readonly plugin: PluginDefinition<Config, Requires, Provides, ConfigInput>;
9
+ readonly config?: ConfigInput;
10
+ } | {
11
+ readonly plugin?: never;
12
+ readonly config: ConfigInput;
13
+ };
14
+ export interface InstallationHandle {
15
+ readonly id: string;
16
+ readonly status: InstallationStatus;
17
+ ready(): Promise<void>;
18
+ remove(): Promise<void>;
19
+ }
20
+ export interface PluginHandle<Config = unknown, Requires extends Requirements = Requirements, Provides extends Provisions = Provisions, ConfigInput = Config> extends InstallationHandle {
21
+ readonly groupId: string;
22
+ update(update: PluginUpdate<Config, Requires, Provides, ConfigInput>): Promise<void>;
23
+ }
24
+ export interface PluginChangeSet {
25
+ install<Config, Requires extends Requirements, Provides extends Provisions, ConfigInput>(plugin: PluginDefinition<Config, Requires, Provides, ConfigInput>, ...config: [ConfigInput] extends [void] ? [config?: ConfigInput] : [config: ConfigInput]): PluginHandle<Config, Requires, Provides, ConfigInput>;
26
+ update<Config, Requires extends Requirements, Provides extends Provisions, ConfigInput>(handle: PluginHandle<Config, Requires, Provides, ConfigInput>, update: PluginUpdate<Config, Requires, Provides, ConfigInput>): this;
27
+ remove<Config, Requires extends Requirements, Provides extends Provisions, ConfigInput>(handle: PluginHandle<Config, Requires, Provides, ConfigInput>): this;
28
+ commit(): Promise<void>;
29
+ }
30
+ export interface CreateAppOptions {
31
+ readonly name?: string;
32
+ readonly logger?: Logger;
33
+ readonly onError?: (error: unknown) => void;
34
+ }
35
+ export interface PluginContainer {
36
+ install<Config, Requires extends Requirements, Provides extends Provisions, ConfigInput>(plugin: PluginDefinition<Config, Requires, Provides, ConfigInput>, ...config: [ConfigInput] extends [void] ? [config?: ConfigInput] : [config: ConfigInput]): PluginHandle<Config, Requires, Provides, ConfigInput>;
37
+ change(): PluginChangeSet;
38
+ group(name: string, configure: (group: PluginGroup) => void): PluginGroup;
39
+ }
40
+ export interface PluginGroup extends PluginContainer, InstallationHandle {
41
+ readonly name: string;
42
+ }
43
+ export interface Application extends PluginContainer {
44
+ readonly name: string;
45
+ readonly status: ApplicationStatus;
46
+ readonly diagnostics: SnapshotView<ApplicationSnapshot>;
47
+ get<T>(token: Service<T>): T;
48
+ start(): Promise<void>;
49
+ stop(): Promise<void>;
50
+ }
51
+ //# sourceMappingURL=application-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application-api.d.ts","sourceRoot":"","sources":["../src/application-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC3E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,MAAM,M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AQ,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;IACzD,MAAM,IAAI,eAAe,CAAC;IAC1B,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,GAAG,WAAW,CAAC;CAC3E;AAED,MAAM,WAAW,WAAY,SAAQ,eAAe,EAAE,kBAAkB;IACtE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,WAAY,SAAQ,eAAe;IAClD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,WAAW,EAAE,YAAY,CAAC,mBAAmB,CAAC,CAAC;IACxD,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAC7B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB"}
@@ -0,0 +1,36 @@
1
+ import { Service } from './contracts';
2
+ import { Logger } from './lifetime';
3
+ import { PluginGraph } from './plugin-graph';
4
+ import { PluginInstallation } from './plugin-installation';
5
+ export type RuntimeChangeOutcome = {
6
+ readonly kind: "committed";
7
+ readonly affected: ReadonlySet<PluginInstallation>;
8
+ } | {
9
+ readonly kind: "rolled-back";
10
+ readonly affected: ReadonlySet<PluginInstallation>;
11
+ readonly error: unknown;
12
+ };
13
+ interface ApplicationRuntimeOptions {
14
+ readonly applicationName: string;
15
+ readonly logger: Logger;
16
+ readonly isInstalled: (installationId: string) => boolean;
17
+ readonly report: (error: unknown) => void;
18
+ }
19
+ type ServiceAvailability = "available" | "unavailable";
20
+ /**
21
+ * Owns the committed plugin runtime: contracts, services, events, extensions,
22
+ * Lifetimes and graph transitions. The Application owns declarations and
23
+ * command serialization; neither side duplicates the other's state.
24
+ */
25
+ export declare class ApplicationRuntime {
26
+ #private;
27
+ constructor(options: ApplicationRuntimeOptions);
28
+ get hasCommittedPlan(): boolean;
29
+ get<T>(token: Service<T>, availability: ServiceAvailability): T;
30
+ buildPlan(installations: Iterable<PluginInstallation>): PluginGraph;
31
+ start(plan: PluginGraph): Promise<void>;
32
+ stop(): Promise<unknown[]>;
33
+ transition(nextPlan: PluginGraph, changed: ReadonlySet<PluginInstallation>, restoreDeclarations: () => void): Promise<RuntimeChangeOutcome>;
34
+ }
35
+ export {};
36
+ //# sourceMappingURL=application-runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application-runtime.d.ts","sourceRoot":"","sources":["../src/application-runtime.ts"],"names":[],"mappings":"AAEA,OAAO,EAA8C,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAIvF,OAAO,EAA+B,KAAK,MAAM,EAAmB,MAAM,YAAY,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAkB,KAAK,kBAAkB,EAAsB,MAAM,uBAAuB,CAAC;AAIpG,MAAM,MAAM,oBAAoB,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAA;CAAE,GAClF;IACE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAC;IACnD,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB,CAAC;AAQN,UAAU,yBAAyB;IACjC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,OAAO,CAAC;IAC1D,QAAQ,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CAC3C;AAED,KAAK,mBAAmB,GAAG,WAAW,GAAG,aAAa,CAAC;AAIvD;;;;GAIG;AACH,qBAAa,kBAAkB;;gBAajB,OAAO,EAAE,yBAAyB;IAQ9C,IAAI,gBAAgB,YAEnB;IAED,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,mBAAmB,GAAG,CAAC;IAc/D,SAAS,CAAC,aAAa,EAAE,QAAQ,CAAC,kBAAkB,CAAC;IAI/C,KAAK,CAAC,IAAI,EAAE,WAAW;IAYvB,IAAI;IAQJ,UAAU,CACd,QAAQ,EAAE,WAAW,EACrB,OAAO,EAAE,WAAW,CAAC,kBAAkB,CAAC,EACxC,mBAAmB,EAAE,MAAM,IAAI,GAC9B,OAAO,CAAC,oBAAoB,CAAC;CA8ajC"}
@@ -0,0 +1,6 @@
1
+ import { Application, CreateAppOptions } from './application-api';
2
+ export type { InstallationStatus } from './plugin-installation';
3
+ export type { ApplicationSnapshot, ApplicationStatus, GroupSnapshot, PluginSnapshot, } from './diagnostics';
4
+ export type { Application, CreateAppOptions, InstallationHandle, PluginChangeSet, PluginContainer, PluginGroup, PluginHandle, PluginUpdate, } from './application-api';
5
+ export declare function createApp(options?: CreateAppOptions): Application;
6
+ //# sourceMappingURL=application.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../src/application.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,gBAAgB,EAKjB,MAAM,mBAAmB,CAAC;AAuB3B,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,YAAY,EACV,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,cAAc,GACf,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,WAAW,EACX,YAAY,EACZ,YAAY,GACb,MAAM,mBAAmB,CAAC;AAid3B,wBAAgB,SAAS,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,WAAW,CAEjE"}
@@ -0,0 +1,51 @@
1
+ import { PluginChangeSet, PluginHandle, PluginUpdate } from './application-api';
2
+ import { AnyPlugin, PluginInstallation } from './plugin-installation';
3
+ import { PluginDefinition, Provisions, Requirements } from './plugin';
4
+ type PluginDeclarationUpdate = {
5
+ readonly kind: "plugin";
6
+ readonly plugin: AnyPlugin;
7
+ } | {
8
+ readonly kind: "config";
9
+ readonly config: unknown;
10
+ } | {
11
+ readonly kind: "plugin-and-config";
12
+ readonly plugin: AnyPlugin;
13
+ readonly config: unknown;
14
+ };
15
+ export type PluginChangeOperation = {
16
+ readonly kind: "install";
17
+ readonly installation: PluginInstallation;
18
+ } | {
19
+ readonly kind: "update";
20
+ readonly installation: PluginInstallation;
21
+ readonly declaration: PluginDeclarationUpdate;
22
+ } | {
23
+ readonly kind: "remove";
24
+ readonly installation: PluginInstallation;
25
+ };
26
+ interface PluginChangeHost {
27
+ create(plugin: AnyPlugin, config: unknown): {
28
+ readonly installation: PluginInstallation;
29
+ readonly handle: object;
30
+ };
31
+ resolve(handle: object): PluginInstallation;
32
+ execute(operations: ReadonlyArray<PluginChangeOperation>): Promise<void>;
33
+ attach(installation: PluginInstallation): void;
34
+ discard(installation: PluginInstallation, error: unknown): void;
35
+ }
36
+ export declare function discardPluginChangeSetDraft(draft: PluginChangeSetDraft, error: unknown): void;
37
+ /**
38
+ * Rich one-shot draft for the canonical mutation path. It owns target
39
+ * uniqueness, handle authority, sealing and commit idempotency before the
40
+ * application ever sees a candidate graph.
41
+ */
42
+ export declare class PluginChangeSetDraft implements PluginChangeSet {
43
+ #private;
44
+ constructor(host: PluginChangeHost);
45
+ install<Config, Requires extends Requirements, Provides extends Provisions, ConfigInput>(plugin: PluginDefinition<Config, Requires, Provides, ConfigInput>, ...config: [ConfigInput] extends [void] ? [config?: ConfigInput] : [config: ConfigInput]): PluginHandle<Config, Requires, Provides, ConfigInput>;
46
+ update<Config, Requires extends Requirements, Provides extends Provisions, ConfigInput>(handle: PluginHandle<Config, Requires, Provides, ConfigInput>, update: PluginUpdate<Config, Requires, Provides, ConfigInput>): this;
47
+ remove<Config, Requires extends Requirements, Provides extends Provisions, ConfigInput>(handle: PluginHandle<Config, Requires, Provides, ConfigInput>): this;
48
+ commit(): Promise<void>;
49
+ }
50
+ export {};
51
+ //# sourceMappingURL=change-set.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"change-set.d.ts","sourceRoot":"","sources":["../src/change-set.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACrF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAgB,KAAK,gBAAgB,EAAE,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAEnG,KAAK,uBAAuB,GACxB;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;CAAE,GACvD;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GACrD;IACE,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEN,MAAM,MAAM,qBAAqB,GAC7B;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,YAAY,EAAE,kBAAkB,CAAA;CAAE,GACvE;IACE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ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CAAC,MAAM,EAAE,QAAQ,SAAS,YAAY,EAAE,QAAQ,SAAS,UAAU,EAAE,WAAW,EACpF,MAAM,EAAE,YAAY,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,CAAC,EAC7D,MAAM,EAAE,YAAY,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,CAAC;IAgC/D,MAAM,CAAC,MAAM,EAAE,QAAQ,SAAS,YAAY,EAAE,QAAQ,SAAS,UAAU,EAAE,WAAW,EACpF,MAAM,EAAE,YAAY,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,CAAC;IAO/D,MAAM;CAwEP"}
@@ -0,0 +1,19 @@
1
+ import { ContractIdentity, ContractKind } from './contracts';
2
+ /** Application-wide identity registry with an explicit draft commit boundary. */
3
+ export declare class ContractRegistry {
4
+ #private;
5
+ get kinds(): ReadonlyMap<string, ContractKind>;
6
+ assertCompatible(contract: ContractIdentity): void;
7
+ remember(contract: ContractIdentity): void;
8
+ draft(candidateKinds: ReadonlyMap<string, ContractKind>): ContractRegistryDraft;
9
+ commit(kinds: ReadonlyMap<string, ContractKind>): void;
10
+ }
11
+ export declare class ContractRegistryDraft {
12
+ #private;
13
+ constructor(registry: ContractRegistry, candidateKinds: ReadonlyMap<string, ContractKind>);
14
+ remember(contract: ContractIdentity): void;
15
+ commit(): void;
16
+ discard(): void;
17
+ }
18
+ export declare function rememberContractKind(kinds: Map<string, ContractKind>, contract: ContractIdentity): void;
19
+ //# sourceMappingURL=contract-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract-registry.d.ts","sourceRoot":"","sources":["../src/contract-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGlE,iFAAiF;AACjF,qBAAa,gBAAgB;;IAG3B,IAAI,KAAK,IAAI,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC,CAE7C;IAED,gBAAgB,CAAC,QAAQ,EAAE,gBAAgB;IAI3C,QAAQ,CAAC,QAAQ,EAAE,gBAAgB;IAInC,KAAK,CAAC,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC;IAIvD,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC;CAIhD;AAYD,qBAAa,qBAAqB;;gBAGpB,QAAQ,EAAE,gBAAgB,EAAE,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC;IAKzF,QAAQ,CAAC,QAAQ,EAAE,gBAAgB;IAenC,MAAM;IAON,OAAO;CAGR;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,QAAQ,EAAE,gBAAgB,QAGhG"}
@@ -0,0 +1,30 @@
1
+ declare const contractType: unique symbol;
2
+ export type ContractKind = "service" | "extension" | "event";
3
+ export interface ContractIdentity {
4
+ readonly id: string;
5
+ readonly kind: ContractKind;
6
+ }
7
+ interface Contract<T, K extends ContractKind> extends ContractIdentity {
8
+ readonly kind: K;
9
+ readonly [contractType]?: T;
10
+ }
11
+ export interface Service<T> extends Contract<T, "service"> {
12
+ }
13
+ export interface Extension<T> extends Contract<T, "extension"> {
14
+ }
15
+ export interface Event<T> extends Contract<T, "event"> {
16
+ }
17
+ export interface OptionalService<T> {
18
+ readonly kind: "optional";
19
+ readonly service: Service<T>;
20
+ }
21
+ export type Requirement<T = unknown> = Service<T> | Extension<T> | OptionalService<T>;
22
+ export type ContractValue<T> = T extends Contract<infer Value, ContractKind> ? Value : never;
23
+ export declare function isContract(value: unknown, expected?: ContractKind): value is ContractIdentity;
24
+ export declare function assertContract(value: unknown, expected?: ContractKind): asserts value is ContractIdentity;
25
+ export declare function service<T>(id: string): Service<T>;
26
+ export declare function event<T>(id: string): Event<T>;
27
+ export declare function extension<T>(id: string): Extension<T>;
28
+ export declare function optional<T>(token: Service<T>):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AAC,GAAG,KAAK,GAAG,KAAK,CAAC;AAgB7F,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,YAAY,GAAG,KAAK,IAAI,gBAAgB,CAY7F;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,OAAO,EACd,QAAQ,CAAC,EAAE,YAAY,GACtB,OAAO,CAAC,KAAK,IAAI,gBAAgB,CAGnC;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAEjD;AAED,wBAAgB,KAAK,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAE7C;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,CAErD;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAKjE"}
@@ -0,0 +1,35 @@
1
+ import { GroupNode } from './group';
2
+ import { LifetimeSnapshot } from './lifetime';
3
+ import { PluginInstallation, InstallationStatus } from './plugin-installation';
4
+ import { SnapshotView } from './snapshot-view';
5
+ export type ApplicationStatus = "idle" | "starting" | "active" | "changing" | "stopping";
6
+ export interface PluginSnapshot {
7
+ readonly id: string;
8
+ readonly name: string;
9
+ readonly groupId: string;
10
+ readonly status: InstallationStatus;
11
+ readonly requires: ReadonlyArray<string>;
12
+ readonly provides: ReadonlyArray<string>;
13
+ readonly lifetime?: SnapshotView<LifetimeSnapshot>;
14
+ readonly error?: unknown;
15
+ }
16
+ export interface GroupSnapshot {
17
+ readonly id: string;
18
+ readonly name: string;
19
+ readonly parentId?: string;
20
+ }
21
+ export interface ApplicationSnapshot {
22
+ readonly name: string;
23
+ readonly status: ApplicationStatus;
24
+ readonly revision: number;
25
+ readonly plugins: ReadonlyMap<string, PluginSnapshot>;
26
+ readonly groups: ReadonlyMap<string, GroupSnapshot>;
27
+ }
28
+ /** Immutable operational read model; never a service locator or control plane. */
29
+ export declare class ApplicationDiagnostics {
30
+ #private;
31
+ readonly view: SnapshotView<ApplicationSnapshot>;
32
+ constructor(name: string, groups: Iterable<GroupNode>, report: (error: unknown) => void);
33
+ publish(status: ApplicationStatus, installations: Iterable<PluginInstallation>, groups: Iterable<GroupNode>): void;
34
+ }
35
+ //# sourceMappingURL=diagnostics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../src/diagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEpF,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEvE,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,CAAC;AAEzF,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACzC,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACzC,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC,gBAAgB,CAAC,CAAC;IACnD,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IACtD,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;CACrD;AAED,kFAAkF;AAClF,qBAAa,sBAAsB;;IAMjC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC,mBAAmB,CAAC,CAAC;gBAErC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI;IAOvF,OAAO,CACL,MAAM,EAAE,iBAAiB,EACzB,aAAa,EAAE,QAAQ,CAAC,kBAAkB,CAAC,EAC3C,MAAM,EAAE,QAAQ,CAAC,SAAS,CAAC;CAqD9B"}
@@ -0,0 +1,19 @@
1
+ export declare class DougongError extends Error {
2
+ readonly code: string;
3
+ name: string;
4
+ constructor(code: string, message: string, options?: ErrorOptions);
5
+ }
6
+ /** Preserves Error values and classifies non-Error rejection reasons. */
7
+ export declare function normalizeFailure(error: unknown, code: string, message: string): Error;
8
+ export interface ValidationIssue {
9
+ readonly message: string;
10
+ readonly path?: ReadonlyArray<PropertyKey | {
11
+ readonly key: PropertyKey;
12
+ }>;
13
+ }
14
+ export declare class ConfigValidationError extends DougongError {
15
+ name: string;
16
+ readonly issues: ReadonlyArray<ValidationIssue>;
17
+ constructor(issues: ReadonlyArray<ValidationIssue>);
18
+ }
19
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,YAAa,SAAQ,KAAK;aAInB,IAAI,EAAE,MAAM;IAHrB,IAAI,SAAkB;gBAGb,IAAI,EAAE,MAAM,EAC5B,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,YAAY;CAIzB;AAED,yEAAyE;AACzE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,CAErF;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,CAAC,WAAW,GAAG;QAAE,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAA;KAAE,CAAC,CAAC;CAC5E;AAED,qBAAa,qBAAsB,SAAQ,YAAY;IAC5C,IAAI,SAA2B;IACxC,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;gBAEpC,MAAM,EAAE,aAAa,CAAC,eAAe,CAAC;CAyBnD"}
@@ -0,0 +1,10 @@
1
+ import { Disposable, Publication, StagedResource } from './resource';
2
+ export type EventListener<T> = (payload: T) => unknown;
3
+ export declare class EventHub {
4
+ #private;
5
+ stage<T>(eventId: string, listener: EventListener<T>, release: (publication: Publication) => void): StagedResource<Disposable>;
6
+ add<T>(eventId: string, listener: EventListener<T>): void;
7
+ delete<T>(eventId: string, listener: EventListener<T>): void;
8
+ emit<T>(eventId: string, payload: T): Promise<void>;
9
+ }
10
+ //# sourceMappingURL=event-hub.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-hub.d.ts","sourceRoot":"","sources":["../src/event-hub.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE1E,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,OAAO,CAAC;AAqEvD,qBAAa,QAAQ;;IAGnB,KAAK,CAAC,CAAC,EACL,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,EAC1B,OAAO,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,IAAI,GAC1C,cAAc,CAAC,UAAU,CAAC;IAK7B,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC;IAMlD,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC;IAO/C,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;CAa1C"}
@@ -0,0 +1,46 @@
1
+ import { Extension } from './contracts';
2
+ import { Disposable, Publication, StagedResource } from './resource';
3
+ import { SnapshotView } from './snapshot-view';
4
+ export interface Contribution<T> extends Disposable {
5
+ update(value: T): void;
6
+ }
7
+ export type ExtensionView<T> = SnapshotView<ReadonlyMap<string, T>>;
8
+ export type ExtensionLeaseKind = "view" | "subscription";
9
+ declare class ContributionRecord<T> implements StagedResource<Contribution<T>> {
10
+ #private;
11
+ readonly handle: Contribution<T>;
12
+ constructor(store: ExtensionStore<T>, id: string, initialValue: T, detachFromOwner: (publication: Publication) => void);
13
+ publish(): void;
14
+ update(value: T): void;
15
+ dispose(): void;
16
+ [Symbol.dispose](): void;
17
+ }
18
+ export declare class ExtensionStore<T> {
19
+ #private;
20
+ constructor(invalidate: (store: ExtensionStore<unknown>) => void, report: (error: unknown) => void, releaseIfUnused: (store: ExtensionStore<unknown>) => void);
21
+ stage(ownerId: string, key: string, value: T, release: (publication: Publication) => void): ContributionRecord<T>;
22
+ view(own: (resource: Disposable, kind: ExtensionLeaseKind) => () => void): ExtensionView<T>;
23
+ snapshot(): ReadonlyMap<string, T>;
24
+ subscribe(listener: () => void, own: (resource: Disposable, kind: ExtensionLeaseKind) => () => void): ExtensionSubscription<T>;
25
+ insert(id: string, contribution: ContributionRecord<T>, value: T): void;
26
+ update(id: string, contribution: ContributionRecord<T>, value: T): void;
27
+ removeContribution(id: string, contribution: ContributionRecord<T>, visibility: "staged" | "published"): void;
28
+ publishSnapshot(): void;
29
+ removeListener(listener: () => void): void;
30
+ }
31
+ declare class ExtensionSubscription<T> implements Disposable {
32
+ #private;
33
+ constructor(store: ExtensionStore<T>, listener: () => void, release: () => void);
34
+ dispose(): void;
35
+ [Symbol.dispose](): void;
36
+ }
37
+ export declare class ExtensionRegistry {
38
+ #private;
39
+ constructor(report: (error: unknown) => void);
40
+ get<T>(token: Extension<T>): ExtensionStore<T>;
41
+ beginBatch(): void;
42
+ endBatch(): void;
43
+ }
44
+ export type ExtensionRequirementView<T> = T extends Extension<infer Value> ? ExtensionView<Value> : never;
45
+ export {};
46
+ //# sourceMappingURL=extension-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extension-store.d.ts","sourceRoot":"","sources":["../src/extension-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,MAAM,WAAW,YAAY,CAAC,CAAC,CAAE,SAAQ,UAAU;IACjD,MAAM,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,YAAY,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;AAEpE,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,cAAc,CAAC;AAwEzD,cAAM,kBAAkB,CA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AAC,CAAC,EAAE,KAAK,EAAE,CAAC;IAOhE,kBAAkB,CAChB,EAAE,EAAE,MAAM,EACV,YAAY,EAAE,kBAAkB,CAAC,CAAC,CAAC,EACnC,UAAU,EAAE,QAAQ,GAAG,WAAW;IAUpC,eAAe;IAiBf,cAAc,CAAC,QAAQ,EAAE,MAAM,IAAI;CASpC;AA4BD,cAAM,qBAAqB,CAAC,CAAC,CAAE,YAAW,UAAU;;gBAStC,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,IAAI,EAAE,OAAO,EAAE,MAAM,IAAI;IAK/E,OAAO;IAWP,CAAC,MAAM,CAAC,OAAO,CAAC;CAGjB;AAED,qBAAa,iBAAiB;;gBAMhB,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI;IAI5C,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC;IAgB9C,UAAU;IAIV,QAAQ;CAeT;AAmBD,MAAM,MAAM,wBAAwB,CAAC,CAAC,IACpC,CAAC,SAAS,SAAS,CAAC,MAAM,KAAK,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { PluginGroup, PluginHandle } from './application-api';
2
+ import { PluginChangeSetDraft, PluginChangeOperation } from './change-set';
3
+ import { GroupConfigurationSession, GroupNode } from './group';
4
+ import { AnyPlugin, InstallationStatus, PluginInstallation } from './plugin-installation';
5
+ import { PluginDefinition, Provisions, Requirements } from './plugin';
6
+ export interface GroupCoordinatorHost {
7
+ installations(): Iterable<PluginInstallation>;
8
+ createDraft(group: GroupNode, plugin: AnyPlugin, config: unknown): {
9
+ readonly installation: PluginInstallation;
10
+ readonly handle: object;
11
+ };
12
+ resolveHandle(handle: object): PluginInstallation;
13
+ executeChanges(operations: ReadonlyArray<PluginChangeOperation>): Promise<void>;
14
+ attachInstallation(installation: PluginInstallation): void;
15
+ discardInstallation(installation: PluginInstallation, error: unknown): void;
16
+ runExclusive(operation: () => Promise<void>): Promise<void>;
17
+ removeInstallations(operations: ReadonlyArray<PluginChangeOperation>): Promise<void>;
18
+ notifyChanged(): void;
19
+ }
20
+ declare class PluginGroupImpl implements PluginGroup {
21
+ #private;
22
+ constructor(coordinator: GroupCoordinator, node: GroupNode, configuration?: GroupConfigurationSession<PluginChangeSetDraft>);
23
+ get id(): string;
24
+ get name(): string;
25
+ get status(): InstallationStatus;
26
+ ready(): Promise<void>;
27
+ install<Config, Requires extends Requirements, Provides extends Provisions, ConfigInput>(plugin: PluginDefinition<Config, Requires, Provides, ConfigInput>, ...config: [ConfigInput] extends [void] ? [config?: ConfigInput] : [config: ConfigInput]): PluginHandle<Config, Requires, Provides, ConfigInput>;
28
+ change(): PluginChangeSetDraft;
29
+ group(name: string, configure: (group: PluginGroup) => void): PluginGroupImpl;
30
+ remove(): Promise<void>;
31
+ }
32
+ /** Owns the complete structural Group model and compiles it to plugin changes. */
33
+ export declare class GroupCoordinator {
34
+ #private;
35
+ readonly root: GroupNode;
36
+ constructor(rootName: string, host: GroupCoordinatorHost);
37
+ nodes(): GroupNode[];
38
+ install<Config, Requires extends Requirements, Provides extends Provisions, ConfigInput>(group: GroupNode, plugin: PluginDefinition<Config, Requires, Provides, ConfigInput>, ...config: [ConfigInput] extends [void] ? [config?: ConfigInput] : [config: ConfigInput]): PluginHandle<Config, Requires, Provides, ConfigInput>;
39
+ change(group: GroupNode, tracking?: "immediate" | "deferred"): PluginChangeSetDraft;
40
+ create(parent: GroupNode, name: string, configure: (group: PluginGroup) => void, inherited?: GroupConfigurationSession<PluginChangeSetDraft>): PluginGroupImpl;
41
+ ready(group: GroupNode): Promise<void>;
42
+ status(group: GroupNode): InstallationStatus;
43
+ remove(group: GroupNode): Promise<void>;
44
+ }
45
+ export {};
46
+ //# sourceMappingURL=group-coordinator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"group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AE,SAAS,EAAE,QAAQ,GAAE,WAAW,GAAG,UAAwB;IAwBzE,MAAM,CACJ,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,EACvC,SAAS,CAAC,EAAE,yBAAyB,CAAC,oBAAoB,CAAC;IAmDvD,KAAK,CAAC,KAAK,EAAE,SAAS;IAM5B,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,kBAAkB;IAK5C,MAAM,CAAC,KAAK,EAAE,SAAS;CAiExB"}
@@ -0,0 +1,19 @@
1
+ import { DougongError } from './errors';
2
+ import { GroupNode } from './group';
3
+ import { InstallationStatus } from './plugin-installation';
4
+ /**
5
+ * Owns the readiness barrier for one structural Group node. A failed mutation
6
+ * cannot poison an established Group because transactions expose only the
7
+ * restored committed state.
8
+ */
9
+ export declare class GroupLifecycle {
10
+ #private;
11
+ readonly node: GroupNode;
12
+ constructor(node: GroupNode, initialState: "new" | "established", notifyChanged: () => void);
13
+ status(contents: InstallationStatus): InstallationStatus;
14
+ ready(readyContents: () => Promise<void>): Promise<void>;
15
+ track(operation: Promise<void>): void;
16
+ release(): void;
17
+ }
18
+ export declare function groupRemovedError(group: GroupNode): DougongError;
19
+ //# sourceMappingURL=group-lifecycle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"group-lifecycle.d.ts","sourceRoot":"","sources":["../src/group-lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAoB,MAAM,UAAU,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE;;;;GAIG;AACH,qBAAa,cAAc;;IAKvB,QAAQ,CAAC,IAAI,EAAE,SAAS;gBAAf,IAAI,EAAE,SAAS,EACxB,YAAY,EAAE,KAAK,GAAG,aAAa,EACnC,aAAa,EAAE,MAAM,IAAI;IAM3B,MAAM,CAAC,QAAQ,EAAE,kBAAkB,GAAG,kBAAkB;IAQlD,KAAK,CAAC,aAAa,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC;IAU9C,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC;IAwC9B,OAAO;CASR;AAaD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,gBAEjD"}
@@ -0,0 +1,31 @@
1
+ /** One explicit transaction shared by every nested Group configure callback. */
2
+ export declare class GroupConfigurationSession<Draft> {
3
+ #private;
4
+ constructor(draft: Draft, discard: (draft: Draft, error: unknown) => void, normalize: (error: unknown) => Error);
5
+ get failure(): Error | undefined;
6
+ requireDraft(): Draft;
7
+ assertOpen(): void;
8
+ fail(error: unknown): Error;
9
+ seal(): Draft;
10
+ discard(error: unknown): void;
11
+ }
12
+ /**
13
+ * A Group is an ownership tree over installations, never a capability scope.
14
+ * Service resolution and Extension/Event visibility remain application-wide.
15
+ */
16
+ export declare class GroupNode {
17
+ #private;
18
+ readonly id: string;
19
+ readonly name: string;
20
+ private constructor();
21
+ static root(name: string): GroupNode;
22
+ get attached(): boolean;
23
+ get children(): ReadonlyArray<GroupNode>;
24
+ get parent(): GroupNode | undefined;
25
+ create(name: string): GroupNode;
26
+ containsId(candidateId: string): boolean;
27
+ assertAttached(): void;
28
+ detach(): void;
29
+ walk(): GroupNode[];
30
+ }
31
+ //# sourceMappingURL=group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../src/group.ts"],"names":[],"mappings":"AAeA,gFAAgF;AAChF,qBAAa,yBAAyB,CAAC,KAAK;;gBAIxC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,EAC/C,SAAS,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,KAAK;IAKtC,IAAI,OAAO,sBAEV;IAED,YAAY;IAOZ,UAAU;IAIV,IAAI,CAAC,KAAK,EAAE,OAAO;IAcnB,IAAI;IAQJ,OAAO,CAAC,KAAK,EAAE,OAAO;CAOvB;AAUD;;;GAGG;AACH,qBAAa,SAAS;;IAKlB,QAAQ,CAAC,EAAE,EAAE,MAAM;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM;IAFvB,OAAO;IAQP,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM;IAIxB,IAAI,QAAQ,YAEX;IAED,IAAI,QAAQ,IAAI,aAAa,CAAC,SAAS,CAAC,CAEvC;IAED,IAAI,MAAM,IAAI,SAAS,GAAG,SAAS,CAGlC;IAED,MAAM,CAAC,IAAI,EAAE,MAAM;IAWnB,UAAU,CAAC,WAAW,EAAE,MAAM;IAM9B,cAAc;IAMd,MAAM;IASN,IAAI;CAYL"}
@@ -0,0 +1,12 @@
1
+ export { event, extension, optional, service, type ContractKind, type ContractValue, type Event, type Extension, type OptionalService, type Requirement, type Service, } from './contracts';
2
+ export { createApp, type Application, type ApplicationSnapshot, type ApplicationStatus, type CreateAppOptions, type GroupSnapshot, type InstallationHandle, type PluginChangeSet, type PluginContainer, type PluginGroup, type PluginHandle, type PluginSnapshot, type InstallationStatus, type PluginUpdate, } from './application';
3
+ export { definePlugin, type Awaitable, type PluginContext, type PluginDefinition, type ProvidedServices, type Provisions, type Requirements, type ResolvedRequirement, type ResolvedRequirements, } from './plugin';
4
+ export { type BackgroundTask, type Cleanup, type LifetimeContext, type LifetimeOperations, type LifetimePhase, type LifetimeSnapshot, type Logger, type PluginMeta, type Task, } from './lifetime';
5
+ export type { Contribution, ExtensionView } from './extension-store';
6
+ export type { EventListener } from './event-hub';
7
+ export { ConfigValidationError, DougongError } from './errors';
8
+ export type { Disposable } from './resource';
9
+ export { ReadonlyMapSnapshot } from './readonly-map';
10
+ export { SerialQueue } from './serial-queue';
11
+ export { SnapshotPublisher, type SnapshotView } from './snapshot-view';
12
+ //# sourceMappingURL=index.d.ts.map
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