@topolo/cli 0.6.6 → 0.6.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.
Files changed (2) hide show
  1. package/dist/index.js +71 -20
  2. package/package.json +17 -17
package/dist/index.js CHANGED
@@ -618,7 +618,9 @@ var APPLICATIONS = {
618
618
  "domains": [
619
619
  "compose.topolo.app"
620
620
  ],
621
- "routes": [],
621
+ "routes": [
622
+ "compose.topolo.app"
623
+ ],
622
624
  "appId": "compose"
623
625
  },
624
626
  {
@@ -648,7 +650,9 @@ var APPLICATIONS = {
648
650
  "domains": [
649
651
  "consent.topolo.app"
650
652
  ],
651
- "routes": [],
653
+ "routes": [
654
+ "consent.topolo.app"
655
+ ],
652
656
  "appId": "consent"
653
657
  },
654
658
  {
@@ -750,7 +754,9 @@ var APPLICATIONS = {
750
754
  "domains": [
751
755
  "developers.topolo.app"
752
756
  ],
753
- "routes": [],
757
+ "routes": [
758
+ "developers.topolo.app"
759
+ ],
754
760
  "appId": "developers"
755
761
  },
756
762
  {
@@ -780,7 +786,9 @@ var APPLICATIONS = {
780
786
  "domains": [
781
787
  "director.topolo.app"
782
788
  ],
783
- "routes": [],
789
+ "routes": [
790
+ "director.topolo.app"
791
+ ],
784
792
  "appId": "director"
785
793
  },
786
794
  {
@@ -888,7 +896,9 @@ var APPLICATIONS = {
888
896
  "domains": [
889
897
  "flow.topolo.app"
890
898
  ],
891
- "routes": [],
899
+ "routes": [
900
+ "flow.topolo.app"
901
+ ],
892
902
  "appId": "flow"
893
903
  },
894
904
  {
@@ -918,7 +928,9 @@ var APPLICATIONS = {
918
928
  "domains": [
919
929
  "forecast.topolo.app"
920
930
  ],
921
- "routes": [],
931
+ "routes": [
932
+ "forecast.topolo.app"
933
+ ],
922
934
  "appId": "forecast"
923
935
  },
924
936
  {
@@ -1044,7 +1056,9 @@ var APPLICATIONS = {
1044
1056
  "domains": [
1045
1057
  "inventory.topolo.app"
1046
1058
  ],
1047
- "routes": [],
1059
+ "routes": [
1060
+ "inventory.topolo.app"
1061
+ ],
1048
1062
  "appId": "inventory"
1049
1063
  },
1050
1064
  {
@@ -1430,7 +1444,9 @@ var APPLICATIONS = {
1430
1444
  "domains": [
1431
1445
  "people.topolo.app"
1432
1446
  ],
1433
- "routes": [],
1447
+ "routes": [
1448
+ "people.topolo.app"
1449
+ ],
1434
1450
  "appId": "people"
1435
1451
  },
1436
1452
  {
@@ -1509,7 +1525,9 @@ var APPLICATIONS = {
1509
1525
  "domains": [
1510
1526
  "roadmapper.topolo.app"
1511
1527
  ],
1512
- "routes": [],
1528
+ "routes": [
1529
+ "roadmapper.topolo.app"
1530
+ ],
1513
1531
  "appId": "roadmapper"
1514
1532
  },
1515
1533
  {
@@ -1539,7 +1557,9 @@ var APPLICATIONS = {
1539
1557
  "domains": [
1540
1558
  "sign.topolo.app"
1541
1559
  ],
1542
- "routes": [],
1560
+ "routes": [
1561
+ "sign.topolo.app"
1562
+ ],
1543
1563
  "appId": "sign"
1544
1564
  },
1545
1565
  {
@@ -1653,7 +1673,9 @@ var APPLICATIONS = {
1653
1673
  "domains": [
1654
1674
  "spaces.topolo.app"
1655
1675
  ],
1656
- "routes": [],
1676
+ "routes": [
1677
+ "spaces.topolo.app"
1678
+ ],
1657
1679
  "appId": "spaces"
1658
1680
  },
1659
1681
  {
@@ -5077,13 +5099,13 @@ function registerActionsCommand(program2) {
5077
5099
  fail(err, mode);
5078
5100
  }
5079
5101
  });
5080
- actions.command("capabilities").description("Discover capability and schema actions for one application").option("-s, --service <service>", "App id, slug, or name").option("--json", "Output JSON").option("--no-json", "Output human-readable table").action(async (opts, command) => {
5102
+ actions.command("capabilities").description("List every published action for one application (its capability contract)").option("-s, --service <service>", "App id, slug, or name").option("--json", "Output JSON").option("--no-json", "Output human-readable table").action(async (opts, command) => {
5081
5103
  const mode = resolveOutputMode(opts.json ?? command.parent?.opts().json);
5082
5104
  try {
5083
5105
  const topolo = await requiredClient();
5084
5106
  const service = opts.service || command.parent?.opts().service;
5085
5107
  if (!service?.trim()) throw new Error("--service is required for capability discovery");
5086
- const result = await topolo.client.searchActions({ service: service.trim(), query: "capabilities", limit: 100 });
5108
+ const result = await topolo.client.searchActions({ service: service.trim(), limit: 100 });
5087
5109
  emit(result, mode, () => formatActionRows(result.actions, result.page.nextCursor));
5088
5110
  } catch (err) {
5089
5111
  fail(err, mode);
@@ -7289,6 +7311,10 @@ function envDts(api) {
7289
7311
  "interface ImportMetaEnv {",
7290
7312
  " readonly VITE_TOPOLO_AUTH_URL?: string;",
7291
7313
  " readonly VITE_TOPOLO_APP_ID?: string;",
7314
+ " readonly VITE_TOPOLO_INSIGHTS_SITE_KEY?: string;",
7315
+ " readonly VITE_TOPOLO_INSIGHTS_ENDPOINT?: string;",
7316
+ " readonly VITE_TOPOLO_CONSENT_BASE_URL?: string;",
7317
+ " readonly VITE_TOPOLO_CONSENT_SDK_KEY?: string;",
7292
7318
  " readonly VITE_TOPOLO_CLIENT_ID?: string;",
7293
7319
  " readonly VITE_TOPOLO_REDIRECT_URI?: string;",
7294
7320
  " readonly VITE_TOPOLO_SCOPES?: string;"
@@ -8959,6 +8985,13 @@ function topoloAppManifestJson(application, options) {
8959
8985
  production: "cd ../.. && DEPLOY_ENVIRONMENT=production VITE_TOPOLO_AUTH_URL=https://auth.topolo.app pnpm run build"
8960
8986
  },
8961
8987
  healthcheckPath: options.api ? "/api/health" : "/",
8988
+ vars: {
8989
+ INSIGHTS_SITE_KEY: {
8990
+ development: "",
8991
+ staging: "",
8992
+ production: ""
8993
+ }
8994
+ },
8962
8995
  ...options.api ? {
8963
8996
  bindings: {
8964
8997
  services: [
@@ -9017,6 +9050,7 @@ function topoloAppManifestJson(application, options) {
9017
9050
  version: "1.0.0",
9018
9051
  pricing: { type: "free", monthlyPrice: null },
9019
9052
  supportEmail: "support@topolo.io",
9053
+ repoUrl: `https://github.com/Topolo-io/${application.appDir}`,
9020
9054
  auth: {
9021
9055
  callbackPath: "/auth/callback",
9022
9056
  requestedScopes: unique3([
@@ -9030,7 +9064,7 @@ function topoloAppManifestJson(application, options) {
9030
9064
  },
9031
9065
  capabilities: options.payload.capabilities,
9032
9066
  marketplace: {
9033
- intent: options.payload.distributionModel === "marketplace" ? "submit_when_ready" : "not_requested",
9067
+ intent: options.payload.distributionModel === "marketplace" ? "publish" : "not_requested",
9034
9068
  status: "preview",
9035
9069
  shortBlurb: options.payload.experience.tagline,
9036
9070
  tagline: options.payload.experience.tagline,
@@ -9823,7 +9857,7 @@ function applicationScaffoldPayload(application, options = {}) {
9823
9857
  const containerAppId = normalizeContainerAppId(options.containerAppId, surfaceModel);
9824
9858
  const profile = normalizeScaffoldProfile(options.profile);
9825
9859
  const ownerType = target === "platform" ? "topolo_first_party" : "third_party";
9826
- const distributionModel = target === "platform" ? "marketplace" : "organization_internal";
9860
+ const distributionModel = target === "platform" ? "marketplace" : options.distributionModel ?? "organization_internal";
9827
9861
  const capabilityComposition = resolveApplicationCapabilities({
9828
9862
  target,
9829
9863
  browser,
@@ -10716,7 +10750,7 @@ function buildProvisioningRequest(payload, supportEmail) {
10716
10750
  ...payload.application.appId ? [`${payload.application.id}:read`] : []
10717
10751
  ])),
10718
10752
  marketplace: {
10719
- intent: payload.distributionModel === "marketplace" ? "submit_when_ready" : "not_requested",
10753
+ intent: payload.target === "platform" && payload.distributionModel === "marketplace" ? "publish" : payload.distributionModel === "marketplace" ? "submit_when_ready" : "not_requested",
10720
10754
  status: "preview",
10721
10755
  shortBlurb: payload.experience.tagline,
10722
10756
  tagline: payload.experience.tagline,
@@ -10732,7 +10766,7 @@ function buildProvisioningRequest(payload, supportEmail) {
10732
10766
  pricingType: "free",
10733
10767
  monthlyPrice: null,
10734
10768
  demoUrl: payload.application.productionUrl,
10735
- repoUrl: null,
10769
+ repoUrl: payload.target === "platform" ? `https://github.com/Topolo-io/${payload.application.appDir}` : null,
10736
10770
  supportEmail,
10737
10771
  tags: [],
10738
10772
  screenshots: [],
@@ -10833,13 +10867,15 @@ async function reconcileApplicationCapabilitySource(options) {
10833
10867
  const target = options.ownerType === "topolo_first_party" ? "platform" : "developer";
10834
10868
  const surfaces = resolveManifestSurfaces(manifest, registration);
10835
10869
  const existing = Array.isArray(registration.capabilities) ? registration.capabilities.filter((value) => typeof value === "string") : [];
10870
+ const declaredNotificationRole = record(manifest.notifications)?.role;
10871
+ const inferredCapabilities = declaredNotificationRole === "producer" ? ["notification_producer"] : [];
10836
10872
  const capabilities = resolveApplicationCapabilities({
10837
10873
  target,
10838
10874
  browser: surfaces.browser,
10839
10875
  api: surfaces.api,
10840
10876
  mobile: surfaces.mobile,
10841
10877
  distributionModel: registration.distributionModel === "marketplace" ? "marketplace" : "organization_internal",
10842
- requested: [...existing, ...options.additions ?? []]
10878
+ requested: [...existing, ...inferredCapabilities, ...options.additions ?? []]
10843
10879
  });
10844
10880
  const marketplace = record(registration.marketplace);
10845
10881
  const unlistedNativeArtifact = options.ownerType === "topolo_first_party" && registration.surfaceModel === "mobile_container" && registration.distributionModel === "organization_internal" && marketplace?.intent === "unlisted";
@@ -11213,7 +11249,7 @@ async function completeApplicationRegistrationInteractively(options) {
11213
11249
  },
11214
11250
  capabilities: Array.isArray(existing.capabilities) ? existing.capabilities : ["login", "launcher"],
11215
11251
  marketplace: record2(existing.marketplace) || {
11216
- intent: options.expectedOwnerType === "topolo_first_party" ? "submit_when_ready" : "not_requested",
11252
+ intent: options.expectedOwnerType === "topolo_first_party" ? "publish" : "not_requested",
11217
11253
  status: "preview",
11218
11254
  shortBlurb: description,
11219
11255
  tagline: description,
@@ -11290,7 +11326,8 @@ async function loadApplicationReconcileRequest(options) {
11290
11326
  requestedScopes: registration.auth?.requestedScopes ?? [],
11291
11327
  capabilities: registration.capabilities,
11292
11328
  marketplace: { ...registration.marketplace, appUrl: productionUrl },
11293
- notifications: manifest.notifications ?? null
11329
+ notifications: manifest.notifications ?? null,
11330
+ actions: manifest.actions ?? []
11294
11331
  }
11295
11332
  };
11296
11333
  }
@@ -11542,6 +11579,9 @@ function registerAppsCommand(program2) {
11542
11579
  apps.command("scaffold <application>").description(
11543
11580
  "Generate a third-party Topolo application scaffold for business or personal/household use."
11544
11581
  ).option("--json", "Output JSON").option("--no-json", "Output human-readable checklist").option("--app-dir <path>", "Application directory under the scaffold root").option("--name <name>", "Application display/package source name").option("--package-name <name>", "package.json name").option("--production-url <url>", "Production browser URL").option("--app-id <id>", "Stable SDK/Auth app id for API-backed apps").option("--audience <audience>", "Developer app audience: business or personal").option("--tenancy <tenancy>", "Developer app tenancy: organization or household").option(
11582
+ "--distribution-model <model>",
11583
+ "Developer app distribution: organization_internal or marketplace (marketplace requires approval)"
11584
+ ).option(
11545
11585
  "--surface-model <surfaceModel>",
11546
11586
  "Developer app surface model: web_app, mobile_container, mobile_module, or messaging_surface"
11547
11587
  ).option("--container-app-id <appId>", "Container app id when --surface-model mobile_module is used").option("--capability <id...>", "Compose one or more approved Topolo capabilities").option("--write", "Write the generated scaffold files to disk").option("--repo-root <path>", "Directory where scaffold files should be written").option("--force", "Overwrite existing scaffold files when --write is set").option("--with-api", "Include API/service files for developer scaffolds").option("--no-api", "Do not include API/service requirements").option("--no-browser", "Do not include browser-shell requirements").option(
@@ -11562,6 +11602,7 @@ function registerAppsCommand(program2) {
11562
11602
  target: "developer",
11563
11603
  audience: resolveScaffoldAudience(opts.audience),
11564
11604
  tenancy: resolveScaffoldTenancy(opts.tenancy),
11605
+ distributionModel: resolveScaffoldDistributionModel(opts.distributionModel),
11565
11606
  surfaceModel: resolveScaffoldSurfaceModel(opts.surfaceModel),
11566
11607
  containerAppId: opts.containerAppId,
11567
11608
  capabilities: opts.capability
@@ -11921,6 +11962,16 @@ function resolveScaffoldTenancy(value) {
11921
11962
  }
11922
11963
  throw new Error("Invalid --tenancy value. Use organization or household.");
11923
11964
  }
11965
+ function resolveScaffoldDistributionModel(value) {
11966
+ if (!value) return void 0;
11967
+ const normalized = value.trim().toLowerCase().replace(/-/g, "_");
11968
+ if (normalized === "marketplace" || normalized === "organization_internal") {
11969
+ return normalized;
11970
+ }
11971
+ throw new Error(
11972
+ "Invalid --distribution-model value. Use organization_internal or marketplace."
11973
+ );
11974
+ }
11924
11975
  function resolveScaffoldSurfaceModel(value) {
11925
11976
  if (!value) return void 0;
11926
11977
  const normalized = value.trim().toLowerCase();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@topolo/cli",
3
- "version": "0.6.6",
4
- "topoloPublishedVersion": "0.6.5",
3
+ "version": "0.6.8",
4
+ "topoloPublishedVersion": "0.6.8",
5
5
  "description": "Command-line interface for Topolo developers, operators, and agents, with internal first-party scaffolding available under the topolo platform namespace.",
6
6
  "type": "module",
7
7
  "bin": {
@@ -11,20 +11,6 @@
11
11
  "dist",
12
12
  "skills"
13
13
  ],
14
- "dependencies": {
15
- "commander": "^12.1.0"
16
- },
17
- "devDependencies": {
18
- "@topolo/sdk": "file:../topolo-sdk",
19
- "@types/node": "^20.12.0",
20
- "@vitest/coverage-v8": "3.2.6",
21
- "tsup": "^8.0.0",
22
- "typescript": "^5.4.0",
23
- "vitest": "3.2.6"
24
- },
25
- "engines": {
26
- "node": ">=20"
27
- },
28
14
  "scripts": {
29
15
  "build:sdk": "python3 ../../tooling/with-resource-lock.py ../topolo-sdk -- pnpm --dir ../topolo-sdk build",
30
16
  "prebuild": "pnpm run build:sdk",
@@ -38,5 +24,19 @@
38
24
  "test:watch": "vitest",
39
25
  "precoverage": "pnpm run build:sdk",
40
26
  "coverage": "vitest run --coverage"
27
+ },
28
+ "dependencies": {
29
+ "commander": "^12.1.0"
30
+ },
31
+ "devDependencies": {
32
+ "@topolo/sdk": "file:../topolo-sdk",
33
+ "@types/node": "^20.12.0",
34
+ "@vitest/coverage-v8": "3.2.6",
35
+ "tsup": "^8.0.0",
36
+ "typescript": "^5.4.0",
37
+ "vitest": "3.2.6"
38
+ },
39
+ "engines": {
40
+ "node": ">=20"
41
41
  }
42
- }
42
+ }