Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"@stackbilt/adf": "workspace:^",
"@stackbilt/blast": "workspace:^",
"@stackbilt/classify": "workspace:^",
"@stackbilt/contracts": "file:../../../contracts",
"@stackbilt/core": "workspace:^",
"@stackbilt/drift": "workspace:^",
"@stackbilt/git": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/http-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {
ScaffoldFileType,
GovernanceDocsType,
PromptContextType,
} from '@stackbilt/contracts/dist/scaffold-response';
} from './types/scaffold-contract-types';

const DEFAULT_BASE_URL = process.env.STACKBILT_ENGINE_URL ?? 'https://api.stackbilt.dev/engine';
const GATEWAY_BASE_URL = 'https://mcp.stackbilt.dev';
Expand Down
100 changes: 100 additions & 0 deletions packages/cli/src/types/scaffold-contract-types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
/**
* Vendored type definitions for the Stackbilt scaffold-response contract.
*
* These types are structurally copied from @stackbilt/contracts to avoid
* a file: workspace dependency on an unpublished sibling repo. They are
* type-only (erased at compile time, zero runtime cost) and are used
* internally by http-client.ts — they are NOT re-exported from the public
* CLI surface in src/index.ts.
*
* When @stackbilt/contracts is properly published to npm, this file can be
* deleted and http-client.ts can re-import from the real package.
*
* Upstream source (as of @stackbilt/contracts@0.1.0):
* contracts/dist/scaffold-response/scaffold-response.contract.d.ts
*
* Type aliases follow the upstream naming convention with the `Type` suffix
* (e.g. `ScaffoldFile` → `ScaffoldFileType`), matching the re-exports in
* contracts/dist/scaffold-response/index.d.ts.
*/

export type FileRoleType = 'config' | 'scaffold' | 'governance' | 'test' | 'doc';

export interface ScaffoldFileType {
path: string;
content: string;
role: FileRoleType;
}

export interface GovernanceDocsType {
threat_model: string;
adr: string;
test_plan: string;
}

export interface PromptContextMetaType {
project_type: string;
complexity: string;
confidence: string;
seed: number;
}

export interface PromptContextRequirementType {
name: string;
priority: string;
effort: string;
acceptance: string;
}

export interface PromptContextInterfaceType {
name: string;
layout: string;
components: string;
}

export interface PromptContextThreatType {
name: string;
owasp: string;
likelihood: string;
impact: string;
mitigation: string;
detection: string;
response_time: string;
}

export interface PromptContextRuntimeType {
name: string;
tier: string;
traits: string;
}

export interface PromptContextTestPlanType {
name: string;
framework: string;
ci_stage: string;
coverage: string;
setup: string;
assertion_style: string;
}

export interface PromptContextFirstTaskType {
name: string;
estimate: string;
complexity: string;
deliverable: string;
adr: string;
}

export interface PromptContextType {
intention: string;
pattern: string;
meta: PromptContextMetaType;
requirement: PromptContextRequirementType;
interface: PromptContextInterfaceType;
threat: PromptContextThreatType;
runtime: PromptContextRuntimeType;
test_plan: PromptContextTestPlanType;
first_task: PromptContextFirstTaskType;
governance: GovernanceDocsType;
files: ScaffoldFileType[];
}
11 changes: 0 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading