@wrongstack/core 0.5.2 → 0.5.5
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/{agent-bridge-EiUFe3if.d.ts → agent-bridge-B07AYFBk.d.ts} +1 -1
- package/dist/{compactor-BP4xhKVi.d.ts → compactor-BWhJXxsW.d.ts} +1 -1
- package/dist/{config-BOD_HQBw.d.ts → config-BgM0BIpz.d.ts} +1 -1
- package/dist/{context-PH4DvBZV.d.ts → context-CLZXPPYk.d.ts} +18 -1
- package/dist/coordination/index.d.ts +9 -9
- package/dist/defaults/index.d.ts +19 -19
- package/dist/defaults/index.js +50 -2
- package/dist/defaults/index.js.map +1 -1
- package/dist/{director-state-CVzkjKRZ.d.ts → director-state-BUxlqkOa.d.ts} +5 -5
- package/dist/{events-oxn-Wkub.d.ts → events-qnDZbrtb.d.ts} +67 -2
- package/dist/execution/index.d.ts +12 -12
- package/dist/extension/index.d.ts +6 -6
- package/dist/{index-a12jc7-r.d.ts → index-DPLJw_ZI.d.ts} +5 -5
- package/dist/{index-CcbWbcpy.d.ts → index-De4R4rQ7.d.ts} +5 -5
- package/dist/index.d.ts +328 -27
- package/dist/index.js +1996 -14
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/index.d.ts +6 -6
- package/dist/kernel/index.d.ts +9 -9
- package/dist/kernel/index.js +98 -1
- package/dist/kernel/index.js.map +1 -1
- package/dist/{mcp-servers-uPmBxZ1B.d.ts → mcp-servers-CSMfaBuL.d.ts} +3 -3
- package/dist/models/index.d.ts +2 -2
- package/dist/{multi-agent-D6S4Z7H8.d.ts → multi-agent-Cv8wk47i.d.ts} +2 -2
- package/dist/observability/index.d.ts +2 -2
- package/dist/{path-resolver-CprD5DhS.d.ts → path-resolver-DiCUvEg6.d.ts} +2 -2
- package/dist/{provider-runner-DGisz_lG.d.ts → provider-runner-3SHqk9zB.d.ts} +3 -3
- package/dist/{retry-policy-DUJ8-Qc_.d.ts → retry-policy-LLUxJmYY.d.ts} +1 -1
- package/dist/sdd/index.d.ts +3 -3
- package/dist/{secret-scrubber-CB11A2P7.d.ts → secret-scrubber-BhJTNr9v.d.ts} +4 -2
- package/dist/{secret-scrubber-EqFa0SyI.d.ts → secret-scrubber-Z_VXuXQT.d.ts} +1 -1
- package/dist/security/index.d.ts +13 -3
- package/dist/security/index.js +34 -1
- package/dist/security/index.js.map +1 -1
- package/dist/{selector-yqyxt-Ii.d.ts → selector-DB2-byKH.d.ts} +1 -1
- package/dist/{session-reader-1tOyoY1s.d.ts → session-reader-4jxsYLZ8.d.ts} +1 -1
- package/dist/storage/index.d.ts +6 -6
- package/dist/storage/index.js +16 -1
- package/dist/storage/index.js.map +1 -1
- package/dist/{system-prompt-BJlzKGO6.d.ts → system-prompt-DI4Dtc1I.d.ts} +1 -1
- package/dist/{tool-executor-B6kRcWeF.d.ts → tool-executor-DSvmOBe6.d.ts} +4 -4
- package/dist/types/index.d.ts +15 -15
- package/dist/types/index.js +9 -1
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +2 -2
- package/dist/{wstack-paths-BGu2INTm.d.ts → wstack-paths-86YPFktR.d.ts} +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { E as EventBus } from './events-
|
|
2
|
-
import {
|
|
3
|
-
import { e as AttachmentStore, A as AddAttachmentInput, d as AttachmentRef, a as Attachment } from './session-reader-
|
|
1
|
+
import { E as EventBus } from './events-qnDZbrtb.js';
|
|
2
|
+
import { p as SessionStore, o as SessionMetadata, r as SessionWriter, k as ResumedSession, S as SessionData, q as SessionSummary, b as ContentBlock, n as SessionEvent, a5 as TodoItem, a6 as ConversationState } from './context-CLZXPPYk.js';
|
|
3
|
+
import { e as AttachmentStore, A as AddAttachmentInput, d as AttachmentRef, a as Attachment } from './session-reader-4jxsYLZ8.js';
|
|
4
4
|
import { b as MemoryStore, a as MemoryScope } from './memory-CEXuo7sz.js';
|
|
5
|
-
import {
|
|
6
|
-
import { c as ConfigStore, a as Config, b as ConfigLoader } from './config-
|
|
5
|
+
import { W as WstackPaths } from './wstack-paths-86YPFktR.js';
|
|
6
|
+
import { c as ConfigStore, a as Config, b as ConfigLoader } from './config-BgM0BIpz.js';
|
|
7
7
|
import { S as SecretVault } from './secret-vault-DoISxaKO.js';
|
|
8
8
|
|
|
9
9
|
interface SessionStoreOptions {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as Usage,
|
|
1
|
+
import { U as Usage, a2 as Context, z as ToolProgressEvent, v as Tool } from './context-CLZXPPYk.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* EventBus — observe-only typed event bus.
|
|
@@ -386,5 +386,70 @@ declare class EventBus {
|
|
|
386
386
|
*/
|
|
387
387
|
wildcardCount(): number;
|
|
388
388
|
}
|
|
389
|
+
/**
|
|
390
|
+
* A decorator over `EventBus` that records every listener registration
|
|
391
|
+
* (`.on`, `.once`, `.onPattern`, `.onRegex`) so that `teardown()` can
|
|
392
|
+
* remove all of them at once — preventing the memory leaks that occur
|
|
393
|
+
* when dynamic plugins or long-lived TUI/WebUI interfaces forget to
|
|
394
|
+
* call `.off()` during session termination.
|
|
395
|
+
*
|
|
396
|
+
* Usage:
|
|
397
|
+
* ```ts
|
|
398
|
+
* const bus = new ScopedEventBus();
|
|
399
|
+
* bus.on('tool.executed', handler1); // tracked
|
|
400
|
+
* bus.on('provider.response', handler2); // tracked
|
|
401
|
+
* bus.onPattern('subagent.*', handler3); // tracked
|
|
402
|
+
* // ... later, when the plugin or session is torn down:
|
|
403
|
+
* bus.teardown(); // removes all three listeners
|
|
404
|
+
* ```
|
|
405
|
+
*
|
|
406
|
+
* Also implements `Disposable` (via `[Symbol.dispose]`) for use with
|
|
407
|
+
* the `using` keyword in Node ≥ 22, or can be used manually with
|
|
408
|
+
* `bus.teardown()`.
|
|
409
|
+
*/
|
|
410
|
+
declare class ScopedEventBus extends EventBus {
|
|
411
|
+
private readonly registrations;
|
|
412
|
+
private nextKey;
|
|
413
|
+
/**
|
|
414
|
+
* Identical to `EventBus.on` but the listener is tracked so that
|
|
415
|
+
* `teardown()` will remove it automatically.
|
|
416
|
+
*/
|
|
417
|
+
on<E extends EventName>(event: E, fn: Listener<E>): () => void;
|
|
418
|
+
/**
|
|
419
|
+
* Identical to `EventBus.once` but the listener is tracked so that
|
|
420
|
+
* `teardown()` will remove it automatically.
|
|
421
|
+
*
|
|
422
|
+
* Uses EventBus's public API directly to avoid triggering our own `on()`
|
|
423
|
+
* override (which would consume a key slot for the wrapper, then orphan
|
|
424
|
+
* our registration entry under a different key).
|
|
425
|
+
*/
|
|
426
|
+
once<E extends EventName>(event: E, fn: Listener<E>): () => void;
|
|
427
|
+
/**
|
|
428
|
+
* Identical to `EventBus.onPattern` but the listener is tracked so that
|
|
429
|
+
* `teardown()` will remove it automatically.
|
|
430
|
+
*/
|
|
431
|
+
onPattern(pattern: string, fn: (event: string, payload: unknown) => void): () => void;
|
|
432
|
+
/**
|
|
433
|
+
* Identical to `EventBus.onRegex` but the listener is tracked so that
|
|
434
|
+
* `teardown()` will remove it automatically.
|
|
435
|
+
*/
|
|
436
|
+
onRegex(regex: RegExp, fn: (event: string, payload: unknown) => void): () => void;
|
|
437
|
+
/**
|
|
438
|
+
* Remove every listener that was registered through this scoped bus.
|
|
439
|
+
* Idempotent — calling it multiple times is safe.
|
|
440
|
+
*
|
|
441
|
+
* Also available as `[Symbol.dispose]` for explicit resource management:
|
|
442
|
+
* ```ts
|
|
443
|
+
* using scope = new ScopedEventBus();
|
|
444
|
+
* scope.on('tool.executed', handler);
|
|
445
|
+
* // automatically teardown()'d when scope exits
|
|
446
|
+
* ```
|
|
447
|
+
*/
|
|
448
|
+
teardown(): void;
|
|
449
|
+
/** Alias for `teardown()` — enables `using new ScopedEventBus()` in Node ≥ 22. */
|
|
450
|
+
[Symbol.dispose](): void;
|
|
451
|
+
/** Number of tracked registrations. */
|
|
452
|
+
get scopedListenerCount(): number;
|
|
453
|
+
}
|
|
389
454
|
|
|
390
|
-
export { EventBus as E, type Listener as L, type EventName as a, type EventLogger as b, type EventMap as c };
|
|
455
|
+
export { EventBus as E, type Listener as L, ScopedEventBus as S, type EventName as a, type EventLogger as b, type EventMap as c };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export { C as CompactorOptions, a as DefaultErrorHandler, b as DefaultRetryPolicy, H as HybridCompactor, T as ToolExecutor } from '../tool-executor-
|
|
2
|
-
import { g as Provider,
|
|
3
|
-
import { a as Compactor, C as CompactReport } from '../compactor-
|
|
4
|
-
import { M as MessageSelector } from '../selector-
|
|
5
|
-
import { E as EventBus } from '../events-
|
|
6
|
-
import { c as MiddlewareHandler } from '../system-prompt-
|
|
7
|
-
import { e as ContextWindowAggressiveOn, i as ContextWindowPolicy } from '../config-
|
|
8
|
-
import { r as Agent, R as RunResult } from '../index-
|
|
9
|
-
import { D as DoneCondition } from '../multi-agent-
|
|
1
|
+
export { C as CompactorOptions, a as DefaultErrorHandler, b as DefaultRetryPolicy, H as HybridCompactor, T as ToolExecutor } from '../tool-executor-DSvmOBe6.js';
|
|
2
|
+
import { g as Provider, a2 as Context } from '../context-CLZXPPYk.js';
|
|
3
|
+
import { a as Compactor, C as CompactReport } from '../compactor-BWhJXxsW.js';
|
|
4
|
+
import { M as MessageSelector } from '../selector-DB2-byKH.js';
|
|
5
|
+
import { E as EventBus } from '../events-qnDZbrtb.js';
|
|
6
|
+
import { c as MiddlewareHandler } from '../system-prompt-DI4Dtc1I.js';
|
|
7
|
+
import { e as ContextWindowAggressiveOn, i as ContextWindowPolicy } from '../config-BgM0BIpz.js';
|
|
8
|
+
import { r as Agent, R as RunResult } from '../index-DPLJw_ZI.js';
|
|
9
|
+
import { D as DoneCondition } from '../multi-agent-Cv8wk47i.js';
|
|
10
10
|
import { a as SkillLoader, b as SkillManifest, S as SkillEntry } from '../skill-CxuWrsKK.js';
|
|
11
|
-
import {
|
|
12
|
-
import '../retry-policy-
|
|
11
|
+
import { W as WstackPaths } from '../wstack-paths-86YPFktR.js';
|
|
12
|
+
import '../retry-policy-LLUxJmYY.js';
|
|
13
13
|
import '../models-registry-Y2xbog0E.js';
|
|
14
14
|
import '../logger-BMQgxvdy.js';
|
|
15
15
|
import '../observability-BhnVLBLS.js';
|
|
16
|
-
import '../secret-scrubber-
|
|
16
|
+
import '../secret-scrubber-BhJTNr9v.js';
|
|
17
17
|
|
|
18
18
|
interface SkillLoaderOptions {
|
|
19
19
|
paths: WstackPaths;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { A as AfterIterationHook, p as AfterRunHook, q as AfterToolExecutionHook, s as AgentExtension, B as BeforeIterationHook, w as BeforeRunHook, x as BeforeToolExecutionHook, E as ExtensionRegistry, O as OnErrorHook, G as ProviderRunnerFn, z as ProviderRunnerWrapper } from '../index-
|
|
2
|
-
import '../context-
|
|
1
|
+
export { A as AfterIterationHook, p as AfterRunHook, q as AfterToolExecutionHook, s as AgentExtension, B as BeforeIterationHook, w as BeforeRunHook, x as BeforeToolExecutionHook, E as ExtensionRegistry, O as OnErrorHook, G as ProviderRunnerFn, z as ProviderRunnerWrapper } from '../index-DPLJw_ZI.js';
|
|
2
|
+
import '../context-CLZXPPYk.js';
|
|
3
3
|
import '../logger-BMQgxvdy.js';
|
|
4
|
-
import '../system-prompt-
|
|
4
|
+
import '../system-prompt-DI4Dtc1I.js';
|
|
5
5
|
import '../observability-BhnVLBLS.js';
|
|
6
|
-
import '../events-
|
|
7
|
-
import '../secret-scrubber-
|
|
8
|
-
import '../config-
|
|
6
|
+
import '../events-qnDZbrtb.js';
|
|
7
|
+
import '../secret-scrubber-BhJTNr9v.js';
|
|
8
|
+
import '../config-BgM0BIpz.js';
|
|
9
9
|
import '../models-registry-Y2xbog0E.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { v as Tool, B as ToolResultBlock, T as TextBlock, a2 as Context, R as Request, j as Response, G as ToolUseBlock, g as Provider, W as WrongStackError, b as ContentBlock, aa as RunOptions, J as JSONSchema } from './context-CLZXPPYk.js';
|
|
2
2
|
import { L as Logger } from './logger-BMQgxvdy.js';
|
|
3
|
-
import { R as Renderer, B as BuildContext, C as Container, P as Pipeline, e as ReadonlyPipeline } from './system-prompt-
|
|
3
|
+
import { R as Renderer, B as BuildContext, C as Container, P as Pipeline, e as ReadonlyPipeline } from './system-prompt-DI4Dtc1I.js';
|
|
4
4
|
import { T as Tracer } from './observability-BhnVLBLS.js';
|
|
5
|
-
import { E as EventBus, a as EventName, L as Listener } from './events-
|
|
6
|
-
import { a as PermissionPolicy, S as SecretScrubber } from './secret-scrubber-
|
|
7
|
-
import { l as ProviderConfig, a as Config } from './config-
|
|
5
|
+
import { E as EventBus, a as EventName, L as Listener } from './events-qnDZbrtb.js';
|
|
6
|
+
import { a as PermissionPolicy, S as SecretScrubber } from './secret-scrubber-BhJTNr9v.js';
|
|
7
|
+
import { l as ProviderConfig, a as Config } from './config-BgM0BIpz.js';
|
|
8
8
|
import { W as WireFamily } from './models-registry-Y2xbog0E.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { M as MultiAgentConfig, i as SubagentRunner, c as SubagentConfig, k as TaskSpec, j as TaskResult, a as CoordinatorStatus, b as MultiAgentCoordinator, S as SpawnResult, l as BridgeMessage, A as AgentBridge } from './multi-agent-
|
|
2
|
-
import {
|
|
3
|
-
import { I as InMemoryAgentBridge } from './agent-bridge-
|
|
4
|
-
import { E as EventBus } from './events-
|
|
1
|
+
import { M as MultiAgentConfig, i as SubagentRunner, c as SubagentConfig, k as TaskSpec, j as TaskResult, a as CoordinatorStatus, b as MultiAgentCoordinator, S as SpawnResult, l as BridgeMessage, A as AgentBridge } from './multi-agent-Cv8wk47i.js';
|
|
2
|
+
import { r as SessionWriter, v as Tool, p as SessionStore } from './context-CLZXPPYk.js';
|
|
3
|
+
import { I as InMemoryAgentBridge } from './agent-bridge-B07AYFBk.js';
|
|
4
|
+
import { E as EventBus } from './events-qnDZbrtb.js';
|
|
5
5
|
import { EventEmitter } from 'node:events';
|
|
6
|
-
import { r as Agent, u as AgentInput } from './index-
|
|
6
|
+
import { r as Agent, u as AgentInput } from './index-DPLJw_ZI.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Single fleet-wide event with subagent attribution. Whatever a child
|
package/dist/index.d.ts
CHANGED
|
@@ -1,58 +1,359 @@
|
|
|
1
|
-
import { S as SystemPromptBuilder, M as ModelCapabilities, B as BuildContext, C as Container } from './system-prompt-
|
|
2
|
-
export { a as BindOptions, D as Decorator, F as Factory, b as Middleware, c as MiddlewareHandler, N as NextFn, P as Pipeline, d as PipelineOptions, R as Renderer, T as Token } from './system-prompt-
|
|
3
|
-
import { E as EventBus, a as EventName, L as Listener } from './events-
|
|
4
|
-
export { b as EventLogger, c as EventMap } from './events-
|
|
1
|
+
import { S as SystemPromptBuilder, M as ModelCapabilities, B as BuildContext, C as Container } from './system-prompt-DI4Dtc1I.js';
|
|
2
|
+
export { a as BindOptions, D as Decorator, F as Factory, b as Middleware, c as MiddlewareHandler, N as NextFn, P as Pipeline, d as PipelineOptions, R as Renderer, T as Token } from './system-prompt-DI4Dtc1I.js';
|
|
3
|
+
import { E as EventBus, a as EventName, L as Listener } from './events-qnDZbrtb.js';
|
|
4
|
+
export { b as EventLogger, c as EventMap, S as ScopedEventBus } from './events-qnDZbrtb.js';
|
|
5
5
|
export { RunController, RunControllerOptions, TOKENS } from './kernel/index.js';
|
|
6
|
-
import {
|
|
7
|
-
export { A as AgentError, C as Capabilities, a as ConfigError,
|
|
8
|
-
export { P as ProviderRunner, R as RunProviderOptions } from './provider-runner-
|
|
9
|
-
import { a as Config } from './config-
|
|
10
|
-
export { C as CONTEXT_WINDOW_MODES, b as ConfigLoader, c as ConfigStore, d as ContextConfig, e as ContextWindowAggressiveOn, f as ContextWindowConfigLike, g as ContextWindowMode, h as ContextWindowModeId, i as ContextWindowPolicy, j as ContextWindowThresholds, D as DEFAULT_CONTEXT_WINDOW_MODE_ID, F as FeaturesConfig, L as LogConfig, M as MCPServerConfig, P as PluginConfig, k as ProviderApiKey, l as ProviderConfig, T as ToolsConfig, m as formatContextWindowModeList, n as getContextWindowMode, o as isContextWindowModeId, p as listContextWindowModes, r as resolveContextWindowPolicy } from './config-
|
|
11
|
-
export { C as CompactReport, a as Compactor } from './compactor-
|
|
12
|
-
export { P as PermissionDecision, a as PermissionPolicy, T as TrustPolicy } from './secret-scrubber-
|
|
6
|
+
import { a2 as Context, g as Provider, b as ContentBlock, T as TextBlock } from './context-CLZXPPYk.js';
|
|
7
|
+
export { A as AgentError, C as Capabilities, a as ConfigError, a7 as ContextInit, a6 as ConversationState, E as ErrorCode, c as ErrorSeverity, d as ErrorSubsystem, F as FileSnapshot, I as ImageBlock, J as JSONSchema, M as Message, e as MessageRole, P as Permission, f as PluginError, h as ProviderError, i as ProviderErrorBody, a8 as ReadonlyConversationState, R as Request, j as Response, k as ResumedSession, l as RiskTier, a9 as RunEnv, aa as RunOptions, S as SessionData, m as SessionError, n as SessionEvent, o as SessionMetadata, p as SessionStore, q as SessionSummary, r as SessionWriter, ab as StateChange, ac as StateChangeHandler, s as StopReason, t as StreamEvent, u as ThinkingBlock, a5 as TodoItem, a3 as TokenCounter, v as Tool, w as ToolCallContext, x as ToolError, y as ToolFinalEvent, z as ToolProgressEvent, B as ToolResultBlock, D as ToolStreamEvent, G as ToolUseBlock, U as Usage, W as WrongStackError, H as asBlocks, K as asText, ad as extractRunEnv, L as isAgentError, N as isConfigError, O as isImageBlock, Q as isPluginError, V as isSessionError, X as isTextBlock, Y as isThinkingBlock, Z as isToolError, _ as isToolResultBlock, $ as isToolUseBlock, a0 as isWrongStackError, a1 as toWrongStackError, ae as wrapAsState } from './context-CLZXPPYk.js';
|
|
8
|
+
export { P as ProviderRunner, R as RunProviderOptions } from './provider-runner-3SHqk9zB.js';
|
|
9
|
+
import { a as Config } from './config-BgM0BIpz.js';
|
|
10
|
+
export { C as CONTEXT_WINDOW_MODES, b as ConfigLoader, c as ConfigStore, d as ContextConfig, e as ContextWindowAggressiveOn, f as ContextWindowConfigLike, g as ContextWindowMode, h as ContextWindowModeId, i as ContextWindowPolicy, j as ContextWindowThresholds, D as DEFAULT_CONTEXT_WINDOW_MODE_ID, F as FeaturesConfig, L as LogConfig, M as MCPServerConfig, P as PluginConfig, k as ProviderApiKey, l as ProviderConfig, T as ToolsConfig, m as formatContextWindowModeList, n as getContextWindowMode, o as isContextWindowModeId, p as listContextWindowModes, r as resolveContextWindowPolicy } from './config-BgM0BIpz.js';
|
|
11
|
+
export { C as CompactReport, a as Compactor } from './compactor-BWhJXxsW.js';
|
|
12
|
+
export { P as PermissionDecision, a as PermissionPolicy, T as TrustPolicy } from './secret-scrubber-BhJTNr9v.js';
|
|
13
13
|
export { C as CheckpointInfo, R as RewindResult, a as RewindResultExtended, S as SessionRewinder } from './session-rewinder-C9HnMkhP.js';
|
|
14
|
-
import { e as AttachmentStore, d as AttachmentRef, A as AddAttachmentInput } from './session-reader-
|
|
15
|
-
export { a as Attachment, b as AttachmentKind, c as AttachmentMeta, D as DefaultSessionReader } from './session-reader-
|
|
16
|
-
export { D as DefaultSecretScrubber, a as DefaultSecretVault, S as SecretVaultOptions, d as decryptConfigSecrets, e as encryptConfigSecrets, m as migratePlaintextSecrets, r as rewriteConfigEncrypted } from './secret-scrubber-
|
|
14
|
+
import { e as AttachmentStore, d as AttachmentRef, A as AddAttachmentInput } from './session-reader-4jxsYLZ8.js';
|
|
15
|
+
export { a as Attachment, b as AttachmentKind, c as AttachmentMeta, D as DefaultSessionReader } from './session-reader-4jxsYLZ8.js';
|
|
16
|
+
export { D as DefaultSecretScrubber, a as DefaultSecretVault, S as SecretVaultOptions, d as decryptConfigSecrets, e as encryptConfigSecrets, m as migratePlaintextSecrets, r as rewriteConfigEncrypted } from './secret-scrubber-Z_VXuXQT.js';
|
|
17
17
|
export { D as DefaultLogger, a as DefaultLoggerOptions } from './logger-BH6AE0W9.js';
|
|
18
|
-
export { D as DefaultPathResolver, a as DefaultTokenCounter } from './path-resolver-
|
|
18
|
+
export { D as DefaultPathResolver, a as DefaultTokenCounter } from './path-resolver-DiCUvEg6.js';
|
|
19
19
|
import { b as MemoryStore } from './memory-CEXuo7sz.js';
|
|
20
20
|
export { M as MemoryEntry, a as MemoryScope } from './memory-CEXuo7sz.js';
|
|
21
|
-
export { C as CompactorOptions, D as DEFAULT_RECOVERY_STRATEGIES, a as DefaultErrorHandler, b as DefaultRetryPolicy, H as HybridCompactor, R as RecoveryStrategy, T as ToolExecutor, c as buildRecoveryStrategies } from './tool-executor-
|
|
21
|
+
export { C as CompactorOptions, D as DEFAULT_RECOVERY_STRATEGIES, a as DefaultErrorHandler, b as DefaultRetryPolicy, H as HybridCompactor, R as RecoveryStrategy, T as ToolExecutor, c as buildRecoveryStrategies } from './tool-executor-DSvmOBe6.js';
|
|
22
22
|
import { a as SkillLoader } from './skill-CxuWrsKK.js';
|
|
23
23
|
export { S as SkillEntry, b as SkillManifest } from './skill-CxuWrsKK.js';
|
|
24
24
|
export { I as InputReader, P as PromptOption } from './input-reader-E-ffP2ee.js';
|
|
25
|
-
import {
|
|
26
|
-
export { A as AfterIterationHook, p as AfterRunHook, q as AfterToolExecutionHook, r as Agent, s as AgentExtension, t as AgentInit, u as AgentInput, v as AgentPipelines, B as BeforeIterationHook, w as BeforeRunHook, x as BeforeToolExecutionHook, D as DEFAULT_MAX_ITERATIONS, O as OnErrorHook, c as PluginCapabilities, d as PluginDependency, y as ProviderFactory, z as ProviderRunnerWrapper, R as RunResult, C as ToolWrapper, U as UserInputPayload, F as createDefaultPipelines } from './index-
|
|
25
|
+
import { h as SlashCommand, j as SystemPromptContributor, b as PluginAPI, e as PluginPipelines, T as ToolRegistryView, g as ProviderRegistryView, M as MCPRegistryView, i as SlashCommandRegistryView, E as ExtensionRegistry, S as SessionWriterView, a as MetricsSinkView, n as ToolRegistry, o as ProviderRegistry, P as Plugin } from './index-DPLJw_ZI.js';
|
|
26
|
+
export { A as AfterIterationHook, p as AfterRunHook, q as AfterToolExecutionHook, r as Agent, s as AgentExtension, t as AgentInit, u as AgentInput, v as AgentPipelines, B as BeforeIterationHook, w as BeforeRunHook, x as BeforeToolExecutionHook, D as DEFAULT_MAX_ITERATIONS, O as OnErrorHook, c as PluginCapabilities, d as PluginDependency, y as ProviderFactory, z as ProviderRunnerWrapper, R as RunResult, C as ToolWrapper, U as UserInputPayload, F as createDefaultPipelines } from './index-DPLJw_ZI.js';
|
|
27
27
|
export { D as DefaultModelsRegistry, a as DefaultModelsRegistryOptions, c as classifyFamily } from './models-registry-DqzwpBQy.js';
|
|
28
28
|
import { c as ModeStore } from './mode-CV077NjV.js';
|
|
29
29
|
export { D as DEFAULT_MODES, M as Mode, a as ModeConfig, b as ModeManifest } from './mode-CV077NjV.js';
|
|
30
|
-
export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from './agent-bridge-
|
|
31
|
-
export { n as BudgetExceededError, o as BudgetKind, p as BudgetLimits, q as BudgetUsage, C as CoordinatorEvents, a as CoordinatorStatus, D as DoneCondition, M as MultiAgentConfig, b as MultiAgentCoordinator, S as SpawnResult, r as SubagentBudget, c as SubagentConfig, d as SubagentContext, e as SubagentError, f as SubagentErrorKind, g as SubagentRunContext, h as SubagentRunOutcome, i as SubagentRunner, T as TaskDelegation, j as TaskResult, k as TaskSpec } from './multi-agent-
|
|
30
|
+
export { I as InMemoryAgentBridge, a as InMemoryBridgeTransport, c as createMessage } from './agent-bridge-B07AYFBk.js';
|
|
31
|
+
export { n as BudgetExceededError, o as BudgetKind, p as BudgetLimits, q as BudgetUsage, C as CoordinatorEvents, a as CoordinatorStatus, D as DoneCondition, M as MultiAgentConfig, b as MultiAgentCoordinator, S as SpawnResult, r as SubagentBudget, c as SubagentConfig, d as SubagentContext, e as SubagentError, f as SubagentErrorKind, g as SubagentRunContext, h as SubagentRunOutcome, i as SubagentRunner, T as TaskDelegation, j as TaskResult, k as TaskSpec } from './multi-agent-Cv8wk47i.js';
|
|
32
32
|
export { C as CriticalPathResult, D as DEFAULT_SPEC_TEMPLATE, S as SpecAnalysis, a as SpecApiEndpoint, b as SpecRequirement, c as SpecSection, d as SpecSectionType, e as SpecStatus, f as SpecTemplate, g as SpecValidationResult, h as Specification, T as TaskAssignment, i as TaskDependency, j as TaskEdge, k as TaskFilter, l as TaskGraph, m as TaskNode, n as TaskPriority, o as TaskProgress, p as TaskSort, q as TaskStatus, r as TaskType, s as computeTaskProgress, t as findCriticalPath, u as topologicalSort } from './task-graph-BITvWt4t.js';
|
|
33
33
|
export { A as AggregateHealth, H as HealthCheck, a as HealthCheckResult, b as HealthRegistry, c as HealthStatus, M as MetricLabels, d as MetricSeries, e as MetricsSink, f as MetricsSnapshot, S as Span, T as Tracer } from './observability-BhnVLBLS.js';
|
|
34
34
|
export { AtomicWriteOptions, BuildChildEnvOptions, CompileFail, CompileResult, MessageRepairReport, MessageRepairResult, NewlineStyle, RequestTokenBreakdown, SafeParseResult, ToolOutputSerializerOptions, UnifiedDiffOptions, ValidationError, ValidationResult, atomicWrite, buildChildEnv, color, compileGlob, compileUserRegex, createToolOutputSerializer, detectNewlineStyle, ensureDir, estimateRequestTokens, estimateTextTokens, estimateToolDefTokens, estimateToolInputTokens, estimateToolResultTokens, formatTodosList, matchAny, matchGlob, normalizeToLf, repairToolUseAdjacency, safeParse, safeStringify, sanitizeJsonString, stripAnsi, toStyle, unifiedDiff, validateAgainstSchema } from './utils/index.js';
|
|
35
|
-
export {
|
|
36
|
-
export { A as AbandonedSession, a as AttachmentStoreOptions, C as ConfigLoaderOptions, b as ConfigMigration, c as ConfigMigrationError, d as ConfigSource, D as DEFAULT_CONFIG_MIGRATIONS, e as DefaultAttachmentStore, f as DefaultConfigLoader, g as DefaultConfigStore, h as DefaultMemoryStore, i as DefaultSessionStore, j as DirectorStateCheckpoint, k as DirectorStateSnapshot, l as DirectorSubagentState, m as DirectorTaskState, M as MemoryStoreOptions, n as MigrationContext, o as MigrationResult, P as PersistedQueueItem, p as PlanFile, q as PlanItem, Q as QueueStore, R as RecoveryLock, r as RecoveryLockOptions, S as SessionAnalyzer, s as SessionStoreOptions, T as TodosCheckpointFile, t as addPlanItem, u as attachPlanCheckpoint, v as attachTodosCheckpoint, w as clearPlan, x as emptyPlan, y as formatPlan, z as loadDirectorState, B as loadPlan, E as loadTodosCheckpoint, F as removePlanItem, G as runConfigMigrations, H as savePlan, I as saveTodosCheckpoint, J as setPlanItemStatus } from './director-state-
|
|
35
|
+
export { a as WstackPathOptions, W as WstackPaths, p as projectHash, r as resolveWstackPaths } from './wstack-paths-86YPFktR.js';
|
|
36
|
+
export { A as AbandonedSession, a as AttachmentStoreOptions, C as ConfigLoaderOptions, b as ConfigMigration, c as ConfigMigrationError, d as ConfigSource, D as DEFAULT_CONFIG_MIGRATIONS, e as DefaultAttachmentStore, f as DefaultConfigLoader, g as DefaultConfigStore, h as DefaultMemoryStore, i as DefaultSessionStore, j as DirectorStateCheckpoint, k as DirectorStateSnapshot, l as DirectorSubagentState, m as DirectorTaskState, M as MemoryStoreOptions, n as MigrationContext, o as MigrationResult, P as PersistedQueueItem, p as PlanFile, q as PlanItem, Q as QueueStore, R as RecoveryLock, r as RecoveryLockOptions, S as SessionAnalyzer, s as SessionStoreOptions, T as TodosCheckpointFile, t as addPlanItem, u as attachPlanCheckpoint, v as attachTodosCheckpoint, w as clearPlan, x as emptyPlan, y as formatPlan, z as loadDirectorState, B as loadPlan, E as loadTodosCheckpoint, F as removePlanItem, G as runConfigMigrations, H as savePlan, I as saveTodosCheckpoint, J as setPlanItemStatus } from './director-state-BUxlqkOa.js';
|
|
37
37
|
export { AutoApprovePermissionPolicy, DefaultPermissionPolicy, PermissionPolicyOptions } from './security/index.js';
|
|
38
38
|
export { AutoCompactionMiddleware, AutonomousRunner, AutonomousRunnerOptions, DefaultSkillLoader, DoneCheckResult, DoneConditionChecker, IntelligentCompactor, IntelligentCompactorOptions, SelectiveCompactor, SelectiveCompactorOptions, SkillLoaderOptions } from './execution/index.js';
|
|
39
39
|
export { DefaultProviderRunner } from './defaults/index.js';
|
|
40
|
-
export { A as ALL_FLEET_AGENTS, a as AUDIT_LOG_AGENT, b as AgentFactory, c as AgentFactoryResult, d as AgentRunnerOptions, B as BUG_HUNTER_AGENT, C as CreateDelegateToolOptions, D as DEFAULT_DIRECTOR_PREAMBLE, e as DEFAULT_SUBAGENT_BASELINE, f as DefaultMultiAgentCoordinator, g as DelegateHost, h as Director, i as DirectorBudgetError, j as DirectorPromptParts, k as DirectorSessionFactory, l as DirectorSessionFactoryOptions, F as FLEET_ROSTER, m as FLEET_ROSTER_BUDGETS, n as FleetBus, o as FleetEvent, p as FleetHandler, q as FleetUsage, r as FleetUsageAggregator, M as MultiAgentCoordinatorOptions, R as REFACTOR_PLANNER_AGENT, S as SECURITY_SCANNER_AGENT, s as SubagentPromptParts, t as SubagentUsageSnapshot, u as applyRosterBudget, v as composeDirectorPrompt, w as composeSubagentPrompt, x as createDelegateTool, y as makeAgentSubagentRunner, z as makeDirectorSessionFactory, E as rosterSummaryFromConfigs } from './index-
|
|
40
|
+
export { A as ALL_FLEET_AGENTS, a as AUDIT_LOG_AGENT, b as AgentFactory, c as AgentFactoryResult, d as AgentRunnerOptions, B as BUG_HUNTER_AGENT, C as CreateDelegateToolOptions, D as DEFAULT_DIRECTOR_PREAMBLE, e as DEFAULT_SUBAGENT_BASELINE, f as DefaultMultiAgentCoordinator, g as DelegateHost, h as Director, i as DirectorBudgetError, j as DirectorPromptParts, k as DirectorSessionFactory, l as DirectorSessionFactoryOptions, F as FLEET_ROSTER, m as FLEET_ROSTER_BUDGETS, n as FleetBus, o as FleetEvent, p as FleetHandler, q as FleetUsage, r as FleetUsageAggregator, M as MultiAgentCoordinatorOptions, R as REFACTOR_PLANNER_AGENT, S as SECURITY_SCANNER_AGENT, s as SubagentPromptParts, t as SubagentUsageSnapshot, u as applyRosterBudget, v as composeDirectorPrompt, w as composeSubagentPrompt, x as createDelegateTool, y as makeAgentSubagentRunner, z as makeDirectorSessionFactory, E as rosterSummaryFromConfigs } from './index-De4R4rQ7.js';
|
|
41
41
|
export { DefaultModeStore, LLMSelector, LLMSelectorOptions, ModeLoaderOptions, loadProjectModes, loadUserModes } from './models/index.js';
|
|
42
42
|
export { AISpecBuilder, AISpecBuilderOptions, AISpecPhase, AISpecSession, AutoExecutor, AutoExecutorOptions, BottleneckTask, CollectedAnswer, CriticalPathAnalysis, DefaultTaskStore, ExecutionSummary, GeneratedTask, SPEC_TEMPLATES, SpecDiff, SpecDrivenDev, SpecDrivenDevOptions, SpecIndexEntry, SpecParser, SpecStore, SpecStoreOptions, SpecVersion, SpecVersioning, TaskExecutionContext, TaskExecutionResult, TaskFlow, TaskFlowEventMap, TaskFlowEventName, TaskFlowExecutionContext, TaskFlowOptions, TaskFlowPhase, TaskGenerator, TaskGeneratorOptions, TaskGraphIndexEntry, TaskGraphStore, TaskGraphStoreOptions, TaskStore, TaskTracker, TaskTrackerOptions, TaskTransition, analyzeCriticalPath, createAutoExecutor, getTemplate, listTemplates, renderProgress, renderSpecAnalysis, renderTaskGraph, renderTaskList, templateToMarkdown } from './sdd/index.js';
|
|
43
43
|
export { DefaultHealthRegistry, InMemoryMetricsSink, MetricsServerHandle, MetricsServerOptions, NoopMetricsSink, NoopTracer, OTelTracer, OtlpMetricsExporterHandle, OtlpMetricsExporterOptions, OtlpTraceExporterHandle, OtlpTraceExporterOptions, PROMETHEUS_CONTENT_TYPE, buildOtlpMetricsRequest, buildOtlpTracesRequest, renderPrometheus, startMetricsServer, startOtlpMetricsExporter, startOtlpTraceExporter, wireMetricsToEvents } from './observability/index.js';
|
|
44
|
-
export { C as ContextManagerAction, a as ContextManagerInput, b as ContextManagerResult, c as ContextManagerToolOptions, d as allServers, e as awsServer, f as blockServer, g as braveSearchServer, h as context7Server, i as contextManagerTool, j as createContextManagerTool, k as everArtServer, l as filesystemServer, m as githubServer, n as googleMapsServer, o as miniMaxVisionServer, s as sentinelServer, p as slackServer, z as zaiVisionServer } from './mcp-servers-
|
|
44
|
+
export { C as ContextManagerAction, a as ContextManagerInput, b as ContextManagerResult, c as ContextManagerToolOptions, d as allServers, e as awsServer, f as blockServer, g as braveSearchServer, h as context7Server, i as contextManagerTool, j as createContextManagerTool, k as everArtServer, l as filesystemServer, m as githubServer, n as googleMapsServer, o as miniMaxVisionServer, s as sentinelServer, p as slackServer, z as zaiVisionServer } from './mcp-servers-CSMfaBuL.js';
|
|
45
45
|
export { DownloadResult, InstallResult, InstalledSkillEntry, ManifestData, ParsedRef, SkillInstaller, SkillInstallerOptions, SkillManifestStore, UpdateResult, downloadGitHubTarball, parseSkillRef } from './skills/index.js';
|
|
46
46
|
export { DefaultSessionRewinder, SessionRewinderOptions } from './storage/index.js';
|
|
47
|
+
import { R as RetryPolicy, E as ErrorHandler } from './retry-policy-LLUxJmYY.js';
|
|
47
48
|
import { L as Logger } from './logger-BMQgxvdy.js';
|
|
48
49
|
export { a as LogLevel } from './logger-BMQgxvdy.js';
|
|
49
50
|
export { a as ModelsDevPayload, c as ModelsDevProvider, M as ModelsRegistry, b as ResolvedModel, R as ResolvedProvider, W as WireFamily } from './models-registry-Y2xbog0E.js';
|
|
50
51
|
export { S as SecretVault } from './secret-vault-DoISxaKO.js';
|
|
51
|
-
import './retry-policy-DUJ8-Qc_.js';
|
|
52
52
|
import './path-resolver-CPRj4bFY.js';
|
|
53
|
-
import './selector-
|
|
53
|
+
import './selector-DB2-byKH.js';
|
|
54
54
|
import 'node:events';
|
|
55
55
|
|
|
56
|
+
/**
|
|
57
|
+
* Skill content structure for generated security skills.
|
|
58
|
+
*/
|
|
59
|
+
interface GeneratedSkillContent {
|
|
60
|
+
type: 'skill';
|
|
61
|
+
content: string;
|
|
62
|
+
}
|
|
63
|
+
type TechStack = 'nodejs' | 'python' | 'rust' | 'go' | 'java' | 'dotnet' | 'php' | 'ruby' | 'cpp' | 'c' | 'kotlin' | 'swift' | 'unknown';
|
|
64
|
+
type PackageManager = 'npm' | 'pnpm' | 'yarn' | 'bun' | 'pip' | 'poetry' | 'cargo' | 'maven' | 'gradle' | 'nuget' | 'composer' | 'bundler' | 'cmake' | 'swiftpm' | 'go' | 'unknown';
|
|
65
|
+
interface DetectedDependency {
|
|
66
|
+
name: string;
|
|
67
|
+
version: string;
|
|
68
|
+
isDev: boolean;
|
|
69
|
+
hasSecurityIssue?: boolean;
|
|
70
|
+
}
|
|
71
|
+
interface TechStackInfo {
|
|
72
|
+
stack: TechStack;
|
|
73
|
+
packageManager: PackageManager;
|
|
74
|
+
manifestFile: string;
|
|
75
|
+
dependencies: DetectedDependency[];
|
|
76
|
+
projectPath: string;
|
|
77
|
+
}
|
|
78
|
+
interface DetectionResult {
|
|
79
|
+
timestamp: string;
|
|
80
|
+
projectRoot: string;
|
|
81
|
+
detectedStacks: TechStackInfo[];
|
|
82
|
+
isMonorepo: boolean;
|
|
83
|
+
workspaceConfigs?: string[];
|
|
84
|
+
}
|
|
85
|
+
interface SkillGenerationContext {
|
|
86
|
+
techStack: TechStackInfo;
|
|
87
|
+
scanScope: ScanScope;
|
|
88
|
+
severityLevel: SeverityLevel;
|
|
89
|
+
}
|
|
90
|
+
type ScanScope = 'quick' | 'standard' | 'deep';
|
|
91
|
+
type SeverityLevel = 'critical' | 'high' | 'medium' | 'low' | 'all';
|
|
92
|
+
interface SecurityPattern {
|
|
93
|
+
id: string;
|
|
94
|
+
name: string;
|
|
95
|
+
severity: SeverityLevel;
|
|
96
|
+
description: string;
|
|
97
|
+
patterns: RegExp[];
|
|
98
|
+
fileExtensions: string[];
|
|
99
|
+
falsePositiveMarkers: string[];
|
|
100
|
+
remediation: string;
|
|
101
|
+
}
|
|
102
|
+
interface GeneratedSecuritySkill {
|
|
103
|
+
name: string;
|
|
104
|
+
description: string;
|
|
105
|
+
techStack: TechStack;
|
|
106
|
+
patterns: SecurityPattern[];
|
|
107
|
+
rules: string[];
|
|
108
|
+
metadata: {
|
|
109
|
+
generatedAt: string;
|
|
110
|
+
version: string;
|
|
111
|
+
confidence: number;
|
|
112
|
+
};
|
|
113
|
+
content: GeneratedSkillContent;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
declare class TechStackDetector {
|
|
117
|
+
private cachedResults;
|
|
118
|
+
detect(projectRoot: string): Promise<DetectionResult>;
|
|
119
|
+
private matchSignature;
|
|
120
|
+
private findMatchingManifest;
|
|
121
|
+
private detectMonorepo;
|
|
122
|
+
private findWorkspaceConfigs;
|
|
123
|
+
clearCache(): void;
|
|
124
|
+
}
|
|
125
|
+
declare const defaultTechStackDetector: TechStackDetector;
|
|
126
|
+
|
|
127
|
+
interface GeneratedSkill {
|
|
128
|
+
name: string;
|
|
129
|
+
description: string;
|
|
130
|
+
version: string;
|
|
131
|
+
techStack: TechStack;
|
|
132
|
+
content: GeneratedSkillContent;
|
|
133
|
+
patterns: SecurityPattern[];
|
|
134
|
+
metadata: {
|
|
135
|
+
generatedAt: string;
|
|
136
|
+
confidence: number;
|
|
137
|
+
targetFiles: string[];
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
interface SkillGeneratorOptions {
|
|
141
|
+
includeSecrets: boolean;
|
|
142
|
+
includeInjection: boolean;
|
|
143
|
+
includeConfig: boolean;
|
|
144
|
+
includeDependencies: boolean;
|
|
145
|
+
severityThreshold: 'critical' | 'high' | 'medium' | 'low';
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Generates security skills dynamically based on tech stack.
|
|
149
|
+
* Uses predefined vulnerability patterns per stack.
|
|
150
|
+
*/
|
|
151
|
+
declare class SkillGenerator {
|
|
152
|
+
private options;
|
|
153
|
+
constructor(options?: Partial<SkillGeneratorOptions>);
|
|
154
|
+
generate(techStack: TechStackInfo): GeneratedSkill;
|
|
155
|
+
private getPatternsForStack;
|
|
156
|
+
private getSecretPatterns;
|
|
157
|
+
private getInjectionPatterns;
|
|
158
|
+
private getConfigPatterns;
|
|
159
|
+
private getTargetFilesForStack;
|
|
160
|
+
private buildSkillContent;
|
|
161
|
+
private calculateConfidence;
|
|
162
|
+
}
|
|
163
|
+
declare const defaultSkillGenerator: SkillGenerator;
|
|
164
|
+
|
|
165
|
+
interface Finding {
|
|
166
|
+
id: string;
|
|
167
|
+
severity: 'critical' | 'high' | 'medium' | 'low';
|
|
168
|
+
category: 'secrets' | 'injection' | 'config' | 'dependency' | 'filesystem';
|
|
169
|
+
title: string;
|
|
170
|
+
description: string;
|
|
171
|
+
file: string;
|
|
172
|
+
line?: number;
|
|
173
|
+
snippet?: string;
|
|
174
|
+
remediation: string;
|
|
175
|
+
patternId: string;
|
|
176
|
+
confidence: 'high' | 'medium' | 'low';
|
|
177
|
+
}
|
|
178
|
+
interface ScanResult {
|
|
179
|
+
timestamp: string;
|
|
180
|
+
projectRoot: string;
|
|
181
|
+
techStack: TechStackInfo;
|
|
182
|
+
findings: Finding[];
|
|
183
|
+
summary: {
|
|
184
|
+
critical: number;
|
|
185
|
+
high: number;
|
|
186
|
+
medium: number;
|
|
187
|
+
low: number;
|
|
188
|
+
total: number;
|
|
189
|
+
};
|
|
190
|
+
scannedFiles: number;
|
|
191
|
+
scanDurationMs: number;
|
|
192
|
+
errors: string[];
|
|
193
|
+
}
|
|
194
|
+
interface ScanOptions {
|
|
195
|
+
includeSecrets: boolean;
|
|
196
|
+
includeInjection: boolean;
|
|
197
|
+
includeConfig: boolean;
|
|
198
|
+
includeDependencies: boolean;
|
|
199
|
+
excludePaths: string[];
|
|
200
|
+
fileExtensions: string[];
|
|
201
|
+
depth: 'quick' | 'standard' | 'deep';
|
|
202
|
+
}
|
|
203
|
+
declare class SecurityScanner {
|
|
204
|
+
private options;
|
|
205
|
+
constructor(options?: Partial<ScanOptions>);
|
|
206
|
+
scan(projectRoot: string, skill: GeneratedSkill, techStack: TechStackInfo): Promise<ScanResult>;
|
|
207
|
+
private gatherFiles;
|
|
208
|
+
private gatherFilesRecursive;
|
|
209
|
+
private shouldExclude;
|
|
210
|
+
private getTargetExtensions;
|
|
211
|
+
private scanFile;
|
|
212
|
+
private matchesCategory;
|
|
213
|
+
private getCategoryFromPattern;
|
|
214
|
+
private isFalsePositive;
|
|
215
|
+
private calculateSummary;
|
|
216
|
+
}
|
|
217
|
+
declare const defaultSecurityScanner: SecurityScanner;
|
|
218
|
+
|
|
219
|
+
interface ReportOptions {
|
|
220
|
+
outputDir: string;
|
|
221
|
+
format: 'markdown' | 'json' | 'html';
|
|
222
|
+
includeRemediation: boolean;
|
|
223
|
+
groupBySeverity: boolean;
|
|
224
|
+
maxFindingsPerCategory?: number;
|
|
225
|
+
}
|
|
226
|
+
declare class ReportGenerator {
|
|
227
|
+
private options;
|
|
228
|
+
constructor(options?: Partial<ReportOptions>);
|
|
229
|
+
generate(scanResult: ScanResult): Promise<string>;
|
|
230
|
+
private ensureOutputDir;
|
|
231
|
+
private generateMarkdown;
|
|
232
|
+
private formatFinding;
|
|
233
|
+
private groupBySeverity;
|
|
234
|
+
private groupByCategory;
|
|
235
|
+
private generateJson;
|
|
236
|
+
private generateHtml;
|
|
237
|
+
}
|
|
238
|
+
declare const defaultReportGenerator: ReportGenerator;
|
|
239
|
+
|
|
240
|
+
interface GitignoreUpdaterOptions {
|
|
241
|
+
gitignorePath: string;
|
|
242
|
+
entries: string[];
|
|
243
|
+
}
|
|
244
|
+
declare class GitignoreUpdater {
|
|
245
|
+
private options;
|
|
246
|
+
constructor(options?: Partial<GitignoreUpdaterOptions>);
|
|
247
|
+
update(): Promise<{
|
|
248
|
+
added: string[];
|
|
249
|
+
existing: string[];
|
|
250
|
+
errors: string[];
|
|
251
|
+
}>;
|
|
252
|
+
isEntryIgnored(entry: string): Promise<boolean>;
|
|
253
|
+
}
|
|
254
|
+
declare const defaultGitignoreUpdater: GitignoreUpdater;
|
|
255
|
+
|
|
256
|
+
interface SecurityScannerOptions {
|
|
257
|
+
projectRoot: string;
|
|
258
|
+
scanOptions?: {
|
|
259
|
+
depth?: 'quick' | 'standard' | 'deep';
|
|
260
|
+
includeSecrets?: boolean;
|
|
261
|
+
includeInjection?: boolean;
|
|
262
|
+
includeConfig?: boolean;
|
|
263
|
+
};
|
|
264
|
+
reportOptions?: Partial<ReportOptions>;
|
|
265
|
+
skipGitignore?: boolean;
|
|
266
|
+
/** Optional model name to pass to the LLM provider (defaults to the provider's default). */
|
|
267
|
+
model?: string;
|
|
268
|
+
}
|
|
269
|
+
/** Accepts a full Context or just the provider+model needed for LLM calls. */
|
|
270
|
+
type SecurityScannerContext = Context | {
|
|
271
|
+
provider: Provider;
|
|
272
|
+
model?: string;
|
|
273
|
+
};
|
|
274
|
+
interface FullScanResult {
|
|
275
|
+
detectionResult: Awaited<ReturnType<typeof defaultTechStackDetector.detect>>;
|
|
276
|
+
generatedSkill: GeneratedSkill;
|
|
277
|
+
scanResult: ScanResult;
|
|
278
|
+
reportPath: string;
|
|
279
|
+
synthesizedReport?: string;
|
|
280
|
+
gitignoreResult?: Awaited<ReturnType<typeof defaultGitignoreUpdater.update>>;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* LLM-powered Security Scanner Orchestrator
|
|
284
|
+
*
|
|
285
|
+
* Flow:
|
|
286
|
+
* 1. Detect tech stack (static)
|
|
287
|
+
* 2. Generate project-specific security skill via LLM
|
|
288
|
+
* 3. Scan code using LLM with generated skill as context
|
|
289
|
+
* 4. Synthesize findings into structured report via LLM
|
|
290
|
+
*/
|
|
291
|
+
declare class SecurityScannerOrchestrator {
|
|
292
|
+
private readonly retryPolicy?;
|
|
293
|
+
private readonly errorHandler?;
|
|
294
|
+
private detector;
|
|
295
|
+
private reportGenerator;
|
|
296
|
+
private gitignoreUpdater;
|
|
297
|
+
constructor(retryPolicy?: RetryPolicy | undefined, errorHandler?: ErrorHandler | undefined);
|
|
298
|
+
/**
|
|
299
|
+
* Wraps provider.complete with retry logic using the injected RetryPolicy.
|
|
300
|
+
*/
|
|
301
|
+
private completeWithRetry;
|
|
302
|
+
/**
|
|
303
|
+
* Run full security scan with LLM assistance.
|
|
304
|
+
* Accepts a full Context (active agent run) or just provider+model (pre-agent session).
|
|
305
|
+
*/
|
|
306
|
+
run(ctx: SecurityScannerContext, options: SecurityScannerOptions): Promise<FullScanResult>;
|
|
307
|
+
/**
|
|
308
|
+
* Generate a project-specific security skill using LLM.
|
|
309
|
+
* The LLM analyzes the project structure and creates tailored security patterns.
|
|
310
|
+
*/
|
|
311
|
+
private generateSkillLLM;
|
|
312
|
+
/**
|
|
313
|
+
* Scan code using LLM with the generated skill as context.
|
|
314
|
+
* The LLM analyzes files and reports security findings.
|
|
315
|
+
*/
|
|
316
|
+
private scanWithLLM;
|
|
317
|
+
/**
|
|
318
|
+
* Scan a batch of files using LLM.
|
|
319
|
+
*/
|
|
320
|
+
private scanFileBatchLLM;
|
|
321
|
+
/**
|
|
322
|
+
* Synthesize a comprehensive security report using LLM.
|
|
323
|
+
*/
|
|
324
|
+
private synthesizeReportLLM;
|
|
325
|
+
/**
|
|
326
|
+
* Generate a basic fallback report when LLM synthesis fails.
|
|
327
|
+
*/
|
|
328
|
+
private generateBasicReport;
|
|
329
|
+
/**
|
|
330
|
+
* Write synthesized report to file.
|
|
331
|
+
*/
|
|
332
|
+
private writeReport;
|
|
333
|
+
/**
|
|
334
|
+
* Gather project info for skill generation.
|
|
335
|
+
*/
|
|
336
|
+
private gatherProjectInfo;
|
|
337
|
+
/**
|
|
338
|
+
* Gather files to scan based on patterns.
|
|
339
|
+
*/
|
|
340
|
+
private gatherFiles;
|
|
341
|
+
private gatherFilesRecursive;
|
|
342
|
+
/**
|
|
343
|
+
* Generate fallback skill when LLM fails.
|
|
344
|
+
*/
|
|
345
|
+
private generateFallbackSkill;
|
|
346
|
+
/**
|
|
347
|
+
* Quick scan - legacy compatibility.
|
|
348
|
+
* NOTE: This won't use LLM as it doesn't have access to ctx.
|
|
349
|
+
*/
|
|
350
|
+
quickScan(projectRoot: string): Promise<ScanResult>;
|
|
351
|
+
}
|
|
352
|
+
declare const defaultOrchestrator: SecurityScannerOrchestrator;
|
|
353
|
+
|
|
354
|
+
declare function createSecuritySlashCommand(): SlashCommand;
|
|
355
|
+
declare const securitySlashCommand: SlashCommand;
|
|
356
|
+
|
|
56
357
|
interface InputBuilderOptions {
|
|
57
358
|
store: AttachmentStore;
|
|
58
359
|
/**
|
|
@@ -340,4 +641,4 @@ declare function loadPlugins(plugins: Plugin[], opts: LoadPluginsOptions): Promi
|
|
|
340
641
|
*/
|
|
341
642
|
declare function unloadPlugins(loadedPlugins: Plugin[], opts: LoadPluginsOptions): Promise<void>;
|
|
342
643
|
|
|
343
|
-
export { AddAttachmentInput, AttachmentRef, AttachmentStore, BuildContext, Config, Container, ContentBlock, Context, DefaultPluginAPI, DefaultSystemPromptBuilder, type DefaultSystemPromptBuilderOptions, EventBus, EventName, ExtensionRegistry, InputBuilder, type InputBuilderEvent, type InputBuilderOptions, KERNEL_API_VERSION, LAYER_1_IDENTITY, Listener, type LoadPluginsOptions, Logger, MCPRegistryView, MemoryStore, MetricsSinkView, ModeStore, ModelCapabilities, Plugin, PluginAPI, type PluginAPIInit, PluginPipelines, ProviderRegistry, ProviderRegistryView, SessionWriterView, SkillLoader, SlashCommand, SlashCommandRegistry, SlashCommandRegistryView, SystemPromptBuilder, SystemPromptContributor, TextBlock, ToolRegistry, ToolRegistryView, loadPlugins, unloadPlugins };
|
|
644
|
+
export { AddAttachmentInput, AttachmentRef, AttachmentStore, BuildContext, Config, Container, ContentBlock, Context, DefaultPluginAPI, DefaultSystemPromptBuilder, type DefaultSystemPromptBuilderOptions, type DetectedDependency, type DetectionResult, EventBus, EventName, ExtensionRegistry, type Finding, type FullScanResult, type GeneratedSecuritySkill, type GeneratedSkill, type GeneratedSkillContent, GitignoreUpdater, InputBuilder, type InputBuilderEvent, type InputBuilderOptions, KERNEL_API_VERSION, LAYER_1_IDENTITY, Listener, type LoadPluginsOptions, Logger, MCPRegistryView, MemoryStore, MetricsSinkView, ModeStore, ModelCapabilities, type PackageManager, Plugin, PluginAPI, type PluginAPIInit, PluginPipelines, Provider, ProviderRegistry, ProviderRegistryView, ReportGenerator, type ReportOptions, type ScanOptions, type ScanResult, type ScanScope, type SecurityPattern, SecurityScanner, type SecurityScannerContext, type SecurityScannerOptions, SecurityScannerOrchestrator, SessionWriterView, type SeverityLevel, type SkillGenerationContext, SkillGenerator, type SkillGeneratorOptions, SkillLoader, SlashCommand, SlashCommandRegistry, SlashCommandRegistryView, SystemPromptBuilder, SystemPromptContributor, type TechStack, TechStackDetector, type TechStackInfo, TextBlock, ToolRegistry, ToolRegistryView, createSecuritySlashCommand, defaultGitignoreUpdater, defaultOrchestrator, defaultReportGenerator, defaultSecurityScanner, defaultSkillGenerator, defaultTechStackDetector, loadPlugins, securitySlashCommand, unloadPlugins };
|