@almadar/workspace 0.4.1 → 0.5.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.
@@ -8,4 +8,7 @@
8
8
  * @packageDocumentation
9
9
  */
10
10
  import type { OpenWorkspaceOptions, WorkspaceService } from './types.js';
11
+ export declare function openWorkspace(opts: OpenWorkspaceOptions & {
12
+ create: false;
13
+ }): Promise<WorkspaceService | null>;
11
14
  export declare function openWorkspace(opts: OpenWorkspaceOptions): Promise<WorkspaceService>;
package/dist/types.d.ts CHANGED
@@ -178,6 +178,16 @@ export interface OpenWorkspaceOptions {
178
178
  github?: GitHubConfig;
179
179
  /** Fallback fetcher used when the local cache misses. */
180
180
  restore?: RestoreBackend;
181
+ /**
182
+ * When `false`, open is a pure read: resolve an EXISTING workspace (local
183
+ * resume, or restore that actually yields files) but NEVER mint a fresh one.
184
+ * Returns `null` when the appId exists in neither the local cache nor the
185
+ * restore backend — so callers can 404 instead of silently creating (and
186
+ * listing) a phantom workspace. Defaults to `true` (mint on miss, the
187
+ * historical behaviour). A `github`-clone-on-miss still requires
188
+ * `create !== false` (remote existence can't be verified without cloning).
189
+ */
190
+ create?: boolean;
181
191
  /** Storage selector. `'memory'` is for tests; `'local'` is default. */
182
192
  backend?: 'local' | 'memory';
183
193
  /** Optional project name baked into the mint-time schema template. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/workspace",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "description": "Storage-agnostic workspace primitives shared by Almadar consumers. One service, six exports, hidden paths, single observer. See docs/Almadar_Workspace.md.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",