@almadar/workspace 0.11.1 → 0.11.3

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
@@ -10,6 +10,6 @@ export { openWorkspace } from './open-workspace.js';
10
10
  export { listWorkspaces } from './list-workspaces.js';
11
11
  export { deleteWorkspace } from './delete-workspace.js';
12
12
  export { openAccount } from './account.js';
13
- export type { WorkspaceService, WorkspaceObserver, WorkspaceWriteEvent, WorkspaceWatchEvent, OpenWorkspaceOptions, ListWorkspacesOptions, WorkspaceSummary, RestoreBackend, GitHubConfig, GitStatusInfo, SnapshotMeta, WorkspaceArchiveBackend, FileTreeNode, AccountService, AccountConfig, ProviderCredential, AuthToken, AccountIdentity, OpenAccountOptions, } from './types.js';
13
+ export type { WorkspaceService, InstantiateWorkspaceSeed, WorkspaceObserver, WorkspaceWriteEvent, WorkspaceWatchEvent, OpenWorkspaceOptions, ListWorkspacesOptions, WorkspaceSummary, RestoreBackend, GitHubConfig, GitStatusInfo, SnapshotMeta, WorkspaceArchiveBackend, FileTreeNode, AccountService, AccountConfig, ProviderCredential, AuthToken, AccountIdentity, OpenAccountOptions, } from './types.js';
14
14
  export type { WorkspaceIndex, EmbedderPort, ResolveResult, ResolveOptions, TraitRefEmit, WorkspaceIndexStats, OrbitalIndexEntry, ExtraTraitIdentity, RetrievalResult, RetrievalOptions, RecentlyEditedOptions, EventEdge, EntityBinding, RuleBinding, RecencyEntry, IntentMaps, ComposedMaps, BM25Document, BM25Table, BM25Options, WorkspaceIndexManifest, } from './workspace-index/types.js';
15
15
  export { DEFAULT_COERCION_THRESHOLD, DEFAULT_RETRIEVAL_TOP_K, RRF_K, WORKSPACE_INDEX_SCHEMA_VERSION, } from './workspace-index/types.js';
package/dist/index.js CHANGED
@@ -1908,6 +1908,14 @@ var WorkspaceServiceImpl = class {
1908
1908
  });
1909
1909
  await this.emit({ kind: "schema", content });
1910
1910
  }
1911
+ async instantiateWorkspace(seed) {
1912
+ for (const orbital of seed.orbitals) {
1913
+ await this.writeOrbital(orbital.name, JSON.stringify(orbital.schema, null, 2));
1914
+ await this.writeSpec(orbital.name, orbital.spec);
1915
+ }
1916
+ await this.writeSchema(JSON.stringify(seed.composedSchema, null, 2));
1917
+ await this.writePlan(seed.planSnapshot);
1918
+ }
1911
1919
  // === Coordinator session ===
1912
1920
  readAnalysis() {
1913
1921
  return readJsonFileSync(this.backend, coordinatorFile(this.workDir, COORD_FILES.analysis));