@wayai/cli 0.2.18 → 0.2.19

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.
@@ -1,214 +1,4 @@
1
1
  /**
2
- * Shared types for the CLI — mirrors backend CI types
2
+ * Shared types for the CLI — imported from @wayai/shared/contracts
3
3
  */
4
- /** Keep in sync with workers/backend/src/routes/api/ci/types.ts cannot import due to separate deployment bundle. */
5
- export interface HubAsCodeKanbanFollowup {
6
- id?: string;
7
- order: number;
8
- type: 'inactivity' | 'before_event';
9
- threshold: number;
10
- timeUnit: 'seconds' | 'minutes' | 'hours' | 'days';
11
- message: string;
12
- excludedWeekDays?: number[];
13
- excludeHolidays?: boolean;
14
- excludedTimeStart?: string;
15
- excludedTimeEnd?: string;
16
- }
17
- /** Keep in sync with workers/backend/src/routes/api/ci/types.ts — cannot import due to separate deployment bundle. */
18
- export interface HubAsCodeKanbanStatus {
19
- id?: string;
20
- name: string;
21
- order?: number;
22
- color?: string;
23
- isInitialStatus?: boolean;
24
- triggersAgentResponse?: boolean;
25
- allowsAgentUpdate?: boolean;
26
- isTerminalStatus?: boolean;
27
- isSchedulingStatus?: boolean;
28
- eventName?: string;
29
- additional_instructions?: string;
30
- label_additional_context?: string;
31
- followups?: HubAsCodeKanbanFollowup[];
32
- }
33
- export interface HubAsCodePayload {
34
- version: number;
35
- hub_id: string;
36
- hub_environment: string;
37
- preview_label?: string | null;
38
- branch_name?: string | null;
39
- hub: {
40
- name: string;
41
- description?: string;
42
- hub_type?: string;
43
- ai_mode?: string;
44
- timezone?: string;
45
- app_permission?: string;
46
- non_app_permission?: string;
47
- mcp_access?: string;
48
- file_handling_mode?: string;
49
- max_file_size_for_attachment?: number;
50
- hub_sla?: Record<string, number>;
51
- kanban_statuses?: HubAsCodeKanbanStatus[];
52
- };
53
- agents?: HubAsCodeAgent[];
54
- resources?: HubAsCodeResource[];
55
- states?: HubAsCodeState[];
56
- teams?: HubAsCodeTeam[];
57
- connections?: Array<{
58
- name: string;
59
- type: string;
60
- service?: string;
61
- credential?: string;
62
- }>;
63
- }
64
- export interface HubAsCodeAgent {
65
- id?: string;
66
- name: string;
67
- role: string;
68
- connection: string;
69
- instructions?: string;
70
- enabled?: boolean;
71
- include_message_timestamps?: boolean;
72
- settings?: Record<string, unknown>;
73
- response_format?: {
74
- type: string;
75
- schema_name: string;
76
- schema_json: Record<string, unknown>;
77
- };
78
- tools?: {
79
- native?: string[];
80
- delegation?: Array<{
81
- type: string;
82
- tool: string;
83
- target: string;
84
- }>;
85
- custom?: HubAsCodeCustomTool[];
86
- };
87
- resources?: HubAsCodeAgentResource[];
88
- }
89
- export interface HubAsCodeCustomTool {
90
- id?: string;
91
- name: string;
92
- description?: string;
93
- method?: string;
94
- path?: string;
95
- body_format?: string;
96
- connection?: string;
97
- headers?: Record<string, unknown>;
98
- query_params?: Record<string, unknown>;
99
- body_params?: Record<string, unknown>;
100
- instructions?: string;
101
- enabled?: boolean;
102
- }
103
- export interface HubAsCodeState {
104
- id?: string;
105
- name: string;
106
- scope: string;
107
- description?: string;
108
- enabled?: boolean;
109
- json_schema?: Record<string, unknown>;
110
- initial_value?: Record<string, unknown>;
111
- }
112
- /** Keep in sync with workers/backend/src/routes/api/ci/types.ts — cannot import due to separate deployment bundle. */
113
- export interface HubAsCodeTeam {
114
- id?: string;
115
- name: string;
116
- access_rule?: 'anytime' | 'anytime_if_delegated_once' | 'only_while_delegated';
117
- initial_team?: boolean;
118
- display_only_if_claimed?: boolean;
119
- }
120
- export interface HubAsCodeResource {
121
- id?: string;
122
- name: string;
123
- type?: string;
124
- description?: string;
125
- enabled?: boolean;
126
- user_browsable?: boolean;
127
- skill_name?: string;
128
- files?: HubAsCodeResourceFile[];
129
- }
130
- export interface HubAsCodeResourceFile {
131
- id?: string;
132
- path: string;
133
- title?: string;
134
- content?: string;
135
- content_base64?: string;
136
- download_url?: string;
137
- mime_type?: string;
138
- file_size?: number;
139
- hash?: string;
140
- }
141
- export interface HubAsCodeAgentResource {
142
- name: string;
143
- resource_id?: string;
144
- priority?: number;
145
- enabled?: boolean;
146
- include_structure_in_prompt?: boolean;
147
- use_native_integration?: boolean;
148
- }
149
- export interface CiDiffResponse {
150
- has_changes: boolean;
151
- direction: 'push' | 'pull';
152
- summary: string;
153
- diff: unknown;
154
- }
155
- export interface CiLookupResponse {
156
- hub_id: string;
157
- hub_name: string;
158
- hub_environment: string;
159
- preview_label?: string | null;
160
- branch_name?: string | null;
161
- project_name: string;
162
- organization_name: string;
163
- }
164
- export interface CiOrganizationsResponse {
165
- organizations: Array<{
166
- id: string;
167
- name: string;
168
- }>;
169
- }
170
- export interface CiHubListItem {
171
- hub_id: string;
172
- hub_name: string;
173
- hub_environment: string;
174
- preview_label: string | null;
175
- branch_name: string | null;
176
- production_hub_fk: string | null;
177
- project_id: string;
178
- project_name: string;
179
- }
180
- export interface CiHubListResponse {
181
- hubs: CiHubListItem[];
182
- }
183
- export interface CiSyncResponse {
184
- preview_hub_id: string;
185
- created: boolean;
186
- changes: {
187
- hub_updated: boolean;
188
- connections_created: number;
189
- agents_created: number;
190
- agents_updated: number;
191
- agents_deleted: number;
192
- tools_created: number;
193
- tools_updated: number;
194
- tools_deleted: number;
195
- states_created: number;
196
- states_updated: number;
197
- states_deleted: number;
198
- teams_created: number;
199
- teams_updated: number;
200
- teams_deleted: number;
201
- resources_created: number;
202
- resources_updated: number;
203
- resources_deleted: number;
204
- resource_files_uploaded: number;
205
- resource_files_deleted: number;
206
- resource_links_created: number;
207
- resource_links_updated: number;
208
- resource_links_deleted: number;
209
- evals_created: number;
210
- evals_updated: number;
211
- evals_deleted: number;
212
- };
213
- errors?: string[];
214
- }
4
+ export type { HubAsCodeKanbanFollowup, HubAsCodeKanbanStatus, HubAsCodePayload, HubAsCodeAgent, HubAsCodeCustomTool, HubAsCodeState, HubAsCodeTeam, HubAsCodeResource, HubAsCodeResourceFile, HubAsCodeAgentResource, CiDiffResponse, CiLookupResponse, CiOrganizationsResponse, CiHubListItem, CiHubListResponse, CiSyncResponse, } from '@wayai/shared/contracts/ci';
package/dist/lib/types.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Shared types for the CLI — mirrors backend CI types
2
+ * Shared types for the CLI — imported from @wayai/shared/contracts
3
3
  */
4
4
  export {};
5
5
  //# sourceMappingURL=types.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wayai/cli",
3
- "version": "0.2.18",
3
+ "version": "0.2.19",
4
4
  "description": "WayAI CLI — sync hub configuration between local files and the platform",
5
5
  "type": "module",
6
6
  "bin": {
@@ -39,6 +39,7 @@
39
39
  "devDependencies": {
40
40
  "@types/js-yaml": "^4.0.9",
41
41
  "@types/node": "^20.11.0",
42
+ "@wayai/shared": "workspace:*",
42
43
  "typescript": "^5.5.0",
43
44
  "vitest": "^3.2.0"
44
45
  },