@eyeauras/insight-cli 0.0.0-stage → 0.2.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/.cli-package-build.json +1 -0
- package/LICENSE +21 -0
- package/README.md +60 -2
- package/SKILL.md +58 -0
- package/dist/src/administration-results.d.ts +1 -0
- package/dist/src/administration-results.js +84 -0
- package/dist/src/administration.d.ts +14 -0
- package/dist/src/administration.js +134 -0
- package/dist/src/archive-contract.d.ts +6 -0
- package/dist/src/archive-contract.js +108 -0
- package/dist/src/archive.d.ts +12 -0
- package/dist/src/archive.js +116 -0
- package/dist/src/arguments.d.ts +14 -0
- package/dist/src/arguments.js +62 -0
- package/dist/src/artifacts.d.ts +17 -0
- package/dist/src/artifacts.js +115 -0
- package/dist/src/bin.d.ts +2 -0
- package/dist/src/bin.js +4 -0
- package/dist/src/cli.d.ts +10 -0
- package/dist/src/cli.js +419 -0
- package/dist/src/comment-effects.d.ts +3 -0
- package/dist/src/comment-effects.js +55 -0
- package/dist/src/contexts.d.ts +115 -0
- package/dist/src/contexts.js +1078 -0
- package/dist/src/coordinator.d.ts +41 -0
- package/dist/src/coordinator.js +160 -0
- package/dist/src/cross-results.d.ts +14 -0
- package/dist/src/cross-results.js +71 -0
- package/dist/src/cross.d.ts +3 -0
- package/dist/src/cross.js +43 -0
- package/dist/src/data-effects.d.ts +3 -0
- package/dist/src/data-effects.js +103 -0
- package/dist/src/debugger-results.d.ts +4 -0
- package/dist/src/debugger-results.js +151 -0
- package/dist/src/debugger-supervisor.d.ts +1 -0
- package/dist/src/debugger-supervisor.js +136 -0
- package/dist/src/debugger.d.ts +21 -0
- package/dist/src/debugger.js +267 -0
- package/dist/src/documentation-effects.d.ts +5 -0
- package/dist/src/documentation-effects.js +56 -0
- package/dist/src/extensions.d.ts +64 -0
- package/dist/src/extensions.js +289 -0
- package/dist/src/function-effects.d.ts +4 -0
- package/dist/src/function-effects.js +112 -0
- package/dist/src/ghidra.d.ts +50 -0
- package/dist/src/ghidra.js +468 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +1 -0
- package/dist/src/initial-model.d.ts +6 -0
- package/dist/src/initial-model.js +85 -0
- package/dist/src/json.d.ts +2 -0
- package/dist/src/json.js +8 -0
- package/dist/src/lifecycle.d.ts +49 -0
- package/dist/src/lifecycle.js +154 -0
- package/dist/src/memory-inputs.d.ts +8 -0
- package/dist/src/memory-inputs.js +56 -0
- package/dist/src/merge.d.ts +29 -0
- package/dist/src/merge.js +66 -0
- package/dist/src/model.d.ts +74 -0
- package/dist/src/model.js +67 -0
- package/dist/src/mutation-effects.d.ts +4 -0
- package/dist/src/mutation-effects.js +321 -0
- package/dist/src/mutation-inputs.d.ts +2 -0
- package/dist/src/mutation-inputs.js +71 -0
- package/dist/src/mutations.d.ts +4 -0
- package/dist/src/mutations.js +53 -0
- package/dist/src/native-inputs.d.ts +28 -0
- package/dist/src/native-inputs.js +182 -0
- package/dist/src/native-queries.d.ts +2 -0
- package/dist/src/native-queries.js +29 -0
- package/dist/src/projects.d.ts +31 -0
- package/dist/src/projects.js +301 -0
- package/dist/src/prototype-cli.d.ts +8 -0
- package/dist/src/prototype-cli.js +155 -0
- package/dist/src/queries.d.ts +5 -0
- package/dist/src/queries.js +84 -0
- package/dist/src/query-policy.d.ts +6 -0
- package/dist/src/query-policy.js +72 -0
- package/dist/src/query-results.d.ts +2 -0
- package/dist/src/query-results.js +224 -0
- package/dist/src/research.d.ts +184 -0
- package/dist/src/research.js +808 -0
- package/dist/src/runtime-archives.d.ts +5 -0
- package/dist/src/runtime-archives.js +127 -0
- package/dist/src/runtime-catalog.d.ts +18 -0
- package/dist/src/runtime-catalog.js +27 -0
- package/dist/src/runtime-manager.d.ts +101 -0
- package/dist/src/runtime-manager.js +444 -0
- package/dist/src/runtime-selection.d.ts +13 -0
- package/dist/src/runtime-selection.js +25 -0
- package/dist/src/saved-materials.d.ts +12 -0
- package/dist/src/saved-materials.js +196 -0
- package/dist/src/scripts.d.ts +19 -0
- package/dist/src/scripts.js +79 -0
- package/dist/src/sdk-contracts.d.ts +13 -0
- package/dist/src/sdk-contracts.js +37 -0
- package/dist/src/sdk-files.d.ts +29 -0
- package/dist/src/sdk-files.js +249 -0
- package/dist/src/sdk.d.ts +4 -0
- package/dist/src/sdk.js +125 -0
- package/dist/src/server.d.ts +46 -0
- package/dist/src/server.js +460 -0
- package/dist/src/store.d.ts +33 -0
- package/dist/src/store.js +178 -0
- package/dist/src/sync-policy.d.ts +22 -0
- package/dist/src/sync-policy.js +123 -0
- package/dist/src/transport.d.ts +23 -0
- package/dist/src/transport.js +135 -0
- package/dist/src/ui-results.d.ts +2 -0
- package/dist/src/ui-results.js +80 -0
- package/dist/src/ui.d.ts +17 -0
- package/dist/src/ui.js +88 -0
- package/dist/src/utility.d.ts +14 -0
- package/dist/src/utility.js +43 -0
- package/dist/src/version-tracking.d.ts +57 -0
- package/dist/src/version-tracking.js +200 -0
- package/dist/src/workspace.d.ts +199 -0
- package/dist/src/workspace.js +564 -0
- package/package.json +47 -4
- package/references/InsightRepositoryProbe.java +55 -0
- package/references/administration.md +34 -0
- package/references/archive.md +32 -0
- package/references/artifacts.md +47 -0
- package/references/debugger.md +40 -0
- package/references/extensions-and-sync.md +124 -0
- package/references/managed-runtime.md +116 -0
- package/references/mutations.json +1424 -0
- package/references/native/InsightApplyDocumentation.java +48 -0
- package/references/native/InsightArchivePayloads.java +36 -0
- package/references/native/InsightBlockTransfer.java +57 -0
- package/references/native/InsightEmulation.java +93 -0
- package/references/native/InsightExtensions.java +36 -0
- package/references/native/InsightFunctionDatabases.java +98 -0
- package/references/native/InsightGuiMain.java +32 -0
- package/references/native/InsightHeadlessMain.java +10 -0
- package/references/native/InsightInitialImport.java +42 -0
- package/references/native/InsightInitialJournal.java +48 -0
- package/references/native/InsightInitialPublication.java +142 -0
- package/references/native/InsightKeytool.java +16 -0
- package/references/native/InsightNativeReceipt.java +31 -0
- package/references/native/InsightPlugins.java +34 -0
- package/references/native/InsightProjectFiles.java +92 -0
- package/references/native/InsightPublicationRecovery.java +63 -0
- package/references/native/InsightPythonWheels.java +31 -0
- package/references/native/InsightResearchQueries.java +188 -0
- package/references/native/InsightRuntimeDoctor.java +33 -0
- package/references/native/InsightSdkFiles.java +142 -0
- package/references/native/InsightSdkScript.java +31 -0
- package/references/native/InsightSdkTools.java +338 -0
- package/references/native/InsightSdkTypes.java +132 -0
- package/references/native/InsightServerAdministration.java +82 -0
- package/references/native/InsightServerInit.java +62 -0
- package/references/native/InsightServerMain.java +43 -0
- package/references/native/InsightServerProbe.java +29 -0
- package/references/native/InsightSnapshotFields.java +68 -0
- package/references/native/InsightSnapshotInspect.java +189 -0
- package/references/native/InsightSnapshotPublisher.java +123 -0
- package/references/native/InsightStartDebugger.java +28 -0
- package/references/native/InsightStopDebugger.java +20 -0
- package/references/native/InsightTraceInspect.java +24 -0
- package/references/native/InsightTraceState.java +130 -0
- package/references/native/InsightTraceTools.java +114 -0
- package/references/native/InsightVersionTracking.java +91 -0
- package/references/native-workflows.md +112 -0
- package/references/queries.json +1761 -0
- package/references/query-semantics.md +96 -0
- package/references/recovery.md +53 -0
- package/references/research.md +101 -0
- package/references/setup.md +49 -0
- package/runtime/GhidraMCP-7.0.0.jar +0 -0
- package/runtime/GhidraMCP-LICENSE +202 -0
- package/runtime/GhidraMCP-NOTICE +10 -0
- package/runtime/provenance.json +11 -0
- package/skills/insight-re/SKILL.md +108 -0
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import type { Artifact } from './artifacts.js';
|
|
2
|
+
import type { GhidraContext, Scope, ScalarChange, Publication, DebuggerState, GhidraLoadSettings } from './workspace.js';
|
|
3
|
+
import { Workspace } from './workspace.js';
|
|
4
|
+
import type { ToolMode } from './contexts.js';
|
|
5
|
+
import type { ScriptPage } from './scripts.js';
|
|
6
|
+
export interface ResearchBackend {
|
|
7
|
+
sdkFile?(operation: string, p: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
8
|
+
archivePayloads?(scope: Scope, p: Record<string, unknown>): Promise<unknown>;
|
|
9
|
+
debuggerStart?(scope: Scope): Promise<void>;
|
|
10
|
+
debuggerCall?(scope: Scope, operation: string, p?: Record<string, unknown>): Promise<unknown>;
|
|
11
|
+
debuggerSaved?(scope: Scope): Promise<DebuggerState>;
|
|
12
|
+
debuggerSelect?(scope: Scope, trace: string): Promise<void>;
|
|
13
|
+
debuggerStop?(scope: Scope): Promise<void>;
|
|
14
|
+
debuggerLaunch?(scope: Scope, p: Record<string, unknown>, request: string): Promise<unknown>;
|
|
15
|
+
ui?(scope: Scope, operation: string, parameters: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
16
|
+
project?(operation: string, parameters: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
17
|
+
projectOutcome?(requestId: string, expected: Record<string, unknown>): Promise<Record<string, unknown> | undefined>;
|
|
18
|
+
administration?(operation: string, parameters: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
19
|
+
open(scope: Scope, request?: string): Promise<GhidraContext>;
|
|
20
|
+
call(scope: Scope, operation: string, parameters?: Record<string, unknown>): Promise<unknown>;
|
|
21
|
+
saved(scope: Scope): Promise<Artifact>;
|
|
22
|
+
mode(scope: Scope, mode: ToolMode): Promise<void>;
|
|
23
|
+
close(scope: Scope): Promise<void>;
|
|
24
|
+
closed?(scope: Scope): Promise<boolean>;
|
|
25
|
+
dispose(): Promise<void>;
|
|
26
|
+
latest?(target: string): Promise<{
|
|
27
|
+
revision: number;
|
|
28
|
+
snapshot: Artifact;
|
|
29
|
+
}>;
|
|
30
|
+
fields?(snapshot: Artifact, changes: Pick<ScalarChange, 'address' | 'field'>[]): Promise<Record<string, {
|
|
31
|
+
value: string | null;
|
|
32
|
+
dependency: string;
|
|
33
|
+
exists: boolean;
|
|
34
|
+
}>>;
|
|
35
|
+
candidate?(target: string, snapshot: Artifact, changes: ScalarChange[]): Promise<Artifact>;
|
|
36
|
+
publish?(publication: Publication): Promise<{
|
|
37
|
+
state: 'published';
|
|
38
|
+
revision: number;
|
|
39
|
+
} | {
|
|
40
|
+
state: 'conflict';
|
|
41
|
+
applied: 0;
|
|
42
|
+
}>;
|
|
43
|
+
recover?(publication: Publication): Promise<{
|
|
44
|
+
state: 'verified';
|
|
45
|
+
revision: number;
|
|
46
|
+
} | {
|
|
47
|
+
state: 'unknown';
|
|
48
|
+
}>;
|
|
49
|
+
recoverModel?(target: string): Promise<boolean>;
|
|
50
|
+
scripts?(scope: Scope, filter: string, limit: number, offset: number): Promise<ScriptPage>;
|
|
51
|
+
inspect?(snapshot: Artifact, parameters: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
52
|
+
pair?(selected: Scope, other: Scope, snapshot: Artifact, operation: string, parameters: Record<string, unknown>): Promise<unknown>;
|
|
53
|
+
transfer?(selected: Scope, source: Artifact, dryRun: boolean): Promise<unknown>;
|
|
54
|
+
transferCheck?(selected: Scope, source: Artifact, candidate: Artifact): Promise<unknown>;
|
|
55
|
+
}
|
|
56
|
+
export declare function address(value: unknown): string;
|
|
57
|
+
export declare const publicAddress: (value: unknown) => string;
|
|
58
|
+
export declare function scalarText(value: unknown): string | null;
|
|
59
|
+
export declare function commentKind(value: unknown): "eol" | "pre" | "post" | "plate" | "repeatable";
|
|
60
|
+
export declare function number(value: unknown, maximum: number, minimum?: number): number;
|
|
61
|
+
export declare function scope(options: Record<string, unknown>): Scope;
|
|
62
|
+
/** One ordered working context per tuple, shared by every transport through the Factory owner. */
|
|
63
|
+
export declare class Research {
|
|
64
|
+
readonly workspace: Workspace;
|
|
65
|
+
private readonly backend;
|
|
66
|
+
private readonly tasks;
|
|
67
|
+
constructor(workspace: Workspace, backend: () => Promise<ResearchBackend>, tasks?: Map<string, Promise<unknown>>);
|
|
68
|
+
ordered<T>(selected: Scope, action: () => Promise<T>): Promise<T>;
|
|
69
|
+
boundary<T>(selected: Scope, action: () => Promise<T>): Promise<T>;
|
|
70
|
+
status(selected: Scope): {
|
|
71
|
+
externalRequests: {
|
|
72
|
+
operation: string;
|
|
73
|
+
state: import("./workspace.js").RequestState;
|
|
74
|
+
requestId?: string | undefined;
|
|
75
|
+
}[];
|
|
76
|
+
externalRequestsTruncated: boolean;
|
|
77
|
+
ghidra: {
|
|
78
|
+
syncPolicy: import("./workspace.js").SyncPolicy;
|
|
79
|
+
state: "opening" | "ready" | "stopped" | "needs_recovery";
|
|
80
|
+
baseRevision: string | undefined;
|
|
81
|
+
sharedRevision: string | undefined;
|
|
82
|
+
pendingChanges: number;
|
|
83
|
+
mergeState: string;
|
|
84
|
+
conflicts: {
|
|
85
|
+
address: string;
|
|
86
|
+
field: "function.name" | "comment.eol" | "comment.pre" | "comment.post" | "comment.plate" | "comment.repeatable";
|
|
87
|
+
original: string | null;
|
|
88
|
+
local: string | null;
|
|
89
|
+
shared: string | null;
|
|
90
|
+
}[];
|
|
91
|
+
unresolvedRequests: {
|
|
92
|
+
operation: string;
|
|
93
|
+
state: import("./workspace.js").RequestState;
|
|
94
|
+
requestId?: string | undefined;
|
|
95
|
+
}[];
|
|
96
|
+
};
|
|
97
|
+
session: string;
|
|
98
|
+
target: string;
|
|
99
|
+
};
|
|
100
|
+
open(target: string, session: string | 'new', settings: GhidraLoadSettings, callerId?: string, mode?: ToolMode): Promise<{
|
|
101
|
+
[k: string]: unknown;
|
|
102
|
+
} | {
|
|
103
|
+
session: string;
|
|
104
|
+
target: string;
|
|
105
|
+
state: string;
|
|
106
|
+
baseRevision: string | undefined;
|
|
107
|
+
sharedRevision: string | undefined;
|
|
108
|
+
pendingChanges: number;
|
|
109
|
+
}>;
|
|
110
|
+
read(selected: Scope, operation: string, parameters: Record<string, unknown>): Promise<unknown>;
|
|
111
|
+
scripts(selected: Scope, filter: string, limit: number, offset: number): Promise<ScriptPage>;
|
|
112
|
+
paired<T>(selected: Scope, other: Scope, action: () => Promise<T>): Promise<T>;
|
|
113
|
+
crossRead(selected: Scope, other: Scope, operation: string, parameters: Record<string, unknown>): Promise<unknown>;
|
|
114
|
+
private savedScalars;
|
|
115
|
+
transfer(selected: Scope, source: Scope, dryRun: boolean, callerId?: string): Promise<unknown>;
|
|
116
|
+
strings(selected: Scope, contains: string, limit: number, offset: number): Promise<{
|
|
117
|
+
scan?: unknown;
|
|
118
|
+
totalKnown?: boolean | undefined;
|
|
119
|
+
items: {
|
|
120
|
+
address: string;
|
|
121
|
+
text: string;
|
|
122
|
+
}[];
|
|
123
|
+
offset: number;
|
|
124
|
+
limit: number;
|
|
125
|
+
total: number;
|
|
126
|
+
truncated: boolean;
|
|
127
|
+
session: string;
|
|
128
|
+
target: string;
|
|
129
|
+
}>;
|
|
130
|
+
function(selected: Scope, at: string, decompile?: boolean): Promise<{
|
|
131
|
+
code?: unknown;
|
|
132
|
+
truncated?: boolean | undefined;
|
|
133
|
+
address: string;
|
|
134
|
+
name: unknown;
|
|
135
|
+
signature: string;
|
|
136
|
+
comments: Record<string, string | null>;
|
|
137
|
+
session: string;
|
|
138
|
+
target: string;
|
|
139
|
+
}>;
|
|
140
|
+
xrefs(selected: Scope, at: string, limit: number, offset: number): Promise<{
|
|
141
|
+
items: ({
|
|
142
|
+
from: null;
|
|
143
|
+
to: string;
|
|
144
|
+
kind: string;
|
|
145
|
+
source: string;
|
|
146
|
+
} | {
|
|
147
|
+
function?: {
|
|
148
|
+
address: string;
|
|
149
|
+
name: unknown;
|
|
150
|
+
} | undefined;
|
|
151
|
+
from: string;
|
|
152
|
+
to: string;
|
|
153
|
+
kind: string;
|
|
154
|
+
source?: undefined;
|
|
155
|
+
})[];
|
|
156
|
+
offset: number;
|
|
157
|
+
limit: number;
|
|
158
|
+
total: number;
|
|
159
|
+
truncated: boolean;
|
|
160
|
+
session: string;
|
|
161
|
+
target: string;
|
|
162
|
+
}>;
|
|
163
|
+
comment(selected: Scope, at: string, kind?: ReturnType<typeof commentKind>): Promise<{
|
|
164
|
+
kind: "eol" | "pre" | "post" | "plate" | "repeatable";
|
|
165
|
+
text: string | null | undefined;
|
|
166
|
+
sharedState: string;
|
|
167
|
+
address: string;
|
|
168
|
+
session: string;
|
|
169
|
+
target: string;
|
|
170
|
+
} | {
|
|
171
|
+
comments: Record<string, string | null>;
|
|
172
|
+
address: string;
|
|
173
|
+
session: string;
|
|
174
|
+
target: string;
|
|
175
|
+
}>;
|
|
176
|
+
edit(selected: Scope, at: string, field: ScalarChange['field'], value: string | null, callerId?: string, resolution?: {
|
|
177
|
+
expectedShared: string | null;
|
|
178
|
+
}): Promise<unknown>;
|
|
179
|
+
private sharedOrder;
|
|
180
|
+
private reconcile;
|
|
181
|
+
merge(selected: Scope, callerId?: string): Promise<unknown>;
|
|
182
|
+
refresh(selected: Scope, callerId?: string): Promise<unknown>;
|
|
183
|
+
mutate(selected: Scope, operation: string, parameters: Record<string, unknown>, verify: (backend: ResearchBackend, result: Record<string, unknown>) => Promise<unknown>, callerId?: string, verifySaved?: (backend: ResearchBackend, snapshot: Artifact, result: Record<string, unknown>) => Promise<unknown>): Promise<unknown>;
|
|
184
|
+
}
|