struere 0.4.7 → 0.4.8
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/bin/struere.js +68 -120
- package/dist/cli/commands/deploy.d.ts.map +1 -1
- package/dist/cli/commands/dev.d.ts.map +1 -1
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/index.js +68 -120
- package/dist/cli/utils/convex.d.ts +3 -16
- package/dist/cli/utils/convex.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/bin/struere.js
CHANGED
|
@@ -19454,9 +19454,12 @@ async function syncOrganization(payload) {
|
|
|
19454
19454
|
if (json.status === "success" && json.value) {
|
|
19455
19455
|
return json.value;
|
|
19456
19456
|
}
|
|
19457
|
-
|
|
19457
|
+
if (json.status === "error") {
|
|
19458
|
+
return { success: false, error: json.errorMessage || "Unknown error from Convex" };
|
|
19459
|
+
}
|
|
19460
|
+
return { success: false, error: `Unexpected response: ${JSON.stringify(json)}` };
|
|
19458
19461
|
}
|
|
19459
|
-
async function getSyncState(organizationId) {
|
|
19462
|
+
async function getSyncState(organizationId, environment) {
|
|
19460
19463
|
const credentials = loadCredentials();
|
|
19461
19464
|
const apiKey = getApiKey();
|
|
19462
19465
|
const token = apiKey || credentials?.token;
|
|
@@ -19471,7 +19474,7 @@ async function getSyncState(organizationId) {
|
|
|
19471
19474
|
},
|
|
19472
19475
|
body: JSON.stringify({
|
|
19473
19476
|
path: "sync:getSyncState",
|
|
19474
|
-
args: { organizationId }
|
|
19477
|
+
args: { organizationId, environment }
|
|
19475
19478
|
})
|
|
19476
19479
|
});
|
|
19477
19480
|
if (!response.ok) {
|
|
@@ -19479,35 +19482,13 @@ async function getSyncState(organizationId) {
|
|
|
19479
19482
|
return { error };
|
|
19480
19483
|
}
|
|
19481
19484
|
const result = await response.json();
|
|
19482
|
-
|
|
19483
|
-
}
|
|
19484
|
-
async function deployAllAgents(organizationId) {
|
|
19485
|
-
const credentials = loadCredentials();
|
|
19486
|
-
const apiKey = getApiKey();
|
|
19487
|
-
const token = apiKey || credentials?.token;
|
|
19488
|
-
if (!token) {
|
|
19489
|
-
return { success: false, error: "Not authenticated" };
|
|
19485
|
+
if (result.status === "success") {
|
|
19486
|
+
return { state: result.value };
|
|
19490
19487
|
}
|
|
19491
|
-
|
|
19492
|
-
|
|
19493
|
-
headers: {
|
|
19494
|
-
"Content-Type": "application/json",
|
|
19495
|
-
Authorization: `Bearer ${token}`
|
|
19496
|
-
},
|
|
19497
|
-
body: JSON.stringify({
|
|
19498
|
-
path: "sync:deployAllAgents",
|
|
19499
|
-
args: { organizationId }
|
|
19500
|
-
})
|
|
19501
|
-
});
|
|
19502
|
-
if (!response.ok) {
|
|
19503
|
-
const error = await response.text();
|
|
19504
|
-
return { success: false, error };
|
|
19488
|
+
if (result.status === "error") {
|
|
19489
|
+
return { error: result.errorMessage || "Unknown error from Convex" };
|
|
19505
19490
|
}
|
|
19506
|
-
|
|
19507
|
-
if (json.status === "success" && json.value) {
|
|
19508
|
-
return json.value;
|
|
19509
|
-
}
|
|
19510
|
-
return { success: false, error: "Unexpected response format" };
|
|
19491
|
+
return { error: `Unexpected response: ${JSON.stringify(result)}` };
|
|
19511
19492
|
}
|
|
19512
19493
|
|
|
19513
19494
|
// src/cli/commands/login.ts
|
|
@@ -21093,6 +21074,7 @@ var devCommand = new Command("dev").description("Sync all resources to developme
|
|
|
21093
21074
|
process.exit(1);
|
|
21094
21075
|
}
|
|
21095
21076
|
console.log(source_default.gray("Organization:"), source_default.cyan(project.organization.name));
|
|
21077
|
+
console.log(source_default.gray("Environment:"), source_default.cyan("development"));
|
|
21096
21078
|
console.log();
|
|
21097
21079
|
let credentials = loadCredentials();
|
|
21098
21080
|
const apiKey = getApiKey();
|
|
@@ -21120,7 +21102,7 @@ var devCommand = new Command("dev").description("Sync all resources to developme
|
|
|
21120
21102
|
return message.includes("Access denied") || message.includes("not a member") || message.includes("Organization not found");
|
|
21121
21103
|
};
|
|
21122
21104
|
spinner.start("Checking remote state");
|
|
21123
|
-
const { state: remoteState, error: stateError } = await getSyncState(project.organization.id);
|
|
21105
|
+
const { state: remoteState, error: stateError } = await getSyncState(project.organization.id, "development");
|
|
21124
21106
|
if (stateError) {
|
|
21125
21107
|
if (isAuthError(new Error(stateError))) {
|
|
21126
21108
|
spinner.fail("Session expired - re-authenticating...");
|
|
@@ -21176,6 +21158,7 @@ var devCommand = new Command("dev").description("Sync all resources to developme
|
|
|
21176
21158
|
const result = await syncOrganization({
|
|
21177
21159
|
...payload,
|
|
21178
21160
|
organizationId: project.organization.id,
|
|
21161
|
+
environment: "development",
|
|
21179
21162
|
preservePackResources: true,
|
|
21180
21163
|
preserveUnmanagedAgents: true
|
|
21181
21164
|
});
|
|
@@ -21708,11 +21691,11 @@ var isOrgAccessError = (error) => {
|
|
|
21708
21691
|
const message = error instanceof Error ? error.message : String(error);
|
|
21709
21692
|
return message.includes("Access denied") || message.includes("not a member") || message.includes("Organization not found");
|
|
21710
21693
|
};
|
|
21711
|
-
var deployCommand = new Command("deploy").description("Deploy all
|
|
21694
|
+
var deployCommand = new Command("deploy").description("Deploy all resources to production").option("--dry-run", "Show what would be deployed without deploying").action(async (options) => {
|
|
21712
21695
|
const spinner = ora();
|
|
21713
21696
|
const cwd = process.cwd();
|
|
21714
21697
|
console.log();
|
|
21715
|
-
console.log(source_default.bold("Deploying
|
|
21698
|
+
console.log(source_default.bold("Deploying to Production"));
|
|
21716
21699
|
console.log();
|
|
21717
21700
|
if (!hasProject(cwd)) {
|
|
21718
21701
|
console.log(source_default.yellow("No struere.json found - initializing project..."));
|
|
@@ -21736,6 +21719,7 @@ var deployCommand = new Command("deploy").description("Deploy all agents to prod
|
|
|
21736
21719
|
process.exit(1);
|
|
21737
21720
|
}
|
|
21738
21721
|
console.log(source_default.gray("Organization:"), source_default.cyan(project.organization.name));
|
|
21722
|
+
console.log(source_default.gray("Environment:"), source_default.cyan("production"));
|
|
21739
21723
|
console.log();
|
|
21740
21724
|
let credentials = loadCredentials();
|
|
21741
21725
|
const apiKey = getApiKey();
|
|
@@ -21788,81 +21772,33 @@ var deployCommand = new Command("deploy").description("Deploy all agents to prod
|
|
|
21788
21772
|
console.log();
|
|
21789
21773
|
return;
|
|
21790
21774
|
}
|
|
21791
|
-
spinner.start("
|
|
21775
|
+
spinner.start("Deploying to production");
|
|
21792
21776
|
try {
|
|
21793
21777
|
const payload = extractSyncPayload(resources);
|
|
21794
21778
|
const syncResult = await syncOrganization({
|
|
21795
21779
|
...payload,
|
|
21796
|
-
organizationId: project.organization.id
|
|
21780
|
+
organizationId: project.organization.id,
|
|
21781
|
+
environment: "production"
|
|
21797
21782
|
});
|
|
21798
21783
|
if (!syncResult.success) {
|
|
21799
|
-
throw new Error(syncResult.error || "
|
|
21800
|
-
}
|
|
21801
|
-
spinner.succeed("Synced to development");
|
|
21802
|
-
} catch (error) {
|
|
21803
|
-
if (isAuthError(error)) {
|
|
21804
|
-
spinner.fail("Session expired - re-authenticating...");
|
|
21805
|
-
clearCredentials();
|
|
21806
|
-
credentials = await performLogin();
|
|
21807
|
-
if (!credentials) {
|
|
21808
|
-
console.log(source_default.red("Authentication failed"));
|
|
21809
|
-
process.exit(1);
|
|
21810
|
-
}
|
|
21811
|
-
spinner.start("Syncing to development");
|
|
21812
|
-
try {
|
|
21813
|
-
const payload = extractSyncPayload(resources);
|
|
21814
|
-
const syncResult = await syncOrganization({
|
|
21815
|
-
...payload,
|
|
21816
|
-
organizationId: project.organization.id
|
|
21817
|
-
});
|
|
21818
|
-
if (!syncResult.success) {
|
|
21819
|
-
throw new Error(syncResult.error || "Sync failed");
|
|
21820
|
-
}
|
|
21821
|
-
spinner.succeed("Synced to development");
|
|
21822
|
-
} catch (retryError) {
|
|
21823
|
-
spinner.fail("Sync failed");
|
|
21824
|
-
console.log(source_default.red("Error:"), retryError instanceof Error ? retryError.message : String(retryError));
|
|
21825
|
-
process.exit(1);
|
|
21826
|
-
}
|
|
21827
|
-
} else if (isOrgAccessError(error)) {
|
|
21828
|
-
spinner.fail("Organization access denied");
|
|
21829
|
-
console.log();
|
|
21830
|
-
console.log(source_default.red("You do not have access to organization:"), source_default.cyan(project.organization.name));
|
|
21831
|
-
console.log();
|
|
21832
|
-
console.log(source_default.gray("To fix this:"));
|
|
21833
|
-
console.log(source_default.gray(" 1."), "Check that you have access to this organization");
|
|
21834
|
-
console.log(source_default.gray(" 2."), "Or run", source_default.cyan("struere init"), "to select a different organization");
|
|
21835
|
-
console.log();
|
|
21836
|
-
process.exit(1);
|
|
21837
|
-
} else {
|
|
21838
|
-
spinner.fail("Sync failed");
|
|
21839
|
-
console.log(source_default.red("Error:"), error instanceof Error ? error.message : String(error));
|
|
21840
|
-
process.exit(1);
|
|
21841
|
-
}
|
|
21842
|
-
}
|
|
21843
|
-
spinner.start("Deploying to production");
|
|
21844
|
-
try {
|
|
21845
|
-
const deployResult = await deployAllAgents(project.organization.id);
|
|
21846
|
-
if (!deployResult.success) {
|
|
21847
|
-
throw new Error(deployResult.error || "Deployment failed");
|
|
21784
|
+
throw new Error(syncResult.error || "Deploy failed");
|
|
21848
21785
|
}
|
|
21849
21786
|
spinner.succeed("Deployed to production");
|
|
21850
21787
|
console.log();
|
|
21851
|
-
console.log(source_default.green("Success!"), "All
|
|
21788
|
+
console.log(source_default.green("Success!"), "All resources deployed to production");
|
|
21852
21789
|
console.log();
|
|
21853
|
-
if (
|
|
21854
|
-
console.log("
|
|
21855
|
-
for (const slug of
|
|
21790
|
+
if (syncResult.agents?.created && syncResult.agents.created.length > 0) {
|
|
21791
|
+
console.log("New agents:");
|
|
21792
|
+
for (const slug of syncResult.agents.created) {
|
|
21856
21793
|
const agent = resources.agents.find((a) => a.slug === slug);
|
|
21857
|
-
|
|
21858
|
-
console.log(source_default.gray(" -"), source_default.cyan(agent?.name || slug), source_default.gray(`\u2192 ${prodUrl}`));
|
|
21794
|
+
console.log(source_default.gray(" -"), source_default.cyan(agent?.name || slug));
|
|
21859
21795
|
}
|
|
21860
21796
|
}
|
|
21861
|
-
if (
|
|
21862
|
-
console.log();
|
|
21863
|
-
|
|
21864
|
-
|
|
21865
|
-
console.log(source_default.gray(" -"), slug);
|
|
21797
|
+
if (syncResult.agents?.updated && syncResult.agents.updated.length > 0) {
|
|
21798
|
+
console.log("Updated agents:");
|
|
21799
|
+
for (const slug of syncResult.agents.updated) {
|
|
21800
|
+
const agent = resources.agents.find((a) => a.slug === slug);
|
|
21801
|
+
console.log(source_default.gray(" -"), source_default.cyan(agent?.name || slug));
|
|
21866
21802
|
}
|
|
21867
21803
|
}
|
|
21868
21804
|
console.log();
|
|
@@ -21880,13 +21816,18 @@ var deployCommand = new Command("deploy").description("Deploy all agents to prod
|
|
|
21880
21816
|
}
|
|
21881
21817
|
spinner.start("Deploying to production");
|
|
21882
21818
|
try {
|
|
21883
|
-
const
|
|
21884
|
-
|
|
21885
|
-
|
|
21819
|
+
const payload = extractSyncPayload(resources);
|
|
21820
|
+
const syncResult = await syncOrganization({
|
|
21821
|
+
...payload,
|
|
21822
|
+
organizationId: project.organization.id,
|
|
21823
|
+
environment: "production"
|
|
21824
|
+
});
|
|
21825
|
+
if (!syncResult.success) {
|
|
21826
|
+
throw new Error(syncResult.error || "Deploy failed");
|
|
21886
21827
|
}
|
|
21887
21828
|
spinner.succeed("Deployed to production");
|
|
21888
21829
|
console.log();
|
|
21889
|
-
console.log(source_default.green("Success!"), "All
|
|
21830
|
+
console.log(source_default.green("Success!"), "All resources deployed to production");
|
|
21890
21831
|
console.log();
|
|
21891
21832
|
} catch (retryError) {
|
|
21892
21833
|
spinner.fail("Deployment failed");
|
|
@@ -22256,38 +22197,44 @@ var statusCommand = new Command("status").description("Compare local vs remote s
|
|
|
22256
22197
|
process.exit(1);
|
|
22257
22198
|
}
|
|
22258
22199
|
spinner.start("Fetching remote state");
|
|
22259
|
-
const
|
|
22260
|
-
|
|
22200
|
+
const [devResult, prodResult] = await Promise.all([
|
|
22201
|
+
getSyncState(undefined, "development"),
|
|
22202
|
+
getSyncState(undefined, "production")
|
|
22203
|
+
]);
|
|
22204
|
+
if (devResult.error || !devResult.state) {
|
|
22261
22205
|
spinner.fail("Failed to fetch remote state");
|
|
22262
|
-
console.log(source_default.red("Error:"),
|
|
22206
|
+
console.log(source_default.red("Error:"), devResult.error || "Unknown error");
|
|
22263
22207
|
process.exit(1);
|
|
22264
22208
|
}
|
|
22265
22209
|
spinner.succeed("Remote state fetched");
|
|
22266
22210
|
console.log();
|
|
22211
|
+
const devState = devResult.state;
|
|
22212
|
+
const prodState = prodResult.state;
|
|
22267
22213
|
const localAgentSlugs = new Set(localResources.agents.map((a) => a.slug));
|
|
22268
|
-
const
|
|
22214
|
+
const devAgentSlugs = new Set(devState.agents.map((a) => a.slug));
|
|
22269
22215
|
const localEntityTypeSlugs = new Set(localResources.entityTypes.map((et) => et.slug));
|
|
22270
|
-
const
|
|
22216
|
+
const devEntityTypeSlugs = new Set(devState.entityTypes.map((et) => et.slug));
|
|
22271
22217
|
const localRoleNames = new Set(localResources.roles.map((r) => r.name));
|
|
22272
|
-
const
|
|
22218
|
+
const devRoleNames = new Set(devState.roles.map((r) => r.name));
|
|
22273
22219
|
console.log(source_default.bold("Agents"));
|
|
22274
22220
|
console.log(source_default.gray("\u2500".repeat(60)));
|
|
22275
|
-
if (localResources.agents.length === 0 &&
|
|
22221
|
+
if (localResources.agents.length === 0 && devState.agents.length === 0) {
|
|
22276
22222
|
console.log(source_default.gray(" No agents"));
|
|
22277
22223
|
} else {
|
|
22278
22224
|
for (const agent of localResources.agents) {
|
|
22279
|
-
const
|
|
22280
|
-
|
|
22281
|
-
|
|
22225
|
+
const devRemote = devState.agents.find((a) => a.slug === agent.slug);
|
|
22226
|
+
const prodRemote = prodState?.agents.find((a) => a.slug === agent.slug);
|
|
22227
|
+
if (devRemote) {
|
|
22228
|
+
const statusIcon = prodRemote?.hasConfig ? source_default.green("\u25CF") : source_default.yellow("\u25CB");
|
|
22282
22229
|
console.log(` ${statusIcon} ${source_default.cyan(agent.name)} (${agent.slug}) - v${agent.version}`);
|
|
22283
|
-
if (!
|
|
22230
|
+
if (!prodRemote?.hasConfig) {
|
|
22284
22231
|
console.log(source_default.gray(" Not deployed to production"));
|
|
22285
22232
|
}
|
|
22286
22233
|
} else {
|
|
22287
22234
|
console.log(` ${source_default.blue("+")} ${source_default.cyan(agent.name)} (${agent.slug}) - ${source_default.blue("new")}`);
|
|
22288
22235
|
}
|
|
22289
22236
|
}
|
|
22290
|
-
for (const remote of
|
|
22237
|
+
for (const remote of devState.agents) {
|
|
22291
22238
|
if (!localAgentSlugs.has(remote.slug)) {
|
|
22292
22239
|
console.log(` ${source_default.red("-")} ${remote.name} (${remote.slug}) - ${source_default.red("will be deleted")}`);
|
|
22293
22240
|
}
|
|
@@ -22296,18 +22243,18 @@ var statusCommand = new Command("status").description("Compare local vs remote s
|
|
|
22296
22243
|
console.log();
|
|
22297
22244
|
console.log(source_default.bold("Entity Types"));
|
|
22298
22245
|
console.log(source_default.gray("\u2500".repeat(60)));
|
|
22299
|
-
if (localResources.entityTypes.length === 0 &&
|
|
22246
|
+
if (localResources.entityTypes.length === 0 && devState.entityTypes.length === 0) {
|
|
22300
22247
|
console.log(source_default.gray(" No entity types"));
|
|
22301
22248
|
} else {
|
|
22302
22249
|
for (const et of localResources.entityTypes) {
|
|
22303
|
-
const remote =
|
|
22250
|
+
const remote = devState.entityTypes.find((r) => r.slug === et.slug);
|
|
22304
22251
|
if (remote) {
|
|
22305
22252
|
console.log(` ${source_default.green("\u25CF")} ${source_default.cyan(et.name)} (${et.slug})`);
|
|
22306
22253
|
} else {
|
|
22307
22254
|
console.log(` ${source_default.blue("+")} ${source_default.cyan(et.name)} (${et.slug}) - ${source_default.blue("new")}`);
|
|
22308
22255
|
}
|
|
22309
22256
|
}
|
|
22310
|
-
for (const remote of
|
|
22257
|
+
for (const remote of devState.entityTypes) {
|
|
22311
22258
|
if (!localEntityTypeSlugs.has(remote.slug)) {
|
|
22312
22259
|
console.log(` ${source_default.red("-")} ${remote.name} (${remote.slug}) - ${source_default.red("will be deleted")}`);
|
|
22313
22260
|
}
|
|
@@ -22316,18 +22263,18 @@ var statusCommand = new Command("status").description("Compare local vs remote s
|
|
|
22316
22263
|
console.log();
|
|
22317
22264
|
console.log(source_default.bold("Roles"));
|
|
22318
22265
|
console.log(source_default.gray("\u2500".repeat(60)));
|
|
22319
|
-
if (localResources.roles.length === 0 &&
|
|
22266
|
+
if (localResources.roles.length === 0 && devState.roles.length === 0) {
|
|
22320
22267
|
console.log(source_default.gray(" No roles"));
|
|
22321
22268
|
} else {
|
|
22322
22269
|
for (const role of localResources.roles) {
|
|
22323
|
-
const remote =
|
|
22270
|
+
const remote = devState.roles.find((r) => r.name === role.name);
|
|
22324
22271
|
if (remote) {
|
|
22325
22272
|
console.log(` ${source_default.green("\u25CF")} ${source_default.cyan(role.name)} (${role.policies.length} policies)`);
|
|
22326
22273
|
} else {
|
|
22327
22274
|
console.log(` ${source_default.blue("+")} ${source_default.cyan(role.name)} - ${source_default.blue("new")}`);
|
|
22328
22275
|
}
|
|
22329
22276
|
}
|
|
22330
|
-
for (const remote of
|
|
22277
|
+
for (const remote of devState.roles) {
|
|
22331
22278
|
if (!localRoleNames.has(remote.name)) {
|
|
22332
22279
|
console.log(` ${source_default.red("-")} ${remote.name} - ${source_default.red("will be deleted")}`);
|
|
22333
22280
|
}
|
|
@@ -22335,15 +22282,16 @@ var statusCommand = new Command("status").description("Compare local vs remote s
|
|
|
22335
22282
|
}
|
|
22336
22283
|
console.log();
|
|
22337
22284
|
console.log(source_default.gray("Legend:"));
|
|
22338
|
-
console.log(source_default.gray(" "), source_default.green("\u25CF"), "Synced", source_default.yellow("\u25CB"), "Not
|
|
22285
|
+
console.log(source_default.gray(" "), source_default.green("\u25CF"), "Synced", source_default.yellow("\u25CB"), "Not in production", source_default.blue("+"), "New", source_default.red("-"), "Will be deleted");
|
|
22339
22286
|
console.log();
|
|
22340
|
-
console.log(source_default.gray("Run"), source_default.cyan("struere dev"), source_default.gray("to sync
|
|
22287
|
+
console.log(source_default.gray("Run"), source_default.cyan("struere dev"), source_default.gray("to sync to development"));
|
|
22288
|
+
console.log(source_default.gray("Run"), source_default.cyan("struere deploy"), source_default.gray("to deploy to production"));
|
|
22341
22289
|
console.log();
|
|
22342
22290
|
});
|
|
22343
22291
|
// package.json
|
|
22344
22292
|
var package_default = {
|
|
22345
22293
|
name: "struere",
|
|
22346
|
-
version: "0.4.
|
|
22294
|
+
version: "0.4.8",
|
|
22347
22295
|
description: "Build, test, and deploy AI agents",
|
|
22348
22296
|
keywords: [
|
|
22349
22297
|
"ai",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AA0BnC,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AA0BnC,eAAO,MAAM,aAAa,SAqLtB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/dev.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAenC,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/dev.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAenC,eAAO,MAAM,UAAU,SA6RnB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAUnC,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAUnC,eAAO,MAAM,aAAa,SA2KtB,CAAA"}
|
package/dist/cli/index.js
CHANGED
|
@@ -247,9 +247,12 @@ async function syncOrganization(payload) {
|
|
|
247
247
|
if (json.status === "success" && json.value) {
|
|
248
248
|
return json.value;
|
|
249
249
|
}
|
|
250
|
-
|
|
250
|
+
if (json.status === "error") {
|
|
251
|
+
return { success: false, error: json.errorMessage || "Unknown error from Convex" };
|
|
252
|
+
}
|
|
253
|
+
return { success: false, error: `Unexpected response: ${JSON.stringify(json)}` };
|
|
251
254
|
}
|
|
252
|
-
async function getSyncState(organizationId) {
|
|
255
|
+
async function getSyncState(organizationId, environment) {
|
|
253
256
|
const credentials = loadCredentials();
|
|
254
257
|
const apiKey = getApiKey();
|
|
255
258
|
const token = apiKey || credentials?.token;
|
|
@@ -264,7 +267,7 @@ async function getSyncState(organizationId) {
|
|
|
264
267
|
},
|
|
265
268
|
body: JSON.stringify({
|
|
266
269
|
path: "sync:getSyncState",
|
|
267
|
-
args: { organizationId }
|
|
270
|
+
args: { organizationId, environment }
|
|
268
271
|
})
|
|
269
272
|
});
|
|
270
273
|
if (!response.ok) {
|
|
@@ -272,35 +275,13 @@ async function getSyncState(organizationId) {
|
|
|
272
275
|
return { error };
|
|
273
276
|
}
|
|
274
277
|
const result = await response.json();
|
|
275
|
-
|
|
276
|
-
}
|
|
277
|
-
async function deployAllAgents(organizationId) {
|
|
278
|
-
const credentials = loadCredentials();
|
|
279
|
-
const apiKey = getApiKey();
|
|
280
|
-
const token = apiKey || credentials?.token;
|
|
281
|
-
if (!token) {
|
|
282
|
-
return { success: false, error: "Not authenticated" };
|
|
283
|
-
}
|
|
284
|
-
const response = await fetch(`${CONVEX_URL}/api/mutation`, {
|
|
285
|
-
method: "POST",
|
|
286
|
-
headers: {
|
|
287
|
-
"Content-Type": "application/json",
|
|
288
|
-
Authorization: `Bearer ${token}`
|
|
289
|
-
},
|
|
290
|
-
body: JSON.stringify({
|
|
291
|
-
path: "sync:deployAllAgents",
|
|
292
|
-
args: { organizationId }
|
|
293
|
-
})
|
|
294
|
-
});
|
|
295
|
-
if (!response.ok) {
|
|
296
|
-
const error = await response.text();
|
|
297
|
-
return { success: false, error };
|
|
278
|
+
if (result.status === "success") {
|
|
279
|
+
return { state: result.value };
|
|
298
280
|
}
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
return json.value;
|
|
281
|
+
if (result.status === "error") {
|
|
282
|
+
return { error: result.errorMessage || "Unknown error from Convex" };
|
|
302
283
|
}
|
|
303
|
-
return {
|
|
284
|
+
return { error: `Unexpected response: ${JSON.stringify(result)}` };
|
|
304
285
|
}
|
|
305
286
|
|
|
306
287
|
// src/cli/commands/login.ts
|
|
@@ -1889,6 +1870,7 @@ var devCommand = new Command3("dev").description("Sync all resources to developm
|
|
|
1889
1870
|
process.exit(1);
|
|
1890
1871
|
}
|
|
1891
1872
|
console.log(chalk3.gray("Organization:"), chalk3.cyan(project.organization.name));
|
|
1873
|
+
console.log(chalk3.gray("Environment:"), chalk3.cyan("development"));
|
|
1892
1874
|
console.log();
|
|
1893
1875
|
let credentials = loadCredentials();
|
|
1894
1876
|
const apiKey = getApiKey();
|
|
@@ -1916,7 +1898,7 @@ var devCommand = new Command3("dev").description("Sync all resources to developm
|
|
|
1916
1898
|
return message.includes("Access denied") || message.includes("not a member") || message.includes("Organization not found");
|
|
1917
1899
|
};
|
|
1918
1900
|
spinner.start("Checking remote state");
|
|
1919
|
-
const { state: remoteState, error: stateError } = await getSyncState(project.organization.id);
|
|
1901
|
+
const { state: remoteState, error: stateError } = await getSyncState(project.organization.id, "development");
|
|
1920
1902
|
if (stateError) {
|
|
1921
1903
|
if (isAuthError(new Error(stateError))) {
|
|
1922
1904
|
spinner.fail("Session expired - re-authenticating...");
|
|
@@ -1972,6 +1954,7 @@ var devCommand = new Command3("dev").description("Sync all resources to developm
|
|
|
1972
1954
|
const result = await syncOrganization({
|
|
1973
1955
|
...payload,
|
|
1974
1956
|
organizationId: project.organization.id,
|
|
1957
|
+
environment: "development",
|
|
1975
1958
|
preservePackResources: true,
|
|
1976
1959
|
preserveUnmanagedAgents: true
|
|
1977
1960
|
});
|
|
@@ -2513,11 +2496,11 @@ var isOrgAccessError = (error) => {
|
|
|
2513
2496
|
const message = error instanceof Error ? error.message : String(error);
|
|
2514
2497
|
return message.includes("Access denied") || message.includes("not a member") || message.includes("Organization not found");
|
|
2515
2498
|
};
|
|
2516
|
-
var deployCommand = new Command6("deploy").description("Deploy all
|
|
2499
|
+
var deployCommand = new Command6("deploy").description("Deploy all resources to production").option("--dry-run", "Show what would be deployed without deploying").action(async (options) => {
|
|
2517
2500
|
const spinner = ora6();
|
|
2518
2501
|
const cwd = process.cwd();
|
|
2519
2502
|
console.log();
|
|
2520
|
-
console.log(chalk6.bold("Deploying
|
|
2503
|
+
console.log(chalk6.bold("Deploying to Production"));
|
|
2521
2504
|
console.log();
|
|
2522
2505
|
if (!hasProject(cwd)) {
|
|
2523
2506
|
console.log(chalk6.yellow("No struere.json found - initializing project..."));
|
|
@@ -2541,6 +2524,7 @@ var deployCommand = new Command6("deploy").description("Deploy all agents to pro
|
|
|
2541
2524
|
process.exit(1);
|
|
2542
2525
|
}
|
|
2543
2526
|
console.log(chalk6.gray("Organization:"), chalk6.cyan(project.organization.name));
|
|
2527
|
+
console.log(chalk6.gray("Environment:"), chalk6.cyan("production"));
|
|
2544
2528
|
console.log();
|
|
2545
2529
|
let credentials = loadCredentials();
|
|
2546
2530
|
const apiKey = getApiKey();
|
|
@@ -2593,81 +2577,33 @@ var deployCommand = new Command6("deploy").description("Deploy all agents to pro
|
|
|
2593
2577
|
console.log();
|
|
2594
2578
|
return;
|
|
2595
2579
|
}
|
|
2596
|
-
spinner.start("
|
|
2580
|
+
spinner.start("Deploying to production");
|
|
2597
2581
|
try {
|
|
2598
2582
|
const payload = extractSyncPayload(resources);
|
|
2599
2583
|
const syncResult = await syncOrganization({
|
|
2600
2584
|
...payload,
|
|
2601
|
-
organizationId: project.organization.id
|
|
2585
|
+
organizationId: project.organization.id,
|
|
2586
|
+
environment: "production"
|
|
2602
2587
|
});
|
|
2603
2588
|
if (!syncResult.success) {
|
|
2604
|
-
throw new Error(syncResult.error || "
|
|
2605
|
-
}
|
|
2606
|
-
spinner.succeed("Synced to development");
|
|
2607
|
-
} catch (error) {
|
|
2608
|
-
if (isAuthError(error)) {
|
|
2609
|
-
spinner.fail("Session expired - re-authenticating...");
|
|
2610
|
-
clearCredentials();
|
|
2611
|
-
credentials = await performLogin();
|
|
2612
|
-
if (!credentials) {
|
|
2613
|
-
console.log(chalk6.red("Authentication failed"));
|
|
2614
|
-
process.exit(1);
|
|
2615
|
-
}
|
|
2616
|
-
spinner.start("Syncing to development");
|
|
2617
|
-
try {
|
|
2618
|
-
const payload = extractSyncPayload(resources);
|
|
2619
|
-
const syncResult = await syncOrganization({
|
|
2620
|
-
...payload,
|
|
2621
|
-
organizationId: project.organization.id
|
|
2622
|
-
});
|
|
2623
|
-
if (!syncResult.success) {
|
|
2624
|
-
throw new Error(syncResult.error || "Sync failed");
|
|
2625
|
-
}
|
|
2626
|
-
spinner.succeed("Synced to development");
|
|
2627
|
-
} catch (retryError) {
|
|
2628
|
-
spinner.fail("Sync failed");
|
|
2629
|
-
console.log(chalk6.red("Error:"), retryError instanceof Error ? retryError.message : String(retryError));
|
|
2630
|
-
process.exit(1);
|
|
2631
|
-
}
|
|
2632
|
-
} else if (isOrgAccessError(error)) {
|
|
2633
|
-
spinner.fail("Organization access denied");
|
|
2634
|
-
console.log();
|
|
2635
|
-
console.log(chalk6.red("You do not have access to organization:"), chalk6.cyan(project.organization.name));
|
|
2636
|
-
console.log();
|
|
2637
|
-
console.log(chalk6.gray("To fix this:"));
|
|
2638
|
-
console.log(chalk6.gray(" 1."), "Check that you have access to this organization");
|
|
2639
|
-
console.log(chalk6.gray(" 2."), "Or run", chalk6.cyan("struere init"), "to select a different organization");
|
|
2640
|
-
console.log();
|
|
2641
|
-
process.exit(1);
|
|
2642
|
-
} else {
|
|
2643
|
-
spinner.fail("Sync failed");
|
|
2644
|
-
console.log(chalk6.red("Error:"), error instanceof Error ? error.message : String(error));
|
|
2645
|
-
process.exit(1);
|
|
2646
|
-
}
|
|
2647
|
-
}
|
|
2648
|
-
spinner.start("Deploying to production");
|
|
2649
|
-
try {
|
|
2650
|
-
const deployResult = await deployAllAgents(project.organization.id);
|
|
2651
|
-
if (!deployResult.success) {
|
|
2652
|
-
throw new Error(deployResult.error || "Deployment failed");
|
|
2589
|
+
throw new Error(syncResult.error || "Deploy failed");
|
|
2653
2590
|
}
|
|
2654
2591
|
spinner.succeed("Deployed to production");
|
|
2655
2592
|
console.log();
|
|
2656
|
-
console.log(chalk6.green("Success!"), "All
|
|
2593
|
+
console.log(chalk6.green("Success!"), "All resources deployed to production");
|
|
2657
2594
|
console.log();
|
|
2658
|
-
if (
|
|
2659
|
-
console.log("
|
|
2660
|
-
for (const slug of
|
|
2595
|
+
if (syncResult.agents?.created && syncResult.agents.created.length > 0) {
|
|
2596
|
+
console.log("New agents:");
|
|
2597
|
+
for (const slug of syncResult.agents.created) {
|
|
2661
2598
|
const agent = resources.agents.find((a) => a.slug === slug);
|
|
2662
|
-
|
|
2663
|
-
console.log(chalk6.gray(" -"), chalk6.cyan(agent?.name || slug), chalk6.gray(`\u2192 ${prodUrl}`));
|
|
2599
|
+
console.log(chalk6.gray(" -"), chalk6.cyan(agent?.name || slug));
|
|
2664
2600
|
}
|
|
2665
2601
|
}
|
|
2666
|
-
if (
|
|
2667
|
-
console.log();
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
console.log(chalk6.gray(" -"), slug);
|
|
2602
|
+
if (syncResult.agents?.updated && syncResult.agents.updated.length > 0) {
|
|
2603
|
+
console.log("Updated agents:");
|
|
2604
|
+
for (const slug of syncResult.agents.updated) {
|
|
2605
|
+
const agent = resources.agents.find((a) => a.slug === slug);
|
|
2606
|
+
console.log(chalk6.gray(" -"), chalk6.cyan(agent?.name || slug));
|
|
2671
2607
|
}
|
|
2672
2608
|
}
|
|
2673
2609
|
console.log();
|
|
@@ -2685,13 +2621,18 @@ var deployCommand = new Command6("deploy").description("Deploy all agents to pro
|
|
|
2685
2621
|
}
|
|
2686
2622
|
spinner.start("Deploying to production");
|
|
2687
2623
|
try {
|
|
2688
|
-
const
|
|
2689
|
-
|
|
2690
|
-
|
|
2624
|
+
const payload = extractSyncPayload(resources);
|
|
2625
|
+
const syncResult = await syncOrganization({
|
|
2626
|
+
...payload,
|
|
2627
|
+
organizationId: project.organization.id,
|
|
2628
|
+
environment: "production"
|
|
2629
|
+
});
|
|
2630
|
+
if (!syncResult.success) {
|
|
2631
|
+
throw new Error(syncResult.error || "Deploy failed");
|
|
2691
2632
|
}
|
|
2692
2633
|
spinner.succeed("Deployed to production");
|
|
2693
2634
|
console.log();
|
|
2694
|
-
console.log(chalk6.green("Success!"), "All
|
|
2635
|
+
console.log(chalk6.green("Success!"), "All resources deployed to production");
|
|
2695
2636
|
console.log();
|
|
2696
2637
|
} catch (retryError) {
|
|
2697
2638
|
spinner.fail("Deployment failed");
|
|
@@ -3080,38 +3021,44 @@ var statusCommand = new Command13("status").description("Compare local vs remote
|
|
|
3080
3021
|
process.exit(1);
|
|
3081
3022
|
}
|
|
3082
3023
|
spinner.start("Fetching remote state");
|
|
3083
|
-
const
|
|
3084
|
-
|
|
3024
|
+
const [devResult, prodResult] = await Promise.all([
|
|
3025
|
+
getSyncState(undefined, "development"),
|
|
3026
|
+
getSyncState(undefined, "production")
|
|
3027
|
+
]);
|
|
3028
|
+
if (devResult.error || !devResult.state) {
|
|
3085
3029
|
spinner.fail("Failed to fetch remote state");
|
|
3086
|
-
console.log(chalk13.red("Error:"),
|
|
3030
|
+
console.log(chalk13.red("Error:"), devResult.error || "Unknown error");
|
|
3087
3031
|
process.exit(1);
|
|
3088
3032
|
}
|
|
3089
3033
|
spinner.succeed("Remote state fetched");
|
|
3090
3034
|
console.log();
|
|
3035
|
+
const devState = devResult.state;
|
|
3036
|
+
const prodState = prodResult.state;
|
|
3091
3037
|
const localAgentSlugs = new Set(localResources.agents.map((a) => a.slug));
|
|
3092
|
-
const
|
|
3038
|
+
const devAgentSlugs = new Set(devState.agents.map((a) => a.slug));
|
|
3093
3039
|
const localEntityTypeSlugs = new Set(localResources.entityTypes.map((et) => et.slug));
|
|
3094
|
-
const
|
|
3040
|
+
const devEntityTypeSlugs = new Set(devState.entityTypes.map((et) => et.slug));
|
|
3095
3041
|
const localRoleNames = new Set(localResources.roles.map((r) => r.name));
|
|
3096
|
-
const
|
|
3042
|
+
const devRoleNames = new Set(devState.roles.map((r) => r.name));
|
|
3097
3043
|
console.log(chalk13.bold("Agents"));
|
|
3098
3044
|
console.log(chalk13.gray("\u2500".repeat(60)));
|
|
3099
|
-
if (localResources.agents.length === 0 &&
|
|
3045
|
+
if (localResources.agents.length === 0 && devState.agents.length === 0) {
|
|
3100
3046
|
console.log(chalk13.gray(" No agents"));
|
|
3101
3047
|
} else {
|
|
3102
3048
|
for (const agent of localResources.agents) {
|
|
3103
|
-
const
|
|
3104
|
-
|
|
3105
|
-
|
|
3049
|
+
const devRemote = devState.agents.find((a) => a.slug === agent.slug);
|
|
3050
|
+
const prodRemote = prodState?.agents.find((a) => a.slug === agent.slug);
|
|
3051
|
+
if (devRemote) {
|
|
3052
|
+
const statusIcon = prodRemote?.hasConfig ? chalk13.green("\u25CF") : chalk13.yellow("\u25CB");
|
|
3106
3053
|
console.log(` ${statusIcon} ${chalk13.cyan(agent.name)} (${agent.slug}) - v${agent.version}`);
|
|
3107
|
-
if (!
|
|
3054
|
+
if (!prodRemote?.hasConfig) {
|
|
3108
3055
|
console.log(chalk13.gray(" Not deployed to production"));
|
|
3109
3056
|
}
|
|
3110
3057
|
} else {
|
|
3111
3058
|
console.log(` ${chalk13.blue("+")} ${chalk13.cyan(agent.name)} (${agent.slug}) - ${chalk13.blue("new")}`);
|
|
3112
3059
|
}
|
|
3113
3060
|
}
|
|
3114
|
-
for (const remote of
|
|
3061
|
+
for (const remote of devState.agents) {
|
|
3115
3062
|
if (!localAgentSlugs.has(remote.slug)) {
|
|
3116
3063
|
console.log(` ${chalk13.red("-")} ${remote.name} (${remote.slug}) - ${chalk13.red("will be deleted")}`);
|
|
3117
3064
|
}
|
|
@@ -3120,18 +3067,18 @@ var statusCommand = new Command13("status").description("Compare local vs remote
|
|
|
3120
3067
|
console.log();
|
|
3121
3068
|
console.log(chalk13.bold("Entity Types"));
|
|
3122
3069
|
console.log(chalk13.gray("\u2500".repeat(60)));
|
|
3123
|
-
if (localResources.entityTypes.length === 0 &&
|
|
3070
|
+
if (localResources.entityTypes.length === 0 && devState.entityTypes.length === 0) {
|
|
3124
3071
|
console.log(chalk13.gray(" No entity types"));
|
|
3125
3072
|
} else {
|
|
3126
3073
|
for (const et of localResources.entityTypes) {
|
|
3127
|
-
const remote =
|
|
3074
|
+
const remote = devState.entityTypes.find((r) => r.slug === et.slug);
|
|
3128
3075
|
if (remote) {
|
|
3129
3076
|
console.log(` ${chalk13.green("\u25CF")} ${chalk13.cyan(et.name)} (${et.slug})`);
|
|
3130
3077
|
} else {
|
|
3131
3078
|
console.log(` ${chalk13.blue("+")} ${chalk13.cyan(et.name)} (${et.slug}) - ${chalk13.blue("new")}`);
|
|
3132
3079
|
}
|
|
3133
3080
|
}
|
|
3134
|
-
for (const remote of
|
|
3081
|
+
for (const remote of devState.entityTypes) {
|
|
3135
3082
|
if (!localEntityTypeSlugs.has(remote.slug)) {
|
|
3136
3083
|
console.log(` ${chalk13.red("-")} ${remote.name} (${remote.slug}) - ${chalk13.red("will be deleted")}`);
|
|
3137
3084
|
}
|
|
@@ -3140,18 +3087,18 @@ var statusCommand = new Command13("status").description("Compare local vs remote
|
|
|
3140
3087
|
console.log();
|
|
3141
3088
|
console.log(chalk13.bold("Roles"));
|
|
3142
3089
|
console.log(chalk13.gray("\u2500".repeat(60)));
|
|
3143
|
-
if (localResources.roles.length === 0 &&
|
|
3090
|
+
if (localResources.roles.length === 0 && devState.roles.length === 0) {
|
|
3144
3091
|
console.log(chalk13.gray(" No roles"));
|
|
3145
3092
|
} else {
|
|
3146
3093
|
for (const role of localResources.roles) {
|
|
3147
|
-
const remote =
|
|
3094
|
+
const remote = devState.roles.find((r) => r.name === role.name);
|
|
3148
3095
|
if (remote) {
|
|
3149
3096
|
console.log(` ${chalk13.green("\u25CF")} ${chalk13.cyan(role.name)} (${role.policies.length} policies)`);
|
|
3150
3097
|
} else {
|
|
3151
3098
|
console.log(` ${chalk13.blue("+")} ${chalk13.cyan(role.name)} - ${chalk13.blue("new")}`);
|
|
3152
3099
|
}
|
|
3153
3100
|
}
|
|
3154
|
-
for (const remote of
|
|
3101
|
+
for (const remote of devState.roles) {
|
|
3155
3102
|
if (!localRoleNames.has(remote.name)) {
|
|
3156
3103
|
console.log(` ${chalk13.red("-")} ${remote.name} - ${chalk13.red("will be deleted")}`);
|
|
3157
3104
|
}
|
|
@@ -3159,15 +3106,16 @@ var statusCommand = new Command13("status").description("Compare local vs remote
|
|
|
3159
3106
|
}
|
|
3160
3107
|
console.log();
|
|
3161
3108
|
console.log(chalk13.gray("Legend:"));
|
|
3162
|
-
console.log(chalk13.gray(" "), chalk13.green("\u25CF"), "Synced", chalk13.yellow("\u25CB"), "Not
|
|
3109
|
+
console.log(chalk13.gray(" "), chalk13.green("\u25CF"), "Synced", chalk13.yellow("\u25CB"), "Not in production", chalk13.blue("+"), "New", chalk13.red("-"), "Will be deleted");
|
|
3163
3110
|
console.log();
|
|
3164
|
-
console.log(chalk13.gray("Run"), chalk13.cyan("struere dev"), chalk13.gray("to sync
|
|
3111
|
+
console.log(chalk13.gray("Run"), chalk13.cyan("struere dev"), chalk13.gray("to sync to development"));
|
|
3112
|
+
console.log(chalk13.gray("Run"), chalk13.cyan("struere deploy"), chalk13.gray("to deploy to production"));
|
|
3165
3113
|
console.log();
|
|
3166
3114
|
});
|
|
3167
3115
|
// package.json
|
|
3168
3116
|
var package_default = {
|
|
3169
3117
|
name: "struere",
|
|
3170
|
-
version: "0.4.
|
|
3118
|
+
version: "0.4.8",
|
|
3171
3119
|
description: "Build, test, and deploy AI agents",
|
|
3172
3120
|
keywords: [
|
|
3173
3121
|
"ai",
|
|
@@ -20,13 +20,7 @@ interface AgentSyncResult {
|
|
|
20
20
|
success: boolean;
|
|
21
21
|
error?: string;
|
|
22
22
|
}
|
|
23
|
-
interface DeployResult {
|
|
24
|
-
success: boolean;
|
|
25
|
-
configId?: string;
|
|
26
|
-
error?: string;
|
|
27
|
-
}
|
|
28
23
|
export declare function syncToConvex(agentId: string, config: AgentConfig): Promise<AgentSyncResult>;
|
|
29
|
-
export declare function deployToProduction(agentId: string): Promise<DeployResult>;
|
|
30
24
|
export interface AgentInfo {
|
|
31
25
|
_id: string;
|
|
32
26
|
name: string;
|
|
@@ -207,6 +201,7 @@ export interface SyncResult {
|
|
|
207
201
|
}
|
|
208
202
|
export interface SyncOptions extends SyncPayload {
|
|
209
203
|
organizationId?: string;
|
|
204
|
+
environment: 'development' | 'production';
|
|
210
205
|
preservePackResources?: boolean;
|
|
211
206
|
preserveUnmanagedAgents?: boolean;
|
|
212
207
|
}
|
|
@@ -216,8 +211,7 @@ export interface SyncState {
|
|
|
216
211
|
slug: string;
|
|
217
212
|
name: string;
|
|
218
213
|
version: string;
|
|
219
|
-
|
|
220
|
-
hasProdConfig: boolean;
|
|
214
|
+
hasConfig: boolean;
|
|
221
215
|
}>;
|
|
222
216
|
entityTypes: Array<{
|
|
223
217
|
slug: string;
|
|
@@ -236,16 +230,9 @@ export interface SyncState {
|
|
|
236
230
|
roleCount: number;
|
|
237
231
|
}>;
|
|
238
232
|
}
|
|
239
|
-
export declare function getSyncState(organizationId?: string): Promise<{
|
|
233
|
+
export declare function getSyncState(organizationId?: string, environment?: 'development' | 'production'): Promise<{
|
|
240
234
|
state?: SyncState;
|
|
241
235
|
error?: string;
|
|
242
236
|
}>;
|
|
243
|
-
export interface DeployAllResult {
|
|
244
|
-
success: boolean;
|
|
245
|
-
deployed?: string[];
|
|
246
|
-
skipped?: string[];
|
|
247
|
-
error?: string;
|
|
248
|
-
}
|
|
249
|
-
export declare function deployAllAgents(organizationId?: string): Promise<DeployAllResult>;
|
|
250
237
|
export {};
|
|
251
238
|
//# sourceMappingURL=convex.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convex.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/convex.ts"],"names":[],"mappings":"AAIA,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE;QACL,QAAQ,EAAE,MAAM,CAAA;QAChB,IAAI,EAAE,MAAM,CAAA;QACZ,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,CAAA;IACD,KAAK,EAAE,KAAK,CAAC;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,WAAW,EAAE,MAAM,CAAA;QACnB,UAAU,EAAE,OAAO,CAAA;QACnB,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,SAAS,EAAE,OAAO,CAAA;KACnB,CAAC,CAAA;CACH;AAED,UAAU,eAAe;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,
|
|
1
|
+
{"version":3,"file":"convex.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/convex.ts"],"names":[],"mappings":"AAIA,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE;QACL,QAAQ,EAAE,MAAM,CAAA;QAChB,I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