@burdenoff/cli-sdk 2026.522.1 → 2026.525.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/chunk-REBBLQFS.js +1551 -0
- package/dist/modules/auth/index.cjs +34 -34
- package/dist/modules/auth/index.js +1 -1
- package/dist/modules/conversations/index.cjs +125 -7
- package/dist/modules/conversations/index.js +124 -6
- package/dist/modules/export/index.cjs +63 -5
- package/dist/modules/export/index.js +63 -5
- package/dist/modules/files/index.cjs +21 -6
- package/dist/modules/files/index.js +24 -9
- package/dist/modules/integrations/index.cjs +92 -8
- package/dist/modules/integrations/index.js +92 -8
- package/dist/modules/rbac/index.cjs +30 -6
- package/dist/modules/rbac/index.js +30 -6
- package/dist/modules/sandbox/index.cjs +154 -13
- package/dist/modules/sandbox/index.js +1 -1
- package/dist/modules/scheduler/index.cjs +116 -6
- package/dist/modules/scheduler/index.js +116 -6
- package/dist/modules/security/index.cjs +15 -9
- package/dist/modules/security/index.js +17 -11
- package/dist/modules/vibecontrols/index.cjs +871 -336
- package/dist/modules/vibecontrols/index.js +6 -2
- package/package.json +2 -2
- package/dist/chunk-MRONTCXQ.js +0 -879
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var
|
|
1
|
+
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var et=["workspaceEndpoint","globalEndpoint","oidcIssuer","clientId","defaultFormat","verbose","authServiceEndpoint"];var m=class extends Error{exitCode;hint;constructor(i,n){super(i),this.name="CliUserError",this.exitCode=n?.exitCode??1,this.hint=n?.hint;}},R=class extends m{constructor(i,n){super(i,{exitCode:2,hint:n?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},$=class extends Error{cause;constructor(i,n){super(i),this.name="CliInternalError",this.cause=n;}};var nt=null;function mt(p){nt=p;}function E(){if(!nt)throw new $("vibecontrols module helpers used before setHelpersContext was called");return nt}function $a(){let p=E();if(!p.auth.isAuthenticated())throw new R(`Authentication required. Run \`${p.productName} auth login\`.`)}async function r(p,i){return $a(),E().gql.workspace.request(p,i)}function a(p){let i=p instanceof Error?p.message:String(p);throw new m(i)}function d(p,i,n){E().output.formatAndOutput(p,i,n);}function c(p){E().output.printSuccess(p);}function T(p){E().output.printError(p);}function gt(p){E().output.printJson(p);}function b(p){return E().output.formatStatus(p)}function S(p){return E().output.formatDate(p)}function f(p,i){return E().output.truncate(p,i)}function l(p,i){return E().output.confirm(p,i)}function lt(p,i){E().output.printTable(p,i);}function H(){return E().auth.read()}function ft(){return E().config.read()}function It(p){return E().config.get(p)}function St(p,i){E().config.set(p,i);}function yt(){return E().config.path()}var ot=et;var O=`
|
|
2
2
|
id name hostname platform architecture version
|
|
3
3
|
tunnelUrl tunnelStatus apiUrl isActive lastHeartbeat
|
|
4
4
|
workspaceId createdAt updatedAt
|
|
5
|
-
`,
|
|
5
|
+
`,A=`
|
|
6
6
|
id name description path type status agentId parentId
|
|
7
7
|
gitBranch gitRemote tags metadata
|
|
8
8
|
workspaceId archivedAt createdAt updatedAt
|
|
9
|
-
`,
|
|
9
|
+
`,h=`
|
|
10
10
|
id name command workingDirectory type status agentId vibeId
|
|
11
11
|
providerSessionName pid exitCode ttydUrl lastOutput autoStart
|
|
12
12
|
startedAt stoppedAt workspaceId createdAt updatedAt
|
|
13
|
-
`,
|
|
13
|
+
`,C=`
|
|
14
14
|
id title content isPinned vibeId createdBy
|
|
15
15
|
workspaceId createdAt updatedAt
|
|
16
|
-
`,
|
|
16
|
+
`,K=`
|
|
17
17
|
id key value scope scopeId isSecret
|
|
18
18
|
workspaceId createdAt updatedAt
|
|
19
|
-
|
|
19
|
+
`,w=`
|
|
20
20
|
id name url events agentIds isActive signingKey retryPolicy
|
|
21
21
|
deliveryCount failureCount lastDelivery lastError
|
|
22
22
|
workspaceId createdAt updatedAt
|
|
23
|
-
`,
|
|
23
|
+
`,v=`
|
|
24
24
|
id userId state activeVibeId activeSessionId
|
|
25
25
|
recentVibes recentSessions workspaceId createdAt updatedAt
|
|
26
|
-
`,
|
|
26
|
+
`,D=`
|
|
27
27
|
id workspaceId slug name description
|
|
28
28
|
providerKey protocol localPort localHost tlsMode
|
|
29
29
|
status lastError agentId
|
|
30
30
|
hasBasicAuth
|
|
31
31
|
primaryDomain { id hostname type verificationStatus isPrimary }
|
|
32
32
|
createdAt updatedAt
|
|
33
|
-
`,
|
|
33
|
+
`,Et=`
|
|
34
34
|
id key displayName description isEnabled
|
|
35
35
|
capabilities {
|
|
36
36
|
supportsHttp supportsHttps supportsTcp supportsUdp
|
|
@@ -39,22 +39,22 @@
|
|
|
39
39
|
supportsLiveLogs supportsUsageMetrics supportsRotateCredentials
|
|
40
40
|
supportedVisibilities platforms
|
|
41
41
|
}
|
|
42
|
-
`,
|
|
42
|
+
`,P=`
|
|
43
43
|
id workspaceId tunnelId type hostname environment
|
|
44
44
|
verificationStatus challengeRecordName challengeToken
|
|
45
45
|
verifiedAt lastCheckedAt lastCheckError isPrimary
|
|
46
46
|
dnsTargetHint createdAt updatedAt
|
|
47
|
-
`,
|
|
47
|
+
`,Tt=`
|
|
48
48
|
id workspaceId tunnelId shardId agentId status
|
|
49
49
|
tokenFingerprint issuedAt expiresAt connectedAt disconnectedAt
|
|
50
50
|
revokedAt revokedReason clientIp bytesIn bytesOut
|
|
51
|
-
`,
|
|
51
|
+
`,V=`
|
|
52
52
|
id name type host port username status
|
|
53
53
|
workspaceId createdAt updatedAt
|
|
54
|
-
`,
|
|
54
|
+
`,it=`
|
|
55
55
|
id sourceAgentId targetId protocol status permissions
|
|
56
56
|
createdAt updatedAt
|
|
57
|
-
`,
|
|
57
|
+
`,k=`
|
|
58
58
|
id name description isDefault
|
|
59
59
|
workspaceId createdAt updatedAt
|
|
60
60
|
`,N=`
|
|
@@ -62,59 +62,59 @@
|
|
|
62
62
|
row column color category tags
|
|
63
63
|
confirmationRequired keyboardShortcut style sortOrder
|
|
64
64
|
createdAt updatedAt
|
|
65
|
-
`,
|
|
65
|
+
`,W=`
|
|
66
66
|
id agentId source eventType payload
|
|
67
67
|
workspaceId createdAt
|
|
68
|
-
`,
|
|
68
|
+
`,x=`
|
|
69
69
|
id vibeId name visibility runtime
|
|
70
70
|
workspaceId createdAt updatedAt
|
|
71
|
-
`,
|
|
71
|
+
`,G=`
|
|
72
72
|
id siteId title slug content parentId sidebarPosition status
|
|
73
73
|
createdAt updatedAt
|
|
74
|
-
`,
|
|
74
|
+
`,j=`
|
|
75
75
|
id siteId revisionNumber status buildDurationMs artifactSizeBytes
|
|
76
76
|
errorMessage publishedAt
|
|
77
77
|
createdAt updatedAt
|
|
78
|
-
`,
|
|
78
|
+
`,bt=`
|
|
79
79
|
id action resourceType resourceId actorId actorType
|
|
80
80
|
status description ipAddress userAgent requestId
|
|
81
81
|
workspaceId createdAt
|
|
82
|
-
`,
|
|
82
|
+
`,Y=`
|
|
83
83
|
id sessionId sharedWithId permission createdBy
|
|
84
84
|
createdAt updatedAt
|
|
85
|
-
`,
|
|
85
|
+
`,At=`
|
|
86
86
|
id sessionId token permission expiresAt
|
|
87
87
|
createdAt
|
|
88
|
-
`,
|
|
88
|
+
`,ht=`
|
|
89
89
|
query VibecontrolsAgents($filter: VibecontrolsAgentFilterInput) {
|
|
90
|
-
vibecontrolsAgents(filter: $filter) { ${
|
|
90
|
+
vibecontrolsAgents(filter: $filter) { ${O} }
|
|
91
91
|
}
|
|
92
|
-
`,
|
|
92
|
+
`,Ct=`
|
|
93
93
|
query VibecontrolsAgent($id: ID!) {
|
|
94
|
-
vibecontrolsAgent(id: $id) { ${
|
|
94
|
+
vibecontrolsAgent(id: $id) { ${O} }
|
|
95
95
|
}
|
|
96
|
-
`,
|
|
96
|
+
`,Dt=`
|
|
97
97
|
mutation UpdateVibecontrolsAgent($id: ID!, $input: UpdateVibecontrolsAgentInput!) {
|
|
98
|
-
updateVibecontrolsAgent(id: $id, input: $input) { ${
|
|
98
|
+
updateVibecontrolsAgent(id: $id, input: $input) { ${O} }
|
|
99
99
|
}
|
|
100
|
-
`,
|
|
100
|
+
`,Ot=`
|
|
101
101
|
mutation DeleteVibecontrolsAgent($id: ID!) { deleteVibecontrolsAgent(id: $id) }
|
|
102
|
-
|
|
102
|
+
`,$t=`
|
|
103
103
|
mutation VibecontrolsAgentHeartbeat($id: ID!) {
|
|
104
104
|
vibecontrolsAgentHeartbeat(id: $id) { id isActive lastHeartbeat }
|
|
105
105
|
}
|
|
106
|
-
`,
|
|
106
|
+
`,wt=`
|
|
107
107
|
query ProbeAgentConnection($id: ID!) {
|
|
108
108
|
probeAgentConnection(id: $id) {
|
|
109
109
|
healthOk healthStatus agentVersion hostname platform architecture uptime
|
|
110
110
|
healthError identityOk identityError
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
`,
|
|
113
|
+
`,vt=`
|
|
114
114
|
query { vibecontrolsAgentHealthProbes {
|
|
115
115
|
agentId agentName healthy tunnelUrl agentVersion uptime errorMessage
|
|
116
116
|
}}
|
|
117
|
-
`,
|
|
117
|
+
`,kt=`
|
|
118
118
|
query AgentPlugins($agentId: ID!) {
|
|
119
119
|
agentPlugins(agentId: $agentId) {
|
|
120
120
|
installed { pluginName packageName version loaded isCore tags }
|
|
@@ -122,516 +122,578 @@
|
|
|
122
122
|
error
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
`,
|
|
125
|
+
`,_t=`
|
|
126
126
|
mutation InstallAgentPlugin($agentId: ID!, $packageName: String!) {
|
|
127
127
|
installAgentPlugin(agentId: $agentId, packageName: $packageName) { success error }
|
|
128
128
|
}
|
|
129
|
-
`,
|
|
129
|
+
`,Rt=`
|
|
130
130
|
mutation RemoveAgentPlugin($agentId: ID!, $packageName: String!) {
|
|
131
131
|
removeAgentPlugin(agentId: $agentId, packageName: $packageName) { success error }
|
|
132
132
|
}
|
|
133
|
-
`,
|
|
133
|
+
`,rt=`
|
|
134
134
|
mutation RegisterVibecontrolsAgent($input: CreateVibecontrolsAgentInput!) {
|
|
135
|
-
registerVibecontrolsAgent(input: $input) { ${
|
|
135
|
+
registerVibecontrolsAgent(input: $input) { ${O} }
|
|
136
136
|
}
|
|
137
|
-
`,
|
|
137
|
+
`,Nt=`
|
|
138
138
|
mutation DeactivateVibecontrolsAgent($id: ID!) {
|
|
139
|
-
deactivateVibecontrolsAgent(id: $id) { ${
|
|
139
|
+
deactivateVibecontrolsAgent(id: $id) { ${O} }
|
|
140
140
|
}
|
|
141
|
-
`,
|
|
141
|
+
`,xt=`
|
|
142
142
|
mutation PushAgentGatewayAuth($input: PushAgentGatewayAuthInput!) {
|
|
143
143
|
pushAgentGatewayAuth(input: $input)
|
|
144
144
|
}
|
|
145
|
-
`,
|
|
145
|
+
`,Ut=`
|
|
146
146
|
mutation SetupAgentGatewayAuth($input: SetupAgentGatewayAuthInput!) {
|
|
147
147
|
setupAgentGatewayAuth(input: $input)
|
|
148
148
|
}
|
|
149
|
-
`,
|
|
149
|
+
`,Lt=`
|
|
150
150
|
mutation UpdateAgentVersion($agentId: ID!, $version: String!) {
|
|
151
|
-
updateAgentVersion(agentId: $agentId, version: $version) { ${
|
|
151
|
+
updateAgentVersion(agentId: $agentId, version: $version) { ${O} }
|
|
152
152
|
}
|
|
153
|
-
`,
|
|
153
|
+
`,Pt=`
|
|
154
154
|
mutation ConnectAgentToTarget($sourceAgentId: ID!, $targetId: ID!, $protocol: String!) {
|
|
155
|
-
connectAgentToTarget(sourceAgentId: $sourceAgentId, targetId: $targetId, protocol: $protocol) { ${
|
|
155
|
+
connectAgentToTarget(sourceAgentId: $sourceAgentId, targetId: $targetId, protocol: $protocol) { ${it} }
|
|
156
156
|
}
|
|
157
|
-
`,
|
|
157
|
+
`,Vt=`
|
|
158
158
|
mutation DisconnectAgentFromTarget($connectionId: ID!) {
|
|
159
159
|
disconnectAgentFromTarget(connectionId: $connectionId)
|
|
160
160
|
}
|
|
161
|
-
`,
|
|
161
|
+
`,Gt=`
|
|
162
162
|
query AgentGraph($workspaceId: ID!, $rootAgentId: ID) {
|
|
163
163
|
agentGraph(workspaceId: $workspaceId, rootAgentId: $rootAgentId) {
|
|
164
|
-
agents { ${
|
|
165
|
-
connections { ${
|
|
164
|
+
agents { ${O} }
|
|
165
|
+
connections { ${it} }
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
|
-
`,
|
|
168
|
+
`,qt=`
|
|
169
169
|
query Vibes($filter: VibeFilterInput, $pagination: PaginationInput) {
|
|
170
170
|
vibes(filter: $filter, pagination: $pagination) {
|
|
171
|
-
items { ${
|
|
171
|
+
items { ${A} } total hasMore
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
-
`,
|
|
175
|
-
query Vibe($id: ID!) { vibe(id: $id) { ${
|
|
176
|
-
|
|
174
|
+
`,Bt=`
|
|
175
|
+
query Vibe($id: ID!) { vibe(id: $id) { ${A} } }
|
|
176
|
+
`,Ft=`
|
|
177
177
|
mutation CreateVibe($input: CreateVibeInput!) {
|
|
178
|
-
createVibe(input: $input) { ${
|
|
178
|
+
createVibe(input: $input) { ${A} }
|
|
179
179
|
}
|
|
180
|
-
`,
|
|
180
|
+
`,Mt=`
|
|
181
181
|
mutation UpdateVibe($id: ID!, $input: UpdateVibeInput!) {
|
|
182
|
-
updateVibe(id: $id, input: $input) { ${
|
|
182
|
+
updateVibe(id: $id, input: $input) { ${A} }
|
|
183
183
|
}
|
|
184
|
-
`,
|
|
185
|
-
mutation ArchiveVibe($id: ID!) { archiveVibe(id: $id) { ${
|
|
186
|
-
`,
|
|
187
|
-
mutation RestoreVibe($id: ID!) { restoreVibe(id: $id) { ${
|
|
188
|
-
`,
|
|
184
|
+
`,Ht="mutation DeleteVibe($id: ID!) { deleteVibe(id: $id) }",Kt=`
|
|
185
|
+
mutation ArchiveVibe($id: ID!) { archiveVibe(id: $id) { ${A} } }
|
|
186
|
+
`,Wt=`
|
|
187
|
+
mutation RestoreVibe($id: ID!) { restoreVibe(id: $id) { ${A} } }
|
|
188
|
+
`,jt=`
|
|
189
189
|
query VibeHierarchy($rootId: ID) {
|
|
190
|
-
vibeHierarchy(rootId: $rootId) { ${
|
|
190
|
+
vibeHierarchy(rootId: $rootId) { ${A} }
|
|
191
191
|
}
|
|
192
|
-
`,
|
|
192
|
+
`,Yt=`
|
|
193
193
|
query SearchVibes($query: String!, $limit: Int) {
|
|
194
|
-
searchVibes(query: $query, limit: $limit) { ${
|
|
194
|
+
searchVibes(query: $query, limit: $limit) { ${A} }
|
|
195
195
|
}
|
|
196
|
-
`,
|
|
196
|
+
`,Jt=`
|
|
197
197
|
mutation MoveVibe($id: ID!, $newParentId: ID) {
|
|
198
|
-
moveVibe(id: $id, newParentId: $newParentId) { ${
|
|
198
|
+
moveVibe(id: $id, newParentId: $newParentId) { ${A} }
|
|
199
199
|
}
|
|
200
|
-
`,
|
|
200
|
+
`,Xt=`
|
|
201
201
|
mutation UpdateVibeStatus($id: ID!, $status: VibeStatus!) {
|
|
202
|
-
updateVibeStatus(id: $id, status: $status) { ${
|
|
202
|
+
updateVibeStatus(id: $id, status: $status) { ${A} }
|
|
203
203
|
}
|
|
204
|
-
`,
|
|
204
|
+
`,zt=`
|
|
205
205
|
mutation UpdateVibeGit($id: ID!, $gitBranch: String, $gitRemote: String, $gitStatus: JSON) {
|
|
206
|
-
updateVibeGit(id: $id, gitBranch: $gitBranch, gitRemote: $gitRemote, gitStatus: $gitStatus) { ${
|
|
206
|
+
updateVibeGit(id: $id, gitBranch: $gitBranch, gitRemote: $gitRemote, gitStatus: $gitStatus) { ${A} }
|
|
207
207
|
}
|
|
208
|
-
`,
|
|
208
|
+
`,Qt=`
|
|
209
209
|
query Sessions($filter: SessionFilterInput, $pagination: PaginationInput) {
|
|
210
210
|
sessions(filter: $filter, pagination: $pagination) {
|
|
211
|
-
items { ${
|
|
211
|
+
items { ${h} } total hasMore
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
`,
|
|
215
|
-
query Session($id: ID!) { session(id: $id) { ${
|
|
216
|
-
`,
|
|
214
|
+
`,Zt=`
|
|
215
|
+
query Session($id: ID!) { session(id: $id) { ${h} } }
|
|
216
|
+
`,te=`
|
|
217
217
|
mutation CreateSession($input: CreateSessionInput!) {
|
|
218
|
-
createSession(input: $input) { ${
|
|
218
|
+
createSession(input: $input) { ${h} }
|
|
219
219
|
}
|
|
220
|
-
`,
|
|
221
|
-
mutation StartSession($id: ID!) { startSession(id: $id) { ${
|
|
222
|
-
`,
|
|
223
|
-
mutation StopSession($id: ID!) { stopSession(id: $id) { ${
|
|
224
|
-
`,
|
|
225
|
-
mutation RestartSession($id: ID!) { restartSession(id: $id) { ${
|
|
226
|
-
`,
|
|
220
|
+
`,ee=`
|
|
221
|
+
mutation StartSession($id: ID!) { startSession(id: $id) { ${h} } }
|
|
222
|
+
`,ne=`
|
|
223
|
+
mutation StopSession($id: ID!) { stopSession(id: $id) { ${h} } }
|
|
224
|
+
`,oe=`
|
|
225
|
+
mutation RestartSession($id: ID!) { restartSession(id: $id) { ${h} } }
|
|
226
|
+
`,ie=`
|
|
227
227
|
mutation TerminateSession($id: ID!) { terminateSession(id: $id) }
|
|
228
|
-
`,
|
|
228
|
+
`,re=`
|
|
229
229
|
query SessionOutput($id: ID!, $lines: Int) { sessionOutput(id: $id, lines: $lines) }
|
|
230
|
-
`,
|
|
230
|
+
`,ae=`
|
|
231
231
|
mutation SendSessionInput($id: ID!, $input: String!) {
|
|
232
232
|
sendSessionInput(id: $id, input: $input)
|
|
233
233
|
}
|
|
234
|
-
`,
|
|
234
|
+
`,se=`
|
|
235
235
|
mutation StartSessionTerminal($id: ID!) {
|
|
236
|
-
startSessionTerminal(id: $id) { ${
|
|
236
|
+
startSessionTerminal(id: $id) { ${h} }
|
|
237
237
|
}
|
|
238
|
-
`,
|
|
238
|
+
`,ce=`
|
|
239
239
|
mutation StopSessionTerminal($id: ID!) {
|
|
240
|
-
stopSessionTerminal(id: $id) { ${
|
|
240
|
+
stopSessionTerminal(id: $id) { ${h} }
|
|
241
241
|
}
|
|
242
|
-
`,
|
|
242
|
+
`,de=`
|
|
243
243
|
mutation RestartSessionTerminal($id: ID!) {
|
|
244
|
-
restartSessionTerminal(id: $id) { ${
|
|
244
|
+
restartSessionTerminal(id: $id) { ${h} }
|
|
245
245
|
}
|
|
246
|
-
`,
|
|
246
|
+
`,pe=`
|
|
247
247
|
query ActiveSessions($vibeId: ID) {
|
|
248
|
-
activeSessions(vibeId: $vibeId) { ${
|
|
248
|
+
activeSessions(vibeId: $vibeId) { ${h} }
|
|
249
249
|
}
|
|
250
|
-
`,
|
|
250
|
+
`,ue=`
|
|
251
251
|
mutation CheckSessionHealth {
|
|
252
252
|
checkSessionHealth { checked updated errors }
|
|
253
253
|
}
|
|
254
|
-
`,
|
|
254
|
+
`,me=`
|
|
255
255
|
mutation ShareSession($input: ShareSessionInput!) {
|
|
256
|
-
shareSession(input: $input) { ${
|
|
256
|
+
shareSession(input: $input) { ${Y} }
|
|
257
257
|
}
|
|
258
|
-
`,
|
|
258
|
+
`,ge=`
|
|
259
259
|
mutation CreateSessionShareLink($input: CreateSessionShareLinkInput!) {
|
|
260
|
-
createSessionShareLink(input: $input) { ${
|
|
260
|
+
createSessionShareLink(input: $input) { ${At} }
|
|
261
261
|
}
|
|
262
|
-
`,
|
|
262
|
+
`,le=`
|
|
263
263
|
mutation RevokeSessionShare($id: ID!) { revokeSessionShare(id: $id) }
|
|
264
|
-
`,
|
|
264
|
+
`,fe=`
|
|
265
265
|
mutation RevokeSessionShareLink($id: ID!) { revokeSessionShareLink(id: $id) }
|
|
266
|
-
`,
|
|
266
|
+
`,Ie=`
|
|
267
267
|
mutation UpdateSessionShare($id: ID!, $input: UpdateSessionShareInput!) {
|
|
268
|
-
updateSessionShare(id: $id, input: $input) { ${
|
|
268
|
+
updateSessionShare(id: $id, input: $input) { ${Y} }
|
|
269
269
|
}
|
|
270
|
-
`,
|
|
270
|
+
`,Se=`
|
|
271
271
|
mutation JoinSharedSession($input: JoinSharedSessionInput!) {
|
|
272
272
|
joinSharedSession(input: $input)
|
|
273
273
|
}
|
|
274
|
-
`,
|
|
274
|
+
`,ye=`
|
|
275
275
|
mutation LeaveSharedSession($sessionId: ID!) { leaveSharedSession(sessionId: $sessionId) }
|
|
276
|
-
`,
|
|
276
|
+
`,Ee=`
|
|
277
277
|
mutation RequestSessionControl($sessionId: ID!) { requestSessionControl(sessionId: $sessionId) }
|
|
278
|
-
`,
|
|
278
|
+
`,Te=`
|
|
279
279
|
mutation ReleaseSessionControl($sessionId: ID!) { releaseSessionControl(sessionId: $sessionId) }
|
|
280
|
-
`,
|
|
280
|
+
`,be=`
|
|
281
281
|
mutation TransferSessionControl($sessionId: ID!, $toUserId: ID!) {
|
|
282
282
|
transferSessionControl(sessionId: $sessionId, toUserId: $toUserId)
|
|
283
283
|
}
|
|
284
|
-
`,
|
|
284
|
+
`,Ae=`
|
|
285
285
|
query SessionShares($sessionId: ID!) {
|
|
286
|
-
sessionShares(sessionId: $sessionId) { ${
|
|
286
|
+
sessionShares(sessionId: $sessionId) { ${Y} }
|
|
287
287
|
}
|
|
288
|
-
`,
|
|
288
|
+
`,he=`
|
|
289
289
|
query SessionShareLinks($sessionId: ID!) {
|
|
290
|
-
sessionShareLinks(sessionId: $sessionId) { ${
|
|
290
|
+
sessionShareLinks(sessionId: $sessionId) { ${At} }
|
|
291
291
|
}
|
|
292
|
-
`,
|
|
292
|
+
`,Ce=`
|
|
293
293
|
query SessionCollaborators($sessionId: ID!) {
|
|
294
294
|
sessionCollaborators(sessionId: $sessionId) { userId hasControl joinedAt }
|
|
295
295
|
}
|
|
296
|
-
`,
|
|
296
|
+
`,De=`
|
|
297
297
|
query SessionsSharedWithMe($filter: SessionShareFilterInput, $pagination: PaginationInput) {
|
|
298
|
-
sessionsSharedWithMe(filter: $filter, pagination: $pagination) { ${
|
|
298
|
+
sessionsSharedWithMe(filter: $filter, pagination: $pagination) { ${Y} }
|
|
299
299
|
}
|
|
300
|
-
`,
|
|
300
|
+
`,Oe=`
|
|
301
301
|
mutation BulkRestartSessions($ids: [ID!]!) {
|
|
302
302
|
bulkRestartSessions(ids: $ids) { succeeded failed }
|
|
303
303
|
}
|
|
304
|
-
|
|
304
|
+
`,$e=`
|
|
305
305
|
mutation BulkStopSessions($ids: [ID!]!) {
|
|
306
306
|
bulkStopSessions(ids: $ids) { succeeded failed }
|
|
307
307
|
}
|
|
308
|
-
`,
|
|
308
|
+
`,we=`
|
|
309
309
|
mutation BulkTerminateSessions($ids: [ID!]!) {
|
|
310
310
|
bulkTerminateSessions(ids: $ids) { succeeded failed }
|
|
311
311
|
}
|
|
312
|
-
`,
|
|
312
|
+
`,ve=`
|
|
313
313
|
query Notes($filter: VibecontrolsNoteFilterInput, $pagination: PaginationInput) {
|
|
314
314
|
notes(filter: $filter, pagination: $pagination) {
|
|
315
|
-
items { ${
|
|
315
|
+
items { ${C} } total hasMore
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
|
-
`,
|
|
319
|
-
query Note($id: ID!) { note(id: $id) { ${
|
|
320
|
-
`,
|
|
318
|
+
`,ke=`
|
|
319
|
+
query Note($id: ID!) { note(id: $id) { ${C} } }
|
|
320
|
+
`,_e=`
|
|
321
321
|
mutation CreateNote($input: CreateVibecontrolsNoteInput!) {
|
|
322
|
-
createNote(input: $input) { ${
|
|
322
|
+
createNote(input: $input) { ${C} }
|
|
323
323
|
}
|
|
324
|
-
`,
|
|
324
|
+
`,Re=`
|
|
325
325
|
mutation UpdateNote($id: ID!, $input: UpdateVibecontrolsNoteInput!) {
|
|
326
|
-
updateNote(id: $id, input: $input) { ${
|
|
326
|
+
updateNote(id: $id, input: $input) { ${C} }
|
|
327
327
|
}
|
|
328
|
-
`,
|
|
328
|
+
`,Ne="mutation DeleteNote($id: ID!) { deleteNote(id: $id) }",xe=`
|
|
329
329
|
query SearchNotes($query: String!, $vibeId: ID, $limit: Int) {
|
|
330
|
-
searchNotes(query: $query, vibeId: $vibeId, limit: $limit) { ${
|
|
330
|
+
searchNotes(query: $query, vibeId: $vibeId, limit: $limit) { ${C} }
|
|
331
331
|
}
|
|
332
|
-
`,
|
|
333
|
-
mutation PinNote($id: ID!) { pinNote(id: $id) { ${
|
|
334
|
-
`,
|
|
335
|
-
mutation UnpinNote($id: ID!) { unpinNote(id: $id) { ${
|
|
336
|
-
`,
|
|
332
|
+
`,Ue=`
|
|
333
|
+
mutation PinNote($id: ID!) { pinNote(id: $id) { ${C} } }
|
|
334
|
+
`,Le=`
|
|
335
|
+
mutation UnpinNote($id: ID!) { unpinNote(id: $id) { ${C} } }
|
|
336
|
+
`,Pe=`
|
|
337
337
|
mutation TagNote($input: TagNoteInput!) {
|
|
338
|
-
tagNote(input: $input) { ${
|
|
338
|
+
tagNote(input: $input) { ${C} }
|
|
339
339
|
}
|
|
340
|
-
`,
|
|
340
|
+
`,Ve=`
|
|
341
341
|
mutation UntagNote($input: UntagNoteInput!) {
|
|
342
|
-
untagNote(input: $input) { ${
|
|
342
|
+
untagNote(input: $input) { ${C} }
|
|
343
343
|
}
|
|
344
|
-
`,
|
|
344
|
+
`,Ge=`
|
|
345
345
|
mutation ReplaceNoteTags($input: ReplaceNoteTagsInput!) {
|
|
346
|
-
replaceNoteTags(input: $input) { ${
|
|
346
|
+
replaceNoteTags(input: $input) { ${C} }
|
|
347
347
|
}
|
|
348
|
-
`,
|
|
348
|
+
`,qe=`
|
|
349
349
|
mutation CreateNoteTag($input: CreateNoteTagInput!) {
|
|
350
350
|
createNoteTag(input: $input) { id name }
|
|
351
351
|
}
|
|
352
|
-
`,
|
|
352
|
+
`,Be=`
|
|
353
353
|
query AvailableNoteTags($query: String, $limit: Int) {
|
|
354
354
|
availableNoteTags(query: $query, limit: $limit) { id name }
|
|
355
355
|
}
|
|
356
|
-
|
|
356
|
+
`,Fe=`
|
|
357
357
|
query GetNoteTags($noteId: ID!) { getNoteTags(noteId: $noteId) }
|
|
358
|
-
`,
|
|
358
|
+
`,Me=`
|
|
359
359
|
query GetRelatedNoteTags($noteId: ID!, $limit: Int) {
|
|
360
360
|
getRelatedNoteTags(noteId: $noteId, limit: $limit) { id name }
|
|
361
361
|
}
|
|
362
|
-
`,
|
|
362
|
+
`,He=`
|
|
363
363
|
mutation BulkDeleteNotes($ids: [ID!]!) { bulkDeleteNotes(ids: $ids) }
|
|
364
|
-
`,
|
|
364
|
+
`,Ke=`
|
|
365
365
|
query ConfigurationsByScope($scope: ConfigScope!, $scopeId: ID) {
|
|
366
|
-
configurationsByScope(scope: $scope, scopeId: $scopeId) { ${
|
|
366
|
+
configurationsByScope(scope: $scope, scopeId: $scopeId) { ${K} }
|
|
367
367
|
}
|
|
368
|
-
`,
|
|
368
|
+
`,We=`
|
|
369
369
|
query Configuration($key: String!, $scope: ConfigScope!, $scopeId: ID) {
|
|
370
|
-
configuration(key: $key, scope: $scope, scopeId: $scopeId) { ${
|
|
370
|
+
configuration(key: $key, scope: $scope, scopeId: $scopeId) { ${K} }
|
|
371
371
|
}
|
|
372
|
-
`,
|
|
372
|
+
`,je=`
|
|
373
373
|
query ConfigurationValue($key: String!, $scope: ConfigScope!, $scopeId: ID) {
|
|
374
374
|
configurationValue(key: $key, scope: $scope, scopeId: $scopeId)
|
|
375
375
|
}
|
|
376
|
-
`,
|
|
376
|
+
`,Ye=`
|
|
377
377
|
mutation SetConfiguration($key: String!, $scope: ConfigScope!, $scopeId: ID, $value: JSON!, $isSecret: Boolean) {
|
|
378
|
-
setConfiguration(key: $key, scope: $scope, scopeId: $scopeId, value: $value, isSecret: $isSecret) { ${
|
|
378
|
+
setConfiguration(key: $key, scope: $scope, scopeId: $scopeId, value: $value, isSecret: $isSecret) { ${K} }
|
|
379
379
|
}
|
|
380
|
-
`,
|
|
380
|
+
`,Je=`
|
|
381
381
|
mutation DeleteConfiguration($key: String!, $scope: ConfigScope!, $scopeId: ID) {
|
|
382
382
|
deleteConfiguration(key: $key, scope: $scope, scopeId: $scopeId)
|
|
383
383
|
}
|
|
384
|
-
`,
|
|
384
|
+
`,Xe=`
|
|
385
385
|
mutation BulkSetConfigurations($configurations: [BulkSetConfigurationInput!]!, $scope: ConfigScope!, $scopeId: ID) {
|
|
386
|
-
bulkSetConfigurations(configurations: $configurations, scope: $scope, scopeId: $scopeId) { ${
|
|
386
|
+
bulkSetConfigurations(configurations: $configurations, scope: $scope, scopeId: $scopeId) { ${K} }
|
|
387
387
|
}
|
|
388
|
-
`,
|
|
388
|
+
`,ze=`
|
|
389
389
|
mutation BulkDeleteConfigurations($keys: [String!]!, $scope: ConfigScope!, $scopeId: ID) {
|
|
390
390
|
bulkDeleteConfigurations(keys: $keys, scope: $scope, scopeId: $scopeId)
|
|
391
391
|
}
|
|
392
|
-
`,
|
|
392
|
+
`,Qe=`
|
|
393
393
|
query Webhooks($filter: WebhookFilterInput, $pagination: PaginationInput) {
|
|
394
394
|
webhooks(filter: $filter, pagination: $pagination) {
|
|
395
|
-
items { ${
|
|
395
|
+
items { ${w} } total hasMore
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
|
-
`,
|
|
399
|
-
query Webhook($id: ID!) { webhook(id: $id) { ${
|
|
400
|
-
`,
|
|
398
|
+
`,Ze=`
|
|
399
|
+
query Webhook($id: ID!) { webhook(id: $id) { ${w} } }
|
|
400
|
+
`,tn=`
|
|
401
401
|
mutation CreateWebhook($input: CreateWebhookInput!) {
|
|
402
|
-
createWebhook(input: $input) { ${
|
|
402
|
+
createWebhook(input: $input) { ${w} }
|
|
403
403
|
}
|
|
404
|
-
`,
|
|
404
|
+
`,en=`
|
|
405
405
|
mutation UpdateWebhook($id: ID!, $input: UpdateWebhookInput!) {
|
|
406
|
-
updateWebhook(id: $id, input: $input) { ${
|
|
406
|
+
updateWebhook(id: $id, input: $input) { ${w} }
|
|
407
407
|
}
|
|
408
|
-
`,
|
|
408
|
+
`,nn=`
|
|
409
409
|
mutation DeleteWebhook($id: ID!) { deleteWebhook(id: $id) }
|
|
410
|
-
`,
|
|
410
|
+
`,on=`
|
|
411
411
|
mutation TestWebhook($id: ID!) { testWebhook(id: $id) }
|
|
412
|
-
`,
|
|
413
|
-
query { activeWebhooks { ${
|
|
414
|
-
`,
|
|
412
|
+
`,rn=`
|
|
413
|
+
query { activeWebhooks { ${w} } }
|
|
414
|
+
`,an=`
|
|
415
415
|
query WebhooksByEvent($event: String!) {
|
|
416
|
-
webhooksByEvent(event: $event) { ${
|
|
416
|
+
webhooksByEvent(event: $event) { ${w} }
|
|
417
417
|
}
|
|
418
|
-
`,
|
|
418
|
+
`,sn=`
|
|
419
419
|
mutation TriggerWebhook($id: ID!, $payload: JSON) {
|
|
420
420
|
triggerWebhook(id: $id, payload: $payload)
|
|
421
421
|
}
|
|
422
|
-
`,
|
|
422
|
+
`,cn=`
|
|
423
423
|
mutation ResetWebhookFailures($id: ID!) {
|
|
424
|
-
resetWebhookFailures(id: $id) { ${
|
|
424
|
+
resetWebhookFailures(id: $id) { ${w} }
|
|
425
425
|
}
|
|
426
|
-
`,
|
|
426
|
+
`,dn=`
|
|
427
427
|
query ListTunnels($filter: TunnelFilterInput, $pagination: PaginationInput) {
|
|
428
428
|
tunnels(filter: $filter, pagination: $pagination) {
|
|
429
|
-
items { ${
|
|
429
|
+
items { ${D} }
|
|
430
430
|
total
|
|
431
431
|
hasMore
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
|
-
`,
|
|
434
|
+
`,pn=`
|
|
435
435
|
query GetTunnel($id: ID!) {
|
|
436
|
-
tunnel(id: $id) { ${
|
|
436
|
+
tunnel(id: $id) { ${D} }
|
|
437
437
|
}
|
|
438
|
-
`,
|
|
438
|
+
`,un=`
|
|
439
439
|
query ListTunnelProviders {
|
|
440
|
-
tunnelProviders { ${
|
|
440
|
+
tunnelProviders { ${Et} }
|
|
441
441
|
}
|
|
442
|
-
`,
|
|
442
|
+
`,mn=`
|
|
443
443
|
mutation CreateTunnel($input: CreateTunnelInput!) {
|
|
444
|
-
createTunnel(input: $input) { ${
|
|
444
|
+
createTunnel(input: $input) { ${D} }
|
|
445
445
|
}
|
|
446
|
-
`,
|
|
446
|
+
`,gn=`
|
|
447
|
+
mutation UpdateTunnel($id: ID!, $input: UpdateTunnelInput!) {
|
|
448
|
+
updateTunnel(id: $id, input: $input) { ${D} }
|
|
449
|
+
}
|
|
450
|
+
`,ln=`
|
|
447
451
|
mutation DeleteTunnel($id: ID!) {
|
|
448
452
|
deleteTunnel(id: $id)
|
|
449
453
|
}
|
|
450
|
-
`,
|
|
454
|
+
`,fn=`
|
|
451
455
|
mutation StartTunnel($id: ID!) {
|
|
452
|
-
startTunnel(id: $id) { ${
|
|
456
|
+
startTunnel(id: $id) { ${D} }
|
|
453
457
|
}
|
|
454
|
-
`,
|
|
458
|
+
`,In=`
|
|
455
459
|
mutation StopTunnel($id: ID!) {
|
|
456
|
-
stopTunnel(id: $id) { ${
|
|
460
|
+
stopTunnel(id: $id) { ${D} }
|
|
457
461
|
}
|
|
458
|
-
`,
|
|
462
|
+
`,Sn=`
|
|
459
463
|
mutation RotateTunnelCredentials($id: ID!) {
|
|
460
|
-
rotateTunnelCredentials(id: $id) { ${
|
|
464
|
+
rotateTunnelCredentials(id: $id) { ${D} }
|
|
461
465
|
}
|
|
462
|
-
`,
|
|
466
|
+
`,yn=`
|
|
463
467
|
mutation IssueTunnelSession($tunnelId: ID!, $ttlSeconds: Int) {
|
|
464
468
|
issueTunnelSession(tunnelId: $tunnelId, ttlSeconds: $ttlSeconds) {
|
|
465
|
-
session { ${
|
|
469
|
+
session { ${Tt} }
|
|
466
470
|
token
|
|
467
471
|
agentConfigHint
|
|
468
472
|
}
|
|
469
473
|
}
|
|
470
|
-
`,
|
|
474
|
+
`,En=`
|
|
471
475
|
query ListTunnelSessions($tunnelId: ID!, $pagination: PaginationInput) {
|
|
472
476
|
tunnelSessions(tunnelId: $tunnelId, pagination: $pagination) {
|
|
473
|
-
items { ${
|
|
477
|
+
items { ${Tt} }
|
|
474
478
|
total
|
|
475
479
|
hasMore
|
|
476
480
|
}
|
|
477
481
|
}
|
|
478
|
-
`,
|
|
482
|
+
`,Tn=`
|
|
479
483
|
mutation RevokeTunnelSession($sessionId: ID!, $reason: String) {
|
|
480
484
|
revokeTunnelSession(sessionId: $sessionId, reason: $reason)
|
|
481
485
|
}
|
|
482
|
-
`,
|
|
486
|
+
`,bn=`
|
|
483
487
|
mutation ReserveTunnelSubdomain($input: ReserveTunnelSubdomainInput!) {
|
|
484
|
-
reserveTunnelSubdomain(input: $input) { ${
|
|
488
|
+
reserveTunnelSubdomain(input: $input) { ${P} }
|
|
485
489
|
}
|
|
486
|
-
`,
|
|
490
|
+
`,An=`
|
|
487
491
|
mutation RegisterCustomTunnelDomain($input: RegisterCustomDomainInput!) {
|
|
488
|
-
registerCustomTunnelDomain(input: $input) { ${
|
|
492
|
+
registerCustomTunnelDomain(input: $input) { ${P} }
|
|
489
493
|
}
|
|
490
|
-
`,
|
|
494
|
+
`,hn=`
|
|
491
495
|
mutation AttachTunnelDomain($tunnelId: ID!, $domainId: ID!, $makePrimary: Boolean) {
|
|
492
496
|
attachTunnelDomain(tunnelId: $tunnelId, domainId: $domainId, makePrimary: $makePrimary) {
|
|
493
|
-
${
|
|
497
|
+
${D}
|
|
494
498
|
}
|
|
495
499
|
}
|
|
496
|
-
`,
|
|
500
|
+
`,Cn=`
|
|
497
501
|
mutation DetachTunnelDomain($tunnelId: ID!, $domainId: ID!) {
|
|
498
|
-
detachTunnelDomain(tunnelId: $tunnelId, domainId: $domainId) { ${
|
|
502
|
+
detachTunnelDomain(tunnelId: $tunnelId, domainId: $domainId) { ${D} }
|
|
499
503
|
}
|
|
500
|
-
`,
|
|
504
|
+
`,Dn=`
|
|
501
505
|
mutation VerifyTunnelDomain($domainId: ID!) {
|
|
502
|
-
verifyTunnelDomain(domainId: $domainId) { ${
|
|
506
|
+
verifyTunnelDomain(domainId: $domainId) { ${P} }
|
|
503
507
|
}
|
|
504
|
-
`,
|
|
508
|
+
`,On=`
|
|
505
509
|
query ListTunnelDomains($tunnelId: ID, $filter: TunnelDomainFilterInput, $pagination: PaginationInput) {
|
|
506
510
|
tunnelDomains(tunnelId: $tunnelId, filter: $filter, pagination: $pagination) {
|
|
507
|
-
items { ${
|
|
511
|
+
items { ${P} }
|
|
508
512
|
total
|
|
509
513
|
hasMore
|
|
510
514
|
}
|
|
511
515
|
}
|
|
512
|
-
|
|
513
|
-
query
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
`,
|
|
516
|
+
`,$n=`
|
|
517
|
+
query GetTunnelBySlug($slug: String!) {
|
|
518
|
+
tunnelBySlug(slug: $slug) { ${D} }
|
|
519
|
+
}
|
|
520
|
+
`,wn=`
|
|
521
|
+
query GetTunnelDomain($id: ID!) {
|
|
522
|
+
tunnelDomain(id: $id) { ${P} }
|
|
523
|
+
}
|
|
524
|
+
`,vn=`
|
|
525
|
+
query GetTunnelProvider($key: TunnelProviderKey!) {
|
|
526
|
+
tunnelProvider(key: $key) { ${Et} }
|
|
527
|
+
}
|
|
528
|
+
`,kn=`
|
|
529
|
+
query ListTunnelShards($environment: TunnelEnvironment) {
|
|
530
|
+
tunnelShards(environment: $environment) {
|
|
531
|
+
id name providerId environment publicHost controlPort proxyPortRange
|
|
532
|
+
region status capacity currentLoad metadata createdAt updatedAt
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
`,_n=`
|
|
536
|
+
query TunnelUsage($tunnelId: ID!, $from: DateTime!, $to: DateTime!) {
|
|
537
|
+
tunnelUsage(tunnelId: $tunnelId, from: $from, to: $to) {
|
|
538
|
+
tunnelId hourBucket bytesIn bytesOut connections requests
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
`,Rn=`
|
|
542
|
+
query TunnelAudit($tunnelId: ID!, $pagination: PaginationInput) {
|
|
543
|
+
tunnelAudit(tunnelId: $tunnelId, pagination: $pagination) {
|
|
544
|
+
items {
|
|
545
|
+
id action resourceType resourceId actorId actorType
|
|
546
|
+
status description ipAddress userAgent requestId
|
|
547
|
+
workspaceId createdAt
|
|
548
|
+
}
|
|
549
|
+
total
|
|
550
|
+
hasMore
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
`,Nn=`
|
|
554
|
+
mutation DeleteTunnelDomain($domainId: ID!) {
|
|
555
|
+
deleteTunnelDomain(domainId: $domainId)
|
|
556
|
+
}
|
|
557
|
+
`,xn=`
|
|
558
|
+
query ProbeAgentTunnel($url: String!, $agentApiKey: String) {
|
|
559
|
+
probeAgentTunnel(url: $url, agentApiKey: $agentApiKey) {
|
|
560
|
+
agentId reachable latencyMs error version tunnelUrl
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
`,Un=`
|
|
564
|
+
mutation AddVibecontrolsAgentFromTunnel($input: AddAgentFromTunnelInput!) {
|
|
565
|
+
addVibecontrolsAgentFromTunnel(input: $input) {
|
|
566
|
+
success
|
|
567
|
+
clientId
|
|
568
|
+
clientSecret
|
|
569
|
+
devportalApplicationId
|
|
570
|
+
error
|
|
571
|
+
agent { id name workspaceId isActive }
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
`,Ln=`
|
|
575
|
+
query { uiSession { ${v} } }
|
|
576
|
+
`,Pn=`
|
|
577
|
+
query UiSessionById($id: ID!) { uiSessionById(id: $id) { ${v} } }
|
|
578
|
+
`,Vn=`
|
|
517
579
|
mutation { clearUISession }
|
|
518
|
-
`,
|
|
580
|
+
`,Gn=`
|
|
519
581
|
mutation UpdateActiveVibe($vibeId: ID!) {
|
|
520
|
-
updateActiveVibe(vibeId: $vibeId) { ${
|
|
582
|
+
updateActiveVibe(vibeId: $vibeId) { ${v} }
|
|
521
583
|
}
|
|
522
|
-
`,
|
|
584
|
+
`,qn=`
|
|
523
585
|
mutation UpdateActiveSession($sessionId: ID!) {
|
|
524
|
-
updateActiveSession(sessionId: $sessionId) { ${
|
|
586
|
+
updateActiveSession(sessionId: $sessionId) { ${v} }
|
|
525
587
|
}
|
|
526
|
-
`,
|
|
588
|
+
`,Bn=`
|
|
527
589
|
mutation AddRecentVibe($vibeId: ID!) {
|
|
528
|
-
addRecentVibe(vibeId: $vibeId) { ${
|
|
590
|
+
addRecentVibe(vibeId: $vibeId) { ${v} }
|
|
529
591
|
}
|
|
530
|
-
`,
|
|
592
|
+
`,Fn=`
|
|
531
593
|
mutation AddRecentSession($sessionId: ID!) {
|
|
532
|
-
addRecentSession(sessionId: $sessionId) { ${
|
|
594
|
+
addRecentSession(sessionId: $sessionId) { ${v} }
|
|
533
595
|
}
|
|
534
|
-
`,
|
|
596
|
+
`,Mn=`
|
|
535
597
|
query Targets($workspaceId: ID!, $filter: TargetFilterInput, $limit: Int, $offset: Int) {
|
|
536
598
|
targets(workspaceId: $workspaceId, filter: $filter, limit: $limit, offset: $offset) {
|
|
537
|
-
items { ${
|
|
599
|
+
items { ${V} } total hasMore
|
|
538
600
|
}
|
|
539
601
|
}
|
|
540
|
-
`,
|
|
541
|
-
query Target($id: ID!) { target(id: $id) { ${
|
|
542
|
-
`,
|
|
602
|
+
`,Hn=`
|
|
603
|
+
query Target($id: ID!) { target(id: $id) { ${V} } }
|
|
604
|
+
`,Kn=`
|
|
543
605
|
mutation CreateTarget($workspaceId: ID!, $input: CreateTargetInput!) {
|
|
544
|
-
createTarget(workspaceId: $workspaceId, input: $input) { ${
|
|
606
|
+
createTarget(workspaceId: $workspaceId, input: $input) { ${V} }
|
|
545
607
|
}
|
|
546
|
-
`,
|
|
608
|
+
`,Wn=`
|
|
547
609
|
mutation UpdateTarget($id: ID!, $input: UpdateTargetInput!) {
|
|
548
|
-
updateTarget(id: $id, input: $input) { ${
|
|
610
|
+
updateTarget(id: $id, input: $input) { ${V} }
|
|
549
611
|
}
|
|
550
|
-
`,
|
|
612
|
+
`,jn=`
|
|
551
613
|
mutation DeleteTarget($id: ID!) { deleteTarget(id: $id) }
|
|
552
|
-
`,
|
|
614
|
+
`,Yn=`
|
|
553
615
|
mutation TestTarget($id: ID!) {
|
|
554
616
|
testTarget(id: $id) { success error latencyMs }
|
|
555
617
|
}
|
|
556
|
-
`,
|
|
618
|
+
`,Jn=`
|
|
557
619
|
mutation ScanSSHConfig($agentId: ID!, $configPath: String) {
|
|
558
620
|
scanSSHConfig(agentId: $agentId, configPath: $configPath) {
|
|
559
621
|
configPath total hosts { name hostname port user identityFile proxyJump }
|
|
560
622
|
}
|
|
561
623
|
}
|
|
562
|
-
`,
|
|
624
|
+
`,Xn=`
|
|
563
625
|
mutation InstallAgentOnTarget($sourceAgentId: ID!, $targetId: ID!, $agentPort: Int) {
|
|
564
626
|
installAgentOnTarget(sourceAgentId: $sourceAgentId, targetId: $targetId, agentPort: $agentPort) { success error }
|
|
565
627
|
}
|
|
566
|
-
`,
|
|
628
|
+
`,zn=`
|
|
567
629
|
mutation UninstallAgentFromTarget($targetId: ID!) {
|
|
568
630
|
uninstallAgentFromTarget(targetId: $targetId) { success error }
|
|
569
631
|
}
|
|
570
|
-
|
|
632
|
+
`,Qn=`
|
|
571
633
|
mutation StartTerminal($targetId: ID!, $shell: String) {
|
|
572
634
|
startTerminal(targetId: $targetId, shell: $shell) { sessionId ttydUrl }
|
|
573
635
|
}
|
|
574
|
-
`,
|
|
636
|
+
`,Zn=`
|
|
575
637
|
mutation StopTerminal($sessionId: ID!) { stopTerminal(sessionId: $sessionId) }
|
|
576
|
-
`,
|
|
638
|
+
`,to=`
|
|
577
639
|
query VibeDecks($filter: VibeDeckFilterInput, $pagination: PaginationInput) {
|
|
578
640
|
vibeDecks(filter: $filter, pagination: $pagination) {
|
|
579
|
-
items { ${
|
|
641
|
+
items { ${k} } total hasMore
|
|
580
642
|
}
|
|
581
643
|
}
|
|
582
|
-
`,
|
|
583
|
-
query VibeDeck($id: ID!) { vibeDeck(id: $id) { ${
|
|
584
|
-
`,
|
|
585
|
-
query { defaultVibeDeck { ${
|
|
586
|
-
`,
|
|
644
|
+
`,eo=`
|
|
645
|
+
query VibeDeck($id: ID!) { vibeDeck(id: $id) { ${k} } }
|
|
646
|
+
`,no=`
|
|
647
|
+
query { defaultVibeDeck { ${k} } }
|
|
648
|
+
`,oo=`
|
|
587
649
|
mutation CreateVibeDeck($input: CreateVibeDeckInput!) {
|
|
588
|
-
createVibeDeck(input: $input) { ${
|
|
650
|
+
createVibeDeck(input: $input) { ${k} }
|
|
589
651
|
}
|
|
590
|
-
`,
|
|
652
|
+
`,io=`
|
|
591
653
|
mutation UpdateVibeDeck($id: ID!, $input: UpdateVibeDeckInput!) {
|
|
592
|
-
updateVibeDeck(id: $id, input: $input) { ${
|
|
654
|
+
updateVibeDeck(id: $id, input: $input) { ${k} }
|
|
593
655
|
}
|
|
594
|
-
`,
|
|
656
|
+
`,ro=`
|
|
595
657
|
mutation DuplicateVibeDeck($id: ID!, $name: String) {
|
|
596
|
-
duplicateVibeDeck(id: $id, name: $name) { ${
|
|
658
|
+
duplicateVibeDeck(id: $id, name: $name) { ${k} }
|
|
597
659
|
}
|
|
598
|
-
`,
|
|
660
|
+
`,ao=`
|
|
599
661
|
mutation DeleteVibeDeck($id: ID!) { deleteVibeDeck(id: $id) }
|
|
600
|
-
`,
|
|
662
|
+
`,so=`
|
|
601
663
|
mutation SetDefaultVibeDeck($id: ID!) {
|
|
602
|
-
setDefaultVibeDeck(id: $id) { ${
|
|
664
|
+
setDefaultVibeDeck(id: $id) { ${k} }
|
|
603
665
|
}
|
|
604
|
-
`,
|
|
666
|
+
`,co=`
|
|
605
667
|
query VibeDeckButtons($filter: VibeDeckButtonFilterInput, $pagination: PaginationInput) {
|
|
606
668
|
vibeDeckButtons(filter: $filter, pagination: $pagination) {
|
|
607
669
|
items { ${N} } total hasMore
|
|
608
670
|
}
|
|
609
671
|
}
|
|
610
|
-
`,
|
|
672
|
+
`,po=`
|
|
611
673
|
query VibeDeckButton($id: ID!) { vibeDeckButton(id: $id) { ${N} } }
|
|
612
|
-
`,
|
|
674
|
+
`,uo=`
|
|
613
675
|
mutation CreateVibeDeckButton($input: CreateVibeDeckButtonInput!) {
|
|
614
676
|
createVibeDeckButton(input: $input) { ${N} }
|
|
615
677
|
}
|
|
616
|
-
`,
|
|
678
|
+
`,mo=`
|
|
617
679
|
mutation UpdateVibeDeckButton($id: ID!, $input: UpdateVibeDeckButtonInput!) {
|
|
618
680
|
updateVibeDeckButton(id: $id, input: $input) { ${N} }
|
|
619
681
|
}
|
|
620
|
-
`,
|
|
682
|
+
`,go=`
|
|
621
683
|
mutation DeleteVibeDeckButton($id: ID!) { deleteVibeDeckButton(id: $id) }
|
|
622
|
-
`,
|
|
684
|
+
`,lo=`
|
|
623
685
|
mutation MoveVibeDeckButton($id: ID!, $input: MoveVibeDeckButtonInput!) {
|
|
624
686
|
moveVibeDeckButton(id: $id, input: $input) { ${N} }
|
|
625
687
|
}
|
|
626
|
-
`,
|
|
688
|
+
`,fo=`
|
|
627
689
|
mutation ReorderVibeDeckButtons($vibeDeckId: ID!, $positions: [VibeDeckButtonPositionInput!]!) {
|
|
628
690
|
reorderVibeDeckButtons(vibeDeckId: $vibeDeckId, positions: $positions) { ${N} }
|
|
629
691
|
}
|
|
630
|
-
`,
|
|
692
|
+
`,Io=`
|
|
631
693
|
mutation ExecuteVibeDeckButton($id: ID!, $agentId: ID!) {
|
|
632
694
|
executeVibeDeckButton(id: $id, agentId: $agentId) { success output error }
|
|
633
695
|
}
|
|
634
|
-
`,
|
|
696
|
+
`,U=`
|
|
635
697
|
id workspaceId name displayName description icon color
|
|
636
698
|
actionType sourceType triggerType
|
|
637
699
|
command workingDirectory environmentVariables
|
|
@@ -640,171 +702,171 @@
|
|
|
640
702
|
schedule eventFilters timeoutMs retryCount confirmationRequired
|
|
641
703
|
category tags metadata storeItemId storeVersion
|
|
642
704
|
createdAt updatedAt deletedAt
|
|
643
|
-
`,
|
|
705
|
+
`,J=`
|
|
644
706
|
id actionId workspaceId
|
|
645
707
|
triggerType triggerSource status
|
|
646
708
|
agentId command script output exitCode
|
|
647
709
|
webhookStatusCode errorMessage metadata
|
|
648
710
|
startedAt completedAt durationMs
|
|
649
711
|
createdAt
|
|
650
|
-
`,
|
|
712
|
+
`,So=`
|
|
651
713
|
query Actions($filter: ActionFilterInput, $pagination: PaginationInput) {
|
|
652
714
|
actions(filter: $filter, pagination: $pagination) {
|
|
653
|
-
items { ${
|
|
715
|
+
items { ${U} } total hasMore
|
|
654
716
|
}
|
|
655
717
|
}
|
|
656
|
-
`,
|
|
657
|
-
query Action($id: ID!) { action(id: $id) { ${
|
|
658
|
-
`,
|
|
718
|
+
`,yo=`
|
|
719
|
+
query Action($id: ID!) { action(id: $id) { ${U} } }
|
|
720
|
+
`,Eo=`
|
|
659
721
|
mutation CreateAction($input: CreateActionInput!) {
|
|
660
|
-
createAction(input: $input) { ${
|
|
722
|
+
createAction(input: $input) { ${U} }
|
|
661
723
|
}
|
|
662
|
-
`,
|
|
724
|
+
`,To=`
|
|
663
725
|
mutation UpdateAction($id: ID!, $input: UpdateActionInput!) {
|
|
664
|
-
updateAction(id: $id, input: $input) { ${
|
|
726
|
+
updateAction(id: $id, input: $input) { ${U} }
|
|
665
727
|
}
|
|
666
|
-
`,
|
|
728
|
+
`,bo=`
|
|
667
729
|
mutation DeleteAction($id: ID!) { deleteAction(id: $id) }
|
|
668
|
-
`,
|
|
730
|
+
`,Ao=`
|
|
669
731
|
mutation DuplicateAction($id: ID!, $name: String) {
|
|
670
|
-
duplicateAction(id: $id, name: $name) { ${
|
|
732
|
+
duplicateAction(id: $id, name: $name) { ${U} }
|
|
671
733
|
}
|
|
672
|
-
`,
|
|
734
|
+
`,ho=`
|
|
673
735
|
mutation ExecuteAction($id: ID!, $input: ExecuteActionInput) {
|
|
674
|
-
executeAction(id: $id, input: $input) { ${
|
|
736
|
+
executeAction(id: $id, input: $input) { ${J} }
|
|
675
737
|
}
|
|
676
|
-
`,
|
|
738
|
+
`,Co=`
|
|
677
739
|
mutation InstallActionFromStore($storeItemId: ID!, $version: String, $name: String) {
|
|
678
|
-
installActionFromStore(storeItemId: $storeItemId, version: $version, name: $name) { ${
|
|
740
|
+
installActionFromStore(storeItemId: $storeItemId, version: $version, name: $name) { ${U} }
|
|
679
741
|
}
|
|
680
|
-
`,
|
|
742
|
+
`,Do=`
|
|
681
743
|
mutation CancelActionExecution($id: ID!) {
|
|
682
|
-
cancelActionExecution(id: $id) { ${
|
|
744
|
+
cancelActionExecution(id: $id) { ${J} }
|
|
683
745
|
}
|
|
684
|
-
`,
|
|
746
|
+
`,Oo=`
|
|
685
747
|
query ActionExecutions($filter: ActionExecutionFilterInput, $pagination: PaginationInput) {
|
|
686
748
|
actionExecutions(filter: $filter, pagination: $pagination) {
|
|
687
|
-
items { ${
|
|
749
|
+
items { ${J} } total hasMore
|
|
688
750
|
}
|
|
689
751
|
}
|
|
690
|
-
|
|
691
|
-
query ActionExecution($id: ID!) { actionExecution(id: $id) { ${
|
|
692
|
-
`,
|
|
752
|
+
`,$o=`
|
|
753
|
+
query ActionExecution($id: ID!) { actionExecution(id: $id) { ${J} } }
|
|
754
|
+
`,wo=`
|
|
693
755
|
id name scheduleType status actionId
|
|
694
756
|
cronExpression timezone scheduledAt
|
|
695
757
|
interval intervalUnit startDate endDate
|
|
696
758
|
nextExecutionAt lastExecutionAt
|
|
697
759
|
priority tags
|
|
698
|
-
`,
|
|
760
|
+
`,vo=`
|
|
699
761
|
mutation CreateScheduledJob($workspaceId: ID!, $input: CreateScheduledJobInput!) {
|
|
700
|
-
createScheduledJob(workspaceId: $workspaceId, input: $input) { ${
|
|
762
|
+
createScheduledJob(workspaceId: $workspaceId, input: $input) { ${wo} }
|
|
701
763
|
}
|
|
702
|
-
`,
|
|
764
|
+
`,ko=`
|
|
703
765
|
mutation DeleteScheduledJob($id: ID!) { deleteScheduledJob(id: $id) }
|
|
704
|
-
`,
|
|
766
|
+
`,_o=`
|
|
705
767
|
query ScheduledJobs($workspaceId: ID!, $filter: JobFilterInput, $pagination: SchedulerPaginationInput) {
|
|
706
768
|
scheduledJobs(workspaceId: $workspaceId, filter: $filter, pagination: $pagination) {
|
|
707
|
-
jobs { ${
|
|
769
|
+
jobs { ${wo} }
|
|
708
770
|
total hasMore
|
|
709
771
|
}
|
|
710
772
|
}
|
|
711
|
-
`,
|
|
773
|
+
`,Ro=`
|
|
712
774
|
query AiToolEvents($filter: AiToolEventFilterInput, $pagination: PaginationInput) {
|
|
713
775
|
aiToolEvents(filter: $filter, pagination: $pagination) {
|
|
714
|
-
items { ${
|
|
776
|
+
items { ${W} } total hasMore
|
|
715
777
|
}
|
|
716
778
|
}
|
|
717
|
-
`,
|
|
718
|
-
query AiToolEvent($id: ID!) { aiToolEvent(id: $id) { ${
|
|
719
|
-
`,
|
|
779
|
+
`,No=`
|
|
780
|
+
query AiToolEvent($id: ID!) { aiToolEvent(id: $id) { ${W} } }
|
|
781
|
+
`,xo=`
|
|
720
782
|
query RecentAiToolEvents($agentId: ID!, $limit: Int) {
|
|
721
|
-
recentAiToolEvents(agentId: $agentId, limit: $limit) { ${
|
|
783
|
+
recentAiToolEvents(agentId: $agentId, limit: $limit) { ${W} }
|
|
722
784
|
}
|
|
723
|
-
`,
|
|
785
|
+
`,Uo=`
|
|
724
786
|
mutation CreateAiToolEvent($input: CreateAiToolEventInput!) {
|
|
725
|
-
createAiToolEvent(input: $input) { ${
|
|
787
|
+
createAiToolEvent(input: $input) { ${W} }
|
|
726
788
|
}
|
|
727
|
-
`,
|
|
789
|
+
`,Lo=`
|
|
728
790
|
mutation DeleteOldAiToolEvents($beforeDate: DateTime!) {
|
|
729
791
|
deleteOldAiToolEvents(beforeDate: $beforeDate)
|
|
730
792
|
}
|
|
731
|
-
`,
|
|
793
|
+
`,Po=`
|
|
732
794
|
query DocsSites($filter: VibecontrolsDocsSiteFilterInput, $pagination: PaginationInput) {
|
|
733
795
|
docsSites(filter: $filter, pagination: $pagination) {
|
|
734
|
-
items { ${
|
|
796
|
+
items { ${x} } total hasMore
|
|
735
797
|
}
|
|
736
798
|
}
|
|
737
|
-
`,
|
|
738
|
-
query DocsSite($vibeId: ID!) { docsSite(vibeId: $vibeId) { ${
|
|
739
|
-
`,
|
|
799
|
+
`,Vo=`
|
|
800
|
+
query DocsSite($vibeId: ID!) { docsSite(vibeId: $vibeId) { ${x} } }
|
|
801
|
+
`,Go=`
|
|
740
802
|
mutation CreateDocsSite($input: CreateVibecontrolsDocsSiteInput!) {
|
|
741
|
-
createDocsSite(input: $input) { ${
|
|
803
|
+
createDocsSite(input: $input) { ${x} }
|
|
742
804
|
}
|
|
743
|
-
`,
|
|
805
|
+
`,qo=`
|
|
744
806
|
mutation UpdateDocsSite($id: ID!, $input: UpdateVibecontrolsDocsSiteInput!) {
|
|
745
|
-
updateDocsSite(id: $id, input: $input) { ${
|
|
807
|
+
updateDocsSite(id: $id, input: $input) { ${x} }
|
|
746
808
|
}
|
|
747
|
-
`,
|
|
809
|
+
`,Bo=`
|
|
748
810
|
mutation UpdateDocsSiteVisibility($id: ID!, $visibility: VibecontrolsDocsSiteVisibility!) {
|
|
749
|
-
updateDocsSiteVisibility(id: $id, visibility: $visibility) { ${
|
|
811
|
+
updateDocsSiteVisibility(id: $id, visibility: $visibility) { ${x} }
|
|
750
812
|
}
|
|
751
|
-
`,
|
|
813
|
+
`,Fo=`
|
|
752
814
|
mutation DeleteDocsSite($id: ID!) { deleteDocsSite(id: $id) }
|
|
753
|
-
`,
|
|
815
|
+
`,Mo=`
|
|
754
816
|
query DocsPages($siteId: ID!, $filter: VibecontrolsDocsPageFilterInput) {
|
|
755
|
-
docsPages(siteId: $siteId, filter: $filter) { ${
|
|
817
|
+
docsPages(siteId: $siteId, filter: $filter) { ${G} }
|
|
756
818
|
}
|
|
757
|
-
`,
|
|
758
|
-
query DocsPage($id: ID!) { docsPage(id: $id) { ${
|
|
759
|
-
`,
|
|
819
|
+
`,Ho=`
|
|
820
|
+
query DocsPage($id: ID!) { docsPage(id: $id) { ${G} } }
|
|
821
|
+
`,Ko=`
|
|
760
822
|
mutation CreateDocsPage($input: CreateVibecontrolsDocsPageInput!) {
|
|
761
|
-
createDocsPage(input: $input) { ${
|
|
823
|
+
createDocsPage(input: $input) { ${G} }
|
|
762
824
|
}
|
|
763
|
-
`,
|
|
825
|
+
`,Wo=`
|
|
764
826
|
mutation UpdateDocsPage($id: ID!, $input: UpdateVibecontrolsDocsPageInput!) {
|
|
765
|
-
updateDocsPage(id: $id, input: $input) { ${
|
|
827
|
+
updateDocsPage(id: $id, input: $input) { ${G} }
|
|
766
828
|
}
|
|
767
|
-
`,
|
|
829
|
+
`,jo=`
|
|
768
830
|
mutation DeleteDocsPage($id: ID!) { deleteDocsPage(id: $id) }
|
|
769
|
-
`,
|
|
831
|
+
`,Yo=`
|
|
770
832
|
mutation ReorderDocsPages($siteId: ID!, $input: ReorderVibecontrolsDocsPagesInput!) {
|
|
771
|
-
reorderDocsPages(siteId: $siteId, input: $input) { ${
|
|
833
|
+
reorderDocsPages(siteId: $siteId, input: $input) { ${G} }
|
|
772
834
|
}
|
|
773
|
-
`,
|
|
835
|
+
`,Jo=`
|
|
774
836
|
query DocsRevisions($siteId: ID!, $pagination: PaginationInput) {
|
|
775
837
|
docsRevisions(siteId: $siteId, pagination: $pagination) {
|
|
776
|
-
items { ${
|
|
838
|
+
items { ${j} } total hasMore
|
|
777
839
|
}
|
|
778
840
|
}
|
|
779
|
-
`,
|
|
780
|
-
query DocsRevision($id: ID!) { docsRevision(id: $id) { ${
|
|
781
|
-
`,
|
|
841
|
+
`,Xo=`
|
|
842
|
+
query DocsRevision($id: ID!) { docsRevision(id: $id) { ${j} } }
|
|
843
|
+
`,zo=`
|
|
782
844
|
query DocsContent($siteId: ID!, $path: String) { docsContent(siteId: $siteId, path: $path) { html contentType } }
|
|
783
|
-
|
|
845
|
+
`,Qo=`
|
|
784
846
|
mutation CompileDocsSite($siteId: ID!, $publish: Boolean) {
|
|
785
|
-
compileDocsSite(siteId: $siteId, publish: $publish) { ${
|
|
847
|
+
compileDocsSite(siteId: $siteId, publish: $publish) { ${j} }
|
|
786
848
|
}
|
|
787
|
-
`,
|
|
849
|
+
`,Zo=`
|
|
788
850
|
mutation PublishDocsRevision($revisionId: ID!) {
|
|
789
|
-
publishDocsRevision(revisionId: $revisionId) { ${
|
|
851
|
+
publishDocsRevision(revisionId: $revisionId) { ${j} }
|
|
790
852
|
}
|
|
791
|
-
`,
|
|
853
|
+
`,ti=`
|
|
792
854
|
mutation RollbackDocsRevision($siteId: ID!, $revisionId: ID!) {
|
|
793
|
-
rollbackDocsRevision(siteId: $siteId, revisionId: $revisionId) { ${
|
|
855
|
+
rollbackDocsRevision(siteId: $siteId, revisionId: $revisionId) { ${x} }
|
|
794
856
|
}
|
|
795
|
-
`,
|
|
857
|
+
`,ei=`
|
|
796
858
|
mutation GenerateDocsSignedUrl($siteId: ID!) {
|
|
797
859
|
generateDocsSignedUrl(siteId: $siteId) { url expiresAt }
|
|
798
860
|
}
|
|
799
|
-
`,
|
|
861
|
+
`,ni=`
|
|
800
862
|
query VibeAuditLogs($filter: VibeAuditLogFilterInput, $pagination: PaginationInput) {
|
|
801
863
|
vibeAuditLogs(filter: $filter, pagination: $pagination) {
|
|
802
|
-
items { ${
|
|
864
|
+
items { ${bt} } total hasMore
|
|
803
865
|
}
|
|
804
866
|
}
|
|
805
|
-
`,
|
|
806
|
-
query VibeAuditLog($id: ID!) { vibeAuditLog(id: $id) { ${
|
|
807
|
-
`,
|
|
867
|
+
`,oi=`
|
|
868
|
+
query VibeAuditLog($id: ID!) { vibeAuditLog(id: $id) { ${bt} } }
|
|
869
|
+
`,ii=`
|
|
808
870
|
query VibeAuditLogStats($filter: VibeAuditLogFilterInput) {
|
|
809
871
|
vibeAuditLogStats(filter: $filter) {
|
|
810
872
|
totalLogs
|
|
@@ -813,15 +875,15 @@
|
|
|
813
875
|
logsByStatus { status count }
|
|
814
876
|
}
|
|
815
877
|
}
|
|
816
|
-
`,
|
|
878
|
+
`,ri=`
|
|
817
879
|
mutation DeleteVibeAuditLog($id: ID!, $reason: String) { deleteVibeAuditLog(id: $id, reason: $reason) }
|
|
818
|
-
`,
|
|
880
|
+
`,ai=`
|
|
819
881
|
mutation BulkDeleteVibeAuditLogs($ids: [ID!]!, $reason: String) { bulkDeleteVibeAuditLogs(ids: $ids, reason: $reason) }
|
|
820
|
-
`,
|
|
882
|
+
`,si=`
|
|
821
883
|
mutation ExportVibeAuditLogs($filter: VibeAuditLogFilterInput, $format: String) {
|
|
822
884
|
exportVibeAuditLogs(filter: $filter, format: $format)
|
|
823
885
|
}
|
|
824
|
-
`;var
|
|
886
|
+
`;var q=`
|
|
825
887
|
query VibecontrolsAnalytics($input: VibecontrolsAnalyticsInput!) {
|
|
826
888
|
vibecontrolsAnalytics(input: $input) {
|
|
827
889
|
agents { total active inactive staleHeartbeatCount byPlatform { key count } byArchitecture { key count } createdOverTime { timestamp value } }
|
|
@@ -840,5 +902,478 @@
|
|
|
840
902
|
cached
|
|
841
903
|
}
|
|
842
904
|
}
|
|
843
|
-
`;function Vo(d){let o=d.command("agents").description("Agent management");o.command("list").description("List agents").option("--active","Only active agents").option("--platform <p>","Filter by platform").option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.active&&(t.isActive=!0),e.platform&&(t.platform=e.platform);let n=await i(ct,{filter:Object.keys(t).length?t:void 0});c(e,n.vibecontrolsAgents,{headers:["ID","Name","Hostname","Platform","Status","Last Heartbeat"],rows:n.vibecontrolsAgents.map(s=>[m(s.id,12),s.name,s.hostname,s.platform,y(s.isActive?"ACTIVE":"INACTIVE"),I(s.lastHeartbeat)])});}catch(t){r(t);}}),o.command("get").description("Get agent by ID").argument("<id>","Agent ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(dt,{id:e});if(!n.vibecontrolsAgent)throw new u("Agent not found");c(t,n.vibecontrolsAgent);}catch(n){r(n);}}),o.command("create").description("Create agent").requiredOption("--name <n>","Name").requiredOption("--hostname <h>","Hostname").requiredOption("--platform <p>","Platform").requiredOption("--arch <a>","Architecture").requiredOption("--agent-version <v>","Agent version").option("--tunnel-url <u>","Tunnel URL").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(Y,{input:{name:e.name,hostname:e.hostname,platform:e.platform,architecture:e.arch,version:e.agentVersion,tunnelUrl:e.tunnelUrl}});a("Agent created"),c(e,t.registerVibecontrolsAgent);}catch(t){r(t);}}),o.command("update").description("Update agent").argument("<id>","Agent ID").option("--name <n>","Name").option("--tunnel-url <u>","Tunnel URL").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.tunnelUrl&&(n.tunnelUrl=t.tunnelUrl),!Object.keys(n).length)throw new u("No updates specified");let s=await i(pt,{id:e,input:n});a("Agent updated"),c(t,s.updateVibecontrolsAgent);}catch(n){r(n);}}),o.command("delete").description("Delete agent").argument("<id>","Agent ID").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await g("Delete this agent?",t.force))return;await i(ut,{id:e}),a("Agent deleted");}catch(n){r(n);}}),o.command("probe").description("Probe agent connectivity").argument("<id>","Agent ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(gt,{id:e});c(t,n.probeAgentConnection);}catch(n){r(n);}}),o.command("health").description("Health check all agents").option("-f, --format <format>","Output format").action(async e=>{try{let n=(await i(lt)).vibecontrolsAgentHealthProbes;c(e,n,{headers:["Agent","Name","Healthy","Version","Uptime"],rows:n.map(s=>[m(s.agentId,12),s.agentName,y(s.healthy?"HEALTHY":"ERROR"),s.agentVersion??"-",s.uptime!=null?Math.round(s.uptime)+"s":"-"])});}catch(t){r(t);}}),o.command("heartbeat").description("Send heartbeat").argument("<id>","Agent ID").action(async e=>{try{await i(mt,{id:e}),a("Heartbeat sent");}catch(t){r(t);}}),o.command("plugins").description("List plugins").argument("<id>","Agent ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(ft,{agentId:e});c(t,n.agentPlugins);}catch(n){r(n);}}),o.command("install-plugin").description("Install plugin").argument("<agentId>").argument("<packageName>").action(async(e,t)=>{try{let n=await i(It,{agentId:e,packageName:t});n.installAgentPlugin.success?a(`Plugin ${t} installed`):T(n.installAgentPlugin.error??"Failed");}catch(n){r(n);}}),o.command("remove-plugin").description("Remove plugin").argument("<agentId>").argument("<packageName>").action(async(e,t)=>{try{let n=await i(St,{agentId:e,packageName:t});n.removeAgentPlugin.success?a(`Plugin ${t} removed`):T(n.removeAgentPlugin.error??"Failed");}catch(n){r(n);}}),o.command("register").description("Register a new agent").requiredOption("--hostname <h>","Hostname").requiredOption("--name <n>","Name").option("--platform <p>","Platform").option("--arch <a>","Architecture").option("--agent-version <v>","Agent version").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(Y,{input:{hostname:e.hostname,name:e.name,platform:e.platform,architecture:e.arch,version:e.agentVersion}});a("Agent registered"),c(e,t.registerAgent);}catch(t){r(t);}}),o.command("deactivate").description("Deactivate agent").argument("<id>","Agent ID").action(async e=>{try{await i(Et,{id:e}),a("Agent deactivated");}catch(t){r(t);}}),o.command("push-gateway-auth").description("Push gateway auth credentials").requiredOption("--agent-id <id>","Agent ID").requiredOption("--client-id <cid>","Client ID").requiredOption("--client-secret <cs>","Client secret").action(async e=>{try{await i(Tt,{input:{agentId:e.agentId,clientId:e.clientId,clientSecret:e.clientSecret}}),a("Gateway auth pushed");}catch(t){r(t);}}),o.command("setup-gateway-auth").description("Setup gateway auth for agent").requiredOption("--agent-id <id>","Agent ID").action(async e=>{try{await i(yt,{input:{agentId:e.agentId}}),a("Gateway auth setup complete");}catch(t){r(t);}}),o.command("update-version").description("Update agent version").argument("<agentId>","Agent ID").argument("<version>","Version").action(async(e,t)=>{try{await i(ht,{agentId:e,version:t}),a("Agent version updated");}catch(n){r(n);}}),o.command("connect-target").description("Connect agent to target").argument("<sourceAgentId>","Source agent ID").argument("<targetId>","Target ID").requiredOption("--protocol <p>","Protocol").action(async(e,t,n)=>{try{await i(Dt,{sourceAgentId:e,targetId:t,protocol:n.protocol}),a("Agent connected to target");}catch(s){r(s);}}),o.command("disconnect-target").description("Disconnect agent from target").argument("<connectionId>","Connection ID").action(async e=>{try{await i(bt,{connectionId:e}),a("Agent disconnected from target");}catch(t){r(t);}}),o.command("graph").description("Get agent graph").option("--root-agent-id <id>","Root agent ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=P(),n=await i(At,{rootAgentId:e.rootAgentId,workspaceId:t?.workspaceId});c(e,n.agentGraph);}catch(t){r(t);}});}function Po(d){let o=d.command("vibes").description("Vibe management");o.command("list").description("List vibes").option("--status <s>","Filter by status").option("--type <t>","Filter by type").option("--agent <id>","Filter by agent").option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.status&&(t.status=e.status.toUpperCase()),e.type&&(t.type=e.type.toUpperCase()),e.agent&&(t.agentId=e.agent);let s=(await i(kt,{filter:Object.keys(t).length?t:void 0})).vibes.items;c(e,s,{headers:["ID","Name","Type","Status","Path","Created"],rows:s.map(p=>[m(p.id,12),p.name,p.type,y(p.status),m(p.path,30),I(p.createdAt)])});}catch(t){r(t);}}),o.command("get").description("Get vibe by ID").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Ct,{id:e});if(!n.vibe)throw new u("Vibe not found");c(t,n.vibe);}catch(n){r(n);}}),o.command("create").description("Create vibe").requiredOption("--name <n>","Name").requiredOption("--path <p>","Path").requiredOption("--type <t>","Type (PROJECT, REPOSITORY, etc.)").option("--agent <id>","Agent ID").option("--description <d>","Description").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i($t,{input:{name:e.name,path:e.path,type:e.type.toUpperCase(),agentId:e.agent,description:e.description}});a("Vibe created"),c(e,t.createVibe);}catch(t){r(t);}}),o.command("update").description("Update vibe").argument("<id>").option("--name <n>","Name").option("--description <d>","Description").option("--status <s>","Status").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.description&&(n.description=t.description),t.status&&(n.status=t.status.toUpperCase()),!Object.keys(n).length)throw new u("No updates specified");let s=await i(Ot,{id:e,input:n});a("Vibe updated"),c(t,s.updateVibe);}catch(n){r(n);}}),o.command("delete").description("Delete vibe").argument("<id>").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await g("Delete this vibe?",t.force))return;await i(wt,{id:e}),a("Vibe deleted");}catch(n){r(n);}}),o.command("archive").description("Archive vibe").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(_t,{id:e});a("Vibe archived"),c(t,n.archiveVibe);}catch(n){r(n);}}),o.command("restore").description("Restore archived vibe").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Nt,{id:e});a("Vibe restored"),c(t,n.restoreVibe);}catch(n){r(n);}}),o.command("hierarchy").description("Get vibe hierarchy").option("--root <id>","Root vibe ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(vt,{rootId:e.root});c(e,t.vibeHierarchy);}catch(t){r(t);}}),o.command("search").description("Search vibes").argument("<query>").option("--limit <n>","Max results",parseInt).option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Rt,{query:e,limit:t.limit});c(t,n.searchVibes);}catch(n){r(n);}}),o.command("move").description("Move vibe to new parent").argument("<id>","Vibe ID").option("--parent <parentId>","New parent ID (omit to remove parent)").action(async(e,t)=>{try{let n=await i(xt,{id:e,newParentId:t.parent||null});a("Vibe moved"),c({},n.moveVibe);}catch(n){r(n);}}),o.command("set-status").description("Set vibe status").argument("<id>","Vibe ID").argument("<status>","New status").action(async(e,t)=>{try{await i(Lt,{id:e,status:t.toUpperCase()}),a("Vibe status updated");}catch(n){r(n);}}),o.command("update-git").description("Update vibe git info").argument("<id>","Vibe ID").option("--branch <b>","Branch").option("--remote <r>","Remote").option("--status <s>","Status").action(async(e,t)=>{try{let n={};t.branch&&(n.branch=t.branch),t.remote&&(n.remote=t.remote),t.status&&(n.status=t.status);let s=await i(Ut,{id:e,input:n});a("Vibe git info updated"),c({},s.updateVibeGit);}catch(n){r(n);}});}function Go(d){let o=d.command("sessions").description("Session management");o.command("list").description("List sessions").option("--status <s>","Filter by status").option("--type <t>","Filter by type").option("--vibe <id>","Filter by vibe").option("--agent <id>","Filter by agent").option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.status&&(t.status=e.status.toUpperCase()),e.type&&(t.type=e.type.toUpperCase()),e.vibe&&(t.vibeId=e.vibe),e.agent&&(t.agentId=e.agent);let s=(await i(Vt,{filter:Object.keys(t).length?t:void 0})).sessions.items;c(e,s,{headers:["ID","Name","Type","Status","Agent","Started"],rows:s.map(p=>[m(p.id,12),p.name,p.type,y(p.status),m(p.agentId,12),I(p.startedAt)])});}catch(t){r(t);}}),o.command("get").description("Get session").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Pt,{id:e});if(!n.session)throw new u("Session not found");c(t,n.session);}catch(n){r(n);}}),o.command("create").description("Create session").requiredOption("--name <n>","Name").requiredOption("--agent <id>","Agent ID").requiredOption("--type <t>","Type (TMUX, SSH, TERMINAL, SCRIPT, CUSTOM)").option("--vibe <id>","Vibe ID").option("--command <c>","Command").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(Gt,{input:{name:e.name,agentId:e.agent,type:e.type.toUpperCase(),vibeId:e.vibe,command:e.command}});a("Session created"),c(e,t.createSession);}catch(t){r(t);}}),o.command("start").description("Start session").argument("<id>").action(async e=>{try{await i(Bt,{id:e}),a("Session started");}catch(t){r(t);}}),o.command("stop").description("Stop session").argument("<id>").action(async e=>{try{await i(qt,{id:e}),a("Session stopped");}catch(t){r(t);}}),o.command("restart").description("Restart session").argument("<id>").action(async e=>{try{await i(Ft,{id:e}),a("Session restarted");}catch(t){r(t);}}),o.command("terminate").description("Terminate session").argument("<id>").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await g("Terminate this session?",t.force))return;await i(Ht,{id:e}),a("Session terminated");}catch(n){r(n);}}),o.command("output").description("Get session output").argument("<id>").option("--lines <n>","Number of lines",parseInt).option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Mt,{id:e,lines:t.lines});n.sessionOutput?console.log(n.sessionOutput):T("No output");}catch(n){r(n);}}),o.command("send-input").description("Send input to session").argument("<id>").argument("<input>").action(async(e,t)=>{try{await i(Wt,{id:e,input:t}),a("Input sent");}catch(n){r(n);}}),o.command("start-terminal").description("Start web terminal").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Kt,{id:e});a("Terminal started"),c(t,n.startSessionTerminal);}catch(n){r(n);}}),o.command("stop-terminal").description("Stop web terminal").argument("<id>").action(async e=>{try{await i(jt,{id:e}),a("Terminal stopped");}catch(t){r(t);}}),o.command("active").description("List active sessions").option("--vibe <id>","Filter by vibe").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(Yt,{vibeId:e.vibe});c(e,t.activeSessions);}catch(t){r(t);}}),o.command("health-check").description("Check health of all sessions").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(zt);a("Health check complete"),c(e,t.checkSessionHealth);}catch(t){r(t);}}),o.command("share").description("Share session with user").argument("<sessionId>","Session ID").requiredOption("--user-id <uid>","User ID").option("--permission <p>","Permission (VIEW/INTERACT)","VIEW").action(async(e,t)=>{try{await i(Xt,{input:{sessionId:e,sharedWithId:t.userId,permission:t.permission}}),a("Session shared");}catch(n){r(n);}}),o.command("create-share-link").description("Create share link").argument("<sessionId>","Session ID").option("--permission <p>","Permission (VIEW/INTERACT)","VIEW").action(async(e,t)=>{try{let n=await i(Qt,{input:{sessionId:e,permission:t.permission}});a("Share link created"),c({},n.createSessionShareLink);}catch(n){r(n);}}),o.command("revoke-share").description("Revoke session share").argument("<id>","Share ID").action(async e=>{try{await i(Zt,{id:e}),a("Session share revoked");}catch(t){r(t);}}),o.command("revoke-share-link").description("Revoke session share link").argument("<id>","Share link ID").action(async e=>{try{await i(te,{id:e}),a("Share link revoked");}catch(t){r(t);}}),o.command("update-share").description("Update session share permission").argument("<id>","Share ID").requiredOption("--permission <p>","Permission (VIEW/INTERACT)").action(async(e,t)=>{try{await i(ee,{id:e,input:{permission:t.permission}}),a("Session share updated");}catch(n){r(n);}}),o.command("join").description("Join shared session").argument("<sessionId>","Session ID").action(async e=>{try{await i(ne,{input:{sessionId:e}}),a("Joined session");}catch(t){r(t);}}),o.command("leave").description("Leave shared session").argument("<sessionId>","Session ID").action(async e=>{try{await i(oe,{sessionId:e}),a("Left session");}catch(t){r(t);}}),o.command("request-control").description("Request session control").argument("<sessionId>","Session ID").action(async e=>{try{await i(ie,{sessionId:e}),a("Control requested");}catch(t){r(t);}}),o.command("release-control").description("Release session control").argument("<sessionId>","Session ID").action(async e=>{try{await i(re,{sessionId:e}),a("Control released");}catch(t){r(t);}}),o.command("transfer-control").description("Transfer session control").argument("<sessionId>","Session ID").requiredOption("--to-user <uid>","Target user ID").action(async(e,t)=>{try{await i(se,{sessionId:e,toUserId:t.toUser}),a("Control transferred");}catch(n){r(n);}}),o.command("shares").description("List session shares").argument("<sessionId>","Session ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(ae,{sessionId:e});c(t,n.sessionShares);}catch(n){r(n);}}),o.command("share-links").description("List session share links").argument("<sessionId>","Session ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(ce,{sessionId:e});c(t,n.sessionShareLinks);}catch(n){r(n);}}),o.command("collaborators").description("List session collaborators").argument("<sessionId>","Session ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(de,{sessionId:e});c(t,n.sessionCollaborators);}catch(n){r(n);}}),o.command("shared-with-me").description("List sessions shared with me").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(pe);c(e,t.sessionsSharedWithMe);}catch(t){r(t);}}),o.command("restart-terminal").description("Restart session terminal").argument("<id>","Session ID").action(async e=>{try{await i(Jt,{id:e}),a("Terminal restarted");}catch(t){r(t);}}),o.command("bulk-restart").description("Bulk restart sessions").requiredOption("--ids <ids>","Session IDs (comma-separated)").option("--force","Skip confirmation").action(async e=>{try{await i(ue,{ids:e.ids.split(",").map(t=>t.trim()),force:e.force}),a("Sessions restarted");}catch(t){r(t);}}),o.command("bulk-stop").description("Bulk stop sessions").requiredOption("--ids <ids>","Session IDs (comma-separated)").option("--force","Skip confirmation").action(async e=>{try{await i(me,{ids:e.ids.split(",").map(t=>t.trim()),force:e.force}),a("Sessions stopped");}catch(t){r(t);}}),o.command("bulk-terminate").description("Bulk terminate sessions").requiredOption("--ids <ids>","Session IDs (comma-separated)").option("--force","Skip confirmation").action(async e=>{try{if(!await g("Terminate these sessions?",e.force))return;await i(ge,{ids:e.ids.split(",").map(t=>t.trim())}),a("Sessions terminated");}catch(t){r(t);}});}function Bo(d){let o=d.command("notes").description("Note management");o.command("list").description("List notes").option("--vibe <id>","Filter by vibe").option("--pinned","Show only pinned").option("--tags <tags>","Filter by tags (comma-separated)").option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.vibe&&(t.vibeId=e.vibe),e.pinned&&(t.isPinned=!0),e.tags&&(t.tags=e.tags.split(",").map(s=>s.trim()));let n=await i(le,{filter:Object.keys(t).length?t:void 0});c(e,n.notes.items,{headers:["ID","Title","Pinned","Tags","Created"],rows:n.notes.items.map(s=>[m(s.id,12),s.title,s.isPinned?"Yes":"No",(s.tags??[]).join(", "),I(s.createdAt)])});}catch(t){r(t);}}),o.command("get").description("Get note").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(fe,{id:e});if(!n.note)throw new u("Note not found");c(t,n.note);}catch(n){r(n);}}),o.command("create").description("Create note").requiredOption("--title <t>","Title").requiredOption("--content <c>","Content").option("--vibe <id>","Vibe ID").option("--tags <tags>","Tags (comma-separated)").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(Ie,{input:{title:e.title,content:e.content,vibeId:e.vibe,tags:e.tags?.split(",").map(n=>n.trim())}});a("Note created"),c(e,t.createNote);}catch(t){r(t);}}),o.command("update").description("Update note").argument("<id>").option("--title <t>","Title").option("--content <c>","Content").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.title&&(n.title=t.title),t.content&&(n.content=t.content),!Object.keys(n).length)throw new u("No updates specified");let s=await i(Se,{id:e,input:n});a("Note updated"),c(t,s.updateNote);}catch(n){r(n);}}),o.command("delete").description("Delete note").argument("<id>").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await g("Delete this note?",t.force))return;await i(Ee,{id:e}),a("Note deleted");}catch(n){r(n);}}),o.command("search").description("Search notes").argument("<query>").option("--vibe <id>","Scope to vibe").option("--limit <n>","Max results",parseInt).option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Te,{query:e,vibeId:t.vibe,limit:t.limit});c(t,n.searchNotes);}catch(n){r(n);}}),o.command("pin").description("Pin a note").argument("<id>").action(async e=>{try{await i(ye,{id:e}),a("Note pinned");}catch(t){r(t);}}),o.command("unpin").description("Unpin a note").argument("<id>").action(async e=>{try{await i(he,{id:e}),a("Note unpinned");}catch(t){r(t);}}),o.command("tag").description("Tag a note").argument("<noteId>","Note ID").argument("<tag>","Tag").action(async(e,t)=>{try{await i(De,{input:{noteId:e,tag:t}}),a("Note tagged");}catch(n){r(n);}}),o.command("untag").description("Remove tag from note").argument("<noteId>","Note ID").argument("<tag>","Tag").action(async(e,t)=>{try{await i(be,{input:{noteId:e,tag:t}}),a("Tag removed");}catch(n){r(n);}}),o.command("replace-tags").description("Replace all tags on a note").argument("<noteId>","Note ID").requiredOption("--tags <tags>","Tags (comma-separated)").action(async(e,t)=>{try{await i(Ae,{input:{noteId:e,tags:t.tags.split(",").map(n=>n.trim())}}),a("Tags replaced");}catch(n){r(n);}}),o.command("create-tag").description("Create a note tag").argument("<name>","Tag name").action(async e=>{try{await i(ke,{input:{name:e}}),a("Tag created");}catch(t){r(t);}}),o.command("available-tags").description("List available note tags").option("--query <q>","Search query").option("--limit <n>","Max results",parseInt).option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(Ce,{query:e.query,limit:e.limit});c(e,t.availableNoteTags);}catch(t){r(t);}}),o.command("get-tags").description("Get tags for a note").argument("<noteId>","Note ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i($e,{noteId:e});c(t,n.noteTags);}catch(n){r(n);}}),o.command("related-tags").description("Get related tags for a note").argument("<noteId>","Note ID").option("--limit <n>","Max results",parseInt).option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Oe,{noteId:e,limit:t.limit});c(t,n.relatedNoteTags);}catch(n){r(n);}}),o.command("bulk-delete").description("Bulk delete notes").requiredOption("--ids <ids>","Note IDs (comma-separated)").option("--force","Skip confirmation").action(async e=>{try{if(!await g("Delete these notes?",e.force))return;await i(we,{ids:e.ids.split(",").map(t=>t.trim())}),a("Notes deleted");}catch(t){r(t);}});}function qo(d){let o=d.command("config").description("Backend configuration management");o.command("list").description("List configs").requiredOption("--scope <s>","Scope (WORKSPACE, VIBE, SESSION, AGENT, USER, GLOBAL)").option("--scope-id <id>","Scope entity ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(_e,{scope:e.scope.toUpperCase(),scopeId:e.scopeId});c(e,t.configurationsByScope);}catch(t){r(t);}}),o.command("get").description("Get config value").argument("<key>").requiredOption("--scope <s>","Scope").option("--scope-id <id>","Scope ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Ne,{key:e,scope:t.scope.toUpperCase(),scopeId:t.scopeId});if(!n.configuration)throw new u("Config not found");c(t,n.configuration);}catch(n){r(n);}}),o.command("set").description("Set config value").argument("<key>").argument("<value>").requiredOption("--scope <s>","Scope").option("--scope-id <id>","Scope ID").option("--secret","Mark as secret").option("-f, --format <format>","Output format").action(async(e,t,n)=>{try{let s;try{s=JSON.parse(t);}catch{s=t;}let p=await i(Re,{key:e,scope:n.scope.toUpperCase(),scopeId:n.scopeId,value:s,isSecret:n.secret});a("Config set"),c(n,p.setConfiguration);}catch(s){r(s);}}),o.command("delete").description("Delete config").argument("<key>").requiredOption("--scope <s>","Scope").option("--scope-id <id>","Scope ID").action(async(e,t)=>{try{await i(xe,{key:e,scope:t.scope.toUpperCase(),scopeId:t.scopeId}),a("Config deleted");}catch(n){r(n);}}),o.command("value").description("Get raw config value").argument("<key>").requiredOption("--scope <s>","Scope").option("--scope-id <id>","Scope ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(ve,{key:e,scope:t.scope.toUpperCase(),scopeId:t.scopeId});console.log(n.configurationValue);}catch(n){r(n);}}),o.command("bulk-set").description("Bulk set configs").requiredOption("--scope <s>","Scope").option("--scope-id <id>","Scope ID").requiredOption("--input <json>","JSON array of [{key,value,isSecret?}]").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(Le,{configurations:JSON.parse(e.input),scope:e.scope.toUpperCase(),scopeId:e.scopeId});a("Configs set"),c(e,t.bulkSetConfigurations);}catch(t){r(t);}}),o.command("bulk-delete").description("Bulk delete configs").requiredOption("--scope <s>","Scope").option("--scope-id <id>","Scope ID").requiredOption("--keys <keys>","Comma-separated keys").option("--force","Skip confirmation").action(async e=>{try{if(!await g("Delete these configs?",e.force))return;await i(Ue,{keys:e.keys.split(",").map(t=>t.trim()),scope:e.scope.toUpperCase(),scopeId:e.scopeId}),a("Configs deleted");}catch(t){r(t);}});}function Fo(d){let o=d.command("webhooks").description("Webhook management");o.command("list").description("List webhooks").option("--active","Only active").option("-f, --format <format>","Output format").action(async e=>{try{let t=e.active?{isActive:!0}:void 0,n=await i(Ve,{filter:t});c(e,n.webhooks.items,{headers:["ID","Name","URL","Active","Events","Deliveries"],rows:n.webhooks.items.map(s=>[m(s.id,12),s.name,m(s.url,30),s.isActive?"Yes":"No",(s.events??[]).join(", "),String(s.deliveryCount??0)])});}catch(t){r(t);}}),o.command("get").description("Get webhook").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Pe,{id:e});if(!n.webhook)throw new u("Webhook not found");c(t,n.webhook);}catch(n){r(n);}}),o.command("create").description("Create webhook").requiredOption("--name <n>","Name").requiredOption("--url <u>","URL").requiredOption("--events <events>","Events (comma-separated)").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(Ge,{input:{name:e.name,url:e.url,events:e.events.split(",").map(n=>n.trim())}});a("Webhook created"),c(e,t.createWebhook);}catch(t){r(t);}}),o.command("update").description("Update webhook").argument("<id>").option("--name <n>","Name").option("--url <u>","URL").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.url&&(n.url=t.url),!Object.keys(n).length)throw new u("No updates specified");let s=await i(Be,{id:e,input:n});a("Webhook updated"),c(t,s.updateWebhook);}catch(n){r(n);}}),o.command("delete").description("Delete webhook").argument("<id>").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await g("Delete this webhook?",t.force))return;await i(qe,{id:e}),a("Webhook deleted");}catch(n){r(n);}}),o.command("test").description("Test webhook").argument("<id>").action(async e=>{try{await i(Fe,{id:e}),a("Webhook test sent");}catch(t){r(t);}}),o.command("active").description("List active webhooks").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(He);c(e,t.activeWebhooks);}catch(t){r(t);}}),o.command("by-event").description("List webhooks by event").argument("<event>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Me,{event:e});c(t,n.webhooksByEvent);}catch(n){r(n);}}),o.command("trigger").description("Trigger webhook").argument("<id>").option("--payload <json>","JSON payload").action(async(e,t)=>{try{await i(We,{id:e,payload:t.payload?JSON.parse(t.payload):void 0}),a("Webhook triggered");}catch(n){r(n);}}),o.command("reset-failures").description("Reset webhook failures").argument("<id>").action(async e=>{try{await i(Ke,{id:e}),a("Webhook failures reset");}catch(t){r(t);}});}function gi(d,o="HTTPS"){if(!d)return o;let e=d.toUpperCase();if(e==="HTTP"||e==="HTTPS"||e==="TCP"||e==="UDP")return e;throw new Error(`Invalid protocol: ${d} (expected http|https|tcp|udp)`)}function Ho(d){return (d??"PROD").toUpperCase()==="ALPHA"?"ALPHA":"PROD"}function Mo(d){let o=d.command("tunnels").description("Tunnel management (VibeTunnels)");o.command("providers").description("List tunnel providers with capabilities").option("-f, --format <format>","Output format").action(async t=>{try{let n=await i(Ye);c(t,n.tunnelProviders);}catch(n){r(n);}}),o.command("list").description("List tunnels in the workspace").option("--provider <key>","Filter by provider (vibetunnels|cloudflare)").option("--status <status>","Filter by status").option("--search <query>","Search by name/slug").option("-f, --format <format>","Output format").action(async t=>{try{let n={};t.provider&&(n.providerKey=t.provider.toUpperCase()),t.status&&(n.status=[t.status.toUpperCase()]),t.search&&(n.search=t.search);let s=await i(je,{filter:n});if(t.format){c(t,s.tunnels);return}for(let p of s.tunnels.items){let f=p.primaryDomain?.hostname??"(no domain)";console.log(`${p.id} ${p.slug} ${p.providerKey} ${p.status} ${f} ${p.protocol}:${p.localPort}`);}console.log(`
|
|
844
|
-
${s.tunnels.total} total`);}catch(n){r(n);}}),o.command("get").description("Get a tunnel by ID").argument("<id>").option("-f, --format <format>").action(async(t,n)=>{try{let s=await i(Je,{id:t});if(!s.tunnel)throw new u(`Tunnel ${t} not found`);c(n,s.tunnel);}catch(s){r(s);}}),o.command("create").description("Create a tunnel (DRAFT \u2014 start with `vibe tunnels start`)").requiredOption("--agent <id>","Agent ID").requiredOption("--name <name>","Tunnel name").requiredOption("--port <p>","Local port",parseInt).option("--provider <key>","Provider key (vibetunnels|cloudflare)","VIBETUNNELS").option("--protocol <p>","http|https|tcp|udp","https").option("--host <host>","Local host","127.0.0.1").option("--subdomain <label>","Reserve a *.vibetunnels.com subdomain").option("--env <env>","alpha|prod for managed subdomain","prod").option("--description <text>").option("-f, --format <format>").action(async t=>{try{let n={agentId:t.agent,name:t.name,description:t.description,providerKey:t.provider.toUpperCase(),protocol:gi(t.protocol),localPort:t.port,localHost:t.host,managedSubdomain:t.subdomain,environment:Ho(t.env)},s=await i(ze,{input:n});a(`Tunnel created: ${s.createTunnel.slug}`),c(t,s.createTunnel);}catch(n){r(n);}}),o.command("start").description("Start a tunnel").argument("<id>").action(async t=>{try{await i(Qe,{id:t}),a("Tunnel started");}catch(n){r(n);}}),o.command("stop").description("Stop a tunnel").argument("<id>").action(async t=>{try{await i(Ze,{id:t}),a("Tunnel stopped");}catch(n){r(n);}}),o.command("rotate").description("Rotate tunnel credentials").argument("<id>").action(async t=>{try{await i(tn,{id:t}),a("Tunnel credentials rotated");}catch(n){r(n);}}),o.command("delete").description("Delete a tunnel").argument("<id>").option("--force","Skip confirmation").action(async(t,n)=>{try{if(!await g("Delete this tunnel?",n.force))return;await i(Xe,{id:t}),a("Tunnel deleted");}catch(s){r(s);}}),o.command("sessions").description("List sessions for a tunnel").argument("<tunnelId>").option("-f, --format <format>").action(async(t,n)=>{try{let s=await i(nn,{tunnelId:t});c(n,s);}catch(s){r(s);}}),o.command("issue-session").description("Issue a short-lived token for a tunnel (printed once)").argument("<tunnelId>").option("--ttl <seconds>","TTL in seconds",t=>parseInt(t,10)).action(async(t,n)=>{try{let s=await i(en,{tunnelId:t,ttlSeconds:n.ttl});console.log("Session issued. The token below is shown exactly once."),console.log(`Session ID: ${s.issueTunnelSession.session.id}`),console.log(`Token: ${s.issueTunnelSession.token}`),console.log(`Expires: ${s.issueTunnelSession.session.expiresAt}`),console.log(`Agent hint: ${JSON.stringify(s.issueTunnelSession.agentConfigHint,null,2)}`);}catch(s){r(s);}}),o.command("revoke-session").description("Revoke an active tunnel session").argument("<sessionId>").option("--reason <text>").action(async(t,n)=>{try{await i(on,{sessionId:t,reason:n.reason??"revoked via CLI"}),a("Session revoked");}catch(s){r(s);}});let e=o.command("domains").description("Manage tunnel domains");e.command("list").description("List domains (optionally scoped to a tunnel)").option("--tunnel <id>","Tunnel ID").option("-f, --format <format>").action(async t=>{try{let n=await i(pn,{tunnelId:t.tunnel??null});c(t,n);}catch(n){r(n);}}),e.command("reserve").description("Reserve a managed *.vibetunnels.com subdomain").requiredOption("--label <label>","Subdomain label").option("--env <env>","alpha|prod","prod").action(async t=>{try{let n=await i(rn,{input:{label:t.label,environment:Ho(t.env)}});a(`Reserved ${n.reserveTunnelSubdomain.hostname}`);}catch(n){r(n);}}),e.command("add-custom").description("Register a user-owned custom domain (TXT verification required)").argument("<hostname>").action(async t=>{try{let n=await i(sn,{input:{hostname:t}});console.log(`Registered ${n.registerCustomTunnelDomain.hostname}.`),console.log(`Create a TXT record at ${n.registerCustomTunnelDomain.challengeRecordName} containing:`),console.log(` ${n.registerCustomTunnelDomain.challengeToken}`);}catch(n){r(n);}}),e.command("attach").description("Attach a (verified) domain to a tunnel").argument("<tunnelId>").argument("<domainId>").option("--primary","Mark as primary domain").action(async(t,n,s)=>{try{await i(an,{tunnelId:t,domainId:n,makePrimary:!!s.primary}),a("Domain attached");}catch(p){r(p);}}),e.command("detach").description("Detach a domain from a tunnel").argument("<tunnelId>").argument("<domainId>").action(async(t,n)=>{try{await i(cn,{tunnelId:t,domainId:n}),a("Domain detached");}catch(s){r(s);}}),e.command("verify").description("Force verification check for a custom domain").argument("<domainId>").action(async t=>{try{let n=await i(dn,{domainId:t});console.log(`Status: ${n.verifyTunnelDomain.verificationStatus}`),n.verifyTunnelDomain.lastCheckError&&console.log(`Error: ${n.verifyTunnelDomain.lastCheckError}`);}catch(n){r(n);}});}function Wo(d){let o=d.command("ui-session").description("UI session state");o.command("get").description("Get current UI session").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(un);c(e,t.uiSession);}catch(t){r(t);}}),o.command("clear").description("Clear UI session").action(async()=>{try{await i(gn),a("UI session cleared");}catch(e){r(e);}}),o.command("get-by-id").description("Get UI session by ID").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(mn,{id:e});c(t,n.uiSessionById);}catch(n){r(n);}}),o.command("set-active-vibe").description("Set active vibe").argument("<vibeId>").action(async e=>{try{await i(ln,{vibeId:e}),a("Active vibe updated");}catch(t){r(t);}}),o.command("set-active-session").description("Set active session").argument("<sessionId>").action(async e=>{try{await i(fn,{sessionId:e}),a("Active session updated");}catch(t){r(t);}}),o.command("add-recent-vibe").description("Add recent vibe").argument("<vibeId>").action(async e=>{try{await i(In,{vibeId:e}),a("Recent vibe added");}catch(t){r(t);}}),o.command("add-recent-session").description("Add recent session").argument("<sessionId>").action(async e=>{try{await i(Sn,{sessionId:e}),a("Recent session added");}catch(t){r(t);}});}function Ko(d){let o=d.command("cli-config").description("CLI configuration");o.command("set").description("Set CLI config value").argument("<key>").argument("<value>").action((e,t)=>{if(!j.includes(e))throw new u(`Unknown key: ${e}. Valid keys: ${j.join(", ")}`);ot(e,t),a(`${e} = ${t}`);}),o.command("get").description("Get CLI config value").argument("<key>").action(e=>{let t=nt(e);if(t===void 0)throw new u(`Key not set: ${e}`);console.log(t);}),o.command("list").description("Show all CLI config").option("-f, --format <format>","Output format").action(e=>{let t=et();if(e.format==="json"){Z(t);return}let n=Object.entries(t).filter(([,s])=>s!==void 0);tt(["Key","Value"],n.map(([s,p])=>[s,String(p)]));}),o.command("path").description("Show config file path").action(()=>{console.log(it());});}function jo(){let d=P()?.workspaceId;if(!d)throw new u("No workspace set. Run: vibecontrols workspace set <id>");return d}function Jo(d){let o=d.command("targets").description("Target management (SSH/RDP/VNC)");o.command("list").description("List targets").option("--type <type>","Filter by type (DIRECT,SSH,RDP,VNC)").option("--limit <n>","Limit results",parseInt).option("--offset <n>","Offset results",parseInt).option("-f, --format <format>","Output format").action(async e=>{try{let t=jo(),n={};e.type&&(n.type=e.type.toUpperCase());let p=(await i(En,{workspaceId:t,filter:Object.keys(n).length?n:void 0,limit:e.limit,offset:e.offset})).targets.items;c(e,p,{headers:["ID","Name","Type","Host","Port","Status"],rows:p.map(f=>[m(f.id,12),f.name,f.type,f.host,String(f.port??"-"),y(f.status)])});}catch(t){r(t);}}),o.command("get").description("Get target by ID").argument("<id>","Target ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Tn,{id:e});if(!n.target)throw new u("Target not found");c(t,n.target);}catch(n){r(n);}}),o.command("create").description("Create target").requiredOption("--name <n>","Name").requiredOption("--type <t>","Type (DIRECT,SSH,RDP,VNC)").requiredOption("--host <h>","Host address").requiredOption("--port <p>","Port",parseInt).option("--username <u>","Username").option("--protocol <p>","Protocol").option("--agent-id <id>","Agent ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=jo(),n={name:e.name,type:e.type.toUpperCase(),host:e.host,port:e.port};e.username&&(n.username=e.username),e.protocol&&(n.protocol=e.protocol),e.agentId&&(n.agentId=e.agentId);let s=await i(yn,{workspaceId:t,input:n});a("Target created"),c(e,s.createTarget);}catch(t){r(t);}}),o.command("update").description("Update target").argument("<id>","Target ID").option("--name <n>","Name").option("--host <h>","Host address").option("--port <p>","Port",parseInt).option("--username <u>","Username").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.host&&(n.host=t.host),t.port&&(n.port=t.port),t.username&&(n.username=t.username),!Object.keys(n).length)throw new u("No updates specified");let s=await i(hn,{id:e,input:n});a("Target updated"),c(t,s.updateTarget);}catch(n){r(n);}}),o.command("delete").description("Delete target").argument("<id>","Target ID").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await g("Delete this target?",t.force))return;await i(Dn,{id:e}),a("Target deleted");}catch(n){r(n);}}),o.command("test").description("Test target connectivity").argument("<id>","Target ID").action(async e=>{try{let t=await i(bn,{id:e});t.testTarget.success?a(`Connection successful (${t.testTarget.latencyMs??"-"}ms)`):T(t.testTarget.error??"Connection failed");}catch(t){r(t);}}),o.command("scan-ssh").description("Scan SSH config for targets").requiredOption("--agent-id <id>","Agent ID").option("--config-path <path>","SSH config file path").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(An,{agentId:e.agentId,configPath:e.configPath});a(`Found ${t.scanSSHConfig.length} target(s)`),c(e,t.scanSSHConfig);}catch(t){r(t);}}),o.command("install-agent").description("Install agent on target").requiredOption("--source-agent-id <id>","Source agent ID").requiredOption("--target-id <id>","Target ID").option("--agent-port <port>","Agent port",parseInt).action(async e=>{try{let t=await i(kn,{sourceAgentId:e.sourceAgentId,targetId:e.targetId,agentPort:e.agentPort});t.installAgentOnTarget.success?a("Agent installed on target"):T(t.installAgentOnTarget.error??"Installation failed");}catch(t){r(t);}}),o.command("uninstall-agent").description("Uninstall agent from target").argument("<targetId>","Target ID").action(async e=>{try{let t=await i(Cn,{targetId:e});t.uninstallAgentFromTarget.success?a("Agent uninstalled from target"):T(t.uninstallAgentFromTarget.error??"Uninstall failed");}catch(t){r(t);}}),o.command("start-terminal").description("Start terminal on target").argument("<targetId>","Target ID").option("--shell <shell>","Shell to use").action(async(e,t)=>{try{let n=await i($n,{targetId:e,shell:t.shell});a("Terminal started"),console.log(`Session ID: ${n.startTerminal.sessionId}`),console.log(`ttyd URL: ${n.startTerminal.ttydUrl}`);}catch(n){r(n);}}),o.command("stop-terminal").description("Stop terminal session").argument("<sessionId>","Session ID").action(async e=>{try{await i(On,{sessionId:e}),a("Terminal stopped");}catch(t){r(t);}});}function Yo(d){let o=d.command("vibedeck").description("VibeDeck management");o.command("list").description("List vibedecks").option("-f, --format <format>","Output format").action(async e=>{try{let n=(await i(wn)).vibeDecks.items;c(e,n,{headers:["ID","Name","Default","Created"],rows:n.map(s=>[m(s.id,12),s.name,s.isDefault?"Yes":"No",I(s.createdAt)])});}catch(t){r(t);}}),o.command("get").description("Get vibedeck").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(_n,{id:e});if(!n.vibeDeck)throw new u("VibeDeck not found");c(t,n.vibeDeck);}catch(n){r(n);}}),o.command("default").description("Get default vibedeck").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(Nn);if(!t.defaultVibeDeck)throw new u("No default VibeDeck found");c(e,t.defaultVibeDeck);}catch(t){r(t);}}),o.command("create").description("Create vibedeck").requiredOption("--name <n>","Name").option("--description <d>","Description").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(vn,{input:{name:e.name,description:e.description}});a("VibeDeck created"),c(e,t.createVibeDeck);}catch(t){r(t);}}),o.command("update").description("Update vibedeck").argument("<id>").option("--name <n>","Name").option("--description <d>","Description").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.description&&(n.description=t.description),!Object.keys(n).length)throw new u("No updates specified");let s=await i(Rn,{id:e,input:n});a("VibeDeck updated"),c(t,s.updateVibeDeck);}catch(n){r(n);}}),o.command("duplicate").description("Duplicate vibedeck").argument("<id>").option("--name <n>","New name").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(xn,{id:e,name:t.name});a("VibeDeck duplicated"),c(t,n.duplicateVibeDeck);}catch(n){r(n);}}),o.command("delete").description("Delete vibedeck").argument("<id>").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await g("Delete this VibeDeck?",t.force))return;await i(Ln,{id:e}),a("VibeDeck deleted");}catch(n){r(n);}}),o.command("set-default").description("Set default vibedeck").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Un,{id:e});a("Default VibeDeck updated"),c(t,n.setDefaultVibeDeck);}catch(n){r(n);}}),o.command("buttons").description("List vibedeck buttons").requiredOption("--deck-id <id>","VibeDeck ID").option("-f, --format <format>","Output format").action(async e=>{try{let n=(await i(Vn,{filter:{vibeDeckId:e.deckId}})).vibeDeckButtons.items;c(e,n,{headers:["ID","Label","Type","Position","Command"],rows:n.map(s=>[m(s.id,12),s.label,s.type,`${s.row},${s.column}`,m(s.command??"",30)])});}catch(t){r(t);}}),o.command("button").description("Get vibedeck button").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Pn,{id:e});if(!n.vibeDeckButton)throw new u("Button not found");c(t,n.vibeDeckButton);}catch(n){r(n);}}),o.command("create-button").description("Create vibedeck button").requiredOption("--deck-id <id>","VibeDeck ID").requiredOption("--label <l>","Label").requiredOption("--type <t>","Type (COMMAND, SCRIPT, WEBHOOK)").option("--command <c>","Command").option("--script <s>","Script").option("--webhook-url <u>","Webhook URL").option("--icon <i>","Icon").option("--color <c>","Color").option("--row <n>","Row position",parseInt).option("--column <n>","Column position",parseInt).option("--action-id <id>","Link to an Action").option("-f, --format <format>","Output format").action(async e=>{try{let t={vibeDeckId:e.deckId,label:e.label,type:e.type.toUpperCase()};e.command&&(t.command=e.command),e.script&&(t.script=e.script),e.webhookUrl&&(t.webhookUrl=e.webhookUrl),e.icon&&(t.icon=e.icon),e.color&&(t.color=e.color),e.row!==void 0&&(t.row=e.row),e.column!==void 0&&(t.column=e.column),e.actionId&&(t.actionId=e.actionId);let n=await i(Gn,{input:t});a("Button created"),c(e,n.createVibeDeckButton);}catch(t){r(t);}}),o.command("update-button").description("Update vibedeck button").argument("<id>").option("--label <l>","Label").option("--command <c>","Command").option("--icon <i>","Icon").option("--color <c>","Color").option("--action-id <id>","Link to an Action").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.label&&(n.label=t.label),t.command&&(n.command=t.command),t.icon&&(n.icon=t.icon),t.color&&(n.color=t.color),t.actionId&&(n.actionId=t.actionId),!Object.keys(n).length)throw new u("No updates specified");let s=await i(Bn,{id:e,input:n});a("Button updated"),c(t,s.updateVibeDeckButton);}catch(n){r(n);}}),o.command("delete-button").description("Delete vibedeck button").argument("<id>").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await g("Delete this button?",t.force))return;await i(qn,{id:e}),a("Button deleted");}catch(n){r(n);}}),o.command("move-button").description("Move vibedeck button").argument("<id>").requiredOption("--row <n>","Row position",parseInt).requiredOption("--column <n>","Column position",parseInt).option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Fn,{id:e,input:{row:t.row,column:t.column}});a("Button moved"),c(t,n.moveVibeDeckButton);}catch(n){r(n);}}),o.command("reorder-buttons").description("Reorder vibedeck buttons").argument("<vibeDeckId>").requiredOption("--positions <json>","Positions as JSON array").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n;try{n=JSON.parse(t.positions);}catch{throw new u("Invalid JSON for --positions")}let s=await i(Hn,{vibeDeckId:e,positions:n});a("Buttons reordered"),c(t,s.reorderVibeDeckButtons);}catch(n){r(n);}}),o.command("execute-button").description("Execute vibedeck button").argument("<id>").requiredOption("--agent-id <id>","Agent ID").action(async(e,t)=>{try{let s=(await i(Mn,{id:e,agentId:t.agentId})).executeVibeDeckButton;if(s.success)a(s.output??"Button executed successfully");else throw new u(s.error??"Execution failed")}catch(n){r(n);}});}function zo(d){let o=d.command("ai-tool-events").description("AI tool event tracking");o.command("list").description("List AI tool events").option("--agent-id <id>","Filter by agent").option("--tool-name <name>","Filter by tool name").option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.agentId&&(t.agentId=e.agentId),e.toolName&&(t.toolName=e.toolName);let s=(await i(so,{filter:Object.keys(t).length?t:void 0})).aiToolEvents.items;c(e,s,{headers:["ID","Tool","Event Type","Model","Tokens","Duration","Created"],rows:s.map(p=>[m(p.id,12),p.toolName,p.eventType,p.model??"-",String(p.tokenCount??"-"),String(p.duration??"-"),I(p.createdAt)])});}catch(t){r(t);}}),o.command("get").description("Get AI tool event").argument("<id>","Event ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(ao,{id:e});if(!n.aiToolEvent)throw new u("AI tool event not found");c(t,n.aiToolEvent);}catch(n){r(n);}}),o.command("recent").description("Recent AI tool events").requiredOption("--agent-id <id>","Filter by agent").option("--limit <n>","Max results",parseInt).option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(co,{agentId:e.agentId,limit:e.limit});c(e,t.recentAiToolEvents);}catch(t){r(t);}}),o.command("create").description("Create AI tool event").requiredOption("--agent-id <id>","Agent ID").requiredOption("--tool-name <name>","Tool name").requiredOption("--event-type <type>","Event type").option("--model <model>","Model name").option("--input <input>","Input data").option("--output <output>","Output data").option("--token-count <n>","Token count",parseInt).option("--duration <ms>","Duration in ms",parseInt).option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(po,{input:{agentId:e.agentId,toolName:e.toolName,eventType:e.eventType,model:e.model,input:e.input,output:e.output,tokenCount:e.tokenCount,duration:e.duration}});a("AI tool event created"),c(e,t.createAiToolEvent);}catch(t){r(t);}}),o.command("cleanup").description("Delete old AI tool events").requiredOption("--before-date <date>","Delete events before this date").option("--force","Skip confirmation").action(async e=>{try{if(!await g(`Delete all AI tool events before ${e.beforeDate}?`,e.force))return;let t=await i(uo,{beforeDate:e.beforeDate});a("Old AI tool events deleted"),c({},t.deleteOldAiToolEvents);}catch(t){r(t);}});}function Xo(d){let o=d.command("docs").description("Documentation site management");o.command("sites").description("List documentation sites").option("-f, --format <format>","Output format").action(async e=>{try{let n=(await i(mo)).docsSites.items;c(e,n,{headers:["ID","Vibe ID","Name","Visibility","Created"],rows:n.map(s=>[m(s.id,12),m(s.vibeId,12),s.name,s.visibility,I(s.createdAt)])});}catch(t){r(t);}}),o.command("site").description("Get documentation site").argument("<vibeId>","Vibe ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(go,{vibeId:e});if(!n.docsSite)throw new u("Docs site not found");c(t,n.docsSite);}catch(n){r(n);}}),o.command("create-site").description("Create documentation site").requiredOption("--vibe-id <id>","Vibe ID").requiredOption("--name <name>","Site name").option("--description <desc>","Description").option("--visibility <v>","Visibility (PRIVATE/PUBLIC)").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(lo,{input:{vibeId:e.vibeId,name:e.name,description:e.description,visibility:e.visibility}});a("Docs site created"),c(e,t.createDocsSite);}catch(t){r(t);}}),o.command("update-site").description("Update documentation site").argument("<id>","Site ID").option("--name <name>","Name").option("--description <desc>","Description").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.description&&(n.description=t.description),!Object.keys(n).length)throw new u("No updates specified");let s=await i(fo,{id:e,input:n});a("Docs site updated"),c(t,s.updateDocsSite);}catch(n){r(n);}}),o.command("set-visibility").description("Set site visibility").argument("<id>","Site ID").argument("<visibility>","PRIVATE or PUBLIC").option("-f, --format <format>","Output format").action(async(e,t,n)=>{try{let s=await i(Io,{id:e,visibility:t});a(`Visibility set to ${t}`),c(n,s.updateDocsSiteVisibility);}catch(s){r(s);}}),o.command("delete-site").description("Delete documentation site").argument("<id>","Site ID").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await g("Delete this docs site?",t.force))return;await i(So,{id:e}),a("Docs site deleted");}catch(n){r(n);}}),o.command("pages").description("List pages for a site").argument("<siteId>","Site ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Eo,{siteId:e});c(t,n.docsPages);}catch(n){r(n);}}),o.command("page").description("Get a page").argument("<id>","Page ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(To,{id:e});if(!n.docsPage)throw new u("Page not found");c(t,n.docsPage);}catch(n){r(n);}}),o.command("create-page").description("Create a page").requiredOption("--site-id <id>","Site ID").requiredOption("--title <title>","Page title").option("--slug <slug>","Page slug").option("--content <content>","Page content").option("--parent-id <id>","Parent page ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(yo,{input:{siteId:e.siteId,title:e.title,slug:e.slug,content:e.content,parentId:e.parentId}});a("Page created"),c(e,t.createDocsPage);}catch(t){r(t);}}),o.command("update-page").description("Update a page").argument("<id>","Page ID").option("--title <title>","Title").option("--content <content>","Content").option("--slug <slug>","Slug").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.title&&(n.title=t.title),t.content&&(n.content=t.content),t.slug&&(n.slug=t.slug),!Object.keys(n).length)throw new u("No updates specified");let s=await i(ho,{id:e,input:n});a("Page updated"),c(t,s.updateDocsPage);}catch(n){r(n);}}),o.command("delete-page").description("Delete a page").argument("<id>","Page ID").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await g("Delete this page?",t.force))return;await i(Do,{id:e}),a("Page deleted");}catch(n){r(n);}}),o.command("reorder-pages").description("Reorder pages").argument("<siteId>","Site ID").requiredOption("--pages <json>","Page order as JSON array").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=JSON.parse(t.pages),s=await i(bo,{siteId:e,pages:n});a("Pages reordered"),c(t,s.reorderDocsPages);}catch(n){r(n);}}),o.command("revisions").description("List revisions for a site").argument("<siteId>","Site ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Ao,{siteId:e});c(t,n.docsRevisions);}catch(n){r(n);}}),o.command("revision").description("Get a revision").argument("<id>","Revision ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(ko,{id:e});if(!n.docsRevision)throw new u("Revision not found");c(t,n.docsRevision);}catch(n){r(n);}}),o.command("content").description("Get docs content").argument("<siteId>","Site ID").option("--path <path>","Content path").action(async(e,t)=>{try{let n=await i(Co,{siteId:e,path:t.path});n.docsContent?console.log(n.docsContent):T("No content found");}catch(n){r(n);}}),o.command("compile").description("Compile documentation site").argument("<siteId>","Site ID").option("--publish","Publish after compile").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i($o,{siteId:e,publish:t.publish??!1});a("Docs site compiled"),c(t,n.compileDocsSite);}catch(n){r(n);}}),o.command("publish").description("Publish a revision").argument("<revisionId>","Revision ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Oo,{revisionId:e});a("Revision published"),c(t,n.publishDocsRevision);}catch(n){r(n);}}),o.command("rollback").description("Rollback to a revision").argument("<siteId>","Site ID").argument("<revisionId>","Revision ID").option("--force","Skip confirmation").action(async(e,t,n)=>{try{if(!await g(`Rollback site to revision ${t}?`,n.force))return;let s=await i(wo,{siteId:e,revisionId:t});a("Rollback complete"),c({},s.rollbackDocsRevision);}catch(s){r(s);}}),o.command("signed-url").description("Generate signed URL for a site").argument("<siteId>","Site ID").action(async e=>{try{let t=await i(_o,{siteId:e});console.log(t.generateDocsSignedUrl);}catch(t){r(t);}});}function Qo(d){let o=d.command("audit").description("Audit log management");o.command("list").description("List audit logs").option("--action <action>","Filter by action").option("--resource-type <type>","Filter by resource type").option("--status <status>","Filter by status").option("--actor-id <id>","Filter by actor").option("--from <date>","From date").option("--to <date>","To date").option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.action&&(t.action=e.action),e.resourceType&&(t.resourceType=e.resourceType),e.status&&(t.status=e.status),e.actorId&&(t.actorId=e.actorId),e.from&&(t.from=e.from),e.to&&(t.to=e.to);let s=(await i(No,{filter:Object.keys(t).length?t:void 0})).vibeAuditLogs.items;c(e,s,{headers:["ID","Action","Resource","Resource ID","Actor","Status","Created"],rows:s.map(p=>[m(p.id,12),p.action,p.resourceType,m(p.resourceId,12),m(p.actorId,12),p.status,I(p.createdAt)])});}catch(t){r(t);}}),o.command("get").description("Get audit log").argument("<id>","Audit log ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(vo,{id:e});if(!n.vibeAuditLog)throw new u("Audit log not found");c(t,n.vibeAuditLog);}catch(n){r(n);}}),o.command("stats").description("Get audit log statistics").option("--action <action>","Filter by action").option("--resource-type <type>","Filter by resource type").option("--status <status>","Filter by status").option("--actor-id <id>","Filter by actor").option("--from <date>","From date").option("--to <date>","To date").option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.action&&(t.action=e.action),e.resourceType&&(t.resourceType=e.resourceType),e.status&&(t.status=e.status),e.actorId&&(t.actorId=e.actorId),e.from&&(t.from=e.from),e.to&&(t.to=e.to);let n=await i(Ro,{filter:Object.keys(t).length?t:void 0});c(e,n.vibeAuditLogStats);}catch(t){r(t);}}),o.command("delete").description("Delete audit log").argument("<id>","Audit log ID").option("--reason <reason>","Deletion reason").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await g("Delete this audit log?",t.force))return;await i(xo,{id:e,reason:t.reason}),a("Audit log deleted");}catch(n){r(n);}}),o.command("bulk-delete").description("Bulk delete audit logs").requiredOption("--ids <ids>","Comma-separated IDs").option("--reason <reason>","Deletion reason").option("--force","Skip confirmation").action(async e=>{try{let t=e.ids.split(",").map(n=>n.trim());if(!await g(`Delete ${t.length} audit logs?`,e.force))return;await i(Lo,{ids:t,reason:e.reason}),a(`${t.length} audit logs deleted`);}catch(t){r(t);}}),o.command("export").description("Export audit logs").option("--action <action>","Filter by action").option("--resource-type <type>","Filter by resource type").option("--status <status>","Filter by status").option("--actor-id <id>","Filter by actor").option("--from <date>","From date").option("--to <date>","To date").option("--export-format <fmt>","Export format (csv/json)","json").action(async e=>{try{let t={};e.action&&(t.action=e.action),e.resourceType&&(t.resourceType=e.resourceType),e.status&&(t.status=e.status),e.actorId&&(t.actorId=e.actorId),e.from&&(t.from=e.from),e.to&&(t.to=e.to);let n=await i(Uo,{filter:Object.keys(t).length?t:void 0,exportFormat:e.exportFormat});console.log(n.exportVibeAuditLogs);}catch(t){r(t);}});}function Zo(d){let o=d.command("action").description("Vibe Actions management");o.command("list").description("List actions").option("--type <type>","Filter by action type (COMMAND, SCRIPT, WEBHOOK, WORKFLOW)").option("--trigger <trigger>","Filter by trigger type (MANUAL, SCHEDULED, EVENT, ON_DEMAND)").option("--category <category>","Filter by category").option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.type&&(t.actionType=e.type.toUpperCase()),e.trigger&&(t.triggerType=e.trigger.toUpperCase()),e.category&&(t.category=e.category);let s=(await i(Wn,{filter:Object.keys(t).length?t:void 0})).actions.items;c(e,s,{headers:["ID","Name","Type","Trigger","Source","Category"],rows:s.map(p=>[m(p.id,12),p.displayName??p.name,p.actionType,p.triggerType,p.sourceType,p.category??"-"])});}catch(t){r(t);}}),o.command("get").description("Get action details").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Kn,{id:e});if(!n.action)throw new u("Action not found");c(t,n.action);}catch(n){r(n);}}),o.command("create").description("Create action").requiredOption("--name <n>","Name").option("--display-name <n>","Display name").option("--description <d>","Description").option("--type <t>","Action type (COMMAND, SCRIPT, WEBHOOK, WORKFLOW)","COMMAND").option("--trigger <t>","Trigger type (MANUAL, SCHEDULED, EVENT, ON_DEMAND)","MANUAL").option("--command <c>","Command to execute").option("--working-directory <d>","Working directory for command").option("--script <s>","Script content").option("--script-interpreter <i>","Script interpreter (e.g. bash, python)").option("--webhook-url <u>","Webhook URL").option("--webhook-method <m>","Webhook HTTP method").option("--schedule <s>","Cron schedule expression").option("--category <c>","Category").option("--tags <t>","Comma-separated tags").option("--target-agent-id <id>","Target agent ID").option("--timeout <ms>","Timeout in milliseconds",parseInt).option("--retry-count <n>","Retry count",parseInt).option("--confirmation-required","Require confirmation before execution").option("-f, --format <format>","Output format").action(async e=>{try{let t={name:e.name,actionType:(e.type??"COMMAND").toUpperCase(),triggerType:(e.trigger??"MANUAL").toUpperCase()};e.displayName&&(t.displayName=e.displayName),e.description&&(t.description=e.description),e.command&&(t.command=e.command),e.workingDirectory&&(t.workingDirectory=e.workingDirectory),e.script&&(t.script=e.script),e.scriptInterpreter&&(t.scriptInterpreter=e.scriptInterpreter),e.webhookUrl&&(t.webhookUrl=e.webhookUrl),e.webhookMethod&&(t.webhookMethod=e.webhookMethod),e.schedule&&(t.schedule=e.schedule),e.category&&(t.category=e.category),e.tags&&(t.tags=e.tags.split(",").map(s=>s.trim())),e.targetAgentId&&(t.targetAgentId=e.targetAgentId),e.timeout!==void 0&&(t.timeoutMs=e.timeout),e.retryCount!==void 0&&(t.retryCount=e.retryCount),e.confirmationRequired&&(t.confirmationRequired=!0);let n=await i(jn,{input:t});a("Action created"),c(e,n.createAction);}catch(t){r(t);}}),o.command("update").description("Update action").argument("<id>").option("--name <n>","Name").option("--display-name <n>","Display name").option("--description <d>","Description").option("--type <t>","Action type (COMMAND, SCRIPT, WEBHOOK, WORKFLOW)").option("--trigger <t>","Trigger type (MANUAL, SCHEDULED, EVENT, ON_DEMAND)").option("--command <c>","Command to execute").option("--working-directory <d>","Working directory for command").option("--script <s>","Script content").option("--script-interpreter <i>","Script interpreter").option("--webhook-url <u>","Webhook URL").option("--webhook-method <m>","Webhook HTTP method").option("--schedule <s>","Cron schedule expression").option("--category <c>","Category").option("--tags <t>","Comma-separated tags").option("--target-agent-id <id>","Target agent ID").option("--timeout <ms>","Timeout in milliseconds",parseInt).option("--retry-count <n>","Retry count",parseInt).option("--confirmation-required","Require confirmation before execution").option("--no-confirmation-required","Disable confirmation requirement").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.displayName&&(n.displayName=t.displayName),t.description&&(n.description=t.description),t.type&&(n.actionType=t.type.toUpperCase()),t.trigger&&(n.triggerType=t.trigger.toUpperCase()),t.command&&(n.command=t.command),t.workingDirectory&&(n.workingDirectory=t.workingDirectory),t.script&&(n.script=t.script),t.scriptInterpreter&&(n.scriptInterpreter=t.scriptInterpreter),t.webhookUrl&&(n.webhookUrl=t.webhookUrl),t.webhookMethod&&(n.webhookMethod=t.webhookMethod),t.schedule&&(n.schedule=t.schedule),t.category&&(n.category=t.category),t.tags&&(n.tags=t.tags.split(",").map(p=>p.trim())),t.targetAgentId&&(n.targetAgentId=t.targetAgentId),t.timeout!==void 0&&(n.timeoutMs=t.timeout),t.retryCount!==void 0&&(n.retryCount=t.retryCount),t.confirmationRequired!==void 0&&(n.confirmationRequired=t.confirmationRequired),!Object.keys(n).length)throw new u("No updates specified");let s=await i(Jn,{id:e,input:n});a("Action updated"),c(t,s.updateAction);}catch(n){r(n);}}),o.command("delete").description("Delete action").argument("<id>").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await g("Delete this action?",t.force))return;await i(Yn,{id:e}),a("Action deleted");}catch(n){r(n);}}),o.command("duplicate").description("Duplicate action").argument("<id>").argument("[name]").option("-f, --format <format>","Output format").action(async(e,t,n)=>{try{let s=await i(zn,{id:e,name:t});a("Action duplicated"),c(n,s.duplicateAction);}catch(s){r(s);}}),o.command("execute").description("Execute action").argument("<id>").option("--agent-id <id>","Target agent ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};t.agentId&&(n.agentId=t.agentId);let p=(await i(Xn,{id:e,input:Object.keys(n).length?n:void 0})).executeAction,f=p.status;f==="SUCCESS"?a(`Action executed successfully${p.durationMs?` (${p.durationMs}ms)`:""}`):f==="RUNNING"||f==="PENDING"?a(`Action execution started (${f})`):T(p.errorMessage??`Execution ${f}`),c(t,p);}catch(n){r(n);}}),o.command("install").description("Install action from store").argument("<storeItemId>").option("--version <v>","Version to install").option("--name <n>","Custom name for installed action").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Qn,{storeItemId:e,version:t.version,name:t.name});a("Action installed from store"),c(t,n.installActionFromStore);}catch(n){r(n);}}),o.command("history").description("List action execution history").argument("[actionId]").option("--status <s>","Filter by status (PENDING, RUNNING, SUCCESS, FAILURE, TIMEOUT, CANCELLED)").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};e&&(n.actionId=e),t.status&&(n.status=t.status.toUpperCase());let p=(await i(to,{filter:Object.keys(n).length?n:void 0})).actionExecutions.items;c(t,p,{headers:["ID","Action ID","Status","Trigger","Duration","Started"],rows:p.map(f=>[m(f.id,12),m(f.actionId,12),y(f.status),f.triggerType,f.durationMs?`${f.durationMs}ms`:"-",I(f.startedAt)])});}catch(n){r(n);}}),o.command("cancel-execution").description("Cancel a running action execution").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(Zn,{id:e});a("Action execution cancelled"),c(t,n.cancelActionExecution);}catch(n){r(n);}}),o.command("execution").description("Get action execution details").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await i(eo,{id:e});if(!n.actionExecution)throw new u("Action execution not found");c(t,n.actionExecution);}catch(n){r(n);}}),o.command("schedule").description("Create a scheduled job for an action").argument("<actionId>","Action ID to schedule").option("--cron <expr>","Cron expression (for CRON schedule type)").option("--timezone <tz>","Timezone for the schedule","UTC").option("--schedule-type <type>","Schedule type (CRON, ONE_TIME, FIXED_INTERVAL)","CRON").option("--scheduled-at <date>","ISO date for ONE_TIME schedule").option("--interval <n>","Interval value (for FIXED_INTERVAL)",parseInt).option("--interval-unit <unit>","Interval unit (MINUTES, HOURS, DAYS)").option("--start-date <date>","Schedule start date (ISO)").option("--end-date <date>","Schedule end date (ISO)").option("--name <name>","Name for the scheduled job").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={actionId:e,scheduleType:(t.scheduleType??"CRON").toUpperCase()};t.cron&&(n.cronExpression=t.cron),t.timezone&&(n.timezone=t.timezone),t.scheduledAt&&(n.scheduledAt=t.scheduledAt),t.interval!==void 0&&(n.interval=t.interval),t.intervalUnit&&(n.intervalUnit=t.intervalUnit.toUpperCase()),t.startDate&&(n.startDate=t.startDate),t.endDate&&(n.endDate=t.endDate),t.name&&(n.name=t.name);let s=await i(oo,{input:n});a("Scheduled job created"),c(t,s.createScheduledJob);}catch(n){r(n);}}),o.command("unschedule").description("Delete a scheduled job").argument("<scheduledJobId>","Scheduled job ID to delete").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await g("Delete this scheduled job?",t.force))return;await i(io,{id:e}),a("Scheduled job deleted");}catch(n){r(n);}}),o.command("schedules").description("List scheduled jobs").option("--action-id <id>","Filter by action ID").option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.actionId&&(t.actionId=e.actionId);let s=(await i(ro,{filter:Object.keys(t).length?t:void 0})).scheduledJobs.jobs;c(e,s,{headers:["ID","Name","Type","Status","Action ID","Cron","Next Run"],rows:s.map(p=>[m(p.id,12),p.name??"-",p.scheduleType,y(p.status),m(p.actionId,12),p.cronExpression??"-",p.nextExecutionAt?I(p.nextExecutionAt):"-"])});}catch(t){r(t);}});}function ti(d){let o=d.command("analytics").description("VibeControls analytics");o.command("overview").description("Show analytics overview for all entities").option("--start-date <date>","Start date (ISO format)",new Date(Date.now()-10080*60*1e3).toISOString()).option("--end-date <date>","End date (ISO format)",new Date().toISOString()).option("--granularity <g>","Granularity (HOUR, DAY, WEEK, MONTH)","DAY").option("--agent-id <id>","Filter by agent ID").option("--vibe-id <id>","Filter by vibe ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(V,{input:{startDate:e.startDate,endDate:e.endDate,granularity:e.granularity,agentId:e.agentId||void 0,vibeId:e.vibeId||void 0}});c(e,t.vibecontrolsAnalytics);}catch(t){r(t);}}),o.command("agents").description("Show agent analytics").option("--start-date <date>","Start date (ISO format)",new Date(Date.now()-10080*60*1e3).toISOString()).option("--end-date <date>","End date (ISO format)",new Date().toISOString()).option("--granularity <g>","Granularity","DAY").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(V,{input:{startDate:e.startDate,endDate:e.endDate,granularity:e.granularity,entityTypes:["AGENT"]}});c(e,t.vibecontrolsAnalytics.agents);}catch(t){r(t);}}),o.command("sessions").description("Show session analytics").option("--start-date <date>","Start date (ISO format)",new Date(Date.now()-10080*60*1e3).toISOString()).option("--end-date <date>","End date (ISO format)",new Date().toISOString()).option("--granularity <g>","Granularity","DAY").option("--agent-id <id>","Filter by agent ID").option("--vibe-id <id>","Filter by vibe ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(V,{input:{startDate:e.startDate,endDate:e.endDate,granularity:e.granularity,entityTypes:["SESSION"],agentId:e.agentId||void 0,vibeId:e.vibeId||void 0}});c(e,t.vibecontrolsAnalytics.sessions);}catch(t){r(t);}}),o.command("actions").description("Show action analytics").option("--start-date <date>","Start date (ISO format)",new Date(Date.now()-10080*60*1e3).toISOString()).option("--end-date <date>","End date (ISO format)",new Date().toISOString()).option("--granularity <g>","Granularity","DAY").option("-f, --format <format>","Output format").action(async e=>{try{let t=await i(V,{input:{startDate:e.startDate,endDate:e.endDate,granularity:e.granularity,entityTypes:["ACTION"]}});c(e,t.vibecontrolsAnalytics.actions);}catch(t){r(t);}});}var li={id:"vibecontrols",version:"1.0.0",displayName:"VibeControls",dependsOn:["auth","workspaces"],register(d,o){Q(o),Vo(d),Po(d),Go(d),Bo(d),qo(d),Fo(d),Mo(d),Wo(d),Ko(d),Jo(d),Yo(d),zo(d),Xo(d),Qo(d),Zo(d),ti(d);}},oa=li;module.exports=oa;
|
|
905
|
+
`,z=`
|
|
906
|
+
id name description visibility
|
|
907
|
+
ownerId ownerName componentCount vibeCount
|
|
908
|
+
tags metadata workspaceId
|
|
909
|
+
createdAt updatedAt deletedAt
|
|
910
|
+
createdBy updatedBy onBehalfOf
|
|
911
|
+
`,B=`
|
|
912
|
+
id name description type lifecycle version
|
|
913
|
+
language framework repositoryUrl documentationUrl
|
|
914
|
+
dependencies sbomData tags metadata
|
|
915
|
+
ownerId ownerName teamId teamName catalogCount
|
|
916
|
+
workspaceId createdAt updatedAt deletedAt
|
|
917
|
+
`,Q=`
|
|
918
|
+
id name description category status version
|
|
919
|
+
setupInstructions sourceRepositoryUrl
|
|
920
|
+
fileTree variables componentSnapshot
|
|
921
|
+
cloneCount tags metadata
|
|
922
|
+
createdAt updatedAt
|
|
923
|
+
`,st=`
|
|
924
|
+
id name description type status value threshold unit
|
|
925
|
+
iframeUrl iframeHeight lastUpdatedAt createdAt updatedAt
|
|
926
|
+
`,ci=`
|
|
927
|
+
id ownerId ownerType overallScore lastEvaluatedAt
|
|
928
|
+
metrics { ${st} }
|
|
929
|
+
metadata workspaceId createdAt updatedAt
|
|
930
|
+
`,di=`
|
|
931
|
+
query VibecontrolsCatalogs($filter: CatalogFilterInput, $pagination: PaginationInput) {
|
|
932
|
+
vibecontrolsCatalogs(filter: $filter, pagination: $pagination) {
|
|
933
|
+
items { ${z} }
|
|
934
|
+
total
|
|
935
|
+
hasMore
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
`,pi=`
|
|
939
|
+
query VibecontrolsCatalog($id: ID!) {
|
|
940
|
+
vibecontrolsCatalog(id: $id) { ${z} }
|
|
941
|
+
}
|
|
942
|
+
`,ui=`
|
|
943
|
+
query VibecontrolsCatalogDependencyGraph($catalogId: ID!) {
|
|
944
|
+
vibecontrolsCatalogDependencyGraph(catalogId: $catalogId) {
|
|
945
|
+
nodes { id name type version }
|
|
946
|
+
edges { source target version dependencyType }
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
`,mi=`
|
|
950
|
+
query VibecontrolsCatalogSBOM($catalogId: ID!) {
|
|
951
|
+
vibecontrolsCatalogSBOM(catalogId: $catalogId) {
|
|
952
|
+
format generatedAt totalCount
|
|
953
|
+
components { name version type license }
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
`,gi=`
|
|
957
|
+
mutation CreateVibecontrolsCatalog($input: CreateCatalogInput!) {
|
|
958
|
+
createVibecontrolsCatalog(input: $input) { ${z} }
|
|
959
|
+
}
|
|
960
|
+
`,li=`
|
|
961
|
+
mutation UpdateVibecontrolsCatalog($id: ID!, $input: UpdateCatalogInput!) {
|
|
962
|
+
updateVibecontrolsCatalog(id: $id, input: $input) { ${z} }
|
|
963
|
+
}
|
|
964
|
+
`,fi=`
|
|
965
|
+
mutation DeleteVibecontrolsCatalog($id: ID!) { deleteVibecontrolsCatalog(id: $id) }
|
|
966
|
+
`,Ii=`
|
|
967
|
+
mutation AddComponentToVibecontrolsCatalog($catalogId: ID!, $componentId: ID!) {
|
|
968
|
+
addComponentToVibecontrolsCatalog(catalogId: $catalogId, componentId: $componentId) {
|
|
969
|
+
id catalogId componentId addedAt addedBy metadata workspaceId
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
`,Si=`
|
|
973
|
+
mutation RemoveComponentFromVibecontrolsCatalog($catalogId: ID!, $componentId: ID!) {
|
|
974
|
+
removeComponentFromVibecontrolsCatalog(catalogId: $catalogId, componentId: $componentId)
|
|
975
|
+
}
|
|
976
|
+
`,yi=`
|
|
977
|
+
mutation AddVibeToVibecontrolsCatalog($catalogId: ID!, $vibeId: ID!) {
|
|
978
|
+
addVibeToVibecontrolsCatalog(catalogId: $catalogId, vibeId: $vibeId) {
|
|
979
|
+
id catalogId vibeId addedAt addedBy metadata workspaceId
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
`,Ei=`
|
|
983
|
+
mutation RemoveVibeFromVibecontrolsCatalog($catalogId: ID!, $vibeId: ID!) {
|
|
984
|
+
removeVibeFromVibecontrolsCatalog(catalogId: $catalogId, vibeId: $vibeId)
|
|
985
|
+
}
|
|
986
|
+
`,Ti=`
|
|
987
|
+
query VibecontrolsComponents($filter: ComponentFilterInput, $pagination: PaginationInput) {
|
|
988
|
+
vibecontrolsComponents(filter: $filter, pagination: $pagination) {
|
|
989
|
+
items { ${B} }
|
|
990
|
+
total
|
|
991
|
+
hasMore
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
`,bi=`
|
|
995
|
+
query VibecontrolsComponent($id: ID!) {
|
|
996
|
+
vibecontrolsComponent(id: $id) { ${B} }
|
|
997
|
+
}
|
|
998
|
+
`,Ai=`
|
|
999
|
+
mutation CreateVibecontrolsComponent($input: CreateComponentInput!) {
|
|
1000
|
+
createVibecontrolsComponent(input: $input) { ${B} }
|
|
1001
|
+
}
|
|
1002
|
+
`,hi=`
|
|
1003
|
+
mutation UpdateVibecontrolsComponent($id: ID!, $input: UpdateComponentInput!) {
|
|
1004
|
+
updateVibecontrolsComponent(id: $id, input: $input) { ${B} }
|
|
1005
|
+
}
|
|
1006
|
+
`,Ci=`
|
|
1007
|
+
mutation DeleteVibecontrolsComponent($id: ID!) { deleteVibecontrolsComponent(id: $id) }
|
|
1008
|
+
`,Di=`
|
|
1009
|
+
mutation ForkVibecontrolsGitHubRepo($input: VibecontrolsForkGitHubRepoInput!) {
|
|
1010
|
+
forkVibecontrolsGitHubRepo(input: $input) { isForked repoFullName repoUrl }
|
|
1011
|
+
}
|
|
1012
|
+
`,Oi=`
|
|
1013
|
+
mutation PublishVibecontrolsComponentAsTemplate(
|
|
1014
|
+
$componentId: ID!
|
|
1015
|
+
$input: VibecontrolsPublishTemplateInput!
|
|
1016
|
+
) {
|
|
1017
|
+
publishVibecontrolsComponentAsTemplate(componentId: $componentId, input: $input) {
|
|
1018
|
+
${Q}
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
`,$i=`
|
|
1022
|
+
query VibecontrolsTemplates(
|
|
1023
|
+
$filter: VibecontrolsTemplateFilterInput
|
|
1024
|
+
$pagination: PaginationInput
|
|
1025
|
+
) {
|
|
1026
|
+
vibecontrolsTemplates(filter: $filter, pagination: $pagination) {
|
|
1027
|
+
items { ${Q} }
|
|
1028
|
+
total
|
|
1029
|
+
hasMore
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
`,wi=`
|
|
1033
|
+
query VibecontrolsTemplate($id: ID!) {
|
|
1034
|
+
vibecontrolsTemplate(id: $id) { ${Q} }
|
|
1035
|
+
}
|
|
1036
|
+
`,vi=`
|
|
1037
|
+
mutation UpdateVibecontrolsTemplate($id: ID!, $input: VibecontrolsUpdateTemplateInput!) {
|
|
1038
|
+
updateVibecontrolsTemplate(id: $id, input: $input) { ${Q} }
|
|
1039
|
+
}
|
|
1040
|
+
`,ki=`
|
|
1041
|
+
mutation DeleteVibecontrolsTemplate($id: ID!) { deleteVibecontrolsTemplate(id: $id) }
|
|
1042
|
+
`,_i=`
|
|
1043
|
+
mutation InstantiateVibecontrolsTemplate(
|
|
1044
|
+
$templateId: ID!
|
|
1045
|
+
$input: VibecontrolsCloneTemplateInput!
|
|
1046
|
+
) {
|
|
1047
|
+
instantiateVibecontrolsTemplate(templateId: $templateId, input: $input) {
|
|
1048
|
+
${B}
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
`,Ri=`
|
|
1052
|
+
query VibecontrolsScorecard($ownerId: ID!, $ownerType: ScorecardOwnerType!) {
|
|
1053
|
+
vibecontrolsScorecard(ownerId: $ownerId, ownerType: $ownerType) {
|
|
1054
|
+
${ci}
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
`,Ni=`
|
|
1058
|
+
mutation UpsertVibecontrolsScorecard($input: UpsertScorecardInput!) {
|
|
1059
|
+
upsertVibecontrolsScorecard(input: $input) { ${ci} }
|
|
1060
|
+
}
|
|
1061
|
+
`,xi=`
|
|
1062
|
+
mutation AddVibecontrolsScorecardMetric($scorecardId: ID!, $input: AddScorecardMetricInput!) {
|
|
1063
|
+
addVibecontrolsScorecardMetric(scorecardId: $scorecardId, input: $input) {
|
|
1064
|
+
${st}
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
`,Ui=`
|
|
1068
|
+
mutation UpdateVibecontrolsScorecardMetric($id: ID!, $input: UpdateScorecardMetricInput!) {
|
|
1069
|
+
updateVibecontrolsScorecardMetric(id: $id, input: $input) {
|
|
1070
|
+
${st}
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
`,Li=`
|
|
1074
|
+
mutation RemoveVibecontrolsScorecardMetric($id: ID!) {
|
|
1075
|
+
removeVibecontrolsScorecardMetric(id: $id)
|
|
1076
|
+
}
|
|
1077
|
+
`,Pi=`
|
|
1078
|
+
mutation ExportSessions($input: SessionExportInput!) {
|
|
1079
|
+
exportSessions(input: $input) { count data format generatedAt }
|
|
1080
|
+
}
|
|
1081
|
+
`,L=`
|
|
1082
|
+
id name description content category status isShared
|
|
1083
|
+
tags variables metadata createdBy onBehalfOf updatedBy
|
|
1084
|
+
workspaceId usageCount lastUsedAt
|
|
1085
|
+
createdAt updatedAt deletedAt
|
|
1086
|
+
`,Vi=`
|
|
1087
|
+
query AiPrompts($filter: AIPromptFilterInput, $pagination: PaginationInput) {
|
|
1088
|
+
aiPrompts(filter: $filter, pagination: $pagination) {
|
|
1089
|
+
items { ${L} }
|
|
1090
|
+
total hasMore
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
`,Gi=`
|
|
1094
|
+
query AiPrompt($id: ID!) { aiPrompt(id: $id) { ${L} } }
|
|
1095
|
+
`,qi=`
|
|
1096
|
+
mutation CreateAIPrompt($input: CreateAIPromptInput!) {
|
|
1097
|
+
createAIPrompt(input: $input) { ${L} }
|
|
1098
|
+
}
|
|
1099
|
+
`,Bi=`
|
|
1100
|
+
mutation UpdateAIPrompt($id: ID!, $input: UpdateAIPromptInput!) {
|
|
1101
|
+
updateAIPrompt(id: $id, input: $input) { ${L} }
|
|
1102
|
+
}
|
|
1103
|
+
`,Fi=`
|
|
1104
|
+
mutation DeleteAIPrompt($id: ID!) { deleteAIPrompt(id: $id) }
|
|
1105
|
+
`,Mi=`
|
|
1106
|
+
mutation DuplicateAIPrompt($id: ID!, $name: String!) {
|
|
1107
|
+
duplicateAIPrompt(id: $id, name: $name) { ${L} }
|
|
1108
|
+
}
|
|
1109
|
+
`,Hi=`
|
|
1110
|
+
mutation RenderAIPrompt($id: ID!, $variables: JSON) {
|
|
1111
|
+
renderAIPrompt(id: $id, variables: $variables) { promptId rendered }
|
|
1112
|
+
}
|
|
1113
|
+
`,Ki=`
|
|
1114
|
+
mutation RecordAIPromptUsage($id: ID!) {
|
|
1115
|
+
recordAIPromptUsage(id: $id) { ${L} }
|
|
1116
|
+
}
|
|
1117
|
+
`,Z=`
|
|
1118
|
+
id vibeDeckId token shareUrl name permission status visibility
|
|
1119
|
+
hasPassword allowIframe maxUses useCount expiresAt lastUsedAt
|
|
1120
|
+
createdBy createdAt
|
|
1121
|
+
`,Wi=`
|
|
1122
|
+
query VibeDeckShareLinks($vibeDeckId: ID!) {
|
|
1123
|
+
vibeDeckShareLinks(vibeDeckId: $vibeDeckId) { ${Z} }
|
|
1124
|
+
}
|
|
1125
|
+
`,ji=`
|
|
1126
|
+
mutation CreateVibeDeckShareLink($input: CreateVibeDeckShareLinkInput!) {
|
|
1127
|
+
createVibeDeckShareLink(input: $input) { ${Z} }
|
|
1128
|
+
}
|
|
1129
|
+
`,Yi=`
|
|
1130
|
+
mutation UpdateVibeDeckShareLink($id: ID!, $input: UpdateVibeDeckShareLinkInput!) {
|
|
1131
|
+
updateVibeDeckShareLink(id: $id, input: $input) { ${Z} }
|
|
1132
|
+
}
|
|
1133
|
+
`,Ji=`
|
|
1134
|
+
mutation RevokeVibeDeckShareLink($id: ID!) {
|
|
1135
|
+
revokeVibeDeckShareLink(id: $id) { ${Z} }
|
|
1136
|
+
}
|
|
1137
|
+
`,Xi=`
|
|
1138
|
+
query ValidateVibeDeckShareLink($token: String!) {
|
|
1139
|
+
validateVibeDeckShareLink(token: $token) {
|
|
1140
|
+
isValid error requiresPassword permission allowIframe
|
|
1141
|
+
expiresAt vibeDeckId vibeDeckName ownerName
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
`,zi=`
|
|
1145
|
+
query SharedVibeDeck($token: String!, $password: String) {
|
|
1146
|
+
sharedVibeDeck(token: $token, password: $password) {
|
|
1147
|
+
id name description icon buttonSize colorTheme gridColumns gridRows
|
|
1148
|
+
permission
|
|
1149
|
+
buttons { id label actionType row column rowSpan colSpan icon color category confirmationRequired }
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
`,Qi=`
|
|
1153
|
+
mutation ExecuteSharedVibeDeckButton($token: String!, $buttonId: ID!, $password: String) {
|
|
1154
|
+
executeSharedVibeDeckButton(token: $token, buttonId: $buttonId, password: $password) {
|
|
1155
|
+
success output error
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
`,wa="summary { critical high medium low info }",Zi=`
|
|
1159
|
+
id workspaceId vibeId scanRunId fingerprint
|
|
1160
|
+
category severity status ruleId title description
|
|
1161
|
+
file line col cve cwe packageName packageVersion fixedVersion
|
|
1162
|
+
remediation redactedSample ownerTeam firstSeenAt lastSeenAt dueAt
|
|
1163
|
+
`,F=`
|
|
1164
|
+
id workspaceId vibeId agentId createdBy providerName
|
|
1165
|
+
stage status conclusion policyLevel repoUrl commit
|
|
1166
|
+
durationMs errorReason startedAt finishedAt createdAt
|
|
1167
|
+
${wa}
|
|
1168
|
+
`,tr=`
|
|
1169
|
+
id workspaceId providerName pluginName stage toolVersion
|
|
1170
|
+
enabled isDefault config createdAt updatedAt
|
|
1171
|
+
`,er=`
|
|
1172
|
+
id workspaceId vibeId policyLevel enabledStages
|
|
1173
|
+
pluginAssignments profile configYamlEquivalent createdAt updatedAt
|
|
1174
|
+
`,nr=`
|
|
1175
|
+
query SecurityProviders { securityProviders { ${tr} } }
|
|
1176
|
+
`,or=`
|
|
1177
|
+
query SecurityScan($id: ID!) {
|
|
1178
|
+
securityScan(id: $id) { ${F} }
|
|
1179
|
+
}
|
|
1180
|
+
`,ir=`
|
|
1181
|
+
query MySecurityScans($filter: SecurityScanFilterInput, $pagination: SecurityPaginationInput) {
|
|
1182
|
+
mySecurityScans(filter: $filter, pagination: $pagination) {
|
|
1183
|
+
items { ${F} } total hasMore
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
`,rr=`
|
|
1187
|
+
query AllSecurityScans($filter: SecurityScanFilterInput, $pagination: SecurityPaginationInput) {
|
|
1188
|
+
allSecurityScans(filter: $filter, pagination: $pagination) {
|
|
1189
|
+
items { ${F} } total hasMore
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
`,ar=`
|
|
1193
|
+
query SecurityFindings($filter: SecurityFindingFilterInput, $pagination: SecurityPaginationInput) {
|
|
1194
|
+
securityFindings(filter: $filter, pagination: $pagination) {
|
|
1195
|
+
items { ${Zi} } total hasMore
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
`,sr=`
|
|
1199
|
+
query SecurityPolicyDecision($scanRunId: ID!) {
|
|
1200
|
+
securityPolicyDecision(scanRunId: $scanRunId) {
|
|
1201
|
+
scanRunId allow denyReasons policyVersion evaluatedAt
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
`,cr=`
|
|
1205
|
+
query SecurityStatus($vibeId: ID!) {
|
|
1206
|
+
securityStatus(vibeId: $vibeId) {
|
|
1207
|
+
vibeId policyLevel perStage lastScanAt
|
|
1208
|
+
totals { critical high medium low info }
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
`,dr=`
|
|
1212
|
+
query RepositorySecurityConfig($vibeId: ID!) {
|
|
1213
|
+
repositorySecurityConfig(vibeId: $vibeId) { ${er} }
|
|
1214
|
+
}
|
|
1215
|
+
`,pr=`
|
|
1216
|
+
mutation RunSecurityScan($vibeId: ID!, $stage: SecurityStage!) {
|
|
1217
|
+
runSecurityScan(vibeId: $vibeId, stage: $stage) { ${F} }
|
|
1218
|
+
}
|
|
1219
|
+
`,ur=`
|
|
1220
|
+
mutation CancelSecurityScan($id: ID!) {
|
|
1221
|
+
cancelSecurityScan(id: $id) { ${F} }
|
|
1222
|
+
}
|
|
1223
|
+
`,mr=`
|
|
1224
|
+
mutation CreateSecurityException($input: CreateSecurityExceptionInput!) {
|
|
1225
|
+
createSecurityException(input: $input) {
|
|
1226
|
+
id workspaceId vibeId findingId reason compensatingControls
|
|
1227
|
+
approvedBy expiresAt status createdAt
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
`,gr=`
|
|
1231
|
+
mutation RevokeSecurityException($id: ID!) { revokeSecurityException(id: $id) }
|
|
1232
|
+
`,lr=`
|
|
1233
|
+
mutation SetSecurityProvider($input: SetSecurityProviderInput!) {
|
|
1234
|
+
setSecurityProvider(input: $input) { ${tr} }
|
|
1235
|
+
}
|
|
1236
|
+
`,fr=`
|
|
1237
|
+
mutation UpdateSecurityFindingStatus($id: ID!, $status: SecurityFindingStatus!) {
|
|
1238
|
+
updateSecurityFindingStatus(id: $id, status: $status) { ${Zi} }
|
|
1239
|
+
}
|
|
1240
|
+
`,Ir=`
|
|
1241
|
+
mutation UpdateRepositorySecurityConfig(
|
|
1242
|
+
$vibeId: ID!, $input: UpdateRepositorySecurityConfigInput!
|
|
1243
|
+
) {
|
|
1244
|
+
updateRepositorySecurityConfig(vibeId: $vibeId, input: $input) { ${er} }
|
|
1245
|
+
}
|
|
1246
|
+
`,Sr=`
|
|
1247
|
+
mutation PresignSecurityEvidence(
|
|
1248
|
+
$scanRunId: ID!, $sha256: String!, $sizeBytes: Int!, $type: SecurityEvidenceType!
|
|
1249
|
+
) {
|
|
1250
|
+
presignSecurityEvidence(
|
|
1251
|
+
scanRunId: $scanRunId, sha256: $sha256, sizeBytes: $sizeBytes, type: $type
|
|
1252
|
+
) {
|
|
1253
|
+
evidenceId uploadUrl method requiredHeaders s3Bucket s3Key expiresAt
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
`,ct=`
|
|
1257
|
+
id status conclusion workflowName branch event actor url
|
|
1258
|
+
startedAt completedAt durationSeconds
|
|
1259
|
+
`,yr=`
|
|
1260
|
+
recentRuns { ${ct} }
|
|
1261
|
+
workflows { id name path state }
|
|
1262
|
+
averageDurationSeconds successRate totalRunsLast30Days
|
|
1263
|
+
`,Er=`
|
|
1264
|
+
query GetCIStatus($providerId: ID!, $agentId: ID!, $limit: Int) {
|
|
1265
|
+
getCIStatus(providerId: $providerId, agentId: $agentId, limit: $limit) { ${yr} }
|
|
1266
|
+
}
|
|
1267
|
+
`,Tr=`
|
|
1268
|
+
query GetCIPipelineRuns($providerId: ID!, $agentId: ID!, $branch: String, $limit: Int) {
|
|
1269
|
+
getCIPipelineRuns(providerId: $providerId, agentId: $agentId, branch: $branch, limit: $limit) {
|
|
1270
|
+
${ct}
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
`,br=`
|
|
1274
|
+
query GetCIPipelineDetails($providerId: ID!, $agentId: ID!, $runId: ID!) {
|
|
1275
|
+
getCIPipelineDetails(providerId: $providerId, agentId: $agentId, runId: $runId) {
|
|
1276
|
+
${ct}
|
|
1277
|
+
commitSha commitMessage
|
|
1278
|
+
jobs { id name status conclusion startedAt completedAt durationSeconds }
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
`,Ar=`
|
|
1282
|
+
query GetRepoStats($providerId: ID!, $agentId: ID!) {
|
|
1283
|
+
getRepoStats(providerId: $providerId, agentId: $agentId) {
|
|
1284
|
+
name fullName owner defaultBranch visibility
|
|
1285
|
+
stargazerCount forkCount openIssues openPullRequests
|
|
1286
|
+
languages license createdAt updatedAt pushedAt
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
`,hr=`
|
|
1290
|
+
mutation RefreshCIStatus($providerId: ID!, $agentId: ID!) {
|
|
1291
|
+
refreshCIStatus(providerId: $providerId, agentId: $agentId) { ${yr} }
|
|
1292
|
+
}
|
|
1293
|
+
`,Cr=`
|
|
1294
|
+
mutation RefreshRepoStats($providerId: ID!, $agentId: ID!) {
|
|
1295
|
+
refreshRepoStats(providerId: $providerId, agentId: $agentId) {
|
|
1296
|
+
name fullName owner stargazerCount forkCount
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
`,tt=`
|
|
1300
|
+
id workspaceId createdBy name providerType repoUrl
|
|
1301
|
+
isActive vibeId metadata createdAt updatedAt deletedAt
|
|
1302
|
+
`,Dr=`
|
|
1303
|
+
query ListGitopsProviders($filter: GitopsProviderFilterInput, $pagination: PaginationInput) {
|
|
1304
|
+
listGitopsProviders(filter: $filter, pagination: $pagination) {
|
|
1305
|
+
items { ${tt} } total hasMore
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
`,Or=`
|
|
1309
|
+
query GetGitopsProvider($id: ID!) { getGitopsProvider(id: $id) { ${tt} } }
|
|
1310
|
+
`,$r=`
|
|
1311
|
+
mutation CreateGitopsProvider($input: CreateGitopsProviderInput!) {
|
|
1312
|
+
createGitopsProvider(input: $input) { ${tt} }
|
|
1313
|
+
}
|
|
1314
|
+
`,wr=`
|
|
1315
|
+
mutation UpdateGitopsProvider($id: ID!, $input: UpdateGitopsProviderInput!) {
|
|
1316
|
+
updateGitopsProvider(id: $id, input: $input) { ${tt} }
|
|
1317
|
+
}
|
|
1318
|
+
`,vr=`
|
|
1319
|
+
mutation DeleteGitopsProvider($id: ID!) { deleteGitopsProvider(id: $id) }
|
|
1320
|
+
`,kr=`
|
|
1321
|
+
theme uiDensity sidebarCollapsed codeFont codeFontSize
|
|
1322
|
+
preferredIdeCommand defaultAgentForVibe vibeIdeOverrides vibeDetailTabOrder
|
|
1323
|
+
`,_r=`
|
|
1324
|
+
emailDigest digestFrequency agentOffline sessionError vibeStatusChange
|
|
1325
|
+
`,Rr=`
|
|
1326
|
+
defaultAgent defaultSessionType defaultVibeType defaultEnvironmentVariables
|
|
1327
|
+
autoStartSessions autoGitSync agentHeartbeatInterval agentMaxSessions
|
|
1328
|
+
agentAutoReconnect autoUpdate telemetryEnabled logLevel
|
|
1329
|
+
`,Nr="id key value isSecret createdAt updatedAt",xr=`
|
|
1330
|
+
query MySettings {
|
|
1331
|
+
mySettings {
|
|
1332
|
+
preferences { ${kr} }
|
|
1333
|
+
notifications { ${_r} }
|
|
1334
|
+
workspaceDefaults { ${Rr} }
|
|
1335
|
+
profile { displayName avatar bio language timezone }
|
|
1336
|
+
security { mfaEnabled sessionTimeout activeSessions }
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
`,Ur=`
|
|
1340
|
+
query MySettingsByCategory($category: SettingsCategory!) {
|
|
1341
|
+
mySettingsByCategory(category: $category)
|
|
1342
|
+
}
|
|
1343
|
+
`,Lr=`
|
|
1344
|
+
query ListSettingsSecrets { listSettingsSecrets { ${Nr} } }
|
|
1345
|
+
`,Pr=`
|
|
1346
|
+
mutation SetSettingsSecret($input: SetSettingsSecretInput!) {
|
|
1347
|
+
setSettingsSecret(input: $input) { ${Nr} }
|
|
1348
|
+
}
|
|
1349
|
+
`,Vr=`
|
|
1350
|
+
mutation DeleteSettingsSecret($key: String!) { deleteSettingsSecret(key: $key) }
|
|
1351
|
+
`,Gr=`
|
|
1352
|
+
mutation ResetSettings($category: SettingsCategory!) { resetSettings(category: $category) }
|
|
1353
|
+
`,qr=`
|
|
1354
|
+
mutation UpdatePreferences($input: UpdatePreferencesInput!) {
|
|
1355
|
+
updatePreferences(input: $input) { ${kr} }
|
|
1356
|
+
}
|
|
1357
|
+
`,Br=`
|
|
1358
|
+
mutation UpdateNotificationPreferences($input: UpdateNotificationPreferencesInput!) {
|
|
1359
|
+
updateNotificationPreferences(input: $input) { ${_r} }
|
|
1360
|
+
}
|
|
1361
|
+
`,Fr=`
|
|
1362
|
+
mutation UpdateWorkspaceDefaults($input: UpdateWorkspaceDefaultsInput!) {
|
|
1363
|
+
updateWorkspaceDefaults(input: $input) { ${Rr} }
|
|
1364
|
+
}
|
|
1365
|
+
`,Mr=`
|
|
1366
|
+
mutation VibecontrolsResolveIntegrationToken($connectionId: ID!) {
|
|
1367
|
+
vibecontrolsResolveIntegrationToken(connectionId: $connectionId) {
|
|
1368
|
+
success connectionStatus wasRefreshed error
|
|
1369
|
+
token {
|
|
1370
|
+
accessToken refreshToken tokenType providerKey scopes expiresAt metadata
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
`;function Hr(p){let i=p.command("agents").description("Agent management");i.command("list").description("List agents").option("--active","Only active agents").option("--platform <p>","Filter by platform").option("-f, --format <format>","Output format").action(async n=>{try{let t={};n.active&&(t.isActive=!0),n.platform&&(t.platform=n.platform);let e=await r(ht,{filter:Object.keys(t).length?t:void 0});d(n,e.vibecontrolsAgents,{headers:["ID","Name","Hostname","Platform","Status","Last Heartbeat"],rows:e.vibecontrolsAgents.map(o=>[f(o.id,12),o.name,o.hostname,o.platform,b(o.isActive?"ACTIVE":"INACTIVE"),S(o.lastHeartbeat)])});}catch(t){a(t);}}),i.command("get").description("Get agent by ID").argument("<id>","Agent ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(Ct,{id:n});if(!e.vibecontrolsAgent)throw new m("Agent not found");d(t,e.vibecontrolsAgent);}catch(e){a(e);}}),i.command("create").description("Create agent").requiredOption("--name <n>","Name").requiredOption("--hostname <h>","Hostname").requiredOption("--platform <p>","Platform").requiredOption("--arch <a>","Architecture").requiredOption("--agent-version <v>","Agent version").option("--tunnel-url <u>","Tunnel URL").option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(rt,{input:{name:n.name,hostname:n.hostname,platform:n.platform,architecture:n.arch,version:n.agentVersion,tunnelUrl:n.tunnelUrl}});c("Agent created"),d(n,t.registerVibecontrolsAgent);}catch(t){a(t);}}),i.command("update").description("Update agent").argument("<id>","Agent ID").option("--name <n>","Name").option("--tunnel-url <u>","Tunnel URL").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e={};if(t.name&&(e.name=t.name),t.tunnelUrl&&(e.tunnelUrl=t.tunnelUrl),!Object.keys(e).length)throw new m("No updates specified");let o=await r(Dt,{id:n,input:e});c("Agent updated"),d(t,o.updateVibecontrolsAgent);}catch(e){a(e);}}),i.command("delete").description("Delete agent").argument("<id>","Agent ID").option("--force","Skip confirmation").action(async(n,t)=>{try{if(!await l("Delete this agent?",t.force))return;await r(Ot,{id:n}),c("Agent deleted");}catch(e){a(e);}}),i.command("probe").description("Probe agent connectivity").argument("<id>","Agent ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(wt,{id:n});d(t,e.probeAgentConnection);}catch(e){a(e);}}),i.command("health").description("Health check all agents").option("-f, --format <format>","Output format").action(async n=>{try{let e=(await r(vt)).vibecontrolsAgentHealthProbes;d(n,e,{headers:["Agent","Name","Healthy","Version","Uptime"],rows:e.map(o=>[f(o.agentId,12),o.agentName,b(o.healthy?"HEALTHY":"ERROR"),o.agentVersion??"-",o.uptime!=null?Math.round(o.uptime)+"s":"-"])});}catch(t){a(t);}}),i.command("heartbeat").description("Send heartbeat").argument("<id>","Agent ID").action(async n=>{try{await r($t,{id:n}),c("Heartbeat sent");}catch(t){a(t);}}),i.command("plugins").description("List plugins").argument("<id>","Agent ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(kt,{agentId:n});d(t,e.agentPlugins);}catch(e){a(e);}}),i.command("install-plugin").description("Install plugin").argument("<agentId>").argument("<packageName>").action(async(n,t)=>{try{let e=await r(_t,{agentId:n,packageName:t});e.installAgentPlugin.success?c(`Plugin ${t} installed`):T(e.installAgentPlugin.error??"Failed");}catch(e){a(e);}}),i.command("remove-plugin").description("Remove plugin").argument("<agentId>").argument("<packageName>").action(async(n,t)=>{try{let e=await r(Rt,{agentId:n,packageName:t});e.removeAgentPlugin.success?c(`Plugin ${t} removed`):T(e.removeAgentPlugin.error??"Failed");}catch(e){a(e);}}),i.command("register").description("Register a new agent").requiredOption("--hostname <h>","Hostname").requiredOption("--name <n>","Name").option("--platform <p>","Platform").option("--arch <a>","Architecture").option("--agent-version <v>","Agent version").option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(rt,{input:{hostname:n.hostname,name:n.name,platform:n.platform,architecture:n.arch,version:n.agentVersion}});c("Agent registered"),d(n,t.registerAgent);}catch(t){a(t);}}),i.command("deactivate").description("Deactivate agent").argument("<id>","Agent ID").action(async n=>{try{await r(Nt,{id:n}),c("Agent deactivated");}catch(t){a(t);}}),i.command("push-gateway-auth").description("Push gateway auth credentials").requiredOption("--agent-id <id>","Agent ID").requiredOption("--client-id <cid>","Client ID").requiredOption("--client-secret <cs>","Client secret").action(async n=>{try{await r(xt,{input:{agentId:n.agentId,clientId:n.clientId,clientSecret:n.clientSecret}}),c("Gateway auth pushed");}catch(t){a(t);}}),i.command("setup-gateway-auth").description("Setup gateway auth for agent").requiredOption("--agent-id <id>","Agent ID").action(async n=>{try{await r(Ut,{input:{agentId:n.agentId}}),c("Gateway auth setup complete");}catch(t){a(t);}}),i.command("update-version").description("Update agent version").argument("<agentId>","Agent ID").argument("<version>","Version").action(async(n,t)=>{try{await r(Lt,{agentId:n,version:t}),c("Agent version updated");}catch(e){a(e);}}),i.command("connect-target").description("Connect agent to target").argument("<sourceAgentId>","Source agent ID").argument("<targetId>","Target ID").requiredOption("--protocol <p>","Protocol").action(async(n,t,e)=>{try{await r(Pt,{sourceAgentId:n,targetId:t,protocol:e.protocol}),c("Agent connected to target");}catch(o){a(o);}}),i.command("disconnect-target").description("Disconnect agent from target").argument("<connectionId>","Connection ID").action(async n=>{try{await r(Vt,{connectionId:n}),c("Agent disconnected from target");}catch(t){a(t);}}),i.command("graph").description("Get agent graph").option("--root-agent-id <id>","Root agent ID").option("-f, --format <format>","Output format").action(async n=>{try{let t=H(),e=await r(Gt,{rootAgentId:n.rootAgentId,workspaceId:t?.workspaceId});d(n,e.agentGraph);}catch(t){a(t);}});}function Kr(p){let i=p.command("vibes").description("Vibe management");i.command("list").description("List vibes").option("--status <s>","Filter by status").option("--type <t>","Filter by type").option("--agent <id>","Filter by agent").option("-f, --format <format>","Output format").action(async n=>{try{let t={};n.status&&(t.status=n.status.toUpperCase()),n.type&&(t.type=n.type.toUpperCase()),n.agent&&(t.agentId=n.agent);let o=(await r(qt,{filter:Object.keys(t).length?t:void 0})).vibes.items;d(n,o,{headers:["ID","Name","Type","Status","Path","Created"],rows:o.map(s=>[f(s.id,12),s.name,s.type,b(s.status),f(s.path,30),S(s.createdAt)])});}catch(t){a(t);}}),i.command("get").description("Get vibe by ID").argument("<id>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(Bt,{id:n});if(!e.vibe)throw new m("Vibe not found");d(t,e.vibe);}catch(e){a(e);}}),i.command("create").description("Create vibe").requiredOption("--name <n>","Name").requiredOption("--path <p>","Path").requiredOption("--type <t>","Type (PROJECT, REPOSITORY, etc.)").option("--agent <id>","Agent ID").option("--description <d>","Description").option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(Ft,{input:{name:n.name,path:n.path,type:n.type.toUpperCase(),agentId:n.agent,description:n.description}});c("Vibe created"),d(n,t.createVibe);}catch(t){a(t);}}),i.command("update").description("Update vibe").argument("<id>").option("--name <n>","Name").option("--description <d>","Description").option("--status <s>","Status").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e={};if(t.name&&(e.name=t.name),t.description&&(e.description=t.description),t.status&&(e.status=t.status.toUpperCase()),!Object.keys(e).length)throw new m("No updates specified");let o=await r(Mt,{id:n,input:e});c("Vibe updated"),d(t,o.updateVibe);}catch(e){a(e);}}),i.command("delete").description("Delete vibe").argument("<id>").option("--force","Skip confirmation").action(async(n,t)=>{try{if(!await l("Delete this vibe?",t.force))return;await r(Ht,{id:n}),c("Vibe deleted");}catch(e){a(e);}}),i.command("archive").description("Archive vibe").argument("<id>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(Kt,{id:n});c("Vibe archived"),d(t,e.archiveVibe);}catch(e){a(e);}}),i.command("restore").description("Restore archived vibe").argument("<id>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(Wt,{id:n});c("Vibe restored"),d(t,e.restoreVibe);}catch(e){a(e);}}),i.command("hierarchy").description("Get vibe hierarchy").option("--root <id>","Root vibe ID").option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(jt,{rootId:n.root});d(n,t.vibeHierarchy);}catch(t){a(t);}}),i.command("search").description("Search vibes").argument("<query>").option("--limit <n>","Max results",parseInt).option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(Yt,{query:n,limit:t.limit});d(t,e.searchVibes);}catch(e){a(e);}}),i.command("move").description("Move vibe to new parent").argument("<id>","Vibe ID").option("--parent <parentId>","New parent ID (omit to remove parent)").action(async(n,t)=>{try{let e=await r(Jt,{id:n,newParentId:t.parent||null});c("Vibe moved"),d({},e.moveVibe);}catch(e){a(e);}}),i.command("set-status").description("Set vibe status").argument("<id>","Vibe ID").argument("<status>","New status").action(async(n,t)=>{try{await r(Xt,{id:n,status:t.toUpperCase()}),c("Vibe status updated");}catch(e){a(e);}}),i.command("update-git").description("Update vibe git info").argument("<id>","Vibe ID").option("--branch <b>","Branch").option("--remote <r>","Remote").option("--status <s>","Status").action(async(n,t)=>{try{let e={};t.branch&&(e.branch=t.branch),t.remote&&(e.remote=t.remote),t.status&&(e.status=t.status);let o=await r(zt,{id:n,input:e});c("Vibe git info updated"),d({},o.updateVibeGit);}catch(e){a(e);}});}function Wr(p){let i=p.command("sessions").description("Session management");i.command("list").description("List sessions").option("--status <s>","Filter by status").option("--type <t>","Filter by type").option("--vibe <id>","Filter by vibe").option("--agent <id>","Filter by agent").option("-f, --format <format>","Output format").action(async n=>{try{let t={};n.status&&(t.status=n.status.toUpperCase()),n.type&&(t.type=n.type.toUpperCase()),n.vibe&&(t.vibeId=n.vibe),n.agent&&(t.agentId=n.agent);let o=(await r(Qt,{filter:Object.keys(t).length?t:void 0})).sessions.items;d(n,o,{headers:["ID","Name","Type","Status","Agent","Started"],rows:o.map(s=>[f(s.id,12),s.name,s.type,b(s.status),f(s.agentId,12),S(s.startedAt)])});}catch(t){a(t);}}),i.command("get").description("Get session").argument("<id>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(Zt,{id:n});if(!e.session)throw new m("Session not found");d(t,e.session);}catch(e){a(e);}}),i.command("create").description("Create session").requiredOption("--name <n>","Name").requiredOption("--agent <id>","Agent ID").requiredOption("--type <t>","Type (TMUX, SSH, TERMINAL, SCRIPT, CUSTOM)").option("--vibe <id>","Vibe ID").option("--command <c>","Command").option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(te,{input:{name:n.name,agentId:n.agent,type:n.type.toUpperCase(),vibeId:n.vibe,command:n.command}});c("Session created"),d(n,t.createSession);}catch(t){a(t);}}),i.command("start").description("Start session").argument("<id>").action(async n=>{try{await r(ee,{id:n}),c("Session started");}catch(t){a(t);}}),i.command("stop").description("Stop session").argument("<id>").action(async n=>{try{await r(ne,{id:n}),c("Session stopped");}catch(t){a(t);}}),i.command("restart").description("Restart session").argument("<id>").action(async n=>{try{await r(oe,{id:n}),c("Session restarted");}catch(t){a(t);}}),i.command("terminate").description("Terminate session").argument("<id>").option("--force","Skip confirmation").action(async(n,t)=>{try{if(!await l("Terminate this session?",t.force))return;await r(ie,{id:n}),c("Session terminated");}catch(e){a(e);}}),i.command("output").description("Get session output").argument("<id>").option("--lines <n>","Number of lines",parseInt).option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(re,{id:n,lines:t.lines});e.sessionOutput?console.log(e.sessionOutput):T("No output");}catch(e){a(e);}}),i.command("send-input").description("Send input to session").argument("<id>").argument("<input>").action(async(n,t)=>{try{await r(ae,{id:n,input:t}),c("Input sent");}catch(e){a(e);}}),i.command("start-terminal").description("Start web terminal").argument("<id>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(se,{id:n});c("Terminal started"),d(t,e.startSessionTerminal);}catch(e){a(e);}}),i.command("stop-terminal").description("Stop web terminal").argument("<id>").action(async n=>{try{await r(ce,{id:n}),c("Terminal stopped");}catch(t){a(t);}}),i.command("active").description("List active sessions").option("--vibe <id>","Filter by vibe").option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(pe,{vibeId:n.vibe});d(n,t.activeSessions);}catch(t){a(t);}}),i.command("health-check").description("Check health of all sessions").option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(ue);c("Health check complete"),d(n,t.checkSessionHealth);}catch(t){a(t);}}),i.command("share").description("Share session with user").argument("<sessionId>","Session ID").requiredOption("--user-id <uid>","User ID").option("--permission <p>","Permission (VIEW/INTERACT)","VIEW").action(async(n,t)=>{try{await r(me,{input:{sessionId:n,sharedWithId:t.userId,permission:t.permission}}),c("Session shared");}catch(e){a(e);}}),i.command("create-share-link").description("Create share link").argument("<sessionId>","Session ID").option("--permission <p>","Permission (VIEW/INTERACT)","VIEW").action(async(n,t)=>{try{let e=await r(ge,{input:{sessionId:n,permission:t.permission}});c("Share link created"),d({},e.createSessionShareLink);}catch(e){a(e);}}),i.command("revoke-share").description("Revoke session share").argument("<id>","Share ID").action(async n=>{try{await r(le,{id:n}),c("Session share revoked");}catch(t){a(t);}}),i.command("revoke-share-link").description("Revoke session share link").argument("<id>","Share link ID").action(async n=>{try{await r(fe,{id:n}),c("Share link revoked");}catch(t){a(t);}}),i.command("update-share").description("Update session share permission").argument("<id>","Share ID").requiredOption("--permission <p>","Permission (VIEW/INTERACT)").action(async(n,t)=>{try{await r(Ie,{id:n,input:{permission:t.permission}}),c("Session share updated");}catch(e){a(e);}}),i.command("join").description("Join shared session").argument("<sessionId>","Session ID").action(async n=>{try{await r(Se,{input:{sessionId:n}}),c("Joined session");}catch(t){a(t);}}),i.command("leave").description("Leave shared session").argument("<sessionId>","Session ID").action(async n=>{try{await r(ye,{sessionId:n}),c("Left session");}catch(t){a(t);}}),i.command("request-control").description("Request session control").argument("<sessionId>","Session ID").action(async n=>{try{await r(Ee,{sessionId:n}),c("Control requested");}catch(t){a(t);}}),i.command("release-control").description("Release session control").argument("<sessionId>","Session ID").action(async n=>{try{await r(Te,{sessionId:n}),c("Control released");}catch(t){a(t);}}),i.command("transfer-control").description("Transfer session control").argument("<sessionId>","Session ID").requiredOption("--to-user <uid>","Target user ID").action(async(n,t)=>{try{await r(be,{sessionId:n,toUserId:t.toUser}),c("Control transferred");}catch(e){a(e);}}),i.command("shares").description("List session shares").argument("<sessionId>","Session ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(Ae,{sessionId:n});d(t,e.sessionShares);}catch(e){a(e);}}),i.command("share-links").description("List session share links").argument("<sessionId>","Session ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(he,{sessionId:n});d(t,e.sessionShareLinks);}catch(e){a(e);}}),i.command("collaborators").description("List session collaborators").argument("<sessionId>","Session ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(Ce,{sessionId:n});d(t,e.sessionCollaborators);}catch(e){a(e);}}),i.command("shared-with-me").description("List sessions shared with me").option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(De);d(n,t.sessionsSharedWithMe);}catch(t){a(t);}}),i.command("restart-terminal").description("Restart session terminal").argument("<id>","Session ID").action(async n=>{try{await r(de,{id:n}),c("Terminal restarted");}catch(t){a(t);}}),i.command("bulk-restart").description("Bulk restart sessions").requiredOption("--ids <ids>","Session IDs (comma-separated)").option("--force","Skip confirmation").action(async n=>{try{await r(Oe,{ids:n.ids.split(",").map(t=>t.trim()),force:n.force}),c("Sessions restarted");}catch(t){a(t);}}),i.command("bulk-stop").description("Bulk stop sessions").requiredOption("--ids <ids>","Session IDs (comma-separated)").option("--force","Skip confirmation").action(async n=>{try{await r($e,{ids:n.ids.split(",").map(t=>t.trim()),force:n.force}),c("Sessions stopped");}catch(t){a(t);}}),i.command("bulk-terminate").description("Bulk terminate sessions").requiredOption("--ids <ids>","Session IDs (comma-separated)").option("--force","Skip confirmation").action(async n=>{try{if(!await l("Terminate these sessions?",n.force))return;await r(we,{ids:n.ids.split(",").map(t=>t.trim())}),c("Sessions terminated");}catch(t){a(t);}}),i.command("export").description("Export sessions (CSV or JSON)").option("--format <fmt>","Output format: CSV or JSON","JSON").option("--status <s>","Filter by status").option("--type <t>","Filter by type").option("--vibe <id>","Filter by vibe").option("--agent <id>","Filter by agent").action(async n=>{try{let t={};n.status&&(t.status=n.status.toUpperCase()),n.type&&(t.type=n.type.toUpperCase()),n.vibe&&(t.vibeId=n.vibe),n.agent&&(t.agentId=n.agent);let e=(n.format??"JSON").toUpperCase();if(e!=="CSV"&&e!=="JSON")throw new m("--format must be CSV or JSON");let o=await r(Pi,{input:{filter:Object.keys(t).length?t:void 0,format:e}});process.stdout.write(o.exportSessions.data),o.exportSessions.data.endsWith(`
|
|
1375
|
+
`)||process.stdout.write(`
|
|
1376
|
+
`),c(`Exported ${o.exportSessions.count} sessions (${o.exportSessions.format})`);}catch(t){a(t);}});}function jr(p){let i=p.command("notes").description("Note management");i.command("list").description("List notes").option("--vibe <id>","Filter by vibe").option("--pinned","Show only pinned").option("--tags <tags>","Filter by tags (comma-separated)").option("-f, --format <format>","Output format").action(async n=>{try{let t={};n.vibe&&(t.vibeId=n.vibe),n.pinned&&(t.isPinned=!0),n.tags&&(t.tags=n.tags.split(",").map(o=>o.trim()));let e=await r(ve,{filter:Object.keys(t).length?t:void 0});d(n,e.notes.items,{headers:["ID","Title","Pinned","Tags","Created"],rows:e.notes.items.map(o=>[f(o.id,12),o.title,o.isPinned?"Yes":"No",(o.tags??[]).join(", "),S(o.createdAt)])});}catch(t){a(t);}}),i.command("get").description("Get note").argument("<id>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(ke,{id:n});if(!e.note)throw new m("Note not found");d(t,e.note);}catch(e){a(e);}}),i.command("create").description("Create note").requiredOption("--title <t>","Title").requiredOption("--content <c>","Content").option("--vibe <id>","Vibe ID").option("--tags <tags>","Tags (comma-separated)").option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(_e,{input:{title:n.title,content:n.content,vibeId:n.vibe,tags:n.tags?.split(",").map(e=>e.trim())}});c("Note created"),d(n,t.createNote);}catch(t){a(t);}}),i.command("update").description("Update note").argument("<id>").option("--title <t>","Title").option("--content <c>","Content").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e={};if(t.title&&(e.title=t.title),t.content&&(e.content=t.content),!Object.keys(e).length)throw new m("No updates specified");let o=await r(Re,{id:n,input:e});c("Note updated"),d(t,o.updateNote);}catch(e){a(e);}}),i.command("delete").description("Delete note").argument("<id>").option("--force","Skip confirmation").action(async(n,t)=>{try{if(!await l("Delete this note?",t.force))return;await r(Ne,{id:n}),c("Note deleted");}catch(e){a(e);}}),i.command("search").description("Search notes").argument("<query>").option("--vibe <id>","Scope to vibe").option("--limit <n>","Max results",parseInt).option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(xe,{query:n,vibeId:t.vibe,limit:t.limit});d(t,e.searchNotes);}catch(e){a(e);}}),i.command("pin").description("Pin a note").argument("<id>").action(async n=>{try{await r(Ue,{id:n}),c("Note pinned");}catch(t){a(t);}}),i.command("unpin").description("Unpin a note").argument("<id>").action(async n=>{try{await r(Le,{id:n}),c("Note unpinned");}catch(t){a(t);}}),i.command("tag").description("Tag a note").argument("<noteId>","Note ID").argument("<tag>","Tag").action(async(n,t)=>{try{await r(Pe,{input:{noteId:n,tag:t}}),c("Note tagged");}catch(e){a(e);}}),i.command("untag").description("Remove tag from note").argument("<noteId>","Note ID").argument("<tag>","Tag").action(async(n,t)=>{try{await r(Ve,{input:{noteId:n,tag:t}}),c("Tag removed");}catch(e){a(e);}}),i.command("replace-tags").description("Replace all tags on a note").argument("<noteId>","Note ID").requiredOption("--tags <tags>","Tags (comma-separated)").action(async(n,t)=>{try{await r(Ge,{input:{noteId:n,tags:t.tags.split(",").map(e=>e.trim())}}),c("Tags replaced");}catch(e){a(e);}}),i.command("create-tag").description("Create a note tag").argument("<name>","Tag name").action(async n=>{try{await r(qe,{input:{name:n}}),c("Tag created");}catch(t){a(t);}}),i.command("available-tags").description("List available note tags").option("--query <q>","Search query").option("--limit <n>","Max results",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(Be,{query:n.query,limit:n.limit});d(n,t.availableNoteTags);}catch(t){a(t);}}),i.command("get-tags").description("Get tags for a note").argument("<noteId>","Note ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(Fe,{noteId:n});d(t,e.noteTags);}catch(e){a(e);}}),i.command("related-tags").description("Get related tags for a note").argument("<noteId>","Note ID").option("--limit <n>","Max results",parseInt).option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(Me,{noteId:n,limit:t.limit});d(t,e.relatedNoteTags);}catch(e){a(e);}}),i.command("bulk-delete").description("Bulk delete notes").requiredOption("--ids <ids>","Note IDs (comma-separated)").option("--force","Skip confirmation").action(async n=>{try{if(!await l("Delete these notes?",n.force))return;await r(He,{ids:n.ids.split(",").map(t=>t.trim())}),c("Notes deleted");}catch(t){a(t);}});}function Yr(p){let i={};return p.limit!==void 0&&(i.limit=Number(p.limit)),p.offset!==void 0&&(i.offset=Number(p.offset)),Object.keys(i).length>0?i:void 0}function Jr(p){let i=p.command("security").description("Security scans, findings, providers, exceptions");i.command("providers").description("List configured security providers").option("-f, --format <format>","Output format").action(async s=>{try{let u=await r(nr);d(s,u.securityProviders);}catch(u){a(u);}}),i.command("set-provider").description("Configure a security provider for a vibe + stage").requiredOption("--vibe-id <id>").requiredOption("--stage <stage>").requiredOption("--provider-key <key>").option("--config <json>","Provider-specific config as JSON").option("-f, --format <format>","Output format").action(async s=>{try{let u={vibeId:s.vibeId,stage:s.stage.toUpperCase(),providerKey:s.providerKey};s.config&&(u.config=JSON.parse(s.config));let g=await r(lr,{input:u});c("Security provider set"),d(s,g.setSecurityProvider);}catch(u){a(u);}});let n=i.command("scans").description("Security scan runs");n.command("list").description("List my (default) or all scans").option("--scope <scope>","mine | all","mine").option("--vibe-id <id>").option("--status <status>").option("--stage <stage>").option("--conclusion <conclusion>").option("--limit <n>").option("--offset <n>").option("-f, --format <format>","Output format").action(async s=>{try{let u={};s.vibeId&&(u.vibeId=s.vibeId),s.status&&(u.status=s.status.toUpperCase()),s.stage&&(u.stage=s.stage.toUpperCase()),s.conclusion&&(u.conclusion=s.conclusion.toUpperCase());let g=s.scope==="all"?rr:ir,M=await r(g,{filter:Object.keys(u).length>0?u:void 0,pagination:Yr(s)});d(s,s.scope==="all"?M.allSecurityScans:M.mySecurityScans);}catch(u){a(u);}}),n.command("get").description("Get a security scan run").argument("<id>").option("-f, --format <format>","Output format").action(async(s,u)=>{try{let g=await r(or,{id:s});if(!g.securityScan)throw new m("Scan not found");d(u,g.securityScan);}catch(g){a(g);}}),n.command("run").description("Run a security scan for a vibe at a stage").requiredOption("--vibe-id <id>").requiredOption("--stage <stage>").option("-f, --format <format>","Output format").action(async s=>{try{let u=await r(pr,{vibeId:s.vibeId,stage:s.stage.toUpperCase()});c("Scan triggered"),d(s,u.runSecurityScan);}catch(u){a(u);}}),n.command("cancel").description("Cancel an in-flight security scan").argument("<id>").option("-f, --format <format>","Output format").action(async(s,u)=>{try{let g=await r(ur,{id:s});c("Scan cancelled"),d(u,g.cancelSecurityScan);}catch(g){a(g);}});let t=i.command("findings").description("Security findings");t.command("list").description("List security findings").option("--vibe-id <id>").option("--status <status>").option("--severity <severity>").option("--category <category>").option("--search <text>").option("--limit <n>").option("--offset <n>").option("-f, --format <format>","Output format").action(async s=>{try{let u={};s.vibeId&&(u.vibeId=s.vibeId),s.status&&(u.status=s.status.toUpperCase()),s.severity&&(u.severity=s.severity.toUpperCase()),s.category&&(u.category=s.category.toUpperCase()),s.search&&(u.search=s.search);let g=await r(ar,{filter:Object.keys(u).length>0?u:void 0,pagination:Yr(s)});d(s,g.securityFindings);}catch(u){a(u);}}),t.command("update-status").description("Update finding workflow status").argument("<id>").requiredOption("--status <status>","OPEN | ACCEPTED | SUPPRESSED | FIXED | FALSE_POSITIVE").option("-f, --format <format>","Output format").action(async(s,u)=>{try{let g=await r(fr,{id:s,status:u.status.toUpperCase()});c("Finding status updated"),d(u,g.updateSecurityFindingStatus);}catch(g){a(g);}}),i.command("policy-decision").description("Fetch OPA policy decision for a scan run").requiredOption("--scan-run-id <id>").option("-f, --format <format>","Output format").action(async s=>{try{let u=await r(sr,{scanRunId:s.scanRunId});d(s,u.securityPolicyDecision);}catch(u){a(u);}}),i.command("status").description("Security posture for a vibe").argument("<vibeId>").option("-f, --format <format>","Output format").action(async(s,u)=>{try{let g=await r(cr,{vibeId:s});d(u,g.securityStatus);}catch(g){a(g);}});let e=i.command("repo-config").description("Repository security policy config");e.command("get").argument("<vibeId>").option("-f, --format <format>","Output format").action(async(s,u)=>{try{let g=await r(dr,{vibeId:s});d(u,g.repositorySecurityConfig);}catch(g){a(g);}}),e.command("update").argument("<vibeId>").option("--policy-level <level>","ADVISORY | WARN | BLOCK").option("--enabled-stages <csv>","Comma-separated stages").option("--plugin-assignments <json>").option("--config-yaml-equivalent <json>").option("-f, --format <format>","Output format").action(async(s,u)=>{try{let g={};u.policyLevel&&(g.policyLevel=u.policyLevel.toUpperCase()),u.enabledStages&&(g.enabledStages=u.enabledStages.split(",").map(Ia=>Ia.trim().toUpperCase())),u.pluginAssignments&&(g.pluginAssignments=JSON.parse(u.pluginAssignments)),u.configYamlEquivalent&&(g.configYamlEquivalent=JSON.parse(u.configYamlEquivalent));let M=await r(Ir,{vibeId:s,input:g});c("Repository security config updated"),d(u,M.updateRepositorySecurityConfig);}catch(g){a(g);}});let o=i.command("exceptions").description("Security exception waivers");o.command("create").requiredOption("--vibe-id <id>").requiredOption("--finding-fingerprint <fp>").requiredOption("--reason <reason>").requiredOption("--expires-at <iso>").option("--compensating-controls <text>").option("-f, --format <format>","Output format").action(async s=>{try{let u={vibeId:s.vibeId,findingFingerprint:s.findingFingerprint,reason:s.reason,expiresAt:s.expiresAt};s.compensatingControls&&(u.compensatingControls=s.compensatingControls);let g=await r(mr,{input:u});c("Exception created"),d(s,g.createSecurityException);}catch(u){a(u);}}),o.command("revoke").argument("<id>").option("--force").action(async(s,u)=>{try{if(!await l(`Revoke exception ${s}?`,u.force))return;await r(gr,{id:s}),c("Exception revoked");}catch(g){a(g);}}),i.command("evidence-presign").description("Get a presigned URL for evidence upload").requiredOption("--scan-run-id <id>").requiredOption("--sha256 <hex>").requiredOption("--size-bytes <n>").requiredOption("--type <type>","SBOM_CYCLONEDX | SBOM_SPDX | SARIF | GRYPE_JSON | COSIGN_BUNDLE | OPA_DECISION | PROVENANCE").option("-f, --format <format>","Output format").action(async s=>{try{let u=await r(Sr,{scanRunId:s.scanRunId,sha256:s.sha256,sizeBytes:Number(s.sizeBytes),type:s.type.toUpperCase()});d(s,u.presignSecurityEvidence);}catch(u){a(u);}});}function Xr(p){let i=p.command("ci").description("CI/CD pipeline status (via GitOps providers)");i.command("status").description("Get CI status for a provider on an agent").requiredOption("--provider-id <id>").requiredOption("--agent-id <id>").option("--limit <n>").option("-f, --format <format>","Output format").action(async e=>{try{let o=await r(Er,{providerId:e.providerId,agentId:e.agentId,limit:e.limit!==void 0?Number(e.limit):void 0});d(e,o.getCIStatus);}catch(o){a(o);}}),i.command("refresh-status").description("Force refresh CI status snapshot").requiredOption("--provider-id <id>").requiredOption("--agent-id <id>").option("-f, --format <format>","Output format").action(async e=>{try{let o=await r(hr,{providerId:e.providerId,agentId:e.agentId});c("CI status refreshed"),d(e,o.refreshCIStatus);}catch(o){a(o);}});let n=i.command("pipelines").description("CI pipeline runs");n.command("list").requiredOption("--provider-id <id>").requiredOption("--agent-id <id>").option("--branch <branch>").option("--limit <n>").option("-f, --format <format>","Output format").action(async e=>{try{let o=await r(Tr,{providerId:e.providerId,agentId:e.agentId,branch:e.branch,limit:e.limit!==void 0?Number(e.limit):void 0});d(e,o.getCIPipelineRuns);}catch(o){a(o);}}),n.command("details").argument("<runId>").requiredOption("--provider-id <id>").requiredOption("--agent-id <id>").option("-f, --format <format>","Output format").action(async(e,o)=>{try{let s=await r(br,{providerId:o.providerId,agentId:o.agentId,runId:e});d(o,s.getCIPipelineDetails);}catch(s){a(s);}});let t=i.command("repo-stats").description("Repository statistics");t.command("get").requiredOption("--provider-id <id>").requiredOption("--agent-id <id>").option("-f, --format <format>","Output format").action(async e=>{try{let o=await r(Ar,{providerId:e.providerId,agentId:e.agentId});d(e,o.getRepoStats);}catch(o){a(o);}}),t.command("refresh").requiredOption("--provider-id <id>").requiredOption("--agent-id <id>").option("-f, --format <format>","Output format").action(async e=>{try{let o=await r(Cr,{providerId:e.providerId,agentId:e.agentId});c("Repo stats refreshed"),d(e,o.refreshRepoStats);}catch(o){a(o);}});}function zr(p){let i=p.command("gitops").description("GitOps provider connections");i.command("list").description("List GitOps providers").option("--provider-type <t>","GITHUB | GITLAB | BITBUCKET | AZURE_DEVOPS").option("--is-active <bool>").option("--vibe-id <id>").option("--limit <n>").option("--offset <n>").option("-f, --format <format>","Output format").action(async n=>{try{let t={};n.providerType&&(t.providerType=n.providerType.toUpperCase()),n.isActive!==void 0&&(t.isActive=n.isActive==="true"),n.vibeId&&(t.vibeId=n.vibeId);let e={};n.limit!==void 0&&(e.limit=Number(n.limit)),n.offset!==void 0&&(e.offset=Number(n.offset));let o=await r(Dr,{filter:Object.keys(t).length>0?t:void 0,pagination:Object.keys(e).length>0?e:void 0});d(n,o.listGitopsProviders);}catch(t){a(t);}}),i.command("get").argument("<id>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(Or,{id:n});if(!e.getGitopsProvider)throw new m("Provider not found");d(t,e.getGitopsProvider);}catch(e){a(e);}}),i.command("create").requiredOption("--name <name>").requiredOption("--provider-type <t>","GITHUB | GITLAB | BITBUCKET | AZURE_DEVOPS").requiredOption("--repo-url <url>").option("--vibe-id <id>").option("--is-active <bool>").option("--metadata <json>").option("-f, --format <format>","Output format").action(async n=>{try{let t={name:n.name,providerType:n.providerType.toUpperCase(),repoUrl:n.repoUrl};n.vibeId&&(t.vibeId=n.vibeId),n.isActive!==void 0&&(t.isActive=n.isActive==="true"),n.metadata&&(t.metadata=JSON.parse(n.metadata));let e=await r($r,{input:t});c("GitOps provider created"),d(n,e.createGitopsProvider);}catch(t){a(t);}}),i.command("update").argument("<id>").option("--name <name>").option("--repo-url <url>").option("--vibe-id <id>").option("--is-active <bool>").option("--metadata <json>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e={};t.name&&(e.name=t.name),t.repoUrl&&(e.repoUrl=t.repoUrl),t.vibeId&&(e.vibeId=t.vibeId),t.isActive!==void 0&&(e.isActive=t.isActive==="true"),t.metadata&&(e.metadata=JSON.parse(t.metadata));let o=await r(wr,{id:n,input:e});c("GitOps provider updated"),d(t,o.updateGitopsProvider);}catch(e){a(e);}}),i.command("delete").argument("<id>").option("--force").action(async(n,t)=>{try{if(!await l(`Delete GitOps provider ${n}?`,t.force))return;await r(vr,{id:n}),c("GitOps provider deleted");}catch(e){a(e);}});}function Qr(p){let i=p.command("settings").description("User settings and preferences");i.command("mine").description("Get full settings bundle for the current user").option("-f, --format <format>","Output format").action(async t=>{try{let e=await r(xr);d(t,e.mySettings);}catch(e){a(e);}}),i.command("category").description("Get a single settings category").argument("<category>","PREFERENCES | NOTIFICATIONS | WORKSPACE_DEFAULTS | PROFILE | SECURITY | ADVANCED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await r(Ur,{category:t.toUpperCase()});d(e,o.mySettingsByCategory);}catch(o){a(o);}}),i.command("reset").description("Reset a settings category to workspace defaults").argument("<category>").option("--force").action(async(t,e)=>{try{if(!await l(`Reset ${t}?`,e.force))return;await r(Gr,{category:t.toUpperCase()}),c("Settings reset");}catch(o){a(o);}}),i.command("update-preferences").description("Update UI preferences").option("--theme <theme>").option("--ui-density <density>").option("--sidebar-collapsed <bool>").option("--code-font <font>").option("--code-font-size <n>").option("--preferred-ide-command <cmd>").option("--default-agent-for-vibe <json>").option("--vibe-ide-overrides <json>").option("--vibe-detail-tab-order <json>").option("-f, --format <format>","Output format").action(async t=>{try{let e={};t.theme&&(e.theme=t.theme),t.uiDensity&&(e.uiDensity=t.uiDensity),t.sidebarCollapsed!==void 0&&(e.sidebarCollapsed=t.sidebarCollapsed==="true"),t.codeFont&&(e.codeFont=t.codeFont),t.codeFontSize!==void 0&&(e.codeFontSize=Number(t.codeFontSize)),t.preferredIdeCommand&&(e.preferredIdeCommand=t.preferredIdeCommand),t.defaultAgentForVibe&&(e.defaultAgentForVibe=JSON.parse(t.defaultAgentForVibe)),t.vibeIdeOverrides&&(e.vibeIdeOverrides=JSON.parse(t.vibeIdeOverrides)),t.vibeDetailTabOrder&&(e.vibeDetailTabOrder=JSON.parse(t.vibeDetailTabOrder));let o=await r(qr,{input:e});c("Preferences updated"),d(t,o.updatePreferences);}catch(e){a(e);}}),i.command("update-notifications").description("Update notification preferences").option("--email-digest <bool>").option("--digest-frequency <freq>","daily | weekly | none").option("--agent-offline <bool>").option("--session-error <bool>").option("--vibe-status-change <bool>").option("-f, --format <format>","Output format").action(async t=>{try{let e={};t.emailDigest!==void 0&&(e.emailDigest=t.emailDigest==="true"),t.digestFrequency&&(e.digestFrequency=t.digestFrequency),t.agentOffline!==void 0&&(e.agentOffline=t.agentOffline==="true"),t.sessionError!==void 0&&(e.sessionError=t.sessionError==="true"),t.vibeStatusChange!==void 0&&(e.vibeStatusChange=t.vibeStatusChange==="true");let o=await r(Br,{input:e});c("Notification preferences updated"),d(t,o.updateNotificationPreferences);}catch(e){a(e);}}),i.command("update-workspace-defaults").description("Update workspace defaults (admin)").option("--default-agent <id>").option("--default-session-type <t>").option("--default-vibe-type <t>").option("--default-env-vars <text>").option("--auto-start-sessions <bool>").option("--auto-git-sync <bool>").option("--agent-heartbeat-interval <n>").option("--agent-max-sessions <n>").option("--agent-auto-reconnect <bool>").option("--auto-update <bool>").option("--telemetry-enabled <bool>").option("--log-level <level>").option("-f, --format <format>","Output format").action(async t=>{try{let e={};t.defaultAgent&&(e.defaultAgent=t.defaultAgent),t.defaultSessionType&&(e.defaultSessionType=t.defaultSessionType),t.defaultVibeType&&(e.defaultVibeType=t.defaultVibeType),t.defaultEnvVars&&(e.defaultEnvironmentVariables=t.defaultEnvVars),t.autoStartSessions!==void 0&&(e.autoStartSessions=t.autoStartSessions==="true"),t.autoGitSync!==void 0&&(e.autoGitSync=t.autoGitSync==="true"),t.agentHeartbeatInterval!==void 0&&(e.agentHeartbeatInterval=Number(t.agentHeartbeatInterval)),t.agentMaxSessions!==void 0&&(e.agentMaxSessions=Number(t.agentMaxSessions)),t.agentAutoReconnect!==void 0&&(e.agentAutoReconnect=t.agentAutoReconnect==="true"),t.autoUpdate!==void 0&&(e.autoUpdate=t.autoUpdate==="true"),t.telemetryEnabled!==void 0&&(e.telemetryEnabled=t.telemetryEnabled==="true"),t.logLevel&&(e.logLevel=t.logLevel);let o=await r(Fr,{input:e});c("Workspace defaults updated"),d(t,o.updateWorkspaceDefaults);}catch(e){a(e);}});let n=i.command("secrets").description("Settings secrets (encrypted KV)");n.command("list").option("-f, --format <format>","Output format").action(async t=>{try{let e=await r(Lr);d(t,e.listSettingsSecrets);}catch(e){a(e);}}),n.command("set").argument("<key>").argument("<value>").option("-f, --format <format>","Output format").action(async(t,e,o)=>{try{let s=await r(Pr,{input:{key:t,value:e}});c("Secret set"),d(o,s.setSettingsSecret);}catch(s){a(s);}}),n.command("delete").argument("<key>").option("--force").action(async(t,e)=>{try{if(!await l(`Delete secret ${t}?`,e.force))return;await r(Vr,{key:t}),c("Secret deleted");}catch(o){a(o);}}),i.command("resolve-integration-token").description("Resolve a decrypted integration token for an agent").argument("<connectionId>").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await r(Mr,{connectionId:t});d(e,o.vibecontrolsResolveIntegrationToken);}catch(o){a(o);}});}function Zr(p){let i=p.command("config").description("Backend configuration management");Jr(i),Xr(i),zr(i),Qr(i),i.command("list").description("List configs").requiredOption("--scope <s>","Scope (WORKSPACE, VIBE, SESSION, AGENT, USER, GLOBAL)").option("--scope-id <id>","Scope entity ID").option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(Ke,{scope:n.scope.toUpperCase(),scopeId:n.scopeId});d(n,t.configurationsByScope);}catch(t){a(t);}}),i.command("get").description("Get config value").argument("<key>").requiredOption("--scope <s>","Scope").option("--scope-id <id>","Scope ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(We,{key:n,scope:t.scope.toUpperCase(),scopeId:t.scopeId});if(!e.configuration)throw new m("Config not found");d(t,e.configuration);}catch(e){a(e);}}),i.command("set").description("Set config value").argument("<key>").argument("<value>").requiredOption("--scope <s>","Scope").option("--scope-id <id>","Scope ID").option("--secret","Mark as secret").option("-f, --format <format>","Output format").action(async(n,t,e)=>{try{let o;try{o=JSON.parse(t);}catch{o=t;}let s=await r(Ye,{key:n,scope:e.scope.toUpperCase(),scopeId:e.scopeId,value:o,isSecret:e.secret});c("Config set"),d(e,s.setConfiguration);}catch(o){a(o);}}),i.command("delete").description("Delete config").argument("<key>").requiredOption("--scope <s>","Scope").option("--scope-id <id>","Scope ID").action(async(n,t)=>{try{await r(Je,{key:n,scope:t.scope.toUpperCase(),scopeId:t.scopeId}),c("Config deleted");}catch(e){a(e);}}),i.command("value").description("Get raw config value").argument("<key>").requiredOption("--scope <s>","Scope").option("--scope-id <id>","Scope ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(je,{key:n,scope:t.scope.toUpperCase(),scopeId:t.scopeId});console.log(e.configurationValue);}catch(e){a(e);}}),i.command("bulk-set").description("Bulk set configs").requiredOption("--scope <s>","Scope").option("--scope-id <id>","Scope ID").requiredOption("--input <json>","JSON array of [{key,value,isSecret?}]").option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(Xe,{configurations:JSON.parse(n.input),scope:n.scope.toUpperCase(),scopeId:n.scopeId});c("Configs set"),d(n,t.bulkSetConfigurations);}catch(t){a(t);}}),i.command("bulk-delete").description("Bulk delete configs").requiredOption("--scope <s>","Scope").option("--scope-id <id>","Scope ID").requiredOption("--keys <keys>","Comma-separated keys").option("--force","Skip confirmation").action(async n=>{try{if(!await l("Delete these configs?",n.force))return;await r(ze,{keys:n.keys.split(",").map(t=>t.trim()),scope:n.scope.toUpperCase(),scopeId:n.scopeId}),c("Configs deleted");}catch(t){a(t);}});}function ta(p){let i=p.command("webhooks").description("Webhook management");i.command("list").description("List webhooks").option("--active","Only active").option("-f, --format <format>","Output format").action(async n=>{try{let t=n.active?{isActive:!0}:void 0,e=await r(Qe,{filter:t});d(n,e.webhooks.items,{headers:["ID","Name","URL","Active","Events","Deliveries"],rows:e.webhooks.items.map(o=>[f(o.id,12),o.name,f(o.url,30),o.isActive?"Yes":"No",(o.events??[]).join(", "),String(o.deliveryCount??0)])});}catch(t){a(t);}}),i.command("get").description("Get webhook").argument("<id>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(Ze,{id:n});if(!e.webhook)throw new m("Webhook not found");d(t,e.webhook);}catch(e){a(e);}}),i.command("create").description("Create webhook").requiredOption("--name <n>","Name").requiredOption("--url <u>","URL").requiredOption("--events <events>","Events (comma-separated)").option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(tn,{input:{name:n.name,url:n.url,events:n.events.split(",").map(e=>e.trim())}});c("Webhook created"),d(n,t.createWebhook);}catch(t){a(t);}}),i.command("update").description("Update webhook").argument("<id>").option("--name <n>","Name").option("--url <u>","URL").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e={};if(t.name&&(e.name=t.name),t.url&&(e.url=t.url),!Object.keys(e).length)throw new m("No updates specified");let o=await r(en,{id:n,input:e});c("Webhook updated"),d(t,o.updateWebhook);}catch(e){a(e);}}),i.command("delete").description("Delete webhook").argument("<id>").option("--force","Skip confirmation").action(async(n,t)=>{try{if(!await l("Delete this webhook?",t.force))return;await r(nn,{id:n}),c("Webhook deleted");}catch(e){a(e);}}),i.command("test").description("Test webhook").argument("<id>").action(async n=>{try{await r(on,{id:n}),c("Webhook test sent");}catch(t){a(t);}}),i.command("active").description("List active webhooks").option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(rn);d(n,t.activeWebhooks);}catch(t){a(t);}}),i.command("by-event").description("List webhooks by event").argument("<event>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(an,{event:n});d(t,e.webhooksByEvent);}catch(e){a(e);}}),i.command("trigger").description("Trigger webhook").argument("<id>").option("--payload <json>","JSON payload").action(async(n,t)=>{try{await r(sn,{id:n,payload:t.payload?JSON.parse(t.payload):void 0}),c("Webhook triggered");}catch(e){a(e);}}),i.command("reset-failures").description("Reset webhook failures").argument("<id>").action(async n=>{try{await r(cn,{id:n}),c("Webhook failures reset");}catch(t){a(t);}});}function va(p,i="HTTPS"){if(!p)return i;let n=p.toUpperCase();if(n==="HTTP"||n==="HTTPS"||n==="TCP"||n==="UDP")return n;throw new Error(`Invalid protocol: ${p} (expected http|https|tcp|udp)`)}function dt(p){return (p??"PROD").toUpperCase()==="ALPHA"?"ALPHA":"PROD"}function ea(p){let i=p.command("tunnels").description("Tunnel management (VibeTunnels)");i.command("providers").description("List tunnel providers with capabilities").option("-f, --format <format>","Output format").action(async t=>{try{let e=await r(un);d(t,e.tunnelProviders);}catch(e){a(e);}}),i.command("list").description("List tunnels in the workspace").option("--provider <key>","Filter by provider (vibetunnels|cloudflare)").option("--status <status>","Filter by status").option("--search <query>","Search by name/slug").option("-f, --format <format>","Output format").action(async t=>{try{let e={};t.provider&&(e.providerKey=t.provider.toUpperCase()),t.status&&(e.status=[t.status.toUpperCase()]),t.search&&(e.search=t.search);let o=await r(dn,{filter:e});if(t.format){d(t,o.tunnels);return}for(let s of o.tunnels.items){let u=s.primaryDomain?.hostname??"(no domain)";console.log(`${s.id} ${s.slug} ${s.providerKey} ${s.status} ${u} ${s.protocol}:${s.localPort}`);}console.log(`
|
|
1377
|
+
${o.tunnels.total} total`);}catch(e){a(e);}}),i.command("get").description("Get a tunnel by ID").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let o=await r(pn,{id:t});if(!o.tunnel)throw new m(`Tunnel ${t} not found`);d(e,o.tunnel);}catch(o){a(o);}}),i.command("create").description("Create a tunnel (DRAFT \u2014 start with `vibe tunnels start`)").requiredOption("--agent <id>","Agent ID").requiredOption("--name <name>","Tunnel name").requiredOption("--port <p>","Local port",parseInt).option("--provider <key>","Provider key (vibetunnels|cloudflare)","VIBETUNNELS").option("--protocol <p>","http|https|tcp|udp","https").option("--host <host>","Local host","127.0.0.1").option("--subdomain <label>","Reserve a *.vibetunnels.com subdomain").option("--env <env>","alpha|prod for managed subdomain","prod").option("--description <text>").option("-f, --format <format>").action(async t=>{try{let e={agentId:t.agent,name:t.name,description:t.description,providerKey:t.provider.toUpperCase(),protocol:va(t.protocol),localPort:t.port,localHost:t.host,managedSubdomain:t.subdomain,environment:dt(t.env)},o=await r(mn,{input:e});c(`Tunnel created: ${o.createTunnel.slug}`),d(t,o.createTunnel);}catch(e){a(e);}}),i.command("start").description("Start a tunnel").argument("<id>").action(async t=>{try{await r(fn,{id:t}),c("Tunnel started");}catch(e){a(e);}}),i.command("stop").description("Stop a tunnel").argument("<id>").action(async t=>{try{await r(In,{id:t}),c("Tunnel stopped");}catch(e){a(e);}}),i.command("rotate").description("Rotate tunnel credentials").argument("<id>").action(async t=>{try{await r(Sn,{id:t}),c("Tunnel credentials rotated");}catch(e){a(e);}}),i.command("delete").description("Delete a tunnel").argument("<id>").option("--force","Skip confirmation").action(async(t,e)=>{try{if(!await l("Delete this tunnel?",e.force))return;await r(ln,{id:t}),c("Tunnel deleted");}catch(o){a(o);}}),i.command("sessions").description("List sessions for a tunnel").argument("<tunnelId>").option("-f, --format <format>").action(async(t,e)=>{try{let o=await r(En,{tunnelId:t});d(e,o);}catch(o){a(o);}}),i.command("issue-session").description("Issue a short-lived token for a tunnel (printed once)").argument("<tunnelId>").option("--ttl <seconds>","TTL in seconds",t=>parseInt(t,10)).action(async(t,e)=>{try{let o=await r(yn,{tunnelId:t,ttlSeconds:e.ttl});console.log("Session issued. The token below is shown exactly once."),console.log(`Session ID: ${o.issueTunnelSession.session.id}`),console.log(`Token: ${o.issueTunnelSession.token}`),console.log(`Expires: ${o.issueTunnelSession.session.expiresAt}`),console.log(`Agent hint: ${JSON.stringify(o.issueTunnelSession.agentConfigHint,null,2)}`);}catch(o){a(o);}}),i.command("revoke-session").description("Revoke an active tunnel session").argument("<sessionId>").option("--reason <text>").action(async(t,e)=>{try{await r(Tn,{sessionId:t,reason:e.reason??"revoked via CLI"}),c("Session revoked");}catch(o){a(o);}});let n=i.command("domains").description("Manage tunnel domains");n.command("list").description("List domains (optionally scoped to a tunnel)").option("--tunnel <id>","Tunnel ID").option("-f, --format <format>").action(async t=>{try{let e=await r(On,{tunnelId:t.tunnel??null});d(t,e);}catch(e){a(e);}}),n.command("reserve").description("Reserve a managed *.vibetunnels.com subdomain").requiredOption("--label <label>","Subdomain label").option("--env <env>","alpha|prod","prod").action(async t=>{try{let e=await r(bn,{input:{label:t.label,environment:dt(t.env)}});c(`Reserved ${e.reserveTunnelSubdomain.hostname}`);}catch(e){a(e);}}),n.command("add-custom").description("Register a user-owned custom domain (TXT verification required)").argument("<hostname>").action(async t=>{try{let e=await r(An,{input:{hostname:t}});console.log(`Registered ${e.registerCustomTunnelDomain.hostname}.`),console.log(`Create a TXT record at ${e.registerCustomTunnelDomain.challengeRecordName} containing:`),console.log(` ${e.registerCustomTunnelDomain.challengeToken}`);}catch(e){a(e);}}),n.command("attach").description("Attach a (verified) domain to a tunnel").argument("<tunnelId>").argument("<domainId>").option("--primary","Mark as primary domain").action(async(t,e,o)=>{try{await r(hn,{tunnelId:t,domainId:e,makePrimary:!!o.primary}),c("Domain attached");}catch(s){a(s);}}),n.command("detach").description("Detach a domain from a tunnel").argument("<tunnelId>").argument("<domainId>").action(async(t,e)=>{try{await r(Cn,{tunnelId:t,domainId:e}),c("Domain detached");}catch(o){a(o);}}),n.command("verify").description("Force verification check for a custom domain").argument("<domainId>").action(async t=>{try{let e=await r(Dn,{domainId:t});console.log(`Status: ${e.verifyTunnelDomain.verificationStatus}`),e.verifyTunnelDomain.lastCheckError&&console.log(`Error: ${e.verifyTunnelDomain.lastCheckError}`);}catch(e){a(e);}}),n.command("get").description("Get a tunnel domain by ID").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let o=await r(wn,{id:t});d(e,o);}catch(o){a(o);}}),n.command("delete").description("Delete a tunnel domain (detach + drop record)").argument("<domainId>").option("--force","Skip confirmation").action(async(t,e)=>{try{if(!await l("Delete this tunnel domain?",e.force))return;await r(Nn,{domainId:t}),c("Tunnel domain deleted");}catch(o){a(o);}}),i.command("by-slug").description("Get a tunnel by its workspace-unique slug").argument("<slug>").option("-f, --format <format>").action(async(t,e)=>{try{let o=await r($n,{slug:t});if(!o.tunnelBySlug)throw new m(`Tunnel with slug ${t} not found`);d(e,o.tunnelBySlug);}catch(o){a(o);}}),i.command("update").description("Update a tunnel (name, host, port, basic auth, metadata)").argument("<id>").option("--name <name>").option("--description <text>").option("--host <host>").option("--port <port>","Local port",t=>parseInt(t,10)).option("--tls-mode <mode>","FULL|STRICT|NONE").option("--basic-auth-user <user>").option("--basic-auth-password <pw>").action(async(t,e)=>{try{let o={};if(e.name!==void 0&&(o.name=e.name),e.description!==void 0&&(o.description=e.description),e.host!==void 0&&(o.localHost=e.host),e.port!==void 0&&(o.localPort=e.port),e.tlsMode!==void 0&&(o.tlsMode=e.tlsMode.toUpperCase()),e.basicAuthUser!==void 0&&(o.basicAuthUser=e.basicAuthUser),e.basicAuthPassword!==void 0&&(o.basicAuthPassword=e.basicAuthPassword),Object.keys(o).length===0)throw new m("Pass at least one field to update");await r(gn,{id:t,input:o}),c("Tunnel updated");}catch(o){a(o);}}),i.command("provider").description("Get a single tunnel provider by key").argument("<key>","vibetunnels|cloudflare").option("-f, --format <format>").action(async(t,e)=>{try{let o=await r(vn,{key:t.toUpperCase()});d(e,o);}catch(o){a(o);}}),i.command("shards").description("List tunnel server shards (frps instances)").option("--env <env>","alpha|prod").option("-f, --format <format>").action(async t=>{try{let e=await r(kn,{environment:t.env?dt(t.env):null});d(t,e);}catch(e){a(e);}}),i.command("usage").description("Hourly usage buckets for a tunnel in a time range").argument("<tunnelId>").requiredOption("--from <iso>","ISO8601 start").requiredOption("--to <iso>","ISO8601 end").option("-f, --format <format>").action(async(t,e)=>{try{let o=await r(_n,{tunnelId:t,from:e.from,to:e.to});d(e,o);}catch(o){a(o);}}),i.command("audit").description("Audit log entries scoped to a tunnel").argument("<tunnelId>").option("--limit <n>","Pagination limit",t=>parseInt(t,10)).option("--offset <n>","Pagination offset",t=>parseInt(t,10)).option("-f, --format <format>").action(async(t,e)=>{try{let o={};e.limit!==void 0&&(o.limit=e.limit),e.offset!==void 0&&(o.offset=e.offset);let s=await r(Rn,{tunnelId:t,pagination:Object.keys(o).length>0?o:null});d(e,s);}catch(o){a(o);}}),i.command("probe-agent").description("Probe an agent tunnel URL for health + identity").requiredOption("--url <url>","Agent tunnel URL (https://...)").option("--api-key <key>","Agent API key").option("-f, --format <format>").action(async t=>{try{let e=await r(xn,{url:t.url,agentApiKey:t.apiKey??null});d(t,e);}catch(e){a(e);}}),i.command("add-agent-from-tunnel").description("Zero-config: probe a tunnel URL + register an agent in one shot").requiredOption("--url <url>","Public HTTPS tunnel URL").requiredOption("--api-key <key>","Agent inbound API key (x-agent-api-key)").option("--name <name>","Override display name").option("--scopes <list>","Comma-separated OAuth scopes").option("--target <id>","Optional target to attach the agent to").option("--skip-devportal-app","Skip creating DevPortal application").option("-f, --format <format>").action(async t=>{try{let e={tunnelUrl:t.url,apiKey:t.apiKey};t.name!==void 0&&(e.name=t.name),t.scopes!==void 0&&(e.scopes=t.scopes.split(",").map(s=>s.trim()).filter(Boolean)),t.target!==void 0&&(e.targetId=t.target),t.skipDevportalApp&&(e.skipDevportalApp=!0);let o=await r(Un,{input:e});d(t,o);}catch(e){a(e);}});}function na(p){let i=p.command("ui-session").description("UI session state");i.command("get").description("Get current UI session").option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(Ln);d(n,t.uiSession);}catch(t){a(t);}}),i.command("clear").description("Clear UI session").action(async()=>{try{await r(Vn),c("UI session cleared");}catch(n){a(n);}}),i.command("get-by-id").description("Get UI session by ID").argument("<id>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(Pn,{id:n});d(t,e.uiSessionById);}catch(e){a(e);}}),i.command("set-active-vibe").description("Set active vibe").argument("<vibeId>").action(async n=>{try{await r(Gn,{vibeId:n}),c("Active vibe updated");}catch(t){a(t);}}),i.command("set-active-session").description("Set active session").argument("<sessionId>").action(async n=>{try{await r(qn,{sessionId:n}),c("Active session updated");}catch(t){a(t);}}),i.command("add-recent-vibe").description("Add recent vibe").argument("<vibeId>").action(async n=>{try{await r(Bn,{vibeId:n}),c("Recent vibe added");}catch(t){a(t);}}),i.command("add-recent-session").description("Add recent session").argument("<sessionId>").action(async n=>{try{await r(Fn,{sessionId:n}),c("Recent session added");}catch(t){a(t);}});}function oa(p){let i=p.command("cli-config").description("CLI configuration");i.command("set").description("Set CLI config value").argument("<key>").argument("<value>").action((n,t)=>{if(!ot.includes(n))throw new m(`Unknown key: ${n}. Valid keys: ${ot.join(", ")}`);St(n,t),c(`${n} = ${t}`);}),i.command("get").description("Get CLI config value").argument("<key>").action(n=>{let t=It(n);if(t===void 0)throw new m(`Key not set: ${n}`);console.log(t);}),i.command("list").description("Show all CLI config").option("-f, --format <format>","Output format").action(n=>{let t=ft();if(n.format==="json"){gt(t);return}let e=Object.entries(t).filter(([,o])=>o!==void 0);lt(["Key","Value"],e.map(([o,s])=>[o,String(s)]));}),i.command("path").description("Show config file path").action(()=>{console.log(yt());});}function ia(){let p=H()?.workspaceId;if(!p)throw new m("No workspace set. Run: vibecontrols workspace set <id>");return p}function ra(p){let i=p.command("targets").description("Target management (SSH/RDP/VNC)");i.command("list").description("List targets").option("--type <type>","Filter by type (DIRECT,SSH,RDP,VNC)").option("--limit <n>","Limit results",parseInt).option("--offset <n>","Offset results",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t=ia(),e={};n.type&&(e.type=n.type.toUpperCase());let s=(await r(Mn,{workspaceId:t,filter:Object.keys(e).length?e:void 0,limit:n.limit,offset:n.offset})).targets.items;d(n,s,{headers:["ID","Name","Type","Host","Port","Status"],rows:s.map(u=>[f(u.id,12),u.name,u.type,u.host,String(u.port??"-"),b(u.status)])});}catch(t){a(t);}}),i.command("get").description("Get target by ID").argument("<id>","Target ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(Hn,{id:n});if(!e.target)throw new m("Target not found");d(t,e.target);}catch(e){a(e);}}),i.command("create").description("Create target").requiredOption("--name <n>","Name").requiredOption("--type <t>","Type (DIRECT,SSH,RDP,VNC)").requiredOption("--host <h>","Host address").requiredOption("--port <p>","Port",parseInt).option("--username <u>","Username").option("--protocol <p>","Protocol").option("--agent-id <id>","Agent ID").option("-f, --format <format>","Output format").action(async n=>{try{let t=ia(),e={name:n.name,type:n.type.toUpperCase(),host:n.host,port:n.port};n.username&&(e.username=n.username),n.protocol&&(e.protocol=n.protocol),n.agentId&&(e.agentId=n.agentId);let o=await r(Kn,{workspaceId:t,input:e});c("Target created"),d(n,o.createTarget);}catch(t){a(t);}}),i.command("update").description("Update target").argument("<id>","Target ID").option("--name <n>","Name").option("--host <h>","Host address").option("--port <p>","Port",parseInt).option("--username <u>","Username").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e={};if(t.name&&(e.name=t.name),t.host&&(e.host=t.host),t.port&&(e.port=t.port),t.username&&(e.username=t.username),!Object.keys(e).length)throw new m("No updates specified");let o=await r(Wn,{id:n,input:e});c("Target updated"),d(t,o.updateTarget);}catch(e){a(e);}}),i.command("delete").description("Delete target").argument("<id>","Target ID").option("--force","Skip confirmation").action(async(n,t)=>{try{if(!await l("Delete this target?",t.force))return;await r(jn,{id:n}),c("Target deleted");}catch(e){a(e);}}),i.command("test").description("Test target connectivity").argument("<id>","Target ID").action(async n=>{try{let t=await r(Yn,{id:n});t.testTarget.success?c(`Connection successful (${t.testTarget.latencyMs??"-"}ms)`):T(t.testTarget.error??"Connection failed");}catch(t){a(t);}}),i.command("scan-ssh").description("Scan SSH config for targets").requiredOption("--agent-id <id>","Agent ID").option("--config-path <path>","SSH config file path").option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(Jn,{agentId:n.agentId,configPath:n.configPath});c(`Found ${t.scanSSHConfig.length} target(s)`),d(n,t.scanSSHConfig);}catch(t){a(t);}}),i.command("install-agent").description("Install agent on target").requiredOption("--source-agent-id <id>","Source agent ID").requiredOption("--target-id <id>","Target ID").option("--agent-port <port>","Agent port",parseInt).action(async n=>{try{let t=await r(Xn,{sourceAgentId:n.sourceAgentId,targetId:n.targetId,agentPort:n.agentPort});t.installAgentOnTarget.success?c("Agent installed on target"):T(t.installAgentOnTarget.error??"Installation failed");}catch(t){a(t);}}),i.command("uninstall-agent").description("Uninstall agent from target").argument("<targetId>","Target ID").action(async n=>{try{let t=await r(zn,{targetId:n});t.uninstallAgentFromTarget.success?c("Agent uninstalled from target"):T(t.uninstallAgentFromTarget.error??"Uninstall failed");}catch(t){a(t);}}),i.command("start-terminal").description("Start terminal on target").argument("<targetId>","Target ID").option("--shell <shell>","Shell to use").action(async(n,t)=>{try{let e=await r(Qn,{targetId:n,shell:t.shell});c("Terminal started"),console.log(`Session ID: ${e.startTerminal.sessionId}`),console.log(`ttyd URL: ${e.startTerminal.ttydUrl}`);}catch(e){a(e);}}),i.command("stop-terminal").description("Stop terminal session").argument("<sessionId>","Session ID").action(async n=>{try{await r(Zn,{sessionId:n}),c("Terminal stopped");}catch(t){a(t);}});}function aa(p){let i=p.command("vibedeck").description("VibeDeck management");i.command("list").description("List vibedecks").option("-f, --format <format>","Output format").action(async t=>{try{let o=(await r(to)).vibeDecks.items;d(t,o,{headers:["ID","Name","Default","Created"],rows:o.map(s=>[f(s.id,12),s.name,s.isDefault?"Yes":"No",S(s.createdAt)])});}catch(e){a(e);}}),i.command("get").description("Get vibedeck").argument("<id>").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await r(eo,{id:t});if(!o.vibeDeck)throw new m("VibeDeck not found");d(e,o.vibeDeck);}catch(o){a(o);}}),i.command("default").description("Get default vibedeck").option("-f, --format <format>","Output format").action(async t=>{try{let e=await r(no);if(!e.defaultVibeDeck)throw new m("No default VibeDeck found");d(t,e.defaultVibeDeck);}catch(e){a(e);}}),i.command("create").description("Create vibedeck").requiredOption("--name <n>","Name").option("--description <d>","Description").option("-f, --format <format>","Output format").action(async t=>{try{let e=await r(oo,{input:{name:t.name,description:t.description}});c("VibeDeck created"),d(t,e.createVibeDeck);}catch(e){a(e);}}),i.command("update").description("Update vibedeck").argument("<id>").option("--name <n>","Name").option("--description <d>","Description").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};if(e.name&&(o.name=e.name),e.description&&(o.description=e.description),!Object.keys(o).length)throw new m("No updates specified");let s=await r(io,{id:t,input:o});c("VibeDeck updated"),d(e,s.updateVibeDeck);}catch(o){a(o);}}),i.command("duplicate").description("Duplicate vibedeck").argument("<id>").option("--name <n>","New name").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await r(ro,{id:t,name:e.name});c("VibeDeck duplicated"),d(e,o.duplicateVibeDeck);}catch(o){a(o);}}),i.command("delete").description("Delete vibedeck").argument("<id>").option("--force","Skip confirmation").action(async(t,e)=>{try{if(!await l("Delete this VibeDeck?",e.force))return;await r(ao,{id:t}),c("VibeDeck deleted");}catch(o){a(o);}}),i.command("set-default").description("Set default vibedeck").argument("<id>").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await r(so,{id:t});c("Default VibeDeck updated"),d(e,o.setDefaultVibeDeck);}catch(o){a(o);}}),i.command("buttons").description("List vibedeck buttons").requiredOption("--deck-id <id>","VibeDeck ID").option("-f, --format <format>","Output format").action(async t=>{try{let o=(await r(co,{filter:{vibeDeckId:t.deckId}})).vibeDeckButtons.items;d(t,o,{headers:["ID","Label","Type","Position","Command"],rows:o.map(s=>[f(s.id,12),s.label,s.type,`${s.row},${s.column}`,f(s.command??"",30)])});}catch(e){a(e);}}),i.command("button").description("Get vibedeck button").argument("<id>").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await r(po,{id:t});if(!o.vibeDeckButton)throw new m("Button not found");d(e,o.vibeDeckButton);}catch(o){a(o);}}),i.command("create-button").description("Create vibedeck button").requiredOption("--deck-id <id>","VibeDeck ID").requiredOption("--label <l>","Label").requiredOption("--type <t>","Type (COMMAND, SCRIPT, WEBHOOK)").option("--command <c>","Command").option("--script <s>","Script").option("--webhook-url <u>","Webhook URL").option("--icon <i>","Icon").option("--color <c>","Color").option("--row <n>","Row position",parseInt).option("--column <n>","Column position",parseInt).option("--action-id <id>","Link to an Action").option("-f, --format <format>","Output format").action(async t=>{try{let e={vibeDeckId:t.deckId,label:t.label,type:t.type.toUpperCase()};t.command&&(e.command=t.command),t.script&&(e.script=t.script),t.webhookUrl&&(e.webhookUrl=t.webhookUrl),t.icon&&(e.icon=t.icon),t.color&&(e.color=t.color),t.row!==void 0&&(e.row=t.row),t.column!==void 0&&(e.column=t.column),t.actionId&&(e.actionId=t.actionId);let o=await r(uo,{input:e});c("Button created"),d(t,o.createVibeDeckButton);}catch(e){a(e);}}),i.command("update-button").description("Update vibedeck button").argument("<id>").option("--label <l>","Label").option("--command <c>","Command").option("--icon <i>","Icon").option("--color <c>","Color").option("--action-id <id>","Link to an Action").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};if(e.label&&(o.label=e.label),e.command&&(o.command=e.command),e.icon&&(o.icon=e.icon),e.color&&(o.color=e.color),e.actionId&&(o.actionId=e.actionId),!Object.keys(o).length)throw new m("No updates specified");let s=await r(mo,{id:t,input:o});c("Button updated"),d(e,s.updateVibeDeckButton);}catch(o){a(o);}}),i.command("delete-button").description("Delete vibedeck button").argument("<id>").option("--force","Skip confirmation").action(async(t,e)=>{try{if(!await l("Delete this button?",e.force))return;await r(go,{id:t}),c("Button deleted");}catch(o){a(o);}}),i.command("move-button").description("Move vibedeck button").argument("<id>").requiredOption("--row <n>","Row position",parseInt).requiredOption("--column <n>","Column position",parseInt).option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await r(lo,{id:t,input:{row:e.row,column:e.column}});c("Button moved"),d(e,o.moveVibeDeckButton);}catch(o){a(o);}}),i.command("reorder-buttons").description("Reorder vibedeck buttons").argument("<vibeDeckId>").requiredOption("--positions <json>","Positions as JSON array").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o;try{o=JSON.parse(e.positions);}catch{throw new m("Invalid JSON for --positions")}let s=await r(fo,{vibeDeckId:t,positions:o});c("Buttons reordered"),d(e,s.reorderVibeDeckButtons);}catch(o){a(o);}}),i.command("execute-button").description("Execute vibedeck button").argument("<id>").requiredOption("--agent-id <id>","Agent ID").action(async(t,e)=>{try{let s=(await r(Io,{id:t,agentId:e.agentId})).executeVibeDeckButton;if(s.success)c(s.output??"Button executed successfully");else throw new m(s.error??"Execution failed")}catch(o){a(o);}});let n=i.command("share-links").description("VibeDeck share-link management");n.command("list").description("List share-links for a vibedeck").argument("<vibeDeckId>","VibeDeck ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await r(Wi,{vibeDeckId:t});d(e,o.vibeDeckShareLinks,{headers:["ID","Name","Permission","Status","Visibility","Uses","Expires"],rows:o.vibeDeckShareLinks.map(s=>[f(s.id,12),s.name??"-",s.permission,s.status,s.visibility,String(s.useCount??0),s.expiresAt?S(s.expiresAt):"-"])});}catch(o){a(o);}}),n.command("create").description("Create a share-link").requiredOption("--vibe-deck-id <id>","VibeDeck ID").option("--name <name>","Friendly name").option("--permission <p>","EXECUTE or VIEW","EXECUTE").option("--visibility <v>","SIGNED_LINK | PUBLIC | RESTRICTED","SIGNED_LINK").option("--password <pwd>","Password protect").option("--max-uses <n>","Max uses",t=>parseInt(t,10)).option("--expires-in-hours <n>","Hours until expiry",t=>parseInt(t,10)).option("--allow-iframe","Allow iframe embedding").action(async t=>{try{let e={vibeDeckId:t.vibeDeckId,permission:(t.permission??"EXECUTE").toUpperCase(),visibility:(t.visibility??"SIGNED_LINK").toUpperCase()};t.name&&(e.name=t.name),t.password&&(e.password=t.password),t.maxUses!==void 0&&(e.maxUses=t.maxUses),t.expiresInHours!==void 0&&(e.expiresInHours=t.expiresInHours),t.allowIframe&&(e.allowIframe=!0);let o=await r(ji,{input:e});c(`Created share-link ${o.createVibeDeckShareLink.id} \u2014 ${o.createVibeDeckShareLink.shareUrl}`);}catch(e){a(e);}}),n.command("update").description("Update a share-link").argument("<id>","Share-link ID").option("--name <name>").option("--permission <p>").option("--visibility <v>").option("--password <pwd>").option("--max-uses <n>","",t=>parseInt(t,10)).option("--expires-at <iso>").option("--allow-iframe <bool>").action(async(t,e)=>{try{let o={};e.name&&(o.name=e.name),e.permission&&(o.permission=e.permission.toUpperCase()),e.visibility&&(o.visibility=e.visibility.toUpperCase()),e.password&&(o.password=e.password),e.maxUses!==void 0&&(o.maxUses=e.maxUses),e.expiresAt&&(o.expiresAt=e.expiresAt),e.allowIframe!==void 0&&(o.allowIframe=e.allowIframe==="true"),await r(Yi,{id:t,input:o}),c("Share-link updated");}catch(o){a(o);}}),n.command("revoke").description("Revoke a share-link").argument("<id>","Share-link ID").option("--force","Skip confirmation").action(async(t,e)=>{try{if(!await l("Revoke this share-link?",e.force))return;await r(Ji,{id:t}),c("Share-link revoked");}catch(o){a(o);}}),n.command("validate").description("Validate a share-link token").argument("<token>").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await r(Xi,{token:t});d(e,o.validateVibeDeckShareLink);}catch(o){a(o);}}),n.command("get-shared").description("Fetch the public shared vibedeck via a token").argument("<token>").option("--password <pwd>").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await r(zi,{token:t,password:e.password});d(e,o.sharedVibeDeck);}catch(o){a(o);}}),n.command("execute-shared-button").description("Execute a button on a shared vibedeck").argument("<token>").requiredOption("--button-id <id>","Button ID").option("--password <pwd>").action(async(t,e)=>{try{let s=(await r(Qi,{token:t,buttonId:e.buttonId,password:e.password})).executeSharedVibeDeckButton;if(s.success)c(s.output??"Executed");else throw new m(s.error??"Execution failed")}catch(o){a(o);}});}function sa(p){let i=p.command("ai-tool-events").description("AI tool event tracking");i.command("list").description("List AI tool events").option("--agent-id <id>","Filter by agent").option("--tool-name <name>","Filter by tool name").option("-f, --format <format>","Output format").action(async n=>{try{let t={};n.agentId&&(t.agentId=n.agentId),n.toolName&&(t.toolName=n.toolName);let o=(await r(Ro,{filter:Object.keys(t).length?t:void 0})).aiToolEvents.items;d(n,o,{headers:["ID","Tool","Event Type","Model","Tokens","Duration","Created"],rows:o.map(s=>[f(s.id,12),s.toolName,s.eventType,s.model??"-",String(s.tokenCount??"-"),String(s.duration??"-"),S(s.createdAt)])});}catch(t){a(t);}}),i.command("get").description("Get AI tool event").argument("<id>","Event ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(No,{id:n});if(!e.aiToolEvent)throw new m("AI tool event not found");d(t,e.aiToolEvent);}catch(e){a(e);}}),i.command("recent").description("Recent AI tool events").requiredOption("--agent-id <id>","Filter by agent").option("--limit <n>","Max results",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(xo,{agentId:n.agentId,limit:n.limit});d(n,t.recentAiToolEvents);}catch(t){a(t);}}),i.command("create").description("Create AI tool event").requiredOption("--agent-id <id>","Agent ID").requiredOption("--tool-name <name>","Tool name").requiredOption("--event-type <type>","Event type").option("--model <model>","Model name").option("--input <input>","Input data").option("--output <output>","Output data").option("--token-count <n>","Token count",parseInt).option("--duration <ms>","Duration in ms",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(Uo,{input:{agentId:n.agentId,toolName:n.toolName,eventType:n.eventType,model:n.model,input:n.input,output:n.output,tokenCount:n.tokenCount,duration:n.duration}});c("AI tool event created"),d(n,t.createAiToolEvent);}catch(t){a(t);}}),i.command("cleanup").description("Delete old AI tool events").requiredOption("--before-date <date>","Delete events before this date").option("--force","Skip confirmation").action(async n=>{try{if(!await l(`Delete all AI tool events before ${n.beforeDate}?`,n.force))return;let t=await r(Lo,{beforeDate:n.beforeDate});c("Old AI tool events deleted"),d({},t.deleteOldAiToolEvents);}catch(t){a(t);}});}function ca(p){let i=p.command("docs").description("Documentation site management");i.command("sites").description("List documentation sites").option("-f, --format <format>","Output format").action(async n=>{try{let e=(await r(Po)).docsSites.items;d(n,e,{headers:["ID","Vibe ID","Name","Visibility","Created"],rows:e.map(o=>[f(o.id,12),f(o.vibeId,12),o.name,o.visibility,S(o.createdAt)])});}catch(t){a(t);}}),i.command("site").description("Get documentation site").argument("<vibeId>","Vibe ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(Vo,{vibeId:n});if(!e.docsSite)throw new m("Docs site not found");d(t,e.docsSite);}catch(e){a(e);}}),i.command("create-site").description("Create documentation site").requiredOption("--vibe-id <id>","Vibe ID").requiredOption("--name <name>","Site name").option("--description <desc>","Description").option("--visibility <v>","Visibility (PRIVATE/PUBLIC)").option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(Go,{input:{vibeId:n.vibeId,name:n.name,description:n.description,visibility:n.visibility}});c("Docs site created"),d(n,t.createDocsSite);}catch(t){a(t);}}),i.command("update-site").description("Update documentation site").argument("<id>","Site ID").option("--name <name>","Name").option("--description <desc>","Description").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e={};if(t.name&&(e.name=t.name),t.description&&(e.description=t.description),!Object.keys(e).length)throw new m("No updates specified");let o=await r(qo,{id:n,input:e});c("Docs site updated"),d(t,o.updateDocsSite);}catch(e){a(e);}}),i.command("set-visibility").description("Set site visibility").argument("<id>","Site ID").argument("<visibility>","PRIVATE or PUBLIC").option("-f, --format <format>","Output format").action(async(n,t,e)=>{try{let o=await r(Bo,{id:n,visibility:t});c(`Visibility set to ${t}`),d(e,o.updateDocsSiteVisibility);}catch(o){a(o);}}),i.command("delete-site").description("Delete documentation site").argument("<id>","Site ID").option("--force","Skip confirmation").action(async(n,t)=>{try{if(!await l("Delete this docs site?",t.force))return;await r(Fo,{id:n}),c("Docs site deleted");}catch(e){a(e);}}),i.command("pages").description("List pages for a site").argument("<siteId>","Site ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(Mo,{siteId:n});d(t,e.docsPages);}catch(e){a(e);}}),i.command("page").description("Get a page").argument("<id>","Page ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(Ho,{id:n});if(!e.docsPage)throw new m("Page not found");d(t,e.docsPage);}catch(e){a(e);}}),i.command("create-page").description("Create a page").requiredOption("--site-id <id>","Site ID").requiredOption("--title <title>","Page title").option("--slug <slug>","Page slug").option("--content <content>","Page content").option("--parent-id <id>","Parent page ID").option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(Ko,{input:{siteId:n.siteId,title:n.title,slug:n.slug,content:n.content,parentId:n.parentId}});c("Page created"),d(n,t.createDocsPage);}catch(t){a(t);}}),i.command("update-page").description("Update a page").argument("<id>","Page ID").option("--title <title>","Title").option("--content <content>","Content").option("--slug <slug>","Slug").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e={};if(t.title&&(e.title=t.title),t.content&&(e.content=t.content),t.slug&&(e.slug=t.slug),!Object.keys(e).length)throw new m("No updates specified");let o=await r(Wo,{id:n,input:e});c("Page updated"),d(t,o.updateDocsPage);}catch(e){a(e);}}),i.command("delete-page").description("Delete a page").argument("<id>","Page ID").option("--force","Skip confirmation").action(async(n,t)=>{try{if(!await l("Delete this page?",t.force))return;await r(jo,{id:n}),c("Page deleted");}catch(e){a(e);}}),i.command("reorder-pages").description("Reorder pages").argument("<siteId>","Site ID").requiredOption("--pages <json>","Page order as JSON array").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=JSON.parse(t.pages),o=await r(Yo,{siteId:n,pages:e});c("Pages reordered"),d(t,o.reorderDocsPages);}catch(e){a(e);}}),i.command("revisions").description("List revisions for a site").argument("<siteId>","Site ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(Jo,{siteId:n});d(t,e.docsRevisions);}catch(e){a(e);}}),i.command("revision").description("Get a revision").argument("<id>","Revision ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(Xo,{id:n});if(!e.docsRevision)throw new m("Revision not found");d(t,e.docsRevision);}catch(e){a(e);}}),i.command("content").description("Get docs content").argument("<siteId>","Site ID").option("--path <path>","Content path").action(async(n,t)=>{try{let e=await r(zo,{siteId:n,path:t.path});e.docsContent?console.log(e.docsContent):T("No content found");}catch(e){a(e);}}),i.command("compile").description("Compile documentation site").argument("<siteId>","Site ID").option("--publish","Publish after compile").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(Qo,{siteId:n,publish:t.publish??!1});c("Docs site compiled"),d(t,e.compileDocsSite);}catch(e){a(e);}}),i.command("publish").description("Publish a revision").argument("<revisionId>","Revision ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(Zo,{revisionId:n});c("Revision published"),d(t,e.publishDocsRevision);}catch(e){a(e);}}),i.command("rollback").description("Rollback to a revision").argument("<siteId>","Site ID").argument("<revisionId>","Revision ID").option("--force","Skip confirmation").action(async(n,t,e)=>{try{if(!await l(`Rollback site to revision ${t}?`,e.force))return;let o=await r(ti,{siteId:n,revisionId:t});c("Rollback complete"),d({},o.rollbackDocsRevision);}catch(o){a(o);}}),i.command("signed-url").description("Generate signed URL for a site").argument("<siteId>","Site ID").action(async n=>{try{let t=await r(ei,{siteId:n});console.log(t.generateDocsSignedUrl);}catch(t){a(t);}});}function da(p){let i=p.command("audit").description("Audit log management");i.command("list").description("List audit logs").option("--action <action>","Filter by action").option("--resource-type <type>","Filter by resource type").option("--status <status>","Filter by status").option("--actor-id <id>","Filter by actor").option("--from <date>","From date").option("--to <date>","To date").option("-f, --format <format>","Output format").action(async n=>{try{let t={};n.action&&(t.action=n.action),n.resourceType&&(t.resourceType=n.resourceType),n.status&&(t.status=n.status),n.actorId&&(t.actorId=n.actorId),n.from&&(t.from=n.from),n.to&&(t.to=n.to);let o=(await r(ni,{filter:Object.keys(t).length?t:void 0})).vibeAuditLogs.items;d(n,o,{headers:["ID","Action","Resource","Resource ID","Actor","Status","Created"],rows:o.map(s=>[f(s.id,12),s.action,s.resourceType,f(s.resourceId,12),f(s.actorId,12),s.status,S(s.createdAt)])});}catch(t){a(t);}}),i.command("get").description("Get audit log").argument("<id>","Audit log ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(oi,{id:n});if(!e.vibeAuditLog)throw new m("Audit log not found");d(t,e.vibeAuditLog);}catch(e){a(e);}}),i.command("stats").description("Get audit log statistics").option("--action <action>","Filter by action").option("--resource-type <type>","Filter by resource type").option("--status <status>","Filter by status").option("--actor-id <id>","Filter by actor").option("--from <date>","From date").option("--to <date>","To date").option("-f, --format <format>","Output format").action(async n=>{try{let t={};n.action&&(t.action=n.action),n.resourceType&&(t.resourceType=n.resourceType),n.status&&(t.status=n.status),n.actorId&&(t.actorId=n.actorId),n.from&&(t.from=n.from),n.to&&(t.to=n.to);let e=await r(ii,{filter:Object.keys(t).length?t:void 0});d(n,e.vibeAuditLogStats);}catch(t){a(t);}}),i.command("delete").description("Delete audit log").argument("<id>","Audit log ID").option("--reason <reason>","Deletion reason").option("--force","Skip confirmation").action(async(n,t)=>{try{if(!await l("Delete this audit log?",t.force))return;await r(ri,{id:n,reason:t.reason}),c("Audit log deleted");}catch(e){a(e);}}),i.command("bulk-delete").description("Bulk delete audit logs").requiredOption("--ids <ids>","Comma-separated IDs").option("--reason <reason>","Deletion reason").option("--force","Skip confirmation").action(async n=>{try{let t=n.ids.split(",").map(e=>e.trim());if(!await l(`Delete ${t.length} audit logs?`,n.force))return;await r(ai,{ids:t,reason:n.reason}),c(`${t.length} audit logs deleted`);}catch(t){a(t);}}),i.command("export").description("Export audit logs").option("--action <action>","Filter by action").option("--resource-type <type>","Filter by resource type").option("--status <status>","Filter by status").option("--actor-id <id>","Filter by actor").option("--from <date>","From date").option("--to <date>","To date").option("--export-format <fmt>","Export format (csv/json)","json").action(async n=>{try{let t={};n.action&&(t.action=n.action),n.resourceType&&(t.resourceType=n.resourceType),n.status&&(t.status=n.status),n.actorId&&(t.actorId=n.actorId),n.from&&(t.from=n.from),n.to&&(t.to=n.to);let e=await r(si,{filter:Object.keys(t).length?t:void 0,exportFormat:n.exportFormat});console.log(e.exportVibeAuditLogs);}catch(t){a(t);}});}function pa(p){let i=p.command("action").description("Vibe Actions management");i.command("list").description("List actions").option("--type <type>","Filter by action type (COMMAND, SCRIPT, WEBHOOK, WORKFLOW)").option("--trigger <trigger>","Filter by trigger type (MANUAL, SCHEDULED, EVENT, ON_DEMAND)").option("--category <category>","Filter by category").option("-f, --format <format>","Output format").action(async t=>{try{let e={};t.type&&(e.actionType=t.type.toUpperCase()),t.trigger&&(e.triggerType=t.trigger.toUpperCase()),t.category&&(e.category=t.category);let s=(await r(So,{filter:Object.keys(e).length?e:void 0})).actions.items;d(t,s,{headers:["ID","Name","Type","Trigger","Source","Category"],rows:s.map(u=>[f(u.id,12),u.displayName??u.name,u.actionType,u.triggerType,u.sourceType,u.category??"-"])});}catch(e){a(e);}}),i.command("get").description("Get action details").argument("<id>").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await r(yo,{id:t});if(!o.action)throw new m("Action not found");d(e,o.action);}catch(o){a(o);}}),i.command("create").description("Create action").requiredOption("--name <n>","Name").option("--display-name <n>","Display name").option("--description <d>","Description").option("--type <t>","Action type (COMMAND, SCRIPT, WEBHOOK, WORKFLOW)","COMMAND").option("--trigger <t>","Trigger type (MANUAL, SCHEDULED, EVENT, ON_DEMAND)","MANUAL").option("--command <c>","Command to execute").option("--working-directory <d>","Working directory for command").option("--script <s>","Script content").option("--script-interpreter <i>","Script interpreter (e.g. bash, python)").option("--webhook-url <u>","Webhook URL").option("--webhook-method <m>","Webhook HTTP method").option("--schedule <s>","Cron schedule expression").option("--category <c>","Category").option("--tags <t>","Comma-separated tags").option("--target-agent-id <id>","Target agent ID").option("--timeout <ms>","Timeout in milliseconds",parseInt).option("--retry-count <n>","Retry count",parseInt).option("--confirmation-required","Require confirmation before execution").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name,actionType:(t.type??"COMMAND").toUpperCase(),triggerType:(t.trigger??"MANUAL").toUpperCase()};t.displayName&&(e.displayName=t.displayName),t.description&&(e.description=t.description),t.command&&(e.command=t.command),t.workingDirectory&&(e.workingDirectory=t.workingDirectory),t.script&&(e.script=t.script),t.scriptInterpreter&&(e.scriptInterpreter=t.scriptInterpreter),t.webhookUrl&&(e.webhookUrl=t.webhookUrl),t.webhookMethod&&(e.webhookMethod=t.webhookMethod),t.schedule&&(e.schedule=t.schedule),t.category&&(e.category=t.category),t.tags&&(e.tags=t.tags.split(",").map(s=>s.trim())),t.targetAgentId&&(e.targetAgentId=t.targetAgentId),t.timeout!==void 0&&(e.timeoutMs=t.timeout),t.retryCount!==void 0&&(e.retryCount=t.retryCount),t.confirmationRequired&&(e.confirmationRequired=!0);let o=await r(Eo,{input:e});c("Action created"),d(t,o.createAction);}catch(e){a(e);}}),i.command("update").description("Update action").argument("<id>").option("--name <n>","Name").option("--display-name <n>","Display name").option("--description <d>","Description").option("--type <t>","Action type (COMMAND, SCRIPT, WEBHOOK, WORKFLOW)").option("--trigger <t>","Trigger type (MANUAL, SCHEDULED, EVENT, ON_DEMAND)").option("--command <c>","Command to execute").option("--working-directory <d>","Working directory for command").option("--script <s>","Script content").option("--script-interpreter <i>","Script interpreter").option("--webhook-url <u>","Webhook URL").option("--webhook-method <m>","Webhook HTTP method").option("--schedule <s>","Cron schedule expression").option("--category <c>","Category").option("--tags <t>","Comma-separated tags").option("--target-agent-id <id>","Target agent ID").option("--timeout <ms>","Timeout in milliseconds",parseInt).option("--retry-count <n>","Retry count",parseInt).option("--confirmation-required","Require confirmation before execution").option("--no-confirmation-required","Disable confirmation requirement").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};if(e.name&&(o.name=e.name),e.displayName&&(o.displayName=e.displayName),e.description&&(o.description=e.description),e.type&&(o.actionType=e.type.toUpperCase()),e.trigger&&(o.triggerType=e.trigger.toUpperCase()),e.command&&(o.command=e.command),e.workingDirectory&&(o.workingDirectory=e.workingDirectory),e.script&&(o.script=e.script),e.scriptInterpreter&&(o.scriptInterpreter=e.scriptInterpreter),e.webhookUrl&&(o.webhookUrl=e.webhookUrl),e.webhookMethod&&(o.webhookMethod=e.webhookMethod),e.schedule&&(o.schedule=e.schedule),e.category&&(o.category=e.category),e.tags&&(o.tags=e.tags.split(",").map(u=>u.trim())),e.targetAgentId&&(o.targetAgentId=e.targetAgentId),e.timeout!==void 0&&(o.timeoutMs=e.timeout),e.retryCount!==void 0&&(o.retryCount=e.retryCount),e.confirmationRequired!==void 0&&(o.confirmationRequired=e.confirmationRequired),!Object.keys(o).length)throw new m("No updates specified");let s=await r(To,{id:t,input:o});c("Action updated"),d(e,s.updateAction);}catch(o){a(o);}}),i.command("delete").description("Delete action").argument("<id>").option("--force","Skip confirmation").action(async(t,e)=>{try{if(!await l("Delete this action?",e.force))return;await r(bo,{id:t}),c("Action deleted");}catch(o){a(o);}}),i.command("duplicate").description("Duplicate action").argument("<id>").argument("[name]").option("-f, --format <format>","Output format").action(async(t,e,o)=>{try{let s=await r(Ao,{id:t,name:e});c("Action duplicated"),d(o,s.duplicateAction);}catch(s){a(s);}}),i.command("execute").description("Execute action").argument("<id>").option("--agent-id <id>","Target agent ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};e.agentId&&(o.agentId=e.agentId);let u=(await r(ho,{id:t,input:Object.keys(o).length?o:void 0})).executeAction,g=u.status;g==="SUCCESS"?c(`Action executed successfully${u.durationMs?` (${u.durationMs}ms)`:""}`):g==="RUNNING"||g==="PENDING"?c(`Action execution started (${g})`):T(u.errorMessage??`Execution ${g}`),d(e,u);}catch(o){a(o);}}),i.command("install").description("Install action from store").argument("<storeItemId>").option("--version <v>","Version to install").option("--name <n>","Custom name for installed action").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await r(Co,{storeItemId:t,version:e.version,name:e.name});c("Action installed from store"),d(e,o.installActionFromStore);}catch(o){a(o);}}),i.command("history").description("List action execution history").argument("[actionId]").option("--status <s>","Filter by status (PENDING, RUNNING, SUCCESS, FAILURE, TIMEOUT, CANCELLED)").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};t&&(o.actionId=t),e.status&&(o.status=e.status.toUpperCase());let u=(await r(Oo,{filter:Object.keys(o).length?o:void 0})).actionExecutions.items;d(e,u,{headers:["ID","Action ID","Status","Trigger","Duration","Started"],rows:u.map(g=>[f(g.id,12),f(g.actionId,12),b(g.status),g.triggerType,g.durationMs?`${g.durationMs}ms`:"-",S(g.startedAt)])});}catch(o){a(o);}}),i.command("cancel-execution").description("Cancel a running action execution").argument("<id>").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await r(Do,{id:t});c("Action execution cancelled"),d(e,o.cancelActionExecution);}catch(o){a(o);}}),i.command("execution").description("Get action execution details").argument("<id>").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await r($o,{id:t});if(!o.actionExecution)throw new m("Action execution not found");d(e,o.actionExecution);}catch(o){a(o);}}),i.command("schedule").description("Create a scheduled job for an action").argument("<actionId>","Action ID to schedule").option("--cron <expr>","Cron expression (for CRON schedule type)").option("--timezone <tz>","Timezone for the schedule","UTC").option("--schedule-type <type>","Schedule type (CRON, ONE_TIME, FIXED_INTERVAL)","CRON").option("--scheduled-at <date>","ISO date for ONE_TIME schedule").option("--interval <n>","Interval value (for FIXED_INTERVAL)",parseInt).option("--interval-unit <unit>","Interval unit (MINUTES, HOURS, DAYS)").option("--start-date <date>","Schedule start date (ISO)").option("--end-date <date>","Schedule end date (ISO)").option("--name <name>","Name for the scheduled job").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={actionId:t,scheduleType:(e.scheduleType??"CRON").toUpperCase()};e.cron&&(o.cronExpression=e.cron),e.timezone&&(o.timezone=e.timezone),e.scheduledAt&&(o.scheduledAt=e.scheduledAt),e.interval!==void 0&&(o.interval=e.interval),e.intervalUnit&&(o.intervalUnit=e.intervalUnit.toUpperCase()),e.startDate&&(o.startDate=e.startDate),e.endDate&&(o.endDate=e.endDate),e.name&&(o.name=e.name);let s=await r(vo,{input:o});c("Scheduled job created"),d(e,s.createScheduledJob);}catch(o){a(o);}}),i.command("unschedule").description("Delete a scheduled job").argument("<scheduledJobId>","Scheduled job ID to delete").option("--force","Skip confirmation").action(async(t,e)=>{try{if(!await l("Delete this scheduled job?",e.force))return;await r(ko,{id:t}),c("Scheduled job deleted");}catch(o){a(o);}}),i.command("schedules").description("List scheduled jobs").option("--action-id <id>","Filter by action ID").option("-f, --format <format>","Output format").action(async t=>{try{let e={};t.actionId&&(e.actionId=t.actionId);let s=(await r(_o,{filter:Object.keys(e).length?e:void 0})).scheduledJobs.jobs;d(t,s,{headers:["ID","Name","Type","Status","Action ID","Cron","Next Run"],rows:s.map(u=>[f(u.id,12),u.name??"-",u.scheduleType,b(u.status),f(u.actionId,12),u.cronExpression??"-",u.nextExecutionAt?S(u.nextExecutionAt):"-"])});}catch(e){a(e);}});let n=i.command("ai-prompts").description("AI prompt templates");n.command("list").description("List AI prompts").option("--category <c>","Filter by category").option("--status <s>","Filter by status (ACTIVE, ARCHIVED, DRAFT)").option("--shared","Only shared prompts").option("--search <q>","Search text").option("-f, --format <format>","Output format").action(async t=>{try{let e={};t.category&&(e.category=t.category.toUpperCase()),t.status&&(e.status=t.status.toUpperCase()),t.shared&&(e.isShared=!0),t.search&&(e.search=t.search);let s=(await r(Vi,{filter:Object.keys(e).length?e:void 0})).aiPrompts.items;d(t,s,{headers:["ID","Name","Category","Status","Shared","Uses","Updated"],rows:s.map(u=>[f(u.id,12),u.name,u.category,b(u.status),u.isShared?"yes":"no",String(u.usageCount??0),S(u.updatedAt)])});}catch(e){a(e);}}),n.command("get").description("Get an AI prompt").argument("<id>","Prompt ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await r(Gi,{id:t});if(!o.aiPrompt){T("Prompt not found");return}d(e,o.aiPrompt);}catch(o){a(o);}}),n.command("create").description("Create a new AI prompt").requiredOption("--name <name>","Prompt name").requiredOption("--content <content>","Prompt content/template").option("--description <desc>","Description").option("--category <cat>","Category","GENERAL").option("--status <s>","Status","ACTIVE").option("--shared","Share with workspace").option("--tags <tags>","Comma-separated tags").option("--variables <json>","Variables (JSON)").action(async t=>{try{let e={name:t.name,content:t.content,category:(t.category??"GENERAL").toUpperCase(),status:(t.status??"ACTIVE").toUpperCase()};if(t.description&&(e.description=t.description),t.shared&&(e.isShared=!0),t.tags&&(e.tags=t.tags.split(",").map(s=>s.trim())),t.variables)try{e.variables=JSON.parse(t.variables);}catch{throw new m("--variables must be valid JSON")}let o=await r(qi,{input:e});c(`Created prompt ${o.createAIPrompt.id}`);}catch(e){a(e);}}),n.command("update").description("Update an AI prompt").argument("<id>","Prompt ID").option("--name <name>").option("--content <content>").option("--description <desc>").option("--category <cat>").option("--status <s>").option("--shared <bool>").option("--tags <tags>","Comma-separated tags").option("--variables <json>").action(async(t,e)=>{try{let o={};if(e.name&&(o.name=e.name),e.content&&(o.content=e.content),e.description&&(o.description=e.description),e.category&&(o.category=e.category.toUpperCase()),e.status&&(o.status=e.status.toUpperCase()),e.shared!==void 0&&(o.isShared=e.shared==="true"),e.tags&&(o.tags=e.tags.split(",").map(s=>s.trim())),e.variables)try{o.variables=JSON.parse(e.variables);}catch{throw new m("--variables must be valid JSON")}await r(Bi,{id:t,input:o}),c("Prompt updated");}catch(o){a(o);}}),n.command("delete").description("Delete an AI prompt").argument("<id>","Prompt ID").option("--force","Skip confirmation").action(async(t,e)=>{try{if(!await l("Delete this prompt?",e.force))return;await r(Fi,{id:t}),c("Prompt deleted");}catch(o){a(o);}}),n.command("duplicate").description("Duplicate an AI prompt").argument("<id>","Prompt ID").requiredOption("--name <name>","Name for the duplicate").action(async(t,e)=>{try{let o=await r(Mi,{id:t,name:e.name});c(`Duplicated to ${o.duplicateAIPrompt.id}`);}catch(o){a(o);}}),n.command("render").description("Render an AI prompt with variables").argument("<id>","Prompt ID").option("--variables <json>","Variables (JSON)").action(async(t,e)=>{try{let o;if(e.variables)try{o=JSON.parse(e.variables);}catch{throw new m("--variables must be valid JSON")}let s=await r(Hi,{id:t,variables:o});process.stdout.write(s.renderAIPrompt.rendered),s.renderAIPrompt.rendered.endsWith(`
|
|
1378
|
+
`)||process.stdout.write(`
|
|
1379
|
+
`);}catch(o){a(o);}}),n.command("record-usage").description("Increment usage counter for a prompt").argument("<id>","Prompt ID").action(async t=>{try{await r(Ki,{id:t}),c("Usage recorded");}catch(e){a(e);}});}function ua(p){let i=p.command("analytics").description("VibeControls analytics");i.command("overview").description("Show analytics overview for all entities").option("--start-date <date>","Start date (ISO format)",new Date(Date.now()-10080*60*1e3).toISOString()).option("--end-date <date>","End date (ISO format)",new Date().toISOString()).option("--granularity <g>","Granularity (HOUR, DAY, WEEK, MONTH)","DAY").option("--agent-id <id>","Filter by agent ID").option("--vibe-id <id>","Filter by vibe ID").option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(q,{input:{startDate:n.startDate,endDate:n.endDate,granularity:n.granularity,agentId:n.agentId||void 0,vibeId:n.vibeId||void 0}});d(n,t.vibecontrolsAnalytics);}catch(t){a(t);}}),i.command("agents").description("Show agent analytics").option("--start-date <date>","Start date (ISO format)",new Date(Date.now()-10080*60*1e3).toISOString()).option("--end-date <date>","End date (ISO format)",new Date().toISOString()).option("--granularity <g>","Granularity","DAY").option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(q,{input:{startDate:n.startDate,endDate:n.endDate,granularity:n.granularity,entityTypes:["AGENT"]}});d(n,t.vibecontrolsAnalytics.agents);}catch(t){a(t);}}),i.command("sessions").description("Show session analytics").option("--start-date <date>","Start date (ISO format)",new Date(Date.now()-10080*60*1e3).toISOString()).option("--end-date <date>","End date (ISO format)",new Date().toISOString()).option("--granularity <g>","Granularity","DAY").option("--agent-id <id>","Filter by agent ID").option("--vibe-id <id>","Filter by vibe ID").option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(q,{input:{startDate:n.startDate,endDate:n.endDate,granularity:n.granularity,entityTypes:["SESSION"],agentId:n.agentId||void 0,vibeId:n.vibeId||void 0}});d(n,t.vibecontrolsAnalytics.sessions);}catch(t){a(t);}}),i.command("actions").description("Show action analytics").option("--start-date <date>","Start date (ISO format)",new Date(Date.now()-10080*60*1e3).toISOString()).option("--end-date <date>","End date (ISO format)",new Date().toISOString()).option("--granularity <g>","Granularity","DAY").option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(q,{input:{startDate:n.startDate,endDate:n.endDate,granularity:n.granularity,entityTypes:["ACTION"]}});d(n,t.vibecontrolsAnalytics.actions);}catch(t){a(t);}});}function ma(p){let i=p.command("catalogs").description("Service catalog (component + vibe groupings)");i.command("list").description("List catalogs").option("--search <q>","Search query").option("--visibility <v>","Filter by visibility (PUBLIC|PRIVATE|INTERNAL)").option("--tags <tags>","Comma-separated tags").option("-f, --format <format>","Output format").action(async n=>{try{let t={};n.search&&(t.search=n.search),n.visibility&&(t.visibility=n.visibility.toUpperCase()),n.tags&&(t.tags=n.tags.split(",").map(s=>s.trim()));let o=(await r(di,{filter:Object.keys(t).length?t:void 0})).vibecontrolsCatalogs.items;d(n,o,{headers:["ID","Name","Visibility","Components","Vibes","Created"],rows:o.map(s=>[f(s.id,12),s.name,s.visibility,String(s.componentCount??0),String(s.vibeCount??0),S(s.createdAt)])});}catch(t){a(t);}}),i.command("get").description("Get catalog").argument("<id>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(pi,{id:n});if(!e.vibecontrolsCatalog)throw new m("Catalog not found");d(t,e.vibecontrolsCatalog);}catch(e){a(e);}}),i.command("dependency-graph").description("Dependency graph for a catalog").argument("<catalogId>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(ui,{catalogId:n});d(t,e.vibecontrolsCatalogDependencyGraph);}catch(e){a(e);}}),i.command("sbom").description("SBOM for a catalog").argument("<catalogId>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(mi,{catalogId:n});d(t,e.vibecontrolsCatalogSBOM);}catch(e){a(e);}}),i.command("create").description("Create catalog").requiredOption("--name <n>","Catalog name").option("--description <d>","Description").option("--visibility <v>","Visibility (PUBLIC|PRIVATE|INTERNAL)","PRIVATE").option("--owner-id <id>","Owner actor ID").option("--owner-name <n>","Owner display name").option("--tags <tags>","Comma-separated tags").action(async n=>{try{let t={name:n.name};n.description&&(t.description=n.description),n.visibility&&(t.visibility=n.visibility.toUpperCase()),n.ownerId&&(t.ownerId=n.ownerId),n.ownerName&&(t.ownerName=n.ownerName),n.tags&&(t.tags=n.tags.split(",").map(o=>o.trim()));let e=await r(gi,{input:t});c(`Catalog created: ${e.createVibecontrolsCatalog.name} (${e.createVibecontrolsCatalog.id})`);}catch(t){a(t);}}),i.command("update").description("Update catalog").argument("<id>").option("--name <n>","Name").option("--description <d>","Description").option("--visibility <v>","Visibility").option("--tags <tags>","Comma-separated tags").action(async(n,t)=>{try{let e={};t.name&&(e.name=t.name),t.description!==void 0&&(e.description=t.description),t.visibility&&(e.visibility=t.visibility.toUpperCase()),t.tags&&(e.tags=t.tags.split(",").map(o=>o.trim())),await r(li,{id:n,input:e}),c(`Catalog ${n} updated`);}catch(e){a(e);}}),i.command("delete").description("Delete catalog (soft)").argument("<id>").option("-y, --yes","Skip confirmation").action(async(n,t)=>{try{if(!t.yes&&!await l(`Delete catalog ${n}?`))return;await r(fi,{id:n}),c(`Catalog ${n} deleted`);}catch(e){a(e);}}),i.command("add-component").description("Add a component to a catalog").requiredOption("--catalog <id>","Catalog ID").requiredOption("--component <id>","Component ID").action(async n=>{try{await r(Ii,{catalogId:n.catalog,componentId:n.component}),c(`Component ${n.component} added to catalog ${n.catalog}`);}catch(t){a(t);}}),i.command("remove-component").description("Remove a component from a catalog").requiredOption("--catalog <id>","Catalog ID").requiredOption("--component <id>","Component ID").action(async n=>{try{await r(Si,{catalogId:n.catalog,componentId:n.component}),c(`Component ${n.component} removed from catalog ${n.catalog}`);}catch(t){a(t);}}),i.command("add-vibe").description("Add a vibe to a catalog").requiredOption("--catalog <id>","Catalog ID").requiredOption("--vibe <id>","Vibe ID").action(async n=>{try{await r(yi,{catalogId:n.catalog,vibeId:n.vibe}),c(`Vibe ${n.vibe} added to catalog ${n.catalog}`);}catch(t){a(t);}}),i.command("remove-vibe").description("Remove a vibe from a catalog").requiredOption("--catalog <id>","Catalog ID").requiredOption("--vibe <id>","Vibe ID").action(async n=>{try{await r(Ei,{catalogId:n.catalog,vibeId:n.vibe}),c(`Vibe ${n.vibe} removed from catalog ${n.catalog}`);}catch(t){a(t);}});}function ga(p){let i=p.command("components").description("Software components registry");i.command("list").description("List components").option("--search <q>","Search query").option("--type <t>","Filter by type").option("--lifecycle <l>","Filter by lifecycle").option("--team <id>","Filter by team ID").option("--tags <tags>","Comma-separated tags").option("-f, --format <format>","Output format").action(async n=>{try{let t={};n.search&&(t.search=n.search),n.type&&(t.type=n.type.toUpperCase()),n.lifecycle&&(t.lifecycle=n.lifecycle.toUpperCase()),n.team&&(t.teamId=n.team),n.tags&&(t.tags=n.tags.split(",").map(s=>s.trim()));let o=(await r(Ti,{filter:Object.keys(t).length?t:void 0})).vibecontrolsComponents.items;d(n,o,{headers:["ID","Name","Type","Lifecycle","Version","Created"],rows:o.map(s=>[f(s.id,12),s.name,s.type,s.lifecycle,s.version??"",S(s.createdAt)])});}catch(t){a(t);}}),i.command("get").description("Get component").argument("<id>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(bi,{id:n});if(!e.vibecontrolsComponent)throw new m("Component not found");d(t,e.vibecontrolsComponent);}catch(e){a(e);}}),i.command("create").description("Create component").requiredOption("--name <n>","Component name").option("--description <d>","Description").option("--type <t>","Component type").option("--lifecycle <l>","Lifecycle stage").option("--version <v>","Version").option("--language <l>","Primary language").option("--framework <f>","Primary framework").option("--repository-url <u>","Repository URL").option("--documentation-url <u>","Documentation URL").option("--owner-id <id>","Owner ID").option("--owner-name <n>","Owner display name").option("--team-id <id>","Team ID").option("--tags <tags>","Comma-separated tags").action(async n=>{try{let t={name:n.name};n.description&&(t.description=n.description),n.type&&(t.type=n.type.toUpperCase()),n.lifecycle&&(t.lifecycle=n.lifecycle.toUpperCase()),n.version&&(t.version=n.version),n.language&&(t.language=n.language),n.framework&&(t.framework=n.framework),n.repositoryUrl&&(t.repositoryUrl=n.repositoryUrl),n.documentationUrl&&(t.documentationUrl=n.documentationUrl),n.ownerId&&(t.ownerId=n.ownerId),n.ownerName&&(t.ownerName=n.ownerName),n.teamId&&(t.teamId=n.teamId),n.tags&&(t.tags=n.tags.split(",").map(o=>o.trim()));let e=await r(Ai,{input:t});c(`Component created: ${e.createVibecontrolsComponent.name} (${e.createVibecontrolsComponent.id})`);}catch(t){a(t);}}),i.command("update").description("Update component").argument("<id>").option("--name <n>","Name").option("--description <d>","Description").option("--lifecycle <l>","Lifecycle").option("--version <v>","Version").option("--repository-url <u>","Repository URL").option("--documentation-url <u>","Documentation URL").option("--tags <tags>","Comma-separated tags").action(async(n,t)=>{try{let e={};t.name&&(e.name=t.name),t.description!==void 0&&(e.description=t.description),t.lifecycle&&(e.lifecycle=t.lifecycle.toUpperCase()),t.version&&(e.version=t.version),t.repositoryUrl&&(e.repositoryUrl=t.repositoryUrl),t.documentationUrl&&(e.documentationUrl=t.documentationUrl),t.tags&&(e.tags=t.tags.split(",").map(o=>o.trim())),await r(hi,{id:n,input:e}),c(`Component ${n} updated`);}catch(e){a(e);}}),i.command("delete").description("Delete component (soft)").argument("<id>").option("-y, --yes","Skip confirmation").action(async(n,t)=>{try{if(!t.yes&&!await l(`Delete component ${n}?`))return;await r(Ci,{id:n}),c(`Component ${n} deleted`);}catch(e){a(e);}}),i.command("fork-github-repo").description("Fork or create a GitHub repo for this workspace").requiredOption("--repo-name <n>","Name of the new repository").requiredOption("--scope <s>","USER or ORG").option("--org-name <n>","GitHub org (required when scope=ORG)").option("--source-repo-url <u>","Source repo URL to fork").option("--description <d>","Description").option("--connection-id <id>","OAuth connection ID").option("--token <t>","Personal access token (if no connection)").action(async n=>{try{let t={repoName:n.repoName,scope:n.scope.toUpperCase()};n.orgName&&(t.orgName=n.orgName),n.sourceRepoUrl&&(t.sourceRepoUrl=n.sourceRepoUrl),n.description&&(t.description=n.description),n.connectionId&&(t.connectionId=n.connectionId),n.token&&(t.token=n.token);let e=await r(Di,{input:t});c(`${e.forkVibecontrolsGitHubRepo.isForked?"Forked":"Created"}: ${e.forkVibecontrolsGitHubRepo.repoUrl}`);}catch(t){a(t);}}),i.command("publish-as-template").description("Publish a component as a reusable template").requiredOption("--component <id>","Component ID").requiredOption("--name <n>","Template name").option("--description <d>","Description").option("--category <c>","Template category").option("--version <v>","Version").option("--setup-instructions <s>","Markdown setup instructions").option("--source-repository-url <u>","Source repository URL").option("--tags <tags>","Comma-separated tags").action(async n=>{try{let t={name:n.name};n.description&&(t.description=n.description),n.category&&(t.category=n.category.toUpperCase()),n.version&&(t.version=n.version),n.setupInstructions&&(t.setupInstructions=n.setupInstructions),n.sourceRepositoryUrl&&(t.sourceRepositoryUrl=n.sourceRepositoryUrl),n.tags&&(t.tags=n.tags.split(",").map(o=>o.trim()));let e=await r(Oi,{componentId:n.component,input:t});c(`Template published: ${e.publishVibecontrolsComponentAsTemplate.name} (${e.publishVibecontrolsComponentAsTemplate.id})`);}catch(t){a(t);}});}function la(p){let i=p.command("templates").description("Reusable component templates");i.command("list").description("List templates").option("--search <q>","Search query").option("--category <c>","Filter by category").option("--status <s>","Filter by status").option("--tags <tags>","Comma-separated tags").option("-f, --format <format>","Output format").action(async n=>{try{let t={};n.search&&(t.search=n.search),n.category&&(t.category=n.category.toUpperCase()),n.status&&(t.status=n.status.toUpperCase()),n.tags&&(t.tags=n.tags.split(",").map(s=>s.trim()));let o=(await r($i,{filter:Object.keys(t).length?t:void 0})).vibecontrolsTemplates.items;d(n,o,{headers:["ID","Name","Category","Status","Clones","Created"],rows:o.map(s=>[f(s.id,12),s.name,s.category,s.status,String(s.cloneCount??0),S(s.createdAt)])});}catch(t){a(t);}}),i.command("get").description("Get template").argument("<id>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await r(wi,{id:n});if(!e.vibecontrolsTemplate)throw new m("Template not found");d(t,e.vibecontrolsTemplate);}catch(e){a(e);}}),i.command("update").description("Update template").argument("<id>").option("--name <n>","Name").option("--description <d>","Description").option("--category <c>","Category").option("--status <s>","Status").option("--version <v>","Version").option("--setup-instructions <s>","Markdown setup instructions").option("--source-repository-url <u>","Source repository URL").option("--tags <tags>","Comma-separated tags").action(async(n,t)=>{try{let e={};t.name&&(e.name=t.name),t.description!==void 0&&(e.description=t.description),t.category&&(e.category=t.category.toUpperCase()),t.status&&(e.status=t.status.toUpperCase()),t.version&&(e.version=t.version),t.setupInstructions&&(e.setupInstructions=t.setupInstructions),t.sourceRepositoryUrl&&(e.sourceRepositoryUrl=t.sourceRepositoryUrl),t.tags&&(e.tags=t.tags.split(",").map(o=>o.trim())),await r(vi,{id:n,input:e}),c(`Template ${n} updated`);}catch(e){a(e);}}),i.command("delete").description("Delete template (soft)").argument("<id>").option("-y, --yes","Skip confirmation").action(async(n,t)=>{try{if(!t.yes&&!await l(`Delete template ${n}?`))return;await r(ki,{id:n}),c(`Template ${n} deleted`);}catch(e){a(e);}}),i.command("instantiate").description("Instantiate template into a new component").requiredOption("--template <id>","Template ID").requiredOption("--name <n>","Name of the new component").option("--description <d>","Description of the new component").option("--workspace-id <id>","Target workspace (defaults to current)").option("--variable-values <json>","JSON for variableValues override").action(async n=>{try{let t={name:n.name};if(n.description&&(t.description=n.description),n.workspaceId&&(t.workspaceId=n.workspaceId),n.variableValues)try{t.variableValues=JSON.parse(n.variableValues);}catch{throw new m("--variable-values must be valid JSON")}let e=await r(_i,{templateId:n.template,input:t});c(`Component created: ${e.instantiateVibecontrolsTemplate.name} (${e.instantiateVibecontrolsTemplate.id})`);}catch(t){a(t);}});}function fa(p){let i=p.command("scorecards").description("Scorecards (polymorphic \u2014 vibe/catalog/component)");i.command("get").description("Get scorecard for an owner").requiredOption("--owner-id <id>","Owner entity ID").requiredOption("--owner-type <t>","CATALOG | COMPONENT | VIBE").option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(Ri,{ownerId:n.ownerId,ownerType:n.ownerType.toUpperCase()});d(n,t.vibecontrolsScorecard??{});}catch(t){a(t);}}),i.command("upsert").description("Create or update a scorecard for an owner").requiredOption("--owner-id <id>","Owner entity ID").requiredOption("--owner-type <t>","CATALOG | COMPONENT | VIBE").action(async n=>{try{let t={ownerId:n.ownerId,ownerType:n.ownerType.toUpperCase()},e=await r(Ni,{input:t});c(`Scorecard upserted: ${e.upsertVibecontrolsScorecard.id}`);}catch(t){a(t);}}),i.command("add-metric").description("Add a metric to a scorecard").requiredOption("--scorecard <id>","Scorecard ID").requiredOption("--name <n>","Metric name").option("--description <d>","Description").option("--type <t>","Metric type").option("--status <s>","Status").option("--value <v>","Current value",parseFloat).option("--threshold <t>","Target threshold",parseFloat).option("--unit <u>","Unit").option("--iframe-url <u>","Iframe embed URL").option("--iframe-height <h>","Iframe height (px)",n=>parseInt(n,10)).action(async n=>{try{let t={name:n.name};n.description&&(t.description=n.description),n.type&&(t.type=n.type.toUpperCase()),n.status&&(t.status=n.status.toUpperCase()),n.value!==void 0&&(t.value=n.value),n.threshold!==void 0&&(t.threshold=n.threshold),n.unit&&(t.unit=n.unit),n.iframeUrl&&(t.iframeUrl=n.iframeUrl),n.iframeHeight!==void 0&&(t.iframeHeight=n.iframeHeight);let e=await r(xi,{scorecardId:n.scorecard,input:t});c(`Metric added: ${e.addVibecontrolsScorecardMetric.name} (${e.addVibecontrolsScorecardMetric.id})`);}catch(t){a(t);}}),i.command("update-metric").description("Update a scorecard metric").argument("<id>").option("--name <n>","Name").option("--description <d>","Description").option("--status <s>","Status").option("--value <v>","Current value",parseFloat).option("--threshold <t>","Threshold",parseFloat).option("--unit <u>","Unit").action(async(n,t)=>{try{let e={};t.name&&(e.name=t.name),t.description!==void 0&&(e.description=t.description),t.status&&(e.status=t.status.toUpperCase()),t.value!==void 0&&(e.value=t.value),t.threshold!==void 0&&(e.threshold=t.threshold),t.unit&&(e.unit=t.unit),await r(Ui,{id:n,input:e}),c(`Metric ${n} updated`);}catch(e){a(e);}}),i.command("remove-metric").description("Remove a scorecard metric (soft)").argument("<id>").action(async n=>{try{await r(Li,{id:n}),c(`Metric ${n} removed`);}catch(t){a(t);}});}var ka={id:"vibecontrols",version:"1.0.0",displayName:"VibeControls",dependsOn:["auth","workspaces"],register(p,i){mt(i),Hr(p),Kr(p),Wr(p),jr(p),Zr(p),ta(p),ea(p),na(p),oa(p),ra(p),aa(p),sa(p),ca(p),da(p),pa(p),ua(p),ma(p),ga(p),la(p),fa(p);}},dp=ka;module.exports=dp;
|