@sentry/junior 0.106.0 → 0.107.1
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/dist/{agent-hooks-KR5BCWOK.js → agent-hooks-ICPIJAFY.js} +9 -7
- package/dist/api/conversations/detail.d.ts +1 -1
- package/dist/api/conversations/events.d.ts +14 -0
- package/dist/api/conversations/schema.d.ts +196 -463
- package/dist/api/schema.d.ts +2 -7
- package/dist/api/schema.js +10 -8
- package/dist/api.js +377 -810
- package/dist/app.js +3586 -3614
- package/dist/{catalog-runtime-5CVM2DOF.js → catalog-runtime-FOFNPR3P.js} +3 -2
- package/dist/chat/agent/prompt.d.ts +1 -1
- package/dist/chat/agent/request.d.ts +28 -29
- package/dist/chat/agent/resume.d.ts +7 -7
- package/dist/chat/agent/session.d.ts +5 -6
- package/dist/chat/agent/tools.d.ts +3 -3
- package/dist/chat/agent-dispatch/runner.d.ts +2 -0
- package/dist/chat/config.d.ts +2 -2
- package/dist/chat/conversations/history.d.ts +582 -167
- package/dist/chat/conversations/message-projection.d.ts +6 -0
- package/dist/chat/conversations/message-summaries.d.ts +9 -0
- package/dist/chat/conversations/messages.d.ts +13 -27
- package/dist/chat/conversations/projection.d.ts +30 -53
- package/dist/chat/conversations/provenance.d.ts +42 -0
- package/dist/chat/conversations/search.d.ts +2 -2
- package/dist/chat/conversations/sql/conversation-row.d.ts +1 -1
- package/dist/chat/conversations/sql/event-lock.d.ts +3 -0
- package/dist/chat/conversations/sql/history.d.ts +3 -3
- package/dist/chat/conversations/sql/privacy.d.ts +27 -0
- package/dist/chat/conversations/sql/purge.d.ts +2 -10
- package/dist/chat/conversations/sql/store.d.ts +0 -5
- package/dist/chat/conversations/store.d.ts +8 -13
- package/dist/chat/conversations/turn-lifecycle.d.ts +41 -0
- package/dist/chat/db.d.ts +4 -10
- package/dist/chat/model-profile.d.ts +10 -0
- package/dist/chat/oauth-flow.d.ts +0 -5
- package/dist/chat/pi/conversation-events.d.ts +33 -0
- package/dist/chat/pi/sql-model-usage.d.ts +10 -0
- package/dist/chat/plugins/agent-hooks.d.ts +4 -2
- package/dist/chat/resource-events/ingest.d.ts +0 -13
- package/dist/chat/runtime/delivered-turn-state.d.ts +1 -1
- package/dist/chat/runtime/generated-artifacts.d.ts +1 -1
- package/dist/chat/runtime/reply-executor.d.ts +2 -0
- package/dist/chat/runtime/slack-resume.d.ts +23 -28
- package/dist/chat/runtime/slack-runtime.d.ts +2 -0
- package/dist/chat/runtime/turn.d.ts +14 -1
- package/dist/chat/services/context-compaction-marker.d.ts +0 -1
- package/dist/chat/services/context-compaction.d.ts +1 -0
- package/dist/chat/services/conversation-memory.d.ts +9 -0
- package/dist/chat/services/plugin-auth-orchestration.d.ts +1 -4
- package/dist/chat/services/subscribed-decision.d.ts +1 -1
- package/dist/chat/services/turn-failure-response.d.ts +10 -3
- package/dist/chat/services/turn-result.d.ts +7 -12
- package/dist/chat/services/{turn-reasoning-level.d.ts → turn-router.d.ts} +12 -8
- package/dist/chat/services/turn-session-record.d.ts +15 -16
- package/dist/chat/slack/adapter.d.ts +2 -2
- package/dist/chat/slack/errors.d.ts +2 -0
- package/dist/chat/slack/outbound.d.ts +0 -1
- package/dist/chat/slack/reply.d.ts +2 -8
- package/dist/chat/slack/tools/channel-capabilities.d.ts +2 -2
- package/dist/chat/slack/tools/{send-message.d.ts → send-files.d.ts} +27 -19
- package/dist/chat/state/conversation.d.ts +4 -4
- package/dist/chat/state/turn-id.d.ts +2 -0
- package/dist/chat/state/turn-session-keys.d.ts +6 -0
- package/dist/chat/state/turn-session.d.ts +11 -9
- package/dist/chat/task-execution/state.d.ts +6 -1
- package/dist/chat/task-execution/store.d.ts +1 -1
- package/dist/chat/tool-support/pi-tool-adapter.d.ts +1 -1
- package/dist/chat/tool-support/tool-execution-report.d.ts +1 -0
- package/dist/chat/tools/handoff/tool.d.ts +2 -2
- package/dist/chat/tools/sandbox/file-uploads.d.ts +28 -6
- package/dist/chat/tools/types.d.ts +6 -9
- package/dist/chat/tools/web/image-generate.d.ts +4 -6
- package/dist/{chunk-DDRQ4U7I.js → chunk-4YF7Z6IA.js} +390 -270
- package/dist/{chunk-AZ5OMSN5.js → chunk-AUUOHQAT.js} +2 -2
- package/dist/chunk-B2Z2H66D.js +250 -0
- package/dist/{chunk-4W4O4DCV.js → chunk-CQ7KSO2B.js} +75 -45
- package/dist/{chunk-MJSJAHBW.js → chunk-DY7TRYB5.js} +1 -1
- package/dist/{chunk-GPPUTY5M.js → chunk-EDLNHZH3.js} +861 -891
- package/dist/{chunk-R5BFYK2O.js → chunk-IGHMVDWI.js} +134 -18
- package/dist/chunk-MU6HHZEN.js +99 -0
- package/dist/{chunk-XTKJPSMF.js → chunk-NVOTGWYX.js} +458 -684
- package/dist/{chunk-AEWZ7F65.js → chunk-O24R4DCK.js} +2 -179
- package/dist/{chunk-CCFROYAV.js → chunk-PUAMO4PI.js} +115 -125
- package/dist/{chunk-ZMRLBBD5.js → chunk-RMVOAJRL.js} +30 -13
- package/dist/{chunk-3NYUCBLE.js → chunk-SPUAJVVH.js} +6 -4
- package/dist/{chunk-4UYIRWDW.js → chunk-SS67LUOK.js} +41 -290
- package/dist/{chunk-FXFQNHRU.js → chunk-VFUK3X5B.js} +4 -2
- package/dist/{chunk-3MPPVPGZ.js → chunk-VH6KWKG2.js} +2 -2
- package/dist/chunk-VIXFG2VC.js +182 -0
- package/dist/{chunk-BKM4UXUD.js → chunk-YFQ7CQDE.js} +669 -18
- package/dist/{chunk-77LHNQK4.js → chunk-YIPD3L6L.js} +4 -2
- package/dist/{chunk-3OUSJPR7.js → chunk-YNP2ATQX.js} +6 -4
- package/dist/{chunk-WR7H7VLJ.js → chunk-YT72TOEK.js} +2 -2
- package/dist/cli/chat.js +21 -20
- package/dist/cli/check.js +4 -3
- package/dist/cli/plugins.js +11 -9
- package/dist/cli/snapshot-warmup.js +7 -5
- package/dist/cli/upgrade.js +2041 -105
- package/dist/db/schema/{agent-steps.d.ts → conversation-events.d.ts} +37 -21
- package/dist/db/schema.d.ts +28 -159
- package/dist/{db-S33LFWG2.js → db-DIGO4TGW.js} +6 -8
- package/dist/{runner-HA5XAL6K.js → runner-ACR2HAIC.js} +209 -101
- package/dist/{skills-722AXRV5.js → skills-ITNHBARB.js} +4 -3
- package/dist/{validation-EUI2UFRM.js → validation-AGQ46ZGV.js} +4 -3
- package/migrations/0005_conversation_events.sql +122 -0
- package/migrations/README.md +23 -10
- package/migrations/meta/0005_snapshot.json +948 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +5 -5
- package/dist/api/conversations/activity.d.ts +0 -40
- package/dist/api/conversations/detail-projection.d.ts +0 -11
- package/dist/api/conversations/detail.query.d.ts +0 -3
- package/dist/api/conversations/subagent.d.ts +0 -10
- package/dist/api/conversations/transcript.d.ts +0 -28
- package/dist/chat/conversations/legacy-advisor-session.d.ts +0 -7
- package/dist/chat/conversations/legacy-import.d.ts +0 -38
- package/dist/chat/conversations/sql/legacy-history-import.d.ts +0 -55
- package/dist/chat/conversations/sql/messages.d.ts +0 -4
- package/dist/chat/conversations/visible-compactions.d.ts +0 -11
- package/dist/chat/conversations/visible-messages.d.ts +0 -47
- package/dist/chat/services/reply-delivery-plan.d.ts +0 -5
- package/dist/chat/state/session-log.d.ts +0 -384
- package/dist/chunk-P4P7O5WG.js +0 -1072
- package/dist/chunk-XIMUQ4IU.js +0 -147
- package/dist/db/schema/conversation-messages.d.ts +0 -153
- package/dist/handlers/github-webhook/check-suite.d.ts +0 -3
- package/dist/handlers/github-webhook/issue-comment.d.ts +0 -3
- package/dist/handlers/github-webhook/pull-request-review-comment.d.ts +0 -3
- package/dist/handlers/github-webhook/pull-request-review.d.ts +0 -3
- package/dist/handlers/github-webhook/pull-request.d.ts +0 -3
- package/dist/handlers/github-webhook/resource.d.ts +0 -10
- package/dist/handlers/github-webhook.d.ts +0 -15
- package/dist/legacy-import-TMJISRKO.js +0 -18
|
@@ -107,7 +107,7 @@ export declare function getConversationWorkState(args: {
|
|
|
107
107
|
conversationId: string;
|
|
108
108
|
state?: StateAdapter;
|
|
109
109
|
}): Promise<ConversationWorkState | undefined>;
|
|
110
|
-
/** Count mailbox messages that have not yet reached the
|
|
110
|
+
/** Count mailbox messages that have not yet reached the conversation event log. */
|
|
111
111
|
export declare function countPendingConversationMessages(conversation: Conversation): number;
|
|
112
112
|
/** Return whether a conversation has pending or resumable execution work. */
|
|
113
113
|
export declare function hasRunnableConversationWork(conversation: Conversation): boolean;
|
|
@@ -260,6 +260,11 @@ export declare function clearExpiredConversationLease(args: {
|
|
|
260
260
|
nowMs?: number;
|
|
261
261
|
state?: StateAdapter;
|
|
262
262
|
}): Promise<boolean>;
|
|
263
|
+
/** Delete one conversation mailbox and all of its index entries. */
|
|
264
|
+
export declare function deleteConversationState(args: {
|
|
265
|
+
conversationId: string;
|
|
266
|
+
state?: StateAdapter;
|
|
267
|
+
}): Promise<void>;
|
|
263
268
|
/** Remove one conversation from the active index after it is missing or idle. */
|
|
264
269
|
export declare function removeActiveConversation(args: {
|
|
265
270
|
conversationId: string;
|
|
@@ -20,7 +20,7 @@ export declare function getConversationWorkState(args: {
|
|
|
20
20
|
conversationId: string;
|
|
21
21
|
state?: StateAdapter;
|
|
22
22
|
}): Promise<workState.ConversationWorkState | undefined>;
|
|
23
|
-
/** Count mailbox messages that have not yet reached the
|
|
23
|
+
/** Count mailbox messages that have not yet reached the conversation event log. */
|
|
24
24
|
export declare function countPendingConversationMessages(conversation: Conversation): number;
|
|
25
25
|
/** Return whether a conversation has pending or resumable execution work. */
|
|
26
26
|
export declare function hasRunnableConversationWork(conversation: Conversation): boolean;
|
|
@@ -9,4 +9,4 @@ import type { AnyToolDefinition } from "@/chat/tools/definition";
|
|
|
9
9
|
import type { ToolExecutionReport } from "@/chat/tool-support/tool-execution-report";
|
|
10
10
|
import type { PluginHookRunner } from "@/chat/plugins/agent-hooks";
|
|
11
11
|
/** Wrap tool definitions into Pi Agent tool objects with logging, validation, and sandbox execution. */
|
|
12
|
-
export declare function createPiAgentTools(tools: Record<string, AnyToolDefinition>, sandbox: SkillSandbox, spanContext: LogContext, onStatus?: (status: AssistantStatusSpec) => void | Promise<void>, sandboxExecutor?: SandboxExecutor, pluginAuthOrchestration?: PluginAuthOrchestration, onToolCall?: (toolName: string, params: Record<string, unknown>) => void | Promise<void>, agentHooks?: PluginHookRunner, conversationPrivacy?: ConversationPrivacy, onToolResult?: (report: ToolExecutionReport) => void | Promise<void>): AgentTool[];
|
|
12
|
+
export declare function createPiAgentTools(tools: Record<string, AnyToolDefinition>, sandbox: SkillSandbox, spanContext: LogContext, onStatus?: (status: AssistantStatusSpec) => void | Promise<void>, sandboxExecutor?: SandboxExecutor, pluginAuthOrchestration?: PluginAuthOrchestration, onToolCall?: (toolCallId: string, toolName: string, params: Record<string, unknown>) => void | Promise<void>, agentHooks?: PluginHookRunner, conversationPrivacy?: ConversationPrivacy, onToolResult?: (report: ToolExecutionReport) => void | Promise<void>): AgentTool[];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { ToolRuntimeContext } from "@/chat/tools/types";
|
|
2
2
|
export declare const HANDOFF_TOOL_NAME = "handoff";
|
|
3
|
-
/** Create the
|
|
3
|
+
/** Create the runtime control for an in-place execution-profile switch. */
|
|
4
4
|
export declare function createHandoffTool(handoff: NonNullable<ToolRuntimeContext["handoff"]>): Omit<import("../definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
5
5
|
inputSchema: import("../definition").JsonSchemaObject;
|
|
6
6
|
outputSchema: import("../definition").JsonSchemaObject;
|
|
7
7
|
prepareArguments(args: unknown): {
|
|
8
|
-
profile
|
|
8
|
+
profile: string;
|
|
9
9
|
};
|
|
10
10
|
execute?: ((input: unknown, options: import("../definition").ToolExecuteOptions) => {
|
|
11
11
|
[x: string]: unknown;
|
|
@@ -1,8 +1,33 @@
|
|
|
1
1
|
import type { SandboxWorkspace } from "@/chat/sandbox/workspace";
|
|
2
|
+
import { ToolInputError } from "@/chat/tools/execution/tool-input-error";
|
|
3
|
+
import { z } from "zod";
|
|
2
4
|
/** Maximum single file size accepted by model-facing upload tools. */
|
|
3
5
|
export declare const MAX_SANDBOX_FILE_UPLOAD_BYTES: number;
|
|
4
6
|
/** Sandbox directory for generated files that later tools can consume. */
|
|
5
7
|
export declare const SANDBOX_ARTIFACTS_DIR = "/tmp/junior/artifacts";
|
|
8
|
+
/** Canonical model-facing reference to a file that already exists in the sandbox. */
|
|
9
|
+
export declare const sandboxFileReferenceSchema: z.ZodObject<{
|
|
10
|
+
path: z.ZodString;
|
|
11
|
+
filename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
12
|
+
mimeType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
13
|
+
bytes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
/** Model input accepted anywhere an existing sandbox file can be referenced. */
|
|
16
|
+
export type SandboxFileReferenceInput = z.input<typeof sandboxFileReferenceSchema>;
|
|
17
|
+
type WithoutNull<T> = {
|
|
18
|
+
[Key in keyof T]: Exclude<T[Key], null>;
|
|
19
|
+
};
|
|
20
|
+
/** Normalized projection consumed when materializing a sandbox file. */
|
|
21
|
+
export type SandboxFileMaterializationInput = WithoutNull<Omit<z.output<typeof sandboxFileReferenceSchema>, "bytes">>;
|
|
22
|
+
/** Generated file reference whose path and metadata can be passed directly to sendFiles. */
|
|
23
|
+
export declare const generatedArtifactFileRefSchema: z.ZodObject<{
|
|
24
|
+
path: z.ZodString;
|
|
25
|
+
filename: z.ZodString;
|
|
26
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
27
|
+
bytes: z.ZodNumber;
|
|
28
|
+
}, z.core.$strict>;
|
|
29
|
+
/** Fully materialized generated artifact returned to model-facing tools. */
|
|
30
|
+
export type GeneratedArtifactFileRef = z.output<typeof generatedArtifactFileRefSchema>;
|
|
6
31
|
/** Materialized sandbox file data ready for outbound upload boundaries. */
|
|
7
32
|
export interface SandboxFileUpload {
|
|
8
33
|
bytes: number;
|
|
@@ -12,7 +37,7 @@ export interface SandboxFileUpload {
|
|
|
12
37
|
path: string;
|
|
13
38
|
}
|
|
14
39
|
/** Signal that a model-provided file path did not resolve in the active sandbox. */
|
|
15
|
-
export declare class SandboxFileNotFoundError extends
|
|
40
|
+
export declare class SandboxFileNotFoundError extends ToolInputError {
|
|
16
41
|
readonly path: string;
|
|
17
42
|
constructor(path: string);
|
|
18
43
|
}
|
|
@@ -23,8 +48,5 @@ export declare function sandboxArtifactPath(filename: string): string;
|
|
|
23
48
|
/** Infer upload MIME type from an explicit value or filename extension. */
|
|
24
49
|
export declare function inferMimeType(filename: string, explicitMimeType?: string): string;
|
|
25
50
|
/** Read and validate one sandbox file for Slack/file reply upload. */
|
|
26
|
-
export declare function readSandboxFileUpload(sandbox: SandboxWorkspace, input:
|
|
27
|
-
|
|
28
|
-
filename?: string;
|
|
29
|
-
mimeType?: string;
|
|
30
|
-
}): Promise<SandboxFileUpload>;
|
|
51
|
+
export declare function readSandboxFileUpload(sandbox: SandboxWorkspace, input: SandboxFileMaterializationInput): Promise<SandboxFileUpload>;
|
|
52
|
+
export {};
|
|
@@ -10,10 +10,14 @@ import type { JuniorToolResult } from "@/chat/tool-support/structured-result";
|
|
|
10
10
|
import type { LocalActor, Actor, SlackActor } from "@/chat/actor";
|
|
11
11
|
import type { SlackActionToken } from "@/chat/slack/action-token";
|
|
12
12
|
import type { ModelProfile } from "@/chat/model-profile";
|
|
13
|
+
import type { GeneratedArtifactFileRef } from "@/chat/tools/sandbox/file-uploads";
|
|
13
14
|
interface HandoffControl {
|
|
14
|
-
/** Non-empty catalog
|
|
15
|
+
/** Non-empty catalog of configured targets. */
|
|
15
16
|
profiles: readonly [ModelProfile, ...ModelProfile[]];
|
|
16
|
-
execute: (profile: ModelProfile,
|
|
17
|
+
execute: (profile: ModelProfile, options: {
|
|
18
|
+
signal?: AbortSignal;
|
|
19
|
+
toolCallId: string;
|
|
20
|
+
}) => Promise<void>;
|
|
17
21
|
}
|
|
18
22
|
export interface ImageGenerateToolDeps {
|
|
19
23
|
fetch?: typeof fetch;
|
|
@@ -30,13 +34,6 @@ export interface WebSearchToolDeps {
|
|
|
30
34
|
max_results?: number;
|
|
31
35
|
}) => Promise<JuniorToolResult> | JuniorToolResult;
|
|
32
36
|
}
|
|
33
|
-
/** Sandbox file handle returned to the model after a generated artifact is written. */
|
|
34
|
-
export interface GeneratedArtifactFileRef {
|
|
35
|
-
bytes: number;
|
|
36
|
-
filename: string;
|
|
37
|
-
mimeType?: string;
|
|
38
|
-
path: string;
|
|
39
|
-
}
|
|
40
37
|
export interface ToolHooks {
|
|
41
38
|
/**
|
|
42
39
|
* Materialize generated files and return sandbox paths that exist before the
|
|
@@ -16,11 +16,10 @@ export declare function createImageGenerateTool(hooks: Required<Pick<ToolHooks,
|
|
|
16
16
|
enrichedPrompt: string;
|
|
17
17
|
image_count: number;
|
|
18
18
|
images: {
|
|
19
|
-
filename: string;
|
|
20
19
|
path: string;
|
|
21
|
-
|
|
20
|
+
filename: string;
|
|
22
21
|
bytes: number;
|
|
23
|
-
|
|
22
|
+
mimeType?: string | undefined;
|
|
24
23
|
}[];
|
|
25
24
|
delivery: string;
|
|
26
25
|
target?: string | undefined;
|
|
@@ -43,11 +42,10 @@ export declare function createImageGenerateTool(hooks: Required<Pick<ToolHooks,
|
|
|
43
42
|
enrichedPrompt: string;
|
|
44
43
|
image_count: number;
|
|
45
44
|
images: {
|
|
46
|
-
filename: string;
|
|
47
45
|
path: string;
|
|
48
|
-
|
|
46
|
+
filename: string;
|
|
49
47
|
bytes: number;
|
|
50
|
-
|
|
48
|
+
mimeType?: string | undefined;
|
|
51
49
|
}[];
|
|
52
50
|
delivery: string;
|
|
53
51
|
target?: string | undefined;
|