@contractspec/bundle.workspace 4.3.0 → 4.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.
- package/dist/contracts/operations/init.operation.d.ts +1 -1
- package/dist/index.js +1207 -641
- package/dist/node/index.js +1207 -641
- package/dist/services/adoption/catalog-core.d.ts +2 -0
- package/dist/services/adoption/catalog-entry.d.ts +2 -0
- package/dist/services/adoption/catalog-runtime.d.ts +2 -0
- package/dist/services/adoption/catalog-shared.d.ts +2 -0
- package/dist/services/adoption/catalog-solutions.d.ts +2 -0
- package/dist/services/adoption/catalog-ui.d.ts +2 -0
- package/dist/services/adoption/catalog.d.ts +3 -0
- package/dist/services/adoption/index.d.ts +6 -0
- package/dist/services/adoption/resolve.d.ts +6 -0
- package/dist/services/adoption/resolve.test.d.ts +1 -0
- package/dist/services/adoption/tokens.d.ts +6 -0
- package/dist/services/adoption/types.d.ts +99 -0
- package/dist/services/adoption/workspace-scan.d.ts +8 -0
- package/dist/services/adoption/workspace.d.ts +3 -0
- package/dist/services/build.d.ts +36 -1
- package/dist/services/connect/adoption.d.ts +10 -0
- package/dist/services/connect/init.d.ts +2 -6
- package/dist/services/connect/types.d.ts +11 -1
- package/dist/services/contractsrc-schema-ref.d.ts +4 -0
- package/dist/services/deps.d.ts +2 -0
- package/dist/services/discover.d.ts +15 -0
- package/dist/services/discover.test.d.ts +1 -0
- package/dist/services/doctor/checks/config.test.d.ts +1 -0
- package/dist/services/generate-artifacts.d.ts +4 -0
- package/dist/services/index.d.ts +6 -0
- package/dist/services/integrity.d.ts +2 -0
- package/dist/services/module-loader.d.ts +25 -0
- package/dist/services/module-loader.test.d.ts +1 -0
- package/dist/services/onboarding/catalog.d.ts +4 -0
- package/dist/services/onboarding/index.d.ts +4 -0
- package/dist/services/onboarding/journey.d.ts +11 -0
- package/dist/services/onboarding/render.d.ts +5 -0
- package/dist/services/onboarding/service.d.ts +5 -0
- package/dist/services/onboarding/service.test.d.ts +1 -0
- package/dist/services/onboarding/types.d.ts +71 -0
- package/dist/services/package-scaffold.d.ts +22 -0
- package/dist/services/setup/config-generators.d.ts +5 -1
- package/dist/services/setup/gitignore.d.ts +10 -0
- package/dist/services/setup/gitignore.test.d.ts +1 -0
- package/dist/services/setup/index.d.ts +5 -0
- package/dist/services/setup/managed-markdown.d.ts +8 -0
- package/dist/services/setup/presets.d.ts +16 -0
- package/dist/services/setup/targets/agents-md.d.ts +2 -0
- package/dist/services/setup/targets/cli-config.test.d.ts +1 -0
- package/dist/services/setup/targets/index.d.ts +1 -0
- package/dist/services/setup/targets/usage-md.d.ts +5 -0
- package/dist/services/setup/targets/usage-md.test.d.ts +1 -0
- package/dist/services/setup/types.d.ts +37 -3
- package/dist/services/update.test.d.ts +1 -0
- package/dist/services/validate/index.d.ts +1 -0
- package/dist/services/validate/module-loader-usage.test.d.ts +1 -0
- package/dist/services/validate/package-scaffold-validator.d.ts +8 -0
- package/dist/services/validate/package-scaffold-validator.test.d.ts +1 -0
- package/dist/services/validate/spec-validator.d.ts +6 -1
- package/dist/services/validate/spec-validator.test.d.ts +1 -0
- package/dist/services/versioning/index.d.ts +1 -0
- package/dist/services/versioning/release-authoring.d.ts +14 -0
- package/dist/services/versioning/release-authoring.test.d.ts +1 -0
- package/dist/services/versioning/release-files.d.ts +7 -0
- package/dist/services/versioning/release-service.types.d.ts +53 -1
- package/dist/services/vibe/definitions.test.d.ts +1 -0
- package/dist/templates/additional-contracts.template.d.ts +40 -0
- package/dist/templates/advanced-contracts.template.d.ts +39 -0
- package/dist/templates/data-view-renderer.template.d.ts +6 -0
- package/dist/templates/feature.template.d.ts +7 -6
- package/dist/templates/form.template.d.ts +16 -0
- package/dist/templates/form.template.test.d.ts +1 -0
- package/dist/templates/index.d.ts +6 -0
- package/dist/templates/theme.template.d.ts +12 -0
- package/dist/templates/theme.template.test.d.ts +1 -0
- package/dist/templates/workflow-devkit.template.d.ts +11 -0
- package/dist/types.d.ts +16 -11
- package/dist/utils/index.d.ts +0 -1
- package/package.json +10 -9
- package/dist/utils/module-loader.d.ts +0 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ResolvedContractsrcConfig } from '@contractspec/lib.contracts-spec/workspace-config';
|
|
2
|
+
import { type SetupOptions, type SetupPreset, type SetupTarget } from './types';
|
|
3
|
+
export declare const SETUP_GITIGNORE_PATTERNS: {
|
|
4
|
+
readonly connect: "**/.contractspec/connect/";
|
|
5
|
+
readonly verificationCache: "**/.contractspec/verification-cache.json";
|
|
6
|
+
};
|
|
7
|
+
export declare function inferSetupPresetFromConfig(config: Partial<ResolvedContractsrcConfig> | null | undefined): SetupPreset;
|
|
8
|
+
export declare function resolveSetupPreset(options: Pick<SetupOptions, 'preset'>): SetupPreset;
|
|
9
|
+
export declare function resolveSetupTargets(preset: SetupPreset, explicitTargets: SetupTarget[]): SetupTarget[];
|
|
10
|
+
export declare function getBuilderRuntimeModeForPreset(preset: SetupPreset): 'managed' | 'local' | 'hybrid' | undefined;
|
|
11
|
+
export declare function getBuilderBootstrapPresetForSetupPreset(preset: SetupPreset): 'managed_mvp' | 'local_daemon_mvp' | 'hybrid_mvp' | undefined;
|
|
12
|
+
export declare function isBuilderPreset(preset: SetupPreset): boolean;
|
|
13
|
+
export declare function isConnectPreset(preset: SetupPreset): boolean;
|
|
14
|
+
export declare function createSetupNextSteps(options: Pick<SetupOptions, 'builderLocalGrantedTo' | 'builderLocalRuntimeId' | 'preset' | 'projectName'>): string[];
|
|
15
|
+
export declare function createBuilderWorkspaceId(projectName?: string): string;
|
|
16
|
+
export declare function createSetupGitignorePatterns(options: Pick<SetupOptions, 'preset'>): string[];
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { FsAdapter } from '../../../ports/fs';
|
|
5
5
|
import type { SetupFileResult, SetupOptions, SetupPromptCallbacks } from '../types';
|
|
6
|
+
export declare const CONTRACTSPEC_AGENTS_BLOCK_START = "<!-- contractspec:init:agents:start -->";
|
|
7
|
+
export declare const CONTRACTSPEC_AGENTS_BLOCK_END = "<!-- contractspec:init:agents:end -->";
|
|
6
8
|
/**
|
|
7
9
|
* Setup AGENTS.md
|
|
8
10
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -7,4 +7,5 @@ export { setupCliConfig } from './cli-config';
|
|
|
7
7
|
export { setupCursorRules } from './cursor-rules';
|
|
8
8
|
export { setupMcpClaude } from './mcp-claude';
|
|
9
9
|
export { setupMcpCursor } from './mcp-cursor';
|
|
10
|
+
export { setupUsageMd } from './usage-md';
|
|
10
11
|
export { setupVscodeSettings } from './vscode-settings';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { FsAdapter } from '../../../ports/fs';
|
|
2
|
+
import type { SetupFileResult, SetupOptions, SetupPromptCallbacks } from '../types';
|
|
3
|
+
export declare const CONTRACTSPEC_USAGE_BLOCK_START = "<!-- contractspec:init:usage:start -->";
|
|
4
|
+
export declare const CONTRACTSPEC_USAGE_BLOCK_END = "<!-- contractspec:init:usage:end -->";
|
|
5
|
+
export declare function setupUsageMd(fs: FsAdapter, options: SetupOptions, prompts: SetupPromptCallbacks): Promise<SetupFileResult>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Target components that can be configured during setup.
|
|
6
6
|
*/
|
|
7
|
-
export type SetupTarget = 'cli-config' | 'biome-config' | 'vscode-settings' | 'mcp-cursor' | 'mcp-claude' | 'cursor-rules' | 'agents-md';
|
|
7
|
+
export type SetupTarget = 'cli-config' | 'biome-config' | 'vscode-settings' | 'mcp-cursor' | 'mcp-claude' | 'cursor-rules' | 'agents-md' | 'usage-md';
|
|
8
8
|
/**
|
|
9
9
|
* All available setup targets.
|
|
10
10
|
*/
|
|
@@ -13,6 +13,11 @@ export declare const ALL_SETUP_TARGETS: SetupTarget[];
|
|
|
13
13
|
* Human-readable labels for setup targets.
|
|
14
14
|
*/
|
|
15
15
|
export declare const SETUP_TARGET_LABELS: Record<SetupTarget, string>;
|
|
16
|
+
export type SetupPreset = 'core' | 'connect' | 'builder-managed' | 'builder-local' | 'builder-hybrid';
|
|
17
|
+
export declare const ALL_SETUP_PRESETS: SetupPreset[];
|
|
18
|
+
export declare const SETUP_PRESET_LABELS: Record<SetupPreset, string>;
|
|
19
|
+
export declare const SETUP_PRESET_DESCRIPTIONS: Record<SetupPreset, string>;
|
|
20
|
+
export type SetupGitignoreBehavior = 'auto' | 'force' | 'skip';
|
|
16
21
|
/**
|
|
17
22
|
* Scope of configuration in a monorepo.
|
|
18
23
|
*/
|
|
@@ -33,19 +38,37 @@ export interface SetupOptions {
|
|
|
33
38
|
packageName?: string;
|
|
34
39
|
/** If true, skip prompts and use defaults. */
|
|
35
40
|
interactive: boolean;
|
|
41
|
+
/** High-level onboarding preset. */
|
|
42
|
+
preset?: SetupPreset;
|
|
36
43
|
/** Specific targets to configure (defaults to all). */
|
|
37
44
|
targets: SetupTarget[];
|
|
38
45
|
/** Project name (defaults to directory name). */
|
|
39
46
|
projectName?: string;
|
|
40
47
|
/** Default code owners. */
|
|
41
48
|
defaultOwners?: string[];
|
|
49
|
+
/** Builder API base URL for Builder presets. */
|
|
50
|
+
builderApiBaseUrl?: string;
|
|
51
|
+
/** Builder control-plane token environment variable name. */
|
|
52
|
+
builderControlPlaneTokenEnvVar?: string;
|
|
53
|
+
/** Builder local runtime target id for local or hybrid presets. */
|
|
54
|
+
builderLocalRuntimeId?: string;
|
|
55
|
+
/** Builder local runtime lease/grant target for local or hybrid presets. */
|
|
56
|
+
builderLocalGrantedTo?: string;
|
|
57
|
+
/** Builder local-capable providers for local or hybrid presets. */
|
|
58
|
+
builderLocalProviderIds?: string[];
|
|
59
|
+
/** Optional Connect Studio bridge endpoint. */
|
|
60
|
+
connectStudioEndpoint?: string;
|
|
61
|
+
/** Optional Connect Studio bridge queue. */
|
|
62
|
+
connectStudioQueue?: string;
|
|
63
|
+
/** How init should handle recommended ContractSpec .gitignore entries. */
|
|
64
|
+
gitignoreBehavior?: SetupGitignoreBehavior;
|
|
42
65
|
}
|
|
43
66
|
/**
|
|
44
67
|
* Result of a single file setup operation.
|
|
45
68
|
*/
|
|
46
69
|
export interface SetupFileResult {
|
|
47
70
|
/** Target that was configured. */
|
|
48
|
-
target: SetupTarget;
|
|
71
|
+
target: SetupTarget | 'gitignore';
|
|
49
72
|
/** File path that was created or modified. */
|
|
50
73
|
filePath: string;
|
|
51
74
|
/** Action taken. */
|
|
@@ -59,17 +82,28 @@ export interface SetupFileResult {
|
|
|
59
82
|
export interface SetupResult {
|
|
60
83
|
/** Whether all operations succeeded. */
|
|
61
84
|
success: boolean;
|
|
85
|
+
/** Final resolved setup preset. */
|
|
86
|
+
preset: SetupPreset;
|
|
62
87
|
/** Results for each file. */
|
|
63
88
|
files: SetupFileResult[];
|
|
64
89
|
/** Summary message. */
|
|
65
90
|
summary: string;
|
|
91
|
+
/** Tailored follow-up commands for the selected preset. */
|
|
92
|
+
nextSteps: string[];
|
|
66
93
|
}
|
|
67
94
|
/**
|
|
68
95
|
* Callback for interactive prompts during setup.
|
|
69
96
|
*/
|
|
70
97
|
export interface SetupPromptCallbacks {
|
|
71
98
|
/** Confirm an action. */
|
|
72
|
-
confirm: (message: string) => Promise<boolean>;
|
|
99
|
+
confirm: (message: string, defaultValue?: boolean) => Promise<boolean>;
|
|
100
|
+
/** Select a single option. */
|
|
101
|
+
select: <T extends string>(message: string, options: {
|
|
102
|
+
value: T;
|
|
103
|
+
label: string;
|
|
104
|
+
description?: string;
|
|
105
|
+
selected?: boolean;
|
|
106
|
+
}[]) => Promise<T>;
|
|
73
107
|
/** Select multiple options. */
|
|
74
108
|
multiSelect: <T extends string>(message: string, options: {
|
|
75
109
|
value: T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SpecScanResult } from '@contractspec/module.workspace';
|
|
2
|
+
import type { FsAdapter } from '../../ports/fs';
|
|
3
|
+
export interface PackageScaffoldValidationResult {
|
|
4
|
+
valid: boolean;
|
|
5
|
+
errors: string[];
|
|
6
|
+
warnings: string[];
|
|
7
|
+
}
|
|
8
|
+
export declare function validatePackageScaffold(spec: SpecScanResult, fs: FsAdapter): Promise<PackageScaffoldValidationResult>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Validation service.
|
|
3
3
|
*/
|
|
4
|
-
import { type ValidationResult } from '@contractspec/module.workspace';
|
|
4
|
+
import { type SpecScanResult, type ValidationResult } from '@contractspec/module.workspace';
|
|
5
5
|
import type { FsAdapter } from '../../ports/fs';
|
|
6
6
|
import type { LoggerAdapter } from '../../ports/logger';
|
|
7
7
|
/**
|
|
@@ -23,6 +23,11 @@ export interface ValidateSpecResult {
|
|
|
23
23
|
warnings: string[];
|
|
24
24
|
code?: string;
|
|
25
25
|
}
|
|
26
|
+
export interface DiscoveredSpecValidationResult extends ValidateSpecResult {
|
|
27
|
+
spec: SpecScanResult;
|
|
28
|
+
}
|
|
29
|
+
export declare function validateScannedSpec(spec: SpecScanResult, options?: ValidateSpecOptions): Promise<ValidateSpecResult>;
|
|
30
|
+
export declare function validateDiscoveredSpecs(specs: SpecScanResult[], options?: ValidateSpecOptions): Promise<DiscoveredSpecValidationResult[]>;
|
|
26
31
|
/**
|
|
27
32
|
* Validate a spec file.
|
|
28
33
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export { formatChangelogJson, formatConventionalChangelog, formatKeepAChangelog, } from './changelog-formatter';
|
|
7
7
|
export * from './conventional-commits';
|
|
8
|
+
export { prepareReleaseAuthoring, saveReleaseDraft, } from './release-authoring';
|
|
8
9
|
export * from './release-formatters';
|
|
9
10
|
export { buildReleaseArtifacts, checkReleaseArtifacts, initReleaseArtifacts, } from './release-service';
|
|
10
11
|
export * from './release-service.types';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AiAdapter } from '../../ports/ai';
|
|
2
|
+
import type { FsAdapter } from '../../ports/fs';
|
|
3
|
+
import type { GitAdapter } from '../../ports/git';
|
|
4
|
+
import type { LoggerAdapter } from '../../ports/logger';
|
|
5
|
+
import type { ReleaseAuthoringOptions, ReleaseAuthoringResult, SaveReleaseDraftOptions, SaveReleaseDraftResult } from './release-service.types';
|
|
6
|
+
interface ReleaseAuthoringAdapters {
|
|
7
|
+
fs: FsAdapter;
|
|
8
|
+
git: GitAdapter;
|
|
9
|
+
logger: LoggerAdapter;
|
|
10
|
+
ai?: AiAdapter;
|
|
11
|
+
}
|
|
12
|
+
export declare function prepareReleaseAuthoring(adapters: ReleaseAuthoringAdapters, options?: ReleaseAuthoringOptions): Promise<ReleaseAuthoringResult>;
|
|
13
|
+
export declare function saveReleaseDraft(adapters: ReleaseAuthoringAdapters, options: SaveReleaseDraftOptions): Promise<SaveReleaseDraftResult>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ReleaseCapsule, ReleaseCapsulePackage } from '@contractspec/lib.contracts-spec';
|
|
2
2
|
import type { FsAdapter } from '../../ports/fs';
|
|
3
|
+
import type { ReleaseCapsuleReadIssue } from './release-service.types';
|
|
3
4
|
export interface WorkspacePackageInfo {
|
|
4
5
|
name: string;
|
|
5
6
|
dir: string;
|
|
@@ -10,10 +11,16 @@ export interface ParsedChangesetFile {
|
|
|
10
11
|
summary: string;
|
|
11
12
|
packages: ReleaseCapsulePackage[];
|
|
12
13
|
}
|
|
14
|
+
export interface ReadReleaseCapsulesResult {
|
|
15
|
+
capsules: Map<string, ReleaseCapsule>;
|
|
16
|
+
issues: ReleaseCapsuleReadIssue[];
|
|
17
|
+
}
|
|
13
18
|
export declare function listChangesetFiles(fs: FsAdapter, workspaceRoot: string): Promise<string[]>;
|
|
14
19
|
export declare function readChangesets(fs: FsAdapter, workspaceRoot: string): Promise<ParsedChangesetFile[]>;
|
|
15
20
|
export declare function readReleaseCapsules(fs: FsAdapter, workspaceRoot: string, changesets: ParsedChangesetFile[]): Promise<Map<string, ReleaseCapsule>>;
|
|
21
|
+
export declare function readReleaseCapsulesDetailed(fs: FsAdapter, workspaceRoot: string, changesets: ParsedChangesetFile[]): Promise<ReadReleaseCapsulesResult>;
|
|
16
22
|
export declare function discoverWorkspacePackages(fs: FsAdapter, workspaceRoot: string): Promise<WorkspacePackageInfo[]>;
|
|
17
23
|
export declare function matchChangedFilesToPackages(changedFiles: string[], packages: WorkspacePackageInfo[]): string[];
|
|
18
24
|
export declare function renderChangesetMarkdown(summary: string, packages: ReleaseCapsulePackage[]): string;
|
|
19
25
|
export declare function renderReleaseCapsuleYaml(capsule: ReleaseCapsule): string;
|
|
26
|
+
export declare function formatReleaseCapsuleReadIssues(issues: ReleaseCapsuleReadIssue[]): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentTarget, GeneratedReleaseManifest, ReleaseCapsulePackage, UpgradePlan, VersionBumpType } from '@contractspec/lib.contracts-spec';
|
|
1
|
+
import type { AgentTarget, GeneratedReleaseManifest, MigrationInstruction, ReleaseCapsulePackage, ReleaseCapsuleValidation, ReleaseImpactAudience, UpgradePlan, UpgradePlanStep, VersionBumpType } from '@contractspec/lib.contracts-spec';
|
|
2
2
|
export interface ReleaseInitOptions {
|
|
3
3
|
workspaceRoot?: string;
|
|
4
4
|
baseline?: string;
|
|
@@ -36,6 +36,58 @@ export interface ReleaseBuildResult {
|
|
|
36
36
|
upgradePlan: UpgradePlan;
|
|
37
37
|
releasesBuilt: number;
|
|
38
38
|
}
|
|
39
|
+
export interface ReleaseCapsuleReadIssue {
|
|
40
|
+
slug: string;
|
|
41
|
+
filePath: string;
|
|
42
|
+
message: string;
|
|
43
|
+
line?: number;
|
|
44
|
+
column?: number;
|
|
45
|
+
suggestion?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface ReleaseAuthoringDraft {
|
|
48
|
+
slug: string;
|
|
49
|
+
summary: string;
|
|
50
|
+
releaseType: VersionBumpType;
|
|
51
|
+
isBreaking: boolean;
|
|
52
|
+
packages: ReleaseCapsulePackage[];
|
|
53
|
+
affectedRuntimes: string[];
|
|
54
|
+
affectedFrameworks: string[];
|
|
55
|
+
audiences: ReleaseImpactAudience[];
|
|
56
|
+
deprecations: string[];
|
|
57
|
+
migrationInstructions: MigrationInstruction[];
|
|
58
|
+
upgradeSteps: UpgradePlanStep[];
|
|
59
|
+
validation: ReleaseCapsuleValidation;
|
|
60
|
+
}
|
|
61
|
+
export interface ReleaseAuthoringOptions {
|
|
62
|
+
workspaceRoot?: string;
|
|
63
|
+
baseline?: string;
|
|
64
|
+
slug?: string;
|
|
65
|
+
summary?: string;
|
|
66
|
+
releaseType?: VersionBumpType;
|
|
67
|
+
packages?: string[];
|
|
68
|
+
}
|
|
69
|
+
export interface ReleaseAuthoringResult {
|
|
70
|
+
workspaceRoot: string;
|
|
71
|
+
source: 'created' | 'existing';
|
|
72
|
+
changesetPath: string;
|
|
73
|
+
capsulePath: string;
|
|
74
|
+
draft: ReleaseAuthoringDraft;
|
|
75
|
+
warnings: string[];
|
|
76
|
+
parseIssues: ReleaseCapsuleReadIssue[];
|
|
77
|
+
aiAssisted: boolean;
|
|
78
|
+
}
|
|
79
|
+
export interface SaveReleaseDraftOptions {
|
|
80
|
+
workspaceRoot?: string;
|
|
81
|
+
draft: ReleaseAuthoringDraft;
|
|
82
|
+
force?: boolean;
|
|
83
|
+
}
|
|
84
|
+
export interface SaveReleaseDraftResult {
|
|
85
|
+
source: 'created' | 'updated';
|
|
86
|
+
changesetPath: string;
|
|
87
|
+
capsulePath: string;
|
|
88
|
+
changesetContent: string;
|
|
89
|
+
capsuleContent: string;
|
|
90
|
+
}
|
|
39
91
|
export interface ReleaseCheckOptions {
|
|
40
92
|
workspaceRoot?: string;
|
|
41
93
|
baseline?: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
type Stability = 'experimental' | 'beta' | 'stable' | 'deprecated';
|
|
2
|
+
interface BaseTemplateData {
|
|
3
|
+
key: string;
|
|
4
|
+
version: string;
|
|
5
|
+
description: string;
|
|
6
|
+
owners: string[];
|
|
7
|
+
tags: string[];
|
|
8
|
+
stability: Stability;
|
|
9
|
+
title?: string;
|
|
10
|
+
domain?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface CapabilitySpecTemplateData extends BaseTemplateData {
|
|
13
|
+
kind?: 'api' | 'event' | 'data' | 'ui' | 'integration';
|
|
14
|
+
}
|
|
15
|
+
export interface PolicySpecTemplateData extends BaseTemplateData {
|
|
16
|
+
scope?: 'global' | 'feature' | 'operation';
|
|
17
|
+
}
|
|
18
|
+
export interface TestSpecTemplateData extends BaseTemplateData {
|
|
19
|
+
targetType: 'operation' | 'workflow';
|
|
20
|
+
targetKey: string;
|
|
21
|
+
targetVersion?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface TranslationSpecTemplateData extends BaseTemplateData {
|
|
24
|
+
locale: string;
|
|
25
|
+
fallback?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface JobSpecTemplateData extends BaseTemplateData {
|
|
28
|
+
intervalMs?: number;
|
|
29
|
+
}
|
|
30
|
+
export interface VisualizationSpecTemplateData extends BaseTemplateData {
|
|
31
|
+
sourceOperationKey: string;
|
|
32
|
+
sourceOperationVersion?: string;
|
|
33
|
+
}
|
|
34
|
+
export declare function generateCapabilitySpec(data: CapabilitySpecTemplateData): string;
|
|
35
|
+
export declare function generatePolicySpec(data: PolicySpecTemplateData): string;
|
|
36
|
+
export declare function generateTestSpec(data: TestSpecTemplateData): string;
|
|
37
|
+
export declare function generateTranslationSpec(data: TranslationSpecTemplateData): string;
|
|
38
|
+
export declare function generateJobSpec(data: JobSpecTemplateData): string;
|
|
39
|
+
export declare function generateVisualizationSpec(data: VisualizationSpecTemplateData): string;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
type Stability = 'experimental' | 'beta' | 'stable' | 'deprecated';
|
|
2
|
+
interface BaseTemplateData {
|
|
3
|
+
key: string;
|
|
4
|
+
version: string;
|
|
5
|
+
description: string;
|
|
6
|
+
owners: string[];
|
|
7
|
+
tags: string[];
|
|
8
|
+
stability: Stability;
|
|
9
|
+
title?: string;
|
|
10
|
+
domain?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ExampleSpecTemplateData extends BaseTemplateData {
|
|
13
|
+
packageName?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface AgentSpecTemplateData {
|
|
16
|
+
key: string;
|
|
17
|
+
version: string;
|
|
18
|
+
description: string;
|
|
19
|
+
owners: string[];
|
|
20
|
+
tags: string[];
|
|
21
|
+
stability: Stability;
|
|
22
|
+
instructions: string;
|
|
23
|
+
}
|
|
24
|
+
export interface ProductIntentSpecTemplateData extends BaseTemplateData {
|
|
25
|
+
id?: string;
|
|
26
|
+
question: string;
|
|
27
|
+
}
|
|
28
|
+
export interface HarnessScenarioSpecTemplateData extends BaseTemplateData {
|
|
29
|
+
}
|
|
30
|
+
export interface HarnessSuiteSpecTemplateData extends BaseTemplateData {
|
|
31
|
+
scenarioKey: string;
|
|
32
|
+
scenarioVersion?: string;
|
|
33
|
+
}
|
|
34
|
+
export declare function generateExampleSpec(data: ExampleSpecTemplateData): string;
|
|
35
|
+
export declare function generateAgentSpec(data: AgentSpecTemplateData): string;
|
|
36
|
+
export declare function generateProductIntentSpec(data: ProductIntentSpecTemplateData): string;
|
|
37
|
+
export declare function generateHarnessScenarioSpec(data: HarnessScenarioSpecTemplateData): string;
|
|
38
|
+
export declare function generateHarnessSuiteSpec(data: HarnessSuiteSpecTemplateData): string;
|
|
39
|
+
export {};
|
|
@@ -3,26 +3,27 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface FeatureSpecParams {
|
|
5
5
|
key: string;
|
|
6
|
+
version: string;
|
|
6
7
|
title: string;
|
|
8
|
+
domain: string;
|
|
7
9
|
description?: string;
|
|
8
|
-
stability?: 'experimental' | '
|
|
10
|
+
stability?: 'experimental' | 'beta' | 'stable' | 'deprecated';
|
|
9
11
|
owners: string[];
|
|
10
12
|
tags: string[];
|
|
11
|
-
display?: string;
|
|
12
13
|
operations: {
|
|
13
|
-
|
|
14
|
+
key: string;
|
|
14
15
|
version: string;
|
|
15
16
|
}[];
|
|
16
17
|
events: {
|
|
17
|
-
|
|
18
|
+
key: string;
|
|
18
19
|
version: string;
|
|
19
20
|
}[];
|
|
20
21
|
presentations: {
|
|
21
|
-
|
|
22
|
+
key: string;
|
|
22
23
|
version: string;
|
|
23
24
|
}[];
|
|
24
25
|
experiments: {
|
|
25
|
-
|
|
26
|
+
key: string;
|
|
26
27
|
version: string;
|
|
27
28
|
}[];
|
|
28
29
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface FormSpecParams {
|
|
2
|
+
key: string;
|
|
3
|
+
version: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
domain: string;
|
|
7
|
+
owners: string[];
|
|
8
|
+
tags: string[];
|
|
9
|
+
stability?: 'experimental' | 'beta' | 'stable' | 'deprecated';
|
|
10
|
+
primaryFieldKey: string;
|
|
11
|
+
primaryFieldLabel: string;
|
|
12
|
+
primaryFieldPlaceholder?: string;
|
|
13
|
+
actionKey: string;
|
|
14
|
+
actionLabel: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function generateFormSpec(params: FormSpecParams): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Spec templates for generation.
|
|
3
3
|
*/
|
|
4
|
+
export * from './additional-contracts.template';
|
|
5
|
+
export * from './advanced-contracts.template';
|
|
4
6
|
export * from './app-config.template';
|
|
5
7
|
export * from './data-view.template';
|
|
8
|
+
export * from './data-view-renderer.template';
|
|
6
9
|
export * from './event.template';
|
|
7
10
|
export * from './experiment.template';
|
|
8
11
|
export * from './feature.template';
|
|
12
|
+
export * from './form.template';
|
|
9
13
|
export * from './handler.template';
|
|
10
14
|
export * from './integration.template';
|
|
11
15
|
export * from './knowledge.template';
|
|
@@ -13,5 +17,7 @@ export * from './migration.template';
|
|
|
13
17
|
export * from './operation.template';
|
|
14
18
|
export * from './presentation.template';
|
|
15
19
|
export * from './telemetry.template';
|
|
20
|
+
export * from './theme.template';
|
|
16
21
|
export * from './workflow.template';
|
|
22
|
+
export * from './workflow-devkit.template';
|
|
17
23
|
export * from './workflow-runner.template';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ThemeSpecParams {
|
|
2
|
+
key: string;
|
|
3
|
+
version: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
domain: string;
|
|
7
|
+
owners: string[];
|
|
8
|
+
tags: string[];
|
|
9
|
+
stability: 'experimental' | 'beta' | 'stable' | 'deprecated';
|
|
10
|
+
scopes: Array<'global' | 'tenant' | 'user'>;
|
|
11
|
+
}
|
|
12
|
+
export declare function generateThemeSpec(params: ThemeSpecParams): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface WorkflowDevkitTemplateOptions {
|
|
2
|
+
exportName: string;
|
|
3
|
+
specImportPath: string;
|
|
4
|
+
workflowFunctionName: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function generateWorkflowDevkitWorkflowTemplate({ exportName, specImportPath, workflowFunctionName, }: WorkflowDevkitTemplateOptions): string;
|
|
7
|
+
export declare function generateWorkflowDevkitStartRouteTemplate(workflowImportPath: string, workflowFunctionName: string): string;
|
|
8
|
+
export declare function generateWorkflowDevkitFollowUpRouteTemplate(): string;
|
|
9
|
+
export declare function generateWorkflowDevkitStreamRouteTemplate(): string;
|
|
10
|
+
export declare function generateWorkflowDevkitGenericTemplate(workflowImportPath: string, workflowFunctionName: string): string;
|
|
11
|
+
export {};
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export type SpecType = 'operation' | 'event' | 'presentation' | 'form' | 'feature' | 'workflow' | 'data-view' | 'migration' | 'telemetry' | 'experiment' | 'app-config' | 'integration' | 'knowledge';
|
|
2
1
|
export type OpKind = 'command' | 'query';
|
|
3
2
|
export type PresentationKind = 'web_component' | 'markdown' | 'data';
|
|
4
3
|
export type Stability = 'experimental' | 'beta' | 'stable' | 'deprecated';
|
|
@@ -194,7 +193,7 @@ export interface ExperimentSpecData extends BaseSpecData {
|
|
|
194
193
|
}
|
|
195
194
|
export interface AppConfigMappingData {
|
|
196
195
|
slot: string;
|
|
197
|
-
|
|
196
|
+
key: string;
|
|
198
197
|
version?: string;
|
|
199
198
|
}
|
|
200
199
|
export interface AppConfigFeatureFlagData {
|
|
@@ -208,15 +207,21 @@ export interface AppRouteConfigData {
|
|
|
208
207
|
label?: string;
|
|
209
208
|
dataView?: string;
|
|
210
209
|
workflow?: string;
|
|
211
|
-
|
|
210
|
+
guardKey?: string;
|
|
212
211
|
guardVersion?: string;
|
|
213
212
|
featureFlag?: string;
|
|
214
|
-
|
|
213
|
+
experimentKey?: string;
|
|
215
214
|
experimentVersion?: string;
|
|
216
215
|
}
|
|
217
|
-
export interface AppBlueprintSpecData
|
|
216
|
+
export interface AppBlueprintSpecData {
|
|
217
|
+
key: string;
|
|
218
|
+
version: string;
|
|
218
219
|
title: string;
|
|
220
|
+
description: string;
|
|
219
221
|
domain: string;
|
|
222
|
+
owners: string[];
|
|
223
|
+
tags: string[];
|
|
224
|
+
stability: Stability;
|
|
220
225
|
appId: string;
|
|
221
226
|
capabilitiesEnabled: string[];
|
|
222
227
|
capabilitiesDisabled: string[];
|
|
@@ -225,27 +230,27 @@ export interface AppBlueprintSpecData extends BaseSpecData {
|
|
|
225
230
|
dataViews: AppConfigMappingData[];
|
|
226
231
|
workflows: AppConfigMappingData[];
|
|
227
232
|
policyRefs: {
|
|
228
|
-
|
|
233
|
+
key: string;
|
|
229
234
|
version?: string;
|
|
230
235
|
}[];
|
|
231
236
|
theme?: {
|
|
232
|
-
|
|
237
|
+
key: string;
|
|
233
238
|
version: string;
|
|
234
239
|
};
|
|
235
240
|
themeFallbacks: {
|
|
236
|
-
|
|
241
|
+
key: string;
|
|
237
242
|
version: string;
|
|
238
243
|
}[];
|
|
239
244
|
telemetry?: {
|
|
240
|
-
|
|
245
|
+
key: string;
|
|
241
246
|
version?: string;
|
|
242
247
|
};
|
|
243
248
|
activeExperiments: {
|
|
244
|
-
|
|
249
|
+
key: string;
|
|
245
250
|
version?: string;
|
|
246
251
|
}[];
|
|
247
252
|
pausedExperiments: {
|
|
248
|
-
|
|
253
|
+
key: string;
|
|
249
254
|
version?: string;
|
|
250
255
|
}[];
|
|
251
256
|
featureFlags: AppConfigFeatureFlagData[];
|
package/dist/utils/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/bundle.workspace",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "Workspace utilities for monorepo development",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"contractspec",
|
|
@@ -33,15 +33,16 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@ai-sdk/anthropic": "3.0.68",
|
|
35
35
|
"@ai-sdk/openai": "3.0.52",
|
|
36
|
-
"@contractspec/biome-config": "3.8.
|
|
37
|
-
"@contractspec/integration.runtime": "3.9.
|
|
38
|
-
"@contractspec/lib.ai-agent": "8.0.
|
|
36
|
+
"@contractspec/biome-config": "3.8.8",
|
|
37
|
+
"@contractspec/integration.runtime": "3.9.2",
|
|
38
|
+
"@contractspec/lib.ai-agent": "8.0.8",
|
|
39
39
|
"@contractspec/lib.ai-providers": "3.7.13",
|
|
40
|
-
"@contractspec/lib.contracts-spec": "5.
|
|
41
|
-
"@contractspec/lib.contracts-integrations": "3.8.
|
|
42
|
-
"@contractspec/lib.contracts-transformers": "3.7.
|
|
43
|
-
"@contractspec/lib.
|
|
44
|
-
"@contractspec/
|
|
40
|
+
"@contractspec/lib.contracts-spec": "5.4.0",
|
|
41
|
+
"@contractspec/lib.contracts-integrations": "3.8.12",
|
|
42
|
+
"@contractspec/lib.contracts-transformers": "3.7.20",
|
|
43
|
+
"@contractspec/lib.surface-runtime": "0.5.20",
|
|
44
|
+
"@contractspec/lib.source-extractors": "2.7.20",
|
|
45
|
+
"@contractspec/module.workspace": "4.3.0",
|
|
45
46
|
"@contractspec/lib.utils-typescript": "3.7.13",
|
|
46
47
|
"ai": "6.0.156",
|
|
47
48
|
"chalk": "^5.6.2",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function loadTypeScriptModule(filePath: string): Promise<any>;
|