aios-core 4.2.4 → 4.2.5
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/.aios-core/data/entity-registry.yaml +2 -2
- package/.aios-core/data/registry-update-log.jsonl +6 -0
- package/.aios-core/install-manifest.yaml +3 -3
- package/package.json +2 -1
- package/pro/README.md +66 -0
- package/pro/license/degradation.js +220 -0
- package/pro/license/errors.js +450 -0
- package/pro/license/feature-gate.js +354 -0
- package/pro/license/index.js +181 -0
- package/pro/license/license-api.js +617 -0
- package/pro/license/license-cache.js +523 -0
- package/pro/license/license-crypto.js +303 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
metadata:
|
|
2
2
|
version: 1.0.0
|
|
3
|
-
lastUpdated: '2026-02-16T01:
|
|
3
|
+
lastUpdated: '2026-02-16T01:40:14.162Z'
|
|
4
4
|
entityCount: 505
|
|
5
5
|
checksumAlgorithm: sha256
|
|
6
6
|
entities:
|
|
@@ -4778,7 +4778,7 @@ entities:
|
|
|
4778
4778
|
constraints: []
|
|
4779
4779
|
extensionPoints: []
|
|
4780
4780
|
checksum: sha256:352b928acd0a477875192ce96fa3aebb278fe9d9b55bc24a144e7aaafa180b45
|
|
4781
|
-
lastVerified: '2026-02-16T01:
|
|
4781
|
+
lastVerified: '2026-02-16T01:40:14.160Z'
|
|
4782
4782
|
scripts:
|
|
4783
4783
|
agent-assignment-resolver:
|
|
4784
4784
|
path: .aios-core/development/scripts/agent-assignment-resolver.js
|
|
@@ -171,3 +171,9 @@
|
|
|
171
171
|
{"timestamp":"2026-02-16T01:24:17.176Z","action":"add","path":".aios-core/core/code-intel/providers/provider-interface.js","trigger":"watcher"}
|
|
172
172
|
{"timestamp":"2026-02-16T01:40:14.161Z","action":"add","path":".aios-core/product/templates/statusline/statusline-script.js","trigger":"watcher"}
|
|
173
173
|
{"timestamp":"2026-02-16T01:41:14.535Z","action":"add","path":".aios-core/product/templates/statusline/statusline-script.js","trigger":"watcher"}
|
|
174
|
+
{"timestamp":"2026-02-16T01:46:55.003Z","action":"change","path":".aios-core/core/code-intel/code-intel-enricher.js","trigger":"watcher"}
|
|
175
|
+
{"timestamp":"2026-02-16T01:46:55.004Z","action":"change","path":".aios-core/core/code-intel/index.js","trigger":"watcher"}
|
|
176
|
+
{"timestamp":"2026-02-16T01:46:55.004Z","action":"change","path":".aios-core/core/code-intel/providers/code-graph-provider.js","trigger":"watcher"}
|
|
177
|
+
{"timestamp":"2026-02-16T01:46:56.302Z","action":"change","path":".aios-core/core/code-intel/code-intel-enricher.js","trigger":"watcher"}
|
|
178
|
+
{"timestamp":"2026-02-16T01:46:56.302Z","action":"change","path":".aios-core/core/code-intel/index.js","trigger":"watcher"}
|
|
179
|
+
{"timestamp":"2026-02-16T01:46:56.303Z","action":"change","path":".aios-core/core/code-intel/providers/code-graph-provider.js","trigger":"watcher"}
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
# - SHA256 hashes for change detection
|
|
8
8
|
# - File types for categorization
|
|
9
9
|
#
|
|
10
|
-
version: 4.2.
|
|
11
|
-
generated_at: "2026-02-
|
|
10
|
+
version: 4.2.5
|
|
11
|
+
generated_at: "2026-02-16T02:46:13.044Z"
|
|
12
12
|
generator: scripts/generate-install-manifest.js
|
|
13
13
|
file_count: 995
|
|
14
14
|
files:
|
|
@@ -1013,7 +1013,7 @@ files:
|
|
|
1013
1013
|
type: data
|
|
1014
1014
|
size: 34251
|
|
1015
1015
|
- path: data/entity-registry.yaml
|
|
1016
|
-
hash: sha256:
|
|
1016
|
+
hash: sha256:ac383b2adae912c065b537029c218a05a0bd20cd89b41d8d83abf70b01a65569
|
|
1017
1017
|
type: data
|
|
1018
1018
|
size: 289345
|
|
1019
1019
|
- path: data/learned-patterns.yaml
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aios-core",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.5",
|
|
4
4
|
"description": "Synkra AIOS: AI-Orchestrated System for Full Stack Development - Core Framework",
|
|
5
5
|
"bin": {
|
|
6
6
|
"aios": "bin/aios.js",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
".claude/CLAUDE.md",
|
|
20
20
|
".claude/rules/",
|
|
21
21
|
".claude/hooks/",
|
|
22
|
+
"pro/license/",
|
|
22
23
|
"README.md",
|
|
23
24
|
"LICENSE"
|
|
24
25
|
],
|
package/pro/README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# AIOS Pro
|
|
2
|
+
|
|
3
|
+
Premium features for [Synkra AIOS](https://github.com/SynkraAI/aios-core).
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
AIOS Pro extends the open-source AIOS framework with premium capabilities:
|
|
8
|
+
|
|
9
|
+
- **Premium Squads** - Pre-built squads for SaaS, e-commerce, and fintech
|
|
10
|
+
- **Persistent Memory** - Cross-session context and memory analytics
|
|
11
|
+
- **Usage Metrics** - Dashboards, team analytics, and cost tracking
|
|
12
|
+
- **Enterprise Integrations** - ClickUp, Google Drive, GitLab, Jira, Azure DevOps
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
AIOS Pro requires an active license and is distributed via npm.
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Install
|
|
20
|
+
npm install @aios-fullstack/pro
|
|
21
|
+
|
|
22
|
+
# Activate license
|
|
23
|
+
aios pro activate --key PRO-XXXX-XXXX-XXXX-XXXX
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Usage with aios-core
|
|
27
|
+
|
|
28
|
+
AIOS Pro is designed to work as a git submodule of `aios-core`:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Clone aios-core with pro submodule
|
|
32
|
+
git clone --recurse-submodules https://github.com/SynkraAI/aios-core.git
|
|
33
|
+
|
|
34
|
+
# Or add to existing clone
|
|
35
|
+
cd aios-core
|
|
36
|
+
git submodule update --init pro
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Activate License
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
aios pro activate --key PRO-XXXX-XXXX-XXXX-XXXX
|
|
43
|
+
aios pro status
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Structure
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
aios-pro/
|
|
50
|
+
├── squads/ # Premium squad definitions
|
|
51
|
+
├── memory/ # Persistent memory modules
|
|
52
|
+
├── metrics/ # Usage dashboards and analytics
|
|
53
|
+
├── integrations/ # Enterprise integration adapters
|
|
54
|
+
├── license/ # License infrastructure
|
|
55
|
+
└── pro-config.yaml # Pro extension configuration
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Requirements
|
|
59
|
+
|
|
60
|
+
- Node.js >= 18
|
|
61
|
+
- aios-core >= 3.12.0
|
|
62
|
+
- Active AIOS Pro license
|
|
63
|
+
|
|
64
|
+
## License
|
|
65
|
+
|
|
66
|
+
Proprietary - Copyright (c) 2026 SynkraAI. All rights reserved.
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Graceful Degradation Module
|
|
3
|
+
*
|
|
4
|
+
* Utilities for handling pro feature unavailability with user-friendly
|
|
5
|
+
* messages that preserve data and provide clear next steps.
|
|
6
|
+
*
|
|
7
|
+
* Per ADR-PRO-003 and AC-8:
|
|
8
|
+
* - Never show upgrade prompts on core features
|
|
9
|
+
* - Never delete or corrupt user data
|
|
10
|
+
* - Always provide actionable next steps
|
|
11
|
+
* - Keep messages non-intrusive
|
|
12
|
+
*
|
|
13
|
+
* @module pro/license/degradation
|
|
14
|
+
* @see ADR-PRO-003 - Feature Gating & Licensing
|
|
15
|
+
* @see Story PRO-6 - License Key & Feature Gating System
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
'use strict';
|
|
19
|
+
|
|
20
|
+
const { featureGate } = require('./feature-gate');
|
|
21
|
+
const { ProFeatureError } = require('./errors');
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Default degradation message template.
|
|
25
|
+
* @private Reserved for future customization support.
|
|
26
|
+
*/
|
|
27
|
+
const _DEFAULT_MESSAGE_TEMPLATE = `
|
|
28
|
+
{featureName} requires an active AIOS Pro license.
|
|
29
|
+
|
|
30
|
+
Your data and configurations are preserved.
|
|
31
|
+
|
|
32
|
+
Activate: aios pro activate --key <KEY>
|
|
33
|
+
Purchase: https://synkra.ai/pro
|
|
34
|
+
`;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Handle pro feature gracefully - return fallback instead of throwing.
|
|
38
|
+
*
|
|
39
|
+
* Use this when you want to provide a degraded experience instead
|
|
40
|
+
* of completely blocking the feature.
|
|
41
|
+
*
|
|
42
|
+
* @param {string} featureId - Feature ID to check
|
|
43
|
+
* @param {Function} proAction - Function to execute if feature is available
|
|
44
|
+
* @param {Function} [fallbackAction] - Function to execute if not available
|
|
45
|
+
* @param {object} [options] - Options
|
|
46
|
+
* @param {boolean} [options.silent=false] - Don't log degradation message
|
|
47
|
+
* @returns {*} Result of proAction or fallbackAction
|
|
48
|
+
*/
|
|
49
|
+
function withGracefulDegradation(featureId, proAction, fallbackAction, options = {}) {
|
|
50
|
+
if (featureGate.isAvailable(featureId)) {
|
|
51
|
+
return proAction();
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (!options.silent) {
|
|
55
|
+
const featureName = getFeatureFriendlyName(featureId);
|
|
56
|
+
logDegradationMessage(featureName, featureId);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (typeof fallbackAction === 'function') {
|
|
60
|
+
return fallbackAction();
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Execute action only if pro feature is available.
|
|
68
|
+
*
|
|
69
|
+
* Unlike featureGate.require(), this doesn't throw - it just
|
|
70
|
+
* returns undefined if the feature isn't available.
|
|
71
|
+
*
|
|
72
|
+
* @param {string} featureId - Feature ID to check
|
|
73
|
+
* @param {Function} action - Action to execute if available
|
|
74
|
+
* @returns {*|undefined} Result of action or undefined
|
|
75
|
+
*/
|
|
76
|
+
function ifProAvailable(featureId, action) {
|
|
77
|
+
if (featureGate.isAvailable(featureId)) {
|
|
78
|
+
return action();
|
|
79
|
+
}
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Get a user-friendly name for a feature.
|
|
85
|
+
*
|
|
86
|
+
* @param {string} featureId - Feature ID
|
|
87
|
+
* @returns {string} Friendly name
|
|
88
|
+
*/
|
|
89
|
+
function getFeatureFriendlyName(featureId) {
|
|
90
|
+
const all = featureGate.listAll();
|
|
91
|
+
const feature = all.find((f) => f.id === featureId);
|
|
92
|
+
return feature ? feature.name : featureId;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Log a degradation message to the console.
|
|
97
|
+
*
|
|
98
|
+
* This is used internally when a pro feature is accessed without
|
|
99
|
+
* a license. Messages are non-intrusive and informative.
|
|
100
|
+
*
|
|
101
|
+
* @param {string} featureName - Human-friendly feature name
|
|
102
|
+
* @param {string} _featureId - Feature ID for reference (reserved for logging)
|
|
103
|
+
*/
|
|
104
|
+
function logDegradationMessage(featureName, _featureId) {
|
|
105
|
+
console.log('');
|
|
106
|
+
console.log(` ${featureName} requires an active AIOS Pro license.`);
|
|
107
|
+
console.log('');
|
|
108
|
+
console.log(' Your data and configurations are preserved.');
|
|
109
|
+
console.log('');
|
|
110
|
+
console.log(' Activate: aios pro activate --key <KEY>');
|
|
111
|
+
console.log(' Purchase: https://synkra.ai/pro');
|
|
112
|
+
console.log('');
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Create a degradation-aware wrapper for a pro module.
|
|
117
|
+
*
|
|
118
|
+
* This creates a proxy that catches ProFeatureError and provides
|
|
119
|
+
* a graceful degradation experience.
|
|
120
|
+
*
|
|
121
|
+
* @param {object} proModule - Pro module with methods
|
|
122
|
+
* @param {object} fallbacks - Map of method names to fallback functions
|
|
123
|
+
* @returns {Proxy} Wrapped module
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* const safePremiumSquads = createDegradationWrapper(
|
|
127
|
+
* PremiumSquads,
|
|
128
|
+
* {
|
|
129
|
+
* listTemplates: () => ['basic'], // Fallback to basic templates
|
|
130
|
+
* exportSquad: () => null, // No export without license
|
|
131
|
+
* }
|
|
132
|
+
* );
|
|
133
|
+
*/
|
|
134
|
+
function createDegradationWrapper(proModule, fallbacks = {}) {
|
|
135
|
+
return new Proxy(proModule, {
|
|
136
|
+
get(target, prop) {
|
|
137
|
+
const original = target[prop];
|
|
138
|
+
|
|
139
|
+
if (typeof original !== 'function') {
|
|
140
|
+
return original;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return function (...args) {
|
|
144
|
+
try {
|
|
145
|
+
return original.apply(target, args);
|
|
146
|
+
} catch (error) {
|
|
147
|
+
if (error instanceof ProFeatureError) {
|
|
148
|
+
if (fallbacks[prop]) {
|
|
149
|
+
logDegradationMessage(error.friendlyName, error.featureId);
|
|
150
|
+
return fallbacks[prop](...args);
|
|
151
|
+
}
|
|
152
|
+
// Re-throw if no fallback
|
|
153
|
+
throw error;
|
|
154
|
+
}
|
|
155
|
+
// Re-throw non-license errors
|
|
156
|
+
throw error;
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
},
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Check if the system is in degraded mode (expired/no license).
|
|
165
|
+
*
|
|
166
|
+
* @returns {boolean} true if pro features are unavailable
|
|
167
|
+
*/
|
|
168
|
+
function isInDegradedMode() {
|
|
169
|
+
const state = featureGate.getLicenseState();
|
|
170
|
+
return state === 'Expired' || state === 'Not Activated';
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Get degradation status summary.
|
|
175
|
+
*
|
|
176
|
+
* @returns {{ degraded: boolean, reason: string, action: string }}
|
|
177
|
+
*/
|
|
178
|
+
function getDegradationStatus() {
|
|
179
|
+
const state = featureGate.getLicenseState();
|
|
180
|
+
|
|
181
|
+
if (state === 'Active') {
|
|
182
|
+
return {
|
|
183
|
+
degraded: false,
|
|
184
|
+
reason: 'License is active',
|
|
185
|
+
action: null,
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
if (state === 'Grace') {
|
|
190
|
+
return {
|
|
191
|
+
degraded: false,
|
|
192
|
+
reason: 'License in grace period - revalidate soon',
|
|
193
|
+
action: 'aios pro validate',
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
if (state === 'Expired') {
|
|
198
|
+
return {
|
|
199
|
+
degraded: true,
|
|
200
|
+
reason: 'License has expired',
|
|
201
|
+
action: 'aios pro activate --key <KEY>',
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
return {
|
|
206
|
+
degraded: true,
|
|
207
|
+
reason: 'No license activated',
|
|
208
|
+
action: 'aios pro activate --key <KEY>',
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
module.exports = {
|
|
213
|
+
withGracefulDegradation,
|
|
214
|
+
ifProAvailable,
|
|
215
|
+
getFeatureFriendlyName,
|
|
216
|
+
logDegradationMessage,
|
|
217
|
+
createDegradationWrapper,
|
|
218
|
+
isInDegradedMode,
|
|
219
|
+
getDegradationStatus,
|
|
220
|
+
};
|