@sentry/junior 0.91.0 → 0.92.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-MXAF7RQL.js → agent-hooks-KL7I3ZRC.js} +7 -7
- package/dist/api/people/list.d.ts +3 -3
- package/dist/api/people/list.js +15 -15
- package/dist/api/people/list.query.d.ts +2 -2
- package/dist/api/people/profile.d.ts +3 -3
- package/dist/api/people/profile.js +12 -12
- package/dist/api/people/profile.query.d.ts +2 -2
- package/dist/api/people/shared.d.ts +13 -13
- package/dist/api/people/types.d.ts +12 -12
- package/dist/api-reference.d.ts +1 -1
- package/dist/app.js +365 -265
- package/dist/{catalog-runtime-DXE6NXHT.js → catalog-runtime-NZHMSMYC.js} +2 -2
- package/dist/chat/actor.d.ts +75 -0
- package/dist/chat/agent/prompt.d.ts +2 -2
- package/dist/chat/agent/request.d.ts +13 -13
- package/dist/chat/agent/resume.d.ts +5 -4
- package/dist/chat/agent/tools.d.ts +4 -2
- package/dist/chat/capabilities/jr-rpc-command.d.ts +1 -1
- package/dist/chat/conversation-privacy.d.ts +11 -0
- package/dist/chat/conversations/sql/migrations.d.ts +1 -1
- package/dist/chat/conversations/sql/schema/conversations.d.ts +2 -19
- package/dist/chat/conversations/sql/schema.d.ts +2 -19
- package/dist/chat/conversations/sql/store.d.ts +3 -3
- package/dist/chat/conversations/store.d.ts +4 -4
- package/dist/chat/credentials/context.d.ts +4 -4
- package/dist/chat/logging.d.ts +2 -2
- package/dist/chat/no-reply.d.ts +1 -1
- package/dist/chat/oauth-flow.d.ts +1 -1
- package/dist/chat/pi/messages.d.ts +2 -2
- package/dist/chat/pi/transcript.d.ts +15 -0
- package/dist/chat/plugins/agent-hooks.d.ts +5 -3
- package/dist/chat/plugins/credential-hooks.d.ts +2 -8
- package/dist/chat/prompt.d.ts +3 -6
- package/dist/chat/runtime/reply-executor.d.ts +1 -1
- package/dist/chat/runtime/turn-input.d.ts +1 -1
- package/dist/chat/sandbox/egress/schemas.d.ts +2 -2
- package/dist/chat/sandbox/egress/session.d.ts +1 -1
- package/dist/chat/services/context-compaction.d.ts +1 -1
- package/dist/chat/services/conversation-memory.d.ts +1 -1
- package/dist/chat/services/mcp-auth-orchestration.d.ts +1 -1
- package/dist/chat/services/message-actor-identity.d.ts +4 -4
- package/dist/chat/services/pending-auth.d.ts +2 -2
- package/dist/chat/services/plugin-auth-orchestration.d.ts +1 -1
- package/dist/chat/services/provider-default-config.d.ts +1 -1
- package/dist/chat/services/subscribed-decision.d.ts +1 -1
- package/dist/chat/services/turn-result.d.ts +1 -1
- package/dist/chat/services/turn-session-record.d.ts +11 -8
- package/dist/chat/services/turn-thinking-level.d.ts +1 -1
- package/dist/chat/slack/assistant-thread/title.d.ts +1 -1
- package/dist/chat/slack/tools/canvas/create.d.ts +41 -1
- package/dist/chat/slack/tools/canvas/edit.d.ts +60 -1
- package/dist/chat/slack/tools/canvas/read.d.ts +60 -1
- package/dist/chat/slack/tools/canvas/write.d.ts +41 -1
- package/dist/chat/slack/tools/channel-list-messages.d.ts +45 -1
- package/dist/chat/slack/tools/context.d.ts +3 -3
- package/dist/chat/slack/tools/list/add-items.d.ts +42 -1
- package/dist/chat/slack/tools/list/create.d.ts +40 -1
- package/dist/chat/slack/tools/list/get-items.d.ts +40 -1
- package/dist/chat/slack/tools/list/update-item.d.ts +46 -1
- package/dist/chat/slack/tools/message-add-reaction.d.ts +40 -1
- package/dist/chat/slack/tools/send-message.d.ts +45 -1
- package/dist/chat/slack/tools/thread-read.d.ts +44 -1
- package/dist/chat/slack/tools/user-lookup.d.ts +45 -1
- package/dist/chat/slack/user.d.ts +3 -3
- package/dist/chat/slack/vision-context.d.ts +2 -2
- package/dist/chat/sql/schema.d.ts +2 -19
- package/dist/chat/state/conversation-details.d.ts +4 -4
- package/dist/chat/state/conversation.d.ts +1 -1
- package/dist/chat/state/session-log.d.ts +140 -26
- package/dist/chat/state/turn-session.d.ts +18 -5
- package/dist/chat/task-execution/slack-work.d.ts +2 -2
- package/dist/chat/task-execution/state.d.ts +4 -4
- package/dist/chat/tool-support/zod-tool.d.ts +16 -4
- package/dist/chat/tools/advisor/tool.d.ts +41 -1
- package/dist/chat/tools/definition.d.ts +10 -0
- package/dist/chat/tools/execute-tool.d.ts +41 -1
- package/dist/chat/tools/resource-events.d.ts +124 -3
- package/dist/chat/tools/runtime/report-progress.d.ts +40 -1
- package/dist/chat/tools/sandbox/bash.d.ts +41 -1
- package/dist/chat/tools/sandbox/edit-file.d.ts +44 -1
- package/dist/chat/tools/sandbox/find-files.d.ts +42 -1
- package/dist/chat/tools/sandbox/grep.d.ts +46 -1
- package/dist/chat/tools/sandbox/list-dir.d.ts +41 -1
- package/dist/chat/tools/sandbox/read-file.d.ts +42 -1
- package/dist/chat/tools/sandbox/write-file.d.ts +41 -1
- package/dist/chat/tools/search-tools.d.ts +102 -1
- package/dist/chat/tools/skill/call-mcp-tool.d.ts +10 -1
- package/dist/chat/tools/skill/load-skill.d.ts +40 -1
- package/dist/chat/tools/skill/search-mcp-tools.d.ts +100 -1
- package/dist/chat/tools/system-time.d.ts +38 -1
- package/dist/chat/tools/types.d.ts +4 -4
- package/dist/chat/tools/web/fetch-tool.d.ts +41 -1
- package/dist/chat/tools/web/image-generate.d.ts +62 -1
- package/dist/chat/tools/web/search.d.ts +41 -1
- package/dist/{chunk-HXL2ZV74.js → chunk-3F54A3YM.js} +82 -11
- package/dist/{chunk-ZGDTBSQ7.js → chunk-56SIBIVF.js} +930 -660
- package/dist/{chunk-DACFZ5CI.js → chunk-7K3JALTQ.js} +18 -12
- package/dist/{chunk-IRRMABQD.js → chunk-APIVR44P.js} +10 -10
- package/dist/{chunk-XP7F4LYB.js → chunk-BTH37NCU.js} +4 -4
- package/dist/{chunk-5GBUZI6M.js → chunk-H7KUZAMZ.js} +4 -4
- package/dist/{chunk-PIB4EOW6.js → chunk-IWKVXO3F.js} +19 -72
- package/dist/{chunk-TYUXD3FN.js → chunk-MC4ZZE4Q.js} +1 -1
- package/dist/{chunk-2S7M37HY.js → chunk-NIFONS4W.js} +86 -47
- package/dist/{chunk-AOISHLSF.js → chunk-O6ZYIHFC.js} +143 -20
- package/dist/{chunk-GCWD2VHP.js → chunk-OQQU3SD6.js} +285 -124
- package/dist/{chunk-NW7AXDA5.js → chunk-OZJXGX4U.js} +2 -2
- package/dist/{chunk-KC42JAAQ.js → chunk-PFXC67GJ.js} +3 -3
- package/dist/{chunk-QCKGI74V.js → chunk-PGR4WGZW.js} +10 -10
- package/dist/{chunk-ZUK7BL63.js → chunk-S6QKIGRM.js} +66 -54
- package/dist/{chunk-IX76WFJV.js → chunk-TF5VLGA7.js} +10 -10
- package/dist/{chunk-AN2437E3.js → chunk-YTNPU7I2.js} +2 -2
- package/dist/{chunk-3MPOMK3K.js → chunk-YYBX2BD5.js} +61 -3
- package/dist/{chunk-ONFOWI2D.js → chunk-Z4FOYQXW.js} +16 -15
- package/dist/{chunk-RS6ANWVT.js → chunk-ZATRYQLR.js} +1 -1
- package/dist/cli/chat.js +20 -20
- package/dist/cli/check.js +3 -3
- package/dist/cli/plugins.js +9 -9
- package/dist/cli/snapshot-warmup.js +6 -6
- package/dist/cli/upgrade.js +9 -9
- package/dist/{db-CXI7PR5U.js → db-GCK43OO3.js} +4 -4
- package/dist/instrumentation.js +1 -1
- package/dist/reporting/conversations.d.ts +3 -3
- package/dist/reporting.d.ts +1 -1
- package/dist/reporting.js +48 -50
- package/dist/{runner-FKL3RAHA.js → runner-Y73GZ2VE.js} +20 -18
- package/dist/{validation-I7GD2YWS.js → validation-KYAWETI4.js} +3 -3
- package/package.json +6 -6
- package/dist/chat/requester.d.ts +0 -68
|
@@ -1,3 +1,48 @@
|
|
|
1
1
|
import type { ToolState } from "@/chat/tools/types";
|
|
2
2
|
/** Create a tool that updates an item in the active Slack list. */
|
|
3
|
-
export declare function createSlackListUpdateItemTool(state: ToolState): import("../../../tools/definition").AnyToolDefinition
|
|
3
|
+
export declare function createSlackListUpdateItemTool(state: ToolState): Omit<import("../../../tools/definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
4
|
+
inputSchema: import("../../../tools/definition").JsonSchemaObject;
|
|
5
|
+
outputSchema: import("../../../tools/definition").JsonSchemaObject;
|
|
6
|
+
prepareArguments(args: unknown): {
|
|
7
|
+
item_id: string;
|
|
8
|
+
completed: boolean;
|
|
9
|
+
title?: string | undefined;
|
|
10
|
+
} | {
|
|
11
|
+
item_id: string;
|
|
12
|
+
title: string;
|
|
13
|
+
completed?: boolean | undefined;
|
|
14
|
+
};
|
|
15
|
+
execute?: ((input: unknown, options: import("../../../tools/definition").ToolExecuteOptions) => {
|
|
16
|
+
[x: string]: unknown;
|
|
17
|
+
ok: boolean;
|
|
18
|
+
status: "error" | "success";
|
|
19
|
+
target?: string | undefined;
|
|
20
|
+
data?: unknown;
|
|
21
|
+
truncated?: boolean | undefined;
|
|
22
|
+
continuation?: {
|
|
23
|
+
arguments: Record<string, unknown>;
|
|
24
|
+
reason?: string | undefined;
|
|
25
|
+
} | undefined;
|
|
26
|
+
error?: string | {
|
|
27
|
+
kind: string;
|
|
28
|
+
message: string;
|
|
29
|
+
retryable?: boolean | undefined;
|
|
30
|
+
} | undefined;
|
|
31
|
+
} | Promise<{
|
|
32
|
+
[x: string]: unknown;
|
|
33
|
+
ok: boolean;
|
|
34
|
+
status: "error" | "success";
|
|
35
|
+
target?: string | undefined;
|
|
36
|
+
data?: unknown;
|
|
37
|
+
truncated?: boolean | undefined;
|
|
38
|
+
continuation?: {
|
|
39
|
+
arguments: Record<string, unknown>;
|
|
40
|
+
reason?: string | undefined;
|
|
41
|
+
} | undefined;
|
|
42
|
+
error?: string | {
|
|
43
|
+
kind: string;
|
|
44
|
+
message: string;
|
|
45
|
+
retryable?: boolean | undefined;
|
|
46
|
+
} | undefined;
|
|
47
|
+
}>) | undefined;
|
|
48
|
+
};
|
|
@@ -1,4 +1,43 @@
|
|
|
1
1
|
import type { SlackToolContext } from "@/chat/slack/tools/context";
|
|
2
2
|
import type { ToolState } from "@/chat/tools/types";
|
|
3
3
|
/** Create the tool that reacts to the current inbound Slack message. */
|
|
4
|
-
export declare function createSlackMessageAddReactionTool(context: SlackToolContext, state: ToolState): import("../../tools/definition").AnyToolDefinition
|
|
4
|
+
export declare function createSlackMessageAddReactionTool(context: SlackToolContext, state: ToolState): Omit<import("../../tools/definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
5
|
+
inputSchema: import("../../tools/definition").JsonSchemaObject;
|
|
6
|
+
outputSchema: import("../../tools/definition").JsonSchemaObject;
|
|
7
|
+
prepareArguments(args: unknown): {
|
|
8
|
+
emoji: string;
|
|
9
|
+
};
|
|
10
|
+
execute?: ((input: unknown, options: import("../../tools/definition").ToolExecuteOptions) => {
|
|
11
|
+
[x: string]: unknown;
|
|
12
|
+
ok: boolean;
|
|
13
|
+
status: "error" | "success";
|
|
14
|
+
target?: string | undefined;
|
|
15
|
+
data?: unknown;
|
|
16
|
+
truncated?: boolean | undefined;
|
|
17
|
+
continuation?: {
|
|
18
|
+
arguments: Record<string, unknown>;
|
|
19
|
+
reason?: string | undefined;
|
|
20
|
+
} | undefined;
|
|
21
|
+
error?: string | {
|
|
22
|
+
kind: string;
|
|
23
|
+
message: string;
|
|
24
|
+
retryable?: boolean | undefined;
|
|
25
|
+
} | undefined;
|
|
26
|
+
} | Promise<{
|
|
27
|
+
[x: string]: unknown;
|
|
28
|
+
ok: boolean;
|
|
29
|
+
status: "error" | "success";
|
|
30
|
+
target?: string | undefined;
|
|
31
|
+
data?: unknown;
|
|
32
|
+
truncated?: boolean | undefined;
|
|
33
|
+
continuation?: {
|
|
34
|
+
arguments: Record<string, unknown>;
|
|
35
|
+
reason?: string | undefined;
|
|
36
|
+
} | undefined;
|
|
37
|
+
error?: string | {
|
|
38
|
+
kind: string;
|
|
39
|
+
message: string;
|
|
40
|
+
retryable?: boolean | undefined;
|
|
41
|
+
} | undefined;
|
|
42
|
+
}>) | undefined;
|
|
43
|
+
};
|
|
@@ -8,4 +8,48 @@ export type MaterializeMessageFile = (input: {
|
|
|
8
8
|
mimeType?: string;
|
|
9
9
|
}) => Promise<SandboxFileUpload>;
|
|
10
10
|
/** Create the Slack side-effect tool for active-conversation text and file messages. */
|
|
11
|
-
export declare function createSendMessageTool(context: SlackToolContext, state: ToolState, materializeFile: MaterializeMessageFile): import("../../tools/definition").AnyToolDefinition
|
|
11
|
+
export declare function createSendMessageTool(context: SlackToolContext, state: ToolState, materializeFile: MaterializeMessageFile): Omit<import("../../tools/definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
12
|
+
inputSchema: import("../../tools/definition").JsonSchemaObject;
|
|
13
|
+
outputSchema: import("../../tools/definition").JsonSchemaObject;
|
|
14
|
+
prepareArguments(args: unknown): {
|
|
15
|
+
text?: string | null | undefined;
|
|
16
|
+
files?: {
|
|
17
|
+
path: string;
|
|
18
|
+
filename?: string | null | undefined;
|
|
19
|
+
mimeType?: string | null | undefined;
|
|
20
|
+
}[] | null | undefined;
|
|
21
|
+
};
|
|
22
|
+
execute?: ((input: unknown, options: import("../../tools/definition").ToolExecuteOptions) => {
|
|
23
|
+
[x: string]: unknown;
|
|
24
|
+
ok: boolean;
|
|
25
|
+
status: "error" | "success";
|
|
26
|
+
target?: string | undefined;
|
|
27
|
+
data?: unknown;
|
|
28
|
+
truncated?: boolean | undefined;
|
|
29
|
+
continuation?: {
|
|
30
|
+
arguments: Record<string, unknown>;
|
|
31
|
+
reason?: string | undefined;
|
|
32
|
+
} | undefined;
|
|
33
|
+
error?: string | {
|
|
34
|
+
kind: string;
|
|
35
|
+
message: string;
|
|
36
|
+
retryable?: boolean | undefined;
|
|
37
|
+
} | undefined;
|
|
38
|
+
} | Promise<{
|
|
39
|
+
[x: string]: unknown;
|
|
40
|
+
ok: boolean;
|
|
41
|
+
status: "error" | "success";
|
|
42
|
+
target?: string | undefined;
|
|
43
|
+
data?: unknown;
|
|
44
|
+
truncated?: boolean | undefined;
|
|
45
|
+
continuation?: {
|
|
46
|
+
arguments: Record<string, unknown>;
|
|
47
|
+
reason?: string | undefined;
|
|
48
|
+
} | undefined;
|
|
49
|
+
error?: string | {
|
|
50
|
+
kind: string;
|
|
51
|
+
message: string;
|
|
52
|
+
retryable?: boolean | undefined;
|
|
53
|
+
} | undefined;
|
|
54
|
+
}>) | undefined;
|
|
55
|
+
};
|
|
@@ -3,4 +3,47 @@ import type { SlackToolContext } from "@/chat/slack/tools/context";
|
|
|
3
3
|
/** Create a tool that reads a Slack thread from a shared message URL or explicit coordinates. */
|
|
4
4
|
export declare function createSlackThreadReadTool(context: SlackToolContext, deps?: {
|
|
5
5
|
visibilityStore?: DestinationVisibilityReader;
|
|
6
|
-
}): import("../../tools/definition").AnyToolDefinition
|
|
6
|
+
}): Omit<import("../../tools/definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
7
|
+
inputSchema: import("../../tools/definition").JsonSchemaObject;
|
|
8
|
+
outputSchema: import("../../tools/definition").JsonSchemaObject;
|
|
9
|
+
prepareArguments(args: unknown): {
|
|
10
|
+
url?: string | undefined;
|
|
11
|
+
channel_id?: string | undefined;
|
|
12
|
+
ts?: string | undefined;
|
|
13
|
+
limit?: number | undefined;
|
|
14
|
+
max_pages?: number | undefined;
|
|
15
|
+
};
|
|
16
|
+
execute?: ((input: unknown, options: import("../../tools/definition").ToolExecuteOptions) => {
|
|
17
|
+
[x: string]: unknown;
|
|
18
|
+
ok: boolean;
|
|
19
|
+
status: "error" | "success";
|
|
20
|
+
target?: string | undefined;
|
|
21
|
+
data?: unknown;
|
|
22
|
+
truncated?: boolean | undefined;
|
|
23
|
+
continuation?: {
|
|
24
|
+
arguments: Record<string, unknown>;
|
|
25
|
+
reason?: string | undefined;
|
|
26
|
+
} | undefined;
|
|
27
|
+
error?: string | {
|
|
28
|
+
kind: string;
|
|
29
|
+
message: string;
|
|
30
|
+
retryable?: boolean | undefined;
|
|
31
|
+
} | undefined;
|
|
32
|
+
} | Promise<{
|
|
33
|
+
[x: string]: unknown;
|
|
34
|
+
ok: boolean;
|
|
35
|
+
status: "error" | "success";
|
|
36
|
+
target?: string | undefined;
|
|
37
|
+
data?: unknown;
|
|
38
|
+
truncated?: boolean | undefined;
|
|
39
|
+
continuation?: {
|
|
40
|
+
arguments: Record<string, unknown>;
|
|
41
|
+
reason?: string | undefined;
|
|
42
|
+
} | undefined;
|
|
43
|
+
error?: string | {
|
|
44
|
+
kind: string;
|
|
45
|
+
message: string;
|
|
46
|
+
retryable?: boolean | undefined;
|
|
47
|
+
} | undefined;
|
|
48
|
+
}>) | undefined;
|
|
49
|
+
};
|
|
@@ -1,2 +1,46 @@
|
|
|
1
1
|
/** Create the tool that resolves Slack users by ID, handle, or email. */
|
|
2
|
-
export declare function createSlackUserLookupTool(): import("../../tools/definition").AnyToolDefinition
|
|
2
|
+
export declare function createSlackUserLookupTool(): Omit<import("../../tools/definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
3
|
+
inputSchema: import("../../tools/definition").JsonSchemaObject;
|
|
4
|
+
outputSchema: import("../../tools/definition").JsonSchemaObject;
|
|
5
|
+
prepareArguments(args: unknown): {
|
|
6
|
+
user_id?: string | undefined;
|
|
7
|
+
email?: string | undefined;
|
|
8
|
+
query?: string | undefined;
|
|
9
|
+
limit?: number | undefined;
|
|
10
|
+
max_pages?: number | undefined;
|
|
11
|
+
include_bots?: boolean | undefined;
|
|
12
|
+
};
|
|
13
|
+
execute?: ((input: unknown, options: import("../../tools/definition").ToolExecuteOptions) => {
|
|
14
|
+
[x: string]: unknown;
|
|
15
|
+
ok: boolean;
|
|
16
|
+
status: "error" | "success";
|
|
17
|
+
target?: string | undefined;
|
|
18
|
+
data?: unknown;
|
|
19
|
+
truncated?: boolean | undefined;
|
|
20
|
+
continuation?: {
|
|
21
|
+
arguments: Record<string, unknown>;
|
|
22
|
+
reason?: string | undefined;
|
|
23
|
+
} | undefined;
|
|
24
|
+
error?: string | {
|
|
25
|
+
kind: string;
|
|
26
|
+
message: string;
|
|
27
|
+
retryable?: boolean | undefined;
|
|
28
|
+
} | undefined;
|
|
29
|
+
} | Promise<{
|
|
30
|
+
[x: string]: unknown;
|
|
31
|
+
ok: boolean;
|
|
32
|
+
status: "error" | "success";
|
|
33
|
+
target?: string | undefined;
|
|
34
|
+
data?: unknown;
|
|
35
|
+
truncated?: boolean | undefined;
|
|
36
|
+
continuation?: {
|
|
37
|
+
arguments: Record<string, unknown>;
|
|
38
|
+
reason?: string | undefined;
|
|
39
|
+
} | undefined;
|
|
40
|
+
error?: string | {
|
|
41
|
+
kind: string;
|
|
42
|
+
message: string;
|
|
43
|
+
retryable?: boolean | undefined;
|
|
44
|
+
} | undefined;
|
|
45
|
+
}>) | undefined;
|
|
46
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type SlackActor } from "@/chat/actor";
|
|
2
2
|
interface SlackUserLookupResult {
|
|
3
3
|
userName?: string;
|
|
4
4
|
fullName?: string;
|
|
@@ -6,6 +6,6 @@ interface SlackUserLookupResult {
|
|
|
6
6
|
}
|
|
7
7
|
/** Fetch Slack user profile info with in-memory TTL cache to avoid repeated API calls. */
|
|
8
8
|
export declare function lookupSlackUser(teamId: string, userId?: string): Promise<SlackUserLookupResult | null>;
|
|
9
|
-
/** Resolve the canonical Slack
|
|
10
|
-
export declare function
|
|
9
|
+
/** Resolve the canonical Slack actor from Slack profile data. */
|
|
10
|
+
export declare function lookupSlackActor(teamId: string, userId: string): Promise<SlackActor>;
|
|
11
11
|
export {};
|
|
@@ -38,7 +38,7 @@ export interface VisionContextService {
|
|
|
38
38
|
hydrateConversationVisionContext: (conversation: ThreadConversationState, context: {
|
|
39
39
|
threadId?: string;
|
|
40
40
|
channelId?: string;
|
|
41
|
-
|
|
41
|
+
actorId?: string;
|
|
42
42
|
runId?: string;
|
|
43
43
|
threadTs?: string;
|
|
44
44
|
}) => Promise<void>;
|
|
@@ -46,7 +46,7 @@ export interface VisionContextService {
|
|
|
46
46
|
}
|
|
47
47
|
interface ResolveUserAttachmentsContext {
|
|
48
48
|
threadId?: string;
|
|
49
|
-
|
|
49
|
+
actorId?: string;
|
|
50
50
|
channelId?: string;
|
|
51
51
|
runId?: string;
|
|
52
52
|
conversation?: ThreadConversationState;
|
|
@@ -175,23 +175,6 @@ export declare const juniorSqlSchema: {
|
|
|
175
175
|
identity: undefined;
|
|
176
176
|
generated: undefined;
|
|
177
177
|
}, {}, {}>;
|
|
178
|
-
requesterIdentityId: import("drizzle-orm/pg-core").PgColumn<{
|
|
179
|
-
name: "requester_identity_id";
|
|
180
|
-
tableName: "junior_conversations";
|
|
181
|
-
dataType: "string";
|
|
182
|
-
columnType: "PgText";
|
|
183
|
-
data: string;
|
|
184
|
-
driverParam: string;
|
|
185
|
-
notNull: false;
|
|
186
|
-
hasDefault: false;
|
|
187
|
-
isPrimaryKey: false;
|
|
188
|
-
isAutoincrement: false;
|
|
189
|
-
hasRuntimeDefault: false;
|
|
190
|
-
enumValues: [string, ...string[]];
|
|
191
|
-
baseColumn: never;
|
|
192
|
-
identity: undefined;
|
|
193
|
-
generated: undefined;
|
|
194
|
-
}, {}, {}>;
|
|
195
178
|
creatorIdentityId: import("drizzle-orm/pg-core").PgColumn<{
|
|
196
179
|
name: "creator_identity_id";
|
|
197
180
|
tableName: "junior_conversations";
|
|
@@ -226,8 +209,8 @@ export declare const juniorSqlSchema: {
|
|
|
226
209
|
identity: undefined;
|
|
227
210
|
generated: undefined;
|
|
228
211
|
}, {}, {}>;
|
|
229
|
-
|
|
230
|
-
name: "
|
|
212
|
+
actor: import("drizzle-orm/pg-core").PgColumn<{
|
|
213
|
+
name: "actor_json";
|
|
231
214
|
tableName: "junior_conversations";
|
|
232
215
|
dataType: "json";
|
|
233
216
|
columnType: "PgJsonb";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type StoredSlackActor } from "@/chat/actor";
|
|
2
2
|
import type { AgentTurnSurface } from "./turn-session";
|
|
3
3
|
export interface ConversationDetailsRecord {
|
|
4
4
|
conversationId: string;
|
|
@@ -10,8 +10,8 @@ export interface ConversationDetailsRecord {
|
|
|
10
10
|
channelName?: string;
|
|
11
11
|
/** Surface on which the conversation was started. */
|
|
12
12
|
originSurface?: AgentTurnSurface;
|
|
13
|
-
/**
|
|
14
|
-
|
|
13
|
+
/** Actor who initiated the conversation (first turn). */
|
|
14
|
+
originActor?: StoredSlackActor;
|
|
15
15
|
/** Timestamp of the first turn in the conversation. */
|
|
16
16
|
startedAtMs?: number;
|
|
17
17
|
}
|
|
@@ -22,7 +22,7 @@ export interface ConversationDetailsRecord {
|
|
|
22
22
|
export declare function initConversationContext(conversationId: string, context: {
|
|
23
23
|
channelName?: string;
|
|
24
24
|
originSurface?: AgentTurnSurface;
|
|
25
|
-
|
|
25
|
+
originActor?: StoredSlackActor;
|
|
26
26
|
startedAtMs: number;
|
|
27
27
|
}): Promise<void>;
|
|
28
28
|
/**
|
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { type Actor } from "@sentry/junior-plugin-api";
|
|
2
3
|
import { type PiMessage } from "@/chat/pi/messages";
|
|
3
|
-
import { type
|
|
4
|
+
import { type StoredSlackActor } from "@/chat/actor";
|
|
5
|
+
declare const piMessageAuthoritySchema: z.ZodUnion<readonly [z.ZodLiteral<"instruction">, z.ZodLiteral<"context">]>;
|
|
6
|
+
declare const piMessageProvenanceSchema: z.ZodObject<{
|
|
7
|
+
authority: z.ZodUnion<readonly [z.ZodLiteral<"instruction">, z.ZodLiteral<"context">]>;
|
|
8
|
+
actor: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
9
|
+
platform: z.ZodLiteral<"slack">;
|
|
10
|
+
teamId: z.ZodString;
|
|
11
|
+
email: z.ZodOptional<z.ZodString>;
|
|
12
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
13
|
+
userId: z.ZodString;
|
|
14
|
+
userName: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
16
|
+
platform: z.ZodLiteral<"local">;
|
|
17
|
+
email: z.ZodOptional<z.ZodString>;
|
|
18
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
19
|
+
userId: z.ZodString;
|
|
20
|
+
userName: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
22
|
+
platform: z.ZodLiteral<"system">;
|
|
23
|
+
name: z.ZodString;
|
|
24
|
+
}, z.core.$strict>], "platform">>;
|
|
25
|
+
}, z.core.$strict>;
|
|
26
|
+
/** Whether a user-role Pi message is a durable instruction or ambient context. */
|
|
27
|
+
export type PiMessageAuthority = z.output<typeof piMessageAuthoritySchema>;
|
|
28
|
+
/** Per-message record of the actor a Pi message came from and its authority weight. */
|
|
29
|
+
export type PiMessageProvenance = z.output<typeof piMessageProvenanceSchema>;
|
|
4
30
|
declare const authorizationKindSchema: z.ZodUnion<readonly [z.ZodLiteral<"plugin">, z.ZodLiteral<"mcp">]>;
|
|
5
31
|
declare const transcriptRefSchema: z.ZodObject<{
|
|
6
32
|
type: z.ZodLiteral<"advisor_session">;
|
|
@@ -8,16 +34,36 @@ declare const transcriptRefSchema: z.ZodObject<{
|
|
|
8
34
|
key: z.ZodString;
|
|
9
35
|
}, z.core.$strip>;
|
|
10
36
|
declare const sessionLogEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
11
|
-
schemaVersion: z.ZodLiteral<1>;
|
|
37
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
12
38
|
type: z.ZodLiteral<"pi_message">;
|
|
13
39
|
sessionId: z.ZodDefault<z.ZodString>;
|
|
14
40
|
message: z.ZodPipe<z.ZodObject<{
|
|
15
41
|
role: z.ZodString;
|
|
16
|
-
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").
|
|
42
|
+
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").AssistantMessage | import("@earendil-works/pi-ai").UserMessage | import("@earendil-works/pi-ai").ToolResultMessage<any> | import("@earendil-works/pi-agent-core").CustomMessage<unknown> | import("@earendil-works/pi-agent-core").BashExecutionMessage | import("@earendil-works/pi-agent-core").BranchSummaryMessage | import("@earendil-works/pi-agent-core").CompactionSummaryMessage, {
|
|
17
43
|
[x: string]: unknown;
|
|
18
44
|
role: string;
|
|
19
45
|
}>>;
|
|
20
|
-
|
|
46
|
+
provenance: z.ZodOptional<z.ZodObject<{
|
|
47
|
+
authority: z.ZodUnion<readonly [z.ZodLiteral<"instruction">, z.ZodLiteral<"context">]>;
|
|
48
|
+
actor: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
49
|
+
platform: z.ZodLiteral<"slack">;
|
|
50
|
+
teamId: z.ZodString;
|
|
51
|
+
email: z.ZodOptional<z.ZodString>;
|
|
52
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
53
|
+
userId: z.ZodString;
|
|
54
|
+
userName: z.ZodOptional<z.ZodString>;
|
|
55
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
56
|
+
platform: z.ZodLiteral<"local">;
|
|
57
|
+
email: z.ZodOptional<z.ZodString>;
|
|
58
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
59
|
+
userId: z.ZodString;
|
|
60
|
+
userName: z.ZodOptional<z.ZodString>;
|
|
61
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
62
|
+
platform: z.ZodLiteral<"system">;
|
|
63
|
+
name: z.ZodString;
|
|
64
|
+
}, z.core.$strict>], "platform">>;
|
|
65
|
+
}, z.core.$strict>>;
|
|
66
|
+
actor: z.ZodOptional<z.ZodObject<{
|
|
21
67
|
email: z.ZodOptional<z.ZodString>;
|
|
22
68
|
fullName: z.ZodOptional<z.ZodString>;
|
|
23
69
|
platform: z.ZodOptional<z.ZodLiteral<"slack">>;
|
|
@@ -26,16 +72,36 @@ declare const sessionLogEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
26
72
|
teamId: z.ZodOptional<z.ZodString>;
|
|
27
73
|
}, z.core.$strict>>;
|
|
28
74
|
}, z.core.$strip>, z.ZodObject<{
|
|
29
|
-
schemaVersion: z.ZodLiteral<1>;
|
|
75
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
30
76
|
type: z.ZodLiteral<"projection_reset">;
|
|
31
77
|
sessionId: z.ZodDefault<z.ZodString>;
|
|
32
78
|
messages: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
33
79
|
role: z.ZodString;
|
|
34
|
-
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").
|
|
80
|
+
}, z.core.$loose>, z.ZodTransform<import("@earendil-works/pi-ai").AssistantMessage | import("@earendil-works/pi-ai").UserMessage | import("@earendil-works/pi-ai").ToolResultMessage<any> | import("@earendil-works/pi-agent-core").CustomMessage<unknown> | import("@earendil-works/pi-agent-core").BashExecutionMessage | import("@earendil-works/pi-agent-core").BranchSummaryMessage | import("@earendil-works/pi-agent-core").CompactionSummaryMessage, {
|
|
35
81
|
[x: string]: unknown;
|
|
36
82
|
role: string;
|
|
37
83
|
}>>>;
|
|
38
|
-
|
|
84
|
+
provenance: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
85
|
+
authority: z.ZodUnion<readonly [z.ZodLiteral<"instruction">, z.ZodLiteral<"context">]>;
|
|
86
|
+
actor: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
87
|
+
platform: z.ZodLiteral<"slack">;
|
|
88
|
+
teamId: z.ZodString;
|
|
89
|
+
email: z.ZodOptional<z.ZodString>;
|
|
90
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
91
|
+
userId: z.ZodString;
|
|
92
|
+
userName: z.ZodOptional<z.ZodString>;
|
|
93
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
94
|
+
platform: z.ZodLiteral<"local">;
|
|
95
|
+
email: z.ZodOptional<z.ZodString>;
|
|
96
|
+
fullName: z.ZodOptional<z.ZodString>;
|
|
97
|
+
userId: z.ZodString;
|
|
98
|
+
userName: z.ZodOptional<z.ZodString>;
|
|
99
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
100
|
+
platform: z.ZodLiteral<"system">;
|
|
101
|
+
name: z.ZodString;
|
|
102
|
+
}, z.core.$strict>], "platform">>;
|
|
103
|
+
}, z.core.$strict>>>;
|
|
104
|
+
actor: z.ZodOptional<z.ZodObject<{
|
|
39
105
|
email: z.ZodOptional<z.ZodString>;
|
|
40
106
|
fullName: z.ZodOptional<z.ZodString>;
|
|
41
107
|
platform: z.ZodOptional<z.ZodLiteral<"slack">>;
|
|
@@ -44,10 +110,10 @@ declare const sessionLogEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
44
110
|
teamId: z.ZodOptional<z.ZodString>;
|
|
45
111
|
}, z.core.$strict>>;
|
|
46
112
|
}, z.core.$strip>, z.ZodObject<{
|
|
47
|
-
schemaVersion: z.ZodLiteral<1>;
|
|
48
|
-
type: z.ZodLiteral<"
|
|
113
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
114
|
+
type: z.ZodLiteral<"actor_recorded">;
|
|
49
115
|
sessionId: z.ZodDefault<z.ZodString>;
|
|
50
|
-
|
|
116
|
+
actor: z.ZodObject<{
|
|
51
117
|
email: z.ZodOptional<z.ZodString>;
|
|
52
118
|
fullName: z.ZodOptional<z.ZodString>;
|
|
53
119
|
platform: z.ZodOptional<z.ZodLiteral<"slack">>;
|
|
@@ -56,31 +122,31 @@ declare const sessionLogEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
56
122
|
teamId: z.ZodOptional<z.ZodString>;
|
|
57
123
|
}, z.core.$strict>;
|
|
58
124
|
}, z.core.$strip>, z.ZodObject<{
|
|
59
|
-
schemaVersion: z.ZodLiteral<1>;
|
|
125
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
60
126
|
type: z.ZodLiteral<"mcp_provider_connected">;
|
|
61
127
|
sessionId: z.ZodDefault<z.ZodString>;
|
|
62
128
|
provider: z.ZodString;
|
|
63
129
|
}, z.core.$strip>, z.ZodObject<{
|
|
64
|
-
schemaVersion: z.ZodLiteral<1>;
|
|
130
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
65
131
|
type: z.ZodLiteral<"authorization_requested">;
|
|
66
132
|
sessionId: z.ZodDefault<z.ZodString>;
|
|
67
133
|
createdAtMs: z.ZodNumber;
|
|
68
134
|
kind: z.ZodUnion<readonly [z.ZodLiteral<"plugin">, z.ZodLiteral<"mcp">]>;
|
|
69
135
|
provider: z.ZodString;
|
|
70
|
-
|
|
136
|
+
actorId: z.ZodString;
|
|
71
137
|
authorizationId: z.ZodString;
|
|
72
138
|
delivery: z.ZodUnion<readonly [z.ZodLiteral<"private_link_sent">, z.ZodLiteral<"private_link_reused">]>;
|
|
73
139
|
}, z.core.$strip>, z.ZodObject<{
|
|
74
|
-
schemaVersion: z.ZodLiteral<1>;
|
|
140
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
75
141
|
type: z.ZodLiteral<"authorization_completed">;
|
|
76
142
|
sessionId: z.ZodDefault<z.ZodString>;
|
|
77
143
|
createdAtMs: z.ZodNumber;
|
|
78
144
|
kind: z.ZodUnion<readonly [z.ZodLiteral<"plugin">, z.ZodLiteral<"mcp">]>;
|
|
79
145
|
provider: z.ZodString;
|
|
80
|
-
|
|
146
|
+
actorId: z.ZodString;
|
|
81
147
|
authorizationId: z.ZodString;
|
|
82
148
|
}, z.core.$strip>, z.ZodObject<{
|
|
83
|
-
schemaVersion: z.ZodLiteral<1>;
|
|
149
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
84
150
|
type: z.ZodLiteral<"tool_execution_started">;
|
|
85
151
|
sessionId: z.ZodDefault<z.ZodString>;
|
|
86
152
|
createdAtMs: z.ZodNumber;
|
|
@@ -88,7 +154,7 @@ declare const sessionLogEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
88
154
|
toolName: z.ZodString;
|
|
89
155
|
args: z.ZodOptional<z.ZodUnknown>;
|
|
90
156
|
}, z.core.$strip>, z.ZodObject<{
|
|
91
|
-
schemaVersion: z.ZodLiteral<1>;
|
|
157
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
92
158
|
type: z.ZodLiteral<"subagent_started">;
|
|
93
159
|
sessionId: z.ZodDefault<z.ZodString>;
|
|
94
160
|
subagentInvocationId: z.ZodString;
|
|
@@ -104,7 +170,7 @@ declare const sessionLogEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
104
170
|
historyMode: z.ZodLiteral<"shared">;
|
|
105
171
|
createdAtMs: z.ZodNumber;
|
|
106
172
|
}, z.core.$strip>, z.ZodObject<{
|
|
107
|
-
schemaVersion: z.ZodLiteral<1>;
|
|
173
|
+
schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
|
|
108
174
|
type: z.ZodLiteral<"subagent_ended">;
|
|
109
175
|
sessionId: z.ZodDefault<z.ZodString>;
|
|
110
176
|
subagentInvocationId: z.ZodString;
|
|
@@ -114,7 +180,7 @@ declare const sessionLogEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
114
180
|
transcriptStartMessageIndex: z.ZodOptional<z.ZodNumber>;
|
|
115
181
|
createdAtMs: z.ZodNumber;
|
|
116
182
|
}, z.core.$strip>], "type">;
|
|
117
|
-
/**
|
|
183
|
+
/** Actor identity stored with turn-start messages for durable continuation. */
|
|
118
184
|
export type SessionLogEntry = z.infer<typeof sessionLogEntrySchema>;
|
|
119
185
|
export type AuthorizationKind = z.infer<typeof authorizationKindSchema>;
|
|
120
186
|
export type TranscriptRef = z.infer<typeof transcriptRefSchema>;
|
|
@@ -137,10 +203,21 @@ export interface SessionLogStore {
|
|
|
137
203
|
append(args: AppendArgs): Promise<void>;
|
|
138
204
|
read(scope: Scope): Promise<SessionLogEntry[]>;
|
|
139
205
|
}
|
|
206
|
+
/** Aligned Pi-message projection: `provenance[i]` describes `messages[i]`. */
|
|
140
207
|
export interface SessionProjection {
|
|
141
208
|
messages: PiMessage[];
|
|
142
|
-
|
|
209
|
+
provenance: PiMessageProvenance[];
|
|
143
210
|
}
|
|
211
|
+
/**
|
|
212
|
+
* All distinct actors annotated on instruction-authority messages, in
|
|
213
|
+
* first-seen order — the run's actors. This is attribution, never
|
|
214
|
+
* authority: it exists so provenance consumers know which actors
|
|
215
|
+
* contributed instructions to a run. It must never feed credential
|
|
216
|
+
* issuance, credential-subject selection, or scope ownership.
|
|
217
|
+
* Unattributable instructions (no resolvable actor) never join;
|
|
218
|
+
* distinctness is by identity ids only, never display fields.
|
|
219
|
+
*/
|
|
220
|
+
export declare function instructionActors(provenance: PiMessageProvenance[]): Actor[];
|
|
144
221
|
/** Load chronological host-only runtime activity entries for reporting. */
|
|
145
222
|
export declare function loadActivityEntries(args: Scope & {
|
|
146
223
|
store?: SessionLogStore;
|
|
@@ -152,19 +229,38 @@ export declare function loadMessages(args: Scope & {
|
|
|
152
229
|
messageCount: number;
|
|
153
230
|
sessionId?: string;
|
|
154
231
|
}): Promise<PiMessage[] | undefined>;
|
|
232
|
+
/** Load the committed Pi-message projection with aligned per-message provenance. */
|
|
233
|
+
export declare function loadMessagesWithProvenance(args: Scope & {
|
|
234
|
+
store?: SessionLogStore;
|
|
235
|
+
messageCount: number;
|
|
236
|
+
sessionId?: string;
|
|
237
|
+
}): Promise<SessionProjection | undefined>;
|
|
155
238
|
/** Load the full current Pi-message projection for a conversation. */
|
|
156
239
|
export declare function loadProjection(args: Scope & {
|
|
157
240
|
store?: SessionLogStore;
|
|
158
241
|
sessionId?: string;
|
|
159
242
|
}): Promise<PiMessage[]>;
|
|
160
243
|
/**
|
|
161
|
-
* Load the Pi-message projection
|
|
162
|
-
* Used at continuation boundaries to avoid a second log scan.
|
|
244
|
+
* Load the Pi-message projection with aligned per-message provenance in one
|
|
245
|
+
* read. Used at continuation boundaries to avoid a second log scan.
|
|
163
246
|
*/
|
|
164
|
-
export declare function
|
|
247
|
+
export declare function loadProjectionWithProvenance(args: Scope & {
|
|
165
248
|
store?: SessionLogStore;
|
|
166
249
|
sessionId?: string;
|
|
167
250
|
}): Promise<SessionProjection>;
|
|
251
|
+
/**
|
|
252
|
+
* Load the projection with the latest instruction actor as a stored Slack
|
|
253
|
+
* actor. Retained for callers that still key on a single latest actor; it
|
|
254
|
+
* derives the actor from per-message provenance rather than a latest-wins
|
|
255
|
+
* field.
|
|
256
|
+
*/
|
|
257
|
+
export declare function loadProjectionWithActor(args: Scope & {
|
|
258
|
+
store?: SessionLogStore;
|
|
259
|
+
sessionId?: string;
|
|
260
|
+
}): Promise<{
|
|
261
|
+
messages: PiMessage[];
|
|
262
|
+
actor?: StoredSlackActor;
|
|
263
|
+
}>;
|
|
168
264
|
/** Load MCP providers that were durably connected in this conversation. */
|
|
169
265
|
export declare function loadConnectedMcpProviders(args: Scope & {
|
|
170
266
|
store?: SessionLogStore;
|
|
@@ -180,7 +276,7 @@ export declare function recordAuthorizationRequested(args: Scope & {
|
|
|
180
276
|
store?: SessionLogStore;
|
|
181
277
|
kind: AuthorizationKind;
|
|
182
278
|
provider: string;
|
|
183
|
-
|
|
279
|
+
actorId: string;
|
|
184
280
|
authorizationId: string;
|
|
185
281
|
delivery: "private_link_sent" | "private_link_reused";
|
|
186
282
|
ttlMs: number;
|
|
@@ -190,7 +286,7 @@ export declare function recordAuthorizationCompleted(args: Scope & {
|
|
|
190
286
|
store?: SessionLogStore;
|
|
191
287
|
kind: AuthorizationKind;
|
|
192
288
|
provider: string;
|
|
193
|
-
|
|
289
|
+
actorId: string;
|
|
194
290
|
authorizationId: string;
|
|
195
291
|
ttlMs: number;
|
|
196
292
|
}): Promise<void>;
|
|
@@ -241,8 +337,26 @@ export declare function commitMessages(args: Scope & {
|
|
|
241
337
|
store?: SessionLogStore;
|
|
242
338
|
messages: PiMessage[];
|
|
243
339
|
ttlMs: number;
|
|
244
|
-
|
|
340
|
+
/** Explicit per-message provenance aligned one-to-one with `messages`. */
|
|
341
|
+
provenance?: PiMessageProvenance[];
|
|
342
|
+
/** Explicit provenance for the trailing newly committed messages. */
|
|
343
|
+
trailingMessageProvenance?: PiMessageProvenance[];
|
|
344
|
+
/** Default applied to the last new user message when no explicit array. */
|
|
345
|
+
newMessageProvenance?: PiMessageProvenance;
|
|
245
346
|
}): Promise<{
|
|
246
347
|
sessionId: string;
|
|
348
|
+
provenance: PiMessageProvenance[];
|
|
247
349
|
}>;
|
|
350
|
+
/** Build an instruction-provenance record for the given actor. */
|
|
351
|
+
export declare function instructionProvenanceFor(actor: Actor | undefined): PiMessageProvenance;
|
|
352
|
+
/** Unattributed ambient-context provenance for non-instruction Pi messages. */
|
|
353
|
+
export declare const contextProvenance: PiMessageProvenance;
|
|
354
|
+
/**
|
|
355
|
+
* Parse durably-stored message provenance, failing closed on misalignment.
|
|
356
|
+
*
|
|
357
|
+
* A missing field is a legacy record: it materializes as unauthored context of
|
|
358
|
+
* the expected length. A present-but-malformed or wrong-length value returns
|
|
359
|
+
* undefined so callers reject the record rather than zip a mismatched array.
|
|
360
|
+
*/
|
|
361
|
+
export declare function parseStoredMessageProvenance(value: unknown, expectedLength: number): PiMessageProvenance[] | undefined;
|
|
248
362
|
export {};
|