@aglyn/aglyn 1.0.0-beta.144 → 1.0.0-beta.146

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aglyn/aglyn",
3
- "version": "1.0.0-beta.144",
3
+ "version": "1.0.0-beta.146",
4
4
  "license": "Apache-2.0",
5
5
  "homepage": "https://aglyn.com",
6
6
  "repository": {
@@ -33,15 +33,15 @@
33
33
  "./package.json": "./package.json"
34
34
  },
35
35
  "dependencies": {
36
- "@aglyn/shared-data-enums": "1.0.0-beta.144",
37
- "@aglyn/shared-data-mdi": "1.0.0-beta.144",
38
- "@aglyn/shared-data-types": "1.0.0-beta.144",
39
- "@aglyn/shared-util-email": "1.0.0-beta.144",
40
- "@aglyn/shared-util-http": "1.0.0-beta.144",
41
- "@aglyn/shared-util-logger": "1.0.0-beta.144",
42
- "@aglyn/shared-util-timestamp": "1.0.0-beta.144",
43
- "@aglyn/shared-util-tools": "1.0.0-beta.144",
44
- "@aglyn/shared-util-vendor": "1.0.0-beta.144",
36
+ "@aglyn/shared-data-enums": "1.0.0-beta.146",
37
+ "@aglyn/shared-data-mdi": "1.0.0-beta.146",
38
+ "@aglyn/shared-data-types": "1.0.0-beta.146",
39
+ "@aglyn/shared-util-email": "1.0.0-beta.146",
40
+ "@aglyn/shared-util-http": "1.0.0-beta.146",
41
+ "@aglyn/shared-util-logger": "1.0.0-beta.146",
42
+ "@aglyn/shared-util-timestamp": "1.0.0-beta.146",
43
+ "@aglyn/shared-util-tools": "1.0.0-beta.146",
44
+ "@aglyn/shared-util-vendor": "1.0.0-beta.146",
45
45
  "@data-driven-forms/react-form-renderer": "^4.2.0",
46
46
  "@msgpack/msgpack": "^3.1.3",
47
47
  "@types/unist": "^3.0.3",
@@ -24,6 +24,7 @@
24
24
  * (client) — never `@aglyn/aglyn/server` (AGL-405).
25
25
  */
26
26
  export * from './console-widget-slot-context';
27
+ export * from './deployment-capabilities-context';
27
28
  export * from './enabled-plugins-context';
28
29
  export * from './entity-picker-context';
29
30
  export * from './link-target-search-context';
@@ -22,6 +22,7 @@
22
22
  * `./server` barrel and only reachable via the full `@aglyn/aglyn` barrel
23
23
  * (client) — never `@aglyn/aglyn/server` (AGL-405).
24
24
  */ export * from "./console-widget-slot-context.js";
25
+ export * from "./deployment-capabilities-context.js";
25
26
  export * from "./enabled-plugins-context.js";
26
27
  export * from "./entity-picker-context.js";
27
28
  export * from "./link-target-search-context.js";
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/contexts.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2022 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Client-only React contexts that live in @aglyn/aglyn (not a UI lib) so\n * every canvas-rendering surface — console, plugins, tenant render — shares\n * ONE context module instance (a second instance renders the site blank).\n * They call `createContext` at module scope, which App Router forbids in a\n * Server Component's module graph, so they are split out of the server-safe\n * `./server` barrel and only reachable via the full `@aglyn/aglyn` barrel\n * (client) — never `@aglyn/aglyn/server` (AGL-405).\n */\nexport * from './console-widget-slot-context'\nexport * from './enabled-plugins-context'\nexport * from './entity-picker-context'\nexport * from './link-target-search-context'\nexport * from './media-picker-context'\nexport * from './node-identity'\nexport * from './page-header-actions-context'\nexport * from './page-header-record-context'\nexport * from './screen-link-context'\nexport * from './site-context'\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;;CAQC,GACD,cAAc,mCAA+B;AAC7C,cAAc,+BAA2B;AACzC,cAAc,6BAAyB;AACvC,cAAc,kCAA8B;AAC5C,cAAc,4BAAwB;AACtC,cAAc,qBAAiB;AAC/B,cAAc,mCAA+B;AAC7C,cAAc,kCAA8B;AAC5C,cAAc,2BAAuB;AACrC,cAAc,oBAAgB"}
1
+ {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/contexts.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2022 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Client-only React contexts that live in @aglyn/aglyn (not a UI lib) so\n * every canvas-rendering surface — console, plugins, tenant render — shares\n * ONE context module instance (a second instance renders the site blank).\n * They call `createContext` at module scope, which App Router forbids in a\n * Server Component's module graph, so they are split out of the server-safe\n * `./server` barrel and only reachable via the full `@aglyn/aglyn` barrel\n * (client) — never `@aglyn/aglyn/server` (AGL-405).\n */\nexport * from './console-widget-slot-context'\nexport * from './deployment-capabilities-context'\nexport * from './enabled-plugins-context'\nexport * from './entity-picker-context'\nexport * from './link-target-search-context'\nexport * from './media-picker-context'\nexport * from './node-identity'\nexport * from './page-header-actions-context'\nexport * from './page-header-record-context'\nexport * from './screen-link-context'\nexport * from './site-context'\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;;CAQC,GACD,cAAc,mCAA+B;AAC7C,cAAc,uCAAmC;AACjD,cAAc,+BAA2B;AACzC,cAAc,6BAAyB;AACvC,cAAc,kCAA8B;AAC5C,cAAc,4BAAwB;AACtC,cAAc,qBAAiB;AAC/B,cAAc,mCAA+B;AAC7C,cAAc,kCAA8B;AAC5C,cAAc,2BAAuB;AACrC,cAAc,oBAAgB"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * What THIS DEPLOYMENT can do — facts about the install, not about the
19
+ * organization reading it (AGL-3080).
20
+ *
21
+ * The third kind of answer a plugin surface needs and cannot reach for
22
+ * itself. `entitled` says what the workspace bought and `permissions` says
23
+ * who is reading; neither says whether the software in front of them is
24
+ * wired up to a provider at all. A self-host install is the case: the
25
+ * marketplace's release flag defaults ON, so a fresh install draws the whole
26
+ * thing — browse, listing pages, a Buy button, a payout panel — all of it
27
+ * backed by Aglyn's Stripe Connect platform, which the operator does not have
28
+ * and cannot get.
29
+ *
30
+ * WHY A CONTEXT, and why the value comes from a SERVER layout. The facts are
31
+ * server-only secrets: `STRIPE_SECRET_KEY` carries no `NEXT_PUBLIC_` prefix,
32
+ * so a client component reading `process.env` for it gets `undefined` and
33
+ * concludes "not configured" on every deployment, our own included. The
34
+ * console's server layout knows the answer before any JavaScript ships and
35
+ * hands it down, which is also why this is not a fetch: a notice that says
36
+ * what a deployment cannot do must not arrive after the click it exists to
37
+ * precede.
38
+ *
39
+ * WHAT IT IS NOT. Not a release flag and not an entitlement — the three
40
+ * answer different questions and a surface usually needs all three. The flag
41
+ * asks whether this deployment should show the feature; the entitlement asks
42
+ * whether this organization bought it; this asks whether the deployment can
43
+ * carry it out. Nothing here is a gate: browsing and free installs genuinely
44
+ * work without Stripe, so a surface reads this to EXPLAIN itself, and hiding
45
+ * on it would remove working functionality to avoid describing one that is
46
+ * off.
47
+ */
48
+ export interface DeploymentCapabilities {
49
+ /**
50
+ * True when this deployment has a Stripe platform at all (AGL-2019) —
51
+ * Aglyn as the biller, which is infrastructure, not a tenant's own
52
+ * checkout.
53
+ *
54
+ * ⚠️ Read it the safe way round. The default below is `true`, because the
55
+ * absence of a provider is not evidence of an absent platform: every
56
+ * surface rendered outside one — a test harness, a widget mounted in a
57
+ * zone — would otherwise draw a permanent "not configured" banner on
58
+ * Aglyn's own console.
59
+ */
60
+ payments: boolean;
61
+ }
62
+ export declare const DEPLOYMENT_CAPABILITIES_DEFAULT: DeploymentCapabilities;
63
+ export declare const DeploymentCapabilitiesContext: import("react").Context<DeploymentCapabilities>;
64
+ /** Hook form of {@link DeploymentCapabilitiesContext}. */
65
+ export declare function useDeploymentCapabilities(): DeploymentCapabilities;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ // Same placement rationale as page-header-record-context.ts: lives in
17
+ // @aglyn/aglyn without a 'use client' banner so both the console app and the
18
+ // feature plugins share one context module.
19
+ import { createContext, useContext } from "react";
20
+ export const DEPLOYMENT_CAPABILITIES_DEFAULT = {
21
+ payments: true
22
+ };
23
+ export const DeploymentCapabilitiesContext = createContext(DEPLOYMENT_CAPABILITIES_DEFAULT);
24
+ DeploymentCapabilitiesContext.displayName = 'DeploymentCapabilitiesContext';
25
+ /** Hook form of {@link DeploymentCapabilitiesContext}. */ export function useDeploymentCapabilities() {
26
+ return useContext(DeploymentCapabilitiesContext);
27
+ }
28
+
29
+ //# sourceMappingURL=deployment-capabilities-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/deployment-capabilities-context.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Same placement rationale as page-header-record-context.ts: lives in\n// @aglyn/aglyn without a 'use client' banner so both the console app and the\n// feature plugins share one context module.\nimport { createContext, useContext } from 'react'\n\n/**\n * What THIS DEPLOYMENT can do — facts about the install, not about the\n * organization reading it (AGL-3080).\n *\n * The third kind of answer a plugin surface needs and cannot reach for\n * itself. `entitled` says what the workspace bought and `permissions` says\n * who is reading; neither says whether the software in front of them is\n * wired up to a provider at all. A self-host install is the case: the\n * marketplace's release flag defaults ON, so a fresh install draws the whole\n * thing — browse, listing pages, a Buy button, a payout panel — all of it\n * backed by Aglyn's Stripe Connect platform, which the operator does not have\n * and cannot get.\n *\n * WHY A CONTEXT, and why the value comes from a SERVER layout. The facts are\n * server-only secrets: `STRIPE_SECRET_KEY` carries no `NEXT_PUBLIC_` prefix,\n * so a client component reading `process.env` for it gets `undefined` and\n * concludes \"not configured\" on every deployment, our own included. The\n * console's server layout knows the answer before any JavaScript ships and\n * hands it down, which is also why this is not a fetch: a notice that says\n * what a deployment cannot do must not arrive after the click it exists to\n * precede.\n *\n * WHAT IT IS NOT. Not a release flag and not an entitlement — the three\n * answer different questions and a surface usually needs all three. The flag\n * asks whether this deployment should show the feature; the entitlement asks\n * whether this organization bought it; this asks whether the deployment can\n * carry it out. Nothing here is a gate: browsing and free installs genuinely\n * work without Stripe, so a surface reads this to EXPLAIN itself, and hiding\n * on it would remove working functionality to avoid describing one that is\n * off.\n */\nexport interface DeploymentCapabilities {\n /**\n * True when this deployment has a Stripe platform at all (AGL-2019) —\n * Aglyn as the biller, which is infrastructure, not a tenant's own\n * checkout.\n *\n * ⚠️ Read it the safe way round. The default below is `true`, because the\n * absence of a provider is not evidence of an absent platform: every\n * surface rendered outside one — a test harness, a widget mounted in a\n * zone — would otherwise draw a permanent \"not configured\" banner on\n * Aglyn's own console.\n */\n payments: boolean\n}\n\nexport const DEPLOYMENT_CAPABILITIES_DEFAULT: DeploymentCapabilities = {\n payments: true,\n}\n\nexport const DeploymentCapabilitiesContext =\n createContext<DeploymentCapabilities>(DEPLOYMENT_CAPABILITIES_DEFAULT)\nDeploymentCapabilitiesContext.displayName = 'DeploymentCapabilitiesContext'\n\n/** Hook form of {@link DeploymentCapabilitiesContext}. */\nexport function useDeploymentCapabilities(): DeploymentCapabilities {\n return useContext(DeploymentCapabilitiesContext)\n}\n"],"names":["createContext","useContext","DEPLOYMENT_CAPABILITIES_DEFAULT","payments","DeploymentCapabilitiesContext","displayName","useDeploymentCapabilities"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,sEAAsE;AACtE,6EAA6E;AAC7E,4CAA4C;AAC5C,SAASA,aAAa,EAAEC,UAAU,QAAQ,QAAO;AAgDjD,OAAO,MAAMC,kCAA0D;IACrEC,UAAU;AACZ,EAAC;AAED,OAAO,MAAMC,gCACXJ,cAAsCE,iCAAgC;AACxEE,8BAA8BC,WAAW,GAAG;AAE5C,wDAAwD,GACxD,OAAO,SAASC;IACd,OAAOL,WAAWG;AACpB"}
@@ -444,9 +444,28 @@ export const PLAN_ENTITLEMENTS = {
444
444
  // rule — a positive band with no rate beside it is usage past a bound
445
445
  // that is silently free, which `plan-entitlements.spec.ts` forbids.
446
446
  //
447
- // `features.aiAssist` stays false: the band is credits, not the guided
448
- // rung of the console assistant, exactly as on Free. The AI add-on adds
449
- // `AI_ADDON_CREDITS_PER_MONTH.starter` on top and switches both flags on.
447
+ // `features.aiAssist` is TRUE, and AGL-3203 shipping it false was the
448
+ // defect AGL-3207 closes. The reasoning then was "the band is credits,
449
+ // not the guided rung, exactly as on Free" — but on Free the band IS
450
+ // spendable, through `aiGenerative`, which is the door the taste exists
451
+ // for. Starter carried neither flag, so it was the only row on the
452
+ // ladder sold a band with nothing to spend it through: 750 credits
453
+ // reachable only by buying the $9 add-on that was also the only thing
454
+ // that made them usable. "No plan bands at zero any more" was true of
455
+ // the number and false of the capability.
456
+ //
457
+ // It opens `aiAssist` rather than `aiGenerative` because that is the
458
+ // shape of every paid rung above it — the included band funds the guided
459
+ // assistant and generation is the add-on. Opening the generative door
460
+ // here instead would hand the FIRST paid rung a door Pro through Agency
461
+ // have to buy.
462
+ //
463
+ // No cost moves: `tier-margin-floor.spec.ts` already prices this tier's
464
+ // assist term at 100% burn of the 750 credits, 75¢/mo. A door does not
465
+ // widen a band; it only makes spend that was already modeled reachable.
466
+ //
467
+ // The AI add-on adds `AI_ADDON_CREDITS_PER_MONTH.starter` on top and
468
+ // switches `aiGenerative` on as well.
450
469
  assistCreditsPerMonth: 750,
451
470
  apiRequestsPerMonth: 0,
452
471
  datasetsPerOrg: 3,
@@ -481,7 +500,7 @@ export const PLAN_ENTITLEMENTS = {
481
500
  removeBranding: true,
482
501
  scheduledPublishing: false,
483
502
  marketplaceSelling: false,
484
- aiAssist: false,
503
+ aiAssist: true,
485
504
  aiGenerative: false,
486
505
  workflows: true,
487
506
  dataStore: true,