@agent-team-foundation/first-tree-hub 0.12.4 → 0.12.6
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/{bootstrap-C_K2CKXC.mjs → bootstrap-BCZC1ki6.mjs} +15 -5
- package/dist/cli/index.mjs +16 -14
- package/dist/{client-D1TDiik_-NV_lkhfI.mjs → client-B89AKi3Q-DAyGdQSq.mjs} +182 -86
- package/dist/{client-0RrgrMjR-CylTJGEb.mjs → client-GOgUQxVe-Dqk9oZf9.mjs} +2 -2
- package/dist/{dist-CMhywpXB.mjs → dist-xP6NpdMp.mjs} +146 -8
- package/dist/drizzle/0036_github_entity_chat_mappings.sql +47 -0
- package/dist/drizzle/0037_github_app_installations.sql +52 -0
- package/dist/drizzle/meta/_journal.json +14 -0
- package/dist/{feishu-tkZS0vvL.mjs → feishu-CsfadBKa.mjs} +1 -1
- package/dist/index.mjs +5 -5
- package/dist/{invitation-C299fxkP-CZRV665C.mjs → invitation-C299fxkP-DFBBuUcj.mjs} +1 -1
- package/dist/{saas-connect-S71rG182.mjs → saas-connect-RCN8zL5e.mjs} +1657 -411
- package/dist/web/assets/{index-RNegidl2.js → index-BHNq2Nl1.js} +1 -1
- package/dist/web/assets/index-BaLvRwAX.js +416 -0
- package/dist/web/assets/index-BdW7weV1.css +1 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/index-BG9RRx2e.js +0 -401
- package/dist/web/assets/index-CbOOQaWp.css +0 -1
|
@@ -45,6 +45,39 @@ function scanMentionTokens(content) {
|
|
|
45
45
|
return tokens;
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
|
+
* Derive the `chat_participants.mode` that a freshly inserted row MUST get,
|
|
49
|
+
* given the chat's `type` and the joining agent's `type`. This is the single
|
|
50
|
+
* authoritative rule for the invariant
|
|
51
|
+
*
|
|
52
|
+
* `(chat.type === 'group' && agent.type !== 'human') ⇒ mode === 'mention_only'`
|
|
53
|
+
*
|
|
54
|
+
* plus the legacy "agent-only direct chat" anti-echo rule. The helper is
|
|
55
|
+
* pure and synchronous; all DB lookups are the caller's responsibility (see
|
|
56
|
+
* `services/participant-mode.ts::addChatParticipants` for the canonical
|
|
57
|
+
* server entrypoint that wires it).
|
|
58
|
+
*
|
|
59
|
+
* Rule (encoded once, here):
|
|
60
|
+
*
|
|
61
|
+
* - `agent.type === 'human'` → 'full'
|
|
62
|
+
* - `chat.type === 'group'` (and agent is non-human) → 'mention_only'
|
|
63
|
+
* - `chat.type === 'direct'` + agent non-human:
|
|
64
|
+
* - if every other participant on this chat is also non-human →
|
|
65
|
+
* 'mention_only' (prevents the A↔B reply loop noted in migration
|
|
66
|
+
* 0029)
|
|
67
|
+
* - otherwise → 'full' (the peer is a human / external user, so the
|
|
68
|
+
* agent should listen to every message in this 1:1 line)
|
|
69
|
+
*
|
|
70
|
+
* `peerAgentTypes` is read only in the `direct` branch; callers may pass
|
|
71
|
+
* an empty array (or omit it) for `group` chats — it's ignored. Watcher /
|
|
72
|
+
* subscription-side `chat_subscriptions` rows are unaffected; the helper
|
|
73
|
+
* only governs the "speaking" mode column.
|
|
74
|
+
*/
|
|
75
|
+
function defaultParticipantMode(chatType, agentType, peerAgentTypes = []) {
|
|
76
|
+
if (agentType === "human") return "full";
|
|
77
|
+
if (chatType === "group" || chatType === "thread") return "mention_only";
|
|
78
|
+
return peerAgentTypes.every((t) => t !== "human") ? "mention_only" : "full";
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
48
81
|
* Single source of truth for "is this string safe to redirect to after a
|
|
49
82
|
* successful OAuth callback".
|
|
50
83
|
*
|
|
@@ -565,6 +598,30 @@ z.object({
|
|
|
565
598
|
expiresIn: z.number(),
|
|
566
599
|
command: z.string()
|
|
567
600
|
});
|
|
601
|
+
const githubEntityTypeSchema = z.enum([
|
|
602
|
+
"issue",
|
|
603
|
+
"pull_request",
|
|
604
|
+
"discussion",
|
|
605
|
+
"commit"
|
|
606
|
+
]);
|
|
607
|
+
const githubChatMetadataSchema = z.object({
|
|
608
|
+
source: z.literal("github"),
|
|
609
|
+
entityType: githubEntityTypeSchema,
|
|
610
|
+
entityKey: z.string().min(1),
|
|
611
|
+
entityUrl: z.string().url().optional()
|
|
612
|
+
});
|
|
613
|
+
const feishuChatMetadataSchema = z.object({
|
|
614
|
+
source: z.literal("feishu"),
|
|
615
|
+
externalChannelId: z.string().min(1)
|
|
616
|
+
});
|
|
617
|
+
const chatMetadataSchema = z.discriminatedUnion("source", [githubChatMetadataSchema, feishuChatMetadataSchema]);
|
|
618
|
+
/**
|
|
619
|
+
* `createChat` callers may not set metadata at all (admin-created group chats,
|
|
620
|
+
* me-chats, …), so the input schema accepts either an empty object or one of
|
|
621
|
+
* the typed variants. The empty `{}` arm is `.strict()` so a caller cannot
|
|
622
|
+
* sneak through `{ source: "github" }` without the required fields.
|
|
623
|
+
*/
|
|
624
|
+
const optionalChatMetadataSchema = z.union([z.object({}).strict(), chatMetadataSchema]);
|
|
568
625
|
const chatTypeSchema = z.enum([
|
|
569
626
|
"direct",
|
|
570
627
|
"group",
|
|
@@ -574,7 +631,7 @@ const createChatSchema = z.object({
|
|
|
574
631
|
type: chatTypeSchema,
|
|
575
632
|
topic: z.string().max(500).optional(),
|
|
576
633
|
participantIds: z.array(z.string()).min(1),
|
|
577
|
-
metadata:
|
|
634
|
+
metadata: optionalChatMetadataSchema.optional()
|
|
578
635
|
});
|
|
579
636
|
const chatParticipantSchema = z.object({
|
|
580
637
|
agentId: z.string(),
|
|
@@ -602,10 +659,17 @@ z.object({
|
|
|
602
659
|
firstMessagePreview: z.string().nullable()
|
|
603
660
|
});
|
|
604
661
|
const updateChatSchema = z.object({ topic: z.string().trim().max(500).nullable() });
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
662
|
+
/**
|
|
663
|
+
* Public API body for `POST /api/v1/agent/chats/:chatId/participants`.
|
|
664
|
+
* Phase 1 removed the `mode` field: participant mode is derived server-side
|
|
665
|
+
* from `(chats.type, agents.type)` via `services/participant-mode.ts` and
|
|
666
|
+
* cannot be overridden by the caller. The handler still inspects the raw
|
|
667
|
+
* body and rejects with `400 MODE_FIELD_DEPRECATED` if `mode` is present,
|
|
668
|
+
* so an out-of-tree caller that still sends it gets a clear error and a
|
|
669
|
+
* telemetry counter increments — see `chat-participant-mode-fix-design.md`
|
|
670
|
+
* §3.2 / §6.
|
|
671
|
+
*/
|
|
672
|
+
const addParticipantSchema = z.object({ agentId: z.string().min(1) });
|
|
609
673
|
z.object({ agentId: z.string().min(1) });
|
|
610
674
|
const clientStatusSchema = z.enum(["connected", "disconnected"]);
|
|
611
675
|
/**
|
|
@@ -789,6 +853,62 @@ const contextTreeSnapshotSchema = z.object({
|
|
|
789
853
|
edges: z.array(contextTreeEdgeSchema),
|
|
790
854
|
changes: z.array(contextTreeChangeSchema)
|
|
791
855
|
});
|
|
856
|
+
const githubAccountTypeSchema = z.enum(["User", "Organization"]);
|
|
857
|
+
const githubPermissionLevelSchema = z.enum([
|
|
858
|
+
"read",
|
|
859
|
+
"write",
|
|
860
|
+
"admin"
|
|
861
|
+
]);
|
|
862
|
+
/**
|
|
863
|
+
* `installation.permissions` blob from GitHub. Key is the permission name
|
|
864
|
+
* (`contents`, `pull_requests`, `issues`, `members`, …) — we keep this as a
|
|
865
|
+
* free-form `z.record` because GitHub adds new permission keys over time
|
|
866
|
+
* and we don't want a Hub-side `app_id` upgrade just to surface a new key
|
|
867
|
+
* in the integrations panel.
|
|
868
|
+
*/
|
|
869
|
+
const githubAppInstallationPermissionsSchema = z.record(z.string(), githubPermissionLevelSchema);
|
|
870
|
+
/**
|
|
871
|
+
* Subscribed event-name list, e.g. `["issues", "pull_request", "push"]`.
|
|
872
|
+
* Free-form for the same forward-compat reason as `permissions`.
|
|
873
|
+
*/
|
|
874
|
+
const githubAppInstallationEventsSchema = z.array(z.string());
|
|
875
|
+
z.object({
|
|
876
|
+
login: z.string().optional(),
|
|
877
|
+
accessToken: z.string().optional(),
|
|
878
|
+
accessTokenExpiresAt: z.string().datetime({ offset: true }).optional(),
|
|
879
|
+
refreshToken: z.string().optional(),
|
|
880
|
+
refreshTokenExpiresAt: z.string().datetime({ offset: true }).optional()
|
|
881
|
+
});
|
|
882
|
+
/**
|
|
883
|
+
* GET-side projection returned by the Hub admin API for the Integrations
|
|
884
|
+
* panel. Secrets are never echoed — only the metadata needed to render
|
|
885
|
+
* "you're connected as @octocat (Organization), 7 repos selected".
|
|
886
|
+
*
|
|
887
|
+
* `selectedRepoCount` is derived from a separate join (App webhook
|
|
888
|
+
* `installation_repositories` events update a children table not modeled
|
|
889
|
+
* here yet); included now so the panel's API shape is stable from the
|
|
890
|
+
* first ship.
|
|
891
|
+
*/
|
|
892
|
+
/**
|
|
893
|
+
* Body for `POST /orgs/:orgId/github-app-installation/claim` — manual
|
|
894
|
+
* recovery for an installation row that ended up unbound (codex P1-5 + H1).
|
|
895
|
+
* The orphan-reclaim sweep at sign-in auto-claims the single-orphan case;
|
|
896
|
+
* this endpoint backs the Settings "Claim install" buttons when there's
|
|
897
|
+
* more than one (or the account is an org, where auto-claim is too risky).
|
|
898
|
+
*/
|
|
899
|
+
const githubAppInstallationClaimBodySchema = z.object({ installationId: z.number().int().positive() });
|
|
900
|
+
z.object({
|
|
901
|
+
installationId: z.number().int().positive(),
|
|
902
|
+
accountType: githubAccountTypeSchema,
|
|
903
|
+
accountLogin: z.string(),
|
|
904
|
+
accountGithubId: z.number().int().positive(),
|
|
905
|
+
permissions: githubAppInstallationPermissionsSchema,
|
|
906
|
+
events: githubAppInstallationEventsSchema,
|
|
907
|
+
suspended: z.boolean(),
|
|
908
|
+
manageUrl: z.string().url(),
|
|
909
|
+
createdAt: z.string().datetime({ offset: true }),
|
|
910
|
+
updatedAt: z.string().datetime({ offset: true })
|
|
911
|
+
});
|
|
792
912
|
const supportedImageMimeSchema = z.enum([
|
|
793
913
|
"image/png",
|
|
794
914
|
"image/jpeg",
|
|
@@ -1175,18 +1295,36 @@ const notificationQuerySchema = z.object({
|
|
|
1175
1295
|
const githubStartQuerySchema = z.object({ next: z.string().max(256).optional() });
|
|
1176
1296
|
const githubCallbackQuerySchema = z.object({
|
|
1177
1297
|
code: z.string().min(1),
|
|
1178
|
-
state: z.string().min(1)
|
|
1298
|
+
state: z.string().min(1),
|
|
1299
|
+
installation_id: z.string().regex(/^\d+$/).optional(),
|
|
1300
|
+
setup_action: z.enum([
|
|
1301
|
+
"install",
|
|
1302
|
+
"update",
|
|
1303
|
+
"request"
|
|
1304
|
+
]).optional()
|
|
1179
1305
|
});
|
|
1180
1306
|
/**
|
|
1181
1307
|
* Dev-only callback to bypass the GitHub round-trip — sign in as a stub
|
|
1182
1308
|
* Github user. Gated by NODE_ENV !== 'production'; production always 404s.
|
|
1309
|
+
*
|
|
1310
|
+
* The App-flow extension fields (`installationId`, `installationAccountType`,
|
|
1311
|
+
* `installationAccountLogin`, `installationAccountGithubId`) let the dev
|
|
1312
|
+
* flow simulate a GitHub App install in the same redirect — when present
|
|
1313
|
+
* they stub a `github_app_installations` row before the OAuth flow
|
|
1314
|
+
* completes, so the rest of the dev session can exercise the App-bound
|
|
1315
|
+
* code paths (Settings → Integrations panel, webhook routing) without a
|
|
1316
|
+
* real install. Missing → legacy OAuth-only dev flow.
|
|
1183
1317
|
*/
|
|
1184
1318
|
const githubDevCallbackQuerySchema = z.object({
|
|
1185
1319
|
githubId: z.string().min(1),
|
|
1186
1320
|
login: z.string().min(1),
|
|
1187
1321
|
email: z.string().email().optional(),
|
|
1188
1322
|
displayName: z.string().optional(),
|
|
1189
|
-
next: z.string().max(256).optional()
|
|
1323
|
+
next: z.string().max(256).optional(),
|
|
1324
|
+
installationId: z.string().regex(/^\d+$/).optional(),
|
|
1325
|
+
installationAccountType: z.enum(["User", "Organization"]).optional(),
|
|
1326
|
+
installationAccountLogin: z.string().min(1).optional(),
|
|
1327
|
+
installationAccountGithubId: z.string().regex(/^\d+$/).optional()
|
|
1190
1328
|
});
|
|
1191
1329
|
/**
|
|
1192
1330
|
* Per-organization settings — schemas, namespaces, and the registry that
|
|
@@ -1582,4 +1720,4 @@ z.object({
|
|
|
1582
1720
|
capabilities: serverCapabilitiesSchema.optional()
|
|
1583
1721
|
}).passthrough();
|
|
1584
1722
|
//#endregion
|
|
1585
|
-
export {
|
|
1723
|
+
export { questionMessageContentSchema as $, delegateFeishuUserSchema as A, inboxPollQuerySchema as B, createAgentSchema as C, createOrgFromMeSchema as D, createMemberSchema as E, githubDevCallbackQuerySchema as F, listMeChatsQuerySchema as G, isRedactedEnvValue as H, githubStartQuerySchema as I, notificationQuerySchema as J, loginSchema as K, imageInlineContentSchema as L, extractMentions as M, githubAppInstallationClaimBodySchema as N, defaultParticipantMode as O, githubCallbackQuerySchema as P, questionAnswerMessageContentSchema as Q, inboxAckFrameSchema as R, createAdapterMappingSchema as S, wsAuthFrameSchema as St, createMeChatSchema as T, isReservedAgentName as U, isOrgSettingNamespace as V, joinByInvitationSchema as W, paginationQuerySchema as X, onboardingEventSchema as Y, patchOnboardingSchema as Z, clientCapabilitiesSchema as _, updateAgentSchema as _t, AGENT_VISIBILITY as a, selfServiceFeishuBotSchema as at, contextTreeSnapshotSchema as b, updateMemberSchema as bt, ORG_SETTINGS_NAMESPACES as c, sessionCompletionMessageSchema as ct, addParticipantSchema as d, sessionReconcileRequestSchema as dt, rebindAgentSchema as et, agentBindRequestSchema as f, sessionStateMessageSchema as ft, chatMetadataSchema as g, updateAgentRuntimeConfigSchema as gt, agentTypeSchema as h, updateAdapterConfigSchema as ht, AGENT_STATUSES as i, scanMentionTokens as it, dryRunAgentRuntimeConfigSchema as j, defaultRuntimeConfigPayload as k, WS_AUTH_FRAME_TIMEOUT_MS as l, sessionEventMessageSchema as lt, agentRuntimeConfigPayloadSchema as m, submitQuestionAnswerSchema as mt, AGENT_NAME_REGEX as n, runtimeStateMessageSchema as nt, DEFAULT_RUNTIME_PROVIDER as o, sendMessageSchema as ot, agentPinnedMessageSchema as p, stripCode as pt, messageSourceSchema as q, AGENT_SELECTOR_HEADER as r, safeRedirectPath as rt, MENTION_REGEX as s, sendToAgentSchema as st, AGENT_BIND_REJECT_REASONS as t, refreshTokenSchema as tt, addMeChatParticipantsSchema as u, sessionEventSchema as ut, clientRegisterSchema as v, updateChatSchema as vt, createChatSchema as w, createAdapterConfigSchema as x, updateOrganizationSchema as xt, connectTokenExchangeSchema as y, updateClientCapabilitiesSchema as yt, inboxDeliverFrameSchema as z };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
-- GitHub webhook → chat clustering (Phase 0).
|
|
2
|
+
-- Maps every (organization, human_agent, delegate_agent, entity) tuple to a
|
|
3
|
+
-- single chat. Replaces the legacy "one (human, delegate) chat absorbs every
|
|
4
|
+
-- GitHub event" behaviour — see docs webhook-routing-design.md §4 for the
|
|
5
|
+
-- background and §4.3 for the data-model decision.
|
|
6
|
+
--
|
|
7
|
+
-- The composite primary key is also the uniqueness constraint we rely on for
|
|
8
|
+
-- concurrent webhook safety: two near-simultaneous events for a brand-new
|
|
9
|
+
-- entity hit ON CONFLICT DO NOTHING and the second deliverer falls back to a
|
|
10
|
+
-- re-SELECT, so the pair never spawns duplicate chats.
|
|
11
|
+
--
|
|
12
|
+
-- ON DELETE CASCADE on agent / chat columns: a deleted agent or chat must
|
|
13
|
+
-- drop its mapping rows. We do NOT cascade from organizations because that
|
|
14
|
+
-- relationship is enforced via the agent FKs already.
|
|
15
|
+
--
|
|
16
|
+
-- This table is GitHub-specific. Future external sources (Linear, Slack
|
|
17
|
+
-- channel events, …) get their own table — their entity models differ
|
|
18
|
+
-- enough that a generic table would slide back into untyped jsonb.
|
|
19
|
+
--
|
|
20
|
+
-- Migration 0036 is hand-written to match the team's recent migration
|
|
21
|
+
-- workflow — drizzle-kit generate's snapshot metadata is incomplete pre-0019
|
|
22
|
+
-- and refuses to diff (same constraint that 0032's commit message called out).
|
|
23
|
+
|
|
24
|
+
CREATE TABLE IF NOT EXISTS "github_entity_chat_mappings" (
|
|
25
|
+
"organization_id" text NOT NULL,
|
|
26
|
+
"human_agent_id" text NOT NULL,
|
|
27
|
+
"delegate_agent_id" text NOT NULL,
|
|
28
|
+
"entity_type" text NOT NULL,
|
|
29
|
+
"entity_key" text NOT NULL,
|
|
30
|
+
"chat_id" text NOT NULL,
|
|
31
|
+
"bound_at" timestamp with time zone NOT NULL DEFAULT now(),
|
|
32
|
+
"bound_via" text NOT NULL,
|
|
33
|
+
CONSTRAINT "github_entity_chat_mappings_pkey"
|
|
34
|
+
PRIMARY KEY ("organization_id", "human_agent_id", "delegate_agent_id", "entity_type", "entity_key"),
|
|
35
|
+
CONSTRAINT "github_entity_chat_mappings_organization_id_organizations_id_fk"
|
|
36
|
+
FOREIGN KEY ("organization_id") REFERENCES "organizations"("id"),
|
|
37
|
+
CONSTRAINT "github_entity_chat_mappings_human_agent_id_agents_uuid_fk"
|
|
38
|
+
FOREIGN KEY ("human_agent_id") REFERENCES "agents"("uuid") ON DELETE CASCADE,
|
|
39
|
+
CONSTRAINT "github_entity_chat_mappings_delegate_agent_id_agents_uuid_fk"
|
|
40
|
+
FOREIGN KEY ("delegate_agent_id") REFERENCES "agents"("uuid") ON DELETE CASCADE,
|
|
41
|
+
CONSTRAINT "github_entity_chat_mappings_chat_id_chats_id_fk"
|
|
42
|
+
FOREIGN KEY ("chat_id") REFERENCES "chats"("id") ON DELETE CASCADE
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
--> statement-breakpoint
|
|
46
|
+
CREATE INDEX IF NOT EXISTS "idx_github_entity_chat_mappings_chat"
|
|
47
|
+
ON "github_entity_chat_mappings" ("chat_id");
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
-- GitHub App installation registry. See packages/server/src/db/schema/github-app-installations.ts
|
|
2
|
+
-- for the Drizzle types, and docs/github-app-design-zh.md for the design rationale.
|
|
3
|
+
--
|
|
4
|
+
-- One row per (GitHub account ↔ Hub team) binding. Replaces the per-repo
|
|
5
|
+
-- OAuth + webhook-secret model that lived in
|
|
6
|
+
-- `organization_settings.github_integration.webhookSecretCipher` — both
|
|
7
|
+
-- coexist during the transition, the old path is dropped in a later PR
|
|
8
|
+
-- (D3 hard cut, design doc §7 step 7).
|
|
9
|
+
--
|
|
10
|
+
-- Per the team's "integrity in service layer" convention, NO foreign-key
|
|
11
|
+
-- constraints on hub_organization_id beyond the optional reference — the
|
|
12
|
+
-- 1:1 binding (D2 / §8 Q1) is enforced by a UNIQUE INDEX rather than by
|
|
13
|
+
-- ON DELETE CASCADE so deleting a Hub org doesn't tombstone the
|
|
14
|
+
-- GitHub-side record (which still exists upstream).
|
|
15
|
+
|
|
16
|
+
CREATE TABLE IF NOT EXISTS "github_app_installations" (
|
|
17
|
+
"id" text PRIMARY KEY NOT NULL,
|
|
18
|
+
"installation_id" bigint NOT NULL,
|
|
19
|
+
"account_type" text NOT NULL,
|
|
20
|
+
"account_login" text NOT NULL,
|
|
21
|
+
"account_github_id" bigint NOT NULL,
|
|
22
|
+
"hub_organization_id" text,
|
|
23
|
+
"permissions" jsonb NOT NULL,
|
|
24
|
+
"events" jsonb NOT NULL,
|
|
25
|
+
"suspended_at" timestamp with time zone,
|
|
26
|
+
"created_at" timestamp with time zone NOT NULL DEFAULT now(),
|
|
27
|
+
"updated_at" timestamp with time zone NOT NULL DEFAULT now(),
|
|
28
|
+
CONSTRAINT "ck_github_app_installations_account_type"
|
|
29
|
+
CHECK ("account_type" IN ('User', 'Organization'))
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
--> statement-breakpoint
|
|
33
|
+
DO $$ BEGIN
|
|
34
|
+
ALTER TABLE "github_app_installations"
|
|
35
|
+
ADD CONSTRAINT "github_app_installations_hub_organization_id_organizations_id_fk"
|
|
36
|
+
FOREIGN KEY ("hub_organization_id") REFERENCES "organizations"("id")
|
|
37
|
+
ON DELETE SET NULL ON UPDATE NO ACTION;
|
|
38
|
+
EXCEPTION
|
|
39
|
+
WHEN duplicate_object THEN null;
|
|
40
|
+
END $$;
|
|
41
|
+
|
|
42
|
+
--> statement-breakpoint
|
|
43
|
+
CREATE UNIQUE INDEX IF NOT EXISTS "uq_github_app_installations_installation_id"
|
|
44
|
+
ON "github_app_installations" ("installation_id");
|
|
45
|
+
|
|
46
|
+
--> statement-breakpoint
|
|
47
|
+
CREATE UNIQUE INDEX IF NOT EXISTS "uq_github_app_installations_hub_org"
|
|
48
|
+
ON "github_app_installations" ("hub_organization_id");
|
|
49
|
+
|
|
50
|
+
--> statement-breakpoint
|
|
51
|
+
CREATE INDEX IF NOT EXISTS "idx_github_app_installations_account"
|
|
52
|
+
ON "github_app_installations" ("account_github_id");
|
|
@@ -253,6 +253,20 @@
|
|
|
253
253
|
"when": 1778457600000,
|
|
254
254
|
"tag": "0035_drop_hub_tasks",
|
|
255
255
|
"breakpoints": true
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"idx": 36,
|
|
259
|
+
"version": "7",
|
|
260
|
+
"when": 1778544000000,
|
|
261
|
+
"tag": "0036_github_entity_chat_mappings",
|
|
262
|
+
"breakpoints": true
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"idx": 37,
|
|
266
|
+
"version": "7",
|
|
267
|
+
"when": 1778803200000,
|
|
268
|
+
"tag": "0037_github_app_installations",
|
|
269
|
+
"breakpoints": true
|
|
256
270
|
}
|
|
257
271
|
]
|
|
258
272
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as __exportAll } from "./chunk-BSw8zbkd.mjs";
|
|
2
2
|
import { t as cliFetch } from "./cli-fetch--tiwKm5S.mjs";
|
|
3
|
-
import { r as AGENT_SELECTOR_HEADER } from "./dist-
|
|
3
|
+
import { r as AGENT_SELECTOR_HEADER } from "./dist-xP6NpdMp.mjs";
|
|
4
4
|
//#region src/core/feishu.ts
|
|
5
5
|
var feishu_exports = /* @__PURE__ */ __exportAll({
|
|
6
6
|
bindFeishuBot: () => bindFeishuBot,
|
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "./observability-BAScT_5S-BcW9HgkG.mjs";
|
|
2
|
-
import { A as checkDocker, B as isServiceSupported, E as checkAgentConfigs, F as checkWebSocket, G as uninstallClientService, H as restartClientService, I as printResults, J as stopPostgres, K as ensurePostgres, M as checkServerConfig, N as checkServerHealth, O as checkClientConfig, P as checkServerReachable, R as getClientServiceStatus, S as runHomeMigration, T as runMigrations, U as startClientService, V as resolveCliInvocation, W as stopClientService, X as handleClientOrgMismatch, Y as ClientRuntime, Z as rotateClientIdWithBackup, _ as formatCheckReport, b as onboardCreate,
|
|
2
|
+
import { A as checkDocker, B as isServiceSupported, E as checkAgentConfigs, F as checkWebSocket, G as uninstallClientService, H as restartClientService, I as printResults, J as stopPostgres, K as ensurePostgres, M as checkServerConfig, N as checkServerHealth, O as checkClientConfig, P as checkServerReachable, R as getClientServiceStatus, S as runHomeMigration, T as runMigrations, U as startClientService, V as resolveCliInvocation, W as stopClientService, X as handleClientOrgMismatch, Y as ClientRuntime, Z as rotateClientIdWithBackup, _ as formatCheckReport, b as onboardCreate, d as startServer, g as promptMissingFields, h as promptAddAgent, j as checkNodeVersion, k as checkDatabase, lt as FirstTreeHubSDK, m as isInteractive, n as deriveHubUrlFromToken, nt as hasUser, q as isDockerAvailable, t as HubUrlDerivationError, tt as createOwner, ut as SdkError, y as onboardCheck, z as installClientService } from "./saas-connect-RCN8zL5e.mjs";
|
|
3
3
|
import "./logger-core-BTmvdflj-DjW8FM4T.mjs";
|
|
4
|
-
import { a as ensureFreshAdminToken, c as resolveServerUrl, i as ensureFreshAccessToken, n as AuthRefreshRateLimitedError, s as resolveAccessToken, t as AuthRefreshFailedError } from "./bootstrap-
|
|
4
|
+
import { a as ensureFreshAdminToken, c as resolveServerUrl, i as ensureFreshAccessToken, n as AuthRefreshRateLimitedError, s as resolveAccessToken, t as AuthRefreshFailedError } from "./bootstrap-BCZC1ki6.mjs";
|
|
5
5
|
import { i as blank, s as status } from "./cli-fetch--tiwKm5S.mjs";
|
|
6
|
-
import "./dist-
|
|
7
|
-
import { n as bindFeishuUser, t as bindFeishuBot } from "./feishu-
|
|
6
|
+
import "./dist-xP6NpdMp.mjs";
|
|
7
|
+
import { n as bindFeishuUser, t as bindFeishuBot } from "./feishu-CsfadBKa.mjs";
|
|
8
8
|
import "./errors-CF5evtJt-B0NTIVPt.mjs";
|
|
9
9
|
import "./src-DNBS5Yjj.mjs";
|
|
10
|
-
import "./client-
|
|
10
|
+
import "./client-B89AKi3Q-DAyGdQSq.mjs";
|
|
11
11
|
import "./invitation-Bg0TRiyx-BsZH4GCS.mjs";
|
|
12
12
|
export { AuthRefreshFailedError, AuthRefreshRateLimitedError, ClientRuntime, FirstTreeHubSDK, HubUrlDerivationError, SdkError, bindFeishuBot, bindFeishuUser, blank, checkAgentConfigs, checkClientConfig, checkDatabase, checkDocker, checkNodeVersion, checkServerConfig, checkServerHealth, checkServerReachable, checkWebSocket, createOwner, deriveHubUrlFromToken, ensureFreshAccessToken, ensureFreshAdminToken, ensurePostgres, formatCheckReport, getClientServiceStatus, handleClientOrgMismatch, hasUser, installClientService, isDockerAvailable, isInteractive, isServiceSupported, onboardCheck, onboardCreate, printResults, promptAddAgent, promptMissingFields, resolveAccessToken, resolveCliInvocation, resolveServerUrl, restartClientService, rotateClientIdWithBackup, runHomeMigration, runMigrations, startClientService, startServer, status, stopClientService, stopPostgres, uninstallClientService };
|