@almadar/agent 1.6.4 → 2.0.1
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/LICENSE +21 -72
- package/README.md +25 -0
- package/dist/agent/event-budget.d.ts +28 -0
- package/dist/agent/experimental/hitl-v2.d.ts +161 -0
- package/dist/agent/experimental/hitl-workflow-integration.d.ts +182 -0
- package/dist/agent/index.d.ts +14 -13
- package/dist/agent/index.js.map +1 -1
- package/dist/agent/interrupt-config.d.ts +51 -0
- package/dist/agent/session-manager.d.ts +204 -0
- package/dist/agent/skill-agent.d.ts +182 -0
- package/dist/agent/workflow-middleware.d.ts +63 -0
- package/dist/agent/workflow-tool-wrapper.d.ts +87 -0
- package/dist/{api-types-CXrq-fts.d.ts → api-types.d.ts} +85 -51
- package/dist/context/compaction.d.ts +191 -0
- package/dist/context-compaction.d.ts +55 -0
- package/dist/evals/online-sampling.d.ts +114 -0
- package/dist/evals/utils/compact-orbital.d.ts +100 -0
- package/dist/event-transformer/event-transformer.d.ts +120 -0
- package/dist/event-transformer/index.d.ts +4 -122
- package/dist/events.d.ts +85 -0
- package/dist/index.d.ts +58 -1678
- package/dist/index.js +39 -0
- package/dist/index.js.map +1 -1
- package/dist/memory/MemoryManager.d.ts +243 -0
- package/dist/memory/PreferenceLearner.d.ts +59 -0
- package/dist/memory/agentic-search.d.ts +116 -0
- package/dist/memory/index.d.ts +14 -0
- package/dist/memory/memory-orbital.d.ts +66 -0
- package/dist/memory/types.d.ts +143 -0
- package/dist/metrics.d.ts +77 -0
- package/dist/multi-user.d.ts +155 -0
- package/dist/observability/index.d.ts +14 -0
- package/dist/observability/langsmith-integration.d.ts +203 -0
- package/dist/observability.d.ts +196 -0
- package/dist/orbitals/archive/sanitize.d.ts +24 -0
- package/dist/orbitals/batch/batch-generator.d.ts +41 -0
- package/dist/orbitals/batch/concurrency.d.ts +54 -0
- package/dist/orbitals/batch/index.d.ts +14 -0
- package/dist/orbitals/batch/prompt-assembler.d.ts +92 -0
- package/dist/orbitals/batch/types.d.ts +103 -0
- package/dist/orbitals/cache/index.d.ts +11 -0
- package/dist/orbitals/cache/orbital-fingerprint.d.ts +37 -0
- package/dist/orbitals/cache/prompt-assembler.d.ts +65 -0
- package/dist/orbitals/cache/structural-templates.d.ts +33 -0
- package/dist/orbitals/combiner/index.d.ts +102 -0
- package/dist/orbitals/domain-language/index.d.ts +9 -0
- package/dist/orbitals/domain-language/prompts/index.d.ts +11 -0
- package/dist/orbitals/domain-language/prompts/odl-examples.d.ts +8 -0
- package/dist/orbitals/domain-language/prompts/odl-patterns.d.ts +8 -0
- package/dist/orbitals/domain-language/prompts/odl-syntax.d.ts +8 -0
- package/dist/orbitals/domain-language/prompts/odl-to-schema.d.ts +8 -0
- package/dist/orbitals/generation/index.d.ts +10 -0
- package/dist/orbitals/generation/orbital-generator.d.ts +120 -0
- package/dist/orbitals/shared/constants.d.ts +65 -0
- package/dist/orbitals/shared/index.d.ts +11 -0
- package/dist/orbitals/shared/types.d.ts +187 -0
- package/dist/orbitals/shared/utils.d.ts +97 -0
- package/dist/orchestration/complexity-classifier.d.ts +38 -0
- package/dist/orchestration/fixing-orchestrator.d.ts +53 -0
- package/dist/orchestration/index.d.ts +31 -0
- package/dist/orchestration/provider-router.d.ts +45 -0
- package/dist/{firestore-checkpointer-CkNKXoun.d.ts → persistence/firestore-checkpointer.d.ts} +13 -58
- package/dist/persistence/firestore-session-store.d.ts +75 -0
- package/dist/persistence/firestore-store.d.ts +86 -0
- package/dist/persistence/index.d.ts +7 -198
- package/dist/persistence/memory-backend.d.ts +33 -0
- package/dist/persistence/types.d.ts +40 -0
- package/dist/security/audit-log.d.ts +44 -0
- package/dist/state-sync.d.ts +171 -0
- package/dist/subagents.d.ts +38 -0
- package/dist/tools/combine-schemas.d.ts +154 -0
- package/dist/tools/composition.d.ts +119 -0
- package/dist/{orbital-subagent-BdFuf77p.d.ts → tools/domain-orbital.d.ts} +22 -461
- package/dist/tools/execute.d.ts +38 -0
- package/dist/tools/finish-task.d.ts +56 -0
- package/dist/tools/generate-schema.d.ts +53 -0
- package/dist/tools/github.d.ts +297 -0
- package/dist/tools/index.d.ts +1318 -8
- package/dist/tools/orbital-batch-subagent.d.ts +85 -0
- package/dist/tools/orbital-subagent.d.ts +454 -0
- package/dist/tools/orchestrated-fixing.d.ts +74 -0
- package/dist/tools/orchestrated-generation.d.ts +75 -0
- package/dist/tools/sandbox-executor.d.ts +31 -0
- package/dist/tools/schema-chunking.d.ts +117 -0
- package/dist/tools/trait-subagent.d.ts +179 -0
- package/dist/tools/validate-schema.d.ts +17 -0
- package/dist/types.d.ts +14 -17
- package/dist/utils/safety/capability-token.d.ts +50 -0
- package/dist/utils/safety/circuit-breaker.d.ts +71 -0
- package/dist/utils/safety/index.d.ts +19 -0
- package/dist/utils/safety/rate-limiter.d.ts +39 -0
- package/dist/utils/safety/threshold-auth.d.ts +70 -0
- package/dist/workspace/git-client.d.ts +51 -0
- package/dist/workspace/index.d.ts +29 -346
- package/dist/workspace/index.js +39 -0
- package/dist/workspace/index.js.map +1 -1
- package/dist/workspace/memory-files.d.ts +31 -0
- package/dist/workspace/sink-manager.d.ts +26 -0
- package/dist/workspace/sinks/firestore-sink.d.ts +41 -0
- package/dist/workspace/sinks/git-sink.d.ts +47 -0
- package/dist/workspace/sinks/index.d.ts +9 -0
- package/dist/workspace/templates.d.ts +32 -0
- package/dist/workspace/types.d.ts +86 -0
- package/dist/workspace/workspace-manager.d.ts +57 -0
- package/package.json +12 -10
- package/dist/index-DW3F-Ihx.d.ts +0 -2501
- package/dist/index-DZn69no8.d.ts +0 -1014
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WorkspaceManager — Lifecycle management for agent workspaces.
|
|
3
|
+
*
|
|
4
|
+
* Handles initialization (create dirs, write .orb templates, git init),
|
|
5
|
+
* file write notifications (fan out to sinks), memory read/write,
|
|
6
|
+
* and session end (final commit, tag, cleanup).
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
10
|
+
import type { WorkspaceConfig, FileMeta, SinkResult, MemorySnapshot } from './types.js';
|
|
11
|
+
import { SinkManager } from './sink-manager.js';
|
|
12
|
+
export declare class WorkspaceManager {
|
|
13
|
+
private readonly config;
|
|
14
|
+
private readonly sinkManager;
|
|
15
|
+
private gitSink;
|
|
16
|
+
private initialized;
|
|
17
|
+
constructor(config: WorkspaceConfig);
|
|
18
|
+
/** Get the absolute path to a workspace-relative path. */
|
|
19
|
+
resolve(relativePath: string): string;
|
|
20
|
+
/** Get the SinkManager for direct registration of additional sinks. */
|
|
21
|
+
get sinks(): SinkManager;
|
|
22
|
+
/**
|
|
23
|
+
* Initialize the workspace: create directories, write .orb templates,
|
|
24
|
+
* optionally initialize git.
|
|
25
|
+
*
|
|
26
|
+
* Safe to call multiple times — skips if already initialized.
|
|
27
|
+
*/
|
|
28
|
+
initialize(): Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Notify sinks that a file was written.
|
|
31
|
+
* Call this from the server when the agent writes a file.
|
|
32
|
+
*
|
|
33
|
+
* @param relativePath - Path relative to workspace root
|
|
34
|
+
* @param content - File content as string
|
|
35
|
+
* @param meta - Optional metadata override (auto-inferred if not provided)
|
|
36
|
+
*/
|
|
37
|
+
onFileWritten(relativePath: string, content: string, meta?: Partial<FileMeta>): Promise<SinkResult[]>;
|
|
38
|
+
/**
|
|
39
|
+
* Load memory from .orb files. Call at session start to provide
|
|
40
|
+
* the agent with user preferences and project context.
|
|
41
|
+
*/
|
|
42
|
+
loadMemory(): Promise<MemorySnapshot>;
|
|
43
|
+
/**
|
|
44
|
+
* Update memory .orb file instances. Call at session end to
|
|
45
|
+
* persist learned preferences and discovered domain knowledge.
|
|
46
|
+
*/
|
|
47
|
+
saveMemory(updates: {
|
|
48
|
+
user?: Record<string, unknown>[];
|
|
49
|
+
project?: Record<string, unknown>[];
|
|
50
|
+
}): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* End the session: notify all sinks, create git tag.
|
|
53
|
+
* Call from the server when the agent session completes.
|
|
54
|
+
*/
|
|
55
|
+
endSession(): Promise<SinkResult[]>;
|
|
56
|
+
private writeTemplateIfMissing;
|
|
57
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@almadar/agent",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "AI agent infrastructure for Almadar orbital schema generation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
+
"@almadar/core": ">=2.0.0",
|
|
47
|
+
"@almadar/integrations": ">=2.0.1",
|
|
48
|
+
"@almadar/llm": ">=2.0.1",
|
|
49
|
+
"@almadar/patterns": ">=2.0.0",
|
|
50
|
+
"@almadar/skills": ">=2.0.1",
|
|
46
51
|
"uuid": "^9.0.0",
|
|
47
|
-
"zod": "^3.22.0"
|
|
48
|
-
"@almadar/core": "1.0.18",
|
|
49
|
-
"@almadar/integrations": "1.0.15",
|
|
50
|
-
"@almadar/patterns": "1.1.1",
|
|
51
|
-
"@almadar/llm": "1.0.17",
|
|
52
|
-
"@almadar/skills": "1.4.1"
|
|
52
|
+
"zod": "^3.22.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"@langchain/core": ">=1.0.0",
|
|
@@ -82,12 +82,13 @@
|
|
|
82
82
|
"deepagents": "^1.7.3",
|
|
83
83
|
"tsup": "^8.0.0",
|
|
84
84
|
"typescript": "^5.4.0",
|
|
85
|
-
"vitest": "^3.0.0"
|
|
85
|
+
"vitest": "^3.0.0",
|
|
86
|
+
"@types/node": "^22.0.0"
|
|
86
87
|
},
|
|
87
88
|
"repository": {
|
|
88
89
|
"type": "git",
|
|
89
90
|
"url": "https://github.com/almadar-io/almadar.git",
|
|
90
|
-
"directory": "packages/
|
|
91
|
+
"directory": "docs/packages/agent"
|
|
91
92
|
},
|
|
92
93
|
"license": "MIT",
|
|
93
94
|
"keywords": [
|
|
@@ -97,8 +98,9 @@
|
|
|
97
98
|
"deepagent",
|
|
98
99
|
"schema-generation"
|
|
99
100
|
],
|
|
101
|
+
"homepage": "https://github.com/almadar-io/almadar#readme",
|
|
100
102
|
"scripts": {
|
|
101
|
-
"build": "tsup",
|
|
103
|
+
"build": "tsup && tsc --declaration --emitDeclarationOnly --outDir dist --rootDir src --skipLibCheck || true",
|
|
102
104
|
"build:watch": "tsup --watch",
|
|
103
105
|
"test": "vitest run",
|
|
104
106
|
"typecheck": "tsc --noEmit",
|