@jkwd/inbase 0.1.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/README.md +76 -0
- package/apps/explorer/index.html +12 -0
- package/apps/explorer/package.json +28 -0
- package/apps/explorer/scripts/js-source.mjs +188 -0
- package/apps/explorer/scripts/patch-lib.d.ts +115 -0
- package/apps/explorer/scripts/patch-lib.mjs +472 -0
- package/apps/explorer/scripts/scan-target.mjs +188 -0
- package/apps/explorer/scripts/session-store.d.ts +156 -0
- package/apps/explorer/scripts/session-store.mjs +809 -0
- package/apps/explorer/scripts/target-config.d.ts +8 -0
- package/apps/explorer/scripts/target-config.mjs +42 -0
- package/apps/explorer/src/App.tsx +941 -0
- package/apps/explorer/src/agentIntent.ts +182 -0
- package/apps/explorer/src/codebase.ts +15 -0
- package/apps/explorer/src/index.css +632 -0
- package/apps/explorer/src/layout.ts +508 -0
- package/apps/explorer/src/main.tsx +16 -0
- package/apps/explorer/src/scene/BlockPlacer.tsx +87 -0
- package/apps/explorer/src/scene/Bridge.tsx +290 -0
- package/apps/explorer/src/scene/FileBlock.tsx +256 -0
- package/apps/explorer/src/scene/FolderArea.tsx +96 -0
- package/apps/explorer/src/scene/IslandPlacer.tsx +40 -0
- package/apps/explorer/src/scene/MapSelectBorder.tsx +57 -0
- package/apps/explorer/src/scene/MapView.tsx +247 -0
- package/apps/explorer/src/scene/Player.tsx +245 -0
- package/apps/explorer/src/scene/RelationLines.tsx +223 -0
- package/apps/explorer/src/scene/SelectionController.tsx +89 -0
- package/apps/explorer/src/scene/UserContextTracker.tsx +152 -0
- package/apps/explorer/src/scene/World.tsx +323 -0
- package/apps/explorer/src/theme.ts +111 -0
- package/apps/explorer/src/types.ts +245 -0
- package/apps/explorer/src/ui/CanvasErrorBoundary.tsx +38 -0
- package/apps/explorer/src/ui/HUD.tsx +1090 -0
- package/apps/explorer/src/ui/NameInput.tsx +45 -0
- package/apps/explorer/src/userContext.ts +73 -0
- package/apps/explorer/src/userCreated.ts +354 -0
- package/apps/explorer/src/vite-env.d.ts +1 -0
- package/apps/explorer/tsconfig.json +21 -0
- package/apps/explorer/vite.config.ts +295 -0
- package/bin/inbase.mjs +170 -0
- package/bin/project.mjs +94 -0
- package/bin/session.mjs +241 -0
- package/package.json +63 -0
- package/skill/inbase/SKILL.md +167 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
export type DiffStatus =
|
|
2
|
+
| 'pending'
|
|
3
|
+
| 'extend'
|
|
4
|
+
| 'extended'
|
|
5
|
+
| 'applied'
|
|
6
|
+
| 'rejected'
|
|
7
|
+
|
|
8
|
+
export type DiffEntry = {
|
|
9
|
+
id: string
|
|
10
|
+
file: string
|
|
11
|
+
parentId: string | null
|
|
12
|
+
step: number
|
|
13
|
+
title: string
|
|
14
|
+
status: DiffStatus
|
|
15
|
+
instruction: string | null
|
|
16
|
+
createdAt: string
|
|
17
|
+
decidedAt: string | null
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type DiffManifest = {
|
|
21
|
+
version: number
|
|
22
|
+
sessionId: string
|
|
23
|
+
feature: string
|
|
24
|
+
steps: Array<{ index: number; title: string }>
|
|
25
|
+
status: 'active' | 'finished' | 'rejected'
|
|
26
|
+
phase:
|
|
27
|
+
| 'blueprint_ask'
|
|
28
|
+
| 'blueprint'
|
|
29
|
+
| 'preparing'
|
|
30
|
+
| 'plan_ready'
|
|
31
|
+
| 'working'
|
|
32
|
+
| 'review'
|
|
33
|
+
| 'replanning'
|
|
34
|
+
| 'finished'
|
|
35
|
+
| 'stopped'
|
|
36
|
+
currentStep: number
|
|
37
|
+
activeDiffId: string | null
|
|
38
|
+
pendingInstruction: string | null
|
|
39
|
+
workStartedAt: string | null
|
|
40
|
+
createdAt: string
|
|
41
|
+
updatedAt: string
|
|
42
|
+
diffs: DiffEntry[]
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function assertSessionId(value: unknown): string
|
|
46
|
+
export function readActiveSession(dataDir: string): string | null
|
|
47
|
+
export function writeActiveSession(dataDir: string, sessionId: string | null): void
|
|
48
|
+
export function readBlueprintSession(dataDir: string): string | null
|
|
49
|
+
export function writeBlueprintSession(dataDir: string, sessionId: string | null): void
|
|
50
|
+
export function readManifest(dataDir: string, sessionId: string): DiffManifest | null
|
|
51
|
+
export function writeManifest(dataDir: string, manifest: DiffManifest): void
|
|
52
|
+
export function startSession(
|
|
53
|
+
dataDir: string,
|
|
54
|
+
input: {
|
|
55
|
+
sessionId: string
|
|
56
|
+
feature?: string
|
|
57
|
+
},
|
|
58
|
+
): DiffManifest
|
|
59
|
+
export type SessionBlueprint = {
|
|
60
|
+
enabled: boolean
|
|
61
|
+
sent: boolean
|
|
62
|
+
userCreatedBlocks: unknown[]
|
|
63
|
+
userCreatedIslands: unknown[]
|
|
64
|
+
addedFunctions: unknown[]
|
|
65
|
+
addedVariables: unknown[]
|
|
66
|
+
addedImports: unknown[]
|
|
67
|
+
}
|
|
68
|
+
export function emptyBlueprint(): SessionBlueprint
|
|
69
|
+
export function readBlueprint(dataDir: string, sessionId: string): SessionBlueprint
|
|
70
|
+
export function writeBlueprint(
|
|
71
|
+
dataDir: string,
|
|
72
|
+
sessionId: string,
|
|
73
|
+
blueprint: SessionBlueprint,
|
|
74
|
+
): void
|
|
75
|
+
export function answerBlueprint(
|
|
76
|
+
dataDir: string,
|
|
77
|
+
sessionId: string,
|
|
78
|
+
enabled: boolean,
|
|
79
|
+
): DiffManifest
|
|
80
|
+
export function updateBlueprint(
|
|
81
|
+
dataDir: string,
|
|
82
|
+
sessionId: string,
|
|
83
|
+
input?: {
|
|
84
|
+
userCreatedBlocks?: unknown[]
|
|
85
|
+
userCreatedIslands?: unknown[]
|
|
86
|
+
addedFunctions?: unknown[]
|
|
87
|
+
addedVariables?: unknown[]
|
|
88
|
+
addedImports?: unknown[]
|
|
89
|
+
},
|
|
90
|
+
): SessionBlueprint
|
|
91
|
+
export function sendBlueprint(
|
|
92
|
+
dataDir: string,
|
|
93
|
+
sessionId: string,
|
|
94
|
+
input?: {
|
|
95
|
+
userCreatedBlocks?: unknown[]
|
|
96
|
+
userCreatedIslands?: unknown[]
|
|
97
|
+
addedFunctions?: unknown[]
|
|
98
|
+
addedVariables?: unknown[]
|
|
99
|
+
addedImports?: unknown[]
|
|
100
|
+
},
|
|
101
|
+
): DiffManifest
|
|
102
|
+
export function reportPlan(
|
|
103
|
+
dataDir: string,
|
|
104
|
+
input: {
|
|
105
|
+
sessionId: string
|
|
106
|
+
feature: string
|
|
107
|
+
stepTitles: string[]
|
|
108
|
+
},
|
|
109
|
+
): DiffManifest
|
|
110
|
+
export function invokeStep(
|
|
111
|
+
dataDir: string,
|
|
112
|
+
sessionId: string,
|
|
113
|
+
step: number,
|
|
114
|
+
targetRoot?: string | null,
|
|
115
|
+
): DiffManifest
|
|
116
|
+
export function sessionIntent(
|
|
117
|
+
dataDir: string,
|
|
118
|
+
sessionId: string,
|
|
119
|
+
knownFileIds?: string[],
|
|
120
|
+
selectedDiffId?: string,
|
|
121
|
+
): Record<string, unknown> | null
|
|
122
|
+
export function appendDiff(
|
|
123
|
+
dataDir: string,
|
|
124
|
+
targetRoot: string,
|
|
125
|
+
input: {
|
|
126
|
+
sessionId: string
|
|
127
|
+
patchText: string
|
|
128
|
+
},
|
|
129
|
+
): { manifest: DiffManifest; entry: DiffEntry }
|
|
130
|
+
export function continueDiff(
|
|
131
|
+
dataDir: string,
|
|
132
|
+
targetRoot: string,
|
|
133
|
+
sessionId: string,
|
|
134
|
+
diffId: string,
|
|
135
|
+
): DiffManifest
|
|
136
|
+
export function requestReplan(
|
|
137
|
+
dataDir: string,
|
|
138
|
+
sessionId: string,
|
|
139
|
+
diffId: string,
|
|
140
|
+
instruction: string,
|
|
141
|
+
): DiffManifest
|
|
142
|
+
export function stopSession(
|
|
143
|
+
dataDir: string,
|
|
144
|
+
sessionId: string,
|
|
145
|
+
diffId?: string,
|
|
146
|
+
): null
|
|
147
|
+
export function decideDiff(
|
|
148
|
+
dataDir: string,
|
|
149
|
+
targetRoot: string,
|
|
150
|
+
sessionId: string,
|
|
151
|
+
diffId: string,
|
|
152
|
+
decision: 'approved' | 'extend' | 'rejected',
|
|
153
|
+
instruction?: string,
|
|
154
|
+
): DiffManifest | null
|
|
155
|
+
export function closeSession(dataDir: string, sessionId: string): void
|
|
156
|
+
export function finalizeFinishedSession(dataDir: string, sessionId: string): void
|