@almadar/workspace 0.6.0 → 0.8.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/service.d.ts CHANGED
@@ -74,6 +74,7 @@ export declare class WorkspaceServiceImpl implements WorkspaceService {
74
74
  clearCompiled(): Promise<void>;
75
75
  readFile(relPath: string): Promise<string | null>;
76
76
  writeFile(relPath: string, content: string): Promise<void>;
77
+ removeFile(relPath: string): Promise<void>;
77
78
  listTree(relPath?: string): Promise<FileTreeNode[]>;
78
79
  exists(relPath: string): Promise<boolean>;
79
80
  commitAndPush(opts: {
package/dist/types.d.ts CHANGED
@@ -90,6 +90,9 @@ export type WorkspaceWriteEvent = {
90
90
  kind: 'file';
91
91
  relPath: string;
92
92
  content: string;
93
+ } | {
94
+ kind: 'file-removed';
95
+ relPath: string;
93
96
  } | {
94
97
  kind: 'workspace-index';
95
98
  orbital: string;
@@ -274,6 +277,8 @@ export interface WorkspaceService {
274
277
  clearCompiled(): Promise<void>;
275
278
  readFile(relPath: string): Promise<string | null>;
276
279
  writeFile(relPath: string, content: string): Promise<void>;
280
+ /** Delete a sandboxed file and emit a `file-removed` event (unmirrors downstream). No-op if absent. */
281
+ removeFile(relPath: string): Promise<void>;
277
282
  listTree(relPath?: string): Promise<FileTreeNode[]>;
278
283
  exists(relPath: string): Promise<boolean>;
279
284
  commitAndPush(opts: {
@@ -365,6 +370,8 @@ export interface AccountService {
365
370
  getCredential(provider: string): Promise<ProviderCredential | null>;
366
371
  setCredential(provider: string, cred: ProviderCredential): Promise<void>;
367
372
  listCredentialedProviders(): Promise<string[]>;
373
+ /** Remove a stored provider credential. Idempotent (no-op if absent). */
374
+ clearCredential(provider: string): Promise<void>;
368
375
  readAccount(): Promise<AccountIdentity | null>;
369
376
  writeAccount(identity: AccountIdentity): Promise<void>;
370
377
  /** Read the stored hosted-builder auth token, or null when signed out. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/workspace",
3
- "version": "0.6.0",
3
+ "version": "0.8.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",