@burdenoff/cli-sdk 2026.1102.1 → 2026.1102.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-O6UCQ5IT.js +1 -0
- package/dist/{chunk-AYNNSLCL.js → chunk-ZGT7IIOP.js} +409 -418
- package/dist/modules/adaptercloud/index.cjs +4 -4
- package/dist/modules/adaptercloud/index.js +2 -2
- package/dist/modules/artistrybase/index.js +2 -2
- package/dist/modules/assethandler/index.cjs +2 -2
- package/dist/modules/assethandler/index.js +2 -2
- package/dist/modules/atheletebridge/index.cjs +8 -8
- package/dist/modules/atheletebridge/index.js +2 -2
- package/dist/modules/auth/index.cjs +37 -37
- package/dist/modules/auth/index.js +33 -29
- package/dist/modules/billing/index.cjs +1 -1
- package/dist/modules/billing/index.js +2 -2
- package/dist/modules/brainyrich/index.cjs +44 -28
- package/dist/modules/brainyrich/index.js +47 -31
- package/dist/modules/buildmyiq/index.js +2 -2
- package/dist/modules/channels/index.cjs +3 -3
- package/dist/modules/channels/index.js +2 -2
- package/dist/modules/collabkin/index.cjs +4 -4
- package/dist/modules/collabkin/index.js +2 -2
- package/dist/modules/comradecircle/index.cjs +6 -6
- package/dist/modules/comradecircle/index.js +2 -2
- package/dist/modules/conversations/index.cjs +7 -7
- package/dist/modules/conversations/index.js +2 -2
- package/dist/modules/coolandlovely/index.cjs +2 -2
- package/dist/modules/coolandlovely/index.js +2 -2
- package/dist/modules/cosmicintersection/index.cjs +6 -6
- package/dist/modules/cosmicintersection/index.js +2 -2
- package/dist/modules/crewfoundry/index.js +2 -2
- package/dist/modules/devportal/index.cjs +2 -2
- package/dist/modules/devportal/index.js +2 -2
- package/dist/modules/ecoimpacthub/index.cjs +5 -5
- package/dist/modules/ecoimpacthub/index.js +2 -2
- package/dist/modules/eventfullymanaged/index.cjs +12 -12
- package/dist/modules/eventfullymanaged/index.js +2 -2
- package/dist/modules/export/index.cjs +4 -4
- package/dist/modules/export/index.js +2 -2
- package/dist/modules/files/index.cjs +3 -3
- package/dist/modules/files/index.js +4 -4
- package/dist/modules/fluidgrids/index.cjs +16 -16
- package/dist/modules/fluidgrids/index.js +3 -3
- package/dist/modules/ggnomad/index.cjs +4 -4
- package/dist/modules/ggnomad/index.js +2 -2
- package/dist/modules/govcitizenhub/index.cjs +4 -4
- package/dist/modules/govcitizenhub/index.js +2 -2
- package/dist/modules/groups/index.cjs +4 -4
- package/dist/modules/groups/index.js +2 -2
- package/dist/modules/headshotmarketing/index.js +2 -2
- package/dist/modules/hookmovies/index.cjs +6 -6
- package/dist/modules/hookmovies/index.js +2 -2
- package/dist/modules/housingvista/index.cjs +3 -3
- package/dist/modules/housingvista/index.js +2 -2
- package/dist/modules/integrations/index.cjs +5 -5
- package/dist/modules/integrations/index.js +2 -2
- package/dist/modules/intelwatchtower/index.cjs +5 -5
- package/dist/modules/intelwatchtower/index.js +2 -2
- package/dist/modules/kadaikodi/index.cjs +2 -2
- package/dist/modules/kadaikodi/index.js +2 -2
- package/dist/modules/labsofscience/index.cjs +3 -3
- package/dist/modules/labsofscience/index.js +2 -2
- package/dist/modules/manufacturedops/index.cjs +2 -2
- package/dist/modules/manufacturedops/index.js +2 -2
- package/dist/modules/movethewheels/index.js +2 -2
- package/dist/modules/notifications/index.cjs +2 -2
- package/dist/modules/notifications/index.js +2 -2
- package/dist/modules/organizations/index.js +2 -2
- package/dist/modules/planmagnet/index.js +2 -2
- package/dist/modules/products/index.cjs +4 -4
- package/dist/modules/products/index.js +2 -2
- package/dist/modules/proserviceworld/index.cjs +2 -2
- package/dist/modules/proserviceworld/index.js +2 -2
- package/dist/modules/rbac/index.js +2 -2
- package/dist/modules/sandbox/index.cjs +17 -17
- package/dist/modules/sandbox/index.js +1 -1
- package/dist/modules/scheduler/index.cjs +2 -2
- package/dist/modules/scheduler/index.js +2 -2
- package/dist/modules/security/index.cjs +3 -3
- package/dist/modules/security/index.js +2 -2
- package/dist/modules/semanticfed/index.cjs +3 -3
- package/dist/modules/semanticfed/index.js +2 -2
- package/dist/modules/store/index.cjs +3 -3
- package/dist/modules/store/index.js +2 -2
- package/dist/modules/subscriberbot/index.cjs +1 -1
- package/dist/modules/subscriberbot/index.js +2 -2
- package/dist/modules/support/index.cjs +2 -2
- package/dist/modules/support/index.js +2 -2
- package/dist/modules/tags/index.js +2 -2
- package/dist/modules/technospam/index.cjs +2 -2
- package/dist/modules/technospam/index.js +2 -2
- package/dist/modules/theculturepost/index.js +2 -2
- package/dist/modules/theglobalfuel/index.cjs +2 -2
- package/dist/modules/theglobalfuel/index.js +2 -2
- package/dist/modules/timecampus/index.js +2 -2
- package/dist/modules/tours/index.cjs +2 -2
- package/dist/modules/tours/index.js +2 -2
- package/dist/modules/vibecontrols/index.cjs +563 -567
- package/dist/modules/vibecontrols/index.js +5 -4
- package/dist/modules/workspaces/index.cjs +4 -4
- package/dist/modules/workspaces/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-W4JZR7RJ.js +0 -1
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var
|
|
1
|
+
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var nt=["workspaceEndpoint","globalEndpoint","oidcIssuer","clientId","defaultFormat","verbose","authServiceEndpoint","productOrigin"];var m=class extends Error{exitCode;hint;constructor(i,n){super(i),this.name="CliUserError",this.exitCode=n?.exitCode??1,this.hint=n?.hint;}},x=class extends m{constructor(i,n){super(i,{exitCode:2,hint:n?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},w=class extends Error{cause;constructor(i,n){super(i),this.name="CliInternalError",this.cause=n;}};var ot=null;function gt(p){ot=p;}function E(){if(!ot)throw new w("vibecontrols module helpers used before setHelpersContext was called");return ot}function la(){let p=E();if(!p.auth.isAuthenticated())throw new x("Authentication required.",{hint:`Run \`${p.productName} auth login\` to authenticate.`})}async function r(p,i){return la(),E().gql.workspace.request(p,i)}function it(p){return /^(error|fail|failed|failure|timeout|cancel)/i.test(p.status)||p.exitCode!==null&&p.exitCode!==void 0&&p.exitCode!==0?true:p.webhookStatusCode!==null&&p.webhookStatusCode!==void 0&&p.webhookStatusCode>=400}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 lt(){return E().output}function c(p){E().output.printSuccess(p);}function T(p){E().output.printError(p);}function ft(p){E().output.printJson(p);}function b(p){return E().output.formatStatus(p)}function S(p){return E().output.formatDate(p)}function l(p,i){return E().output.truncate(p,i)}function f(p,i){return E().output.confirm(p,i)}function It(p,i){E().output.printTable(p,i);}function O(){return E().auth.read()}function W(){return E().config.read()}function St(p){return E().config.get(p)}function yt(p,i){E().config.set(p,i);}function Et(){return E().config.path()}var rt=nt;var $=`
|
|
2
2
|
id name hostname platform architecture version
|
|
3
|
-
tunnelUrl tunnelStatus
|
|
3
|
+
tunnelUrl tunnelStatus isActive lastHeartbeat
|
|
4
4
|
workspaceId createdAt updatedAt
|
|
5
5
|
`,h=`
|
|
6
|
-
id name description path type status
|
|
6
|
+
id name description path type status parentId
|
|
7
7
|
gitBranch gitRemote tags metadata
|
|
8
8
|
workspaceId archivedAt createdAt updatedAt
|
|
9
|
+
agents { id name }
|
|
9
10
|
`,A=`
|
|
10
11
|
id name command workingDirectory type status agentId vibeId
|
|
11
12
|
providerSessionName pid exitCode ttydUrl lastOutput autoStart
|
|
12
13
|
startedAt stoppedAt workspaceId createdAt updatedAt
|
|
13
|
-
`,
|
|
14
|
-
id title content isPinned vibeId createdBy
|
|
14
|
+
`,k=`
|
|
15
|
+
id title content isPinned visibility vibeId sessionId createdBy
|
|
15
16
|
workspaceId createdAt updatedAt
|
|
16
17
|
`,K=`
|
|
17
18
|
id key value scope scopeId isSecret
|
|
@@ -20,17 +21,17 @@
|
|
|
20
21
|
id name url events agentIds isActive signingKey retryPolicy
|
|
21
22
|
deliveryCount failureCount lastDelivery lastError
|
|
22
23
|
workspaceId createdAt updatedAt
|
|
23
|
-
`,
|
|
24
|
+
`,_=`
|
|
24
25
|
id userId state activeVibeId activeSessionId
|
|
25
26
|
recentVibes recentSessions workspaceId createdAt updatedAt
|
|
26
|
-
`,
|
|
27
|
+
`,C=`
|
|
27
28
|
id workspaceId slug name description
|
|
28
29
|
providerKey protocol localPort localHost tlsMode
|
|
29
30
|
status lastError agentId
|
|
30
31
|
hasBasicAuth
|
|
31
32
|
primaryDomain { id hostname type verificationStatus isPrimary }
|
|
32
33
|
createdAt updatedAt
|
|
33
|
-
`,
|
|
34
|
+
`,Tt=`
|
|
34
35
|
id key displayName description isEnabled
|
|
35
36
|
capabilities {
|
|
36
37
|
supportsHttp supportsHttps supportsTcp supportsUdp
|
|
@@ -39,82 +40,91 @@
|
|
|
39
40
|
supportsLiveLogs supportsUsageMetrics supportsRotateCredentials
|
|
40
41
|
supportedVisibilities platforms
|
|
41
42
|
}
|
|
42
|
-
`,
|
|
43
|
+
`,B=`
|
|
43
44
|
id workspaceId tunnelId type hostname environment
|
|
44
45
|
verificationStatus challengeRecordName challengeToken
|
|
45
46
|
verifiedAt lastCheckedAt lastCheckError isPrimary
|
|
46
47
|
dnsTargetHint createdAt updatedAt
|
|
47
|
-
`,
|
|
48
|
+
`,bt=`
|
|
48
49
|
id workspaceId tunnelId shardId agentId status
|
|
49
50
|
tokenFingerprint issuedAt expiresAt connectedAt disconnectedAt
|
|
50
51
|
revokedAt revokedReason clientIp bytesIn bytesOut
|
|
51
|
-
`,
|
|
52
|
+
`,U=`
|
|
52
53
|
id name type host port username status
|
|
53
54
|
workspaceId createdAt updatedAt
|
|
54
|
-
`,
|
|
55
|
-
id
|
|
55
|
+
`,at=`
|
|
56
|
+
id protocol status label permissions
|
|
57
|
+
sourceAgent { id name }
|
|
58
|
+
target { id name }
|
|
56
59
|
createdAt updatedAt
|
|
57
|
-
`,
|
|
60
|
+
`,N=`
|
|
58
61
|
id name description isDefault
|
|
59
62
|
workspaceId createdAt updatedAt
|
|
60
|
-
`,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
`,ht=`
|
|
64
|
+
buttonId actionType status agentId command output exitCode
|
|
65
|
+
webhookUrl webhookStatusCode executedAt
|
|
66
|
+
`,L=`
|
|
67
|
+
id vibeDeckId label icon actionId
|
|
68
|
+
action { id name actionType }
|
|
69
|
+
row column rowSpan colSpan color category tags
|
|
63
70
|
confirmationRequired keyboardShortcut style sortOrder
|
|
64
71
|
createdAt updatedAt
|
|
65
|
-
`,
|
|
72
|
+
`,j=`
|
|
66
73
|
id agentId source eventType payload
|
|
67
74
|
workspaceId createdAt
|
|
68
|
-
`,
|
|
75
|
+
`,P=`
|
|
69
76
|
id vibeId name visibility runtime
|
|
70
77
|
workspaceId createdAt updatedAt
|
|
71
|
-
`,
|
|
78
|
+
`,q=`
|
|
72
79
|
id siteId title slug content parentId sidebarPosition status
|
|
73
80
|
createdAt updatedAt
|
|
74
|
-
`,
|
|
81
|
+
`,Y=`
|
|
75
82
|
id siteId revisionNumber status buildDurationMs artifactSizeBytes
|
|
76
83
|
errorMessage publishedAt
|
|
77
84
|
createdAt updatedAt
|
|
78
|
-
`,
|
|
85
|
+
`,At=`
|
|
79
86
|
id action resourceType resourceId actorId actorType
|
|
80
87
|
status description ipAddress userAgent requestId
|
|
81
88
|
workspaceId createdAt
|
|
82
|
-
`,
|
|
83
|
-
id sessionId sharedWithId permission createdBy
|
|
84
|
-
createdAt
|
|
85
|
-
`,
|
|
89
|
+
`,J=`
|
|
90
|
+
id sessionId sharedWithId permission status message createdBy
|
|
91
|
+
createdAt expiresAt lastAccessAt accessCount revokedAt
|
|
92
|
+
`,st=`
|
|
93
|
+
id entityId entityType tagId source metadata assignedAt assignedBy validFrom validTo
|
|
94
|
+
tag { id name }
|
|
95
|
+
`,Ct=`
|
|
86
96
|
id sessionId token permission expiresAt
|
|
87
97
|
createdAt
|
|
88
|
-
`,
|
|
98
|
+
`,Dt=`
|
|
89
99
|
query VibecontrolsAgents($filter: VibecontrolsAgentFilterInput) {
|
|
90
|
-
vibecontrolsAgents(filter: $filter) { ${
|
|
100
|
+
vibecontrolsAgents(filter: $filter) { ${$} }
|
|
91
101
|
}
|
|
92
|
-
`,
|
|
102
|
+
`,wt=`
|
|
93
103
|
query VibecontrolsAgent($id: ID!) {
|
|
94
|
-
vibecontrolsAgent(id: $id) { ${
|
|
104
|
+
vibecontrolsAgent(id: $id) { ${$} }
|
|
95
105
|
}
|
|
96
|
-
`,
|
|
106
|
+
`,Ot=`
|
|
97
107
|
mutation UpdateVibecontrolsAgent($id: ID!, $input: UpdateVibecontrolsAgentInput!) {
|
|
98
|
-
updateVibecontrolsAgent(id: $id, input: $input) { ${
|
|
108
|
+
updateVibecontrolsAgent(id: $id, input: $input) { ${$} }
|
|
99
109
|
}
|
|
100
|
-
|
|
110
|
+
`,$t=`
|
|
101
111
|
mutation DeleteVibecontrolsAgent($id: ID!) { deleteVibecontrolsAgent(id: $id) }
|
|
102
|
-
`,
|
|
112
|
+
`,kt=`
|
|
103
113
|
mutation VibecontrolsAgentHeartbeat($id: ID!) {
|
|
104
114
|
vibecontrolsAgentHeartbeat(id: $id) { id isActive lastHeartbeat }
|
|
105
115
|
}
|
|
106
|
-
|
|
116
|
+
`,vt=`
|
|
107
117
|
query ProbeAgentConnection($id: ID!) {
|
|
108
118
|
probeAgentConnection(id: $id) {
|
|
109
119
|
healthOk healthStatus agentVersion hostname platform architecture uptime
|
|
110
120
|
healthError identityOk identityError
|
|
111
121
|
}
|
|
112
122
|
}
|
|
113
|
-
`,
|
|
123
|
+
`,_t=`
|
|
114
124
|
query { vibecontrolsAgentHealthProbes {
|
|
115
125
|
agentId agentName healthy tunnelUrl agentVersion uptime errorMessage
|
|
116
126
|
}}
|
|
117
|
-
`,
|
|
127
|
+
`,Nt=`
|
|
118
128
|
query AgentPlugins($agentId: ID!) {
|
|
119
129
|
agentPlugins(agentId: $agentId) {
|
|
120
130
|
installed { pluginName packageName version loaded isCore tags }
|
|
@@ -122,423 +132,466 @@
|
|
|
122
132
|
error
|
|
123
133
|
}
|
|
124
134
|
}
|
|
125
|
-
`,
|
|
135
|
+
`,Rt=`
|
|
126
136
|
mutation InstallAgentPlugin($agentId: ID!, $packageName: String!) {
|
|
127
137
|
installAgentPlugin(agentId: $agentId, packageName: $packageName) { success error }
|
|
128
138
|
}
|
|
129
|
-
`,
|
|
139
|
+
`,xt=`
|
|
130
140
|
mutation RemoveAgentPlugin($agentId: ID!, $packageName: String!) {
|
|
131
141
|
removeAgentPlugin(agentId: $agentId, packageName: $packageName) { success error }
|
|
132
142
|
}
|
|
133
|
-
`,
|
|
143
|
+
`,ct=`
|
|
134
144
|
mutation RegisterVibecontrolsAgent($input: CreateVibecontrolsAgentInput!) {
|
|
135
|
-
registerVibecontrolsAgent(input: $input) { ${
|
|
145
|
+
registerVibecontrolsAgent(input: $input) { ${$} }
|
|
136
146
|
}
|
|
137
|
-
`,
|
|
147
|
+
`,Ut=`
|
|
138
148
|
mutation DeactivateVibecontrolsAgent($id: ID!) {
|
|
139
|
-
deactivateVibecontrolsAgent(id: $id) { ${
|
|
149
|
+
deactivateVibecontrolsAgent(id: $id) { ${$} }
|
|
140
150
|
}
|
|
141
|
-
`,
|
|
151
|
+
`,Lt=`
|
|
142
152
|
mutation PushAgentGatewayAuth($input: PushAgentGatewayAuthInput!) {
|
|
143
|
-
pushAgentGatewayAuth(input: $input)
|
|
153
|
+
pushAgentGatewayAuth(input: $input) { error success }
|
|
144
154
|
}
|
|
145
|
-
`,
|
|
155
|
+
`,Pt=`
|
|
146
156
|
mutation SetupAgentGatewayAuth($input: SetupAgentGatewayAuthInput!) {
|
|
147
|
-
setupAgentGatewayAuth(input: $input)
|
|
157
|
+
setupAgentGatewayAuth(input: $input) {
|
|
158
|
+
appId clientId clientSecret devportalApplicationId error success
|
|
159
|
+
}
|
|
148
160
|
}
|
|
149
|
-
`,
|
|
161
|
+
`,Vt=`
|
|
150
162
|
mutation UpdateAgentVersion($agentId: ID!, $version: String!) {
|
|
151
|
-
updateAgentVersion(agentId: $agentId, version: $version) { ${
|
|
163
|
+
updateAgentVersion(agentId: $agentId, version: $version) { ${$} }
|
|
152
164
|
}
|
|
153
|
-
`,
|
|
154
|
-
mutation ConnectAgentToTarget($sourceAgentId: ID!, $targetId: ID!, $protocol:
|
|
155
|
-
connectAgentToTarget(sourceAgentId: $sourceAgentId, targetId: $targetId, protocol: $protocol) {
|
|
165
|
+
`,Gt=`
|
|
166
|
+
mutation ConnectAgentToTarget($sourceAgentId: ID!, $targetId: ID!, $protocol: TargetType!) {
|
|
167
|
+
connectAgentToTarget(sourceAgentId: $sourceAgentId, targetId: $targetId, protocol: $protocol) {
|
|
168
|
+
${at}
|
|
169
|
+
}
|
|
156
170
|
}
|
|
157
|
-
`,
|
|
171
|
+
`,Bt=`
|
|
158
172
|
mutation DisconnectAgentFromTarget($connectionId: ID!) {
|
|
159
173
|
disconnectAgentFromTarget(connectionId: $connectionId)
|
|
160
174
|
}
|
|
161
|
-
`,
|
|
175
|
+
`,qt=`
|
|
162
176
|
query AgentGraph($workspaceId: ID!, $rootAgentId: ID) {
|
|
163
177
|
agentGraph(workspaceId: $workspaceId, rootAgentId: $rootAgentId) {
|
|
164
|
-
|
|
165
|
-
|
|
178
|
+
connections { ${at} }
|
|
179
|
+
targets { ${U} }
|
|
166
180
|
}
|
|
167
181
|
}
|
|
168
|
-
`,
|
|
182
|
+
`,Ft=`
|
|
169
183
|
query Vibes($filter: VibeFilterInput, $pagination: PaginationInput) {
|
|
170
184
|
vibes(filter: $filter, pagination: $pagination) {
|
|
171
185
|
items { ${h} } total hasMore
|
|
172
186
|
}
|
|
173
187
|
}
|
|
174
|
-
`,
|
|
188
|
+
`,Mt=`
|
|
175
189
|
query Vibe($id: ID!) { vibe(id: $id) { ${h} } }
|
|
176
|
-
`,
|
|
190
|
+
`,Ht=`
|
|
177
191
|
mutation CreateVibe($input: CreateVibeInput!) {
|
|
178
192
|
createVibe(input: $input) { ${h} }
|
|
179
193
|
}
|
|
180
|
-
`,
|
|
194
|
+
`,Wt=`
|
|
181
195
|
mutation UpdateVibe($id: ID!, $input: UpdateVibeInput!) {
|
|
182
196
|
updateVibe(id: $id, input: $input) { ${h} }
|
|
183
197
|
}
|
|
184
|
-
`,
|
|
198
|
+
`,Kt="mutation DeleteVibe($id: ID!) { deleteVibe(id: $id) }",jt=`
|
|
185
199
|
mutation ArchiveVibe($id: ID!) { archiveVibe(id: $id) { ${h} } }
|
|
186
|
-
`,
|
|
200
|
+
`,Yt=`
|
|
187
201
|
mutation RestoreVibe($id: ID!) { restoreVibe(id: $id) { ${h} } }
|
|
188
|
-
`,
|
|
202
|
+
`,Jt=`
|
|
189
203
|
query VibeHierarchy($rootId: ID) {
|
|
190
204
|
vibeHierarchy(rootId: $rootId) { ${h} }
|
|
191
205
|
}
|
|
192
|
-
`,
|
|
193
|
-
|
|
194
|
-
|
|
206
|
+
`,Xt=`
|
|
207
|
+
mutation AttachAgentToVibe($input: AttachAgentToVibeInput!) {
|
|
208
|
+
attachAgentToVibe(input: $input) { id vibeId agentId addedAt }
|
|
209
|
+
}
|
|
210
|
+
`,zt=`
|
|
211
|
+
query SearchVibes($query: String!, $pagination: PaginationInput) {
|
|
212
|
+
searchVibes(query: $query, pagination: $pagination) { items { ${h} } total hasMore }
|
|
195
213
|
}
|
|
196
|
-
`,
|
|
214
|
+
`,Qt=`
|
|
197
215
|
mutation MoveVibe($id: ID!, $newParentId: ID) {
|
|
198
216
|
moveVibe(id: $id, newParentId: $newParentId) { ${h} }
|
|
199
217
|
}
|
|
200
|
-
`,
|
|
218
|
+
`,Zt=`
|
|
201
219
|
mutation UpdateVibeStatus($id: ID!, $status: VibeStatus!) {
|
|
202
220
|
updateVibeStatus(id: $id, status: $status) { ${h} }
|
|
203
221
|
}
|
|
204
|
-
`,
|
|
222
|
+
`,te=`
|
|
205
223
|
mutation UpdateVibeGit($id: ID!, $gitBranch: String, $gitRemote: String, $gitStatus: JSON) {
|
|
206
224
|
updateVibeGit(id: $id, gitBranch: $gitBranch, gitRemote: $gitRemote, gitStatus: $gitStatus) { ${h} }
|
|
207
225
|
}
|
|
208
|
-
`,
|
|
226
|
+
`,ee=`
|
|
209
227
|
query Sessions($filter: SessionFilterInput, $pagination: PaginationInput) {
|
|
210
228
|
sessions(filter: $filter, pagination: $pagination) {
|
|
211
229
|
items { ${A} } total hasMore
|
|
212
230
|
}
|
|
213
231
|
}
|
|
214
|
-
`,
|
|
232
|
+
`,ne=`
|
|
215
233
|
query Session($id: ID!) { session(id: $id) { ${A} } }
|
|
216
|
-
`,
|
|
234
|
+
`,oe=`
|
|
217
235
|
mutation CreateSession($input: CreateSessionInput!) {
|
|
218
236
|
createSession(input: $input) { ${A} }
|
|
219
237
|
}
|
|
220
|
-
`,
|
|
238
|
+
`,ie=`
|
|
221
239
|
mutation StartSession($id: ID!) { startSession(id: $id) { ${A} } }
|
|
222
|
-
`,
|
|
240
|
+
`,re=`
|
|
223
241
|
mutation StopSession($id: ID!) { stopSession(id: $id) { ${A} } }
|
|
224
|
-
`,
|
|
242
|
+
`,ae=`
|
|
225
243
|
mutation RestartSession($id: ID!) { restartSession(id: $id) { ${A} } }
|
|
226
|
-
`,
|
|
244
|
+
`,se=`
|
|
227
245
|
mutation TerminateSession($id: ID!) { terminateSession(id: $id) }
|
|
228
|
-
`,
|
|
246
|
+
`,ce=`
|
|
229
247
|
query SessionOutput($id: ID!, $lines: Int) { sessionOutput(id: $id, lines: $lines) }
|
|
230
|
-
`,
|
|
248
|
+
`,de=`
|
|
231
249
|
mutation SendSessionInput($id: ID!, $input: String!) {
|
|
232
250
|
sendSessionInput(id: $id, input: $input)
|
|
233
251
|
}
|
|
234
|
-
`,
|
|
252
|
+
`,pe=`
|
|
235
253
|
mutation StartSessionTerminal($id: ID!) {
|
|
236
254
|
startSessionTerminal(id: $id) { ${A} }
|
|
237
255
|
}
|
|
238
|
-
`,
|
|
256
|
+
`,ue=`
|
|
239
257
|
mutation StopSessionTerminal($id: ID!) {
|
|
240
258
|
stopSessionTerminal(id: $id) { ${A} }
|
|
241
259
|
}
|
|
242
|
-
`,
|
|
260
|
+
`,me=`
|
|
243
261
|
mutation RestartSessionTerminal($id: ID!) {
|
|
244
262
|
restartSessionTerminal(id: $id) { ${A} }
|
|
245
263
|
}
|
|
246
|
-
`,
|
|
247
|
-
query ActiveSessions($vibeId: ID) {
|
|
248
|
-
activeSessions(vibeId: $vibeId
|
|
264
|
+
`,ge=`
|
|
265
|
+
query ActiveSessions($vibeId: ID, $pagination: PaginationInput) {
|
|
266
|
+
activeSessions(vibeId: $vibeId, pagination: $pagination) {
|
|
267
|
+
items { ${A} }
|
|
268
|
+
total hasMore
|
|
269
|
+
}
|
|
249
270
|
}
|
|
250
|
-
`,
|
|
271
|
+
`,le=`
|
|
251
272
|
mutation CheckSessionHealth {
|
|
252
273
|
checkSessionHealth { checked updated errors }
|
|
253
274
|
}
|
|
254
|
-
`,
|
|
275
|
+
`,fe=`
|
|
255
276
|
mutation ShareSession($input: ShareSessionInput!) {
|
|
256
|
-
shareSession(input: $input) { ${
|
|
277
|
+
shareSession(input: $input) { ${J} }
|
|
257
278
|
}
|
|
258
|
-
`,
|
|
259
|
-
mutation CreateSessionShareLink($input:
|
|
260
|
-
createSessionShareLink(input: $input) { ${
|
|
279
|
+
`,Ie=`
|
|
280
|
+
mutation CreateSessionShareLink($input: CreateShareLinkInput!) {
|
|
281
|
+
createSessionShareLink(input: $input) { ${Ct} }
|
|
261
282
|
}
|
|
262
|
-
`,
|
|
263
|
-
mutation RevokeSessionShare($id: ID!) {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
283
|
+
`,Se=`
|
|
284
|
+
mutation RevokeSessionShare($id: ID!) {
|
|
285
|
+
revokeSessionShare(id: $id) {
|
|
286
|
+
id accessCount createdAt createdBy expiresAt lastAccessAt message permission revokedAt
|
|
287
|
+
revokedBy sessionId sharedWithId status
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
`,ye=`
|
|
291
|
+
mutation RevokeSessionShareLink($id: ID!) {
|
|
292
|
+
revokeSessionShareLink(id: $id) {
|
|
293
|
+
id createdAt createdBy expiresAt hasPassword lastUsedAt maxUses name permission
|
|
294
|
+
sessionId shareUrl status token useCount
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
`,Ee=`
|
|
267
298
|
mutation UpdateSessionShare($id: ID!, $input: UpdateSessionShareInput!) {
|
|
268
|
-
updateSessionShare(id: $id, input: $input) { ${
|
|
299
|
+
updateSessionShare(id: $id, input: $input) { ${J} }
|
|
269
300
|
}
|
|
270
|
-
`,
|
|
271
|
-
mutation JoinSharedSession($input:
|
|
272
|
-
joinSharedSession(input: $input)
|
|
301
|
+
`,Te=`
|
|
302
|
+
mutation JoinSharedSession($input: JoinSessionInput!) {
|
|
303
|
+
joinSharedSession(input: $input) {
|
|
304
|
+
avatarUrl hasControl id joinedAt lastActiveAt role sessionId userId username
|
|
305
|
+
}
|
|
273
306
|
}
|
|
274
|
-
`,
|
|
307
|
+
`,be=`
|
|
275
308
|
mutation LeaveSharedSession($sessionId: ID!) { leaveSharedSession(sessionId: $sessionId) }
|
|
276
|
-
`,
|
|
309
|
+
`,he=`
|
|
277
310
|
mutation RequestSessionControl($sessionId: ID!) { requestSessionControl(sessionId: $sessionId) }
|
|
278
|
-
`,
|
|
311
|
+
`,Ae=`
|
|
279
312
|
mutation ReleaseSessionControl($sessionId: ID!) { releaseSessionControl(sessionId: $sessionId) }
|
|
280
|
-
`,
|
|
313
|
+
`,Ce=`
|
|
281
314
|
mutation TransferSessionControl($sessionId: ID!, $toUserId: ID!) {
|
|
282
315
|
transferSessionControl(sessionId: $sessionId, toUserId: $toUserId)
|
|
283
316
|
}
|
|
284
|
-
`,
|
|
317
|
+
`,De=`
|
|
285
318
|
query SessionShares($sessionId: ID!) {
|
|
286
|
-
sessionShares(sessionId: $sessionId) { ${
|
|
319
|
+
sessionShares(sessionId: $sessionId) { ${J} }
|
|
287
320
|
}
|
|
288
|
-
`,
|
|
321
|
+
`,we=`
|
|
289
322
|
query SessionShareLinks($sessionId: ID!) {
|
|
290
|
-
sessionShareLinks(sessionId: $sessionId) { ${
|
|
323
|
+
sessionShareLinks(sessionId: $sessionId) { ${Ct} }
|
|
291
324
|
}
|
|
292
|
-
`,
|
|
325
|
+
`,Oe=`
|
|
293
326
|
query SessionCollaborators($sessionId: ID!) {
|
|
294
327
|
sessionCollaborators(sessionId: $sessionId) { userId hasControl joinedAt }
|
|
295
328
|
}
|
|
296
|
-
|
|
297
|
-
query SessionsSharedWithMe($filter:
|
|
298
|
-
sessionsSharedWithMe(filter: $filter, pagination: $pagination) {
|
|
329
|
+
`,$e=`
|
|
330
|
+
query SessionsSharedWithMe($filter: SharedWithMeFilterInput, $pagination: PaginationInput) {
|
|
331
|
+
sessionsSharedWithMe(filter: $filter, pagination: $pagination) {
|
|
332
|
+
edges { node { ${J} } }
|
|
333
|
+
pageInfo { hasNextPage endCursor }
|
|
334
|
+
totalCount
|
|
335
|
+
}
|
|
299
336
|
}
|
|
300
|
-
`,
|
|
337
|
+
`,ke=`
|
|
301
338
|
mutation BulkRestartSessions($ids: [ID!]!) {
|
|
302
339
|
bulkRestartSessions(ids: $ids) { succeeded failed }
|
|
303
340
|
}
|
|
304
|
-
`,
|
|
341
|
+
`,ve=`
|
|
305
342
|
mutation BulkStopSessions($ids: [ID!]!) {
|
|
306
343
|
bulkStopSessions(ids: $ids) { succeeded failed }
|
|
307
344
|
}
|
|
308
|
-
|
|
345
|
+
`,_e=`
|
|
309
346
|
mutation BulkTerminateSessions($ids: [ID!]!) {
|
|
310
347
|
bulkTerminateSessions(ids: $ids) { succeeded failed }
|
|
311
348
|
}
|
|
312
|
-
`,
|
|
349
|
+
`,Ne=`
|
|
313
350
|
query Notes($filter: VibecontrolsNoteFilterInput, $pagination: PaginationInput) {
|
|
314
351
|
notes(filter: $filter, pagination: $pagination) {
|
|
315
|
-
items { ${
|
|
352
|
+
items { ${k} } total hasMore
|
|
316
353
|
}
|
|
317
354
|
}
|
|
318
|
-
`,
|
|
319
|
-
query Note($id: ID!) { note(id: $id) { ${
|
|
320
|
-
`,
|
|
355
|
+
`,Re=`
|
|
356
|
+
query Note($id: ID!) { note(id: $id) { ${k} } }
|
|
357
|
+
`,xe=`
|
|
321
358
|
mutation CreateNote($input: CreateVibecontrolsNoteInput!) {
|
|
322
|
-
createNote(input: $input) { ${
|
|
359
|
+
createNote(input: $input) { ${k} }
|
|
323
360
|
}
|
|
324
|
-
`,
|
|
361
|
+
`,Ue=`
|
|
325
362
|
mutation UpdateNote($id: ID!, $input: UpdateVibecontrolsNoteInput!) {
|
|
326
|
-
updateNote(id: $id, input: $input) { ${
|
|
363
|
+
updateNote(id: $id, input: $input) { ${k} }
|
|
327
364
|
}
|
|
328
|
-
`,
|
|
329
|
-
query SearchNotes($query: String!, $vibeId: ID, $
|
|
330
|
-
searchNotes(query: $query, vibeId: $vibeId,
|
|
365
|
+
`,Le="mutation DeleteNote($id: ID!) { deleteNote(id: $id) }",Pe=`
|
|
366
|
+
query SearchNotes($query: String!, $vibeId: ID, $pagination: PaginationInput) {
|
|
367
|
+
searchNotes(query: $query, vibeId: $vibeId, pagination: $pagination) {
|
|
368
|
+
items { ${k} }
|
|
369
|
+
total hasMore
|
|
370
|
+
}
|
|
331
371
|
}
|
|
332
|
-
`,
|
|
333
|
-
mutation PinNote($id: ID!) { pinNote(id: $id) { ${
|
|
334
|
-
`,
|
|
335
|
-
mutation UnpinNote($id: ID!) { unpinNote(id: $id) { ${
|
|
336
|
-
`,
|
|
372
|
+
`,Ve=`
|
|
373
|
+
mutation PinNote($id: ID!) { pinNote(id: $id) { ${k} } }
|
|
374
|
+
`,Ge=`
|
|
375
|
+
mutation UnpinNote($id: ID!) { unpinNote(id: $id) { ${k} } }
|
|
376
|
+
`,Be=`
|
|
337
377
|
mutation TagNote($input: TagNoteInput!) {
|
|
338
|
-
tagNote(input: $input) { ${
|
|
378
|
+
tagNote(input: $input) { ${st} }
|
|
339
379
|
}
|
|
340
|
-
`,
|
|
380
|
+
`,qe=`
|
|
341
381
|
mutation UntagNote($input: UntagNoteInput!) {
|
|
342
|
-
untagNote(input: $input)
|
|
382
|
+
untagNote(input: $input)
|
|
343
383
|
}
|
|
344
|
-
`,
|
|
384
|
+
`,Fe=`
|
|
345
385
|
mutation ReplaceNoteTags($input: ReplaceNoteTagsInput!) {
|
|
346
|
-
replaceNoteTags(input: $input) { ${
|
|
386
|
+
replaceNoteTags(input: $input) { ${st} }
|
|
347
387
|
}
|
|
348
|
-
`,
|
|
388
|
+
`,Me=`
|
|
349
389
|
mutation CreateNoteTag($input: CreateNoteTagInput!) {
|
|
350
|
-
createNoteTag(input: $input) { id
|
|
390
|
+
createNoteTag(input: $input) { id key label color }
|
|
351
391
|
}
|
|
352
|
-
`,
|
|
392
|
+
`,He=`
|
|
353
393
|
query AvailableNoteTags($query: String, $limit: Int) {
|
|
354
|
-
availableNoteTags(query: $query, limit: $limit) { id
|
|
394
|
+
availableNoteTags(query: $query, limit: $limit) { id key label color }
|
|
355
395
|
}
|
|
356
|
-
`,
|
|
357
|
-
query GetNoteTags($
|
|
358
|
-
|
|
396
|
+
`,We=`
|
|
397
|
+
query GetNoteTags($input: GetNoteTagsInput!) {
|
|
398
|
+
getNoteTags(input: $input) { ${st} }
|
|
399
|
+
}
|
|
400
|
+
`,Ke=`
|
|
359
401
|
query GetRelatedNoteTags($noteId: ID!, $limit: Int) {
|
|
360
402
|
getRelatedNoteTags(noteId: $noteId, limit: $limit) { id name }
|
|
361
403
|
}
|
|
362
|
-
`,
|
|
404
|
+
`,je=`
|
|
363
405
|
mutation BulkDeleteNotes($ids: [ID!]!) { bulkDeleteNotes(ids: $ids) }
|
|
364
|
-
`,
|
|
406
|
+
`,Ye=`
|
|
365
407
|
query ConfigurationsByScope($scope: ConfigScope!, $scopeId: ID) {
|
|
366
|
-
configurationsByScope(scope: $scope, scopeId: $scopeId) {
|
|
408
|
+
configurationsByScope(scope: $scope, scopeId: $scopeId) {
|
|
409
|
+
items { ${K} }
|
|
410
|
+
total hasMore
|
|
411
|
+
}
|
|
367
412
|
}
|
|
368
|
-
`,
|
|
413
|
+
`,Je=`
|
|
369
414
|
query Configuration($key: String!, $scope: ConfigScope!, $scopeId: ID) {
|
|
370
415
|
configuration(key: $key, scope: $scope, scopeId: $scopeId) { ${K} }
|
|
371
416
|
}
|
|
372
|
-
`,
|
|
417
|
+
`,Xe=`
|
|
373
418
|
query ConfigurationValue($key: String!, $scope: ConfigScope!, $scopeId: ID) {
|
|
374
419
|
configurationValue(key: $key, scope: $scope, scopeId: $scopeId)
|
|
375
420
|
}
|
|
376
|
-
`,
|
|
421
|
+
`,ze=`
|
|
377
422
|
mutation SetConfiguration($key: String!, $scope: ConfigScope!, $scopeId: ID, $value: JSON!, $isSecret: Boolean) {
|
|
378
423
|
setConfiguration(key: $key, scope: $scope, scopeId: $scopeId, value: $value, isSecret: $isSecret) { ${K} }
|
|
379
424
|
}
|
|
380
|
-
`,
|
|
425
|
+
`,Qe=`
|
|
381
426
|
mutation DeleteConfiguration($key: String!, $scope: ConfigScope!, $scopeId: ID) {
|
|
382
427
|
deleteConfiguration(key: $key, scope: $scope, scopeId: $scopeId)
|
|
383
428
|
}
|
|
384
|
-
`,
|
|
385
|
-
mutation BulkSetConfigurations(
|
|
386
|
-
|
|
429
|
+
`,Ze=`
|
|
430
|
+
mutation BulkSetConfigurations(
|
|
431
|
+
$configurations: [ConfigurationInput!]!
|
|
432
|
+
$scope: ConfigScope!
|
|
433
|
+
$scopeId: ID
|
|
434
|
+
) {
|
|
435
|
+
bulkSetConfigurations(configurations: $configurations, scope: $scope, scopeId: $scopeId) {
|
|
436
|
+
${K}
|
|
437
|
+
}
|
|
387
438
|
}
|
|
388
|
-
`,
|
|
439
|
+
`,tn=`
|
|
389
440
|
mutation BulkDeleteConfigurations($keys: [String!]!, $scope: ConfigScope!, $scopeId: ID) {
|
|
390
441
|
bulkDeleteConfigurations(keys: $keys, scope: $scope, scopeId: $scopeId)
|
|
391
442
|
}
|
|
392
|
-
`,
|
|
443
|
+
`,en=`
|
|
393
444
|
query Webhooks($filter: WebhookFilterInput, $pagination: PaginationInput) {
|
|
394
445
|
webhooks(filter: $filter, pagination: $pagination) {
|
|
395
446
|
items { ${v} } total hasMore
|
|
396
447
|
}
|
|
397
448
|
}
|
|
398
|
-
`,
|
|
449
|
+
`,nn=`
|
|
399
450
|
query Webhook($id: ID!) { webhook(id: $id) { ${v} } }
|
|
400
|
-
`,
|
|
451
|
+
`,on=`
|
|
401
452
|
mutation CreateWebhook($input: CreateWebhookInput!) {
|
|
402
453
|
createWebhook(input: $input) { ${v} }
|
|
403
454
|
}
|
|
404
|
-
`,
|
|
455
|
+
`,rn=`
|
|
405
456
|
mutation UpdateWebhook($id: ID!, $input: UpdateWebhookInput!) {
|
|
406
457
|
updateWebhook(id: $id, input: $input) { ${v} }
|
|
407
458
|
}
|
|
408
|
-
`,
|
|
459
|
+
`,an=`
|
|
409
460
|
mutation DeleteWebhook($id: ID!) { deleteWebhook(id: $id) }
|
|
410
|
-
`,
|
|
461
|
+
`,sn=`
|
|
411
462
|
mutation TestWebhook($id: ID!) { testWebhook(id: $id) }
|
|
412
|
-
`,
|
|
413
|
-
query
|
|
414
|
-
|
|
463
|
+
`,cn=`
|
|
464
|
+
query ActiveWebhooks {
|
|
465
|
+
activeWebhooks { items { ${v} } total hasMore }
|
|
466
|
+
}
|
|
467
|
+
`,dn=`
|
|
415
468
|
query WebhooksByEvent($event: String!) {
|
|
416
|
-
webhooksByEvent(event: $event) { ${v} }
|
|
469
|
+
webhooksByEvent(event: $event) { items { ${v} } total hasMore }
|
|
417
470
|
}
|
|
418
|
-
`,
|
|
419
|
-
mutation TriggerWebhook($id: ID!, $payload: JSON) {
|
|
471
|
+
`,pn=`
|
|
472
|
+
mutation TriggerWebhook($id: ID!, $payload: JSON!) {
|
|
420
473
|
triggerWebhook(id: $id, payload: $payload)
|
|
421
474
|
}
|
|
422
|
-
`,
|
|
475
|
+
`,un=`
|
|
423
476
|
mutation ResetWebhookFailures($id: ID!) {
|
|
424
477
|
resetWebhookFailures(id: $id) { ${v} }
|
|
425
478
|
}
|
|
426
|
-
`,
|
|
479
|
+
`,mn=`
|
|
427
480
|
query ListTunnels($filter: TunnelFilterInput, $pagination: PaginationInput) {
|
|
428
481
|
tunnels(filter: $filter, pagination: $pagination) {
|
|
429
|
-
items { ${
|
|
482
|
+
items { ${C} }
|
|
430
483
|
total
|
|
431
484
|
hasMore
|
|
432
485
|
}
|
|
433
486
|
}
|
|
434
|
-
`,
|
|
487
|
+
`,gn=`
|
|
435
488
|
query GetTunnel($id: ID!) {
|
|
436
|
-
tunnel(id: $id) { ${
|
|
489
|
+
tunnel(id: $id) { ${C} }
|
|
437
490
|
}
|
|
438
|
-
`,
|
|
491
|
+
`,ln=`
|
|
439
492
|
query ListTunnelProviders {
|
|
440
|
-
tunnelProviders { ${
|
|
493
|
+
tunnelProviders { ${Tt} }
|
|
441
494
|
}
|
|
442
|
-
`,
|
|
495
|
+
`,fn=`
|
|
443
496
|
mutation CreateTunnel($input: CreateTunnelInput!) {
|
|
444
|
-
createTunnel(input: $input) { ${
|
|
497
|
+
createTunnel(input: $input) { ${C} }
|
|
445
498
|
}
|
|
446
|
-
`,
|
|
499
|
+
`,In=`
|
|
447
500
|
mutation UpdateTunnel($id: ID!, $input: UpdateTunnelInput!) {
|
|
448
|
-
updateTunnel(id: $id, input: $input) { ${
|
|
501
|
+
updateTunnel(id: $id, input: $input) { ${C} }
|
|
449
502
|
}
|
|
450
|
-
`,
|
|
503
|
+
`,Sn=`
|
|
451
504
|
mutation DeleteTunnel($id: ID!) {
|
|
452
505
|
deleteTunnel(id: $id)
|
|
453
506
|
}
|
|
454
|
-
`,
|
|
507
|
+
`,yn=`
|
|
455
508
|
mutation StartTunnel($id: ID!) {
|
|
456
|
-
startTunnel(id: $id) { ${
|
|
509
|
+
startTunnel(id: $id) { ${C} }
|
|
457
510
|
}
|
|
458
|
-
`,
|
|
511
|
+
`,En=`
|
|
459
512
|
mutation StopTunnel($id: ID!) {
|
|
460
|
-
stopTunnel(id: $id) { ${
|
|
513
|
+
stopTunnel(id: $id) { ${C} }
|
|
461
514
|
}
|
|
462
|
-
`,
|
|
515
|
+
`,Tn=`
|
|
463
516
|
mutation RotateTunnelCredentials($id: ID!) {
|
|
464
|
-
rotateTunnelCredentials(id: $id) { ${
|
|
517
|
+
rotateTunnelCredentials(id: $id) { ${C} }
|
|
465
518
|
}
|
|
466
|
-
`,
|
|
519
|
+
`,bn=`
|
|
467
520
|
mutation IssueTunnelSession($tunnelId: ID!, $ttlSeconds: Int) {
|
|
468
521
|
issueTunnelSession(tunnelId: $tunnelId, ttlSeconds: $ttlSeconds) {
|
|
469
|
-
session { ${
|
|
522
|
+
session { ${bt} }
|
|
470
523
|
token
|
|
471
524
|
agentConfigHint
|
|
472
525
|
}
|
|
473
526
|
}
|
|
474
|
-
`,
|
|
527
|
+
`,hn=`
|
|
475
528
|
query ListTunnelSessions($tunnelId: ID!, $pagination: PaginationInput) {
|
|
476
529
|
tunnelSessions(tunnelId: $tunnelId, pagination: $pagination) {
|
|
477
|
-
items { ${
|
|
530
|
+
items { ${bt} }
|
|
478
531
|
total
|
|
479
532
|
hasMore
|
|
480
533
|
}
|
|
481
534
|
}
|
|
482
|
-
`,
|
|
535
|
+
`,An=`
|
|
483
536
|
mutation RevokeTunnelSession($sessionId: ID!, $reason: String) {
|
|
484
537
|
revokeTunnelSession(sessionId: $sessionId, reason: $reason)
|
|
485
538
|
}
|
|
486
|
-
`,
|
|
539
|
+
`,Cn=`
|
|
487
540
|
mutation ReserveTunnelSubdomain($input: ReserveTunnelSubdomainInput!) {
|
|
488
|
-
reserveTunnelSubdomain(input: $input) { ${
|
|
541
|
+
reserveTunnelSubdomain(input: $input) { ${B} }
|
|
489
542
|
}
|
|
490
|
-
`,
|
|
543
|
+
`,Dn=`
|
|
491
544
|
mutation RegisterCustomTunnelDomain($input: RegisterCustomDomainInput!) {
|
|
492
|
-
registerCustomTunnelDomain(input: $input) { ${
|
|
545
|
+
registerCustomTunnelDomain(input: $input) { ${B} }
|
|
493
546
|
}
|
|
494
|
-
`,
|
|
547
|
+
`,wn=`
|
|
495
548
|
mutation AttachTunnelDomain($tunnelId: ID!, $domainId: ID!, $makePrimary: Boolean) {
|
|
496
549
|
attachTunnelDomain(tunnelId: $tunnelId, domainId: $domainId, makePrimary: $makePrimary) {
|
|
497
|
-
${
|
|
550
|
+
${C}
|
|
498
551
|
}
|
|
499
552
|
}
|
|
500
|
-
`,
|
|
553
|
+
`,On=`
|
|
501
554
|
mutation DetachTunnelDomain($tunnelId: ID!, $domainId: ID!) {
|
|
502
|
-
detachTunnelDomain(tunnelId: $tunnelId, domainId: $domainId) { ${
|
|
555
|
+
detachTunnelDomain(tunnelId: $tunnelId, domainId: $domainId) { ${C} }
|
|
503
556
|
}
|
|
504
|
-
|
|
557
|
+
`,$n=`
|
|
505
558
|
mutation VerifyTunnelDomain($domainId: ID!) {
|
|
506
|
-
verifyTunnelDomain(domainId: $domainId) { ${
|
|
559
|
+
verifyTunnelDomain(domainId: $domainId) { ${B} }
|
|
507
560
|
}
|
|
508
|
-
`,
|
|
561
|
+
`,kn=`
|
|
509
562
|
query ListTunnelDomains($tunnelId: ID, $filter: TunnelDomainFilterInput, $pagination: PaginationInput) {
|
|
510
563
|
tunnelDomains(tunnelId: $tunnelId, filter: $filter, pagination: $pagination) {
|
|
511
|
-
items { ${
|
|
564
|
+
items { ${B} }
|
|
512
565
|
total
|
|
513
566
|
hasMore
|
|
514
567
|
}
|
|
515
568
|
}
|
|
516
|
-
`,
|
|
569
|
+
`,vn=`
|
|
517
570
|
query GetTunnelBySlug($slug: String!) {
|
|
518
|
-
tunnelBySlug(slug: $slug) { ${
|
|
571
|
+
tunnelBySlug(slug: $slug) { ${C} }
|
|
519
572
|
}
|
|
520
|
-
|
|
573
|
+
`,_n=`
|
|
521
574
|
query GetTunnelDomain($id: ID!) {
|
|
522
|
-
tunnelDomain(id: $id) { ${
|
|
575
|
+
tunnelDomain(id: $id) { ${B} }
|
|
523
576
|
}
|
|
524
|
-
`,
|
|
577
|
+
`,Nn=`
|
|
525
578
|
query GetTunnelProvider($key: TunnelProviderKey!) {
|
|
526
|
-
tunnelProvider(key: $key) { ${
|
|
579
|
+
tunnelProvider(key: $key) { ${Tt} }
|
|
527
580
|
}
|
|
528
|
-
`,
|
|
581
|
+
`,Rn=`
|
|
529
582
|
query ListTunnelShards($environment: TunnelEnvironment) {
|
|
530
583
|
tunnelShards(environment: $environment) {
|
|
531
584
|
id name providerId environment publicHost controlPort proxyPortRange
|
|
532
585
|
region status capacity currentLoad metadata createdAt updatedAt
|
|
533
586
|
}
|
|
534
587
|
}
|
|
535
|
-
`,
|
|
588
|
+
`,xn=`
|
|
536
589
|
query TunnelUsage($tunnelId: ID!, $from: DateTime!, $to: DateTime!) {
|
|
537
590
|
tunnelUsage(tunnelId: $tunnelId, from: $from, to: $to) {
|
|
538
591
|
tunnelId hourBucket bytesIn bytesOut connections requests
|
|
539
592
|
}
|
|
540
593
|
}
|
|
541
|
-
`,
|
|
594
|
+
`,Un=`
|
|
542
595
|
query TunnelAudit($tunnelId: ID!, $pagination: PaginationInput) {
|
|
543
596
|
tunnelAudit(tunnelId: $tunnelId, pagination: $pagination) {
|
|
544
597
|
items {
|
|
@@ -550,17 +603,18 @@
|
|
|
550
603
|
hasMore
|
|
551
604
|
}
|
|
552
605
|
}
|
|
553
|
-
`,
|
|
606
|
+
`,Ln=`
|
|
554
607
|
mutation DeleteTunnelDomain($domainId: ID!) {
|
|
555
608
|
deleteTunnelDomain(domainId: $domainId)
|
|
556
609
|
}
|
|
557
|
-
`,
|
|
610
|
+
`,Pn=`
|
|
558
611
|
query ProbeAgentTunnel($url: String!, $agentApiKey: String) {
|
|
559
612
|
probeAgentTunnel(url: $url, agentApiKey: $agentApiKey) {
|
|
560
|
-
|
|
613
|
+
agentVersion architecture healthError healthOk healthStatus hostname identityError
|
|
614
|
+
identityOk platform uptime
|
|
561
615
|
}
|
|
562
616
|
}
|
|
563
|
-
`,
|
|
617
|
+
`,Vn=`
|
|
564
618
|
mutation AddVibecontrolsAgentFromTunnel($input: AddAgentFromTunnelInput!) {
|
|
565
619
|
addVibecontrolsAgentFromTunnel(input: $input) {
|
|
566
620
|
success
|
|
@@ -571,129 +625,131 @@
|
|
|
571
625
|
agent { id name workspaceId isActive }
|
|
572
626
|
}
|
|
573
627
|
}
|
|
574
|
-
`,
|
|
575
|
-
query { uiSession { ${
|
|
576
|
-
`,
|
|
577
|
-
query UiSessionById($id: ID!) { uiSessionById(id: $id) { ${
|
|
578
|
-
`,
|
|
628
|
+
`,Gn=`
|
|
629
|
+
query { uiSession { ${_} } }
|
|
630
|
+
`,Bn=`
|
|
631
|
+
query UiSessionById($id: ID!) { uiSessionById(id: $id) { ${_} } }
|
|
632
|
+
`,qn=`
|
|
579
633
|
mutation { clearUISession }
|
|
580
|
-
`,
|
|
634
|
+
`,Fn=`
|
|
581
635
|
mutation UpdateActiveVibe($vibeId: ID!) {
|
|
582
|
-
updateActiveVibe(vibeId: $vibeId) { ${
|
|
636
|
+
updateActiveVibe(vibeId: $vibeId) { ${_} }
|
|
583
637
|
}
|
|
584
|
-
`,
|
|
638
|
+
`,Mn=`
|
|
585
639
|
mutation UpdateActiveSession($sessionId: ID!) {
|
|
586
|
-
updateActiveSession(sessionId: $sessionId) { ${
|
|
640
|
+
updateActiveSession(sessionId: $sessionId) { ${_} }
|
|
587
641
|
}
|
|
588
|
-
`,
|
|
642
|
+
`,Hn=`
|
|
589
643
|
mutation AddRecentVibe($vibeId: ID!) {
|
|
590
|
-
addRecentVibe(vibeId: $vibeId) { ${
|
|
644
|
+
addRecentVibe(vibeId: $vibeId) { ${_} }
|
|
591
645
|
}
|
|
592
|
-
`,
|
|
646
|
+
`,Wn=`
|
|
593
647
|
mutation AddRecentSession($sessionId: ID!) {
|
|
594
|
-
addRecentSession(sessionId: $sessionId) { ${
|
|
648
|
+
addRecentSession(sessionId: $sessionId) { ${_} }
|
|
595
649
|
}
|
|
596
|
-
`,
|
|
650
|
+
`,Kn=`
|
|
597
651
|
query Targets($workspaceId: ID!, $filter: TargetFilterInput, $limit: Int, $offset: Int) {
|
|
598
652
|
targets(workspaceId: $workspaceId, filter: $filter, limit: $limit, offset: $offset) {
|
|
599
|
-
items { ${
|
|
653
|
+
items { ${U} } total hasMore
|
|
600
654
|
}
|
|
601
655
|
}
|
|
602
|
-
`,
|
|
603
|
-
query Target($id: ID!) { target(id: $id) { ${
|
|
604
|
-
`,
|
|
656
|
+
`,jn=`
|
|
657
|
+
query Target($id: ID!) { target(id: $id) { ${U} } }
|
|
658
|
+
`,Yn=`
|
|
605
659
|
mutation CreateTarget($workspaceId: ID!, $input: CreateTargetInput!) {
|
|
606
|
-
createTarget(workspaceId: $workspaceId, input: $input) { ${
|
|
660
|
+
createTarget(workspaceId: $workspaceId, input: $input) { ${U} }
|
|
607
661
|
}
|
|
608
|
-
`,
|
|
662
|
+
`,Jn=`
|
|
609
663
|
mutation UpdateTarget($id: ID!, $input: UpdateTargetInput!) {
|
|
610
|
-
updateTarget(id: $id, input: $input) { ${
|
|
664
|
+
updateTarget(id: $id, input: $input) { ${U} }
|
|
611
665
|
}
|
|
612
|
-
`,
|
|
666
|
+
`,Xn=`
|
|
613
667
|
mutation DeleteTarget($id: ID!) { deleteTarget(id: $id) }
|
|
614
|
-
`,
|
|
668
|
+
`,zn=`
|
|
615
669
|
mutation TestTarget($id: ID!) {
|
|
616
|
-
testTarget(id: $id) { success
|
|
670
|
+
testTarget(id: $id) { success latencyMs }
|
|
617
671
|
}
|
|
618
|
-
`,
|
|
672
|
+
`,Qn=`
|
|
619
673
|
mutation ScanSSHConfig($agentId: ID!, $configPath: String) {
|
|
620
674
|
scanSSHConfig(agentId: $agentId, configPath: $configPath) {
|
|
621
675
|
configPath total hosts { name hostname port user identityFile proxyJump }
|
|
622
676
|
}
|
|
623
677
|
}
|
|
624
|
-
`,
|
|
678
|
+
`,Zn=`
|
|
625
679
|
mutation InstallAgentOnTarget($sourceAgentId: ID!, $targetId: ID!, $agentPort: Int) {
|
|
626
|
-
installAgentOnTarget(sourceAgentId: $sourceAgentId, targetId: $targetId, agentPort: $agentPort) {
|
|
680
|
+
installAgentOnTarget(sourceAgentId: $sourceAgentId, targetId: $targetId, agentPort: $agentPort) {
|
|
681
|
+
connectionId jobId status
|
|
682
|
+
}
|
|
627
683
|
}
|
|
628
|
-
`,
|
|
684
|
+
`,to=`
|
|
629
685
|
mutation UninstallAgentFromTarget($targetId: ID!) {
|
|
630
|
-
uninstallAgentFromTarget(targetId: $targetId)
|
|
686
|
+
uninstallAgentFromTarget(targetId: $targetId)
|
|
631
687
|
}
|
|
632
|
-
`,
|
|
688
|
+
`,eo=`
|
|
633
689
|
mutation StartTerminal($targetId: ID!, $shell: String) {
|
|
634
690
|
startTerminal(targetId: $targetId, shell: $shell) { sessionId ttydUrl }
|
|
635
691
|
}
|
|
636
|
-
`,
|
|
692
|
+
`,no=`
|
|
637
693
|
mutation StopTerminal($sessionId: ID!) { stopTerminal(sessionId: $sessionId) }
|
|
638
|
-
`,
|
|
694
|
+
`,oo=`
|
|
639
695
|
query VibeDecks($filter: VibeDeckFilterInput, $pagination: PaginationInput) {
|
|
640
696
|
vibeDecks(filter: $filter, pagination: $pagination) {
|
|
641
|
-
items { ${
|
|
697
|
+
items { ${N} } total hasMore
|
|
642
698
|
}
|
|
643
699
|
}
|
|
644
|
-
`,
|
|
645
|
-
query VibeDeck($id: ID!) { vibeDeck(id: $id) { ${
|
|
646
|
-
`,
|
|
647
|
-
query { defaultVibeDeck { ${
|
|
648
|
-
`,
|
|
700
|
+
`,io=`
|
|
701
|
+
query VibeDeck($id: ID!) { vibeDeck(id: $id) { ${N} } }
|
|
702
|
+
`,ro=`
|
|
703
|
+
query { defaultVibeDeck { ${N} } }
|
|
704
|
+
`,ao=`
|
|
649
705
|
mutation CreateVibeDeck($input: CreateVibeDeckInput!) {
|
|
650
|
-
createVibeDeck(input: $input) { ${
|
|
706
|
+
createVibeDeck(input: $input) { ${N} }
|
|
651
707
|
}
|
|
652
|
-
`,
|
|
708
|
+
`,so=`
|
|
653
709
|
mutation UpdateVibeDeck($id: ID!, $input: UpdateVibeDeckInput!) {
|
|
654
|
-
updateVibeDeck(id: $id, input: $input) { ${
|
|
710
|
+
updateVibeDeck(id: $id, input: $input) { ${N} }
|
|
655
711
|
}
|
|
656
|
-
`,
|
|
657
|
-
mutation DuplicateVibeDeck($id: ID!, $name: String) {
|
|
658
|
-
duplicateVibeDeck(id: $id, name: $name) { ${
|
|
712
|
+
`,co=`
|
|
713
|
+
mutation DuplicateVibeDeck($id: ID!, $name: String!) {
|
|
714
|
+
duplicateVibeDeck(id: $id, name: $name) { ${N} }
|
|
659
715
|
}
|
|
660
|
-
`,
|
|
716
|
+
`,po=`
|
|
661
717
|
mutation DeleteVibeDeck($id: ID!) { deleteVibeDeck(id: $id) }
|
|
662
|
-
`,
|
|
718
|
+
`,uo=`
|
|
663
719
|
mutation SetDefaultVibeDeck($id: ID!) {
|
|
664
|
-
setDefaultVibeDeck(id: $id) { ${
|
|
720
|
+
setDefaultVibeDeck(id: $id) { ${N} }
|
|
665
721
|
}
|
|
666
|
-
`,
|
|
722
|
+
`,mo=`
|
|
667
723
|
query VibeDeckButtons($filter: VibeDeckButtonFilterInput, $pagination: PaginationInput) {
|
|
668
724
|
vibeDeckButtons(filter: $filter, pagination: $pagination) {
|
|
669
|
-
items { ${
|
|
725
|
+
items { ${L} } total hasMore
|
|
670
726
|
}
|
|
671
727
|
}
|
|
672
|
-
`,
|
|
673
|
-
query VibeDeckButton($id: ID!) { vibeDeckButton(id: $id) { ${
|
|
674
|
-
`,
|
|
728
|
+
`,go=`
|
|
729
|
+
query VibeDeckButton($id: ID!) { vibeDeckButton(id: $id) { ${L} } }
|
|
730
|
+
`,lo=`
|
|
675
731
|
mutation CreateVibeDeckButton($input: CreateVibeDeckButtonInput!) {
|
|
676
|
-
createVibeDeckButton(input: $input) { ${
|
|
732
|
+
createVibeDeckButton(input: $input) { ${L} }
|
|
677
733
|
}
|
|
678
|
-
`,
|
|
734
|
+
`,fo=`
|
|
679
735
|
mutation UpdateVibeDeckButton($id: ID!, $input: UpdateVibeDeckButtonInput!) {
|
|
680
|
-
updateVibeDeckButton(id: $id, input: $input) { ${
|
|
736
|
+
updateVibeDeckButton(id: $id, input: $input) { ${L} }
|
|
681
737
|
}
|
|
682
|
-
`,
|
|
738
|
+
`,Io=`
|
|
683
739
|
mutation DeleteVibeDeckButton($id: ID!) { deleteVibeDeckButton(id: $id) }
|
|
684
|
-
`,
|
|
740
|
+
`,So=`
|
|
685
741
|
mutation MoveVibeDeckButton($id: ID!, $input: MoveVibeDeckButtonInput!) {
|
|
686
|
-
moveVibeDeckButton(id: $id, input: $input) { ${
|
|
742
|
+
moveVibeDeckButton(id: $id, input: $input) { ${L} }
|
|
687
743
|
}
|
|
688
|
-
`,
|
|
689
|
-
mutation ReorderVibeDeckButtons($vibeDeckId: ID!, $
|
|
690
|
-
reorderVibeDeckButtons(vibeDeckId: $vibeDeckId,
|
|
744
|
+
`,yo=`
|
|
745
|
+
mutation ReorderVibeDeckButtons($vibeDeckId: ID!, $input: ReorderVibeDeckButtonsInput!) {
|
|
746
|
+
reorderVibeDeckButtons(vibeDeckId: $vibeDeckId, input: $input) { ${L} }
|
|
691
747
|
}
|
|
692
|
-
`,
|
|
693
|
-
mutation ExecuteVibeDeckButton($id: ID!, $agentId: ID
|
|
694
|
-
executeVibeDeckButton(id: $id, agentId: $agentId) {
|
|
748
|
+
`,Eo=`
|
|
749
|
+
mutation ExecuteVibeDeckButton($id: ID!, $agentId: ID) {
|
|
750
|
+
executeVibeDeckButton(id: $id, agentId: $agentId) { ${ht} }
|
|
695
751
|
}
|
|
696
|
-
`,
|
|
752
|
+
`,V=`
|
|
697
753
|
id workspaceId name displayName description icon color
|
|
698
754
|
actionType sourceType triggerType
|
|
699
755
|
command workingDirectory environmentVariables
|
|
@@ -702,171 +758,178 @@
|
|
|
702
758
|
schedule eventFilters timeoutMs retryCount confirmationRequired
|
|
703
759
|
category tags metadata storeItemId storeVersion
|
|
704
760
|
createdAt updatedAt deletedAt
|
|
705
|
-
`,
|
|
761
|
+
`,X=`
|
|
706
762
|
id actionId workspaceId
|
|
707
763
|
triggerType triggerSource status
|
|
708
764
|
agentId command script output exitCode
|
|
709
765
|
webhookStatusCode errorMessage metadata
|
|
710
766
|
startedAt completedAt durationMs
|
|
711
767
|
createdAt
|
|
712
|
-
`,
|
|
768
|
+
`,To=`
|
|
713
769
|
query Actions($filter: ActionFilterInput, $pagination: PaginationInput) {
|
|
714
770
|
actions(filter: $filter, pagination: $pagination) {
|
|
715
|
-
items { ${
|
|
771
|
+
items { ${V} } total hasMore
|
|
716
772
|
}
|
|
717
773
|
}
|
|
718
|
-
`,
|
|
719
|
-
query Action($id: ID!) { action(id: $id) { ${
|
|
720
|
-
`,
|
|
774
|
+
`,bo=`
|
|
775
|
+
query Action($id: ID!) { action(id: $id) { ${V} } }
|
|
776
|
+
`,ho=`
|
|
721
777
|
mutation CreateAction($input: CreateActionInput!) {
|
|
722
|
-
createAction(input: $input) { ${
|
|
778
|
+
createAction(input: $input) { ${V} }
|
|
723
779
|
}
|
|
724
|
-
`,
|
|
780
|
+
`,Ao=`
|
|
725
781
|
mutation UpdateAction($id: ID!, $input: UpdateActionInput!) {
|
|
726
|
-
updateAction(id: $id, input: $input) { ${
|
|
782
|
+
updateAction(id: $id, input: $input) { ${V} }
|
|
727
783
|
}
|
|
728
|
-
`,
|
|
784
|
+
`,Co=`
|
|
729
785
|
mutation DeleteAction($id: ID!) { deleteAction(id: $id) }
|
|
730
|
-
`,
|
|
731
|
-
mutation DuplicateAction($id: ID!, $name: String) {
|
|
732
|
-
duplicateAction(id: $id, name: $name) { ${
|
|
786
|
+
`,Do=`
|
|
787
|
+
mutation DuplicateAction($id: ID!, $name: String!) {
|
|
788
|
+
duplicateAction(id: $id, name: $name) { ${V} }
|
|
733
789
|
}
|
|
734
|
-
`,
|
|
790
|
+
`,wo=`
|
|
735
791
|
mutation ExecuteAction($id: ID!, $input: ExecuteActionInput) {
|
|
736
|
-
executeAction(id: $id, input: $input) { ${
|
|
792
|
+
executeAction(id: $id, input: $input) { ${X} }
|
|
737
793
|
}
|
|
738
|
-
`,
|
|
739
|
-
mutation InstallActionFromStore($storeItemId:
|
|
740
|
-
installActionFromStore(storeItemId: $storeItemId, version: $version, name: $name) {
|
|
794
|
+
`,Oo=`
|
|
795
|
+
mutation InstallActionFromStore($storeItemId: String!, $version: String, $name: String) {
|
|
796
|
+
installActionFromStore(storeItemId: $storeItemId, version: $version, name: $name) {
|
|
797
|
+
${V}
|
|
798
|
+
}
|
|
741
799
|
}
|
|
742
|
-
|
|
800
|
+
`,$o=`
|
|
743
801
|
mutation CancelActionExecution($id: ID!) {
|
|
744
|
-
cancelActionExecution(id: $id) { ${
|
|
802
|
+
cancelActionExecution(id: $id) { ${X} }
|
|
745
803
|
}
|
|
746
|
-
`,
|
|
804
|
+
`,ko=`
|
|
747
805
|
query ActionExecutions($filter: ActionExecutionFilterInput, $pagination: PaginationInput) {
|
|
748
806
|
actionExecutions(filter: $filter, pagination: $pagination) {
|
|
749
|
-
items { ${
|
|
807
|
+
items { ${X} } total hasMore
|
|
750
808
|
}
|
|
751
809
|
}
|
|
752
|
-
`,
|
|
753
|
-
query ActionExecution($id: ID!) { actionExecution(id: $id) { ${
|
|
754
|
-
|
|
810
|
+
`,vo=`
|
|
811
|
+
query ActionExecution($id: ID!) { actionExecution(id: $id) { ${X} } }
|
|
812
|
+
`,_o=`
|
|
755
813
|
id name scheduleType status actionId
|
|
756
814
|
cronExpression timezone scheduledAt
|
|
757
|
-
interval
|
|
815
|
+
interval startDate endDate
|
|
758
816
|
nextExecutionAt lastExecutionAt
|
|
759
817
|
priority tags
|
|
760
|
-
`,
|
|
818
|
+
`,No=`
|
|
761
819
|
mutation CreateScheduledJob($workspaceId: ID!, $input: CreateScheduledJobInput!) {
|
|
762
|
-
createScheduledJob(workspaceId: $workspaceId, input: $input) { ${
|
|
820
|
+
createScheduledJob(workspaceId: $workspaceId, input: $input) { ${_o} }
|
|
763
821
|
}
|
|
764
|
-
`,
|
|
822
|
+
`,Ro=`
|
|
765
823
|
mutation DeleteScheduledJob($id: ID!) { deleteScheduledJob(id: $id) }
|
|
766
|
-
`,
|
|
767
|
-
query ScheduledJobs(
|
|
824
|
+
`,xo=`
|
|
825
|
+
query ScheduledJobs(
|
|
826
|
+
$workspaceId: ID!
|
|
827
|
+
$filter: JobFilterInput
|
|
828
|
+
$pagination: SchedulerPaginationInput
|
|
829
|
+
) {
|
|
768
830
|
scheduledJobs(workspaceId: $workspaceId, filter: $filter, pagination: $pagination) {
|
|
769
|
-
jobs { ${
|
|
770
|
-
total
|
|
831
|
+
jobs { ${_o} }
|
|
832
|
+
total
|
|
833
|
+
nextCursor
|
|
771
834
|
}
|
|
772
835
|
}
|
|
773
|
-
`,
|
|
836
|
+
`,Uo=`
|
|
774
837
|
query AiToolEvents($filter: AiToolEventFilterInput, $pagination: PaginationInput) {
|
|
775
838
|
aiToolEvents(filter: $filter, pagination: $pagination) {
|
|
776
|
-
items { ${
|
|
839
|
+
items { ${j} } total hasMore
|
|
777
840
|
}
|
|
778
841
|
}
|
|
779
|
-
`,
|
|
780
|
-
query AiToolEvent($id: ID!) { aiToolEvent(id: $id) { ${
|
|
781
|
-
`,
|
|
842
|
+
`,Lo=`
|
|
843
|
+
query AiToolEvent($id: ID!) { aiToolEvent(id: $id) { ${j} } }
|
|
844
|
+
`,Po=`
|
|
782
845
|
query RecentAiToolEvents($agentId: ID!, $limit: Int) {
|
|
783
|
-
recentAiToolEvents(agentId: $agentId, limit: $limit) { ${
|
|
846
|
+
recentAiToolEvents(agentId: $agentId, limit: $limit) { ${j} }
|
|
784
847
|
}
|
|
785
|
-
`,
|
|
848
|
+
`,Vo=`
|
|
786
849
|
mutation CreateAiToolEvent($input: CreateAiToolEventInput!) {
|
|
787
|
-
createAiToolEvent(input: $input) { ${
|
|
850
|
+
createAiToolEvent(input: $input) { ${j} }
|
|
788
851
|
}
|
|
789
|
-
`,
|
|
852
|
+
`,Go=`
|
|
790
853
|
mutation DeleteOldAiToolEvents($beforeDate: DateTime!) {
|
|
791
854
|
deleteOldAiToolEvents(beforeDate: $beforeDate)
|
|
792
855
|
}
|
|
793
|
-
`,
|
|
856
|
+
`,Bo=`
|
|
794
857
|
query DocsSites($filter: VibecontrolsDocsSiteFilterInput, $pagination: PaginationInput) {
|
|
795
858
|
docsSites(filter: $filter, pagination: $pagination) {
|
|
796
|
-
items { ${
|
|
859
|
+
items { ${P} } total hasMore
|
|
797
860
|
}
|
|
798
861
|
}
|
|
799
|
-
`,
|
|
800
|
-
query DocsSite($vibeId: ID!) { docsSite(vibeId: $vibeId) { ${
|
|
801
|
-
`,
|
|
862
|
+
`,qo=`
|
|
863
|
+
query DocsSite($vibeId: ID!) { docsSite(vibeId: $vibeId) { ${P} } }
|
|
864
|
+
`,Fo=`
|
|
802
865
|
mutation CreateDocsSite($input: CreateVibecontrolsDocsSiteInput!) {
|
|
803
|
-
createDocsSite(input: $input) { ${
|
|
866
|
+
createDocsSite(input: $input) { ${P} }
|
|
804
867
|
}
|
|
805
|
-
`,
|
|
868
|
+
`,Mo=`
|
|
806
869
|
mutation UpdateDocsSite($id: ID!, $input: UpdateVibecontrolsDocsSiteInput!) {
|
|
807
|
-
updateDocsSite(id: $id, input: $input) { ${
|
|
870
|
+
updateDocsSite(id: $id, input: $input) { ${P} }
|
|
808
871
|
}
|
|
809
|
-
`,
|
|
872
|
+
`,Ho=`
|
|
810
873
|
mutation UpdateDocsSiteVisibility($id: ID!, $visibility: VibecontrolsDocsSiteVisibility!) {
|
|
811
|
-
updateDocsSiteVisibility(id: $id, visibility: $visibility) { ${
|
|
874
|
+
updateDocsSiteVisibility(id: $id, visibility: $visibility) { ${P} }
|
|
812
875
|
}
|
|
813
|
-
`,
|
|
876
|
+
`,Wo=`
|
|
814
877
|
mutation DeleteDocsSite($id: ID!) { deleteDocsSite(id: $id) }
|
|
815
|
-
`,
|
|
878
|
+
`,Ko=`
|
|
816
879
|
query DocsPages($siteId: ID!, $filter: VibecontrolsDocsPageFilterInput) {
|
|
817
|
-
docsPages(siteId: $siteId, filter: $filter) { ${
|
|
880
|
+
docsPages(siteId: $siteId, filter: $filter) { ${q} }
|
|
818
881
|
}
|
|
819
|
-
`,
|
|
820
|
-
query DocsPage($id: ID!) { docsPage(id: $id) { ${
|
|
821
|
-
`,
|
|
882
|
+
`,jo=`
|
|
883
|
+
query DocsPage($id: ID!) { docsPage(id: $id) { ${q} } }
|
|
884
|
+
`,Yo=`
|
|
822
885
|
mutation CreateDocsPage($input: CreateVibecontrolsDocsPageInput!) {
|
|
823
|
-
createDocsPage(input: $input) { ${
|
|
886
|
+
createDocsPage(input: $input) { ${q} }
|
|
824
887
|
}
|
|
825
|
-
`,
|
|
888
|
+
`,Jo=`
|
|
826
889
|
mutation UpdateDocsPage($id: ID!, $input: UpdateVibecontrolsDocsPageInput!) {
|
|
827
|
-
updateDocsPage(id: $id, input: $input) { ${
|
|
890
|
+
updateDocsPage(id: $id, input: $input) { ${q} }
|
|
828
891
|
}
|
|
829
|
-
`,
|
|
892
|
+
`,Xo=`
|
|
830
893
|
mutation DeleteDocsPage($id: ID!) { deleteDocsPage(id: $id) }
|
|
831
|
-
`,
|
|
894
|
+
`,zo=`
|
|
832
895
|
mutation ReorderDocsPages($siteId: ID!, $input: ReorderVibecontrolsDocsPagesInput!) {
|
|
833
|
-
reorderDocsPages(siteId: $siteId, input: $input) { ${
|
|
896
|
+
reorderDocsPages(siteId: $siteId, input: $input) { ${q} }
|
|
834
897
|
}
|
|
835
|
-
`,
|
|
898
|
+
`,Qo=`
|
|
836
899
|
query DocsRevisions($siteId: ID!, $pagination: PaginationInput) {
|
|
837
900
|
docsRevisions(siteId: $siteId, pagination: $pagination) {
|
|
838
|
-
items { ${
|
|
901
|
+
items { ${Y} } total hasMore
|
|
839
902
|
}
|
|
840
903
|
}
|
|
841
|
-
`,
|
|
842
|
-
query DocsRevision($id: ID!) { docsRevision(id: $id) { ${
|
|
843
|
-
`,
|
|
904
|
+
`,Zo=`
|
|
905
|
+
query DocsRevision($id: ID!) { docsRevision(id: $id) { ${Y} } }
|
|
906
|
+
`,ti=`
|
|
844
907
|
query DocsContent($siteId: ID!, $path: String) { docsContent(siteId: $siteId, path: $path) { html contentType } }
|
|
845
|
-
`,
|
|
908
|
+
`,ei=`
|
|
846
909
|
mutation CompileDocsSite($siteId: ID!, $publish: Boolean) {
|
|
847
|
-
compileDocsSite(siteId: $siteId, publish: $publish) { ${
|
|
910
|
+
compileDocsSite(siteId: $siteId, publish: $publish) { ${Y} }
|
|
848
911
|
}
|
|
849
|
-
`,
|
|
912
|
+
`,ni=`
|
|
850
913
|
mutation PublishDocsRevision($revisionId: ID!) {
|
|
851
|
-
publishDocsRevision(revisionId: $revisionId) { ${
|
|
914
|
+
publishDocsRevision(revisionId: $revisionId) { ${Y} }
|
|
852
915
|
}
|
|
853
|
-
`,
|
|
916
|
+
`,oi=`
|
|
854
917
|
mutation RollbackDocsRevision($siteId: ID!, $revisionId: ID!) {
|
|
855
|
-
rollbackDocsRevision(siteId: $siteId, revisionId: $revisionId) { ${
|
|
918
|
+
rollbackDocsRevision(siteId: $siteId, revisionId: $revisionId) { ${P} }
|
|
856
919
|
}
|
|
857
|
-
`,
|
|
920
|
+
`,ii=`
|
|
858
921
|
mutation GenerateDocsSignedUrl($siteId: ID!) {
|
|
859
922
|
generateDocsSignedUrl(siteId: $siteId) { url expiresAt }
|
|
860
923
|
}
|
|
861
|
-
`,
|
|
924
|
+
`,ri=`
|
|
862
925
|
query VibeAuditLogs($filter: VibeAuditLogFilterInput, $pagination: PaginationInput) {
|
|
863
926
|
vibeAuditLogs(filter: $filter, pagination: $pagination) {
|
|
864
|
-
items { ${
|
|
927
|
+
items { ${At} } total hasMore
|
|
865
928
|
}
|
|
866
929
|
}
|
|
867
|
-
`,
|
|
868
|
-
query VibeAuditLog($id: ID!) { vibeAuditLog(id: $id) { ${
|
|
869
|
-
`,
|
|
930
|
+
`,ai=`
|
|
931
|
+
query VibeAuditLog($id: ID!) { vibeAuditLog(id: $id) { ${At} } }
|
|
932
|
+
`,si=`
|
|
870
933
|
query VibeAuditLogStats($filter: VibeAuditLogFilterInput) {
|
|
871
934
|
vibeAuditLogStats(filter: $filter) {
|
|
872
935
|
totalLogs
|
|
@@ -875,15 +938,11 @@
|
|
|
875
938
|
logsByStatus { status count }
|
|
876
939
|
}
|
|
877
940
|
}
|
|
878
|
-
`,
|
|
879
|
-
mutation
|
|
880
|
-
|
|
881
|
-
mutation BulkDeleteVibeAuditLogs($ids: [ID!]!, $reason: String) { bulkDeleteVibeAuditLogs(ids: $ids, reason: $reason) }
|
|
882
|
-
`,ai=`
|
|
883
|
-
mutation ExportVibeAuditLogs($filter: VibeAuditLogFilterInput, $format: String) {
|
|
884
|
-
exportVibeAuditLogs(filter: $filter, format: $format)
|
|
941
|
+
`,ci=`
|
|
942
|
+
mutation ExportVibeAuditLogs($input: VibeAuditExportInput!) {
|
|
943
|
+
exportVibeAuditLogs(input: $input) { count data format generatedAt }
|
|
885
944
|
}
|
|
886
|
-
`;var
|
|
945
|
+
`;var F=`
|
|
887
946
|
query VibecontrolsAnalytics($input: VibecontrolsAnalyticsInput!) {
|
|
888
947
|
vibecontrolsAnalytics(input: $input) {
|
|
889
948
|
agents { total active inactive staleHeartbeatCount byPlatform { key count } byArchitecture { key count } createdOverTime { timestamp value } }
|
|
@@ -902,246 +961,246 @@
|
|
|
902
961
|
cached
|
|
903
962
|
}
|
|
904
963
|
}
|
|
905
|
-
`,
|
|
964
|
+
`,Q=`
|
|
906
965
|
id name description visibility
|
|
907
966
|
ownerId ownerName componentCount vibeCount
|
|
908
967
|
tags metadata workspaceId
|
|
909
968
|
createdAt updatedAt deletedAt
|
|
910
969
|
createdBy updatedBy onBehalfOf
|
|
911
|
-
`,
|
|
970
|
+
`,M=`
|
|
912
971
|
id name description type lifecycle version
|
|
913
972
|
language framework repositoryUrl documentationUrl
|
|
914
973
|
dependencies sbomData tags metadata
|
|
915
974
|
ownerId ownerName teamId teamName catalogCount
|
|
916
975
|
workspaceId createdAt updatedAt deletedAt
|
|
917
|
-
`,
|
|
976
|
+
`,Z=`
|
|
918
977
|
id name description category status version
|
|
919
978
|
setupInstructions sourceRepositoryUrl
|
|
920
979
|
fileTree variables componentSnapshot
|
|
921
980
|
cloneCount tags metadata
|
|
922
981
|
createdAt updatedAt
|
|
923
|
-
`,
|
|
982
|
+
`,dt=`
|
|
924
983
|
id name description type status value threshold unit
|
|
925
984
|
iframeUrl iframeHeight lastUpdatedAt createdAt updatedAt
|
|
926
|
-
`,
|
|
985
|
+
`,di=`
|
|
927
986
|
id ownerId ownerType overallScore lastEvaluatedAt
|
|
928
|
-
metrics { ${
|
|
987
|
+
metrics { ${dt} }
|
|
929
988
|
metadata workspaceId createdAt updatedAt
|
|
930
|
-
`,
|
|
989
|
+
`,pi=`
|
|
931
990
|
query VibecontrolsCatalogs($filter: CatalogFilterInput, $pagination: PaginationInput) {
|
|
932
991
|
vibecontrolsCatalogs(filter: $filter, pagination: $pagination) {
|
|
933
|
-
items { ${
|
|
992
|
+
items { ${Q} }
|
|
934
993
|
total
|
|
935
994
|
hasMore
|
|
936
995
|
}
|
|
937
996
|
}
|
|
938
|
-
`,
|
|
997
|
+
`,ui=`
|
|
939
998
|
query VibecontrolsCatalog($id: ID!) {
|
|
940
|
-
vibecontrolsCatalog(id: $id) { ${
|
|
999
|
+
vibecontrolsCatalog(id: $id) { ${Q} }
|
|
941
1000
|
}
|
|
942
|
-
`,
|
|
1001
|
+
`,mi=`
|
|
943
1002
|
query VibecontrolsCatalogDependencyGraph($catalogId: ID!) {
|
|
944
1003
|
vibecontrolsCatalogDependencyGraph(catalogId: $catalogId) {
|
|
945
1004
|
nodes { id name type version }
|
|
946
1005
|
edges { source target version dependencyType }
|
|
947
1006
|
}
|
|
948
1007
|
}
|
|
949
|
-
`,
|
|
1008
|
+
`,gi=`
|
|
950
1009
|
query VibecontrolsCatalogSBOM($catalogId: ID!) {
|
|
951
1010
|
vibecontrolsCatalogSBOM(catalogId: $catalogId) {
|
|
952
1011
|
format generatedAt totalCount
|
|
953
1012
|
components { name version type license }
|
|
954
1013
|
}
|
|
955
1014
|
}
|
|
956
|
-
`,
|
|
1015
|
+
`,li=`
|
|
957
1016
|
mutation CreateVibecontrolsCatalog($input: CreateCatalogInput!) {
|
|
958
|
-
createVibecontrolsCatalog(input: $input) { ${
|
|
1017
|
+
createVibecontrolsCatalog(input: $input) { ${Q} }
|
|
959
1018
|
}
|
|
960
|
-
`,
|
|
1019
|
+
`,fi=`
|
|
961
1020
|
mutation UpdateVibecontrolsCatalog($id: ID!, $input: UpdateCatalogInput!) {
|
|
962
|
-
updateVibecontrolsCatalog(id: $id, input: $input) { ${
|
|
1021
|
+
updateVibecontrolsCatalog(id: $id, input: $input) { ${Q} }
|
|
963
1022
|
}
|
|
964
|
-
`,
|
|
1023
|
+
`,Ii=`
|
|
965
1024
|
mutation DeleteVibecontrolsCatalog($id: ID!) { deleteVibecontrolsCatalog(id: $id) }
|
|
966
|
-
`,
|
|
1025
|
+
`,Si=`
|
|
967
1026
|
mutation AddComponentToVibecontrolsCatalog($catalogId: ID!, $componentId: ID!) {
|
|
968
1027
|
addComponentToVibecontrolsCatalog(catalogId: $catalogId, componentId: $componentId) {
|
|
969
1028
|
id catalogId componentId addedAt addedBy metadata workspaceId
|
|
970
1029
|
}
|
|
971
1030
|
}
|
|
972
|
-
`,
|
|
1031
|
+
`,yi=`
|
|
973
1032
|
mutation RemoveComponentFromVibecontrolsCatalog($catalogId: ID!, $componentId: ID!) {
|
|
974
1033
|
removeComponentFromVibecontrolsCatalog(catalogId: $catalogId, componentId: $componentId)
|
|
975
1034
|
}
|
|
976
|
-
`,
|
|
1035
|
+
`,Ei=`
|
|
977
1036
|
mutation AddVibeToVibecontrolsCatalog($catalogId: ID!, $vibeId: ID!) {
|
|
978
1037
|
addVibeToVibecontrolsCatalog(catalogId: $catalogId, vibeId: $vibeId) {
|
|
979
1038
|
id catalogId vibeId addedAt addedBy metadata workspaceId
|
|
980
1039
|
}
|
|
981
1040
|
}
|
|
982
|
-
`,
|
|
1041
|
+
`,Ti=`
|
|
983
1042
|
mutation RemoveVibeFromVibecontrolsCatalog($catalogId: ID!, $vibeId: ID!) {
|
|
984
1043
|
removeVibeFromVibecontrolsCatalog(catalogId: $catalogId, vibeId: $vibeId)
|
|
985
1044
|
}
|
|
986
|
-
`,
|
|
1045
|
+
`,bi=`
|
|
987
1046
|
query VibecontrolsComponents($filter: ComponentFilterInput, $pagination: PaginationInput) {
|
|
988
1047
|
vibecontrolsComponents(filter: $filter, pagination: $pagination) {
|
|
989
|
-
items { ${
|
|
1048
|
+
items { ${M} }
|
|
990
1049
|
total
|
|
991
1050
|
hasMore
|
|
992
1051
|
}
|
|
993
1052
|
}
|
|
994
|
-
`,
|
|
1053
|
+
`,hi=`
|
|
995
1054
|
query VibecontrolsComponent($id: ID!) {
|
|
996
|
-
vibecontrolsComponent(id: $id) { ${
|
|
1055
|
+
vibecontrolsComponent(id: $id) { ${M} }
|
|
997
1056
|
}
|
|
998
|
-
`,
|
|
1057
|
+
`,Ai=`
|
|
999
1058
|
mutation CreateVibecontrolsComponent($input: CreateComponentInput!) {
|
|
1000
|
-
createVibecontrolsComponent(input: $input) { ${
|
|
1059
|
+
createVibecontrolsComponent(input: $input) { ${M} }
|
|
1001
1060
|
}
|
|
1002
|
-
`,
|
|
1061
|
+
`,Ci=`
|
|
1003
1062
|
mutation UpdateVibecontrolsComponent($id: ID!, $input: UpdateComponentInput!) {
|
|
1004
|
-
updateVibecontrolsComponent(id: $id, input: $input) { ${
|
|
1063
|
+
updateVibecontrolsComponent(id: $id, input: $input) { ${M} }
|
|
1005
1064
|
}
|
|
1006
|
-
`,
|
|
1065
|
+
`,Di=`
|
|
1007
1066
|
mutation DeleteVibecontrolsComponent($id: ID!) { deleteVibecontrolsComponent(id: $id) }
|
|
1008
|
-
`,
|
|
1067
|
+
`,wi=`
|
|
1009
1068
|
mutation ForkVibecontrolsGitHubRepo($input: VibecontrolsForkGitHubRepoInput!) {
|
|
1010
1069
|
forkVibecontrolsGitHubRepo(input: $input) { isForked repoFullName repoUrl }
|
|
1011
1070
|
}
|
|
1012
|
-
`,
|
|
1071
|
+
`,Oi=`
|
|
1013
1072
|
mutation PublishVibecontrolsComponentAsTemplate(
|
|
1014
1073
|
$componentId: ID!
|
|
1015
1074
|
$input: VibecontrolsPublishTemplateInput!
|
|
1016
1075
|
) {
|
|
1017
1076
|
publishVibecontrolsComponentAsTemplate(componentId: $componentId, input: $input) {
|
|
1018
|
-
${
|
|
1077
|
+
${Z}
|
|
1019
1078
|
}
|
|
1020
1079
|
}
|
|
1021
|
-
|
|
1080
|
+
`,$i=`
|
|
1022
1081
|
query VibecontrolsTemplates(
|
|
1023
1082
|
$filter: VibecontrolsTemplateFilterInput
|
|
1024
1083
|
$pagination: PaginationInput
|
|
1025
1084
|
) {
|
|
1026
1085
|
vibecontrolsTemplates(filter: $filter, pagination: $pagination) {
|
|
1027
|
-
items { ${
|
|
1086
|
+
items { ${Z} }
|
|
1028
1087
|
total
|
|
1029
1088
|
hasMore
|
|
1030
1089
|
}
|
|
1031
1090
|
}
|
|
1032
|
-
|
|
1091
|
+
`,ki=`
|
|
1033
1092
|
query VibecontrolsTemplate($id: ID!) {
|
|
1034
|
-
vibecontrolsTemplate(id: $id) { ${
|
|
1093
|
+
vibecontrolsTemplate(id: $id) { ${Z} }
|
|
1035
1094
|
}
|
|
1036
1095
|
`,vi=`
|
|
1037
1096
|
mutation UpdateVibecontrolsTemplate($id: ID!, $input: VibecontrolsUpdateTemplateInput!) {
|
|
1038
|
-
updateVibecontrolsTemplate(id: $id, input: $input) { ${
|
|
1097
|
+
updateVibecontrolsTemplate(id: $id, input: $input) { ${Z} }
|
|
1039
1098
|
}
|
|
1040
|
-
`,
|
|
1099
|
+
`,_i=`
|
|
1041
1100
|
mutation DeleteVibecontrolsTemplate($id: ID!) { deleteVibecontrolsTemplate(id: $id) }
|
|
1042
|
-
`,
|
|
1101
|
+
`,Ni=`
|
|
1043
1102
|
mutation InstantiateVibecontrolsTemplate(
|
|
1044
1103
|
$templateId: ID!
|
|
1045
1104
|
$input: VibecontrolsCloneTemplateInput!
|
|
1046
1105
|
) {
|
|
1047
1106
|
instantiateVibecontrolsTemplate(templateId: $templateId, input: $input) {
|
|
1048
|
-
${
|
|
1107
|
+
${M}
|
|
1049
1108
|
}
|
|
1050
1109
|
}
|
|
1051
|
-
`,
|
|
1110
|
+
`,Ri=`
|
|
1052
1111
|
query VibecontrolsScorecard($ownerId: ID!, $ownerType: ScorecardOwnerType!) {
|
|
1053
1112
|
vibecontrolsScorecard(ownerId: $ownerId, ownerType: $ownerType) {
|
|
1054
|
-
${
|
|
1113
|
+
${di}
|
|
1055
1114
|
}
|
|
1056
1115
|
}
|
|
1057
|
-
`,
|
|
1116
|
+
`,xi=`
|
|
1058
1117
|
mutation UpsertVibecontrolsScorecard($input: UpsertScorecardInput!) {
|
|
1059
|
-
upsertVibecontrolsScorecard(input: $input) { ${
|
|
1118
|
+
upsertVibecontrolsScorecard(input: $input) { ${di} }
|
|
1060
1119
|
}
|
|
1061
|
-
`,
|
|
1120
|
+
`,Ui=`
|
|
1062
1121
|
mutation AddVibecontrolsScorecardMetric($scorecardId: ID!, $input: AddScorecardMetricInput!) {
|
|
1063
1122
|
addVibecontrolsScorecardMetric(scorecardId: $scorecardId, input: $input) {
|
|
1064
|
-
${
|
|
1123
|
+
${dt}
|
|
1065
1124
|
}
|
|
1066
1125
|
}
|
|
1067
|
-
`,
|
|
1126
|
+
`,Li=`
|
|
1068
1127
|
mutation UpdateVibecontrolsScorecardMetric($id: ID!, $input: UpdateScorecardMetricInput!) {
|
|
1069
1128
|
updateVibecontrolsScorecardMetric(id: $id, input: $input) {
|
|
1070
|
-
${
|
|
1129
|
+
${dt}
|
|
1071
1130
|
}
|
|
1072
1131
|
}
|
|
1073
|
-
`,
|
|
1132
|
+
`,Pi=`
|
|
1074
1133
|
mutation RemoveVibecontrolsScorecardMetric($id: ID!) {
|
|
1075
1134
|
removeVibecontrolsScorecardMetric(id: $id)
|
|
1076
1135
|
}
|
|
1077
|
-
`,
|
|
1136
|
+
`,Vi=`
|
|
1078
1137
|
mutation ExportSessions($input: SessionExportInput!) {
|
|
1079
1138
|
exportSessions(input: $input) { count data format generatedAt }
|
|
1080
1139
|
}
|
|
1081
|
-
`,
|
|
1140
|
+
`,G=`
|
|
1082
1141
|
id name description content category status isShared
|
|
1083
1142
|
tags variables metadata createdBy onBehalfOf updatedBy
|
|
1084
1143
|
workspaceId usageCount lastUsedAt
|
|
1085
1144
|
createdAt updatedAt deletedAt
|
|
1086
|
-
`,
|
|
1145
|
+
`,Gi=`
|
|
1087
1146
|
query AiPrompts($filter: AIPromptFilterInput, $pagination: PaginationInput) {
|
|
1088
1147
|
aiPrompts(filter: $filter, pagination: $pagination) {
|
|
1089
|
-
items { ${
|
|
1148
|
+
items { ${G} }
|
|
1090
1149
|
total hasMore
|
|
1091
1150
|
}
|
|
1092
1151
|
}
|
|
1093
|
-
`,
|
|
1094
|
-
query AiPrompt($id: ID!) { aiPrompt(id: $id) { ${
|
|
1095
|
-
`,
|
|
1152
|
+
`,Bi=`
|
|
1153
|
+
query AiPrompt($id: ID!) { aiPrompt(id: $id) { ${G} } }
|
|
1154
|
+
`,qi=`
|
|
1096
1155
|
mutation CreateAIPrompt($input: CreateAIPromptInput!) {
|
|
1097
|
-
createAIPrompt(input: $input) { ${
|
|
1156
|
+
createAIPrompt(input: $input) { ${G} }
|
|
1098
1157
|
}
|
|
1099
|
-
`,
|
|
1158
|
+
`,Fi=`
|
|
1100
1159
|
mutation UpdateAIPrompt($id: ID!, $input: UpdateAIPromptInput!) {
|
|
1101
|
-
updateAIPrompt(id: $id, input: $input) { ${
|
|
1160
|
+
updateAIPrompt(id: $id, input: $input) { ${G} }
|
|
1102
1161
|
}
|
|
1103
|
-
`,
|
|
1162
|
+
`,Mi=`
|
|
1104
1163
|
mutation DeleteAIPrompt($id: ID!) { deleteAIPrompt(id: $id) }
|
|
1105
|
-
`,
|
|
1164
|
+
`,Hi=`
|
|
1106
1165
|
mutation DuplicateAIPrompt($id: ID!, $name: String!) {
|
|
1107
|
-
duplicateAIPrompt(id: $id, name: $name) { ${
|
|
1166
|
+
duplicateAIPrompt(id: $id, name: $name) { ${G} }
|
|
1108
1167
|
}
|
|
1109
|
-
`,
|
|
1168
|
+
`,Wi=`
|
|
1110
1169
|
mutation RenderAIPrompt($id: ID!, $variables: JSON) {
|
|
1111
1170
|
renderAIPrompt(id: $id, variables: $variables) { promptId rendered }
|
|
1112
1171
|
}
|
|
1113
|
-
`,
|
|
1172
|
+
`,Ki=`
|
|
1114
1173
|
mutation RecordAIPromptUsage($id: ID!) {
|
|
1115
|
-
recordAIPromptUsage(id: $id) { ${
|
|
1174
|
+
recordAIPromptUsage(id: $id) { ${G} }
|
|
1116
1175
|
}
|
|
1117
|
-
`,
|
|
1176
|
+
`,tt=`
|
|
1118
1177
|
id vibeDeckId token shareUrl name permission status visibility
|
|
1119
1178
|
hasPassword allowIframe maxUses useCount expiresAt lastUsedAt
|
|
1120
1179
|
createdBy createdAt
|
|
1121
|
-
`,
|
|
1180
|
+
`,ji=`
|
|
1122
1181
|
query VibeDeckShareLinks($vibeDeckId: ID!) {
|
|
1123
|
-
vibeDeckShareLinks(vibeDeckId: $vibeDeckId) { ${
|
|
1182
|
+
vibeDeckShareLinks(vibeDeckId: $vibeDeckId) { ${tt} }
|
|
1124
1183
|
}
|
|
1125
|
-
`,
|
|
1184
|
+
`,Yi=`
|
|
1126
1185
|
mutation CreateVibeDeckShareLink($input: CreateVibeDeckShareLinkInput!) {
|
|
1127
|
-
createVibeDeckShareLink(input: $input) { ${
|
|
1186
|
+
createVibeDeckShareLink(input: $input) { ${tt} }
|
|
1128
1187
|
}
|
|
1129
|
-
`,
|
|
1188
|
+
`,Ji=`
|
|
1130
1189
|
mutation UpdateVibeDeckShareLink($id: ID!, $input: UpdateVibeDeckShareLinkInput!) {
|
|
1131
|
-
updateVibeDeckShareLink(id: $id, input: $input) { ${
|
|
1190
|
+
updateVibeDeckShareLink(id: $id, input: $input) { ${tt} }
|
|
1132
1191
|
}
|
|
1133
|
-
`,
|
|
1192
|
+
`,Xi=`
|
|
1134
1193
|
mutation RevokeVibeDeckShareLink($id: ID!) {
|
|
1135
|
-
revokeVibeDeckShareLink(id: $id) { ${
|
|
1194
|
+
revokeVibeDeckShareLink(id: $id) { ${tt} }
|
|
1136
1195
|
}
|
|
1137
|
-
`,
|
|
1196
|
+
`,zi=`
|
|
1138
1197
|
query ValidateVibeDeckShareLink($token: String!) {
|
|
1139
1198
|
validateVibeDeckShareLink(token: $token) {
|
|
1140
1199
|
isValid error requiresPassword permission allowIframe
|
|
1141
1200
|
expiresAt vibeDeckId vibeDeckName ownerName
|
|
1142
1201
|
}
|
|
1143
1202
|
}
|
|
1144
|
-
`,
|
|
1203
|
+
`,Qi=`
|
|
1145
1204
|
query SharedVibeDeck($token: String!, $password: String) {
|
|
1146
1205
|
sharedVibeDeck(token: $token, password: $password) {
|
|
1147
1206
|
id name description icon buttonSize colorTheme gridColumns gridRows
|
|
@@ -1149,101 +1208,101 @@
|
|
|
1149
1208
|
buttons { id label actionType row column rowSpan colSpan icon color category confirmationRequired }
|
|
1150
1209
|
}
|
|
1151
1210
|
}
|
|
1152
|
-
`,
|
|
1211
|
+
`,Zi=`
|
|
1153
1212
|
mutation ExecuteSharedVibeDeckButton($token: String!, $buttonId: ID!, $password: String) {
|
|
1154
1213
|
executeSharedVibeDeckButton(token: $token, buttonId: $buttonId, password: $password) {
|
|
1155
|
-
|
|
1214
|
+
${ht}
|
|
1156
1215
|
}
|
|
1157
1216
|
}
|
|
1158
|
-
|
|
1217
|
+
`,fa="summary { critical high medium low info }",tr=`
|
|
1159
1218
|
id workspaceId vibeId scanRunId fingerprint
|
|
1160
1219
|
category severity status ruleId title description
|
|
1161
1220
|
file line col cve cwe packageName packageVersion fixedVersion
|
|
1162
1221
|
remediation redactedSample ownerTeam firstSeenAt lastSeenAt dueAt
|
|
1163
|
-
`,
|
|
1222
|
+
`,H=`
|
|
1164
1223
|
id workspaceId vibeId agentId createdBy providerName
|
|
1165
1224
|
stage status conclusion policyLevel repoUrl commit
|
|
1166
1225
|
durationMs errorReason startedAt finishedAt createdAt
|
|
1167
|
-
${
|
|
1168
|
-
`,
|
|
1226
|
+
${fa}
|
|
1227
|
+
`,er=`
|
|
1169
1228
|
id workspaceId providerName pluginName stage toolVersion
|
|
1170
1229
|
enabled isDefault config createdAt updatedAt
|
|
1171
|
-
`,
|
|
1230
|
+
`,nr=`
|
|
1172
1231
|
id workspaceId vibeId policyLevel enabledStages
|
|
1173
1232
|
pluginAssignments profile configYamlEquivalent createdAt updatedAt
|
|
1174
|
-
`,
|
|
1175
|
-
query SecurityProviders { securityProviders { ${
|
|
1176
|
-
`,
|
|
1233
|
+
`,or=`
|
|
1234
|
+
query SecurityProviders { securityProviders { ${er} } }
|
|
1235
|
+
`,ir=`
|
|
1177
1236
|
query SecurityScan($id: ID!) {
|
|
1178
|
-
securityScan(id: $id) { ${
|
|
1237
|
+
securityScan(id: $id) { ${H} }
|
|
1179
1238
|
}
|
|
1180
|
-
`,
|
|
1239
|
+
`,rr=`
|
|
1181
1240
|
query MySecurityScans($filter: SecurityScanFilterInput, $pagination: SecurityPaginationInput) {
|
|
1182
1241
|
mySecurityScans(filter: $filter, pagination: $pagination) {
|
|
1183
|
-
items { ${
|
|
1242
|
+
items { ${H} } total hasMore
|
|
1184
1243
|
}
|
|
1185
1244
|
}
|
|
1186
|
-
`,
|
|
1245
|
+
`,ar=`
|
|
1187
1246
|
query AllSecurityScans($filter: SecurityScanFilterInput, $pagination: SecurityPaginationInput) {
|
|
1188
1247
|
allSecurityScans(filter: $filter, pagination: $pagination) {
|
|
1189
|
-
items { ${
|
|
1248
|
+
items { ${H} } total hasMore
|
|
1190
1249
|
}
|
|
1191
1250
|
}
|
|
1192
|
-
`,
|
|
1251
|
+
`,sr=`
|
|
1193
1252
|
query SecurityFindings($filter: SecurityFindingFilterInput, $pagination: SecurityPaginationInput) {
|
|
1194
1253
|
securityFindings(filter: $filter, pagination: $pagination) {
|
|
1195
|
-
items { ${
|
|
1254
|
+
items { ${tr} } total hasMore
|
|
1196
1255
|
}
|
|
1197
1256
|
}
|
|
1198
|
-
`,
|
|
1257
|
+
`,cr=`
|
|
1199
1258
|
query SecurityPolicyDecision($scanRunId: ID!) {
|
|
1200
1259
|
securityPolicyDecision(scanRunId: $scanRunId) {
|
|
1201
1260
|
scanRunId allow denyReasons policyVersion evaluatedAt
|
|
1202
1261
|
}
|
|
1203
1262
|
}
|
|
1204
|
-
`,
|
|
1263
|
+
`,dr=`
|
|
1205
1264
|
query SecurityStatus($vibeId: ID!) {
|
|
1206
1265
|
securityStatus(vibeId: $vibeId) {
|
|
1207
1266
|
vibeId policyLevel perStage lastScanAt
|
|
1208
1267
|
totals { critical high medium low info }
|
|
1209
1268
|
}
|
|
1210
1269
|
}
|
|
1211
|
-
`,
|
|
1270
|
+
`,pr=`
|
|
1212
1271
|
query RepositorySecurityConfig($vibeId: ID!) {
|
|
1213
|
-
repositorySecurityConfig(vibeId: $vibeId) { ${
|
|
1272
|
+
repositorySecurityConfig(vibeId: $vibeId) { ${nr} }
|
|
1214
1273
|
}
|
|
1215
|
-
`,
|
|
1274
|
+
`,ur=`
|
|
1216
1275
|
mutation RunSecurityScan($vibeId: ID!, $stage: SecurityStage!) {
|
|
1217
|
-
runSecurityScan(vibeId: $vibeId, stage: $stage) { ${
|
|
1276
|
+
runSecurityScan(vibeId: $vibeId, stage: $stage) { ${H} }
|
|
1218
1277
|
}
|
|
1219
|
-
`,
|
|
1278
|
+
`,mr=`
|
|
1220
1279
|
mutation CancelSecurityScan($id: ID!) {
|
|
1221
|
-
cancelSecurityScan(id: $id) { ${
|
|
1280
|
+
cancelSecurityScan(id: $id) { ${H} }
|
|
1222
1281
|
}
|
|
1223
|
-
`,
|
|
1282
|
+
`,gr=`
|
|
1224
1283
|
mutation CreateSecurityException($input: CreateSecurityExceptionInput!) {
|
|
1225
1284
|
createSecurityException(input: $input) {
|
|
1226
1285
|
id workspaceId vibeId findingId reason compensatingControls
|
|
1227
1286
|
approvedBy expiresAt status createdAt
|
|
1228
1287
|
}
|
|
1229
1288
|
}
|
|
1230
|
-
`,
|
|
1289
|
+
`,lr=`
|
|
1231
1290
|
mutation RevokeSecurityException($id: ID!) { revokeSecurityException(id: $id) }
|
|
1232
|
-
`,
|
|
1291
|
+
`,fr=`
|
|
1233
1292
|
mutation SetSecurityProvider($input: SetSecurityProviderInput!) {
|
|
1234
|
-
setSecurityProvider(input: $input) { ${
|
|
1293
|
+
setSecurityProvider(input: $input) { ${er} }
|
|
1235
1294
|
}
|
|
1236
|
-
`,
|
|
1295
|
+
`,Ir=`
|
|
1237
1296
|
mutation UpdateSecurityFindingStatus($id: ID!, $status: SecurityFindingStatus!) {
|
|
1238
|
-
updateSecurityFindingStatus(id: $id, status: $status) { ${
|
|
1297
|
+
updateSecurityFindingStatus(id: $id, status: $status) { ${tr} }
|
|
1239
1298
|
}
|
|
1240
|
-
`,
|
|
1299
|
+
`,Sr=`
|
|
1241
1300
|
mutation UpdateRepositorySecurityConfig(
|
|
1242
1301
|
$vibeId: ID!, $input: UpdateRepositorySecurityConfigInput!
|
|
1243
1302
|
) {
|
|
1244
|
-
updateRepositorySecurityConfig(vibeId: $vibeId, input: $input) { ${
|
|
1303
|
+
updateRepositorySecurityConfig(vibeId: $vibeId, input: $input) { ${nr} }
|
|
1245
1304
|
}
|
|
1246
|
-
`,
|
|
1305
|
+
`,yr=`
|
|
1247
1306
|
mutation PresignSecurityEvidence(
|
|
1248
1307
|
$scanRunId: ID!, $sha256: String!, $sizeBytes: Int!, $type: SecurityEvidenceType!
|
|
1249
1308
|
) {
|
|
@@ -1253,117 +1312,53 @@
|
|
|
1253
1312
|
evidenceId uploadUrl method requiredHeaders s3Bucket s3Key expiresAt
|
|
1254
1313
|
}
|
|
1255
1314
|
}
|
|
1256
|
-
`,st=`
|
|
1257
|
-
id status conclusion workflowName branch event actor url
|
|
1258
|
-
startedAt completedAt durationSeconds
|
|
1259
|
-
`,Sr=`
|
|
1260
|
-
recentRuns { ${st} }
|
|
1261
|
-
workflows { id name path state }
|
|
1262
|
-
averageDurationSeconds successRate totalRunsLast30Days
|
|
1263
|
-
`,yr=`
|
|
1264
|
-
query GetCIStatus($providerId: ID!, $agentId: ID!, $limit: Int) {
|
|
1265
|
-
getCIStatus(providerId: $providerId, agentId: $agentId, limit: $limit) { ${Sr} }
|
|
1266
|
-
}
|
|
1267
1315
|
`,Er=`
|
|
1268
|
-
query GetCIPipelineRuns($providerId: ID!, $agentId: ID!, $branch: String, $limit: Int) {
|
|
1269
|
-
getCIPipelineRuns(providerId: $providerId, agentId: $agentId, branch: $branch, limit: $limit) {
|
|
1270
|
-
${st}
|
|
1271
|
-
}
|
|
1272
|
-
}
|
|
1273
|
-
`,Tr=`
|
|
1274
|
-
query GetCIPipelineDetails($providerId: ID!, $agentId: ID!, $runId: ID!) {
|
|
1275
|
-
getCIPipelineDetails(providerId: $providerId, agentId: $agentId, runId: $runId) {
|
|
1276
|
-
${st}
|
|
1277
|
-
commitSha commitMessage
|
|
1278
|
-
jobs { id name status conclusion startedAt completedAt durationSeconds }
|
|
1279
|
-
}
|
|
1280
|
-
}
|
|
1281
|
-
`,br=`
|
|
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) { ${Sr} }
|
|
1292
|
-
}
|
|
1293
|
-
`,Ar=`
|
|
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
|
-
`,Cr=`
|
|
1303
|
-
query ListGitopsProviders($filter: GitopsProviderFilterInput, $pagination: PaginationInput) {
|
|
1304
|
-
listGitopsProviders(filter: $filter, pagination: $pagination) {
|
|
1305
|
-
items { ${tt} } total hasMore
|
|
1306
|
-
}
|
|
1307
|
-
}
|
|
1308
|
-
`,Dr=`
|
|
1309
|
-
query GetGitopsProvider($id: ID!) { getGitopsProvider(id: $id) { ${tt} } }
|
|
1310
|
-
`,Or=`
|
|
1311
|
-
mutation CreateGitopsProvider($input: CreateGitopsProviderInput!) {
|
|
1312
|
-
createGitopsProvider(input: $input) { ${tt} }
|
|
1313
|
-
}
|
|
1314
|
-
`,$r=`
|
|
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
|
-
`,wr=`
|
|
1321
1316
|
theme uiDensity sidebarCollapsed codeFont codeFontSize
|
|
1322
1317
|
preferredIdeCommand defaultAgentForVibe vibeIdeOverrides vibeDetailTabOrder
|
|
1323
|
-
`,
|
|
1318
|
+
`,Tr=`
|
|
1324
1319
|
emailDigest digestFrequency agentOffline sessionError vibeStatusChange
|
|
1325
|
-
`,
|
|
1320
|
+
`,br=`
|
|
1326
1321
|
defaultAgent defaultSessionType defaultVibeType defaultEnvironmentVariables
|
|
1327
1322
|
autoStartSessions autoGitSync agentHeartbeatInterval agentMaxSessions
|
|
1328
1323
|
agentAutoReconnect autoUpdate telemetryEnabled logLevel
|
|
1329
|
-
`,
|
|
1324
|
+
`,hr="id key value isSecret createdAt updatedAt",Ar=`
|
|
1330
1325
|
query MySettings {
|
|
1331
1326
|
mySettings {
|
|
1332
|
-
preferences { ${
|
|
1333
|
-
notifications { ${
|
|
1334
|
-
workspaceDefaults { ${
|
|
1327
|
+
preferences { ${Er} }
|
|
1328
|
+
notifications { ${Tr} }
|
|
1329
|
+
workspaceDefaults { ${br} }
|
|
1335
1330
|
profile { displayName avatar bio language timezone }
|
|
1336
1331
|
security { mfaEnabled sessionTimeout activeSessions }
|
|
1337
1332
|
}
|
|
1338
1333
|
}
|
|
1339
|
-
`,
|
|
1334
|
+
`,Cr=`
|
|
1340
1335
|
query MySettingsByCategory($category: SettingsCategory!) {
|
|
1341
1336
|
mySettingsByCategory(category: $category)
|
|
1342
1337
|
}
|
|
1343
|
-
`,
|
|
1344
|
-
query ListSettingsSecrets { listSettingsSecrets { ${
|
|
1345
|
-
`,
|
|
1338
|
+
`,Dr=`
|
|
1339
|
+
query ListSettingsSecrets { listSettingsSecrets { ${hr} } }
|
|
1340
|
+
`,wr=`
|
|
1346
1341
|
mutation SetSettingsSecret($input: SetSettingsSecretInput!) {
|
|
1347
|
-
setSettingsSecret(input: $input) { ${
|
|
1342
|
+
setSettingsSecret(input: $input) { ${hr} }
|
|
1348
1343
|
}
|
|
1349
|
-
`,
|
|
1344
|
+
`,Or=`
|
|
1350
1345
|
mutation DeleteSettingsSecret($key: String!) { deleteSettingsSecret(key: $key) }
|
|
1351
|
-
|
|
1346
|
+
`,$r=`
|
|
1352
1347
|
mutation ResetSettings($category: SettingsCategory!) { resetSettings(category: $category) }
|
|
1353
|
-
`,
|
|
1348
|
+
`,kr=`
|
|
1354
1349
|
mutation UpdatePreferences($input: UpdatePreferencesInput!) {
|
|
1355
|
-
updatePreferences(input: $input) { ${
|
|
1350
|
+
updatePreferences(input: $input) { ${Er} }
|
|
1356
1351
|
}
|
|
1357
|
-
`,
|
|
1352
|
+
`,vr=`
|
|
1358
1353
|
mutation UpdateNotificationPreferences($input: UpdateNotificationPreferencesInput!) {
|
|
1359
|
-
updateNotificationPreferences(input: $input) { ${
|
|
1354
|
+
updateNotificationPreferences(input: $input) { ${Tr} }
|
|
1360
1355
|
}
|
|
1361
|
-
`,
|
|
1356
|
+
`,_r=`
|
|
1362
1357
|
mutation UpdateWorkspaceDefaults($input: UpdateWorkspaceDefaultsInput!) {
|
|
1363
|
-
updateWorkspaceDefaults(input: $input) { ${
|
|
1358
|
+
updateWorkspaceDefaults(input: $input) { ${br} }
|
|
1364
1359
|
}
|
|
1365
|
-
`,
|
|
1366
|
-
|
|
1360
|
+
`,Nr=`
|
|
1361
|
+
query VibecontrolsResolveIntegrationToken($connectionId: ID!) {
|
|
1367
1362
|
vibecontrolsResolveIntegrationToken(connectionId: $connectionId) {
|
|
1368
1363
|
success connectionStatus wasRefreshed error
|
|
1369
1364
|
token {
|
|
@@ -1371,9 +1366,10 @@
|
|
|
1371
1366
|
}
|
|
1372
1367
|
}
|
|
1373
1368
|
}
|
|
1374
|
-
`;function Mr(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(At,{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(Ct,{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(Dt,{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($t,{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(Ot,{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(wt,{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(kt,{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(_t,{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(Rt,{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(Nt,{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(xt,{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(Ut,{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(Lt,{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(Pt,{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(Vt,{rootAgentId:n.rootAgentId,workspaceId:t?.workspaceId});d(n,e.agentGraph);}catch(t){a(t);}});}function Hr(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(Gt,{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(qt,{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(Bt,{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(Ft,{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(Mt,{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(Ht,{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(Kt,{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(Wt,{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(jt,{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(Yt,{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(Jt,{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(Xt,{id:n,input:e});c("Vibe git info updated"),d({},o.updateVibeGit);}catch(e){a(e);}});}function Kr(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(zt,{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(Qt,{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(Zt,{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(te,{id:n}),c("Session started");}catch(t){a(t);}}),i.command("stop").description("Stop session").argument("<id>").action(async n=>{try{await r(ee,{id:n}),c("Session stopped");}catch(t){a(t);}}),i.command("restart").description("Restart session").argument("<id>").action(async n=>{try{await r(ne,{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(oe,{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(ie,{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(re,{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(ae,{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(se,{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(de,{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(pe);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(ue,{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(me,{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(ge,{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(le,{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(fe,{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(Ie,{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(Se,{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(ye,{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(Ee,{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(Te,{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(be,{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(Ae,{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(Ce);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(ce,{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(De,{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(Oe,{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($e,{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(Li,{input:{filter:Object.keys(t).length?t:void 0,format:e}});process.stdout.write(o.exportSessions.data),o.exportSessions.data.endsWith(`
|
|
1369
|
+
`;function Rr(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(Dt,{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=>[l(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(wt,{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(ct,{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(Ot,{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 f("Delete this agent?",t.force))return;await r($t,{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(vt,{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(_t)).vibecontrolsAgentHealthProbes;d(n,e,{headers:["Agent","Name","Healthy","Version","Uptime"],rows:e.map(o=>[l(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(kt,{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(Nt,{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(Rt,{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(xt,{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").requiredOption("--platform <p>","Platform (e.g. linux, darwin)").requiredOption("--arch <a>","Architecture (e.g. x64, arm64)").requiredOption("--agent-version <v>","Agent version").option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(ct,{input:{hostname:n.hostname,name:n.name,platform:n.platform,architecture:n.arch,version:n.agentVersion}});c("Agent registered"),d(n,t.registerVibecontrolsAgent);}catch(t){a(t);}}),i.command("deactivate").description("Deactivate agent").argument("<id>","Agent ID").action(async n=>{try{await r(Ut,{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").option("--scopes <scopes>","Comma-separated OAuth scopes","").option("--workspace-gateway-url <url>","Workspace gateway URL (default: configured endpoint)").option("--global-gateway-url <url>","Global gateway URL (default: configured endpoint)").option("--workspace-id <id>","Workspace ID (default: current workspace)").action(async n=>{try{let t=W(),e=n.workspaceGatewayUrl??t.workspaceEndpoint,o=n.globalGatewayUrl??t.globalEndpoint;if(!e||!o)throw new m("Pass --workspace-gateway-url and --global-gateway-url, or configure both endpoints.");let s=n.workspaceId??O()?.workspaceId;if(!s)throw new m("No workspace selected. Pass --workspace-id or run `workspace set <id>`.");await r(Lt,{input:{agentId:n.agentId,clientId:n.clientId,clientSecret:n.clientSecret,scopes:n.scopes.split(",").map(u=>u.trim()).filter(Boolean),workspaceGatewayUrl:e,globalGatewayUrl:o,workspaceId:s}}),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(Pt,{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(Vt,{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 (SSH, RDP, VNC, DIRECT)").action(async(n,t,e)=>{try{await r(Gt,{sourceAgentId:n,targetId:t,protocol:e.protocol.toUpperCase()}),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(Bt,{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=O(),e=await r(qt,{rootAgentId:n.rootAgentId,workspaceId:t?.workspaceId});d(n,e.agentGraph);}catch(t){a(t);}});}function xr(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.attachedAgentIds=[n.agent]);let o=(await r(Ft,{filter:Object.keys(t).length?t:void 0})).vibes.items;d(n,o,{headers:["ID","Name","Type","Status","Path","Created"],rows:o.map(s=>[l(s.id,12),s.name,s.type,b(s.status),l(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(Mt,{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(Ht,{input:{name:n.name,path:n.path,type:n.type.toUpperCase(),description:n.description}});if(n.agent)try{await r(Xt,{input:{vibeId:t.createVibe.id,agentId:n.agent}});}catch(e){let o=e instanceof Error?e.message:String(e);throw new m(`Vibe ${t.createVibe.id} was created, but attaching agent ${n.agent} failed: ${o}`)}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(Wt,{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 f("Delete this vibe?",t.force))return;await r(Kt,{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(jt,{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(Yt,{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(zt,{query:n,pagination:t.limit===void 0?void 0:{limit:t.limit}});d(t,e.searchVibes.items);}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(Qt,{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(Zt,{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(te,{id:n,input:e});c("Vibe git info updated"),d({},o.updateVibeGit);}catch(e){a(e);}});}function Ur(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(ee,{filter:Object.keys(t).length?t:void 0})).sessions.items;d(n,o,{headers:["ID","Name","Type","Status","Agent","Started"],rows:o.map(s=>[l(s.id,12),s.name,s.type,b(s.status),l(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(ne,{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(oe,{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(ie,{id:n}),c("Session started");}catch(t){a(t);}}),i.command("stop").description("Stop session").argument("<id>").action(async n=>{try{await r(re,{id:n}),c("Session stopped");}catch(t){a(t);}}),i.command("restart").description("Restart session").argument("<id>").action(async n=>{try{await r(ae,{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 f("Terminate this session?",t.force))return;await r(se,{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(ce,{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(de,{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(pe,{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(ue,{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(ge,{vibeId:n.vibe});d(n,t.activeSessions.items);}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(le);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("--email <email>","Email of the user to share with").option("--permission <p>","Permission (VIEW/INTERACT)","VIEW").option("--message <m>","Message for the recipient").action(async(n,t)=>{try{await r(fe,{input:{sessionId:n,sharedWithEmail:t.email,permission:t.permission.toUpperCase(),message:t.message}}),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(Ie,{input:{sessionId:n,permission:t.permission.toUpperCase()}});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(Se,{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(ye,{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(Ee,{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(Te,{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(be,{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(he,{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(Ae,{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(Ce,{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(De,{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(we,{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(Oe,{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($e);d(n,t.sessionsSharedWithMe.edges.map(e=>e.node));}catch(t){a(t);}}),i.command("restart-terminal").description("Restart session terminal").argument("<id>","Session ID").action(async n=>{try{await r(me,{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(ke,{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(ve,{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 f("Terminate these sessions?",n.force))return;await r(_e,{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(Vi,{input:{filter:Object.keys(t).length?t:void 0,format:e}});process.stdout.write(o.exportSessions.data),o.exportSessions.data.endsWith(`
|
|
1375
1370
|
`)||process.stdout.write(`
|
|
1376
|
-
`),c(`Exported ${o.exportSessions.count} sessions (${o.exportSessions.format})`);}catch(t){a(t);}});}function Wr(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(we,{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(ke,{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(_e,{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(Re,{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(Ne,{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(xe,{id:n}),c("Note pinned");}catch(t){a(t);}}),i.command("unpin").description("Unpin a note").argument("<id>").action(async n=>{try{await r(Ue,{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(Le,{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(Pe,{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(Ve,{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(Ge,{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(qe,{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(Be,{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(Fe,{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(Me,{ids:n.ids.split(",").map(t=>t.trim())}),c("Notes deleted");}catch(t){a(t);}});}function jr(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 Yr(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(er);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(gr,{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"?ir:or,M=await r(g,{filter:Object.keys(u).length>0?u:void 0,pagination:jr(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(nr,{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(dr,{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(pr,{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(rr,{filter:Object.keys(u).length>0?u:void 0,pagination:jr(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(lr,{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(ar,{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(sr,{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(cr,{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(fa=>fa.trim().toUpperCase())),u.pluginAssignments&&(g.pluginAssignments=JSON.parse(u.pluginAssignments)),u.configYamlEquivalent&&(g.configYamlEquivalent=JSON.parse(u.configYamlEquivalent));let M=await r(fr,{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(ur,{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(mr,{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(Ir,{scanRunId:s.scanRunId,sha256:s.sha256,sizeBytes:Number(s.sizeBytes),type:s.type.toUpperCase()});d(s,u.presignSecurityEvidence);}catch(u){a(u);}});}function Jr(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(yr,{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(Er,{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(Tr,{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(br,{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(Ar,{providerId:e.providerId,agentId:e.agentId});c("Repo stats refreshed"),d(e,o.refreshRepoStats);}catch(o){a(o);}});}function Xr(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(Cr,{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(Dr,{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(Or,{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($r,{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 zr(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(Nr);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(xr,{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(Vr,{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(Gr,{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(qr,{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(Br,{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(Ur);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(Lr,{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(Pr,{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(Fr,{connectionId:t});d(e,o.vibecontrolsResolveIntegrationToken);}catch(o){a(o);}});}function Qr(p){let i=p.command("config").description("Backend configuration management");Yr(i),Jr(i),Xr(i),zr(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(He,{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(Ke,{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(je,{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(Ye,{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(We,{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(Je,{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(Xe,{keys:n.keys.split(",").map(t=>t.trim()),scope:n.scope.toUpperCase(),scopeId:n.scopeId}),c("Configs deleted");}catch(t){a(t);}});}function Zr(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(ze,{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(Qe,{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(Ze,{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(tn,{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(en,{id:n}),c("Webhook deleted");}catch(e){a(e);}}),i.command("test").description("Test webhook").argument("<id>").action(async n=>{try{await r(nn,{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(on);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(rn,{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(an,{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(sn,{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 ct(p){return (p??"PROD").toUpperCase()==="ALPHA"?"ALPHA":"PROD"}function ta(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(pn);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(cn,{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(dn,{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:ct(t.env)},o=await r(un,{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(ln,{id:t}),c("Tunnel started");}catch(e){a(e);}}),i.command("stop").description("Stop a tunnel").argument("<id>").action(async t=>{try{await r(fn,{id:t}),c("Tunnel stopped");}catch(e){a(e);}}),i.command("rotate").description("Rotate tunnel credentials").argument("<id>").action(async t=>{try{await r(In,{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(gn,{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(yn,{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(Sn,{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(En,{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(Dn,{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(Tn,{input:{label:t.label,environment:ct(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(bn,{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(An,{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(Cn,{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($n,{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(Rn,{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(On,{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(mn,{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(wn,{environment:t.env?ct(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(kn,{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(_n,{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(Nn,{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(xn,{input:e});d(t,o);}catch(e){a(e);}});}function ea(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(Un);d(n,t.uiSession);}catch(t){a(t);}}),i.command("clear").description("Clear UI session").action(async()=>{try{await r(Pn),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(Ln,{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(Vn,{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(Gn,{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(qn,{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(Bn,{sessionId:n}),c("Recent session added");}catch(t){a(t);}});}function na(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(", ")}`);It(n,t),c(`${n} = ${t}`);}),i.command("get").description("Get CLI config value").argument("<key>").action(n=>{let t=ft(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=lt();if(n.format==="json"){mt(t);return}let e=Object.entries(t).filter(([,o])=>o!==void 0);gt(["Key","Value"],e.map(([o,s])=>[o,String(s)]));}),i.command("path").description("Show config file path").action(()=>{console.log(St());});}function oa(){let p=H()?.workspaceId;if(!p)throw new m("No workspace set. Run: vibecontrols workspace set <id>");return p}function ia(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=oa(),e={};n.type&&(e.type=n.type.toUpperCase());let s=(await r(Fn,{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(Mn,{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=oa(),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(Hn,{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(Kn,{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(Wn,{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(jn,{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(Yn,{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(Jn,{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(Xn,{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(zn,{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(Qn,{sessionId:n}),c("Terminal stopped");}catch(t){a(t);}});}function ra(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(Zn)).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(to,{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(eo);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(no,{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(oo,{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(io,{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(ro,{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(ao,{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(so,{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(co,{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(po,{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(uo,{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(mo,{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(go,{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(lo,{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(fo,{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(Ki,{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(Wi,{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(ji,{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(Yi,{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(Ji,{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(Xi,{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(zi,{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 aa(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(_o,{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(Ro,{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(No,{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(xo,{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(Uo,{beforeDate:n.beforeDate});c("Old AI tool events deleted"),d({},t.deleteOldAiToolEvents);}catch(t){a(t);}});}function sa(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(Lo)).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(Po,{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(Vo,{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(Go,{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(qo,{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(Bo,{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(Fo,{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(Mo,{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(Ho,{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(Ko,{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(Wo,{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(jo,{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(Yo,{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(Jo,{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(Xo,{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(zo,{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(Qo,{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(Zo,{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(ti,{siteId:n});console.log(t.generateDocsSignedUrl);}catch(t){a(t);}});}function ca(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(ei,{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(ni,{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(oi,{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(ii,{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(ri,{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(ai,{filter:Object.keys(t).length?t:void 0,exportFormat:n.exportFormat});console.log(e.exportVibeAuditLogs);}catch(t){a(t);}});}function da(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(Io,{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(So,{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(yo,{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(Eo,{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(To,{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(bo,{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(Ao,{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(Do,{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(Co,{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(Oo,{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(wo,{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(ko,{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(Pi,{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(Vi,{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(Gi,{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(qi,{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(Bi,{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(Fi,{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(Mi,{id:t,variables:o});process.stdout.write(s.renderAIPrompt.rendered),s.renderAIPrompt.rendered.endsWith(`
|
|
1371
|
+
`),c(`Exported ${o.exportSessions.count} sessions (${o.exportSessions.format})`);}catch(t){a(t);}});}function Lr(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(Ne,{filter:Object.keys(t).length?t:void 0});d(n,e.notes.items,{headers:["ID","Title","Pinned","Visibility","Created"],rows:e.notes.items.map(o=>[l(o.id,12),o.title,o.isPinned?"Yes":"No",o.visibility??"-",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(Re,{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(xe,{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(Ue,{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 f("Delete this note?",t.force))return;await r(Le,{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(Pe,{query:n,vibeId:t.vibe,pagination:t.limit===void 0?void 0:{limit:t.limit}});d(t,e.searchNotes.items);}catch(e){a(e);}}),i.command("pin").description("Pin a note").argument("<id>").action(async n=>{try{await r(Ve,{id:n}),c("Note pinned");}catch(t){a(t);}}),i.command("unpin").description("Unpin a note").argument("<id>").action(async n=>{try{await r(Ge,{id:n}),c("Note unpinned");}catch(t){a(t);}}),i.command("tag").description("Tag a note").argument("<noteId>","Note ID").argument("<tagId>","Tag ID (see available-tags)").action(async(n,t)=>{try{await r(Be,{input:{noteId:n,tagId:t}}),c("Note tagged");}catch(e){a(e);}}),i.command("untag").description("Remove tag from note").argument("<noteId>","Note ID").argument("<tagId>","Tag ID").action(async(n,t)=>{try{await r(qe,{input:{noteId:n,tagId: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 <tagIds>","Tag IDs (comma-separated)").action(async(n,t)=>{try{await r(Fe,{input:{noteId:n,tagIds:t.tags.split(",").map(e=>e.trim()).filter(Boolean)}}),c("Tags replaced");}catch(e){a(e);}}),i.command("create-tag").description("Create a note tag").argument("<label>","Tag label").option("--color <color>","Tag colour").action(async(n,t)=>{try{let e=await r(Me,{input:{label:n,color:t.color}});c(`Tag created (${e.createNoteTag.id})`);}catch(e){a(e);}}),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(He,{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(We,{input:{noteId:n}});d(t,e.getNoteTags);}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(Ke,{noteId:n,limit:t.limit});d(t,e.getRelatedNoteTags);}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 f("Delete these notes?",n.force))return;await r(je,{ids:n.ids.split(",").map(t=>t.trim())}),c("Notes deleted");}catch(t){a(t);}});}function Pr(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 Vr(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(or);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(fr,{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"?ar:rr,D=await r(g,{filter:Object.keys(u).length>0?u:void 0,pagination:Pr(s)});d(s,s.scope==="all"?D.allSecurityScans:D.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(ir,{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(ur,{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(mr,{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(sr,{filter:Object.keys(u).length>0?u:void 0,pagination:Pr(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(Ir,{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(cr,{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(dr,{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(pr,{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(et=>et.trim().toUpperCase())),u.pluginAssignments&&(g.pluginAssignments=JSON.parse(u.pluginAssignments)),u.configYamlEquivalent&&(g.configYamlEquivalent=JSON.parse(u.configYamlEquivalent));let D=await r(Sr,{vibeId:s,input:g});c("Repository security config updated"),d(u,D.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(gr,{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 f(`Revoke exception ${s}?`,u.force))return;await r(lr,{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(yr,{scanRunId:s.scanRunId,sha256:s.sha256,sizeBytes:Number(s.sizeBytes),type:s.type.toUpperCase()});d(s,u.presignSecurityEvidence);}catch(u){a(u);}});}function Gr(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(Ar);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(Cr,{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 f(`Reset ${t}?`,e.force))return;await r($r,{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(kr,{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(vr,{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(_r,{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(Dr);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(wr,{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 f(`Delete secret ${t}?`,e.force))return;await r(Or,{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(Nr,{connectionId:t});d(e,o.vibecontrolsResolveIntegrationToken);}catch(o){a(o);}});}function Br(p){let i=p.command("config").description("Backend configuration management");Vr(i),Gr(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(Ye,{scope:n.scope.toUpperCase(),scopeId:n.scopeId});d(n,t.configurationsByScope.items);}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(Je,{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(ze,{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(Qe,{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(Xe,{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(Ze,{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 f("Delete these configs?",n.force))return;await r(tn,{keys:n.keys.split(",").map(t=>t.trim()),scope:n.scope.toUpperCase(),scopeId:n.scopeId}),c("Configs deleted");}catch(t){a(t);}});}function qr(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(en,{filter:t});d(n,e.webhooks.items,{headers:["ID","Name","URL","Active","Events","Deliveries"],rows:e.webhooks.items.map(o=>[l(o.id,12),o.name,l(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(nn,{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(on,{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(rn,{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 f("Delete this webhook?",t.force))return;await r(an,{id:n}),c("Webhook deleted");}catch(e){a(e);}}),i.command("test").description("Test webhook").argument("<id>").action(async n=>{try{await r(sn,{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(cn);d(n,t.activeWebhooks.items);}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(dn,{event:n});d(t,e.webhooksByEvent.items);}catch(e){a(e);}}),i.command("trigger").description("Trigger webhook").argument("<id>").option("--payload <json>","JSON payload").action(async(n,t)=>{try{await r(pn,{id:n,payload:t.payload?JSON.parse(t.payload):{}}),c("Webhook triggered");}catch(e){a(e);}}),i.command("reset-failures").description("Reset webhook failures").argument("<id>").action(async n=>{try{await r(un,{id:n}),c("Webhook failures reset");}catch(t){a(t);}});}function Ia(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 pt(p){return (p??"PROD").toUpperCase()==="ALPHA"?"ALPHA":"PROD"}function Fr(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(ln);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(mn,{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(`
|
|
1372
|
+
${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(gn,{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:Ia(t.protocol),localPort:t.port,localHost:t.host,managedSubdomain:t.subdomain,environment:pt(t.env)},o=await r(fn,{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(yn,{id:t}),c("Tunnel started");}catch(e){a(e);}}),i.command("stop").description("Stop a tunnel").argument("<id>").action(async t=>{try{await r(En,{id:t}),c("Tunnel stopped");}catch(e){a(e);}}),i.command("rotate").description("Rotate tunnel credentials").argument("<id>").action(async t=>{try{await r(Tn,{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 f("Delete this tunnel?",e.force))return;await r(Sn,{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(hn,{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(bn,{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(An,{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(kn,{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(Cn,{input:{label:t.label,environment:pt(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(Dn,{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(wn,{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(On,{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($n,{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(_n,{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 f("Delete this tunnel domain?",e.force))return;await r(Ln,{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(vn,{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(In,{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(Nn,{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(Rn,{environment:t.env?pt(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(xn,{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(Un,{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(Pn,{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(Vn,{input:e});d(t,o);}catch(e){a(e);}});}function Mr(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(Gn);d(n,t.uiSession);}catch(t){a(t);}}),i.command("clear").description("Clear UI session").action(async()=>{try{await r(qn),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(Bn,{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(Fn,{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(Mn,{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(Hn,{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(Wn,{sessionId:n}),c("Recent session added");}catch(t){a(t);}});}function Hr(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(!rt.includes(n))throw new m(`Unknown key: ${n}. Valid keys: ${rt.join(", ")}`);yt(n,t),c(`${n} = ${t}`);}),i.command("get").description("Get CLI config value").argument("<key>").action(n=>{let t=St(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=W();if(n.format==="json"){ft(t);return}let e=Object.entries(t).filter(([,o])=>o!==void 0);It(["Key","Value"],e.map(([o,s])=>[o,String(s)]));}),i.command("path").description("Show config file path").action(()=>{console.log(Et());});}function Wr(){let p=O()?.workspaceId;if(!p)throw new m("No workspace set. Run: vibecontrols workspace set <id>");return p}function Kr(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=Wr(),e={};n.type&&(e.type=n.type.toUpperCase());let s=(await r(Kn,{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=>[l(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(jn,{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("--label <l>","Display label").option("--agent-id <id>","Agent that reaches this target").option("-f, --format <format>","Output format").action(async n=>{try{let t=Wr(),e={name:n.name,type:n.type.toUpperCase(),host:n.host,port:n.port};n.username&&(e.username=n.username),n.label&&(e.label=n.label),n.agentId&&(e.sourceAgentId=n.agentId);let o=await r(Yn,{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(Jn,{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 f("Delete this target?",t.force))return;await r(Xn,{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(zn,{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(Qn,{agentId:n.agentId,configPath:n.configPath});c(`Found ${t.scanSSHConfig.total} host(s) in ${t.scanSSHConfig.configPath}`),d(n,t.scanSSHConfig.hosts);}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 e=(await r(Zn,{sourceAgentId:n.sourceAgentId,targetId:n.targetId,agentPort:n.agentPort})).installAgentOnTarget;c(`Agent install started (job ${e.jobId}, connection ${e.connectionId}, status ${e.status})`);}catch(t){a(t);}}),i.command("uninstall-agent").description("Uninstall agent from target").argument("<targetId>","Target ID").action(async n=>{try{(await r(to,{targetId:n})).uninstallAgentFromTarget?c("Agent uninstalled from target"):T("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(eo,{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(no,{sessionId:n}),c("Terminal stopped");}catch(t){a(t);}});}function jr(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(oo)).vibeDecks.items;d(t,o,{headers:["ID","Name","Default","Created"],rows:o.map(s=>[l(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(io,{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(ro);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(ao,{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(so,{id:t,input:o});c("VibeDeck updated"),d(e,s.updateVibeDeck);}catch(o){a(o);}}),i.command("duplicate").description("Duplicate vibedeck").argument("<id>").requiredOption("--name <n>","Name of the copy").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await r(co,{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 f("Delete this VibeDeck?",e.force))return;await r(po,{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(uo,{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(mo,{filter:{vibeDeckId:t.deckId}})).vibeDeckButtons.items;d(t,o,{headers:["ID","Label","Action","Type","Position"],rows:o.map(s=>{let u=s.action;return [l(s.id,12),s.label,l(u?.name??"-",30),u?.actionType??"-",`${s.row},${s.column}`]})});}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(go,{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 a vibedeck button bound to an action (see `action create`)").requiredOption("--deck-id <id>","VibeDeck ID").requiredOption("--label <l>","Label").requiredOption("--action-id <id>","Action the button runs").option("--row <n>","Row position",parseInt,0).option("--column <n>","Column position",parseInt,0).option("--icon <i>","Icon").option("--color <c>","Color").option("--category <c>","Category").option("--confirm","Ask for confirmation before running").option("-f, --format <format>","Output format").action(async t=>{try{let e={vibeDeckId:t.deckId,label:t.label,actionId:t.actionId,row:t.row,column:t.column};t.icon&&(e.icon=t.icon),t.color&&(e.color=t.color),t.category&&(e.category=t.category),t.confirm&&(e.confirmationRequired=!0);let o=await r(lo,{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("--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.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(fo,{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 f("Delete this button?",e.force))return;await r(Io,{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(So,{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(yo,{vibeDeckId:t,input:{positions:o}});c("Buttons reordered"),d(e,s.reorderVibeDeckButtons);}catch(o){a(o);}}),i.command("execute-button").description("Execute vibedeck button").argument("<id>").option("--agent-id <id>","Agent to run the action on (default: the action target)").action(async(t,e)=>{try{let s=(await r(Eo,{id:t,agentId:e.agentId})).executeVibeDeckButton;if(it(s))throw new m(s.output??`Execution failed (${s.status})`);c(s.output??"Button executed successfully");}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(ji,{vibeDeckId:t});d(e,o.vibeDeckShareLinks,{headers:["ID","Name","Permission","Status","Visibility","Uses","Expires"],rows:o.vibeDeckShareLinks.map(s=>[l(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(Yi,{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(Ji,{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 f("Revoke this share-link?",e.force))return;await r(Xi,{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(zi,{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(Qi,{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(Zi,{token:t,buttonId:e.buttonId,password:e.password})).executeSharedVibeDeckButton;if(it(s))throw new m(s.output??`Execution failed (${s.status})`);c(s.output??"Executed");}catch(o){a(o);}});}function Yr(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("--source <source>","Filter by source (e.g. claude-code)").option("--event-type <type>","Filter by event type").option("-f, --format <format>","Output format").action(async n=>{try{let t={};n.agentId&&(t.agentId=n.agentId),n.source&&(t.source=n.source),n.eventType&&(t.eventType=n.eventType);let o=(await r(Uo,{filter:Object.keys(t).length?t:void 0})).aiToolEvents.items;d(n,o,{headers:["ID","Source","Event Type","Agent","Created"],rows:o.map(s=>[l(s.id,12),s.source,s.eventType,l(s.agentId,12),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(Lo,{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(Po,{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("--source <source>","Event source (e.g. claude-code)").requiredOption("--event-type <type>","Event type").option("--payload <json>","Event payload as JSON").option("-f, --format <format>","Output format").action(async n=>{try{let t;if(n.payload)try{t=JSON.parse(n.payload);}catch{throw new m("Invalid JSON for --payload")}let e=await r(Vo,{input:{agentId:n.agentId,source:n.source,eventType:n.eventType,payload:t}});c("AI tool event created"),d(n,e.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 f(`Delete all AI tool events before ${n.beforeDate}?`,n.force))return;let t=await r(Go,{beforeDate:n.beforeDate});c("Old AI tool events deleted"),d({},t.deleteOldAiToolEvents);}catch(t){a(t);}});}function Jr(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(Bo)).docsSites.items;d(n,e,{headers:["ID","Vibe ID","Name","Visibility","Created"],rows:e.map(o=>[l(o.id,12),l(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(qo,{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("--owner-id <id>","ID of the vibe, catalog or component the site documents").option("--owner-type <t>","Owner type (VIBE, CATALOG, COMPONENT)","VIBE").requiredOption("--name <name>","Site name").option("--visibility <v>","Visibility (PRIVATE/PUBLIC)").option("-f, --format <format>","Output format").action(async n=>{try{let t=await r(Fo,{input:{ownerId:n.ownerId,ownerType:n.ownerType.toUpperCase(),name:n.name,visibility:n.visibility?.toUpperCase()}});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("--tags <tags>","Tags (comma-separated)").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e={};if(t.name&&(e.name=t.name),t.tags&&(e.tags=t.tags.split(",").map(s=>s.trim()).filter(Boolean)),!Object.keys(e).length)throw new m("No updates specified");let o=await r(Mo,{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(Ho,{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 f("Delete this docs site?",t.force))return;await r(Wo,{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(Ko,{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(jo,{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 (default: derived from the title)").option("--content <content>","Page content (Markdown)","").option("--parent-id <id>","Parent page ID").option("-f, --format <format>","Output format").action(async n=>{try{let t=n.slug??n.title.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");if(!t)throw new m("Pass --slug: the title has no usable characters");let e=await r(Yo,{input:{siteId:n.siteId,title:n.title,slug:t,content:n.content,parentId:n.parentId}});c("Page created"),d(n,e.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(Jo,{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 f("Delete this page?",t.force))return;await r(Xo,{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: [{"id","sidebarPosition","parentId?"}]').option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=JSON.parse(t.pages),o=await r(zo,{siteId:n,input:{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(Qo,{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(Zo,{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(ti,{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(ei,{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(ni,{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 f(`Rollback site to revision ${t}?`,e.force))return;let o=await r(oi,{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(ii,{siteId:n});console.log(t.generateDocsSignedUrl);}catch(t){a(t);}});}function Xr(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.toUpperCase()),n.resourceType&&(t.resourceType=n.resourceType.toUpperCase()),n.status&&(t.status=n.status.toUpperCase()),n.actorId&&(t.actorId=n.actorId),n.from&&(t.dateFrom=n.from),n.to&&(t.dateTo=n.to);let o=(await r(ri,{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=>[l(s.id,12),s.action,s.resourceType,l(s.resourceId,12),l(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(ai,{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.toUpperCase()),n.resourceType&&(t.resourceType=n.resourceType.toUpperCase()),n.status&&(t.status=n.status.toUpperCase()),n.actorId&&(t.actorId=n.actorId),n.from&&(t.dateFrom=n.from),n.to&&(t.dateTo=n.to);let e=await r(si,{filter:Object.keys(t).length?t:void 0});d(n,e.vibeAuditLogStats);}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.toUpperCase()),n.resourceType&&(t.resourceType=n.resourceType.toUpperCase()),n.status&&(t.status=n.status.toUpperCase()),n.actorId&&(t.actorId=n.actorId),n.from&&(t.dateFrom=n.from),n.to&&(t.dateTo=n.to);let e=n.exportFormat.toUpperCase();if(e!=="CSV"&&e!=="JSON")throw new m("--export-format must be csv or json");let o=await r(ci,{input:{filter:Object.keys(t).length?t:void 0,format:e}});e==="JSON"?lt().printJson(JSON.parse(o.exportVibeAuditLogs.data)):process.stdout.write(`${o.exportVibeAuditLogs.data}
|
|
1373
|
+
`);}catch(t){a(t);}});}function zr(){let p=O()?.workspaceId;if(!p)throw new m("No workspace selected. Run `workspace set <id>` first.");return p}function Qr(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(To,{filter:Object.keys(e).length?e:void 0})).actions.items;d(t,s,{headers:["ID","Name","Type","Trigger","Source","Category"],rows:s.map(u=>[l(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(bo,{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(ho,{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(Ao,{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 f("Delete this action?",e.force))return;await r(Co,{id:t}),c("Action deleted");}catch(o){a(o);}}),i.command("duplicate").description("Duplicate action").argument("<id>").argument("<name>","Name of the copy").option("-f, --format <format>","Output format").action(async(t,e,o)=>{try{let s=await r(Do,{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(wo,{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(Oo,{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(ko,{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=>[l(g.id,12),l(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($o,{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(vo,{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(No,{workspaceId:zr(),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 f("Delete this scheduled job?",e.force))return;await r(Ro,{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=zr(),o=g=>r(xo,{workspaceId:e,pagination:g?{after:g}:void 0}),s=(await o()).scheduledJobs,u=s.jobs;if(t.actionId){let g=[...s.jobs],D=new Set;for(;s.nextCursor&&!D.has(s.nextCursor);)D.add(s.nextCursor),s=(await o(s.nextCursor)).scheduledJobs,g.push(...s.jobs);u=g.filter(et=>et.actionId===t.actionId);}d(t,u,{headers:["ID","Name","Type","Status","Action ID","Cron","Next Run"],rows:u.map(g=>[l(g.id,12),g.name??"-",g.scheduleType,b(g.status),l(g.actionId,12),g.cronExpression??"-",g.nextExecutionAt?S(g.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(Gi,{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=>[l(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(Bi,{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(Fi,{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 f("Delete this prompt?",e.force))return;await r(Mi,{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(Hi,{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(Wi,{id:t,variables:o});process.stdout.write(s.renderAIPrompt.rendered),s.renderAIPrompt.rendered.endsWith(`
|
|
1378
1374
|
`)||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(Hi,{id:t}),c("Usage recorded");}catch(e){a(e);}});}function pa(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 ua(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(ci,{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(di,{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(pi,{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(ui,{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(mi,{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(gi,{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(li,{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(fi,{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(Ii,{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(Si,{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(yi,{catalogId:n.catalog,vibeId:n.vibe}),c(`Vibe ${n.vibe} removed from catalog ${n.catalog}`);}catch(t){a(t);}});}function ma(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(Ei,{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(Ti,{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(bi,{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(Ai,{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(Ci,{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(Di,{componentId:n.component,input:t});c(`Template published: ${e.publishVibecontrolsComponentAsTemplate.name} (${e.publishVibecontrolsComponentAsTemplate.id})`);}catch(t){a(t);}});}function ga(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(Oi,{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($i,{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(wi,{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(ki,{templateId:n.template,input:t});c(`Component created: ${e.instantiateVibecontrolsTemplate.name} (${e.instantiateVibecontrolsTemplate.id})`);}catch(t){a(t);}});}function la(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(_i,{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(Ri,{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(Ni,{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(xi,{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(Ui,{id:n}),c(`Metric ${n} removed`);}catch(t){a(t);}});}var wa={id:"vibecontrols",version:"1.0.0",displayName:"VibeControls",dependsOn:["auth","workspaces"],register(p,i){ut(i),Mr(p),Hr(p),Kr(p),Wr(p),Qr(p),Zr(p),ta(p),ea(p),na(p),ia(p),ra(p),aa(p),sa(p),ca(p),da(p),pa(p),ua(p),ma(p),ga(p),la(p);}},rp=wa;module.exports=rp;
|
|
1375
|
+
`);}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 Zr(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(F,{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(F,{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(F,{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(F,{input:{startDate:n.startDate,endDate:n.endDate,granularity:n.granularity,entityTypes:["ACTION"]}});d(n,t.vibecontrolsAnalytics.actions);}catch(t){a(t);}});}function ta(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(pi,{filter:Object.keys(t).length?t:void 0})).vibecontrolsCatalogs.items;d(n,o,{headers:["ID","Name","Visibility","Components","Vibes","Created"],rows:o.map(s=>[l(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(ui,{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(mi,{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(gi,{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(li,{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(fi,{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 f(`Delete catalog ${n}?`))return;await r(Ii,{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(Si,{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(yi,{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(Ei,{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(Ti,{catalogId:n.catalog,vibeId:n.vibe}),c(`Vibe ${n.vibe} removed from catalog ${n.catalog}`);}catch(t){a(t);}});}function ea(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(bi,{filter:Object.keys(t).length?t:void 0})).vibecontrolsComponents.items;d(n,o,{headers:["ID","Name","Type","Lifecycle","Version","Created"],rows:o.map(s=>[l(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(hi,{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(Ci,{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 f(`Delete component ${n}?`))return;await r(Di,{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("--visibility <v>","PRIVATE or PUBLIC","PRIVATE").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(),visibility:n.visibility.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(wi,{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 na(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=>[l(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(ki,{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 f(`Delete template ${n}?`))return;await r(_i,{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(Ni,{templateId:n.template,input:t});c(`Component created: ${e.instantiateVibecontrolsTemplate.name} (${e.instantiateVibecontrolsTemplate.id})`);}catch(t){a(t);}});}function oa(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(xi,{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(Ui,{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(Li,{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(Pi,{id:n}),c(`Metric ${n} removed`);}catch(t){a(t);}});}var Sa={id:"vibecontrols",version:"1.0.0",displayName:"VibeControls",dependsOn:["auth","workspaces"],register(p,i){gt(i),Rr(p),xr(p),Ur(p),Lr(p),Br(p),qr(p),Fr(p),Mr(p),Hr(p),Kr(p),jr(p),Yr(p),Jr(p),Xr(p),Qr(p),Zr(p),ta(p),ea(p),na(p),oa(p);}},Bd=Sa;module.exports=Bd;
|