@sentry/junior 0.267.0 → 0.269.0
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/README.md +2 -9
- package/dist/{actor-DZSokpwj.js → actor-CP9K2Idu.js} +2 -1
- package/dist/{adapter-BybMEezj.js → adapter-2-CG25be.js} +3 -51
- package/dist/{admin-DOs1_EiW.js → admin-DSs8S5Uy.js} +1 -1
- package/dist/{agent-invocations-CxKldAeB.js → agent-invocations-C1RNOCs8.js} +2 -0
- package/dist/{agent-runner-DgNATN4D.js → agent-runner-CrDrPUtY.js} +3411 -1640
- package/dist/api/schema.d.ts +2 -5630
- package/dist/api/schema.js +7 -7
- package/dist/api.d.ts +3 -1
- package/dist/api.js +268 -287
- package/dist/{app-DAB3fzyp.d.ts → app-BrMMzjYm.d.ts} +10 -3
- package/dist/app.d.ts +1 -1
- package/dist/app.js +371 -223
- package/dist/{automation-CmeFBSEh.js → automation-p87hg_AV.js} +74 -74
- package/dist/{briefs-CWKjka7v.js → briefs-PtODdLNu.js} +4 -4
- package/dist/{catalog-runtime-cMlAI5LY.js → catalog-runtime-BsoSmTM0.js} +1 -1
- package/dist/cli/chat.js +16 -26
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +5 -3
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-BjgbMawj.js → client-Cqf4TboL.js} +20 -15
- package/dist/{config-CdB6yJj5.js → config-CPsE4T5L.js} +2 -2
- package/dist/{connections-RE_65jzK.js → connections-upFXLmhG.js} +10 -11
- package/dist/{conversation-DSo310Ps.js → conversation-CTpD_PGk.js} +7 -84
- package/dist/{conversation-privacy-BzgJC5k0.js → conversation-privacy-D6zJc8ff.js} +1 -1
- package/dist/{credential-sync-DhEGEpgq.js → credential-sync-CS_6IC-f.js} +30 -34
- package/dist/{credentialed-CIGwoLU2.js → credentialed-BU-OW7HP.js} +577 -74
- package/dist/{store-B8CABbmR.d.ts → db-BzOCzVb1.d.ts} +17 -7
- package/dist/{executor-VYrx_K4w.js → executor-CNS7ONt-.js} +78 -4
- package/dist/instrumentation.js +2 -2
- package/dist/{assistant-reply-CT7VcXQe.js → interruption-marker-g6Xup3Fk.js} +8 -2
- package/dist/{job-queue-C0BZSa7r.js → job-queue-DI-k-Bbk.js} +2 -2
- package/dist/{list-1XQP-o6K.js → list-CGoQdXTp.js} +429 -1401
- package/dist/locks-D-0h111u.js +48 -0
- package/dist/{logging-DuZ1A4ab.js → logging-n7knse-O.js} +1 -1
- package/dist/{history-C84mlAwO.js → media-85PDJxO_.js} +83 -1
- package/dist/{message-NKSbbnA6.js → message-BpaWd8TT.js} +4 -4
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-qAHLPtml.js → oauth-callback-server-CpGmEw_i.js} +2 -2
- package/dist/{prompt-BW9jFsqZ.js → prompt-BlQB0QQt.js} +1 -1
- package/dist/{registry-FQutO926.js → registry-By36_xsm.js} +2 -2
- package/dist/reporting-schema-CZREhYc-.js +104 -0
- package/dist/reporting-window-CVarfId9.js +255 -0
- package/dist/{resolve-Bk4yeuHy.js → resolve-CUIBcdPd.js} +3 -3
- package/dist/{result-B9e9ATOU.js → result-BemsOMOO.js} +31 -12
- package/dist/{runner-C3S2ObH-.js → runner-BVok7PAA.js} +12 -11
- package/dist/{sandbox-egress-signals-DqpGzzMB.js → sandbox-egress-signals-BSUWQI95.js} +1 -1
- package/dist/{schema-X7Fj4fv1.js → schema-ChnFo5f2.js} +98 -6
- package/dist/schema-jK4-1u_H.d.ts +5927 -0
- package/dist/{service-account-Do30HUNv.js → service-account-DHvlLnZw.js} +4 -3
- package/dist/{service-account-BQasl-qq.js → service-account-hMmESDcr.js} +3 -3
- package/dist/{session-stop-DkOjt46_.js → session-stop-BQW_iFcd.js} +499 -23
- package/dist/{skills-CQHrwfOa.js → skills-DmJJIuLF.js} +2 -2
- package/dist/{spawn-BHuqN14f.js → spawn-ChCm46i-.js} +2 -2
- package/dist/{store-6EetVP-m.js → store-1DVhoKOL.js} +4 -4
- package/dist/{store-DvNZIsCr.js → store-DCo2n5iJ.js} +3 -3
- package/dist/{task-queue-B0DLgd2P.js → task-queue-HMC4QjFm.js} +3 -3
- package/dist/task-runner-cA6yjn_E.js +269 -0
- package/dist/{thread-state-DRmdJ2QN.js → thread-state-CHy8LS0C.js} +8 -18
- package/dist/{turn-failure-response-G11cs2gE.js → turn-failure-response-Dr7erLWs.js} +11 -16
- package/dist/{turn-lifecycle-OzLIwvi1.js → turn-lifecycle-bf2fIYi_.js} +1 -1
- package/dist/{tasks-0ilmuCux.js → turn-session-routing-BqO0qXLk.js} +959 -44
- package/dist/{validation-CxEmt1id.js → validation-DHR1ivfh.js} +1 -1
- package/dist/{version-Bapedn4A.js → version-CXCHLgWm.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-DrN3oC2X.js → viewer-DSbD6DF6.js} +503 -241
- package/dist/{work-DUQoNcqP.js → work-BE_qTYGi.js} +17 -36
- package/dist/{worker-D1l4Ugk0.js → worker-Cm9_sWXg.js} +15 -7
- package/migrations/0065_user_customization.sql +1 -0
- package/migrations/0066_review_items.sql +53 -0
- package/migrations/0067_review_item_dedupe_tenant.sql +2 -0
- package/migrations/0068_review_item_slack_cards.sql +10 -0
- package/migrations/0069_system_identity.sql +25 -0
- package/migrations/0070_review_item_foreign_keys.sql +5 -0
- package/migrations/AGENTS.md +17 -0
- package/migrations/meta/0065_snapshot.json +3511 -0
- package/migrations/meta/0066_snapshot.json +4099 -0
- package/migrations/meta/0067_snapshot.json +3921 -0
- package/migrations/meta/0068_snapshot.json +4176 -0
- package/migrations/meta/0069_snapshot.json +3979 -0
- package/migrations/meta/0070_snapshot.json +3997 -0
- package/migrations/meta/_journal.json +42 -0
- package/package.json +5 -5
- package/dist/db-Bg-zC3r5.d.ts +0 -5
- package/dist/history-BgI33Kie.d.ts +0 -78
- package/dist/images-CecjXAAz.js +0 -64
- package/dist/task-runner-B-PD_JOj.js +0 -1074
- package/dist/turn-session-routing-Dyut9l7Y.js +0 -76
- package/dist/user-input-request-BDFBdF8r.js +0 -116
- package/dist/web-message-id-CJSUiksE.js +0 -236
- package/migrations/README.md +0 -30
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import {
|
|
3
|
-
import { t as createActor } from "./actor-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { a as
|
|
9
|
-
import {
|
|
10
|
-
import { r as
|
|
2
|
+
import { On as getTurnRecord, kn as listTurnSummaries } from "./turn-session-routing-BqO0qXLk.js";
|
|
3
|
+
import { t as createActor } from "./actor-CP9K2Idu.js";
|
|
4
|
+
import { j as SYSTEM_IDENTITY_ID } from "./viewer-DSbD6DF6.js";
|
|
5
|
+
import { f as credentialContextForActor } from "./registry-By36_xsm.js";
|
|
6
|
+
import { bt as listUnreportedSiblingAgents } from "./agent-runner-CrDrPUtY.js";
|
|
7
|
+
import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-BlQB0QQt.js";
|
|
8
|
+
import { C as markAgentInvocationParentMailboxAppended, _ as getLatestAgentInvocationForConversation, a as createAgentInvocationFromLatest, c as getAgentInvocation, d as getAgentInvocationIdForResult, l as getAgentInvocationIdForEvents, p as getAgentInvocationResultMessageId, u as getAgentInvocationIdForMessage, y as isTerminalAgentInvocation } from "./store-1DVhoKOL.js";
|
|
9
|
+
import { a as EVENT_WAIT_MS, c as isEventMailboxMetadata, l as renderEventBatchText, u as timerWatchCredentialSubject } from "./session-stop-BQW_iFcd.js";
|
|
10
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-DCo2n5iJ.js";
|
|
11
|
+
import { i as resolveAgentInvocationId, r as enqueueAgentInvocation, t as createAgentInvocationWorker } from "./work-BE_qTYGi.js";
|
|
11
12
|
import { z } from "zod";
|
|
12
13
|
import { createEventSource, createLocalSource, createWebSource } from "@sentry/junior-plugin-api";
|
|
13
14
|
// src/chat/conversations/web-mailbox.ts
|
|
@@ -167,9 +168,9 @@ async function resolveMailboxTurnWork(context) {
|
|
|
167
168
|
}
|
|
168
169
|
// src/chat/agent-invocations/result.ts
|
|
169
170
|
var result_exports = /* @__PURE__ */ __exportAll({
|
|
171
|
+
createChildConversationWorker: () => createChildConversationWorker,
|
|
170
172
|
enqueueAgentInvocationResult: () => enqueueAgentInvocationResult,
|
|
171
173
|
enqueueAgentMessageToParent: () => enqueueAgentMessageToParent,
|
|
172
|
-
startAgentInvocationsForChildInput: () => startAgentInvocationsForChildInput,
|
|
173
174
|
withAgentInvocationResultActors: () => withAgentInvocationResultActors
|
|
174
175
|
});
|
|
175
176
|
const AGENT_INVOCATION_EVENT_NAMESPACE = "junior";
|
|
@@ -214,7 +215,7 @@ function trustedSummary(invocation, agent) {
|
|
|
214
215
|
*/
|
|
215
216
|
const RESULT_NEXT_STEP = {
|
|
216
217
|
completed: "Use this result to continue the work in this conversation. Do not repeat work that the child agent already did.",
|
|
217
|
-
blocked: "The child agent did not finish its task because something is missing. If you can give it, send it to the child agent with messageAgent. If it
|
|
218
|
+
blocked: "The child agent did not finish its task because something is missing. If you can give it, send it to the child agent with messageAgent. If only a person can give it, such as user approval, your own text cannot give it. Do not ask in plain text: add one action item with `addReviewItem` that names the exact action. Make its `dedupe_key` from the child conversation and the blocked action, so a repeat block updates the same item. After the user answers in this conversation, tell the child agent with messageAgent to try again. The runtime shows the user's own messages to the child's action review. Otherwise tell the user what is missing.",
|
|
218
219
|
failed: "The child agent did not finish its task. If you still need this work, use messageAgent to ask the same child agent to try again, or tell the user what is blocked.",
|
|
219
220
|
stopped: "The child agent was stopped before it finished. Do not start this work again unless the user asks."
|
|
220
221
|
};
|
|
@@ -266,6 +267,7 @@ function buildResultInboundMessage(invocation, nowMs, openSiblings) {
|
|
|
266
267
|
inboundMessageId: getAgentInvocationResultMessageId(invocation.invocationId),
|
|
267
268
|
input: {
|
|
268
269
|
authorId: resultAuthorId(invocation.actor),
|
|
270
|
+
authorIdentityId: SYSTEM_IDENTITY_ID,
|
|
269
271
|
metadata,
|
|
270
272
|
text: renderResultInput(invocation, summary, openSiblings)
|
|
271
273
|
},
|
|
@@ -342,6 +344,7 @@ async function enqueueAgentMessageToParent(args) {
|
|
|
342
344
|
inboundMessageId,
|
|
343
345
|
input: {
|
|
344
346
|
authorId: resultAuthorId(args.sender.actor),
|
|
347
|
+
authorIdentityId: SYSTEM_IDENTITY_ID,
|
|
345
348
|
metadata,
|
|
346
349
|
text: renderMessageInput(args.sender, summary, args.text)
|
|
347
350
|
},
|
|
@@ -434,6 +437,22 @@ async function startAgentInvocationsForChildInput(context, options) {
|
|
|
434
437
|
return { status: "completed" };
|
|
435
438
|
}
|
|
436
439
|
/**
|
|
440
|
+
* Build the worker for all work of a child Conversation. The caller selects
|
|
441
|
+
* it from the stored parent of the Conversation, never from a Turn Source. It
|
|
442
|
+
* starts agent invocations for child input, then runs the agent invocation
|
|
443
|
+
* that owns the work. Work that no agent invocation owns is an error.
|
|
444
|
+
*/
|
|
445
|
+
function createChildConversationWorker(agentRunner, options) {
|
|
446
|
+
const invocationWorker = createAgentInvocationWorker(agentRunner, options);
|
|
447
|
+
return async (context) => {
|
|
448
|
+
const started = await startAgentInvocationsForChildInput(context, options);
|
|
449
|
+
if (started) return started;
|
|
450
|
+
const invocationId = await resolveAgentInvocationId(context);
|
|
451
|
+
if (!invocationId) throw new Error(`Child conversation ${context.conversationId} has no agent invocation for this work`);
|
|
452
|
+
return await invocationWorker(context, invocationId);
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
437
456
|
* Run each agent invocation result or message as the Actor that triggered the
|
|
438
457
|
* child, user or system. This is on purpose: the result continues that
|
|
439
458
|
* Actor's work. The Actor comes from SQL, not from mailbox metadata, so the
|
|
@@ -457,4 +476,4 @@ async function withAgentInvocationResultActors(work) {
|
|
|
457
476
|
}))
|
|
458
477
|
};
|
|
459
478
|
}
|
|
460
|
-
export { withAgentInvocationResultActors as a, resolveMailboxTurnWork as c, legacyWebMailboxMetadataSchema as d,
|
|
479
|
+
export { withAgentInvocationResultActors as a, resolveMailboxTurnWork as c, legacyWebMailboxMetadataSchema as d, result_exports as i, sourceFromTurnInput as l, enqueueAgentInvocationResult as n, getAuthPausedConversationTurnId as o, enqueueAgentMessageToParent as r, getEventBatchDelayMs as s, createChildConversationWorker as t, turnInputFactsFromConversationMessage as u };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { S as setTags, T as withLogContext, p as logException } from "./logging-
|
|
3
|
-
import {
|
|
4
|
-
import { f as credentialContextForActor } from "./registry-
|
|
5
|
-
import { R as messageCardText } from "./conversation-
|
|
6
|
-
import { X as markTurnFailed, Z as startActiveTurn } from "./store-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { n as
|
|
11
|
-
import {
|
|
1
|
+
import { At as loadProjection, Gt as hydrateConversationMessages, Kt as persistConversationMessages, Lt as recordAuthorizationCompleted, Tt as commitAcceptedReply, an as markConversationMessage, en as buildConversationContext, hr as persistWithRetry, ln as upsertConversationMessage, on as normalizeConversationText, pn as authorizationId, sn as recordDeliveredAssistantMessage, wn as saveTurnCheckpoint } from "./turn-session-routing-BqO0qXLk.js";
|
|
2
|
+
import { S as setTags, T as withLogContext, p as logException } from "./logging-n7knse-O.js";
|
|
3
|
+
import { j as SYSTEM_IDENTITY_ID, x as getConversationStore, y as getConversationEventStore } from "./viewer-DSbD6DF6.js";
|
|
4
|
+
import { f as credentialContextForActor } from "./registry-By36_xsm.js";
|
|
5
|
+
import { R as messageCardText } from "./conversation-CTpD_PGk.js";
|
|
6
|
+
import { X as markTurnFailed, Z as startActiveTurn } from "./store-1DVhoKOL.js";
|
|
7
|
+
import { r as getAssistantReplyText } from "./interruption-marker-g6Xup3Fk.js";
|
|
8
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-bf2fIYi_.js";
|
|
9
|
+
import { a as persistThreadStateById, n as getPersistedSandboxState, o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-CHy8LS0C.js";
|
|
10
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-cA6yjn_E.js";
|
|
11
|
+
import { i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent, u as loadPendingMessageCards } from "./turn-failure-response-Dr7erLWs.js";
|
|
12
12
|
import { randomUUID } from "node:crypto";
|
|
13
13
|
import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
|
|
14
14
|
// src/chat/local/runner.ts
|
|
@@ -100,6 +100,7 @@ async function runLocalAgentTurnInContext(input, deps) {
|
|
|
100
100
|
userId: "local-cli",
|
|
101
101
|
userName: "local"
|
|
102
102
|
},
|
|
103
|
+
authorIdentityId: SYSTEM_IDENTITY_ID,
|
|
103
104
|
meta: {
|
|
104
105
|
explicitMention: true,
|
|
105
106
|
replied: false
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Kt as sandboxEgressSignalsResponseSchema } from "./credentialed-BU-OW7HP.js";
|
|
2
2
|
// src/chat/local/sandbox-egress-signals.ts
|
|
3
3
|
const SANDBOX_EGRESS_SIGNALS_PATH = "/api/internal/sandbox-egress/signals";
|
|
4
4
|
const LOCAL_DEV_SERVER_TIMEOUT_MS = 1e3;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as AGENT_INVOCATION_STATUSES, u as juniorDestinationKindSchema } from "./agent-invocations-
|
|
2
|
-
import { E as conversationSummaryReportSchema, F as conversationChildAgentTotalsSchema, O as conversationUsageSchema, l as conversationAuxiliaryCostsSchema, n as actorIdentitySchema } from "./conversation-
|
|
3
|
-
import "./
|
|
4
|
-
import "./automation-
|
|
5
|
-
import
|
|
1
|
+
import { r as AGENT_INVOCATION_STATUSES, u as juniorDestinationKindSchema } from "./agent-invocations-C1RNOCs8.js";
|
|
2
|
+
import { E as conversationSummaryReportSchema, F as conversationChildAgentTotalsSchema, O as conversationUsageSchema, l as conversationAuxiliaryCostsSchema, n as actorIdentitySchema } from "./conversation-CTpD_PGk.js";
|
|
3
|
+
import { i as fillUtcHours, r as fillUtcDays, s as sumUtcHoursIntoSixHours, v as userInputRequestSchema } from "./reporting-window-CVarfId9.js";
|
|
4
|
+
import "./automation-p87hg_AV.js";
|
|
5
|
+
import "./reporting-schema-CZREhYc-.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { codeChangeStateSchema, eventMatchSchema } from "@sentry/junior-plugin-api";
|
|
8
8
|
// src/api/schema/common.ts
|
|
@@ -362,6 +362,8 @@ const locationDetailReportSchema = locationSummaryReportSchema.extend({
|
|
|
362
362
|
}).strict();
|
|
363
363
|
// src/api/schema/person.ts
|
|
364
364
|
const personParamsSchema = z.object({ email: z.string().trim().min(1) }).strict();
|
|
365
|
+
/** Route parameters for the photo of one Identity. */
|
|
366
|
+
const avatarParamsSchema = z.object({ identityId: z.string().min(1).max(200) }).strict();
|
|
365
367
|
const peopleConversationStatsItemSchema = conversationStatsItemSchema.omit({ costUsd: true });
|
|
366
368
|
/** UTC day (`YYYY-MM-DD`) or hour (`YYYY-MM-DDTHH`) activity bucket key. */
|
|
367
369
|
const peopleMetricBucketSchema = z.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/);
|
|
@@ -468,6 +470,96 @@ const serviceAccountListSchema = z.object({ serviceAccounts: z.array(serviceAcco
|
|
|
468
470
|
const serviceAccountParamsSchema = z.object({ provider: z.string().regex(/^[a-z][a-z0-9-]*$/).max(64) }).strict();
|
|
469
471
|
const startServiceAccountSignInResponseSchema = z.object({ authorizationUrl: z.string().url() }).strict();
|
|
470
472
|
const disconnectServiceAccountResponseSchema = z.object({ disconnected: z.literal(true) }).strict();
|
|
473
|
+
// src/api/schema/review-item.ts
|
|
474
|
+
const answerSchema = z.object({
|
|
475
|
+
other: z.string().max(4e3).optional(),
|
|
476
|
+
requestId: z.string().min(1),
|
|
477
|
+
values: z.record(z.string(), z.array(z.string().max(4e3)).max(20))
|
|
478
|
+
}).strict();
|
|
479
|
+
const personSchema = z.object({
|
|
480
|
+
displayName: z.string().min(1).optional(),
|
|
481
|
+
email: z.string().min(1),
|
|
482
|
+
userId: z.string().min(1)
|
|
483
|
+
}).strict();
|
|
484
|
+
/** One Review item as the viewer sees it. */
|
|
485
|
+
const reviewItemSchema = z.object({
|
|
486
|
+
addedByConversationId: z.string().min(1),
|
|
487
|
+
answer: answerSchema.optional(),
|
|
488
|
+
assignedToEveryone: z.boolean(),
|
|
489
|
+
assignees: z.array(personSchema),
|
|
490
|
+
automationId: z.string().min(1).optional(),
|
|
491
|
+
body: z.string(),
|
|
492
|
+
/** True when the viewer can take, submit, complete, or dismiss it. */
|
|
493
|
+
canAct: z.boolean(),
|
|
494
|
+
/** True when the viewer can act and is not already the only assignee. */
|
|
495
|
+
canTake: z.boolean(),
|
|
496
|
+
closeReason: z.string().min(1).optional(),
|
|
497
|
+
closedAt: z.string().datetime().optional(),
|
|
498
|
+
/** Unset for an open item, or when an agent closed it. */
|
|
499
|
+
closedBy: personSchema.optional(),
|
|
500
|
+
conversationIds: z.array(z.string().min(1)),
|
|
501
|
+
createdAt: z.string().datetime(),
|
|
502
|
+
id: z.string().min(1),
|
|
503
|
+
kind: z.enum(["notice", "action"]),
|
|
504
|
+
request: userInputRequestSchema.optional(),
|
|
505
|
+
status: z.enum([
|
|
506
|
+
"open",
|
|
507
|
+
"done",
|
|
508
|
+
"dismissed"
|
|
509
|
+
]),
|
|
510
|
+
subject: z.object({
|
|
511
|
+
id: z.string().min(1),
|
|
512
|
+
title: z.string().min(1).optional(),
|
|
513
|
+
url: z.string().min(1).optional()
|
|
514
|
+
}).strict().optional(),
|
|
515
|
+
title: z.string().min(1),
|
|
516
|
+
updatedAt: z.string().datetime(),
|
|
517
|
+
visibility: z.enum(["public", "private"])
|
|
518
|
+
}).strict();
|
|
519
|
+
/**
|
|
520
|
+
* Review desk list filters. The list has the open items that the viewer can
|
|
521
|
+
* see, one page at a time. A search also finds done and dismissed items,
|
|
522
|
+
* after the open ones.
|
|
523
|
+
*/
|
|
524
|
+
const reviewItemListQuerySchema = z.object({
|
|
525
|
+
conversationId: z.string().min(1).optional(),
|
|
526
|
+
/** `nextCursor` of the page before. */
|
|
527
|
+
cursor: z.string().min(1).max(1e3).optional(),
|
|
528
|
+
/** The number of open items on one page. */
|
|
529
|
+
limit: z.coerce.number().int().min(1).max(100).default(50),
|
|
530
|
+
q: z.string().trim().max(200).optional()
|
|
531
|
+
}).strict();
|
|
532
|
+
/**
|
|
533
|
+
* One page of the review desk list. Open items come first, newest change
|
|
534
|
+
* first. The first page of a search also has the newest archived matches.
|
|
535
|
+
*/
|
|
536
|
+
const reviewItemListSchema = z.object({
|
|
537
|
+
items: z.array(reviewItemSchema),
|
|
538
|
+
/** Set when more archived items match than the list shows. */
|
|
539
|
+
moreArchived: z.boolean().optional(),
|
|
540
|
+
/** Set when more open items follow. Pass it as `cursor` to read them. */
|
|
541
|
+
nextCursor: z.string().min(1).optional()
|
|
542
|
+
}).strict();
|
|
543
|
+
/** The count of Review items for the nav. */
|
|
544
|
+
const reviewItemCountSchema = z.object({
|
|
545
|
+
/**
|
|
546
|
+
* Open action items assigned to the viewer as a User
|
|
547
|
+
* (`reviewItemNeedsUser`). Notices and items for Everyone do not count.
|
|
548
|
+
*/
|
|
549
|
+
needsViewer: z.number().int().nonnegative() }).strict();
|
|
550
|
+
/** Conversations linked to an open action item assigned to the viewer. */
|
|
551
|
+
const reviewItemWaitingConversationsSchema = z.object({ conversationIds: z.array(z.string().min(1)) }).strict();
|
|
552
|
+
const reviewItemParamsSchema = z.object({ id: z.string().min(1) }).strict();
|
|
553
|
+
/** One person action on a Review item. */
|
|
554
|
+
const reviewItemActionSchema = z.discriminatedUnion("action", [
|
|
555
|
+
z.object({ action: z.literal("take") }).strict(),
|
|
556
|
+
z.object({ action: z.literal("complete") }).strict(),
|
|
557
|
+
z.object({ action: z.literal("dismiss") }).strict(),
|
|
558
|
+
z.object({
|
|
559
|
+
action: z.literal("submit"),
|
|
560
|
+
answer: answerSchema.omit({ requestId: true })
|
|
561
|
+
}).strict()
|
|
562
|
+
]);
|
|
471
563
|
// src/api/schema/workspace.ts
|
|
472
564
|
const workspaceRepoInputSchema = z.object({
|
|
473
565
|
provider: z.string(),
|
|
@@ -527,4 +619,4 @@ const statsReportSchema = z.object({
|
|
|
527
619
|
windowEnd: z.string(),
|
|
528
620
|
windowStart: z.string()
|
|
529
621
|
}).strict();
|
|
530
|
-
export {
|
|
622
|
+
export { codeRepositorySummarySchema as $, avatarParamsSchema as A, dailyConversationActivitySchema as B, createdPersonalTokenSchema as C, revokePersonalTokenResponseSchema as D, personalTokenParamsSchema as E, locationDirectoryReportSchema as F, startConnectionResponseSchema as G, connectionParamsSchema as H, locationParamsSchema as I, codeChangeSummarySchema as J, codeActivityDaySchema as K, activityDays as L, personalSpendReportSchema as M, locationActivityDayReportSchema as N, actorDirectoryReportSchema as O, locationDetailReportSchema as P, codeRepositoryReportSchema as Q, activityHours as R, createPersonalTokenBodySchema as S, personalTokenMetadataSchema as T, connectionSchema as U, connectionListSchema as V, disconnectConnectionResponseSchema as W, codePersonReportSchema as X, codeOverviewReportSchema as Y, codeRepositoryParamsSchema as Z, disconnectServiceAccountResponseSchema as _, workspaceBodySchema as a, conversationStatsReportSchema as at, serviceAccountSchema as b, workspaceRepoSchema as c, reviewItemCountSchema as d, conversationWatchSchema as et, reviewItemListQuerySchema as f, reviewItemWaitingConversationsSchema as g, reviewItemSchema as h, deleteWorkspaceResponseSchema as i, stopConversationTurnResponseSchema as it, personParamsSchema as j, actorProfileReportSchema as k, workspaceSchema as l, reviewItemParamsSchema as m, statsReportSchema as n, conversationChildAgentSchema as nt, workspaceListSchema as o, apiErrorSchema as ot, reviewItemListSchema as p, codeChangeSummaryReportSchema as q, baselineSnapshotSchema as r, conversationChildAgentsReportSchema as rt, workspaceParamsSchema as s, statSchema as t, conversationWatchesReportSchema as tt, reviewItemActionSchema as u, serviceAccountListSchema as v, personalTokenListSchema as w, startServiceAccountSignInResponseSchema as x, serviceAccountParamsSchema as y, activitySixHours as z };
|