repowisestage 0.0.52 → 0.0.53

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.
Files changed (2) hide show
  1. package/dist/bin/repowise.js +107 -10
  2. package/package.json +1 -1
@@ -944,38 +944,99 @@ var init_platforms = __esm({
944
944
  });
945
945
 
946
946
  // ../../packages/shared/src/constants/tiers.ts
947
- var SUBSCRIPTION_TIERS, TIER_LIMITS;
947
+ var SUBSCRIPTION_TIERS, TIER_LIMITS, TIER_FEATURES;
948
948
  var init_tiers = __esm({
949
949
  "../../packages/shared/src/constants/tiers.ts"() {
950
950
  "use strict";
951
951
  SUBSCRIPTION_TIERS = {
952
+ FREE: "free",
953
+ // `starter` is the legacy $15 tier — kept as a migration alias (with its OLD limits)
954
+ // until existing Starter subs are price-swapped to Free (pricing v3). Removed after M7.
952
955
  STARTER: "starter",
953
956
  PRO: "pro",
954
957
  TEAM: "team"
955
958
  };
956
959
  TIER_LIMITS = {
960
+ [SUBSCRIPTION_TIERS.FREE]: {
961
+ maxRepos: 1,
962
+ maxSeats: 1,
963
+ minSeats: 1,
964
+ maxSyncsPerMonth: 4,
965
+ // manual-only, hard cap (no overage)
966
+ maxConcurrentSyncs: 1,
967
+ freeFullScans: 0,
968
+ // graph-only: no LLM full scan
969
+ bedrockEndpoint: "public"
970
+ },
971
+ // Legacy alias — retains the OLD Starter limits until existing Starter subs are
972
+ // migrated to Free, then removed (M7). Do NOT reference for new logic.
957
973
  [SUBSCRIPTION_TIERS.STARTER]: {
958
974
  maxRepos: 1,
959
975
  maxSeats: 1,
976
+ minSeats: 1,
960
977
  maxSyncsPerMonth: 10,
961
978
  maxConcurrentSyncs: 1,
979
+ freeFullScans: 1,
962
980
  bedrockEndpoint: "public"
963
981
  },
964
982
  [SUBSCRIPTION_TIERS.PRO]: {
965
- maxRepos: 2,
983
+ maxRepos: 1,
966
984
  maxSeats: 1,
967
- maxSyncsPerMonth: 30,
985
+ minSeats: 1,
986
+ maxSyncsPerMonth: 20,
968
987
  maxConcurrentSyncs: 2,
988
+ freeFullScans: 1,
969
989
  bedrockEndpoint: "public"
970
990
  },
971
991
  [SUBSCRIPTION_TIERS.TEAM]: {
972
- maxRepos: 3,
992
+ maxRepos: 1,
973
993
  maxSeats: 999999,
994
+ minSeats: 3,
974
995
  maxSyncsPerMonth: 30,
975
996
  maxConcurrentSyncs: 10,
997
+ freeFullScans: 1,
976
998
  bedrockEndpoint: "public"
977
999
  }
978
1000
  };
1001
+ TIER_FEATURES = {
1002
+ [SUBSCRIPTION_TIERS.FREE]: {
1003
+ knowledgeGraph: true,
1004
+ mcp: true,
1005
+ context: false,
1006
+ // LLM-generated narrative context docs
1007
+ docs: false,
1008
+ // RepoWise Docs
1009
+ autoSync: false,
1010
+ // auto-sync on merge (Free is manual-only)
1011
+ overage: false
1012
+ // pay-as-you-go syncs (Free is hard-capped)
1013
+ },
1014
+ // Legacy alias — full features until existing Starter subs migrate to Free.
1015
+ [SUBSCRIPTION_TIERS.STARTER]: {
1016
+ knowledgeGraph: true,
1017
+ mcp: true,
1018
+ context: true,
1019
+ docs: true,
1020
+ autoSync: true,
1021
+ overage: true
1022
+ },
1023
+ [SUBSCRIPTION_TIERS.PRO]: {
1024
+ knowledgeGraph: true,
1025
+ mcp: true,
1026
+ context: true,
1027
+ docs: true,
1028
+ autoSync: true,
1029
+ overage: true
1030
+ },
1031
+ [SUBSCRIPTION_TIERS.TEAM]: {
1032
+ knowledgeGraph: true,
1033
+ mcp: true,
1034
+ context: true,
1035
+ docs: true,
1036
+ autoSync: true,
1037
+ overage: true
1038
+ }
1039
+ };
979
1040
  }
980
1041
  });
981
1042
 
@@ -10125,7 +10186,7 @@ async function apiRequest(path, options) {
10125
10186
  if (body.error?.code) code = body.error.code;
10126
10187
  } catch {
10127
10188
  }
10128
- if (code === "BILLING_LIMIT_EXCEEDED" || code === "SYNC_LIMIT_EXCEEDED" || code === "BILLING_SUBSCRIPTION_INACTIVE") {
10189
+ if (code === "BILLING_LIMIT_EXCEEDED" || code === "SYNC_LIMIT_EXCEEDED" || code === "SEAT_LIMIT_EXCEEDED" || code === "BILLING_SUBSCRIPTION_INACTIVE") {
10129
10190
  throw new Error(`${message} Visit ${BILLING_URL} to manage your plan.`);
10130
10191
  }
10131
10192
  throw new Error(message);
@@ -11385,16 +11446,30 @@ Files are stored on our servers (not in git). Retry when online.`
11385
11446
  }
11386
11447
  }
11387
11448
  const contextFolder = DEFAULT_CONTEXT_FOLDER;
11449
+ let graphOnly = false;
11450
+ try {
11451
+ const usage = await apiRequest("/v1/account/usage");
11452
+ graphOnly = usage.plan === "free";
11453
+ } catch {
11454
+ }
11388
11455
  let contextFiles = [];
11389
11456
  if (repoRoot) {
11390
11457
  contextFiles = await scanLocalContextFiles(repoRoot, contextFolder);
11391
11458
  }
11392
11459
  if (contextFiles.length === 0) {
11393
- console.log(
11394
- chalk7.yellow(
11395
- ` No context files found in ${contextFolder}/. Try re-running \`repowise create\`.`
11396
- )
11397
- );
11460
+ if (graphOnly) {
11461
+ console.log(
11462
+ chalk7.cyan(
11463
+ ` Knowledge graph + MCP ready (Free plan). Upgrade to Pro for AI-generated context docs.`
11464
+ )
11465
+ );
11466
+ } else {
11467
+ console.log(
11468
+ chalk7.yellow(
11469
+ ` No context files found in ${contextFolder}/. Try re-running \`repowise create\`.`
11470
+ )
11471
+ );
11472
+ }
11398
11473
  }
11399
11474
  if (repoRoot) {
11400
11475
  spinner.start("Configuring AI tools...");
@@ -11492,6 +11567,13 @@ Files are stored on our servers (not in git). Retry when online.`
11492
11567
  ` ${chalk7.green("\u2022")} The RepoWise MCP is Live \u2014 your AI tools can query the knowledge graph directly.`
11493
11568
  );
11494
11569
  }
11570
+ if (graphOnly) {
11571
+ console.log("");
11572
+ console.log(chalk7.cyan(" You\u2019re on the Free plan \u2014 knowledge graph + MCP only."));
11573
+ console.log(
11574
+ chalk7.dim(" Upgrade to Pro for AI-generated context docs and auto-sync on merge.")
11575
+ );
11576
+ }
11495
11577
  console.log("");
11496
11578
  console.log(chalk7.cyan(" Next steps"));
11497
11579
  console.log(
@@ -11550,6 +11632,21 @@ async function member() {
11550
11632
  } else {
11551
11633
  spinner.succeed("Authenticated");
11552
11634
  }
11635
+ try {
11636
+ const usage = await apiRequest("/v1/account/usage");
11637
+ if (usage.plan && usage.plan !== "team") {
11638
+ spinner.fail(
11639
+ chalk8.yellow(
11640
+ `'repowise member' is a Team-plan feature (your account is on the ${usage.plan} plan).`
11641
+ )
11642
+ );
11643
+ console.log(
11644
+ chalk8.dim(" The account owner sets up the repository with `repowise create`.")
11645
+ );
11646
+ return;
11647
+ }
11648
+ } catch {
11649
+ }
11553
11650
  let repoId;
11554
11651
  let repoName;
11555
11652
  let repoRoot;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repowisestage",
3
- "version": "0.0.52",
3
+ "version": "0.0.53",
4
4
  "type": "module",
5
5
  "description": "AI-optimized codebase context generator",
6
6
  "bin": {