@agent-team-foundation/first-tree-hub 0.12.5 → 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 +7 -7
- package/dist/{client-DL5vHhvQ-CnYGq2x-.mjs → client-B89AKi3Q-DAyGdQSq.mjs} +161 -84
- package/dist/{client-DSM_opoz-BH5eegXb.mjs → client-GOgUQxVe-Dqk9oZf9.mjs} +2 -2
- package/dist/{dist-BwPlBZWi.mjs → dist-xP6NpdMp.mjs} +121 -7
- package/dist/drizzle/0037_github_app_installations.sql +52 -0
- package/dist/drizzle/meta/_journal.json +7 -0
- package/dist/{feishu-CKGzIamp.mjs → feishu-CsfadBKa.mjs} +1 -1
- package/dist/index.mjs +5 -5
- package/dist/{invitation-C299fxkP-Dts66QTU.mjs → invitation-C299fxkP-DFBBuUcj.mjs} +1 -1
- package/dist/{saas-connect-DYjvx5yr.mjs → saas-connect-RCN8zL5e.mjs} +1158 -183
- package/dist/web/assets/{index-Dyo6TAWC.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-BXDLOc-s.js +0 -406
- package/dist/web/assets/index-CbOOQaWp.css +0 -1
|
@@ -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");
|
|
@@ -260,6 +260,13 @@
|
|
|
260
260
|
"when": 1778544000000,
|
|
261
261
|
"tag": "0036_github_entity_chat_mappings",
|
|
262
262
|
"breakpoints": true
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"idx": 37,
|
|
266
|
+
"version": "7",
|
|
267
|
+
"when": 1778803200000,
|
|
268
|
+
"tag": "0037_github_app_installations",
|
|
269
|
+
"breakpoints": true
|
|
263
270
|
}
|
|
264
271
|
]
|
|
265
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, 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-
|
|
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 };
|