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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aos-harness",
3
- "version": "0.1.0",
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.0",
38
+ "@aos-harness/runtime": "0.1.2",
39
39
  "js-yaml": "^4.1.0"
40
40
  },
41
41
  "devDependencies": {
@@ -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("../../../runtime/src/config-loader");
30
+ const { loadAgent, loadProfile, loadDomain, loadSkill } = await import("@aos-harness/runtime/config-loader");
31
31
 
32
32
  // ── Agents ────────────────────────────────────────────────────
33
33
 
@@ -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 "../../../runtime/src/types";
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("../../../runtime/src/config-loader");
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
 
@@ -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("../../../runtime/src/config-loader");
55
- const { applyDomain } = await import("../../../runtime/src/domain-merger");
56
- const { resolveTemplate } = await import("../../../runtime/src/template-resolver");
57
- const { ConstraintEngine } = await import("../../../runtime/src/constraint-engine");
58
- const { DelegationRouter } = await import("../../../runtime/src/delegation-router");
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
- // cli/src/utils.ts -> cli/src -> cli -> look for core/
105
- const packageRoot = resolve(import.meta.dir, "../..");
106
- const coreDir = join(packageRoot, "core");
107
- if (existsSync(join(coreDir, "agents"))) {
108
- return coreDir;
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
  }