@agent-team-foundation/first-tree-hub 0.11.0 → 0.11.2
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-DUeYbwm-.mjs → bootstrap-B-FRMuvL.mjs} +13 -3
- package/dist/chunk-BSw8zbkd.mjs +37 -0
- package/dist/cli/index.mjs +94 -35
- package/dist/client-By1K4VVT-nVOhsXBy.mjs +4 -0
- package/dist/client-CLdRbuml-B416INrm.mjs +524 -0
- package/dist/dist-BLY7Bu-l.mjs +430 -0
- package/dist/{dist-BoHl9HwW.mjs → dist-FuUBFTEB.mjs} +100 -22
- package/dist/drizzle/0031_drop_system_configs.sql +11 -0
- package/dist/drizzle/meta/_journal.json +7 -0
- package/dist/errors-BmyRwN0Y-CIZZ_sDc.mjs +92 -0
- package/dist/{esm-CYu4tXXn.mjs → esm-iadMkGbV.mjs} +2 -37
- package/dist/execAsync-CCyouKZM.mjs +10 -0
- package/dist/{execAsync-XMc-nFn-.mjs → execAsync-pImxPKN5.mjs} +1 -1
- package/dist/{feishu-Dxk6ArOK.mjs → feishu-GvFABWW5.mjs} +2 -2
- package/dist/from-CaD373S1.mjs +3840 -0
- package/dist/{getMachineId-bsd-D0w3uAZa.mjs → getMachineId-bsd-DR4-Dysy.mjs} +3 -2
- package/dist/getMachineId-bsd-DjLgZlll.mjs +27 -0
- package/dist/getMachineId-darwin-B6WCAhc4.mjs +24 -0
- package/dist/{getMachineId-darwin-DOoYFb2_.mjs → getMachineId-darwin-CaD2juTg.mjs} +3 -2
- package/dist/getMachineId-linux-BeWHG1gK.mjs +20 -0
- package/dist/{getMachineId-linux-MlY63Zsw.mjs → getMachineId-linux-Dk3gWdQK.mjs} +2 -1
- package/dist/getMachineId-unsupported-BMJQItvF.mjs +15 -0
- package/dist/{getMachineId-unsupported-BS652RIy.mjs → getMachineId-unsupported-Bgz_Je1J.mjs} +2 -1
- package/dist/getMachineId-win-CdgcrzCW.mjs +26 -0
- package/dist/{getMachineId-win-B6hY8edq.mjs → getMachineId-win-vJ6VfDRI.mjs} +3 -2
- package/dist/index.mjs +9 -6
- package/dist/invitation-DWlyNb8x-BEgoZ9k1.mjs +4 -0
- package/dist/{invitation-B1pjAyOz-BaCA9PII.mjs → invitation-Dnn5gGGX-Ce7zbZpn.mjs} +4 -90
- package/dist/multipart-parser-BIksYTkk.mjs +294 -0
- package/dist/observability-C3nY6Jcz-Bk7FX689.mjs +96006 -0
- package/dist/observability-DttujCqj.mjs +5 -0
- package/dist/{saas-connect-DLSyrQcC.mjs → saas-connect-Df2CVAGp.mjs} +7402 -7052
- package/dist/src-CzQ5KF6D.mjs +1176 -0
- package/dist/src-DNBS5Yjj.mjs +735 -0
- package/dist/web/assets/index-43trJLR8.js +388 -0
- package/dist/web/assets/{index-COflQOwF.js → index-CD7rTdqm.js} +1 -1
- package/dist/web/assets/index-fNb_M0nL.css +1 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/invitation-CBnQyB7o-TmnIj3kx.mjs +0 -3
- package/dist/observability-C08jUFsJ.mjs +0 -4
- package/dist/observability-DPyf745N-BSc8QNcR.mjs +0 -33897
- package/dist/web/assets/index-BxGzfDTS.js +0 -383
- package/dist/web/assets/index-DDqPt6PI.css +0 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { integer, jsonb, pgTable, text, timestamp } from "drizzle-orm/pg-core";
|
|
2
|
+
//#region ../server/dist/errors-BmyRwN0Y.mjs
|
|
3
|
+
/** Organization entity. Agents and chats belong to exactly one organization. */
|
|
4
|
+
const organizations = pgTable("organizations", {
|
|
5
|
+
id: text("id").primaryKey(),
|
|
6
|
+
name: text("name").unique().notNull(),
|
|
7
|
+
displayName: text("display_name").notNull(),
|
|
8
|
+
maxAgents: integer("max_agents").notNull().default(0),
|
|
9
|
+
maxMessagesPerMinute: integer("max_messages_per_minute").notNull().default(0),
|
|
10
|
+
features: jsonb("features").$type().notNull().default({}),
|
|
11
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
12
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
13
|
+
});
|
|
14
|
+
/** User accounts. Passwords are stored as bcrypt hashes. */
|
|
15
|
+
const users = pgTable("users", {
|
|
16
|
+
id: text("id").primaryKey(),
|
|
17
|
+
username: text("username").unique().notNull(),
|
|
18
|
+
passwordHash: text("password_hash").notNull(),
|
|
19
|
+
displayName: text("display_name").notNull(),
|
|
20
|
+
avatarUrl: text("avatar_url"),
|
|
21
|
+
status: text("status").notNull().default("active"),
|
|
22
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
23
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
24
|
+
});
|
|
25
|
+
var AppError = class extends Error {
|
|
26
|
+
constructor(statusCode, message, attrs) {
|
|
27
|
+
super(message);
|
|
28
|
+
this.statusCode = statusCode;
|
|
29
|
+
this.attrs = attrs;
|
|
30
|
+
this.name = "AppError";
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
var NotFoundError = class extends AppError {
|
|
34
|
+
constructor(message = "Not found", attrs) {
|
|
35
|
+
super(404, message, attrs);
|
|
36
|
+
this.name = "NotFoundError";
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
var UnauthorizedError = class extends AppError {
|
|
40
|
+
constructor(message = "Unauthorized", attrs) {
|
|
41
|
+
super(401, message, attrs);
|
|
42
|
+
this.name = "UnauthorizedError";
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
var ForbiddenError = class extends AppError {
|
|
46
|
+
constructor(message = "Forbidden", attrs) {
|
|
47
|
+
super(403, message, attrs);
|
|
48
|
+
this.name = "ForbiddenError";
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
var ConflictError = class extends AppError {
|
|
52
|
+
constructor(message = "Conflict", attrs) {
|
|
53
|
+
super(409, message, attrs);
|
|
54
|
+
this.name = "ConflictError";
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
var BadRequestError = class extends AppError {
|
|
58
|
+
constructor(message = "Bad request", attrs) {
|
|
59
|
+
super(400, message, attrs);
|
|
60
|
+
this.name = "BadRequestError";
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Thrown when an operation targets a client whose organization does not match
|
|
65
|
+
* the caller's authenticated organization. Retained for wire compatibility:
|
|
66
|
+
* the read paths that produced this error were retired in
|
|
67
|
+
* decouple-client-from-identity §4.1, so the server itself no longer raises
|
|
68
|
+
* it. SDK consumers may still pattern-match the `code` field on legacy
|
|
69
|
+
* payloads.
|
|
70
|
+
*/
|
|
71
|
+
var ClientOrgMismatchError = class extends AppError {
|
|
72
|
+
code = "CLIENT_ORG_MISMATCH";
|
|
73
|
+
constructor(message = "Client belongs to a different organization", attrs) {
|
|
74
|
+
super(403, message, attrs);
|
|
75
|
+
this.name = "ClientOrgMismatchError";
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Thrown when a client.yaml is presented with a JWT whose user_id does not
|
|
80
|
+
* match the row's owner. The CLI responds by guiding the operator through
|
|
81
|
+
* `first-tree-hub client claim --confirm` to take over ownership, which
|
|
82
|
+
* unpins the previous owner's agents from this machine.
|
|
83
|
+
*/
|
|
84
|
+
var ClientUserMismatchError = class extends AppError {
|
|
85
|
+
code = "CLIENT_USER_MISMATCH";
|
|
86
|
+
constructor(message = "Client belongs to a different user", attrs) {
|
|
87
|
+
super(403, message, attrs);
|
|
88
|
+
this.name = "ClientUserMismatchError";
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
//#endregion
|
|
92
|
+
export { ConflictError as a, UnauthorizedError as c, ClientUserMismatchError as i, organizations as l, BadRequestError as n, ForbiddenError as o, ClientOrgMismatchError as r, NotFoundError as s, AppError as t, users as u };
|
|
@@ -1,39 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region \0rolldown/runtime.js
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
10
|
-
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
11
|
-
var __exportAll = (all, no_symbols) => {
|
|
12
|
-
let target = {};
|
|
13
|
-
for (var name in all) __defProp(target, name, {
|
|
14
|
-
get: all[name],
|
|
15
|
-
enumerable: true
|
|
16
|
-
});
|
|
17
|
-
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
18
|
-
return target;
|
|
19
|
-
};
|
|
20
|
-
var __copyProps = (to, from, except, desc) => {
|
|
21
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
22
|
-
key = keys[i];
|
|
23
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
24
|
-
get: ((k) => from[k]).bind(null, key),
|
|
25
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
return to;
|
|
29
|
-
};
|
|
30
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
31
|
-
value: mod,
|
|
32
|
-
enumerable: true
|
|
33
|
-
}) : target, mod));
|
|
34
|
-
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
|
-
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
36
|
-
//#endregion
|
|
1
|
+
import { n as __esmMin, r as __exportAll } from "./chunk-BSw8zbkd.mjs";
|
|
37
2
|
//#region ../../node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/version.js
|
|
38
3
|
var VERSION;
|
|
39
4
|
var init_version = __esmMin((() => {
|
|
@@ -1548,4 +1513,4 @@ var init_esm = __esmMin((() => {
|
|
|
1548
1513
|
};
|
|
1549
1514
|
}));
|
|
1550
1515
|
//#endregion
|
|
1551
|
-
export {
|
|
1516
|
+
export { metrics as a, SpanStatusCode as c, createContextKey as d, DiagLogLevel as f, propagation as i, SpanKind as l, init_esm as n, diag as o, trace as r, context as s, esm_exports as t, DiagConsoleLogger as u };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { i as __require, t as __commonJSMin } from "./chunk-BSw8zbkd.mjs";
|
|
2
|
+
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.7.1_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/execAsync.js
|
|
3
|
+
var require_execAsync = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.execAsync = void 0;
|
|
6
|
+
const child_process = __require("child_process");
|
|
7
|
+
exports.execAsync = __require("util").promisify(child_process.exec);
|
|
8
|
+
}));
|
|
9
|
+
//#endregion
|
|
10
|
+
export { require_execAsync as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as __require, t as __commonJSMin } from "./chunk-BSw8zbkd.mjs";
|
|
2
2
|
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.7.0_@opentelemetry+api@1.9.1/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/execAsync.js
|
|
3
3
|
var require_execAsync = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as AGENT_SELECTOR_HEADER } from "./dist-
|
|
1
|
+
import { r as __exportAll } from "./chunk-BSw8zbkd.mjs";
|
|
2
|
+
import { r as AGENT_SELECTOR_HEADER } from "./dist-FuUBFTEB.mjs";
|
|
3
3
|
//#region src/core/feishu.ts
|
|
4
4
|
var feishu_exports = /* @__PURE__ */ __exportAll({
|
|
5
5
|
bindFeishuBot: () => bindFeishuBot,
|