@coreframe/dev-contracts 0.0.0 → 0.1.1
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/codex-task.d.ts +21 -0
- package/dist/codex-task.js +1 -0
- package/dist/development-controls.d.ts +19 -0
- package/dist/development-controls.js +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -0
- package/dist/managed-dev.d.ts +137 -0
- package/dist/managed-dev.js +1 -0
- package/package.json +41 -10
- package/readme.md +0 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//#region src/codex-task.d.ts
|
|
2
|
+
declare const codexTaskEnv = "COREFRAME_CODEX_TASKS";
|
|
3
|
+
declare const codexTaskEvents: {
|
|
4
|
+
readonly result: "coreframe:codex-task:result";
|
|
5
|
+
readonly start: "coreframe:codex-task:start";
|
|
6
|
+
};
|
|
7
|
+
type CodexTaskStartRequest = {
|
|
8
|
+
openInBackground?: boolean;
|
|
9
|
+
prompt: string;
|
|
10
|
+
requestId: string;
|
|
11
|
+
};
|
|
12
|
+
type CodexTaskStartResponse = {
|
|
13
|
+
error?: string;
|
|
14
|
+
openedInCodex?: boolean;
|
|
15
|
+
requestId: string;
|
|
16
|
+
threadId?: string;
|
|
17
|
+
url?: string;
|
|
18
|
+
warning?: string;
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { CodexTaskStartRequest, CodexTaskStartResponse, codexTaskEnv, codexTaskEvents };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=`COREFRAME_CODEX_TASKS`,t={result:`coreframe:codex-task:result`,start:`coreframe:codex-task:start`};export{e as codexTaskEnv,t as codexTaskEvents};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region src/development-controls.d.ts
|
|
2
|
+
declare const developmentControlsEvents: {
|
|
3
|
+
readonly action: "coreframe:development-controls:action";
|
|
4
|
+
readonly actionResult: "coreframe:development-controls:action-result";
|
|
5
|
+
};
|
|
6
|
+
type DevelopmentControlAction = {
|
|
7
|
+
type: "restart-vite";
|
|
8
|
+
};
|
|
9
|
+
type DevelopmentControlActionRequest = {
|
|
10
|
+
action: DevelopmentControlAction;
|
|
11
|
+
requestId: string;
|
|
12
|
+
};
|
|
13
|
+
type DevelopmentControlActionResponse = {
|
|
14
|
+
error?: string;
|
|
15
|
+
requestId: string;
|
|
16
|
+
state: "busy" | "complete" | "error";
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { DevelopmentControlAction, DevelopmentControlActionRequest, DevelopmentControlActionResponse, developmentControlsEvents };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={action:`coreframe:development-controls:action`,actionResult:`coreframe:development-controls:action-result`};export{e as developmentControlsEvents};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CodexTaskStartRequest, CodexTaskStartResponse, codexTaskEnv, codexTaskEvents } from "./codex-task.js";
|
|
2
|
+
import { DevelopmentControlAction, DevelopmentControlActionRequest, DevelopmentControlActionResponse, developmentControlsEvents } from "./development-controls.js";
|
|
3
|
+
import { ManagedDevAction, ManagedDevActionRequest, ManagedDevActionResponse, ManagedDevActionResult, ManagedDevCheck, ManagedDevCheckTrigger, ManagedDevChecks, ManagedDevCodexCompletion, ManagedDevCodexEvent, ManagedDevCodexMessage, ManagedDevCodexResponse, ManagedDevCommit, ManagedDevDraft, ManagedDevRebasedCommit, ManagedDevSetupFailure, ManagedDevStatus, ManagedDevStatusResponse, ManagedDevTarget, managedDevEnv, managedDevEvents } from "./managed-dev.js";
|
|
4
|
+
export { CodexTaskStartRequest, CodexTaskStartResponse, DevelopmentControlAction, DevelopmentControlActionRequest, DevelopmentControlActionResponse, ManagedDevAction, ManagedDevActionRequest, ManagedDevActionResponse, ManagedDevActionResult, ManagedDevCheck, ManagedDevCheckTrigger, ManagedDevChecks, ManagedDevCodexCompletion, ManagedDevCodexEvent, ManagedDevCodexMessage, ManagedDevCodexResponse, ManagedDevCommit, ManagedDevDraft, ManagedDevRebasedCommit, ManagedDevSetupFailure, ManagedDevStatus, ManagedDevStatusResponse, ManagedDevTarget, codexTaskEnv, codexTaskEvents, developmentControlsEvents, managedDevEnv, managedDevEvents };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{codexTaskEnv as e,codexTaskEvents as t}from"./codex-task.js";import{developmentControlsEvents as n}from"./development-controls.js";import{managedDevEnv as r,managedDevEvents as i}from"./managed-dev.js";export{e as codexTaskEnv,t as codexTaskEvents,n as developmentControlsEvents,r as managedDevEnv,i as managedDevEvents};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
//#region src/managed-dev.d.ts
|
|
2
|
+
declare const managedDevEnv = "COREFRAME_MANAGED_DEV";
|
|
3
|
+
declare const managedDevEvents: {
|
|
4
|
+
readonly action: "coreframe:managed-dev:action";
|
|
5
|
+
readonly actionResult: "coreframe:managed-dev:action-result";
|
|
6
|
+
readonly codex: "coreframe:managed-dev:codex";
|
|
7
|
+
readonly status: "coreframe:managed-dev:status";
|
|
8
|
+
readonly statusRequest: "coreframe:managed-dev:status-request";
|
|
9
|
+
};
|
|
10
|
+
type ManagedDevCommit = {
|
|
11
|
+
commit: string;
|
|
12
|
+
shortCommit: string;
|
|
13
|
+
subject: string;
|
|
14
|
+
};
|
|
15
|
+
type ManagedDevTarget = ManagedDevCommit & {
|
|
16
|
+
commits?: ManagedDevCommit[];
|
|
17
|
+
source: "dev" | "upstream";
|
|
18
|
+
};
|
|
19
|
+
type ManagedDevDraft = {
|
|
20
|
+
fingerprint: string;
|
|
21
|
+
tracked: boolean;
|
|
22
|
+
untracked: string[];
|
|
23
|
+
};
|
|
24
|
+
type ManagedDevCheck = {
|
|
25
|
+
command: "pnpm test" | "pnpm typecheck";
|
|
26
|
+
dismissed?: boolean;
|
|
27
|
+
failureId?: string;
|
|
28
|
+
output?: string;
|
|
29
|
+
status: "failed" | "passed" | "pending" | "running";
|
|
30
|
+
};
|
|
31
|
+
type ManagedDevCheckTrigger = "database-recovery" | "dependency-recovery" | "synchronization";
|
|
32
|
+
type ManagedDevChecks = {
|
|
33
|
+
commit: string;
|
|
34
|
+
commands: ManagedDevCheck[];
|
|
35
|
+
trigger: ManagedDevCheckTrigger;
|
|
36
|
+
};
|
|
37
|
+
type ManagedDevSetupFailure = {
|
|
38
|
+
command: "pnpm db migrate" | "pnpm db setup" | "pnpm install --frozen-lockfile";
|
|
39
|
+
commit: string;
|
|
40
|
+
message: string;
|
|
41
|
+
output: string;
|
|
42
|
+
restartRequired: boolean;
|
|
43
|
+
stage: "dependencies" | "migration";
|
|
44
|
+
};
|
|
45
|
+
type ManagedDevStatus = {
|
|
46
|
+
busy?: string;
|
|
47
|
+
checks?: ManagedDevChecks;
|
|
48
|
+
codexCompletion?: ManagedDevCodexCompletion;
|
|
49
|
+
currentCommit?: string;
|
|
50
|
+
draft?: ManagedDevDraft;
|
|
51
|
+
message?: string;
|
|
52
|
+
mode: "error" | "managed" | "unmanaged" | "waiting";
|
|
53
|
+
proposal?: string;
|
|
54
|
+
setupFailure?: ManagedDevSetupFailure;
|
|
55
|
+
target?: ManagedDevTarget;
|
|
56
|
+
warnings: string[];
|
|
57
|
+
};
|
|
58
|
+
type ManagedDevAction = {
|
|
59
|
+
id: string;
|
|
60
|
+
type: "acknowledge-codex";
|
|
61
|
+
} | {
|
|
62
|
+
failureId: string;
|
|
63
|
+
type: "dismiss-check";
|
|
64
|
+
} | {
|
|
65
|
+
type: "apply";
|
|
66
|
+
fingerprint?: string;
|
|
67
|
+
message?: string;
|
|
68
|
+
target: string;
|
|
69
|
+
untracked?: string[];
|
|
70
|
+
} | {
|
|
71
|
+
type: "commit";
|
|
72
|
+
fingerprint: string;
|
|
73
|
+
message: string;
|
|
74
|
+
untracked: string[];
|
|
75
|
+
} | {
|
|
76
|
+
type: "message";
|
|
77
|
+
fingerprint: string;
|
|
78
|
+
untracked: string[];
|
|
79
|
+
} | {
|
|
80
|
+
type: "prepare";
|
|
81
|
+
target: string;
|
|
82
|
+
} | {
|
|
83
|
+
type: "reject";
|
|
84
|
+
} | {
|
|
85
|
+
type: "reset-database";
|
|
86
|
+
} | {
|
|
87
|
+
type: "retry-install";
|
|
88
|
+
};
|
|
89
|
+
type ManagedDevActionResult = {
|
|
90
|
+
status: ManagedDevStatus;
|
|
91
|
+
};
|
|
92
|
+
type ManagedDevCodexMessage = {
|
|
93
|
+
kind: "agent" | "thought" | "user";
|
|
94
|
+
text: string;
|
|
95
|
+
};
|
|
96
|
+
type ManagedDevRebasedCommit = ManagedDevCommit;
|
|
97
|
+
type ManagedDevCodexCompletion = {
|
|
98
|
+
commits?: ManagedDevRebasedCommit[];
|
|
99
|
+
finalMessage: string;
|
|
100
|
+
id: string;
|
|
101
|
+
messages: ManagedDevCodexMessage[];
|
|
102
|
+
totalCommits?: number;
|
|
103
|
+
};
|
|
104
|
+
type ManagedDevCodexEvent = {
|
|
105
|
+
commits: ManagedDevRebasedCommit[];
|
|
106
|
+
message: ManagedDevCodexMessage;
|
|
107
|
+
phase: "start";
|
|
108
|
+
totalCommits?: number;
|
|
109
|
+
} | {
|
|
110
|
+
message: ManagedDevCodexMessage;
|
|
111
|
+
phase: "message";
|
|
112
|
+
} | {
|
|
113
|
+
finalMessage: string;
|
|
114
|
+
phase: "complete";
|
|
115
|
+
} | {
|
|
116
|
+
commits: ManagedDevRebasedCommit[];
|
|
117
|
+
phase: "progress";
|
|
118
|
+
totalCommits?: number;
|
|
119
|
+
} | {
|
|
120
|
+
phase: "error";
|
|
121
|
+
};
|
|
122
|
+
type ManagedDevActionRequest = {
|
|
123
|
+
action: ManagedDevAction;
|
|
124
|
+
requestId: string;
|
|
125
|
+
};
|
|
126
|
+
type ManagedDevActionResponse = Partial<ManagedDevActionResult> & {
|
|
127
|
+
error?: string;
|
|
128
|
+
requestId: string;
|
|
129
|
+
};
|
|
130
|
+
type ManagedDevCodexResponse = ManagedDevCodexEvent & {
|
|
131
|
+
requestId: string;
|
|
132
|
+
};
|
|
133
|
+
type ManagedDevStatusResponse = {
|
|
134
|
+
status: ManagedDevStatus;
|
|
135
|
+
};
|
|
136
|
+
//#endregion
|
|
137
|
+
export { ManagedDevAction, ManagedDevActionRequest, ManagedDevActionResponse, ManagedDevActionResult, ManagedDevCheck, ManagedDevCheckTrigger, ManagedDevChecks, ManagedDevCodexCompletion, ManagedDevCodexEvent, ManagedDevCodexMessage, ManagedDevCodexResponse, ManagedDevCommit, ManagedDevDraft, ManagedDevRebasedCommit, ManagedDevSetupFailure, ManagedDevStatus, ManagedDevStatusResponse, ManagedDevTarget, managedDevEnv, managedDevEvents };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=`COREFRAME_MANAGED_DEV`,t={action:`coreframe:managed-dev:action`,actionResult:`coreframe:managed-dev:action-result`,codex:`coreframe:managed-dev:codex`,status:`coreframe:managed-dev:status`,statusRequest:`coreframe:managed-dev:status-request`};export{e as managedDevEnv,t as managedDevEvents};
|
package/package.json
CHANGED
|
@@ -1,13 +1,44 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coreframe/dev-contracts",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "",
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
"
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Shared contracts for Coreframe managed development workflows",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/airlock-labs/coreframe.git",
|
|
8
|
+
"directory": "node/dev-contracts"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist/"
|
|
12
|
+
],
|
|
13
|
+
"type": "module",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"default": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./codex-task": {
|
|
20
|
+
"types": "./dist/codex-task.d.ts",
|
|
21
|
+
"default": "./dist/codex-task.js"
|
|
22
|
+
},
|
|
23
|
+
"./development-controls": {
|
|
24
|
+
"types": "./dist/development-controls.d.ts",
|
|
25
|
+
"default": "./dist/development-controls.js"
|
|
26
|
+
},
|
|
27
|
+
"./managed-dev": {
|
|
28
|
+
"types": "./dist/managed-dev.d.ts",
|
|
29
|
+
"default": "./dist/managed-dev.js"
|
|
30
|
+
}
|
|
8
31
|
},
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"tsdown": "0.22.3",
|
|
34
|
+
"typescript": "6.0.3",
|
|
35
|
+
"vitest": "^4.1.9"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "tsdown",
|
|
39
|
+
"test": "vitest run --reporter=minimal",
|
|
40
|
+
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
41
|
+
"format": "oxlint --fix && oxfmt",
|
|
42
|
+
"lint": "oxlint"
|
|
43
|
+
}
|
|
44
|
+
}
|
package/readme.md
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Coming soon...
|