@objectstack/objectql 7.2.0 → 7.3.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.mts CHANGED
@@ -138,6 +138,21 @@ declare class SchemaRegistry {
138
138
  private namespaceRegistry;
139
139
  /** Type → Name/ID → MetadataItem */
140
140
  private metadata;
141
+ /**
142
+ * Package ids that must be installed in a DISABLED state. Seeded once at
143
+ * boot (from persisted state) BEFORE any package registration so that every
144
+ * registration path — boot artifact, marketplace rehydrate, local import —
145
+ * honors persisted disable state uniformly without a fragile post-boot
146
+ * re-application hook. See {@link setInitialDisabledPackageIds} and
147
+ * {@link installPackage}.
148
+ */
149
+ private initialDisabledPackageIds;
150
+ /**
151
+ * Seed the set of package ids that should be installed disabled. Call this
152
+ * before package registration begins; later `installPackage` calls for these
153
+ * ids land in the `disabled` state. Replaces any previously seeded set.
154
+ */
155
+ setInitialDisabledPackageIds(ids: Iterable<string>): void;
141
156
  /**
142
157
  * Register a namespace for a package.
143
158
  * Multiple packages can share the same namespace (e.g. 'sys').
@@ -226,6 +241,11 @@ declare class SchemaRegistry {
226
241
  * Universal List Method
227
242
  */
228
243
  listItems<T>(type: string, packageId?: string): T[];
244
+ /**
245
+ * Whether a package has been explicitly disabled. Unknown packages and
246
+ * items with no owning package are treated as enabled.
247
+ */
248
+ isPackageDisabled(packageId?: string): boolean;
229
249
  /**
230
250
  * Get all registered metadata types (Kinds)
231
251
  */
@@ -536,6 +556,7 @@ declare class ObjectStackProtocolImplementation implements ObjectStackProtocol {
536
556
  */
537
557
  stats: Record<string, {
538
558
  count: number;
559
+ locked: number;
539
560
  packages: string[];
540
561
  }>;
541
562
  }>;
@@ -564,6 +585,7 @@ declare class ObjectStackProtocolImplementation implements ObjectStackProtocol {
564
585
  packageVersion?: string | undefined;
565
586
  packageId?: string | undefined;
566
587
  provenance?: "package" | "env-forced" | "org" | undefined;
588
+ lockDocsUrl?: string | undefined;
567
589
  lockSource?: "artifact" | "package" | "env-forced" | undefined;
568
590
  lockReason?: string | undefined;
569
591
  type: string;
@@ -609,6 +631,7 @@ declare class ObjectStackProtocolImplementation implements ObjectStackProtocol {
609
631
  lock: MetadataLock;
610
632
  lockReason?: string;
611
633
  lockSource?: 'artifact' | 'package' | 'env-forced' | 'overlay';
634
+ lockDocsUrl?: string;
612
635
  provenance?: MetadataProvenance;
613
636
  packageId?: string;
614
637
  packageVersion?: string;
@@ -865,7 +888,7 @@ declare class ObjectStackProtocolImplementation implements ObjectStackProtocol {
865
888
  */
866
889
  private static readonly OVERLAY_ALLOWED_TYPES;
867
890
  /**
868
- * Phase 3a-env-writable: parse `OBJECTSTACK_METADATA_WRITABLE` once.
891
+ * Phase 3a-env-writable: parse `OS_METADATA_WRITABLE` once.
869
892
  * Comma-separated singular type names. When the env var is set, the
870
893
  * listed types get treated as `allowOrgOverride: true` regardless of
871
894
  * their static registry entry. This is the runtime escape hatch admins
@@ -974,6 +997,7 @@ declare class ObjectStackProtocolImplementation implements ObjectStackProtocol {
974
997
  actor?: string;
975
998
  force?: boolean;
976
999
  mode?: 'draft' | 'publish';
1000
+ packageId?: string | null;
977
1001
  }): Promise<{
978
1002
  success: boolean;
979
1003
  version: string;
@@ -1346,7 +1370,7 @@ declare class SysMetadataRepository implements MetadataRepository {
1346
1370
  * at `(type, name)`. In that case we accept types with
1347
1371
  * `allowRuntimeCreate: true`, even when `allowOrgOverride` is false.
1348
1372
  *
1349
- * The env-var escape hatch (`OBJECTSTACK_METADATA_WRITABLE`) still
1373
+ * The env-var escape hatch (`OS_METADATA_WRITABLE`) still
1350
1374
  * applies to BOTH intents, so operators can opt into artifact
1351
1375
  * overrides at runtime for emergency fixes.
1352
1376
  */
package/dist/index.d.ts CHANGED
@@ -138,6 +138,21 @@ declare class SchemaRegistry {
138
138
  private namespaceRegistry;
139
139
  /** Type → Name/ID → MetadataItem */
140
140
  private metadata;
141
+ /**
142
+ * Package ids that must be installed in a DISABLED state. Seeded once at
143
+ * boot (from persisted state) BEFORE any package registration so that every
144
+ * registration path — boot artifact, marketplace rehydrate, local import —
145
+ * honors persisted disable state uniformly without a fragile post-boot
146
+ * re-application hook. See {@link setInitialDisabledPackageIds} and
147
+ * {@link installPackage}.
148
+ */
149
+ private initialDisabledPackageIds;
150
+ /**
151
+ * Seed the set of package ids that should be installed disabled. Call this
152
+ * before package registration begins; later `installPackage` calls for these
153
+ * ids land in the `disabled` state. Replaces any previously seeded set.
154
+ */
155
+ setInitialDisabledPackageIds(ids: Iterable<string>): void;
141
156
  /**
142
157
  * Register a namespace for a package.
143
158
  * Multiple packages can share the same namespace (e.g. 'sys').
@@ -226,6 +241,11 @@ declare class SchemaRegistry {
226
241
  * Universal List Method
227
242
  */
228
243
  listItems<T>(type: string, packageId?: string): T[];
244
+ /**
245
+ * Whether a package has been explicitly disabled. Unknown packages and
246
+ * items with no owning package are treated as enabled.
247
+ */
248
+ isPackageDisabled(packageId?: string): boolean;
229
249
  /**
230
250
  * Get all registered metadata types (Kinds)
231
251
  */
@@ -536,6 +556,7 @@ declare class ObjectStackProtocolImplementation implements ObjectStackProtocol {
536
556
  */
537
557
  stats: Record<string, {
538
558
  count: number;
559
+ locked: number;
539
560
  packages: string[];
540
561
  }>;
541
562
  }>;
@@ -564,6 +585,7 @@ declare class ObjectStackProtocolImplementation implements ObjectStackProtocol {
564
585
  packageVersion?: string | undefined;
565
586
  packageId?: string | undefined;
566
587
  provenance?: "package" | "env-forced" | "org" | undefined;
588
+ lockDocsUrl?: string | undefined;
567
589
  lockSource?: "artifact" | "package" | "env-forced" | undefined;
568
590
  lockReason?: string | undefined;
569
591
  type: string;
@@ -609,6 +631,7 @@ declare class ObjectStackProtocolImplementation implements ObjectStackProtocol {
609
631
  lock: MetadataLock;
610
632
  lockReason?: string;
611
633
  lockSource?: 'artifact' | 'package' | 'env-forced' | 'overlay';
634
+ lockDocsUrl?: string;
612
635
  provenance?: MetadataProvenance;
613
636
  packageId?: string;
614
637
  packageVersion?: string;
@@ -865,7 +888,7 @@ declare class ObjectStackProtocolImplementation implements ObjectStackProtocol {
865
888
  */
866
889
  private static readonly OVERLAY_ALLOWED_TYPES;
867
890
  /**
868
- * Phase 3a-env-writable: parse `OBJECTSTACK_METADATA_WRITABLE` once.
891
+ * Phase 3a-env-writable: parse `OS_METADATA_WRITABLE` once.
869
892
  * Comma-separated singular type names. When the env var is set, the
870
893
  * listed types get treated as `allowOrgOverride: true` regardless of
871
894
  * their static registry entry. This is the runtime escape hatch admins
@@ -974,6 +997,7 @@ declare class ObjectStackProtocolImplementation implements ObjectStackProtocol {
974
997
  actor?: string;
975
998
  force?: boolean;
976
999
  mode?: 'draft' | 'publish';
1000
+ packageId?: string | null;
977
1001
  }): Promise<{
978
1002
  success: boolean;
979
1003
  version: string;
@@ -1346,7 +1370,7 @@ declare class SysMetadataRepository implements MetadataRepository {
1346
1370
  * at `(type, name)`. In that case we accept types with
1347
1371
  * `allowRuntimeCreate: true`, even when `allowOrgOverride` is false.
1348
1372
  *
1349
- * The env-var escape hatch (`OBJECTSTACK_METADATA_WRITABLE`) still
1373
+ * The env-var escape hatch (`OS_METADATA_WRITABLE`) still
1350
1374
  * applies to BOTH intents, so operators can opt into artifact
1351
1375
  * overrides at runtime for emergency fixes.
1352
1376
  */