@tangle-network/agent-app 0.49.33 → 0.49.35
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/bin/tangle-agent/home-maintenance.py +280 -0
- package/bin/tangle-agent/home.mjs +166 -0
- package/bin/tangle-agent/provision.mjs +168 -0
- package/bin/tangle-agent/runtime.mjs +151 -0
- package/bin/tangle-agent.mjs +26 -0
- package/dist/VaultPane-2SJSP6TS.js +7 -0
- package/dist/app-auth/index.d.ts +14 -2
- package/dist/app-auth/index.js +3 -3
- package/dist/app-auth/index.js.map +1 -1
- package/dist/assistant/index.js +7 -7
- package/dist/chat-react/index.js +1 -1
- package/dist/chat-routes/index.js +4 -4
- package/dist/chat-store/index.js +2 -2
- package/dist/{chunk-FCUWRMAF.js → chunk-56SVXAIK.js} +14 -9
- package/dist/chunk-56SVXAIK.js.map +1 -0
- package/dist/chunk-6CV66YOB.js +99 -0
- package/dist/chunk-6CV66YOB.js.map +1 -0
- package/dist/{chunk-V4YGTOCS.js → chunk-MIFVOYZ7.js} +5 -5
- package/dist/{chunk-FXWNNHPC.js → chunk-MVIIH2EQ.js} +165 -72
- package/dist/chunk-MVIIH2EQ.js.map +1 -0
- package/dist/{chunk-TNWQA5XJ.js → chunk-NLNM5PP6.js} +5 -4
- package/dist/chunk-NLNM5PP6.js.map +1 -0
- package/dist/{chunk-4PZE7XAM.js → chunk-S3344RBY.js} +4 -4
- package/dist/{chunk-4S36HWE4.js → chunk-WAMJSZYB.js} +1 -1
- package/dist/{chunk-VIL6MHHQ.js → chunk-XTLYE2VO.js} +6 -6
- package/dist/design-canvas-react/index.js +1 -1
- package/dist/design-canvas-react/lazy.js +1 -1
- package/dist/hosted-agent/general-skill.d.ts +2 -0
- package/dist/hosted-agent/general.d.ts +53 -0
- package/dist/hosted-agent/index.d.ts +9 -1
- package/dist/hosted-agent/index.js +294 -7
- package/dist/hosted-agent/index.js.map +1 -1
- package/dist/hosted-agent/react/LineBilling.d.ts +3 -0
- package/dist/hosted-agent/react/LineMembers.d.ts +3 -0
- package/dist/hosted-agent/react/LineSetup.d.ts +3 -0
- package/dist/hosted-agent/react/contracts.d.ts +136 -0
- package/dist/hosted-agent/react/index.d.ts +5 -0
- package/dist/hosted-agent/react/index.js +573 -0
- package/dist/hosted-agent/react/index.js.map +1 -0
- package/dist/hosted-agent/react/lines.css +110 -0
- package/dist/hosted-agent/react/styles.d.ts +2 -0
- package/dist/hosted-agent/react/styles.js +1 -0
- package/dist/hosted-agent/react/styles.js.map +1 -0
- package/dist/hosted-agent/workflows.d.ts +17 -0
- package/dist/{mention-editor-4PYZJM5A.js → mention-editor-ELAINF6H.js} +3 -2
- package/dist/mention-editor-ELAINF6H.js.map +1 -0
- package/dist/platform/index.js +1 -1
- package/dist/platform/sso.d.ts +74 -7
- package/dist/profile/home.d.ts +23 -0
- package/dist/profile/index.d.ts +1 -0
- package/dist/profile/index.js +9 -1
- package/dist/profile/index.js.map +1 -1
- package/dist/public-consultation/index.js +4 -4
- package/dist/stories/hosted-agent/fixtures.d.ts +34 -0
- package/dist/teams/index.js +5 -5
- package/dist/teams/invitations-api.js +4 -4
- package/dist/theme/tokens.css +20 -3
- package/dist/vault/ConfirmDialog.d.ts +1 -1
- package/dist/vault/VaultPane.d.ts +2 -2
- package/dist/vault/contracts.d.ts +8 -0
- package/dist/vault/index.js +1 -1
- package/dist/vault/lazy.d.ts +3 -3
- package/dist/vault/lazy.js +1 -1
- package/dist/vault/lazy.js.map +1 -1
- package/dist/web-react/index.js +23 -23
- package/package.json +47 -14
- package/dist/VaultPane-32HVWZ6A.js +0 -7
- package/dist/chunk-FCUWRMAF.js.map +0 -1
- package/dist/chunk-FXWNNHPC.js.map +0 -1
- package/dist/chunk-TNWQA5XJ.js.map +0 -1
- package/dist/mention-editor-4PYZJM5A.js.map +0 -1
- /package/dist/{VaultPane-32HVWZ6A.js.map → VaultPane-2SJSP6TS.js.map} +0 -0
- /package/dist/{chunk-V4YGTOCS.js.map → chunk-MIFVOYZ7.js.map} +0 -0
- /package/dist/{chunk-4PZE7XAM.js.map → chunk-S3344RBY.js.map} +0 -0
- /package/dist/{chunk-4S36HWE4.js.map → chunk-WAMJSZYB.js.map} +0 -0
- /package/dist/{chunk-VIL6MHHQ.js.map → chunk-XTLYE2VO.js.map} +0 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import type { Line, LineFromConnectionInput, LineMember, LineMemberPatch, LineMemberSpec } from '@tangle-network/sandbox';
|
|
2
|
+
export type ConnectableLineTransport = LineFromConnectionInput['transport'];
|
|
3
|
+
export type LineBoxMode = 'per-member' | 'shared';
|
|
4
|
+
export type LineIdentityKind = 'handle' | 'number' | 'email';
|
|
5
|
+
/** An owned identity that Hub can turn into a line through sandbox.lines.fromConnection(). */
|
|
6
|
+
export interface LineIdentityOption {
|
|
7
|
+
kind: LineIdentityKind;
|
|
8
|
+
transport: ConnectableLineTransport;
|
|
9
|
+
label: string;
|
|
10
|
+
/** An existing provider number id, when this connection owns several numbers. */
|
|
11
|
+
phoneNumberId?: string;
|
|
12
|
+
/** True when the provider requires the owner to enter an existing number id. */
|
|
13
|
+
requiresPhoneNumberId?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface LineConnectionOption {
|
|
16
|
+
id: string;
|
|
17
|
+
label: string;
|
|
18
|
+
providerId: string;
|
|
19
|
+
identities: LineIdentityOption[];
|
|
20
|
+
}
|
|
21
|
+
export interface LineAnswerTarget {
|
|
22
|
+
id: string;
|
|
23
|
+
label: string;
|
|
24
|
+
kind: 'agent' | 'box';
|
|
25
|
+
modes: readonly LineBoxMode[];
|
|
26
|
+
}
|
|
27
|
+
export type LineLastTurn = {
|
|
28
|
+
kind: 'latest';
|
|
29
|
+
at: string;
|
|
30
|
+
status: string;
|
|
31
|
+
} | {
|
|
32
|
+
kind: 'none';
|
|
33
|
+
} | {
|
|
34
|
+
kind: 'unavailable';
|
|
35
|
+
};
|
|
36
|
+
/** The line fields the SDK returns, with the app's target and latest turn joined on. */
|
|
37
|
+
export interface LineSetupLine extends Pick<Line, 'id' | 'connectionId' | 'transport' | 'address' | 'connect' | 'routerAddress' | 'providerNumberId' | 'status'> {
|
|
38
|
+
/** True only while an active Hub attachment routes messages to an agent or box. */
|
|
39
|
+
answering: boolean;
|
|
40
|
+
/** The viewer may disconnect this line. A workspace list can include other agents' lines. */
|
|
41
|
+
canDisconnect: boolean;
|
|
42
|
+
targetId: string | null;
|
|
43
|
+
targetLabel: string | null;
|
|
44
|
+
boxMode: LineBoxMode | null;
|
|
45
|
+
lastTurn: LineLastTurn;
|
|
46
|
+
}
|
|
47
|
+
export interface LineSetupSnapshot {
|
|
48
|
+
/** Include every line in the workspace, even when another agent answers it. */
|
|
49
|
+
lines: LineSetupLine[];
|
|
50
|
+
/** Null means the Hub connection read failed; an empty array means none exist. */
|
|
51
|
+
connections: LineConnectionOption[] | null;
|
|
52
|
+
targets: LineAnswerTarget[];
|
|
53
|
+
workspaceName: string;
|
|
54
|
+
}
|
|
55
|
+
export interface LineConnectInput {
|
|
56
|
+
connectionId: string;
|
|
57
|
+
transport: ConnectableLineTransport;
|
|
58
|
+
phoneNumberId?: string;
|
|
59
|
+
targetId: string;
|
|
60
|
+
boxMode: LineBoxMode;
|
|
61
|
+
}
|
|
62
|
+
/** The host authenticates these calls and composes the published Sandbox SDK and Hub clients. */
|
|
63
|
+
export interface LineSetupClient {
|
|
64
|
+
load(): Promise<LineSetupSnapshot>;
|
|
65
|
+
connect(input: LineConnectInput): Promise<void>;
|
|
66
|
+
disconnect(lineId: string): Promise<void>;
|
|
67
|
+
}
|
|
68
|
+
export interface LineSetupProps {
|
|
69
|
+
client: LineSetupClient;
|
|
70
|
+
/** Reloads when the host switches workspace or agent. */
|
|
71
|
+
scopeKey: string;
|
|
72
|
+
initialTargetId?: string;
|
|
73
|
+
canManage: boolean;
|
|
74
|
+
onNotice?(notice: {
|
|
75
|
+
kind: 'success' | 'error';
|
|
76
|
+
message: string;
|
|
77
|
+
}): void;
|
|
78
|
+
}
|
|
79
|
+
export interface LineMemberRole {
|
|
80
|
+
value: string;
|
|
81
|
+
label: string;
|
|
82
|
+
tools: 'act' | 'chat';
|
|
83
|
+
}
|
|
84
|
+
export interface LineMembersClient {
|
|
85
|
+
list(lineId: string): Promise<LineMember[]>;
|
|
86
|
+
add(lineId: string, input: LineMemberSpec): Promise<void>;
|
|
87
|
+
update(lineId: string, memberId: string, patch: LineMemberPatch): Promise<void>;
|
|
88
|
+
remove(lineId: string, memberId: string): Promise<void>;
|
|
89
|
+
}
|
|
90
|
+
export interface LineMembersProps {
|
|
91
|
+
lineId: string;
|
|
92
|
+
/** Changes when the authenticated viewer or workspace changes. */
|
|
93
|
+
scopeKey: string;
|
|
94
|
+
client: LineMembersClient;
|
|
95
|
+
/** The attached line's actual role map, including any chat-only role. */
|
|
96
|
+
roles: readonly LineMemberRole[];
|
|
97
|
+
canManage: boolean;
|
|
98
|
+
/** Disable generic invitations when the product uses a separate verified owner claim. */
|
|
99
|
+
canAdd?: boolean;
|
|
100
|
+
/** Product policy can narrow an otherwise shared line to one member. */
|
|
101
|
+
maxMembers?: number;
|
|
102
|
+
allowRoleChange?: boolean;
|
|
103
|
+
/** A one-member product may free its line for the next consenting owner. */
|
|
104
|
+
allowRemoveLastOwner?: boolean;
|
|
105
|
+
onNotice?(notice: {
|
|
106
|
+
kind: 'success' | 'error';
|
|
107
|
+
message: string;
|
|
108
|
+
}): void;
|
|
109
|
+
}
|
|
110
|
+
export interface LineBillingView {
|
|
111
|
+
workspaceName: string;
|
|
112
|
+
lineAddress: string;
|
|
113
|
+
/** The Hub's verified line charge owner. Unknown is shown as unverified. */
|
|
114
|
+
linePayer: {
|
|
115
|
+
kind: 'workspace';
|
|
116
|
+
label: string;
|
|
117
|
+
} | {
|
|
118
|
+
kind: 'unverified';
|
|
119
|
+
};
|
|
120
|
+
/** The payer for agent turns; member payer is available when Hub enables it. */
|
|
121
|
+
turnPayer: {
|
|
122
|
+
kind: 'owner' | 'member';
|
|
123
|
+
label: string;
|
|
124
|
+
} | {
|
|
125
|
+
kind: 'unverified';
|
|
126
|
+
};
|
|
127
|
+
allowance: {
|
|
128
|
+
turnsPerMemberPerDay: number;
|
|
129
|
+
used?: number;
|
|
130
|
+
limit?: number;
|
|
131
|
+
resetsAt?: string;
|
|
132
|
+
} | null;
|
|
133
|
+
}
|
|
134
|
+
export interface LineBillingProps {
|
|
135
|
+
view: LineBillingView;
|
|
136
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Browser-safe line management UI. The host keeps owner credentials server-side. */
|
|
2
|
+
export type { ConnectableLineTransport, LineAnswerTarget, LineBillingProps, LineBillingView, LineBoxMode, LineConnectInput, LineConnectionOption, LineIdentityKind, LineIdentityOption, LineLastTurn, LineMemberRole, LineMembersClient, LineMembersProps, LineSetupClient, LineSetupLine, LineSetupProps, LineSetupSnapshot, } from './contracts';
|
|
3
|
+
export { LineSetup } from './LineSetup';
|
|
4
|
+
export { LineMembers } from './LineMembers';
|
|
5
|
+
export { LineBilling } from './LineBilling';
|