@riddledc/riddle-proof 0.2.0 → 0.4.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 +10 -3
- package/dist/{chunk-2ZQNXVQC.js → chunk-5DC6YXN4.js} +4 -0
- package/dist/{chunk-EPVZKWUS.js → chunk-5FHUOSNO.js} +64 -1
- package/dist/{chunk-GWGXPNON.js → chunk-F65YYXVO.js} +92 -4
- package/dist/chunk-US63AYQU.js +684 -0
- package/dist/engine-harness.cjs +924 -0
- package/dist/engine-harness.d.cts +68 -0
- package/dist/engine-harness.d.ts +68 -0
- package/dist/engine-harness.js +12 -0
- package/dist/index.cjs +829 -2
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +15 -3
- package/dist/openclaw.cjs +10 -0
- package/dist/openclaw.d.cts +5 -0
- package/dist/openclaw.d.ts +5 -0
- package/dist/openclaw.js +7 -2
- package/dist/result.cjs +4 -0
- package/dist/result.js +1 -1
- package/dist/runner.cjs +135 -2
- package/dist/runner.d.cts +2 -1
- package/dist/runner.d.ts +2 -1
- package/dist/runner.js +3 -3
- package/dist/state.cjs +65 -0
- package/dist/state.d.cts +17 -2
- package/dist/state.d.ts +17 -2
- package/dist/state.js +6 -2
- package/dist/types.d.cts +51 -2
- package/dist/types.d.ts +51 -2
- package/package.json +7 -2
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { RiddleProofRunParams, RiddleProofRunState, RiddleProofBlocker, RiddleProofRunStatusSnapshot, RiddleProofRunResult } from './types.cjs';
|
|
2
|
+
|
|
3
|
+
type RiddleProofShipMode = "none" | "ship";
|
|
4
|
+
interface RiddleProofWorkflowParams extends Record<string, unknown> {
|
|
5
|
+
action: string;
|
|
6
|
+
state_path?: string;
|
|
7
|
+
}
|
|
8
|
+
interface RiddleProofEngineResult extends Record<string, unknown> {
|
|
9
|
+
ok?: boolean;
|
|
10
|
+
state_path?: string;
|
|
11
|
+
checkpoint?: string | null;
|
|
12
|
+
checkpointContract?: Record<string, unknown> | null;
|
|
13
|
+
decisionRequest?: Record<string, unknown> | null;
|
|
14
|
+
state?: Record<string, unknown> | null;
|
|
15
|
+
summary?: string;
|
|
16
|
+
shipGate?: Record<string, unknown> | null;
|
|
17
|
+
}
|
|
18
|
+
interface RiddleProofEngine {
|
|
19
|
+
execute(params: RiddleProofWorkflowParams): Promise<RiddleProofEngineResult>;
|
|
20
|
+
}
|
|
21
|
+
interface RiddleProofEngineHarnessConfig {
|
|
22
|
+
riddleProofDir?: string;
|
|
23
|
+
defaultReviewer?: string;
|
|
24
|
+
riddleEngineModuleUrl?: string;
|
|
25
|
+
stateDir?: string;
|
|
26
|
+
defaultMaxIterations?: number;
|
|
27
|
+
defaultShipMode?: RiddleProofShipMode;
|
|
28
|
+
}
|
|
29
|
+
interface RiddleProofAgentPayload {
|
|
30
|
+
ok?: boolean;
|
|
31
|
+
payload?: Record<string, unknown>;
|
|
32
|
+
summary?: string;
|
|
33
|
+
blocker?: RiddleProofBlocker;
|
|
34
|
+
diffDetected?: boolean;
|
|
35
|
+
changedFiles?: string[];
|
|
36
|
+
implementationNotes?: string;
|
|
37
|
+
}
|
|
38
|
+
interface RiddleProofEngineHarnessContext {
|
|
39
|
+
request: RiddleProofRunParams;
|
|
40
|
+
state: RiddleProofRunState;
|
|
41
|
+
engineResult: RiddleProofEngineResult;
|
|
42
|
+
fullRiddleState: Record<string, unknown> | null;
|
|
43
|
+
checkpoint: string;
|
|
44
|
+
}
|
|
45
|
+
interface RiddleProofAgentAdapter {
|
|
46
|
+
assessRecon(context: RiddleProofEngineHarnessContext): Promise<RiddleProofAgentPayload>;
|
|
47
|
+
authorProofPacket(context: RiddleProofEngineHarnessContext): Promise<RiddleProofAgentPayload>;
|
|
48
|
+
implementChange(context: RiddleProofEngineHarnessContext & {
|
|
49
|
+
workdir?: string | null;
|
|
50
|
+
}): Promise<RiddleProofAgentPayload>;
|
|
51
|
+
assessProof(context: RiddleProofEngineHarnessContext): Promise<RiddleProofAgentPayload>;
|
|
52
|
+
}
|
|
53
|
+
interface RunRiddleProofEngineHarnessInput {
|
|
54
|
+
request: RiddleProofRunParams;
|
|
55
|
+
engine?: RiddleProofEngine | (() => Promise<RiddleProofEngine>);
|
|
56
|
+
agent?: RiddleProofAgentAdapter;
|
|
57
|
+
config?: RiddleProofEngineHarnessConfig;
|
|
58
|
+
state?: RiddleProofRunState;
|
|
59
|
+
state_path?: string;
|
|
60
|
+
max_iterations?: number;
|
|
61
|
+
dry_run?: boolean;
|
|
62
|
+
auto_approve?: boolean;
|
|
63
|
+
}
|
|
64
|
+
declare function createDisabledRiddleProofAgentAdapter(): RiddleProofAgentAdapter;
|
|
65
|
+
declare function readRiddleProofRunStatus(state_path: string): RiddleProofRunStatusSnapshot | null;
|
|
66
|
+
declare function runRiddleProofEngineHarness(input: RunRiddleProofEngineHarnessInput): Promise<RiddleProofRunResult>;
|
|
67
|
+
|
|
68
|
+
export { type RiddleProofAgentAdapter, type RiddleProofAgentPayload, type RiddleProofEngine, type RiddleProofEngineHarnessConfig, type RiddleProofEngineHarnessContext, type RiddleProofEngineResult, type RiddleProofShipMode, type RiddleProofWorkflowParams, type RunRiddleProofEngineHarnessInput, createDisabledRiddleProofAgentAdapter, readRiddleProofRunStatus, runRiddleProofEngineHarness };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { RiddleProofRunParams, RiddleProofRunState, RiddleProofBlocker, RiddleProofRunStatusSnapshot, RiddleProofRunResult } from './types.js';
|
|
2
|
+
|
|
3
|
+
type RiddleProofShipMode = "none" | "ship";
|
|
4
|
+
interface RiddleProofWorkflowParams extends Record<string, unknown> {
|
|
5
|
+
action: string;
|
|
6
|
+
state_path?: string;
|
|
7
|
+
}
|
|
8
|
+
interface RiddleProofEngineResult extends Record<string, unknown> {
|
|
9
|
+
ok?: boolean;
|
|
10
|
+
state_path?: string;
|
|
11
|
+
checkpoint?: string | null;
|
|
12
|
+
checkpointContract?: Record<string, unknown> | null;
|
|
13
|
+
decisionRequest?: Record<string, unknown> | null;
|
|
14
|
+
state?: Record<string, unknown> | null;
|
|
15
|
+
summary?: string;
|
|
16
|
+
shipGate?: Record<string, unknown> | null;
|
|
17
|
+
}
|
|
18
|
+
interface RiddleProofEngine {
|
|
19
|
+
execute(params: RiddleProofWorkflowParams): Promise<RiddleProofEngineResult>;
|
|
20
|
+
}
|
|
21
|
+
interface RiddleProofEngineHarnessConfig {
|
|
22
|
+
riddleProofDir?: string;
|
|
23
|
+
defaultReviewer?: string;
|
|
24
|
+
riddleEngineModuleUrl?: string;
|
|
25
|
+
stateDir?: string;
|
|
26
|
+
defaultMaxIterations?: number;
|
|
27
|
+
defaultShipMode?: RiddleProofShipMode;
|
|
28
|
+
}
|
|
29
|
+
interface RiddleProofAgentPayload {
|
|
30
|
+
ok?: boolean;
|
|
31
|
+
payload?: Record<string, unknown>;
|
|
32
|
+
summary?: string;
|
|
33
|
+
blocker?: RiddleProofBlocker;
|
|
34
|
+
diffDetected?: boolean;
|
|
35
|
+
changedFiles?: string[];
|
|
36
|
+
implementationNotes?: string;
|
|
37
|
+
}
|
|
38
|
+
interface RiddleProofEngineHarnessContext {
|
|
39
|
+
request: RiddleProofRunParams;
|
|
40
|
+
state: RiddleProofRunState;
|
|
41
|
+
engineResult: RiddleProofEngineResult;
|
|
42
|
+
fullRiddleState: Record<string, unknown> | null;
|
|
43
|
+
checkpoint: string;
|
|
44
|
+
}
|
|
45
|
+
interface RiddleProofAgentAdapter {
|
|
46
|
+
assessRecon(context: RiddleProofEngineHarnessContext): Promise<RiddleProofAgentPayload>;
|
|
47
|
+
authorProofPacket(context: RiddleProofEngineHarnessContext): Promise<RiddleProofAgentPayload>;
|
|
48
|
+
implementChange(context: RiddleProofEngineHarnessContext & {
|
|
49
|
+
workdir?: string | null;
|
|
50
|
+
}): Promise<RiddleProofAgentPayload>;
|
|
51
|
+
assessProof(context: RiddleProofEngineHarnessContext): Promise<RiddleProofAgentPayload>;
|
|
52
|
+
}
|
|
53
|
+
interface RunRiddleProofEngineHarnessInput {
|
|
54
|
+
request: RiddleProofRunParams;
|
|
55
|
+
engine?: RiddleProofEngine | (() => Promise<RiddleProofEngine>);
|
|
56
|
+
agent?: RiddleProofAgentAdapter;
|
|
57
|
+
config?: RiddleProofEngineHarnessConfig;
|
|
58
|
+
state?: RiddleProofRunState;
|
|
59
|
+
state_path?: string;
|
|
60
|
+
max_iterations?: number;
|
|
61
|
+
dry_run?: boolean;
|
|
62
|
+
auto_approve?: boolean;
|
|
63
|
+
}
|
|
64
|
+
declare function createDisabledRiddleProofAgentAdapter(): RiddleProofAgentAdapter;
|
|
65
|
+
declare function readRiddleProofRunStatus(state_path: string): RiddleProofRunStatusSnapshot | null;
|
|
66
|
+
declare function runRiddleProofEngineHarness(input: RunRiddleProofEngineHarnessInput): Promise<RiddleProofRunResult>;
|
|
67
|
+
|
|
68
|
+
export { type RiddleProofAgentAdapter, type RiddleProofAgentPayload, type RiddleProofEngine, type RiddleProofEngineHarnessConfig, type RiddleProofEngineHarnessContext, type RiddleProofEngineResult, type RiddleProofShipMode, type RiddleProofWorkflowParams, type RunRiddleProofEngineHarnessInput, createDisabledRiddleProofAgentAdapter, readRiddleProofRunStatus, runRiddleProofEngineHarness };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createDisabledRiddleProofAgentAdapter,
|
|
3
|
+
readRiddleProofRunStatus,
|
|
4
|
+
runRiddleProofEngineHarness
|
|
5
|
+
} from "./chunk-US63AYQU.js";
|
|
6
|
+
import "./chunk-5FHUOSNO.js";
|
|
7
|
+
import "./chunk-5DC6YXN4.js";
|
|
8
|
+
export {
|
|
9
|
+
createDisabledRiddleProofAgentAdapter,
|
|
10
|
+
readRiddleProofRunStatus,
|
|
11
|
+
runRiddleProofEngineHarness
|
|
12
|
+
};
|