Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions TERMINOLOGY.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Canonical words used across Junior's code and documentation.
- **Sandbox**: an isolated execution environment for a run or snapshot build.
- **Conversation**: the durable container for visible history and execution
state, identified by a globally unique `conversationId`.
- **Source**: where an inbound event came from, such as Slack, local CLI, web
(dashboard), scheduler, or plugin dispatch.
- **Source**: where an inbound event came from, such as Slack, the Junior
Conversation API, local CLI, scheduler, or plugin dispatch.
- **Destination**: where Junior sends output or side effects.
- **Location**: the optional provider container associated with a conversation,
identified by Junior and provider ids. Conversation visibility is separate.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function mailboxMessageFromOutbox(
messageId: message.messageId,
receivedAt: message.createdAt,
role: "user",
source: "web",
source: "api",
text: message.message,
};
}
Expand All @@ -72,7 +72,9 @@ export function mergeConversationMailboxMessages(
const outboxMessages = outbox ?? [];
let next: readonly ConversationMailboxMessage[] = serverMessages;
if (outboxMessages.length > 0) {
const serverIds = new Set(serverMessages.map((message) => message.messageId));
const serverIds = new Set(
serverMessages.map((message) => message.messageId),
);
const extras = outboxMessages
.filter((message) => !serverIds.has(message.messageId))
.map(mailboxMessageFromOutbox);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const memoryRecordSchema = z
kind: z.enum(["preference", "procedure", "knowledge"]),
observedAt: z.iso.datetime(),
origin: z.enum(["automatic", "explicit", "other"]),
sourcePlatform: z.enum(["local", "slack", "web"]),
sourcePlatform: z.enum(["junior", "local", "slack", "web"]),
visibility: z.enum(["private", "public"]),
})
.strict();
Expand Down
2 changes: 1 addition & 1 deletion packages/junior-dashboard/src/client/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export type TranscriptViewMessage = {
failureReason?: ConversationTurnFailureReason;
parts: TranscriptViewPart[];
role: "assistant" | "system" | "tool" | "user";
source?: "slack" | "web";
source?: "api" | "slack" | "web";
sourceSeq: number;
timestamp?: number;
};
Expand Down
12 changes: 7 additions & 5 deletions packages/junior-dashboard/src/mock-reporting/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,7 @@ export function readMockConversationPendingMessages(
messageId: `${conversationId}:pending-defer`,
receivedAt: iso(nowMs, -3_500),
role: "user" as const,
source: "web" as const,
source: "api" as const,
text: "Keep the reply in Junior. I will paste the dashboard link next.",
},
{
Expand All @@ -1535,7 +1535,7 @@ export function readMockConversationPendingMessages(
messageId: `${conversationId}:pending-third`,
receivedAt: iso(nowMs, -2_500),
role: "user" as const,
source: "web" as const,
source: "api" as const,
text: "Third queued message.",
},
{
Expand All @@ -1546,7 +1546,7 @@ export function readMockConversationPendingMessages(
messageId: `${conversationId}:pending-fourth`,
receivedAt: iso(nowMs, -1_500),
role: "user" as const,
source: "web" as const,
source: "api" as const,
text: "Fourth queued message.",
},
{
Expand All @@ -1557,7 +1557,7 @@ export function readMockConversationPendingMessages(
messageId: `${conversationId}:pending-fifth`,
receivedAt: iso(nowMs, -500),
role: "user" as const,
source: "web" as const,
source: "api" as const,
text: "Fifth queued message.",
},
]
Expand Down Expand Up @@ -1913,7 +1913,9 @@ export function readMockPeoplePluginReports(
}

/** Build mock person-scoped code activity for local profile QA. */
export function readMockPeopleCode(email: string): CodePersonReport | undefined {
export function readMockPeopleCode(
email: string,
): CodePersonReport | undefined {
const directory = readMockPeopleDirectory();
const person = directory.people.find(
(entry) => entry.actor.email.toLowerCase() === email.trim().toLowerCase(),
Expand Down
4 changes: 2 additions & 2 deletions packages/junior-dashboard/tests/conversation-outbox.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe("conversation outbox", () => {
messageId: "accepted-1",
receivedAt: "2026-01-01T00:00:00.000Z",
role: "user" as const,
source: "web" as const,
source: "api" as const,
text: "queued",
},
];
Expand All @@ -103,7 +103,7 @@ describe("conversation outbox", () => {
messageId: "accepted-1",
receivedAt: "2026-01-01T00:00:00.000Z",
role: "user" as const,
source: "web" as const,
source: "api" as const,
text: "queued",
},
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function message(
messageId: "accepted-1",
receivedAt: new Date(1_000).toISOString(),
role: "user",
source: "web",
source: "api",
text: "queued",
...overrides,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function pending(
messageId: "msg-pending-1",
receivedAt: new Date(2_000).toISOString(),
role: "user",
source: "web",
source: "api",
text: "still in the mailbox",
...overrides,
};
Expand Down Expand Up @@ -73,7 +73,7 @@ describe("pending mailbox transcript merge", () => {
expect(messages[1]).toMatchObject({
delivery: "defer",
pending: true,
source: "web",
source: "api",
parts: [{ type: "text", text: "still in the mailbox" }],
});
});
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE "junior_memory_memories" DROP CONSTRAINT "junior_memory_memories_source_platform_check";--> statement-breakpoint
ALTER TABLE "junior_memory_memories" ADD CONSTRAINT "junior_memory_memories_source_platform_check" CHECK ("junior_memory_memories"."source_platform" IN ('junior', 'slack', 'local', 'web'));
Loading
Loading