agentic-orchestrator 0.1.13 → 0.1.14

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.
@@ -190,7 +190,7 @@ describe('dashboard api integration', () => {
190
190
  method: 'POST',
191
191
  body: JSON.stringify({ action: 'checkout', stash_changes: false }),
192
192
  }),
193
- { params: { id: 'feature_checkout' } },
193
+ { params: Promise.resolve({ id: 'feature_checkout' }) },
194
194
  );
195
195
  const checkoutBody = (await checkoutResponse.json()) as {
196
196
  ok: boolean;
@@ -208,7 +208,7 @@ describe('dashboard api integration', () => {
208
208
  method: 'POST',
209
209
  body: JSON.stringify({ action: 'restore' }),
210
210
  }),
211
- { params: { id: 'feature_checkout' } },
211
+ { params: Promise.resolve({ id: 'feature_checkout' }) },
212
212
  );
213
213
  const restoreBody = (await restoreResponse.json()) as {
214
214
  ok: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-orchestrator",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "private": false,
5
5
  "workspaces": [
6
6
  "packages/*"
@@ -12,7 +12,7 @@
12
12
  "test": "npm run nx -- run control-plane:test",
13
13
  "run": "tsx apps/control-plane/src/cli/aop.ts",
14
14
  "build": "npm run lint && npm run nx -- run control-plane:build",
15
- "verify": "npm run typecheck && npm run validate:all && npm run lint:fix && npm run format && npm run test && npm run nx -- run control-plane:build",
15
+ "verify": "npm run typecheck && npm run validate:all && npm run lint:fix && npm run format && npm run test && npm run nx -- run control-plane:build && npm run dashboard:build",
16
16
  "typecheck": "tsc -p tsconfig.json --noEmit",
17
17
  "validate:mcp-contracts": "tsx apps/control-plane/scripts/validate-mcp-contracts.ts",
18
18
  "validate:docker-mcp": "node apps/control-plane/scripts/validate-docker-mcp-contract.mjs",
@@ -1,5 +1,6 @@
1
1
  /// <reference types="next" />
2
2
  /// <reference types="next/image-types/global" />
3
+ import "./.next/types/routes.d.ts";
3
4
 
4
5
  // NOTE: This file should not be edited
5
- // see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
6
+ // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
@@ -293,15 +293,16 @@ async function restoreCheckout(repoRoot: string, featureId: string): Promise<Res
293
293
 
294
294
  export async function POST(
295
295
  req: Request,
296
- { params }: { params: { id: string } },
296
+ { params }: { params: Promise<{ id: string }> },
297
297
  ): Promise<Response> {
298
+ const { id } = await params;
298
299
  const url = new URL(req.url);
299
300
  const project = url.searchParams.get('project');
300
301
  const repoRoot = await resolveProjectRoot(project);
301
302
  const body = (await req.json()) as CheckoutRequest;
302
303
  const action = body.action ?? 'checkout';
303
304
  if (action === 'restore') {
304
- return await restoreCheckout(repoRoot, params.id);
305
+ return await restoreCheckout(repoRoot, id);
305
306
  }
306
- return await checkoutFeature(repoRoot, params.id, body.stash_changes ?? true);
307
+ return await checkoutFeature(repoRoot, id, body.stash_changes ?? true);
307
308
  }
@@ -2,9 +2,13 @@ import { readFeatureDiff, resolveProjectRoot } from '@/lib/aop-client.js';
2
2
 
3
3
  export const dynamic = 'force-dynamic';
4
4
 
5
- export async function GET(req: Request, { params }: { params: { id: string } }): Promise<Response> {
5
+ export async function GET(
6
+ req: Request,
7
+ { params }: { params: Promise<{ id: string }> },
8
+ ): Promise<Response> {
9
+ const { id } = await params;
6
10
  const project = new URL(req.url).searchParams.get('project');
7
11
  const repoRoot = await resolveProjectRoot(project);
8
- const diff = await readFeatureDiff(params.id, repoRoot);
12
+ const diff = await readFeatureDiff(id, repoRoot);
9
13
  return new Response(diff, { headers: { 'Content-Type': 'text/plain' } });
10
14
  }
@@ -4,16 +4,17 @@ export const dynamic = 'force-dynamic';
4
4
 
5
5
  export async function GET(
6
6
  req: Request,
7
- { params }: { params: { id: string; artifact: string } },
7
+ { params }: { params: Promise<{ id: string; artifact: string }> },
8
8
  ): Promise<Response> {
9
+ const { id, artifact } = await params;
9
10
  const project = new URL(req.url).searchParams.get('project');
10
11
  const repoRoot = await resolveProjectRoot(project);
11
- const content = await readEvidenceArtifact(params.id, params.artifact, repoRoot);
12
+ const content = await readEvidenceArtifact(id, artifact, repoRoot);
12
13
  if (content == null) {
13
14
  return Response.json(
14
15
  {
15
16
  ok: false,
16
- error: { code: 'artifact_not_found', message: `Artifact not found: ${params.artifact}` },
17
+ error: { code: 'artifact_not_found', message: `Artifact not found: ${artifact}` },
17
18
  },
18
19
  { status: 404 },
19
20
  );
@@ -21,8 +22,8 @@ export async function GET(
21
22
 
22
23
  return new Response(content, {
23
24
  headers: {
24
- 'Content-Type': params.artifact.endsWith('.json') ? 'application/json' : 'text/plain',
25
- 'Content-Disposition': `attachment; filename="${params.artifact}"`,
25
+ 'Content-Type': artifact.endsWith('.json') ? 'application/json' : 'text/plain',
26
+ 'Content-Disposition': `attachment; filename="${artifact}"`,
26
27
  },
27
28
  });
28
29
  }
@@ -18,8 +18,9 @@ interface ReviewRequest {
18
18
 
19
19
  export async function POST(
20
20
  req: Request,
21
- { params }: { params: { id: string } },
21
+ { params }: { params: Promise<{ id: string }> },
22
22
  ): Promise<Response> {
23
+ const { id } = await params;
23
24
  const project = new URL(req.url).searchParams.get('project');
24
25
  const repoRoot = await resolveProjectRoot(project);
25
26
  const body = (await req.json()) as ReviewRequest;
@@ -52,7 +53,7 @@ export async function POST(
52
53
  }
53
54
 
54
55
  const response = await approveFeatureReview(
55
- params.id,
56
+ id,
56
57
  body.approval_token.trim(),
57
58
  body.merge_strategy ?? 'merge_commit',
58
59
  body.commit_message,
@@ -72,10 +73,10 @@ export async function POST(
72
73
  { status: 400 },
73
74
  );
74
75
  }
75
- const response = await denyFeatureReview(params.id, reason, repoRoot);
76
+ const response = await denyFeatureReview(id, reason, repoRoot);
76
77
  return Response.json(response, { status: response.ok ? 200 : 409 });
77
78
  }
78
79
 
79
- const response = await requestFeatureChanges(params.id, body.message ?? '', repoRoot);
80
+ const response = await requestFeatureChanges(id, body.message ?? '', repoRoot);
80
81
  return Response.json(response, { status: response.ok ? 200 : 409 });
81
82
  }
@@ -2,15 +2,19 @@ import { readFeatureDetail, resolveProjectRoot } from '@/lib/aop-client.js';
2
2
 
3
3
  export const dynamic = 'force-dynamic';
4
4
 
5
- export async function GET(req: Request, { params }: { params: { id: string } }): Promise<Response> {
5
+ export async function GET(
6
+ req: Request,
7
+ { params }: { params: Promise<{ id: string }> },
8
+ ): Promise<Response> {
9
+ const { id } = await params;
6
10
  const project = new URL(req.url).searchParams.get('project');
7
11
  const repoRoot = await resolveProjectRoot(project);
8
- const detail = await readFeatureDetail(params.id, repoRoot);
12
+ const detail = await readFeatureDetail(id, repoRoot);
9
13
  if (!detail) {
10
14
  return Response.json(
11
15
  {
12
16
  ok: false,
13
- error: { code: 'feature_not_found', message: `Feature ${params.id} not found` },
17
+ error: { code: 'feature_not_found', message: `Feature ${id} not found` },
14
18
  },
15
19
  { status: 404 },
16
20
  );
@@ -1,14 +1,14 @@
1
1
  import { readdir, readFile, stat } from 'node:fs/promises';
2
2
  import path from 'node:path';
3
3
  import YAML from 'yaml';
4
- import { getProjectByName, readMultiProjectConfig } from './multi-project-config.js';
4
+ import { getProjectByName, readMultiProjectConfig } from '@/lib/multi-project-config.js';
5
5
  import type {
6
6
  DashboardStatusPayload,
7
7
  EvidenceArtifact,
8
8
  FeatureDetail,
9
9
  FeaturesIndex,
10
10
  FeatureSummary,
11
- } from './types.js';
11
+ } from '@/lib/types.js';
12
12
 
13
13
  const AOP_ROOT = process.env.AOP_ROOT ?? process.cwd();
14
14
 
@@ -1,7 +1,7 @@
1
1
  import { randomUUID } from 'node:crypto';
2
2
  import path from 'node:path';
3
3
  import { pathToFileURL } from 'node:url';
4
- import { getAopRoot } from './aop-client.js';
4
+ import { getAopRoot } from '@/lib/aop-client.js';
5
5
 
6
6
  const STATUS = {
7
7
  BLOCKED: 'blocked',
@@ -12,6 +12,7 @@
12
12
  "strict": true,
13
13
  "skipLibCheck": true,
14
14
  "paths": {
15
+ "@/*.js": ["./src/*.ts"],
15
16
  "@/*": ["./src/*"]
16
17
  },
17
18
  "incremental": true,