Merge master and renumber GitHub App setup migration

This commit is contained in:
Dotta committed 2026-10-07 07:11:26 -05:00
commit cf48352c85
79 files changed
+5008 -227

No files matched your search

+15
View File
@@ -1,5 +1,6 @@
import type {
AskUserQuestionsQuestion,
PaperclipQuestionSetPayload,
ConnectionSearchResultItem,
} from "./types/index.js";
import {
@@ -338,6 +339,20 @@ export function aggregatorProviderQuestion(
};
}
/** Native question form, preserving the exact saved-answer authorization contract. */
export function aggregatorProviderQuestionSet(question: AskUserQuestionsQuestion): PaperclipQuestionSetPayload {
return {
schema: "paperclip.question_set.v1",
questions: [{
id: question.id,
prompt: question.prompt,
required: true,
answerMode: "single_select",
options: question.options.map(({ id, label, description }) => ({ id, label, ...(description != null ? { description } : {}) })),
}],
};
}
export function aggregatorContinuationInstruction(
provider: RemoteMcpConnectorId,
targetName: string,
+9
View File
@@ -964,6 +964,8 @@ export type {
SetupTokenTransportAdvisoryCode,
AssetImage,
Project,
ProjectAccessMember,
ProjectAccessSubjectType,
ProjectDiscoverySummary,
ProjectDiscoveryPage,
ProjectBudgetSummary,
@@ -973,6 +975,7 @@ export type {
ProjectCodebaseOrigin,
ProjectGoalRef,
ProjectManagedByPlugin,
ProjectVisibility,
ProjectWorkspace,
CompanySearchCountType,
CompanySearchExtractIssueResult,
@@ -1101,6 +1104,12 @@ export type {
ExternalObjectSummaryItem,
CompactIssue,
Issue,
IssueVisibility,
IssueAccessGrant,
IssueAccessGrantAgentVisibility,
IssueAccessGrantSubjectType,
IssueAccessGrantSource,
IssueLockedStub,
IssueChangeReceiptEntry,
IssueChanges,
IssueAssigneeAdapterOverrides,
@@ -1,6 +1,6 @@
import type { ConnectionIntentInteraction } from "./issue.js";
import type { ToolConnection } from "./tool-access.js";
import type { AskUserQuestionsQuestion } from "./issue.js";
import type { AskUserQuestionsQuestion, PaperclipQuestionSetPayload } from "./issue.js";
import type { RemoteMcpConnectorId } from "../remote-mcp-connectors.js";
export type ConnectionAvailabilityState =
@@ -44,6 +44,8 @@ export interface ConnectionsSearchResult {
/** Paperclip-authored next step; provider content must never supply this field. */
instruction?: string;
providerQuestion?: AskUserQuestionsQuestion;
/** Canonical native form of the same provider choice; IDs and disclosure are identical. */
providerQuestionSet?: PaperclipQuestionSetPayload;
selectionInteractionId?: string;
}
+6
View File
@@ -158,6 +158,8 @@ export interface HeartbeatRun {
id: string;
companyId: string;
agentId: string;
scopeKind: "company" | "issue";
issueId: string | null;
invocationSource: HeartbeatInvocationSource;
triggerDetail: WakeupTriggerDetail | null;
status: HeartbeatRunStatus;
@@ -222,6 +224,10 @@ export interface HeartbeatRun {
contextSnapshot: Record<string, unknown> | null;
createdAt: Date;
updatedAt: Date;
/** Metadata-only company-list row for a run bound to an unreadable private issue. */
redacted?: boolean;
durationMs?: number | null;
costUsd?: number | null;
outputSilence?: HeartbeatRunOutputSilence;
/**
* Ephemeral, process-local current status message for an active run. Resolved
+22 -1
View File
@@ -352,7 +352,22 @@ export type {
DocumentTextRange,
UpdateDocumentAnnotationThreadRequest,
} from "./document-annotation.js";
export type { Project, ProjectDiscoverySummary, ProjectDiscoveryPage, ProjectRepository, ProjectRepositoryOptions, ProjectBudgetSummary, ProjectCodebase, ProjectCodebaseOrigin, ProjectGoalRef, ProjectManagedByPlugin, ProjectWorkspace } from "./project.js";
export type {
Project,
ProjectRepository,
ProjectRepositoryOptions,
ProjectAccessMember,
ProjectAccessSubjectType,
ProjectDiscoverySummary,
ProjectDiscoveryPage,
ProjectBudgetSummary,
ProjectCodebase,
ProjectCodebaseOrigin,
ProjectGoalRef,
ProjectManagedByPlugin,
ProjectVisibility,
ProjectWorkspace,
} from "./project.js";
export type {
CompanySearchCountType,
CompanySearchExtractIssueResult,
@@ -664,6 +679,12 @@ export type {
IssueSubtreeDiagnosticNode,
IssueSubtreeDiagnosticEdge,
IssueSubtreeDiagnosticsResponse,
IssueVisibility,
IssueAccessGrant,
IssueAccessGrantAgentVisibility,
IssueAccessGrantSubjectType,
IssueAccessGrantSource,
IssueLockedStub,
IssueBlockerAttention,
IssueBlockerAttentionIssueSummary,
IssueBlockerAttentionReason,
+42
View File
@@ -46,6 +46,41 @@ import type {
export type { IssueWorkMode };
export type IssueVisibility = "open" | "private";
export type IssueAccessGrantSubjectType = "user" | "agent";
export type IssueAccessGrantSource = "explicit" | "assignment" | "project" | "owner";
export type IssueAccessGrantAgentVisibility = "discoverable" | "private";
export interface IssueAccessGrant {
id: string;
issueId: string;
subjectType: IssueAccessGrantSubjectType;
subjectId: string;
source: IssueAccessGrantSource;
/** Effective access inherited from a parent or private project; not revocable here. */
inherited?: boolean;
grantedByUserId: string | null;
grantedByAgentId: string | null;
createdAt: Date;
revokedAt: Date | null;
subjectDisplayName: string | null;
subjectAvatarUrl: string | null;
subjectInitials: string | null;
agentVisibility: IssueAccessGrantAgentVisibility | null;
}
/**
* Existence-only projection used when a readable issue references an issue the
* current principal cannot read. Edge projections may return this exact shape
* in place of an IssueRelationIssueSummary; direct reads and list/search rows
* never return locked stubs.
*/
export interface IssueLockedStub {
id: string;
identifier: string | null;
locked: true;
}
export interface IssueAncestorProject {
id: string;
name: string;
@@ -792,6 +827,11 @@ export interface Issue {
projectWorkspaceId: string | null;
goalId: string | null;
parentId: string | null;
/** Present on current API responses; optional for compatibility with older plugin payloads. */
visibility?: IssueVisibility;
privacyRootIssueId?: string | null;
/** Immediate task from which private access flows downward, including chat handoffs. */
privacyParentIssueId?: string | null;
ancestors?: IssueAncestor[];
title: string;
description: string | null;
@@ -884,6 +924,8 @@ export type CompactIssue = Pick<
| "projectWorkspaceId"
| "goalId"
| "parentId"
| "visibility"
| "privacyRootIssueId"
| "title"
| "description"
| "status"
+19
View File
@@ -8,6 +8,19 @@ import type { AgentEnvConfig } from "./secrets.js";
export type ProjectWorkspaceSourceType = "local_path" | "git_repo" | "remote_managed" | "non_git_path";
export type ProjectWorkspaceVisibility = "default" | "advanced";
export type ProjectVisibility = "open" | "private";
export type ProjectAccessSubjectType = "user" | "agent";
export interface ProjectAccessMember {
id: string;
companyId: string;
projectId: string;
subjectType: ProjectAccessSubjectType;
subjectId: string;
subjectDisplayName: string | null;
subjectAvatarUrl: string | null;
createdAt: Date;
}
export interface ProjectGoalRef {
id: string;
@@ -98,6 +111,12 @@ export interface Project {
goals: ProjectGoalRef[];
name: string;
description: string | null;
/** Omitted by older servers/fixtures; clients must treat omission as open. */
visibility?: ProjectVisibility;
/** Present only for the lazily-created per-user "My private tasks" project. */
personalOwnerUserId?: string | null;
/** Only this user and administrators may change the project audience. */
privacyOwnerUserId?: string | null;
status: ProjectStatus;
leadAgentId: string | null;
targetDate: string | null;