@north-light/crouter-api 0.3.319 → 0.3.321

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.
@@ -16,7 +16,7 @@ import type { MemoryDocRefDTO } from './dto/memory.js';
16
16
  import type { ChatInventoryDTO, ProspectiveChatInventoryDTO, ProspectiveChatInventoryQuery } from './dto/chat-inventory.js';
17
17
  import type { CredentialRemovalResultDTO, CredentialResultDTO, InstallCredentialRequest, ModelAuthListDTO } from './dto/modelauth.js';
18
18
  import type { CancelReviewRequest, CreateReviewRequest, ListReviewsQuery, ReviewCancelResultDTO, ReviewDocumentBaseDTO, ReviewDTO, ReviewListDTO, ReviewSubmitResultDTO } from './dto/reviews.js';
19
- import type { CreateReviewCommentRequest, EditReviewCommentRequest, ListReviewCommentsQuery, ReadReviewCommentEventsQuery, ReviewCommentActionRequest, ReviewCommentDetailDTO, ReviewCommentEventsDTO, ReviewCommentListDTO, ReviewCommentMutationDTO, ReviewCommentRangeBatchRequest, ReviewCommentRangeBatchResultDTO } from './dto/review-comments.js';
19
+ import type { CreateReviewCommentRequest, EditReviewCommentRequest, ListReviewCommentsQuery, ReadReviewCommentEventsQuery, ReviewCommentActionRequest, ReviewCommentDetailDTO, ReviewCommentEventsDTO, ReviewCommentForkDTO, ReviewCommentListDTO, ReviewCommentMutationDTO, ReviewCommentRangeBatchRequest, ReviewCommentRangeBatchResultDTO } from './dto/review-comments.js';
20
20
  import type { CancelInboxTicketRequest, CanceledTicketResultDTO, InboxListDTO, InboxPageDTO, InboxPageHistoryDTO, InboxPageResponseDTO, InboxTicketIdDTO, PageFeedbackResolutionDTO, PageResponsesDTO, PageTicketResultDTO, RespondInboxPageRequest } from './dto/inbox.js';
21
21
  import type { CreateHumanRequestDTO, CreateHumanRequestRequest, HumanRequestDTO, HumanRequestIdDTO, ReplaceHumanRequestRequest, RespondHumanRequestRequest, SettleHumanRequestRequest } from './dto/human-requests.js';
22
22
  import type { AttentionCountsDTO, AttentionDTO, DashboardDTO, DashboardQuery, HistoryGrepQuery, HistoryGrepResultDTO, HistoryReadQuery, HistoryStatsQuery, HistoryStatsResultDTO, HistoryReadResultDTO, HistorySearchQuery, HistorySearchResultDTO, PruneRequest, PruneResultDTO, RosterDTO, SnapshotDTO } from './dto/canvas.js';
@@ -236,6 +236,7 @@ export declare class CrtrClient {
236
236
  resolveReviewComment(commentId: string, req?: ReviewCommentActionRequest): Promise<ReviewCommentMutationDTO>;
237
237
  reopenReviewComment(commentId: string, req?: ReviewCommentActionRequest): Promise<ReviewCommentMutationDTO>;
238
238
  deleteReviewComment(commentId: string, req?: ReviewCommentActionRequest): Promise<ReviewCommentMutationDTO>;
239
+ forkReviewComment(commentId: string): Promise<ReviewCommentForkDTO>;
239
240
  /** Pending page/review tickets across every available crouter-owned
240
241
  * humanloop root. */
241
242
  listHumanInbox(): Promise<InboxListDTO>;
@@ -492,6 +492,9 @@ export class CrtrClient {
492
492
  deleteReviewComment(commentId, req = {}) {
493
493
  return this.request('POST', routes.humanCommentDelete(this.commentPath(commentId)), req);
494
494
  }
495
+ forkReviewComment(commentId) {
496
+ return this.request('POST', routes.humanCommentFork(this.commentPath(commentId)), {});
497
+ }
495
498
  // ---- Humanloop inbox (Northlight crouter-inbox v1, inbox-contract.md §A) --
496
499
  /** Pending page/review tickets across every available crouter-owned
497
500
  * humanloop root. */
@@ -28,7 +28,6 @@ export interface BrokerSettleRequest extends BrokerExecutionRequest {
28
28
  stopReason: string;
29
29
  backgroundJobsRunning: boolean;
30
30
  pushedFinal: boolean;
31
- requestedHumanReply: boolean;
32
31
  }
33
32
  /** The only consequence a settle caller may enact. crtrd has already committed
34
33
  * every canvas and placement effect before returning this directive. */
@@ -1,6 +1,12 @@
1
1
  import type { IsoTime, NodeIdDTO, NodeStatusDTO, TerminalReasonDTO } from './common.js';
2
2
  import type { DeclinedResultDTO } from './reports.js';
3
3
  export type OutcomeKindDTO = 'result' | 'failure';
4
+ /** The terminal outcome fields carried by a node-list row. */
5
+ export interface NodeOutcomeSummaryDTO {
6
+ kind: OutcomeKindDTO;
7
+ reason: TerminalReasonDTO;
8
+ settled_at: IsoTime;
9
+ }
4
10
  /** Bounded diagnostics recorded for a failed node outcome. */
5
11
  export interface NodeOutcomeDetailV1 {
6
12
  schema: 'crtr.node-outcome-detail/v1';
@@ -1,6 +1,6 @@
1
1
  import type { Cursor, ExitIntentDTO, IsoTime, LifecycleDTO, ModeDTO, NodeIdDTO, NodeStatusDTO, TerminalReasonDTO } from './common.js';
2
2
  import type { ReportDTO } from './reports.js';
3
- import type { NodeOutcomeDTO, RegisterOutcomeDeliveryRequest } from './node-outcomes.js';
3
+ import type { NodeOutcomeDTO, NodeOutcomeSummaryDTO, RegisterOutcomeDeliveryRequest } from './node-outcomes.js';
4
4
  import type { FaultLink, FaultKind, FaultRetry, FaultProviderError } from './recovery.js';
5
5
  /** `GET /v1/nodes/{id}/subject` — the node-config subject substrate gate
6
6
  * predicates evaluate against. Mirrors `NodeConfigSubject`; this narrow
@@ -105,7 +105,7 @@ export interface NodeSummaryDTO {
105
105
  final_report: string | null;
106
106
  finalized_at: IsoTime | null;
107
107
  deadline_at: IsoTime | null;
108
- outcome: NodeOutcomeDTO | null;
108
+ outcome: NodeOutcomeSummaryDTO | null;
109
109
  fault?: NodeFaultDTO | null;
110
110
  streaming?: boolean;
111
111
  /** Present only when requested with `include=activity`. */
@@ -186,7 +186,8 @@ export interface NodeFaultDTO {
186
186
  }
187
187
  /** The full node view — summary ∪ identity extras ∪ edges ∪ paths. Returned by
188
188
  * `GET /v1/nodes/{id}` and by the create/lifecycle actions that yield a node. */
189
- export interface NodeDetailDTO extends NodeSummaryDTO {
189
+ export interface NodeDetailDTO extends Omit<NodeSummaryDTO, 'outcome'> {
190
+ outcome: NodeOutcomeDTO | null;
190
191
  /** Node that created this node, or null when an external process did. */
191
192
  creator: NodeIdDTO | null;
192
193
  /** The namer's prose form of `description` — sentence case, punctuation intact
@@ -136,3 +136,11 @@ export interface ReviewCommentRangeBatchResultDTO {
136
136
  detached: number;
137
137
  unchanged: number;
138
138
  }
139
+ /** Daemon-derived result of forking the review companion onto one comment. */
140
+ export interface ReviewCommentForkDTO {
141
+ comment_id: string;
142
+ /** The newborn fork of the review companion. */
143
+ node_id: NodeIdDTO;
144
+ /** Where the fork runs, so a caller can place a viewer for it. */
145
+ cwd: string;
146
+ }
@@ -89,6 +89,7 @@ export declare const routes: {
89
89
  readonly humanCommentResolve: (commentId: string) => string;
90
90
  readonly humanCommentReopen: (commentId: string) => string;
91
91
  readonly humanCommentDelete: (commentId: string) => string;
92
+ readonly humanCommentFork: (commentId: string) => string;
92
93
  readonly humanInbox: () => string;
93
94
  readonly humanInboxTicket: (ticketId: string) => string;
94
95
  readonly humanInboxRespond: (ticketId: string) => string;
@@ -113,6 +113,7 @@ export const routes = {
113
113
  humanCommentResolve: (commentId) => `${V}/human/comments/${commentId}/resolve`,
114
114
  humanCommentReopen: (commentId) => `${V}/human/comments/${commentId}/reopen`,
115
115
  humanCommentDelete: (commentId) => `${V}/human/comments/${commentId}/delete`,
116
+ humanCommentFork: (commentId) => `${V}/human/comments/${commentId}/fork`,
116
117
  // Humanloop inbox (Northlight crouter-inbox v1, inbox-contract.md §A)
117
118
  humanInbox: () => `${V}/human/inbox`,
118
119
  humanInboxTicket: (ticketId) => `${V}/human/inbox/${ticketId}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@north-light/crouter-api",
3
- "version": "0.3.319",
3
+ "version": "0.3.321",
4
4
  "description": "Typed crtrd /v1 API contract — DTOs, route builders, the error contract, the CrtrClient, and the command-plugin manifest format. Zero runtime dependencies.",
5
5
  "type": "module",
6
6
  "main": "./dist/api/index.js",