feat: add build system, stubs, and npm packaging — openclaude is now runnable
- package.json with all 70+ dependencies - Bun build script with feature flag shims, native module stubs, otel externals - Stubs for ~15 missing source files (snapshot gaps) - tsconfig.json for TypeScript - bin/openclaude entry point - Builds to single 19MB dist/cli.mjs - Verified: --version and --help work Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
fd108243eb
commit
3e652cafdf
10
src/assistant/AssistantSessionChooser.tsx
Normal file
10
src/assistant/AssistantSessionChooser.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
// Stub — AssistantSessionChooser not included in source snapshot
|
||||
import React from 'react'
|
||||
|
||||
export function AssistantSessionChooser(_props: {
|
||||
sessions: unknown[]
|
||||
onSelect: (id: string) => void
|
||||
onCancel: () => void
|
||||
}) {
|
||||
return null
|
||||
}
|
||||
2
src/commands/agents-platform/index.ts
Normal file
2
src/commands/agents-platform/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
// Stub
|
||||
export default null
|
||||
2
src/commands/assistant/AssistantSessionChooser.ts
Normal file
2
src/commands/assistant/AssistantSessionChooser.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
// Stub
|
||||
export default null
|
||||
2
src/commands/assistant/assistant.ts
Normal file
2
src/commands/assistant/assistant.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
// Stub — assistant command not included in source snapshot
|
||||
export default null
|
||||
3
src/components/agents/SnapshotUpdateDialog.tsx
Normal file
3
src/components/agents/SnapshotUpdateDialog.tsx
Normal file
@@ -0,0 +1,3 @@
|
||||
// Stub
|
||||
import React from 'react'
|
||||
export function SnapshotUpdateDialog(_props: unknown) { return null }
|
||||
2
src/entrypoints/sdk/coreTypes.generated.ts
Normal file
2
src/entrypoints/sdk/coreTypes.generated.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
// Stub — generated types not included in source snapshot
|
||||
export type {}
|
||||
2
src/entrypoints/sdk/runtimeTypes.ts
Normal file
2
src/entrypoints/sdk/runtimeTypes.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
// Stub — SDK runtime types not included in source snapshot
|
||||
export type {}
|
||||
2
src/entrypoints/sdk/toolTypes.ts
Normal file
2
src/entrypoints/sdk/toolTypes.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
// Stub — SDK tool types not included in source snapshot
|
||||
export type {}
|
||||
2
src/ink/devtools.ts
Normal file
2
src/ink/devtools.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
// Stub — devtools not included in source snapshot
|
||||
export default {}
|
||||
9
src/ink/global.d.ts
vendored
Normal file
9
src/ink/global.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
// Stub — global types for Ink renderer
|
||||
declare namespace JSX {
|
||||
interface IntrinsicElements {
|
||||
'ink-box': Record<string, unknown>
|
||||
'ink-text': Record<string, unknown>
|
||||
'ink-root': Record<string, unknown>
|
||||
'ink-virtual-text': Record<string, unknown>
|
||||
}
|
||||
}
|
||||
12
src/services/compact/cachedMicrocompact.ts
Normal file
12
src/services/compact/cachedMicrocompact.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
// Stub — cachedMicrocompact not included in source snapshot (feature-gated)
|
||||
export function isCachedMicrocompactEnabled(): boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
export function isModelSupportedForCacheEditing(_model: string): boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
export function getCachedMCConfig() {
|
||||
return null
|
||||
}
|
||||
4
src/services/compact/snipCompact.ts
Normal file
4
src/services/compact/snipCompact.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
// Stub — snipCompact not included in source snapshot
|
||||
export function snipCompact() {
|
||||
return null
|
||||
}
|
||||
7
src/services/contextCollapse/index.ts
Normal file
7
src/services/contextCollapse/index.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
// Stub — contextCollapse not included in source snapshot (feature-gated)
|
||||
export function isContextCollapseEnabled(): boolean {
|
||||
return false
|
||||
}
|
||||
export function getContextCollapseState() {
|
||||
return null
|
||||
}
|
||||
3
src/tools/REPLTool/REPLTool.ts
Normal file
3
src/tools/REPLTool/REPLTool.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
// Stub
|
||||
export default null
|
||||
export const REPLTool = null
|
||||
@@ -0,0 +1,3 @@
|
||||
// Stub
|
||||
export default null
|
||||
export const SuggestBackgroundPRTool = null
|
||||
2
src/tools/TungstenTool/TungstenLiveMonitor.ts
Normal file
2
src/tools/TungstenTool/TungstenLiveMonitor.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
// Stub — TungstenTool not included in source snapshot (internal tool)
|
||||
export const TungstenLiveMonitor = null
|
||||
2
src/tools/TungstenTool/TungstenTool.ts
Normal file
2
src/tools/TungstenTool/TungstenTool.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
// Stub
|
||||
export const TungstenTool = null
|
||||
@@ -0,0 +1,3 @@
|
||||
// Stub
|
||||
export default null
|
||||
export const VerifyPlanExecutionTool = null
|
||||
2
src/tools/WorkflowTool/constants.ts
Normal file
2
src/tools/WorkflowTool/constants.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
// Stub — WorkflowTool not included in source snapshot
|
||||
export const WORKFLOW_TOOL_NAME = 'WorkflowTool'
|
||||
18
src/types/connectorText.ts
Normal file
18
src/types/connectorText.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
// Stub — original type not included in source snapshot
|
||||
export interface ConnectorTextBlock {
|
||||
type: 'connector_text'
|
||||
text: string
|
||||
}
|
||||
|
||||
export interface ConnectorTextDelta {
|
||||
type: 'connector_text_delta'
|
||||
text: string
|
||||
}
|
||||
|
||||
export function isConnectorTextBlock(block: unknown): block is ConnectorTextBlock {
|
||||
return (
|
||||
typeof block === 'object' &&
|
||||
block !== null &&
|
||||
(block as Record<string, unknown>).type === 'connector_text'
|
||||
)
|
||||
}
|
||||
13
src/utils/filePersistence/types.ts
Normal file
13
src/utils/filePersistence/types.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
// Stub — types not included in source snapshot
|
||||
export const OUTPUTS_SUBDIR = 'tool-results'
|
||||
|
||||
export interface PersistedFile {
|
||||
path: string
|
||||
content: string
|
||||
size: number
|
||||
}
|
||||
|
||||
export type TurnStartTime = number
|
||||
|
||||
export const DEFAULT_UPLOAD_CONCURRENCY = 5
|
||||
export const FILE_COUNT_LIMIT = 100
|
||||
3
src/utils/protectedNamespace.ts
Normal file
3
src/utils/protectedNamespace.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
// Stub
|
||||
export function isProtectedNamespace(_ns: string): boolean { return false }
|
||||
export const PROTECTED_NAMESPACES: string[] = []
|
||||
1
src/utils/ultraplan/prompt.txt
Normal file
1
src/utils/ultraplan/prompt.txt
Normal file
@@ -0,0 +1 @@
|
||||
This is a planning prompt stub.
|
||||
Reference in New Issue
Block a user