gmc-openspec 1.1.0 → 1.4.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.
Files changed (111) hide show
  1. package/README.md +2 -2
  2. package/bin/openspec.js +3 -1
  3. package/dist/cli/index.d.ts +4 -1
  4. package/dist/cli/index.js +36 -2
  5. package/dist/commands/config.js +4 -4
  6. package/dist/commands/context-store.d.ts +3 -0
  7. package/dist/commands/context-store.js +475 -0
  8. package/dist/commands/initiative.d.ts +13 -0
  9. package/dist/commands/initiative.js +318 -0
  10. package/dist/commands/workflow/index.d.ts +2 -0
  11. package/dist/commands/workflow/index.js +1 -0
  12. package/dist/commands/workflow/initiative-link.d.ts +24 -0
  13. package/dist/commands/workflow/initiative-link.js +47 -0
  14. package/dist/commands/workflow/instructions.js +10 -2
  15. package/dist/commands/workflow/new-change.d.ts +4 -0
  16. package/dist/commands/workflow/new-change.js +72 -23
  17. package/dist/commands/workflow/set-change.d.ts +13 -0
  18. package/dist/commands/workflow/set-change.js +87 -0
  19. package/dist/commands/workflow/shared.d.ts +2 -0
  20. package/dist/commands/workflow/status.js +3 -0
  21. package/dist/commands/workspace/context-status.d.ts +4 -0
  22. package/dist/commands/workspace/context-status.js +59 -0
  23. package/dist/commands/workspace/open-target-selection.d.ts +13 -0
  24. package/dist/commands/workspace/open-target-selection.js +146 -0
  25. package/dist/commands/workspace/open-view.d.ts +62 -0
  26. package/dist/commands/workspace/open-view.js +249 -0
  27. package/dist/commands/workspace/open.d.ts +16 -8
  28. package/dist/commands/workspace/open.js +40 -14
  29. package/dist/commands/workspace/opener-selection.d.ts +11 -0
  30. package/dist/commands/workspace/opener-selection.js +98 -0
  31. package/dist/commands/workspace/operations.d.ts +14 -8
  32. package/dist/commands/workspace/operations.js +228 -160
  33. package/dist/commands/workspace/prompt-theme.d.ts +29 -0
  34. package/dist/commands/workspace/prompt-theme.js +24 -0
  35. package/dist/commands/workspace/registration.d.ts +13 -0
  36. package/dist/commands/workspace/registration.js +84 -0
  37. package/dist/commands/workspace/selection.d.ts +3 -0
  38. package/dist/commands/workspace/selection.js +42 -40
  39. package/dist/commands/workspace/setup-prompts.d.ts +13 -0
  40. package/dist/commands/workspace/setup-prompts.js +121 -0
  41. package/dist/commands/workspace/types.d.ts +15 -0
  42. package/dist/commands/workspace.js +59 -340
  43. package/dist/core/artifact-graph/index.d.ts +2 -1
  44. package/dist/core/artifact-graph/instruction-loader.d.ts +10 -23
  45. package/dist/core/artifact-graph/instruction-loader.js +28 -89
  46. package/dist/core/artifact-graph/types.d.ts +0 -7
  47. package/dist/core/artifact-graph/types.js +0 -19
  48. package/dist/core/change-metadata/index.d.ts +2 -0
  49. package/dist/core/change-metadata/index.js +2 -0
  50. package/dist/core/change-metadata/schema.d.ts +18 -0
  51. package/dist/core/change-metadata/schema.js +28 -0
  52. package/dist/core/change-status-policy.d.ts +50 -0
  53. package/dist/core/change-status-policy.js +70 -0
  54. package/dist/core/collections/index.d.ts +3 -0
  55. package/dist/core/collections/index.js +3 -0
  56. package/dist/core/collections/initiatives/collection.d.ts +4 -0
  57. package/dist/core/collections/initiatives/collection.js +17 -0
  58. package/dist/core/collections/initiatives/index.d.ts +6 -0
  59. package/dist/core/collections/initiatives/index.js +6 -0
  60. package/dist/core/collections/initiatives/operations.d.ts +49 -0
  61. package/dist/core/collections/initiatives/operations.js +175 -0
  62. package/dist/core/collections/initiatives/resolution.d.ts +87 -0
  63. package/dist/core/collections/initiatives/resolution.js +374 -0
  64. package/dist/core/collections/initiatives/schema.d.ts +41 -0
  65. package/dist/core/collections/initiatives/schema.js +134 -0
  66. package/dist/core/collections/initiatives/templates.d.ts +12 -0
  67. package/dist/core/collections/initiatives/templates.js +90 -0
  68. package/dist/core/collections/runtime.d.ts +46 -0
  69. package/dist/core/collections/runtime.js +194 -0
  70. package/dist/core/completions/command-registry.d.ts +1 -5
  71. package/dist/core/completions/command-registry.js +475 -70
  72. package/dist/core/completions/shared-flags.d.ts +12 -0
  73. package/dist/core/completions/shared-flags.js +28 -0
  74. package/dist/core/config.js +2 -1
  75. package/dist/core/context-store/binding.d.ts +53 -0
  76. package/dist/core/context-store/binding.js +197 -0
  77. package/dist/core/context-store/errors.d.ts +20 -0
  78. package/dist/core/context-store/errors.js +22 -0
  79. package/dist/core/context-store/foundation.d.ts +55 -0
  80. package/dist/core/context-store/foundation.js +321 -0
  81. package/dist/core/context-store/index.d.ts +6 -0
  82. package/dist/core/context-store/index.js +6 -0
  83. package/dist/core/context-store/operations.d.ts +85 -0
  84. package/dist/core/context-store/operations.js +528 -0
  85. package/dist/core/context-store/registry.d.ts +45 -0
  86. package/dist/core/context-store/registry.js +229 -0
  87. package/dist/core/index.d.ts +2 -0
  88. package/dist/core/index.js +2 -0
  89. package/dist/core/jira/templates.js +14 -5
  90. package/dist/core/planning-home.js +5 -21
  91. package/dist/core/validation/validator.d.ts +11 -0
  92. package/dist/core/validation/validator.js +19 -2
  93. package/dist/core/workspace/foundation.d.ts +28 -48
  94. package/dist/core/workspace/foundation.js +130 -214
  95. package/dist/core/workspace/index.d.ts +2 -0
  96. package/dist/core/workspace/index.js +2 -0
  97. package/dist/core/workspace/legacy-state.d.ts +28 -0
  98. package/dist/core/workspace/legacy-state.js +200 -0
  99. package/dist/core/workspace/open-surface.d.ts +29 -8
  100. package/dist/core/workspace/open-surface.js +122 -44
  101. package/dist/core/workspace/openers.js +11 -6
  102. package/dist/core/workspace/registry.d.ts +24 -0
  103. package/dist/core/workspace/registry.js +146 -0
  104. package/dist/core/workspace/skills.d.ts +4 -2
  105. package/dist/core/workspace/skills.js +2 -2
  106. package/dist/core/workspace/state-io.d.ts +10 -0
  107. package/dist/core/workspace/state-io.js +119 -0
  108. package/dist/utils/change-metadata.d.ts +5 -2
  109. package/dist/utils/change-metadata.js +6 -12
  110. package/dist/utils/change-utils.d.ts +2 -2
  111. package/package.json +1 -1
@@ -1,10 +1,9 @@
1
1
  import { spawn as nodeSpawn } from 'node:child_process';
2
- import { WorkspaceLocalState, WorkspacePreferredOpener, WorkspaceSharedState, resolveWorkspaceOpenLinks } from '../../core/workspace/index.js';
2
+ import { WorkspacePreferredOpener, WorkspaceViewState, WorkspaceOpenResolvedContext, WorkspaceOpenSurfaceGeneration, WorkspaceSkippedOpenLink } from '../../core/workspace/index.js';
3
3
  import { SelectedWorkspace } from './types.js';
4
4
  export declare const WORKSPACE_OPEN_MINIMAL_PROMPT = "Open this OpenSpec workspace.";
5
5
  export interface WorkspaceOpenState {
6
- sharedState: WorkspaceSharedState;
7
- localState: WorkspaceLocalState;
6
+ viewState: WorkspaceViewState;
8
7
  codeWorkspacePath: string;
9
8
  }
10
9
  export interface WorkspaceOpenLaunchCommand {
@@ -13,17 +12,26 @@ export interface WorkspaceOpenLaunchCommand {
13
12
  cwd: string;
14
13
  openerLabel: string;
15
14
  }
15
+ export type WorkspaceOpenedRoot = {
16
+ kind: 'workspace' | 'initiative' | 'link';
17
+ name?: string;
18
+ path: string;
19
+ };
20
+ export interface WorkspaceOpenCommandBuildResult {
21
+ command: WorkspaceOpenLaunchCommand;
22
+ skipped: WorkspaceSkippedOpenLink[];
23
+ generated: WorkspaceOpenSurfaceGeneration;
24
+ openedRoots: WorkspaceOpenedRoot[];
25
+ }
16
26
  export type WorkspaceOpenSpawn = typeof nodeSpawn;
17
27
  export interface WorkspaceOpenLaunchOptions {
18
28
  spawn?: WorkspaceOpenSpawn;
19
29
  isExecutableAvailable?: (executable: string) => boolean;
30
+ stdio?: 'inherit' | 'ignore';
20
31
  }
21
32
  export declare function readWorkspaceOpenState(selected: SelectedWorkspace): Promise<WorkspaceOpenState>;
22
- export declare function buildWorkspaceOpenLaunchCommand(opener: WorkspacePreferredOpener, workspaceRoot: string, codeWorkspacePath: string, linkedPaths: string[]): WorkspaceOpenLaunchCommand;
33
+ export declare function buildWorkspaceOpenLaunchCommand(opener: WorkspacePreferredOpener, workspaceRoot: string, codeWorkspacePath: string, attachedPaths: string[]): WorkspaceOpenLaunchCommand;
23
34
  export declare function assertWorkspaceOpenerAvailable(opener: WorkspacePreferredOpener, codeWorkspacePath: string, isExecutableAvailable?: (executable: string) => boolean): void;
24
- export declare function buildWorkspaceOpenCommandForState(opener: WorkspacePreferredOpener, workspaceRoot: string, state: WorkspaceOpenState): Promise<{
25
- command: WorkspaceOpenLaunchCommand;
26
- skipped: Awaited<ReturnType<typeof resolveWorkspaceOpenLinks>>['skipped'];
27
- }>;
35
+ export declare function buildWorkspaceOpenCommandForState(opener: WorkspacePreferredOpener, workspaceRoot: string, state: WorkspaceOpenState, resolvedContext?: WorkspaceOpenResolvedContext | null): Promise<WorkspaceOpenCommandBuildResult>;
28
36
  export declare function launchWorkspaceOpenCommand(command: WorkspaceOpenLaunchCommand, options?: WorkspaceOpenLaunchOptions): Promise<void>;
29
37
  //# sourceMappingURL=open.d.ts.map
@@ -1,19 +1,22 @@
1
1
  import { createRequire } from 'node:module';
2
- import { getWorkspaceCodeWorkspacePath, getWorkspaceOpenerExecutable, getWorkspaceOpenerLabel, isWorkspaceExecutableAvailable, readWorkspaceLocalState, readWorkspaceSharedState, resolveWorkspaceOpenLinks, writeWorkspaceCodeWorkspaceFile, } from '../../core/workspace/index.js';
2
+ import { getWorkspaceCodeWorkspacePath, getWorkspaceOpenerExecutable, getWorkspaceOpenerLabel, isWorkspaceExecutableAvailable, readWorkspaceViewState, syncWorkspaceOpenSurface, } from '../../core/workspace/index.js';
3
3
  import { WorkspaceCliError, asErrorMessage } from './types.js';
4
4
  export const WORKSPACE_OPEN_MINIMAL_PROMPT = 'Open this OpenSpec workspace.';
5
+ const CODEX_CLI_WRITABLE_ROOT_SANDBOX_ARGS = ['--sandbox', 'workspace-write'];
5
6
  const require = createRequire(import.meta.url);
6
7
  const spawn = require('cross-spawn');
8
+ function isCodexCliOpener(opener) {
9
+ const openerId = opener.id;
10
+ return opener.kind === 'agent' && (openerId === 'codex-cli' || openerId === 'codex');
11
+ }
7
12
  export async function readWorkspaceOpenState(selected) {
8
- const sharedState = await readWorkspaceSharedState(selected.root);
9
- const localState = await readWorkspaceLocalState(selected.root);
13
+ const viewState = await readWorkspaceViewState(selected.root);
10
14
  return {
11
- sharedState,
12
- localState,
13
- codeWorkspacePath: getWorkspaceCodeWorkspacePath(selected.root, sharedState.name),
15
+ viewState,
16
+ codeWorkspacePath: getWorkspaceCodeWorkspacePath(selected.root, viewState.name),
14
17
  };
15
18
  }
16
- export function buildWorkspaceOpenLaunchCommand(opener, workspaceRoot, codeWorkspacePath, linkedPaths) {
19
+ export function buildWorkspaceOpenLaunchCommand(opener, workspaceRoot, codeWorkspacePath, attachedPaths) {
17
20
  const executable = getWorkspaceOpenerExecutable(opener);
18
21
  const openerLabel = getWorkspaceOpenerLabel(opener);
19
22
  if (opener.kind === 'editor' || opener.id === 'github-copilot') {
@@ -27,7 +30,10 @@ export function buildWorkspaceOpenLaunchCommand(opener, workspaceRoot, codeWorks
27
30
  return {
28
31
  executable,
29
32
  args: [
30
- ...linkedPaths.flatMap((linkedPath) => ['--add-dir', linkedPath]),
33
+ ...(isCodexCliOpener(opener) && attachedPaths.length > 0
34
+ ? CODEX_CLI_WRITABLE_ROOT_SANDBOX_ARGS
35
+ : []),
36
+ ...attachedPaths.flatMap((linkedPath) => ['--add-dir', linkedPath]),
31
37
  WORKSPACE_OPEN_MINIMAL_PROMPT,
32
38
  ],
33
39
  cwd: workspaceRoot,
@@ -48,12 +54,32 @@ export function assertWorkspaceOpenerAvailable(opener, codeWorkspacePath, isExec
48
54
  fix: `Install '${executable}' or choose another opener.`,
49
55
  });
50
56
  }
51
- export async function buildWorkspaceOpenCommandForState(opener, workspaceRoot, state) {
52
- const openLinks = await resolveWorkspaceOpenLinks(state.sharedState, state.localState);
53
- await writeWorkspaceCodeWorkspaceFile(state.codeWorkspacePath, openLinks.links);
57
+ export async function buildWorkspaceOpenCommandForState(opener, workspaceRoot, state, resolvedContext) {
58
+ const openSurface = await syncWorkspaceOpenSurface(workspaceRoot, state.viewState, resolvedContext);
59
+ const openedRoots = [
60
+ { kind: 'workspace', path: workspaceRoot },
61
+ ...(resolvedContext
62
+ ? [
63
+ {
64
+ kind: 'initiative',
65
+ name: resolvedContext.initiative.id,
66
+ path: resolvedContext.initiative.root,
67
+ },
68
+ ]
69
+ : []),
70
+ ...openSurface.links.map((link) => ({
71
+ kind: 'link',
72
+ name: link.name,
73
+ path: link.path,
74
+ })),
75
+ ];
54
76
  return {
55
- command: buildWorkspaceOpenLaunchCommand(opener, workspaceRoot, state.codeWorkspacePath, openLinks.links.map((link) => link.path)),
56
- skipped: openLinks.skipped,
77
+ command: buildWorkspaceOpenLaunchCommand(opener, workspaceRoot, state.codeWorkspacePath, openedRoots
78
+ .filter((root) => root.kind !== 'workspace')
79
+ .map((root) => root.path)),
80
+ skipped: openSurface.skipped,
81
+ generated: openSurface.generated,
82
+ openedRoots,
57
83
  };
58
84
  }
59
85
  export async function launchWorkspaceOpenCommand(command, options = {}) {
@@ -61,7 +87,7 @@ export async function launchWorkspaceOpenCommand(command, options = {}) {
61
87
  await new Promise((resolve, reject) => {
62
88
  const child = spawnCommand(command.executable, command.args, {
63
89
  cwd: command.cwd,
64
- stdio: 'inherit',
90
+ stdio: options.stdio ?? 'inherit',
65
91
  shell: false,
66
92
  });
67
93
  child.on('error', (error) => {
@@ -0,0 +1,11 @@
1
+ import { WorkspacePreferredOpener } from '../../core/workspace/index.js';
2
+ import { WorkspaceOpenOptions } from './types.js';
3
+ export declare function promptPreferredOpener(message: string, openerChoices?: import("../../core/workspace/openers.js").WorkspaceOpenerChoice[]): Promise<WorkspacePreferredOpener>;
4
+ export declare function parseSetupOpenerOption(opener: string | undefined): WorkspacePreferredOpener | undefined;
5
+ export declare function parseWorkspaceAgentOverride(agent: string): WorkspacePreferredOpener;
6
+ export declare function getPreferredWorkspaceSkillAgentId(preferredOpener: WorkspacePreferredOpener | undefined): string | null;
7
+ export declare function resolveWorkspaceOpenOpenerOverride(options: WorkspaceOpenOptions): WorkspacePreferredOpener | undefined;
8
+ export declare function resolveWorkspaceOpenOpener(localState: {
9
+ preferred_opener?: WorkspacePreferredOpener;
10
+ }, options: WorkspaceOpenOptions): Promise<WorkspacePreferredOpener>;
11
+ //# sourceMappingURL=opener-selection.d.ts.map
@@ -0,0 +1,98 @@
1
+ import { getDefaultWorkspaceOpenerChoiceValue, getWorkspaceSkillToolIds, listWorkspaceOpenerChoices, parseWorkspacePreferredOpenerValue, } from '../../core/workspace/index.js';
2
+ import { isInteractive, resolveNoInteractive } from '../../utils/interactive.js';
3
+ import { WorkspaceCliError, asErrorMessage } from './types.js';
4
+ import { workspaceSelectTheme } from './prompt-theme.js';
5
+ function formatOpenerChoiceName(choice) {
6
+ return choice.unavailableNote ? `${choice.label} (${choice.unavailableNote})` : choice.label;
7
+ }
8
+ export async function promptPreferredOpener(message, openerChoices = listWorkspaceOpenerChoices()) {
9
+ const { select } = await import('@inquirer/prompts');
10
+ const selectedValue = await select({
11
+ message,
12
+ default: getDefaultWorkspaceOpenerChoiceValue(openerChoices),
13
+ choices: openerChoices.map((choice) => ({
14
+ name: formatOpenerChoiceName(choice),
15
+ short: choice.label,
16
+ value: choice.value,
17
+ description: choice.unavailableNote ?? `Use ${choice.label}`,
18
+ })),
19
+ theme: workspaceSelectTheme,
20
+ });
21
+ return parseWorkspacePreferredOpenerValue(selectedValue);
22
+ }
23
+ export function parseSetupOpenerOption(opener) {
24
+ if (!opener) {
25
+ return undefined;
26
+ }
27
+ try {
28
+ return parseWorkspacePreferredOpenerValue(opener);
29
+ }
30
+ catch (error) {
31
+ throw new WorkspaceCliError(asErrorMessage(error), 'unsupported_workspace_opener', {
32
+ target: 'workspace.opener',
33
+ fix: 'Use --opener codex-cli, --opener claude, --opener github-copilot, or --opener editor.',
34
+ });
35
+ }
36
+ }
37
+ export function parseWorkspaceAgentOverride(agent) {
38
+ let opener = null;
39
+ try {
40
+ opener = parseWorkspacePreferredOpenerValue(agent);
41
+ }
42
+ catch {
43
+ opener = null;
44
+ }
45
+ if (!opener || opener.kind !== 'agent') {
46
+ throw new WorkspaceCliError(`Unsupported workspace agent '${agent}'. Supported agents: codex-cli, claude, github-copilot.`, 'unsupported_workspace_agent', {
47
+ target: 'workspace.opener',
48
+ fix: 'Use --agent codex-cli, --agent claude, or --agent github-copilot.',
49
+ });
50
+ }
51
+ return opener;
52
+ }
53
+ export function getPreferredWorkspaceSkillAgentId(preferredOpener) {
54
+ if (!preferredOpener || preferredOpener.kind !== 'agent') {
55
+ return null;
56
+ }
57
+ const toolId = preferredOpener.id === 'codex-cli' ? 'codex' : preferredOpener.id;
58
+ return getWorkspaceSkillToolIds().includes(toolId) ? toolId : null;
59
+ }
60
+ export function resolveWorkspaceOpenOpenerOverride(options) {
61
+ if (options.agent && options.editor) {
62
+ throw new WorkspaceCliError('workspace open accepts either --agent <tool> or --editor, not both.', 'workspace_opener_conflict', {
63
+ target: 'workspace.opener',
64
+ fix: 'Choose one opener override.',
65
+ });
66
+ }
67
+ if (options.agent) {
68
+ return parseWorkspaceAgentOverride(options.agent);
69
+ }
70
+ if (options.editor) {
71
+ return parseWorkspacePreferredOpenerValue('editor');
72
+ }
73
+ return undefined;
74
+ }
75
+ export async function resolveWorkspaceOpenOpener(localState, options) {
76
+ const override = resolveWorkspaceOpenOpenerOverride(options);
77
+ if (override) {
78
+ return override;
79
+ }
80
+ if (localState.preferred_opener) {
81
+ return localState.preferred_opener;
82
+ }
83
+ if (!resolveNoInteractive(options) && isInteractive(options)) {
84
+ const openerChoices = listWorkspaceOpenerChoices().filter((choice) => choice.available);
85
+ if (openerChoices.length === 0) {
86
+ throw new WorkspaceCliError('No supported workspace opener is available on PATH.', 'workspace_no_available_openers', {
87
+ target: 'workspace.opener',
88
+ fix: "Install VS Code ('code'), codex-cli ('codex'), or Claude ('claude'), then retry.",
89
+ });
90
+ }
91
+ return promptPreferredOpener('Open with:', openerChoices);
92
+ }
93
+ throw new WorkspaceCliError('This workspace does not have a preferred opener yet.', 'workspace_opener_unset', {
94
+ target: 'workspace.opener',
95
+ fix: 'Pass --agent <tool> or --editor, or run workspace setup interactively to choose a default opener.',
96
+ });
97
+ }
98
+ //# sourceMappingURL=opener-selection.js.map
@@ -1,23 +1,29 @@
1
- import { WorkspaceLocalState, WorkspacePreferredOpener, WorkspaceRegistryEntry, WorkspaceRegistryState, WorkspaceSharedState } from '../../core/workspace/index.js';
1
+ import { WorkspacePreferredOpener, WorkspaceRegistryEntry, WorkspaceContextState, WorkspaceViewState } from '../../core/workspace/index.js';
2
2
  import { SelectedWorkspace, WorkspaceLinkMutationPayload, WorkspaceListOutput, WorkspaceOutput, WorkspaceStatus } from './types.js';
3
- export declare function readRegistry(): Promise<WorkspaceRegistryState>;
4
3
  export declare function directoryExists(dirPath: string): Promise<boolean>;
5
4
  export declare function resolveExistingDirectory(inputPath: string, cwd?: string): Promise<string>;
6
5
  export declare function inferLinkName(absolutePath: string): string;
7
6
  export declare function validateWorkspaceNameForSetup(name: string): string;
8
7
  export declare function validateLinkNameForCommand(name: string): string;
9
- export declare function createManagedWorkspace(name: string, links: Record<string, string>, preferredOpener?: WorkspacePreferredOpener): Promise<WorkspaceOutput>;
8
+ export declare function createManagedWorkspace(name: string, links: Record<string, string>, preferredOpener?: WorkspacePreferredOpener, context?: WorkspaceContextState | null, tools?: string[]): Promise<WorkspaceOutput>;
10
9
  export declare function parseSetupLinks(linkInputs: string[] | undefined): Promise<Record<string, string>>;
11
10
  export declare function loadWorkspaceForList(entry: WorkspaceRegistryEntry): Promise<WorkspaceListOutput>;
12
11
  export declare function loadWorkspaceForDoctor(selected: SelectedWorkspace): Promise<{
13
12
  workspace: WorkspaceOutput;
14
13
  status: WorkspaceStatus[];
15
14
  }>;
16
- export declare function readWorkspaceForMutation(selected: SelectedWorkspace): Promise<{
17
- sharedState: WorkspaceSharedState;
18
- localState: WorkspaceLocalState;
19
- }>;
20
- export declare function recordSelectedWorkspaceAfterMutation(selected: SelectedWorkspace): Promise<void>;
15
+ export declare function readWorkspaceForMutation(selected: SelectedWorkspace): Promise<WorkspaceViewState>;
21
16
  export declare function addWorkspaceLink(selected: SelectedWorkspace, nameOrPath: string, linkPath?: string): Promise<WorkspaceLinkMutationPayload>;
22
17
  export declare function updateWorkspaceLink(selected: SelectedWorkspace, linkNameInput: string, linkPath: string): Promise<WorkspaceLinkMutationPayload>;
18
+ export declare function deriveWorkspaceNameForInitiative(initiativeId: string): string;
19
+ export declare function selectOrCreateWorkspaceForInitiativeOpen(input: {
20
+ workspaceName?: string;
21
+ context: WorkspaceContextState;
22
+ preferredOpener?: WorkspacePreferredOpener;
23
+ linksForNewWorkspace?: () => Promise<Record<string, string>>;
24
+ }): Promise<{
25
+ selected: SelectedWorkspace;
26
+ created: boolean;
27
+ state: WorkspaceViewState;
28
+ }>;
23
29
  //# sourceMappingURL=operations.d.ts.map