@spotpatch/dev-server 0.3.0 → 0.5.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/dist/index.cjs +393 -114
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +44 -2
- package/dist/index.d.ts +44 -2
- package/dist/index.js +390 -102
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { applyPreparedAgentChange, executeAgentChange, inspectAgentWorkspace, probeProviderCapability, resolveProviderCredential, revertPreparedAgentChange } from '@spotpatch/agent';
|
|
2
|
-
import { AgentJobEvent, AgentJobSnapshot, AgentJobCreateRequest, AgentCapabilityRequest, AgentCapabilitySnapshot, AgentJobResultResponse, AgentWorkspaceHealthSnapshot, ResolvedAiOptions, SpotPatchEditorPreference, ContextBudget, SpotPatchLocalePreference, AiProviderProtocol, AiProviderAuthentication, AiExecutionOptions, AiOptions, RuntimeAiConfig, ResolvedAgentCheckDefinition, SpotPatchRuntimeConfig } from '@spotpatch/shared';
|
|
2
|
+
import { AgentJobEvent, AgentJobSnapshot, AgentJobCreateRequest, AgentCapabilityRequest, AgentCapabilitySnapshot, AgentJobResultResponse, AgentWorkspaceHealthSnapshot, ResolvedAiOptions, SpotPatchEditorPreference, ContextBudget, SpotPatchLocalePreference, DataFlowLimits, AiProviderProtocol, AiProviderAuthentication, AiExecutionOptions, AiOptions, RuntimeAiConfig, RuntimeDataFlowConfig, ResolvedAgentCheckDefinition, SpotPatchRuntimeConfig } from '@spotpatch/shared';
|
|
3
3
|
import { SourceFilterEntry } from '@spotpatch/compiler';
|
|
4
4
|
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
5
5
|
|
|
@@ -47,6 +47,9 @@ interface SimpleAiOptions {
|
|
|
47
47
|
readonly execution?: AiExecutionOptions;
|
|
48
48
|
}
|
|
49
49
|
type SpotPatchAiOptions = false | SimpleAiOptions | AiOptions;
|
|
50
|
+
interface SpotPatchDataFlowOptions {
|
|
51
|
+
readonly runtime?: "dispatch";
|
|
52
|
+
}
|
|
50
53
|
interface SpotPatchOptions {
|
|
51
54
|
readonly enabled?: boolean;
|
|
52
55
|
readonly include?: readonly FilterEntry[];
|
|
@@ -62,6 +65,7 @@ interface SpotPatchOptions {
|
|
|
62
65
|
readonly locale?: SpotPatchLocalePreference;
|
|
63
66
|
readonly maxTargets?: number;
|
|
64
67
|
readonly ai?: SpotPatchAiOptions;
|
|
68
|
+
readonly dataFlow?: false | SpotPatchDataFlowOptions;
|
|
65
69
|
}
|
|
66
70
|
interface ResolvedSpotPatchOptions {
|
|
67
71
|
readonly enabled: boolean;
|
|
@@ -76,6 +80,12 @@ interface ResolvedSpotPatchOptions {
|
|
|
76
80
|
readonly locale: SpotPatchLocalePreference;
|
|
77
81
|
readonly maxTargets: number;
|
|
78
82
|
readonly ai: false | ResolvedAiOptions;
|
|
83
|
+
readonly dataFlow: ResolvedSpotPatchDataFlowOptions;
|
|
84
|
+
}
|
|
85
|
+
interface ResolvedSpotPatchDataFlowOptions {
|
|
86
|
+
readonly enabled: boolean;
|
|
87
|
+
readonly runtime: "dispatch";
|
|
88
|
+
readonly limits: DataFlowLimits;
|
|
79
89
|
}
|
|
80
90
|
declare const DEFAULT_EXCLUDE: readonly RegExp[];
|
|
81
91
|
declare const DEFAULT_OPTIONS: Readonly<{
|
|
@@ -98,8 +108,28 @@ declare const DEFAULT_OPTIONS: Readonly<{
|
|
|
98
108
|
locale: "auto";
|
|
99
109
|
maxTargets: number;
|
|
100
110
|
ai: false;
|
|
111
|
+
dataFlow: Readonly<{
|
|
112
|
+
enabled: false;
|
|
113
|
+
runtime: "dispatch";
|
|
114
|
+
limits: Readonly<{
|
|
115
|
+
readonly observationMaxEntries: 100;
|
|
116
|
+
readonly observationMaxBytes: number;
|
|
117
|
+
readonly observationTtlMs: 300000;
|
|
118
|
+
readonly protocolRequestMaxBytes: number;
|
|
119
|
+
readonly reportMaxBytes: number;
|
|
120
|
+
readonly reportMaxEvidence: 200;
|
|
121
|
+
readonly reportMaxDiagnostics: 256;
|
|
122
|
+
readonly capabilityMaxReasons: 64;
|
|
123
|
+
readonly graphMaxDepth: 5;
|
|
124
|
+
readonly graphMaxModules: 50;
|
|
125
|
+
readonly graphMaxCallsites: 100;
|
|
126
|
+
readonly analysisTimeoutMs: 2000;
|
|
127
|
+
readonly reportMaxFields: 100;
|
|
128
|
+
}>;
|
|
129
|
+
}>;
|
|
101
130
|
}>;
|
|
102
131
|
declare function createRuntimeAiConfig(options: false | ResolvedAiOptions): RuntimeAiConfig;
|
|
132
|
+
declare function createRuntimeDataFlowConfig(options: ResolvedSpotPatchDataFlowOptions): RuntimeDataFlowConfig;
|
|
103
133
|
declare function resolveOptions(options?: SpotPatchOptions, environmentAi?: false | SimpleAiOptions): ResolvedSpotPatchOptions;
|
|
104
134
|
|
|
105
135
|
interface EnvironmentAiConfiguration {
|
|
@@ -140,9 +170,20 @@ type SourceIdFactory = () => string;
|
|
|
140
170
|
|
|
141
171
|
interface SourceRegistry {
|
|
142
172
|
register(absolutePath: string): string;
|
|
173
|
+
registerDataFlowComponents(absolutePath: string, sourceVersion: string, components: readonly DataFlowComponentAnchorInput[]): void;
|
|
143
174
|
resolve(fileId: string): string | undefined;
|
|
175
|
+
resolveDataFlowComponent(componentSourceId: string): DataFlowComponentAnchor | undefined;
|
|
144
176
|
clear(): void;
|
|
145
177
|
}
|
|
178
|
+
interface DataFlowComponentAnchorInput {
|
|
179
|
+
readonly componentSourceId: string;
|
|
180
|
+
readonly line: number;
|
|
181
|
+
readonly column: number;
|
|
182
|
+
}
|
|
183
|
+
interface DataFlowComponentAnchor extends DataFlowComponentAnchorInput {
|
|
184
|
+
readonly fileId: string;
|
|
185
|
+
readonly sourceVersion: string;
|
|
186
|
+
}
|
|
146
187
|
interface SourceRegistryOptions {
|
|
147
188
|
readonly createId?: SourceIdFactory;
|
|
148
189
|
}
|
|
@@ -217,6 +258,7 @@ interface SerializedSpotPatchOptions {
|
|
|
217
258
|
readonly allowLan: boolean;
|
|
218
259
|
readonly budget: Readonly<ContextBudget>;
|
|
219
260
|
readonly debug: boolean;
|
|
261
|
+
readonly dataFlow: false | SpotPatchDataFlowOptions;
|
|
220
262
|
readonly editor: SpotPatchEditorPreference;
|
|
221
263
|
readonly enabled: boolean;
|
|
222
264
|
readonly exclude: readonly SerializedFilterEntry[];
|
|
@@ -229,4 +271,4 @@ interface SerializedSpotPatchOptions {
|
|
|
229
271
|
declare function serializeResolvedSpotPatchOptions(options: ResolvedSpotPatchOptions): SerializedSpotPatchOptions;
|
|
230
272
|
declare function parseSerializedSpotPatchOptions(value: unknown): ResolvedSpotPatchOptions;
|
|
231
273
|
|
|
232
|
-
export { type AgentJobEventListener, type AgentJobManager, type CreateAgentJobManagerOptions, type CreateMiddlewareOptions, DEFAULT_EXCLUDE, DEFAULT_OPTIONS, type DiscoverProjectValidationCheckOptions, type EnvironmentAiConfiguration, type FilterEntry, type IntegrationFileChange, type IntegrationPlan, type ResolveProjectOptionsInput, type ResolvedRuntimeBootstrapOptions, type ResolvedSpotPatchOptions, type RuntimeBootstrapOptions, type SerializedFilterEntry, type SerializedSpotPatchOptions, type SimpleAiOptions, type SourceRegistrationHandler, type SourceRegistrationService, type SourceRegistrationServiceOptions, type SourceRegistry, type SpotPatchAiOptions, type SpotPatchMiddleware, type SpotPatchNext, type SpotPatchOptions, type SpotPatchServerLogger, type SpotPatchSession, applyIntegrationPlan, createAgentJobManager, createIntegrationFileChange, createRuntimeAiConfig, createSession, createSourceRegistrationService, createSourceRegistry, createSpotPatchMiddleware, discoverProjectValidationCheck, integrationPathExists, isLoopbackHostname, parseSerializedSpotPatchOptions, readIntegrationFile, readJsonRequestBody, readRuntimeBootstrap, resolveCredentialEnvironment, resolveEnvironmentAiConfiguration, resolveOptions, resolveProjectOptions, resolveRuntimeBootstrapOptions, serializeResolvedSpotPatchOptions };
|
|
274
|
+
export { type AgentJobEventListener, type AgentJobManager, type CreateAgentJobManagerOptions, type CreateMiddlewareOptions, DEFAULT_EXCLUDE, DEFAULT_OPTIONS, type DiscoverProjectValidationCheckOptions, type EnvironmentAiConfiguration, type FilterEntry, type IntegrationFileChange, type IntegrationPlan, type ResolveProjectOptionsInput, type ResolvedRuntimeBootstrapOptions, type ResolvedSpotPatchDataFlowOptions, type ResolvedSpotPatchOptions, type RuntimeBootstrapOptions, type SerializedFilterEntry, type SerializedSpotPatchOptions, type SimpleAiOptions, type SourceRegistrationHandler, type SourceRegistrationService, type SourceRegistrationServiceOptions, type SourceRegistry, type SpotPatchAiOptions, type SpotPatchDataFlowOptions, type SpotPatchMiddleware, type SpotPatchNext, type SpotPatchOptions, type SpotPatchServerLogger, type SpotPatchSession, applyIntegrationPlan, createAgentJobManager, createIntegrationFileChange, createRuntimeAiConfig, createRuntimeDataFlowConfig, createSession, createSourceRegistrationService, createSourceRegistry, createSpotPatchMiddleware, discoverProjectValidationCheck, integrationPathExists, isLoopbackHostname, parseSerializedSpotPatchOptions, readIntegrationFile, readJsonRequestBody, readRuntimeBootstrap, resolveCredentialEnvironment, resolveEnvironmentAiConfiguration, resolveOptions, resolveProjectOptions, resolveRuntimeBootstrapOptions, serializeResolvedSpotPatchOptions };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { applyPreparedAgentChange, executeAgentChange, inspectAgentWorkspace, probeProviderCapability, resolveProviderCredential, revertPreparedAgentChange } from '@spotpatch/agent';
|
|
2
|
-
import { AgentJobEvent, AgentJobSnapshot, AgentJobCreateRequest, AgentCapabilityRequest, AgentCapabilitySnapshot, AgentJobResultResponse, AgentWorkspaceHealthSnapshot, ResolvedAiOptions, SpotPatchEditorPreference, ContextBudget, SpotPatchLocalePreference, AiProviderProtocol, AiProviderAuthentication, AiExecutionOptions, AiOptions, RuntimeAiConfig, ResolvedAgentCheckDefinition, SpotPatchRuntimeConfig } from '@spotpatch/shared';
|
|
2
|
+
import { AgentJobEvent, AgentJobSnapshot, AgentJobCreateRequest, AgentCapabilityRequest, AgentCapabilitySnapshot, AgentJobResultResponse, AgentWorkspaceHealthSnapshot, ResolvedAiOptions, SpotPatchEditorPreference, ContextBudget, SpotPatchLocalePreference, DataFlowLimits, AiProviderProtocol, AiProviderAuthentication, AiExecutionOptions, AiOptions, RuntimeAiConfig, RuntimeDataFlowConfig, ResolvedAgentCheckDefinition, SpotPatchRuntimeConfig } from '@spotpatch/shared';
|
|
3
3
|
import { SourceFilterEntry } from '@spotpatch/compiler';
|
|
4
4
|
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
5
5
|
|
|
@@ -47,6 +47,9 @@ interface SimpleAiOptions {
|
|
|
47
47
|
readonly execution?: AiExecutionOptions;
|
|
48
48
|
}
|
|
49
49
|
type SpotPatchAiOptions = false | SimpleAiOptions | AiOptions;
|
|
50
|
+
interface SpotPatchDataFlowOptions {
|
|
51
|
+
readonly runtime?: "dispatch";
|
|
52
|
+
}
|
|
50
53
|
interface SpotPatchOptions {
|
|
51
54
|
readonly enabled?: boolean;
|
|
52
55
|
readonly include?: readonly FilterEntry[];
|
|
@@ -62,6 +65,7 @@ interface SpotPatchOptions {
|
|
|
62
65
|
readonly locale?: SpotPatchLocalePreference;
|
|
63
66
|
readonly maxTargets?: number;
|
|
64
67
|
readonly ai?: SpotPatchAiOptions;
|
|
68
|
+
readonly dataFlow?: false | SpotPatchDataFlowOptions;
|
|
65
69
|
}
|
|
66
70
|
interface ResolvedSpotPatchOptions {
|
|
67
71
|
readonly enabled: boolean;
|
|
@@ -76,6 +80,12 @@ interface ResolvedSpotPatchOptions {
|
|
|
76
80
|
readonly locale: SpotPatchLocalePreference;
|
|
77
81
|
readonly maxTargets: number;
|
|
78
82
|
readonly ai: false | ResolvedAiOptions;
|
|
83
|
+
readonly dataFlow: ResolvedSpotPatchDataFlowOptions;
|
|
84
|
+
}
|
|
85
|
+
interface ResolvedSpotPatchDataFlowOptions {
|
|
86
|
+
readonly enabled: boolean;
|
|
87
|
+
readonly runtime: "dispatch";
|
|
88
|
+
readonly limits: DataFlowLimits;
|
|
79
89
|
}
|
|
80
90
|
declare const DEFAULT_EXCLUDE: readonly RegExp[];
|
|
81
91
|
declare const DEFAULT_OPTIONS: Readonly<{
|
|
@@ -98,8 +108,28 @@ declare const DEFAULT_OPTIONS: Readonly<{
|
|
|
98
108
|
locale: "auto";
|
|
99
109
|
maxTargets: number;
|
|
100
110
|
ai: false;
|
|
111
|
+
dataFlow: Readonly<{
|
|
112
|
+
enabled: false;
|
|
113
|
+
runtime: "dispatch";
|
|
114
|
+
limits: Readonly<{
|
|
115
|
+
readonly observationMaxEntries: 100;
|
|
116
|
+
readonly observationMaxBytes: number;
|
|
117
|
+
readonly observationTtlMs: 300000;
|
|
118
|
+
readonly protocolRequestMaxBytes: number;
|
|
119
|
+
readonly reportMaxBytes: number;
|
|
120
|
+
readonly reportMaxEvidence: 200;
|
|
121
|
+
readonly reportMaxDiagnostics: 256;
|
|
122
|
+
readonly capabilityMaxReasons: 64;
|
|
123
|
+
readonly graphMaxDepth: 5;
|
|
124
|
+
readonly graphMaxModules: 50;
|
|
125
|
+
readonly graphMaxCallsites: 100;
|
|
126
|
+
readonly analysisTimeoutMs: 2000;
|
|
127
|
+
readonly reportMaxFields: 100;
|
|
128
|
+
}>;
|
|
129
|
+
}>;
|
|
101
130
|
}>;
|
|
102
131
|
declare function createRuntimeAiConfig(options: false | ResolvedAiOptions): RuntimeAiConfig;
|
|
132
|
+
declare function createRuntimeDataFlowConfig(options: ResolvedSpotPatchDataFlowOptions): RuntimeDataFlowConfig;
|
|
103
133
|
declare function resolveOptions(options?: SpotPatchOptions, environmentAi?: false | SimpleAiOptions): ResolvedSpotPatchOptions;
|
|
104
134
|
|
|
105
135
|
interface EnvironmentAiConfiguration {
|
|
@@ -140,9 +170,20 @@ type SourceIdFactory = () => string;
|
|
|
140
170
|
|
|
141
171
|
interface SourceRegistry {
|
|
142
172
|
register(absolutePath: string): string;
|
|
173
|
+
registerDataFlowComponents(absolutePath: string, sourceVersion: string, components: readonly DataFlowComponentAnchorInput[]): void;
|
|
143
174
|
resolve(fileId: string): string | undefined;
|
|
175
|
+
resolveDataFlowComponent(componentSourceId: string): DataFlowComponentAnchor | undefined;
|
|
144
176
|
clear(): void;
|
|
145
177
|
}
|
|
178
|
+
interface DataFlowComponentAnchorInput {
|
|
179
|
+
readonly componentSourceId: string;
|
|
180
|
+
readonly line: number;
|
|
181
|
+
readonly column: number;
|
|
182
|
+
}
|
|
183
|
+
interface DataFlowComponentAnchor extends DataFlowComponentAnchorInput {
|
|
184
|
+
readonly fileId: string;
|
|
185
|
+
readonly sourceVersion: string;
|
|
186
|
+
}
|
|
146
187
|
interface SourceRegistryOptions {
|
|
147
188
|
readonly createId?: SourceIdFactory;
|
|
148
189
|
}
|
|
@@ -217,6 +258,7 @@ interface SerializedSpotPatchOptions {
|
|
|
217
258
|
readonly allowLan: boolean;
|
|
218
259
|
readonly budget: Readonly<ContextBudget>;
|
|
219
260
|
readonly debug: boolean;
|
|
261
|
+
readonly dataFlow: false | SpotPatchDataFlowOptions;
|
|
220
262
|
readonly editor: SpotPatchEditorPreference;
|
|
221
263
|
readonly enabled: boolean;
|
|
222
264
|
readonly exclude: readonly SerializedFilterEntry[];
|
|
@@ -229,4 +271,4 @@ interface SerializedSpotPatchOptions {
|
|
|
229
271
|
declare function serializeResolvedSpotPatchOptions(options: ResolvedSpotPatchOptions): SerializedSpotPatchOptions;
|
|
230
272
|
declare function parseSerializedSpotPatchOptions(value: unknown): ResolvedSpotPatchOptions;
|
|
231
273
|
|
|
232
|
-
export { type AgentJobEventListener, type AgentJobManager, type CreateAgentJobManagerOptions, type CreateMiddlewareOptions, DEFAULT_EXCLUDE, DEFAULT_OPTIONS, type DiscoverProjectValidationCheckOptions, type EnvironmentAiConfiguration, type FilterEntry, type IntegrationFileChange, type IntegrationPlan, type ResolveProjectOptionsInput, type ResolvedRuntimeBootstrapOptions, type ResolvedSpotPatchOptions, type RuntimeBootstrapOptions, type SerializedFilterEntry, type SerializedSpotPatchOptions, type SimpleAiOptions, type SourceRegistrationHandler, type SourceRegistrationService, type SourceRegistrationServiceOptions, type SourceRegistry, type SpotPatchAiOptions, type SpotPatchMiddleware, type SpotPatchNext, type SpotPatchOptions, type SpotPatchServerLogger, type SpotPatchSession, applyIntegrationPlan, createAgentJobManager, createIntegrationFileChange, createRuntimeAiConfig, createSession, createSourceRegistrationService, createSourceRegistry, createSpotPatchMiddleware, discoverProjectValidationCheck, integrationPathExists, isLoopbackHostname, parseSerializedSpotPatchOptions, readIntegrationFile, readJsonRequestBody, readRuntimeBootstrap, resolveCredentialEnvironment, resolveEnvironmentAiConfiguration, resolveOptions, resolveProjectOptions, resolveRuntimeBootstrapOptions, serializeResolvedSpotPatchOptions };
|
|
274
|
+
export { type AgentJobEventListener, type AgentJobManager, type CreateAgentJobManagerOptions, type CreateMiddlewareOptions, DEFAULT_EXCLUDE, DEFAULT_OPTIONS, type DiscoverProjectValidationCheckOptions, type EnvironmentAiConfiguration, type FilterEntry, type IntegrationFileChange, type IntegrationPlan, type ResolveProjectOptionsInput, type ResolvedRuntimeBootstrapOptions, type ResolvedSpotPatchDataFlowOptions, type ResolvedSpotPatchOptions, type RuntimeBootstrapOptions, type SerializedFilterEntry, type SerializedSpotPatchOptions, type SimpleAiOptions, type SourceRegistrationHandler, type SourceRegistrationService, type SourceRegistrationServiceOptions, type SourceRegistry, type SpotPatchAiOptions, type SpotPatchDataFlowOptions, type SpotPatchMiddleware, type SpotPatchNext, type SpotPatchOptions, type SpotPatchServerLogger, type SpotPatchSession, applyIntegrationPlan, createAgentJobManager, createIntegrationFileChange, createRuntimeAiConfig, createRuntimeDataFlowConfig, createSession, createSourceRegistrationService, createSourceRegistry, createSpotPatchMiddleware, discoverProjectValidationCheck, integrationPathExists, isLoopbackHostname, parseSerializedSpotPatchOptions, readIntegrationFile, readJsonRequestBody, readRuntimeBootstrap, resolveCredentialEnvironment, resolveEnvironmentAiConfiguration, resolveOptions, resolveProjectOptions, resolveRuntimeBootstrapOptions, serializeResolvedSpotPatchOptions };
|