@almadar/workspace 0.11.0 → 0.11.2

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
@@ -503,6 +503,8 @@ var GitClient = class {
503
503
  /** Clone a bundle file into `targetDir` (hydrate a fresh workspace from the archive). */
504
504
  async cloneBundle(bundleAbsPath, targetDir) {
505
505
  await execGit(["clone", bundleAbsPath, targetDir], path2.dirname(bundleAbsPath));
506
+ await execGit(["remote", "remove", "origin"], targetDir).catch(() => {
507
+ });
506
508
  }
507
509
  exec(args) {
508
510
  return execGit(args, this.cwd);
@@ -1906,6 +1908,14 @@ var WorkspaceServiceImpl = class {
1906
1908
  });
1907
1909
  await this.emit({ kind: "schema", content });
1908
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
+ }
1909
1919
  // === Coordinator session ===
1910
1920
  readAnalysis() {
1911
1921
  return readJsonFileSync(this.backend, coordinatorFile(this.workDir, COORD_FILES.analysis));