aos-harness 0.1.0 → 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/package.json +2 -2
- package/src/commands/list.ts +1 -1
- package/src/commands/run.ts +2 -2
- package/src/commands/validate.ts +5 -5
- package/src/utils.ts +10 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aos-harness",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Agentic Orchestration System — assemble AI agents into deliberation and execution teams",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"test": "bun run src/index.ts validate"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@aos-harness/runtime": "0.1.
|
|
38
|
+
"@aos-harness/runtime": "0.1.2",
|
|
39
39
|
"js-yaml": "^4.1.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
package/src/commands/list.ts
CHANGED
|
@@ -27,7 +27,7 @@ export async function listCommand(args: ParsedArgs): Promise<void> {
|
|
|
27
27
|
const root = getHarnessRoot();
|
|
28
28
|
const coreDir = join(root, "core");
|
|
29
29
|
|
|
30
|
-
const { loadAgent, loadProfile, loadDomain, loadSkill } = await import("
|
|
30
|
+
const { loadAgent, loadProfile, loadDomain, loadSkill } = await import("@aos-harness/runtime/config-loader");
|
|
31
31
|
|
|
32
32
|
// ── Agents ────────────────────────────────────────────────────
|
|
33
33
|
|
package/src/commands/run.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { existsSync, readdirSync, mkdirSync } from "node:fs";
|
|
|
6
6
|
import { join, resolve, basename } from "node:path";
|
|
7
7
|
import { c, type ParsedArgs } from "../colors";
|
|
8
8
|
import { getHarnessRoot, discoverDirs, promptSelect } from "../utils";
|
|
9
|
-
import type { TranscriptEntry } from "
|
|
9
|
+
import type { TranscriptEntry } from "@aos-harness/runtime/types";
|
|
10
10
|
|
|
11
11
|
function createEventBuffer(platformUrl: string, sessionId: string) {
|
|
12
12
|
const buffer: TranscriptEntry[] = [];
|
|
@@ -163,7 +163,7 @@ export async function runCommand(args: ParsedArgs): Promise<void> {
|
|
|
163
163
|
: join(coreDir, "workflows");
|
|
164
164
|
|
|
165
165
|
// ── Validate brief against profile ───────────────────────────
|
|
166
|
-
const { loadProfile, loadWorkflow, validateBrief } = await import("
|
|
166
|
+
const { loadProfile, loadWorkflow, validateBrief } = await import("@aos-harness/runtime/config-loader");
|
|
167
167
|
const profile = loadProfile(profileDir);
|
|
168
168
|
const validation = validateBrief(briefPath, profile.input.required_sections);
|
|
169
169
|
|
package/src/commands/validate.ts
CHANGED
|
@@ -51,11 +51,11 @@ export async function validateCommand(args: ParsedArgs): Promise<void> {
|
|
|
51
51
|
const coreDir = join(root, "core");
|
|
52
52
|
|
|
53
53
|
// Import runtime modules
|
|
54
|
-
const { loadAgent, loadProfile, loadDomain, loadWorkflow, loadSkill, validateBrief } = await import("
|
|
55
|
-
const { applyDomain } = await import("
|
|
56
|
-
const { resolveTemplate } = await import("
|
|
57
|
-
const { ConstraintEngine } = await import("
|
|
58
|
-
const { DelegationRouter } = await import("
|
|
54
|
+
const { loadAgent, loadProfile, loadDomain, loadWorkflow, loadSkill, validateBrief } = await import("@aos-harness/runtime/config-loader");
|
|
55
|
+
const { applyDomain } = await import("@aos-harness/runtime/domain-merger");
|
|
56
|
+
const { resolveTemplate } = await import("@aos-harness/runtime/template-resolver");
|
|
57
|
+
const { ConstraintEngine } = await import("@aos-harness/runtime/constraint-engine");
|
|
58
|
+
const { DelegationRouter } = await import("@aos-harness/runtime/delegation-router");
|
|
59
59
|
|
|
60
60
|
const results: CheckResult[] = [];
|
|
61
61
|
|
package/src/utils.ts
CHANGED
|
@@ -101,11 +101,16 @@ export function detectProject(startDir: string): string | null {
|
|
|
101
101
|
* or import.meta.url — this is a deliberate Bun dependency.
|
|
102
102
|
*/
|
|
103
103
|
export function getPackageCoreDir(): string | null {
|
|
104
|
-
//
|
|
105
|
-
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
104
|
+
// When installed via npm: src/utils.ts → src/ → package root (1 level up)
|
|
105
|
+
// When in monorepo dev: cli/src/utils.ts → cli/src → cli → root (2 levels up)
|
|
106
|
+
const candidates = [
|
|
107
|
+
resolve(import.meta.dir, "..", "core"), // npm install: package-root/core
|
|
108
|
+
resolve(import.meta.dir, "../..", "core"), // monorepo dev: harness-root/core
|
|
109
|
+
];
|
|
110
|
+
for (const coreDir of candidates) {
|
|
111
|
+
if (existsSync(join(coreDir, "agents"))) {
|
|
112
|
+
return coreDir;
|
|
113
|
+
}
|
|
109
114
|
}
|
|
110
115
|
return null;
|
|
111
116
|
}
|