Files
saltbo__agent-kanban/server/env.ts
realmroot[bot] 96fdd70d2c feat(api)!: redesign task resource operations (#265)
* feat(api)!: redesign task resource operations

Publish the complete resource-oriented OpenAPI contract, enforce scope-based authorization at the HTTP boundary, and replace lifecycle command routes with Task PATCH and nested Claim/Event resources.

Add server-side Task CAS, migration coverage, updated Agent Skills, and browser/API regression tests.

BREAKING CHANGE: remove the legacy task lifecycle endpoints and move bounded waits to /tasks/{taskId}/events.

* refactor(tasks)!: make claims create-only

Remove Task Claim retrieval and deletion routes, the release scope, live deletion logic, and release workflow guidance.

Keep historical release records readable for migration and audit compatibility.

BREAKING CHANGE: remove GET and DELETE /tasks/{taskId}/claims/{claimId} and the task:release scope.

* test(ci): align actor and projection contracts

Cover machine and service Task Action writes and update Agent detail fixtures to the canonical assignedTo query and paged lowerCamelCase response.

* fix(api): preserve merge patch fields and consume browser pagination

* test(ui): include terminal pagination in agent task fixture

---------

Co-authored-by: jarvis <jarvis@agents.realmroot.dev>
2026-09-05 02:40:42 +00:00

49 lines
1.4 KiB
TypeScript

export interface Env {
DB: D1Database;
ASSETS: Fetcher;
AK_PUBLIC_ORIGIN: string;
AK_SIGNING_KEY: string;
OIDC_ISSUER: string;
OIDC_WEB_CLIENT_ID: string;
OIDC_WEB_CLIENT_SECRET: string;
OIDC_SERVICE_CLIENT_ID: string;
OIDC_SERVICE_CLIENT_SECRET: string;
AK_SESSION_ENCRYPTION_KEY: string;
INBOX_RESOURCE: string;
INBOX_API_VERSION: string;
AGENCY_ORIGIN: string;
GITHUB_APP_WEBHOOK_SECRET?: string;
GITHUB_APP_ID?: string;
// base64 of the App's PKCS#8 PEM private key
GITHUB_APP_PRIVATE_KEY?: string;
// public App slug, used to build the install URL github.com/apps/<slug>/installations/new
GITHUB_APP_SLUG?: string;
}
declare module "hono" {
interface ContextVariableMap {
requestId: string;
traceId: string;
spanId: string;
traceparent: string;
requestError?: Error;
ownerId: string;
principal: {
source: "session" | "token";
type: "human" | "machine" | "agent" | "service";
subjectId: string;
actorId?: string;
controllerSubjectId?: string;
runtime?: string;
runtimeSessionId?: string;
tenantId: string;
clientId?: string;
scopes: string[];
sourceAccessToken?: string;
};
user?: { id: string; name: string; email: string; image?: string | null; role: string };
session?: { id: string; expiresAt: Date; csrfToken: string };
resourceIdempotency?: import("@server/adapters/d1/resourceIdempotency").ResourceIdempotency;
}
}