@epilot/cli 0.1.193 → 0.1.195
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +89 -1
- package/definitions/pricing.json +44 -7
- package/dist/{access-token-CMXAXZ3R.js → access-token-Q2UGZIMP.js} +4 -4
- package/dist/{add-component-KJLVM44N.js → add-component-USRY2DQG.js} +4 -4
- package/dist/{add-function-ODBHPWP6.js → add-function-RZTEKVSB.js} +4 -4
- package/dist/{address-556I5SBF.js → address-AX4UT6BO.js} +4 -4
- package/dist/{address-suggestions-5KHWKGNW.js → address-suggestions-GMVIIZY6.js} +4 -4
- package/dist/agent-auth-A2D2R6FP.js +42 -0
- package/dist/{ai-agents-5QBOUUL5.js → ai-agents-J2ZTLDLV.js} +4 -4
- package/dist/{api-MA3KZAHZ.js → api-3L3XZYSQ.js} +4 -4
- package/dist/app-RHHZR5YW.js +26 -0
- package/dist/{audit-logs-N6ZFVTBE.js → audit-logs-VLVHBCF5.js} +4 -4
- package/dist/auth-N3CDDMDS.js +235 -0
- package/dist/auth-login-ACQGAE72.js +34 -0
- package/dist/{auth-token-APXLIQAO.js → auth-token-JOSBGVGA.js} +2 -2
- package/dist/{automation-22LGZB4O.js → automation-NYSYIXDW.js} +4 -4
- package/dist/{billing-O4UZP4LR.js → billing-6SWQNULS.js} +4 -4
- package/dist/bin/epilot.js +84 -60
- package/dist/{blueprint-manifest-RGKFKTQW.js → blueprint-manifest-3RS3SQE6.js} +4 -4
- package/dist/{calendar-BAZUUP7W.js → calendar-WQIQK46M.js} +4 -4
- package/dist/{chat-Q2OKVJTT.js → chat-EMJD5AN5.js} +4 -4
- package/dist/{chunk-CMVLVDYF.js → chunk-36I64456.js} +7 -7
- package/dist/{chunk-7TLX5QRJ.js → chunk-5DFIPWJS.js} +3 -3
- package/dist/chunk-5Q3PQUI2.js +602 -0
- package/dist/{chunk-ENVFJFZZ.js → chunk-BYNI3AGG.js} +1 -1
- package/dist/{chunk-M3M3C5WH.js → chunk-G564QXNL.js} +17 -3
- package/dist/{chunk-YHQA2AVG.js → chunk-QPUCHKXS.js} +1 -0
- package/dist/{auth-login-3AY5U4JU.js → chunk-U4YGZRJY.js} +378 -11
- package/dist/{config-DGZIMLZK.js → config-PJWYWLQH.js} +1 -1
- package/dist/{configuration-hub-LVEKC5UV.js → configuration-hub-BVTAC26A.js} +4 -4
- package/dist/{consent-42RHQN4U.js → consent-UZSED4QQ.js} +4 -4
- package/dist/{customer-portal-CPYSHWMQ.js → customer-portal-CZSHTI3Q.js} +4 -4
- package/dist/{dashboard-X2MFX52H.js → dashboard-NQHQ65ME.js} +4 -4
- package/dist/{data-governance-6TG574RV.js → data-governance-WOUP2NNR.js} +4 -4
- package/dist/{deduplication-TT46SFOU.js → deduplication-EUAFCYY3.js} +4 -4
- package/dist/{deploy-7CEOUBVD.js → deploy-LRSKADBB.js} +4 -4
- package/dist/{design-IG7LWD4X.js → design-XR6C6OTA.js} +4 -4
- package/dist/{dev-SN44SGW4.js → dev-FGVM3R2Z.js} +4 -4
- package/dist/{document-5KYSBLGK.js → document-EWDEIA2Z.js} +4 -4
- package/dist/{email-settings-MZ7XM4H7.js → email-settings-IOHMQBXH.js} +4 -4
- package/dist/{email-template-FUMBRAJC.js → email-template-K6X722R7.js} +4 -4
- package/dist/{entity-VBD2YEZX.js → entity-Z6JH5EDY.js} +4 -4
- package/dist/{entity-mapping-YRLTIJQW.js → entity-mapping-PZY5PCRG.js} +4 -4
- package/dist/{environments-KTG3J2N5.js → environments-FL7IAAHN.js} +4 -4
- package/dist/{event-catalog-Z6XAAUZU.js → event-catalog-GUAWJ3RG.js} +4 -4
- package/dist/{export-OYADKVRF.js → export-IXXFKWBZ.js} +4 -4
- package/dist/{external-values-ZWMXARW2.js → external-values-A7C75KBV.js} +4 -4
- package/dist/{file-762S5MIJ.js → file-IRUY5MWL.js} +4 -4
- package/dist/{iban-KOXXBC27.js → iban-3MLGKYKV.js} +4 -4
- package/dist/{identity-6ZFNTQ3I.js → identity-LI26M7EG.js} +4 -4
- package/dist/{init-OUEJLN3K.js → init-HRF5Q2UW.js} +4 -4
- package/dist/{integration-toolkit-GGVOJ54C.js → integration-toolkit-GSDL2CE2.js} +4 -4
- package/dist/{journey-67YFR7GP.js → journey-ASQNGOEH.js} +4 -4
- package/dist/{kanban-ADY77D7C.js → kanban-7XW56ILD.js} +4 -4
- package/dist/{message-NDXC2GK4.js → message-XYB34GBX.js} +4 -4
- package/dist/{metering-RKYF77CI.js → metering-GJSVL6OZ.js} +4 -4
- package/dist/{notes-5TJY7RB5.js → notes-FZPFGPFO.js} +4 -4
- package/dist/{notification-H6YLABKW.js → notification-X6IHCJDI.js} +4 -4
- package/dist/org-UWRWFPRZ.js +427 -0
- package/dist/{organization-ILSV2FAU.js → organization-374MUWDY.js} +4 -4
- package/dist/{partner-directory-BCH6MF5E.js → partner-directory-BC7XF3VN.js} +4 -4
- package/dist/{permissions-YJNGIXNZ.js → permissions-UAXXL2OG.js} +4 -4
- package/dist/{pricing-G67JCXSJ.js → pricing-Q43OPFUT.js} +4 -4
- package/dist/{pricing-tier-ZHL7YDIR.js → pricing-tier-AHRG3AVC.js} +4 -4
- package/dist/{profile-OZJL5ZPT.js → profile-G2FH3DXR.js} +1 -1
- package/dist/{purpose-TLIZRKF2.js → purpose-FXBJ24XT.js} +4 -4
- package/dist/{query-RJFX7FVF.js → query-Y5XZZBFS.js} +4 -4
- package/dist/{remove-component-CM5KWCN6.js → remove-component-WQLTK36T.js} +4 -4
- package/dist/{review-MU2OAL5D.js → review-XWKQ2QBF.js} +4 -4
- package/dist/{sandbox-UVLVVTEA.js → sandbox-7DPZVDMD.js} +4 -4
- package/dist/{sharing-U5O6SIM2.js → sharing-4IMN5325.js} +4 -4
- package/dist/{snapshot-VSORAWHR.js → snapshot-OE7NRZGS.js} +4 -4
- package/dist/{submission-HVNOP5T6.js → submission-R2GYF5UV.js} +4 -4
- package/dist/{targeting-STSFTPYR.js → targeting-NLHZEKAE.js} +4 -4
- package/dist/{template-variables-MFDAUYI4.js → template-variables-BEBZD6IW.js} +4 -4
- package/dist/{upgrade-EBCK4LM6.js → upgrade-ON2KV5LK.js} +1 -1
- package/dist/{user-Y5N4UYAI.js → user-C2MPCWFC.js} +4 -4
- package/dist/{validate-N3KWJCCB.js → validate-L3EVLLDB.js} +4 -4
- package/dist/{validation-rules-LTKHB7BK.js → validation-rules-MCQP5FYV.js} +4 -4
- package/dist/{versions-M2OEVZZG.js → versions-U4M5UMIX.js} +4 -4
- package/dist/{webhooks-XU3W66DH.js → webhooks-CXLFLDRO.js} +4 -4
- package/dist/{workflow-N6IJ6LYR.js → workflow-WGG5Y45V.js} +4 -4
- package/dist/{workflow-definition-GTOTMANE.js → workflow-definition-P5RIZCJK.js} +4 -4
- package/package.json +3 -2
- package/dist/app-W7SP77LS.js +0 -26
- package/dist/auth-WMXFMPWE.js +0 -119
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
ACCESS_PROFILE_INFO,
|
|
4
|
+
AgentAuthError,
|
|
5
|
+
deleteAgentRecord,
|
|
6
|
+
formatExpiresIn,
|
|
7
|
+
isAccessProfile,
|
|
8
|
+
loadAgentIdentity,
|
|
9
|
+
organizationGrants
|
|
10
|
+
} from "./chunk-5Q3PQUI2.js";
|
|
11
|
+
import {
|
|
12
|
+
loadCredentials,
|
|
13
|
+
removeCredentials
|
|
14
|
+
} from "./chunk-G564QXNL.js";
|
|
15
|
+
import {
|
|
16
|
+
getResolvedProfile,
|
|
17
|
+
resolveProfileName,
|
|
18
|
+
upsertProfile
|
|
19
|
+
} from "./chunk-QPUCHKXS.js";
|
|
20
|
+
import {
|
|
21
|
+
BOLD,
|
|
22
|
+
DIM,
|
|
23
|
+
GREEN,
|
|
24
|
+
RED,
|
|
25
|
+
RESET,
|
|
26
|
+
YELLOW
|
|
27
|
+
} from "./chunk-7ZQ666ZQ.js";
|
|
28
|
+
|
|
29
|
+
// src/commands/auth.ts
|
|
30
|
+
import { defineCommand } from "citty";
|
|
31
|
+
var auth_default = defineCommand({
|
|
32
|
+
meta: {
|
|
33
|
+
name: "auth",
|
|
34
|
+
description: "Manage authentication"
|
|
35
|
+
},
|
|
36
|
+
subCommands: {
|
|
37
|
+
login: () => import("./auth-login-ACQGAE72.js").then((m) => m.default),
|
|
38
|
+
token: () => import("./auth-token-JOSBGVGA.js").then((m) => m.default),
|
|
39
|
+
logout: defineCommand({
|
|
40
|
+
meta: { name: "logout", description: "Remove stored credentials" },
|
|
41
|
+
args: {
|
|
42
|
+
profile: { type: "string", description: "Profile to log out (or EPILOT_PROFILE env)" }
|
|
43
|
+
},
|
|
44
|
+
run: async ({ args }) => {
|
|
45
|
+
const profileName = args.profile || process.env.EPILOT_PROFILE;
|
|
46
|
+
const loaded = loadAgentIdentity(profileName);
|
|
47
|
+
if (loaded) {
|
|
48
|
+
try {
|
|
49
|
+
await loaded.client.revokeAgent(loaded.identity.hostKey, loaded.identity.agentId);
|
|
50
|
+
process.stdout.write(`${DIM}Agent ${loaded.record.agent_id} revoked.${RESET}
|
|
51
|
+
`);
|
|
52
|
+
} catch (error) {
|
|
53
|
+
const reason = error instanceof AgentAuthError ? error.code : "error";
|
|
54
|
+
process.stdout.write(
|
|
55
|
+
`${DIM}Could not revoke agent ${loaded.record.agent_id} (${reason}); removing it locally.${RESET}
|
|
56
|
+
`
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
deleteAgentRecord(profileName);
|
|
60
|
+
const resolvedName = resolveProfileName(profileName);
|
|
61
|
+
if (resolvedName && getResolvedProfile(profileName)?.token) {
|
|
62
|
+
upsertProfile(resolvedName, {
|
|
63
|
+
token: void 0,
|
|
64
|
+
org_id: void 0,
|
|
65
|
+
user_id: void 0,
|
|
66
|
+
expires_at: void 0,
|
|
67
|
+
access_profile: void 0
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
const removed = removeCredentials();
|
|
72
|
+
if (removed || loaded) {
|
|
73
|
+
process.stdout.write(`${GREEN}Logged out successfully.${RESET}
|
|
74
|
+
`);
|
|
75
|
+
} else {
|
|
76
|
+
process.stdout.write(`No stored credentials found.
|
|
77
|
+
`);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}),
|
|
81
|
+
status: defineCommand({
|
|
82
|
+
meta: { name: "status", description: "Show authentication status" },
|
|
83
|
+
args: {
|
|
84
|
+
profile: { type: "string", description: "Profile to inspect (or EPILOT_PROFILE env)" }
|
|
85
|
+
},
|
|
86
|
+
run: async ({ args }) => {
|
|
87
|
+
const profileName = args.profile || process.env.EPILOT_PROFILE;
|
|
88
|
+
const loaded = loadAgentIdentity(profileName);
|
|
89
|
+
if (!loaded) {
|
|
90
|
+
const plain = loadCredentials();
|
|
91
|
+
if (!plain) {
|
|
92
|
+
process.stdout.write(`${YELLOW}Not authenticated.${RESET}
|
|
93
|
+
`);
|
|
94
|
+
process.stdout.write(`Run ${BOLD}epilot auth login${RESET} to authenticate.
|
|
95
|
+
`);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
printTokenStatus(plain, { agent: false });
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const creds = loadCredentials() ?? profileCredentials(profileName);
|
|
102
|
+
if (creds) {
|
|
103
|
+
printTokenStatus(creds, { agent: true });
|
|
104
|
+
} else {
|
|
105
|
+
process.stdout.write(`${YELLOW}No valid token stored${RESET} ${DIM}(issued on next API call)${RESET}
|
|
106
|
+
`);
|
|
107
|
+
}
|
|
108
|
+
process.stdout.write(`
|
|
109
|
+
${BOLD}Agent Auth${RESET}
|
|
110
|
+
`);
|
|
111
|
+
process.stdout.write(` Agent: ${loaded.record.agent_id} ${DIM}(${loaded.record.name})${RESET}
|
|
112
|
+
`);
|
|
113
|
+
process.stdout.write(` Host: ${loaded.record.host_id}
|
|
114
|
+
`);
|
|
115
|
+
process.stdout.write(` Issuer: ${loaded.record.issuer}
|
|
116
|
+
`);
|
|
117
|
+
try {
|
|
118
|
+
const status = await loaded.client.getAgentStatus(loaded.identity.hostKey, loaded.identity.agentId);
|
|
119
|
+
const color = status.status === "active" ? GREEN : status.status === "pending" ? YELLOW : RED;
|
|
120
|
+
process.stdout.write(` Status: ${color}${status.status}${RESET}`);
|
|
121
|
+
if (status.expires_at) process.stdout.write(` ${DIM}(expires ${status.expires_at})${RESET}`);
|
|
122
|
+
process.stdout.write("\n");
|
|
123
|
+
const grants = organizationGrants(status.agent_capability_grants);
|
|
124
|
+
if (grants.length) {
|
|
125
|
+
process.stdout.write(` Grants:
|
|
126
|
+
`);
|
|
127
|
+
for (const g of grants) {
|
|
128
|
+
const expiry = formatExpiresIn(g.expiresAt);
|
|
129
|
+
const expired = expiry === "expired";
|
|
130
|
+
const level = [g.profile, g.anonymized ? "anonymized" : "", expiry ?? ""].filter(Boolean);
|
|
131
|
+
const statusColor = g.grant.status === "active" && !expired ? GREEN : g.grant.status === "pending" ? YELLOW : RED;
|
|
132
|
+
const active = g.organizationId && g.organizationId === creds?.org_id && g.profile === (creds?.access_profile ?? "read") ? ` ${DIM}(active)${RESET}` : "";
|
|
133
|
+
const reason = g.reason ? ` ${DIM}\u2014 "${g.reason}"${RESET}` : "";
|
|
134
|
+
process.stdout.write(
|
|
135
|
+
` ${(g.organizationId ?? "login organization").padEnd(12)} ${statusColor}${expired ? "expired" : g.grant.status}${RESET} ${DIM}${level.join(", ")}${RESET}${active}${reason}
|
|
136
|
+
`
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
} catch (error) {
|
|
141
|
+
const reason = error instanceof AgentAuthError ? `${error.message} (${error.code})` : String(error);
|
|
142
|
+
process.stdout.write(` Status: ${RED}unavailable${RESET} ${DIM}${reason}${RESET}
|
|
143
|
+
`);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
})
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
var profileCredentials = (profileName) => {
|
|
150
|
+
const profile = getResolvedProfile(profileName);
|
|
151
|
+
if (!profile?.token) return null;
|
|
152
|
+
if (profile.expires_at && new Date(profile.expires_at) < /* @__PURE__ */ new Date()) return null;
|
|
153
|
+
return {
|
|
154
|
+
token: profile.token,
|
|
155
|
+
org_id: profile.org_id,
|
|
156
|
+
user_id: profile.user_id,
|
|
157
|
+
expires_at: profile.expires_at,
|
|
158
|
+
access_profile: profile.access_profile
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
var printTokenStatus = (creds, { agent }) => {
|
|
162
|
+
const claims = parseJwtPayload(creds.token);
|
|
163
|
+
const isApiToken = claims?.token_type === "api";
|
|
164
|
+
const isCognitoToken = typeof claims?.iss === "string" && claims.iss.includes("cognito-idp");
|
|
165
|
+
const tokenType = isApiToken ? "API Token" : isCognitoToken ? "User Token" : "Token";
|
|
166
|
+
process.stdout.write(`${GREEN}${BOLD}Authenticated${RESET} ${DIM}(${tokenType})${RESET}
|
|
167
|
+
`);
|
|
168
|
+
const name = claims?.token_name || claims?.email || claims?.["cognito:username"] || creds.name;
|
|
169
|
+
const orgId = claims?.org_id || claims?.["custom:ivy_org_id"] || creds.org_id;
|
|
170
|
+
const userId = claims?.user_id || claims?.["custom:ivy_user_id"] || creds.user_id;
|
|
171
|
+
const tokenId = claims?.token_id;
|
|
172
|
+
const adminEmail = claims?.admin_email;
|
|
173
|
+
const tokenUse = claims?.token_use;
|
|
174
|
+
const roles = claims?.assume_roles;
|
|
175
|
+
const readOnly = claims?.read_only === true;
|
|
176
|
+
const anonymize = claims?.anonymize === true;
|
|
177
|
+
if (name) process.stdout.write(` Name: ${name}
|
|
178
|
+
`);
|
|
179
|
+
if (adminEmail && adminEmail !== name) process.stdout.write(` Email: ${adminEmail}
|
|
180
|
+
`);
|
|
181
|
+
if (orgId) process.stdout.write(` Org: ${orgId}
|
|
182
|
+
`);
|
|
183
|
+
if (userId) process.stdout.write(` User: ${userId}
|
|
184
|
+
`);
|
|
185
|
+
if (tokenId && tokenId !== userId) process.stdout.write(` Token ID: ${tokenId}
|
|
186
|
+
`);
|
|
187
|
+
if (tokenUse) process.stdout.write(` Use: ${tokenUse}
|
|
188
|
+
`);
|
|
189
|
+
if (roles?.length) process.stdout.write(` Roles: ${roles.join(", ")}
|
|
190
|
+
`);
|
|
191
|
+
process.stdout.write(` Access: ${readOnly ? `${YELLOW}read-only${RESET}` : `${GREEN}read-write${RESET}`}
|
|
192
|
+
`);
|
|
193
|
+
if (isAccessProfile(creds.access_profile)) {
|
|
194
|
+
process.stdout.write(
|
|
195
|
+
` Profile: ${creds.access_profile} ${DIM}(${ACCESS_PROFILE_INFO[creds.access_profile].title})${RESET}
|
|
196
|
+
`
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
if (anonymize) process.stdout.write(` Data: ${YELLOW}anonymized${RESET}
|
|
200
|
+
`);
|
|
201
|
+
if (creds.expires_at) {
|
|
202
|
+
const expiry = new Date(creds.expires_at);
|
|
203
|
+
const now = /* @__PURE__ */ new Date();
|
|
204
|
+
const diffMs = expiry.getTime() - now.getTime();
|
|
205
|
+
const label = agent ? diffMs < 864e5 ? `${Math.floor(diffMs / 36e5)}h ${Math.floor(diffMs % 36e5 / 6e4)}m` : `${Math.floor(diffMs / 864e5)} days` : `${Math.floor(diffMs / (1e3 * 60 * 60 * 24))} days`;
|
|
206
|
+
process.stdout.write(` Expires: ${creds.expires_at} ${DIM}(${label})${RESET}
|
|
207
|
+
`);
|
|
208
|
+
} else if (claims?.exp) {
|
|
209
|
+
const expiry = new Date(claims.exp * 1e3);
|
|
210
|
+
const now = /* @__PURE__ */ new Date();
|
|
211
|
+
const diffMs = expiry.getTime() - now.getTime();
|
|
212
|
+
const label = diffMs < 0 ? `${RED}expired${RESET}` : diffMs < 864e5 ? `${Math.floor(diffMs / 36e5)}h ${Math.floor(diffMs % 36e5 / 6e4)}m` : `${Math.floor(diffMs / 864e5)} days`;
|
|
213
|
+
process.stdout.write(` Expires: ${expiry.toISOString()} ${DIM}(${label})${RESET}
|
|
214
|
+
`);
|
|
215
|
+
} else if (claims?.iat && !claims?.exp) {
|
|
216
|
+
const issued = new Date(claims.iat * 1e3);
|
|
217
|
+
process.stdout.write(` Issued: ${issued.toISOString()} ${DIM}(no expiry)${RESET}
|
|
218
|
+
`);
|
|
219
|
+
}
|
|
220
|
+
process.stdout.write(` Token: ${creds.token.substring(0, 20)}...${RESET}
|
|
221
|
+
`);
|
|
222
|
+
};
|
|
223
|
+
var parseJwtPayload = (token) => {
|
|
224
|
+
try {
|
|
225
|
+
const parts = token.split(".");
|
|
226
|
+
if (parts.length !== 3) return null;
|
|
227
|
+
const payload = Buffer.from(parts[1], "base64url").toString("utf-8");
|
|
228
|
+
return JSON.parse(payload);
|
|
229
|
+
} catch {
|
|
230
|
+
return null;
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
export {
|
|
234
|
+
auth_default as default
|
|
235
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
AGENT_FLAG_DESCRIPTION,
|
|
4
|
+
agentLogin,
|
|
5
|
+
auth_login_default,
|
|
6
|
+
browserLogin,
|
|
7
|
+
chooseOrganization,
|
|
8
|
+
describeAccess,
|
|
9
|
+
openBrowser,
|
|
10
|
+
parseAccessProfile,
|
|
11
|
+
printApproval,
|
|
12
|
+
readOnlySibling,
|
|
13
|
+
resolveLoginProfile,
|
|
14
|
+
resolveReason
|
|
15
|
+
} from "./chunk-U4YGZRJY.js";
|
|
16
|
+
import "./chunk-IOLKUHUB.js";
|
|
17
|
+
import "./chunk-5Q3PQUI2.js";
|
|
18
|
+
import "./chunk-G564QXNL.js";
|
|
19
|
+
import "./chunk-QPUCHKXS.js";
|
|
20
|
+
import "./chunk-7ZQ666ZQ.js";
|
|
21
|
+
export {
|
|
22
|
+
AGENT_FLAG_DESCRIPTION,
|
|
23
|
+
agentLogin,
|
|
24
|
+
browserLogin,
|
|
25
|
+
chooseOrganization,
|
|
26
|
+
auth_login_default as default,
|
|
27
|
+
describeAccess,
|
|
28
|
+
openBrowser,
|
|
29
|
+
parseAccessProfile,
|
|
30
|
+
printApproval,
|
|
31
|
+
readOnlySibling,
|
|
32
|
+
resolveLoginProfile,
|
|
33
|
+
resolveReason
|
|
34
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
callApi
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-36I64456.js";
|
|
5
|
+
import "./chunk-BYNI3AGG.js";
|
|
5
6
|
import "./chunk-IOLKUHUB.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-YHQA2AVG.js";
|
|
7
|
+
import "./chunk-G564QXNL.js";
|
|
8
|
+
import "./chunk-QPUCHKXS.js";
|
|
9
9
|
import "./chunk-7ZQ666ZQ.js";
|
|
10
10
|
|
|
11
11
|
// src/commands/apis/automation.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
callApi
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-36I64456.js";
|
|
5
|
+
import "./chunk-BYNI3AGG.js";
|
|
5
6
|
import "./chunk-IOLKUHUB.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-YHQA2AVG.js";
|
|
7
|
+
import "./chunk-G564QXNL.js";
|
|
8
|
+
import "./chunk-QPUCHKXS.js";
|
|
9
9
|
import "./chunk-7ZQ666ZQ.js";
|
|
10
10
|
|
|
11
11
|
// src/commands/apis/billing.ts
|
package/dist/bin/epilot.js
CHANGED
|
@@ -11,7 +11,7 @@ import { defineCommand } from "citty";
|
|
|
11
11
|
var main = defineCommand({
|
|
12
12
|
meta: {
|
|
13
13
|
name: "epilot",
|
|
14
|
-
version: "0.1.
|
|
14
|
+
version: "0.1.195",
|
|
15
15
|
description: "CLI for epilot APIs"
|
|
16
16
|
},
|
|
17
17
|
args: {
|
|
@@ -27,65 +27,66 @@ var main = defineCommand({
|
|
|
27
27
|
jsonata: { type: "string", description: "JSONata expression" }
|
|
28
28
|
},
|
|
29
29
|
subCommands: {
|
|
30
|
-
auth: () => import("../auth-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
auth: () => import("../auth-N3CDDMDS.js").then((m) => m.default),
|
|
31
|
+
org: () => import("../org-UWRWFPRZ.js").then((m) => m.default),
|
|
32
|
+
profile: () => import("../profile-G2FH3DXR.js").then((m) => m.default),
|
|
33
|
+
config: () => import("../config-PJWYWLQH.js").then((m) => m.default),
|
|
33
34
|
completion: () => import("../completion-AACHNJ6B.js").then((m) => m.default),
|
|
34
|
-
upgrade: () => import("../upgrade-
|
|
35
|
-
"access-token": () => import("../access-token-
|
|
36
|
-
address: () => import("../address-
|
|
37
|
-
"address-suggestions": () => import("../address-suggestions-
|
|
38
|
-
"ai-agents": () => import("../ai-agents-
|
|
39
|
-
app: () => import("../app-
|
|
40
|
-
"audit-logs": () => import("../audit-logs-
|
|
41
|
-
automation: () => import("../automation-
|
|
42
|
-
billing: () => import("../billing-
|
|
43
|
-
"blueprint-manifest": () => import("../blueprint-manifest-
|
|
44
|
-
calendar: () => import("../calendar-
|
|
45
|
-
chat: () => import("../chat-
|
|
46
|
-
"configuration-hub": () => import("../configuration-hub-
|
|
47
|
-
consent: () => import("../consent-
|
|
48
|
-
"customer-portal": () => import("../customer-portal-
|
|
49
|
-
dashboard: () => import("../dashboard-
|
|
50
|
-
"data-governance": () => import("../data-governance-
|
|
51
|
-
deduplication: () => import("../deduplication-
|
|
52
|
-
design: () => import("../design-
|
|
53
|
-
document: () => import("../document-
|
|
54
|
-
"email-settings": () => import("../email-settings-
|
|
55
|
-
"email-template": () => import("../email-template-
|
|
56
|
-
entity: () => import("../entity-
|
|
57
|
-
"entity-mapping": () => import("../entity-mapping-
|
|
58
|
-
environments: () => import("../environments-
|
|
59
|
-
"event-catalog": () => import("../event-catalog-
|
|
60
|
-
"external-values": () => import("../external-values-
|
|
61
|
-
file: () => import("../file-
|
|
62
|
-
iban: () => import("../iban-
|
|
63
|
-
identity: () => import("../identity-
|
|
64
|
-
"integration-toolkit": () => import("../integration-toolkit-
|
|
65
|
-
journey: () => import("../journey-
|
|
66
|
-
kanban: () => import("../kanban-
|
|
67
|
-
message: () => import("../message-
|
|
68
|
-
metering: () => import("../metering-
|
|
69
|
-
notes: () => import("../notes-
|
|
70
|
-
notification: () => import("../notification-
|
|
71
|
-
organization: () => import("../organization-
|
|
72
|
-
"partner-directory": () => import("../partner-directory-
|
|
73
|
-
permissions: () => import("../permissions-
|
|
74
|
-
pricing: () => import("../pricing-
|
|
75
|
-
"pricing-tier": () => import("../pricing-tier-
|
|
76
|
-
purpose: () => import("../purpose-
|
|
77
|
-
query: () => import("../query-
|
|
78
|
-
sandbox: () => import("../sandbox-
|
|
79
|
-
sharing: () => import("../sharing-
|
|
80
|
-
snapshot: () => import("../snapshot-
|
|
81
|
-
submission: () => import("../submission-
|
|
82
|
-
targeting: () => import("../targeting-
|
|
83
|
-
"template-variables": () => import("../template-variables-
|
|
84
|
-
user: () => import("../user-
|
|
85
|
-
"validation-rules": () => import("../validation-rules-
|
|
86
|
-
webhooks: () => import("../webhooks-
|
|
87
|
-
workflow: () => import("../workflow-
|
|
88
|
-
"workflow-definition": () => import("../workflow-definition-
|
|
35
|
+
upgrade: () => import("../upgrade-ON2KV5LK.js").then((m) => m.default),
|
|
36
|
+
"access-token": () => import("../access-token-Q2UGZIMP.js").then((m) => m.default),
|
|
37
|
+
address: () => import("../address-AX4UT6BO.js").then((m) => m.default),
|
|
38
|
+
"address-suggestions": () => import("../address-suggestions-GMVIIZY6.js").then((m) => m.default),
|
|
39
|
+
"ai-agents": () => import("../ai-agents-J2ZTLDLV.js").then((m) => m.default),
|
|
40
|
+
app: () => import("../app-RHHZR5YW.js").then((m) => m.default),
|
|
41
|
+
"audit-logs": () => import("../audit-logs-VLVHBCF5.js").then((m) => m.default),
|
|
42
|
+
automation: () => import("../automation-NYSYIXDW.js").then((m) => m.default),
|
|
43
|
+
billing: () => import("../billing-6SWQNULS.js").then((m) => m.default),
|
|
44
|
+
"blueprint-manifest": () => import("../blueprint-manifest-3RS3SQE6.js").then((m) => m.default),
|
|
45
|
+
calendar: () => import("../calendar-WQIQK46M.js").then((m) => m.default),
|
|
46
|
+
chat: () => import("../chat-EMJD5AN5.js").then((m) => m.default),
|
|
47
|
+
"configuration-hub": () => import("../configuration-hub-BVTAC26A.js").then((m) => m.default),
|
|
48
|
+
consent: () => import("../consent-UZSED4QQ.js").then((m) => m.default),
|
|
49
|
+
"customer-portal": () => import("../customer-portal-CZSHTI3Q.js").then((m) => m.default),
|
|
50
|
+
dashboard: () => import("../dashboard-NQHQ65ME.js").then((m) => m.default),
|
|
51
|
+
"data-governance": () => import("../data-governance-WOUP2NNR.js").then((m) => m.default),
|
|
52
|
+
deduplication: () => import("../deduplication-EUAFCYY3.js").then((m) => m.default),
|
|
53
|
+
design: () => import("../design-XR6C6OTA.js").then((m) => m.default),
|
|
54
|
+
document: () => import("../document-EWDEIA2Z.js").then((m) => m.default),
|
|
55
|
+
"email-settings": () => import("../email-settings-IOHMQBXH.js").then((m) => m.default),
|
|
56
|
+
"email-template": () => import("../email-template-K6X722R7.js").then((m) => m.default),
|
|
57
|
+
entity: () => import("../entity-Z6JH5EDY.js").then((m) => m.default),
|
|
58
|
+
"entity-mapping": () => import("../entity-mapping-PZY5PCRG.js").then((m) => m.default),
|
|
59
|
+
environments: () => import("../environments-FL7IAAHN.js").then((m) => m.default),
|
|
60
|
+
"event-catalog": () => import("../event-catalog-GUAWJ3RG.js").then((m) => m.default),
|
|
61
|
+
"external-values": () => import("../external-values-A7C75KBV.js").then((m) => m.default),
|
|
62
|
+
file: () => import("../file-IRUY5MWL.js").then((m) => m.default),
|
|
63
|
+
iban: () => import("../iban-3MLGKYKV.js").then((m) => m.default),
|
|
64
|
+
identity: () => import("../identity-LI26M7EG.js").then((m) => m.default),
|
|
65
|
+
"integration-toolkit": () => import("../integration-toolkit-GSDL2CE2.js").then((m) => m.default),
|
|
66
|
+
journey: () => import("../journey-ASQNGOEH.js").then((m) => m.default),
|
|
67
|
+
kanban: () => import("../kanban-7XW56ILD.js").then((m) => m.default),
|
|
68
|
+
message: () => import("../message-XYB34GBX.js").then((m) => m.default),
|
|
69
|
+
metering: () => import("../metering-GJSVL6OZ.js").then((m) => m.default),
|
|
70
|
+
notes: () => import("../notes-FZPFGPFO.js").then((m) => m.default),
|
|
71
|
+
notification: () => import("../notification-X6IHCJDI.js").then((m) => m.default),
|
|
72
|
+
organization: () => import("../organization-374MUWDY.js").then((m) => m.default),
|
|
73
|
+
"partner-directory": () => import("../partner-directory-BC7XF3VN.js").then((m) => m.default),
|
|
74
|
+
permissions: () => import("../permissions-UAXXL2OG.js").then((m) => m.default),
|
|
75
|
+
pricing: () => import("../pricing-Q43OPFUT.js").then((m) => m.default),
|
|
76
|
+
"pricing-tier": () => import("../pricing-tier-AHRG3AVC.js").then((m) => m.default),
|
|
77
|
+
purpose: () => import("../purpose-FXBJ24XT.js").then((m) => m.default),
|
|
78
|
+
query: () => import("../query-Y5XZZBFS.js").then((m) => m.default),
|
|
79
|
+
sandbox: () => import("../sandbox-7DPZVDMD.js").then((m) => m.default),
|
|
80
|
+
sharing: () => import("../sharing-4IMN5325.js").then((m) => m.default),
|
|
81
|
+
snapshot: () => import("../snapshot-OE7NRZGS.js").then((m) => m.default),
|
|
82
|
+
submission: () => import("../submission-R2GYF5UV.js").then((m) => m.default),
|
|
83
|
+
targeting: () => import("../targeting-NLHZEKAE.js").then((m) => m.default),
|
|
84
|
+
"template-variables": () => import("../template-variables-BEBZD6IW.js").then((m) => m.default),
|
|
85
|
+
user: () => import("../user-C2MPCWFC.js").then((m) => m.default),
|
|
86
|
+
"validation-rules": () => import("../validation-rules-MCQP5FYV.js").then((m) => m.default),
|
|
87
|
+
webhooks: () => import("../webhooks-CXLFLDRO.js").then((m) => m.default),
|
|
88
|
+
workflow: () => import("../workflow-WGG5Y45V.js").then((m) => m.default),
|
|
89
|
+
"workflow-definition": () => import("../workflow-definition-P5RIZCJK.js").then((m) => m.default)
|
|
89
90
|
}
|
|
90
91
|
});
|
|
91
92
|
|
|
@@ -97,6 +98,9 @@ var VALUE_TAKING_FLAGS = /* @__PURE__ */ new Set([
|
|
|
97
98
|
"--server",
|
|
98
99
|
"--jsonata",
|
|
99
100
|
"--definition",
|
|
101
|
+
"--org",
|
|
102
|
+
"--access",
|
|
103
|
+
"--reason",
|
|
100
104
|
// short
|
|
101
105
|
"-t",
|
|
102
106
|
"-s"
|
|
@@ -137,7 +141,7 @@ process.stderr.on("error", (err) => {
|
|
|
137
141
|
if (err.code === "EPIPE") process.exit(0);
|
|
138
142
|
throw err;
|
|
139
143
|
});
|
|
140
|
-
var VERSION = true ? "0.1.
|
|
144
|
+
var VERSION = true ? "0.1.195" : (await null).default.version;
|
|
141
145
|
var reorderedArgv = hoistFlagsAfterSubcommand(process.argv.slice(2));
|
|
142
146
|
process.argv = [process.argv[0], process.argv[1], ...reorderedArgv];
|
|
143
147
|
var args = process.argv.slice(2);
|
|
@@ -251,6 +255,22 @@ function printRootHelp() {
|
|
|
251
255
|
w(` ${CYAN}upgrade${R} Upgrade to the latest version
|
|
252
256
|
`);
|
|
253
257
|
w(`
|
|
258
|
+
`);
|
|
259
|
+
w(`${BOLD}AGENT MODE${R} ${DIM}(optional)${R}
|
|
260
|
+
`);
|
|
261
|
+
w(
|
|
262
|
+
` ${CYAN}auth login --agent${R} Register this CLI as an Agent Auth agent ${DIM}(org switching, silent token refresh, scoped access profiles)${R}
|
|
263
|
+
`
|
|
264
|
+
);
|
|
265
|
+
w(` ${CYAN}org list${R} List your organizations and this CLI's access
|
|
266
|
+
`);
|
|
267
|
+
w(` ${CYAN}org use${R} <id> Switch the active organization
|
|
268
|
+
`);
|
|
269
|
+
w(` ${CYAN}org request${R} <id> Request access ${DIM}(--access <profile> --reason "\u2026")${R}
|
|
270
|
+
`);
|
|
271
|
+
w(` ${CYAN}org current${R} Show the active organization
|
|
272
|
+
`);
|
|
273
|
+
w(`
|
|
254
274
|
`);
|
|
255
275
|
w(`${BOLD}APIs${R}
|
|
256
276
|
`);
|
|
@@ -279,6 +299,10 @@ function printRootHelp() {
|
|
|
279
299
|
w(` ${YELLOW}$${R} epilot entity searchEntities --use-dev ${DIM}# target dev environment${R}
|
|
280
300
|
`);
|
|
281
301
|
w(` ${YELLOW}$${R} epilot config set stage dev ${DIM}# persist dev as default${R}
|
|
302
|
+
`);
|
|
303
|
+
w(` ${YELLOW}$${R} epilot auth login --agent --org 739224 ${DIM}# agent mode (optional)${R}
|
|
304
|
+
`);
|
|
305
|
+
w(` ${YELLOW}$${R} epilot org request 739224 --access config:write --reason "Fix the PV journey mapping"
|
|
282
306
|
`);
|
|
283
307
|
w(`
|
|
284
308
|
`);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
callApi
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-36I64456.js";
|
|
5
|
+
import "./chunk-BYNI3AGG.js";
|
|
5
6
|
import "./chunk-IOLKUHUB.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-YHQA2AVG.js";
|
|
7
|
+
import "./chunk-G564QXNL.js";
|
|
8
|
+
import "./chunk-QPUCHKXS.js";
|
|
9
9
|
import "./chunk-7ZQ666ZQ.js";
|
|
10
10
|
|
|
11
11
|
// src/commands/apis/blueprint-manifest.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
callApi
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-36I64456.js";
|
|
5
|
+
import "./chunk-BYNI3AGG.js";
|
|
5
6
|
import "./chunk-IOLKUHUB.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-YHQA2AVG.js";
|
|
7
|
+
import "./chunk-G564QXNL.js";
|
|
8
|
+
import "./chunk-QPUCHKXS.js";
|
|
9
9
|
import "./chunk-7ZQ666ZQ.js";
|
|
10
10
|
|
|
11
11
|
// src/commands/apis/calendar.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
callApi
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-36I64456.js";
|
|
5
|
+
import "./chunk-BYNI3AGG.js";
|
|
5
6
|
import "./chunk-IOLKUHUB.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-YHQA2AVG.js";
|
|
7
|
+
import "./chunk-G564QXNL.js";
|
|
8
|
+
import "./chunk-QPUCHKXS.js";
|
|
9
9
|
import "./chunk-7ZQ666ZQ.js";
|
|
10
10
|
|
|
11
11
|
// src/commands/apis/chat.ts
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
CLI_USER_AGENT
|
|
4
|
+
} from "./chunk-BYNI3AGG.js";
|
|
2
5
|
import {
|
|
3
6
|
formatOperationsTable,
|
|
4
7
|
isInteractive,
|
|
@@ -6,15 +9,12 @@ import {
|
|
|
6
9
|
promptParam
|
|
7
10
|
} from "./chunk-IOLKUHUB.js";
|
|
8
11
|
import {
|
|
9
|
-
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import {
|
|
12
|
-
resolveToken
|
|
13
|
-
} from "./chunk-M3M3C5WH.js";
|
|
12
|
+
resolveTokenAsync
|
|
13
|
+
} from "./chunk-G564QXNL.js";
|
|
14
14
|
import {
|
|
15
15
|
getResolvedProfile,
|
|
16
16
|
getStage
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-QPUCHKXS.js";
|
|
18
18
|
import {
|
|
19
19
|
BG_GREEN,
|
|
20
20
|
BG_RED,
|
|
@@ -738,7 +738,7 @@ ${BOLD}Available operations:${RESET}
|
|
|
738
738
|
`);
|
|
739
739
|
process.exit(1);
|
|
740
740
|
}
|
|
741
|
-
let token =
|
|
741
|
+
let token = await resolveTokenAsync(args.token, args.profile);
|
|
742
742
|
if (!token) {
|
|
743
743
|
if (isInteractive({ interactive: args.interactive })) {
|
|
744
744
|
const { promptToken } = await import("./interactive-LSY5SADM.js");
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
CLI_USER_AGENT
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BYNI3AGG.js";
|
|
5
5
|
import {
|
|
6
6
|
loadCredentials,
|
|
7
7
|
resolveToken
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-G564QXNL.js";
|
|
9
9
|
import {
|
|
10
10
|
getResolvedProfile
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-QPUCHKXS.js";
|
|
12
12
|
import {
|
|
13
13
|
BOLD,
|
|
14
14
|
DIM,
|