terse-types 0.0.1
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/README.md +44 -0
- package/dist/ApiRouteBuilder.d.ts +185 -0
- package/dist/ApiRouteBuilder.js +11 -0
- package/dist/ApiRoutes.json +184 -0
- package/dist/ApprovalTypes.d.ts +28 -0
- package/dist/ApprovalTypes.js +7 -0
- package/dist/ClientBoundTools.d.ts +36 -0
- package/dist/ClientBoundTools.js +36 -0
- package/dist/Configs.d.ts +628 -0
- package/dist/Configs.js +868 -0
- package/dist/DonatedState.d.ts +4 -0
- package/dist/DonatedState.js +12 -0
- package/dist/Entities.d.ts +7 -0
- package/dist/Entities.js +8 -0
- package/dist/FrontendRoutes.json +28 -0
- package/dist/FrontendRoutesBuilder.d.ts +30 -0
- package/dist/FrontendRoutesBuilder.js +13 -0
- package/dist/Integrations.d.ts +254 -0
- package/dist/Integrations.js +210 -0
- package/dist/InvalidationKeys.d.ts +52 -0
- package/dist/InvalidationKeys.js +165 -0
- package/dist/ModelEvents.d.ts +175 -0
- package/dist/ModelEvents.js +28 -0
- package/dist/Notifications.d.ts +42 -0
- package/dist/Notifications.js +5 -0
- package/dist/RunHistoryTypes.d.ts +103 -0
- package/dist/RunHistoryTypes.js +29 -0
- package/dist/SentNotifications.d.ts +29 -0
- package/dist/SentNotifications.js +12 -0
- package/dist/SocketEvents.d.ts +48 -0
- package/dist/SocketEvents.js +52 -0
- package/dist/Survey.d.ts +9 -0
- package/dist/Survey.js +1 -0
- package/dist/TicketSystem.d.ts +153 -0
- package/dist/TicketSystem.js +20 -0
- package/dist/ToolDisplayUtils.d.ts +29 -0
- package/dist/ToolDisplayUtils.js +1162 -0
- package/dist/Tools.d.ts +9202 -0
- package/dist/Tools.js +2099 -0
- package/dist/ToolsTypes.d.ts +17 -0
- package/dist/ToolsTypes.js +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +20 -0
- package/dist/types.d.ts +704 -0
- package/dist/types.js +115 -0
- package/package.json +45 -0
package/dist/Survey.d.ts
ADDED
package/dist/Survey.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
export declare enum TicketSystemType {
|
|
2
|
+
Jira = "jira",
|
|
3
|
+
Linear = "linear"
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Common Linear workflow state names.
|
|
7
|
+
* Note: Teams can customize state names, but these are the defaults.
|
|
8
|
+
*/
|
|
9
|
+
export declare enum LinearStateName {
|
|
10
|
+
Triage = "Triage",
|
|
11
|
+
Backlog = "Backlog",
|
|
12
|
+
Todo = "Todo",
|
|
13
|
+
InProgress = "In Progress",
|
|
14
|
+
InReview = "In Review",
|
|
15
|
+
Done = "Done",
|
|
16
|
+
Canceled = "Canceled"
|
|
17
|
+
}
|
|
18
|
+
export interface Ticket {
|
|
19
|
+
id: string;
|
|
20
|
+
identifier: string;
|
|
21
|
+
title: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
state: {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
};
|
|
27
|
+
assignee?: {
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
} | null;
|
|
31
|
+
priority?: number;
|
|
32
|
+
labels?: Array<{
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
color: string;
|
|
36
|
+
}>;
|
|
37
|
+
estimate?: number;
|
|
38
|
+
dueDate?: string;
|
|
39
|
+
project?: {
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
} | null;
|
|
43
|
+
team?: {
|
|
44
|
+
id: string;
|
|
45
|
+
name: string;
|
|
46
|
+
key: string;
|
|
47
|
+
};
|
|
48
|
+
createdAt: string;
|
|
49
|
+
updatedAt: string;
|
|
50
|
+
}
|
|
51
|
+
export interface User {
|
|
52
|
+
id: string;
|
|
53
|
+
name: string;
|
|
54
|
+
email: string;
|
|
55
|
+
}
|
|
56
|
+
export interface UserContext {
|
|
57
|
+
userInfo: User;
|
|
58
|
+
teams: Team[];
|
|
59
|
+
organization: Organization;
|
|
60
|
+
ticketStates: TicketState[];
|
|
61
|
+
milestones: Milestone[];
|
|
62
|
+
}
|
|
63
|
+
export interface TicketState {
|
|
64
|
+
id: string;
|
|
65
|
+
name: string;
|
|
66
|
+
}
|
|
67
|
+
export interface Milestone {
|
|
68
|
+
id: string;
|
|
69
|
+
name: string;
|
|
70
|
+
}
|
|
71
|
+
export interface Organization {
|
|
72
|
+
id: string;
|
|
73
|
+
name: string;
|
|
74
|
+
createdAt: string;
|
|
75
|
+
createdIssueCount: number;
|
|
76
|
+
userCount: number;
|
|
77
|
+
projects: Project[];
|
|
78
|
+
}
|
|
79
|
+
export type Project = {
|
|
80
|
+
id: string;
|
|
81
|
+
name: string;
|
|
82
|
+
description?: string;
|
|
83
|
+
updates: Update[];
|
|
84
|
+
};
|
|
85
|
+
export type Update = {
|
|
86
|
+
id: string;
|
|
87
|
+
title: string;
|
|
88
|
+
description?: string;
|
|
89
|
+
};
|
|
90
|
+
export interface Comment {
|
|
91
|
+
id: string;
|
|
92
|
+
authorId: string;
|
|
93
|
+
body: string;
|
|
94
|
+
createdAt: string;
|
|
95
|
+
updatedAt?: string;
|
|
96
|
+
[key: string]: any;
|
|
97
|
+
}
|
|
98
|
+
export interface Team {
|
|
99
|
+
id: string;
|
|
100
|
+
name: string;
|
|
101
|
+
key: string;
|
|
102
|
+
}
|
|
103
|
+
export interface CommitAssociation {
|
|
104
|
+
sha: string;
|
|
105
|
+
message: string;
|
|
106
|
+
url: string;
|
|
107
|
+
repository: string;
|
|
108
|
+
branch?: string;
|
|
109
|
+
}
|
|
110
|
+
export interface CreateTicketInput {
|
|
111
|
+
title: string;
|
|
112
|
+
teamId: string;
|
|
113
|
+
description?: string;
|
|
114
|
+
state?: {
|
|
115
|
+
id: string;
|
|
116
|
+
name: string;
|
|
117
|
+
};
|
|
118
|
+
assignee?: string;
|
|
119
|
+
priority?: number;
|
|
120
|
+
project?: {
|
|
121
|
+
id: string;
|
|
122
|
+
name: string;
|
|
123
|
+
};
|
|
124
|
+
milestone?: {
|
|
125
|
+
id: string;
|
|
126
|
+
name: string;
|
|
127
|
+
};
|
|
128
|
+
associatedCommits?: CommitAssociation[];
|
|
129
|
+
issueType?: string;
|
|
130
|
+
}
|
|
131
|
+
export interface UpdateTicketInput {
|
|
132
|
+
title: string;
|
|
133
|
+
teamId: string;
|
|
134
|
+
description?: string;
|
|
135
|
+
state?: {
|
|
136
|
+
id: string;
|
|
137
|
+
name: string;
|
|
138
|
+
};
|
|
139
|
+
assignee?: string;
|
|
140
|
+
priority?: number;
|
|
141
|
+
project?: {
|
|
142
|
+
id: string;
|
|
143
|
+
name: string;
|
|
144
|
+
};
|
|
145
|
+
milestone?: {
|
|
146
|
+
id: string;
|
|
147
|
+
name: string;
|
|
148
|
+
};
|
|
149
|
+
associatedCommits?: CommitAssociation[];
|
|
150
|
+
}
|
|
151
|
+
export interface TicketWebhookHandler {
|
|
152
|
+
(ticket: Ticket): void | Promise<void>;
|
|
153
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export var TicketSystemType;
|
|
2
|
+
(function (TicketSystemType) {
|
|
3
|
+
TicketSystemType["Jira"] = "jira";
|
|
4
|
+
TicketSystemType["Linear"] = "linear";
|
|
5
|
+
// Future ticket systems can be added here
|
|
6
|
+
})(TicketSystemType || (TicketSystemType = {}));
|
|
7
|
+
/**
|
|
8
|
+
* Common Linear workflow state names.
|
|
9
|
+
* Note: Teams can customize state names, but these are the defaults.
|
|
10
|
+
*/
|
|
11
|
+
export var LinearStateName;
|
|
12
|
+
(function (LinearStateName) {
|
|
13
|
+
LinearStateName["Triage"] = "Triage";
|
|
14
|
+
LinearStateName["Backlog"] = "Backlog";
|
|
15
|
+
LinearStateName["Todo"] = "Todo";
|
|
16
|
+
LinearStateName["InProgress"] = "In Progress";
|
|
17
|
+
LinearStateName["InReview"] = "In Review";
|
|
18
|
+
LinearStateName["Done"] = "Done";
|
|
19
|
+
LinearStateName["Canceled"] = "Canceled";
|
|
20
|
+
})(LinearStateName || (LinearStateName = {}));
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The phases a tool call can be in for display purposes.
|
|
3
|
+
*/
|
|
4
|
+
export type ToolDisplayPhase = "preparing" | "executing" | "complete" | "approval";
|
|
5
|
+
/**
|
|
6
|
+
* Safely parse JSON parameters string into an object.
|
|
7
|
+
*/
|
|
8
|
+
export declare function parseToolParams(parametersJson?: string): Record<string, unknown> | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Get display string for a tool call based on its current phase.
|
|
11
|
+
*
|
|
12
|
+
* @param toolName - The internal tool name (e.g., 'linear_create_ticket')
|
|
13
|
+
* @param phase - The current phase: 'preparing', 'executing', or 'complete'
|
|
14
|
+
* @param options - Optional params, integration, and result for dynamic display
|
|
15
|
+
* @returns Human-readable display string
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* getToolDisplayForPhase('fetchResourcesForIntegration', 'executing', { params: { integrationType: 'notion' } })
|
|
19
|
+
* // Returns: "Fetching resources from Notion"
|
|
20
|
+
*/
|
|
21
|
+
export declare function getToolDisplayForPhase(toolName: string, phase: ToolDisplayPhase, options?: {
|
|
22
|
+
params?: Record<string, unknown>;
|
|
23
|
+
result?: string;
|
|
24
|
+
}): string;
|
|
25
|
+
export declare function getReadableFallbackName(toolName: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* Convenience function that parses parameters JSON and gets the display string.
|
|
28
|
+
*/
|
|
29
|
+
export declare function getToolDisplayFromCall(toolName: string, phase: ToolDisplayPhase, parametersJson?: string, result?: string): string;
|