@agent-team-foundation/first-tree-hub 0.14.1 → 0.14.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/cli/index.mjs +10 -18
- package/dist/{client-CREn8bJ0-C5fHJir6.mjs → client-CDw0f-kN-BPzOVd8L.mjs} +3 -3
- package/dist/{client-CzXmweS9-DhUiuQvL.mjs → client-CZ_VnbEc-CBF46cJd.mjs} +3119 -1290
- package/dist/{dist-1XGLJMOq.mjs → dist-DmYxT5Kb.mjs} +33 -6
- package/dist/{feishu-BGx71p5s.mjs → feishu-CCWd-JE4.mjs} +1 -1
- package/dist/index.mjs +6 -6
- package/dist/invitation-C9m2gQx4-CkwWteA3.mjs +4 -0
- package/dist/{invitation-DZO4NX3P-BPxTeHf-.mjs → invitation-D_ENPHyj-5ETiae5r.mjs} +3 -23
- package/dist/{saas-connect-BBRxjmBS.mjs → saas-connect-DgCSZ8Yk.mjs} +297 -1760
- package/dist/{errors-LPcARA4K-Dbrptiyz.mjs → uuid-DbS_4vFh-iFghv4zA.mjs} +37 -2
- package/dist/web/assets/{index-DMqnX4IR.js → index-B76SVAz8.js} +1 -1
- package/dist/web/assets/index-DAAemCLz.js +416 -0
- package/dist/web/assets/index-DE7Q3QWE.css +1 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/invitation-CNv7gfFF-DOFZ75wb.mjs +0 -4
- package/dist/web/assets/index-BOK7e_td.css +0 -1
- package/dist/web/assets/index-QDcpYpEa.js +0 -416
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { randomBytes } from "node:crypto";
|
|
1
2
|
import { integer, jsonb, pgTable, text, timestamp } from "drizzle-orm/pg-core";
|
|
2
|
-
//#region ../server/dist/
|
|
3
|
+
//#region ../server/dist/uuid-DbS_4vFh.mjs
|
|
3
4
|
/** Organization entity. Agents and chats belong to exactly one organization. */
|
|
4
5
|
const organizations = pgTable("organizations", {
|
|
5
6
|
id: text("id").primaryKey(),
|
|
@@ -90,5 +91,39 @@ var ClientUserMismatchError = class extends AppError {
|
|
|
90
91
|
this.name = "ClientUserMismatchError";
|
|
91
92
|
}
|
|
92
93
|
};
|
|
94
|
+
/**
|
|
95
|
+
* v1 §四 改造 1: `chat send <name>` was implicitly opening a direct chat
|
|
96
|
+
* whenever the target wasn't a member of the caller's current chat (issue
|
|
97
|
+
* #311). That auto-routing now requires `--direct`; otherwise the call
|
|
98
|
+
* fails with this error and a hint pointing at both the `--direct` escape
|
|
99
|
+
* hatch and the "ask a human in this chat to add the agent" workflow.
|
|
100
|
+
*/
|
|
101
|
+
var AgentSendNonMemberError = class extends AppError {
|
|
102
|
+
code = "AGENT_SEND_NON_MEMBER";
|
|
103
|
+
constructor(message, attrs) {
|
|
104
|
+
super(400, message, attrs);
|
|
105
|
+
this.name = "AgentSendNonMemberError";
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
/** Generate a UUID v7 (time-ordered). No external dependency. */
|
|
109
|
+
function uuidv7() {
|
|
110
|
+
const now = BigInt(Date.now());
|
|
111
|
+
const bytes = new Uint8Array(16);
|
|
112
|
+
bytes[0] = Number(now >> 40n & 255n);
|
|
113
|
+
bytes[1] = Number(now >> 32n & 255n);
|
|
114
|
+
bytes[2] = Number(now >> 24n & 255n);
|
|
115
|
+
bytes[3] = Number(now >> 16n & 255n);
|
|
116
|
+
bytes[4] = Number(now >> 8n & 255n);
|
|
117
|
+
bytes[5] = Number(now & 255n);
|
|
118
|
+
const rand = randomBytes(10);
|
|
119
|
+
for (let i = 0; i < 10; i++) {
|
|
120
|
+
const b = rand[i];
|
|
121
|
+
if (b !== void 0) bytes[6 + i] = b;
|
|
122
|
+
}
|
|
123
|
+
bytes[6] = (bytes[6] ?? 0) & 15 | 112;
|
|
124
|
+
bytes[8] = (bytes[8] ?? 0) & 63 | 128;
|
|
125
|
+
const hex = Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join("");
|
|
126
|
+
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
|
|
127
|
+
}
|
|
93
128
|
//#endregion
|
|
94
|
-
export {
|
|
129
|
+
export { ClientUserMismatchError as a, NotFoundError as c, users as d, uuidv7 as f, ClientOrgMismatchError as i, UnauthorizedError as l, AppError as n, ConflictError as o, BadRequestError as r, ForbiddenError as s, AgentSendNonMemberError as t, organizations as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as r,j as e,U as o,L as s,A as i,F as a,r as l}from"./index-
|
|
1
|
+
import{c as r,j as e,U as o,L as s,A as i,F as a,r as l}from"./index-DAAemCLz.js";/**
|
|
2
2
|
* @license lucide-react v0.577.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|