@lensagent/core 0.1.1 → 0.1.2
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 +63 -4
- package/config/lens.example.jsonc +36 -13
- package/dist/adapters/executor-router.d.ts +20 -0
- package/dist/adapters/executor-router.js +86 -0
- package/dist/adapters/executor.d.ts +9 -3
- package/dist/adapters/executor.js +196 -61
- package/dist/adapters/lsp.d.ts +2 -1
- package/dist/adapters/lsp.js +98 -41
- package/dist/adapters/mcp.js +52 -17
- package/dist/adapters/revert.d.ts +5 -4
- package/dist/adapters/revert.js +6 -64
- package/dist/adapters/web.d.ts +9 -0
- package/dist/adapters/web.js +244 -0
- package/dist/config/files.d.ts +14 -0
- package/dist/config/files.js +57 -0
- package/dist/config/runtime.d.ts +3 -4
- package/dist/config/runtime.js +116 -97
- package/dist/config/schema.d.ts +56 -10
- package/dist/config/schema.js +48 -8
- package/dist/contracts/capability.d.ts +27 -1
- package/dist/contracts/domain.d.ts +1 -0
- package/dist/contracts/model.d.ts +33 -6
- package/dist/contracts/review.d.ts +17 -0
- package/dist/contracts/review.js +1 -0
- package/dist/core/access-policy.d.ts +40 -0
- package/dist/core/access-policy.js +68 -0
- package/dist/core/access.d.ts +30 -2
- package/dist/core/access.js +159 -26
- package/dist/core/context-boundaries.d.ts +25 -0
- package/dist/core/context-boundaries.js +106 -0
- package/dist/core/context.d.ts +3 -0
- package/dist/core/context.js +11 -0
- package/dist/core/host.js +261 -173
- package/dist/entry/pair.d.ts +1 -0
- package/dist/entry/pair.js +14 -0
- package/dist/entry/run.js +1 -1
- package/dist/execution/lsp-process.d.ts +3 -2
- package/dist/execution/lsp-process.js +46 -28
- package/dist/http/server.d.ts +5 -0
- package/dist/http/server.js +262 -80
- package/dist/runtime/agent.d.ts +9 -4
- package/dist/runtime/agent.js +361 -286
- package/dist/runtime/artifacts.d.ts +13 -1
- package/dist/runtime/artifacts.js +137 -10
- package/dist/runtime/cache.d.ts +59 -16
- package/dist/runtime/cache.js +124 -43
- package/dist/runtime/calls.d.ts +1 -1
- package/dist/runtime/calls.js +164 -48
- package/dist/runtime/capabilities.d.ts +2 -2
- package/dist/runtime/capabilities.js +4 -5
- package/dist/runtime/cleanup.d.ts +5 -2
- package/dist/runtime/cleanup.js +48 -17
- package/dist/runtime/compaction.d.ts +9 -0
- package/dist/runtime/compaction.js +52 -0
- package/dist/runtime/context.d.ts +8 -4
- package/dist/runtime/context.js +115 -128
- package/dist/runtime/events.d.ts +7 -0
- package/dist/runtime/events.js +83 -0
- package/dist/runtime/images.d.ts +14 -0
- package/dist/runtime/images.js +82 -0
- package/dist/runtime/kernel-capabilities.d.ts +7 -1
- package/dist/runtime/kernel-capabilities.js +146 -68
- package/dist/runtime/model-audit.d.ts +9 -0
- package/dist/runtime/model-audit.js +39 -0
- package/dist/runtime/model.d.ts +109 -4
- package/dist/runtime/model.js +368 -143
- package/dist/runtime/observability.d.ts +1 -0
- package/dist/runtime/observability.js +60 -15
- package/dist/runtime/policy.d.ts +1 -1
- package/dist/runtime/policy.js +2 -2
- package/dist/runtime/profile.d.ts +2 -1
- package/dist/runtime/profile.js +12 -15
- package/dist/runtime/projects.d.ts +3 -1
- package/dist/runtime/projects.js +38 -17
- package/dist/runtime/ptc-worker.d.ts +1 -0
- package/dist/runtime/ptc-worker.js +97 -0
- package/dist/runtime/ptc.d.ts +16 -0
- package/dist/runtime/ptc.js +128 -0
- package/dist/runtime/results.d.ts +5 -4
- package/dist/runtime/results.js +29 -51
- package/dist/runtime/review.d.ts +4 -1
- package/dist/runtime/review.js +101 -22
- package/dist/runtime/scheduler.js +1 -0
- package/dist/runtime/skills.js +34 -5
- package/dist/runtime/task-audit.d.ts +21 -0
- package/dist/runtime/task-audit.js +122 -0
- package/dist/runtime/time.d.ts +9 -0
- package/dist/runtime/time.js +18 -0
- package/dist/runtime/tokenizer.d.ts +2 -0
- package/dist/runtime/tokenizer.js +26 -1
- package/dist/store/database.js +26 -1
- package/dist/store/event-log.d.ts +1 -0
- package/dist/store/event-log.js +22 -5
- package/dist/store/schema.d.ts +1 -1
- package/dist/store/schema.js +50 -1
- package/dist/store/store.d.ts +65 -19
- package/dist/store/store.js +986 -188
- package/package.json +14 -6
- package/proto/executor.proto +69 -55
package/dist/runtime/agent.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { type CapabilityInvocation, type CapabilityOutput } from '../core/domain.js';
|
|
1
2
|
import type { ConfigRuntime } from '../config/runtime.js';
|
|
2
3
|
import type { Document, IngressCommand, Store } from '../store/store.js';
|
|
3
4
|
import type { CallRuntime } from './calls.js';
|
|
4
5
|
import type { CapabilityRegistry } from './capabilities.js';
|
|
5
6
|
import type { ContextEngine } from './context.js';
|
|
6
|
-
import type
|
|
7
|
-
import type
|
|
7
|
+
import { type AiModelGateway } from './model.js';
|
|
8
|
+
import { type AutoReviewer } from './review.js';
|
|
8
9
|
import type { EventBus } from './events.js';
|
|
9
10
|
export interface SubagentCreateInput {
|
|
10
11
|
readonly parentAgentId: string;
|
|
@@ -14,6 +15,7 @@ export interface SubagentCreateInput {
|
|
|
14
15
|
readonly modelReasoningEffort?: string;
|
|
15
16
|
readonly initialPrompt?: string;
|
|
16
17
|
readonly initialMessage?: string;
|
|
18
|
+
readonly compactFocus?: string;
|
|
17
19
|
readonly ingress?: IngressCommand;
|
|
18
20
|
}
|
|
19
21
|
export declare class AgentRuntime {
|
|
@@ -26,10 +28,13 @@ export declare class AgentRuntime {
|
|
|
26
28
|
readonly calls: CallRuntime;
|
|
27
29
|
readonly reviewer: AutoReviewer;
|
|
28
30
|
readonly events: EventBus;
|
|
29
|
-
|
|
31
|
+
readonly refreshCapabilities: () => void;
|
|
32
|
+
constructor(store: Store, config: ConfigRuntime, context: ContextEngine, gateway: AiModelGateway, registry: CapabilityRegistry, calls: CallRuntime, reviewer: AutoReviewer, events: EventBus, refreshCapabilities?: () => void);
|
|
30
33
|
wake(projectId: string, agentId: string): void;
|
|
31
34
|
cancel(projectId: string, agentId: string): void;
|
|
32
35
|
close(): Promise<void>;
|
|
33
|
-
compact(projectId: string, agentId: string, expectedContextRevision: number,
|
|
36
|
+
compact(projectId: string, agentId: string, expectedContextRevision: number, focus: string | undefined, signal: AbortSignal): Promise<Document>;
|
|
37
|
+
compactFromTool(projectId: string, agentId: string, focus: string | undefined, signal: AbortSignal): Promise<Document>;
|
|
34
38
|
createSubagent(projectId: string, input: SubagentCreateInput, signal: AbortSignal): Promise<Document>;
|
|
39
|
+
executeProgram(invocation: CapabilityInvocation): Promise<CapabilityOutput>;
|
|
35
40
|
}
|