create-absolutejs 0.15.1 → 0.15.2
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/commands/formatProject.js +4 -6
- package/dist/generators/configurations/generatePackageJson.d.ts +2 -2
- package/dist/generators/configurations/generatePackageJson.js +1 -47
- package/dist/messages.d.ts +1 -1
- package/dist/messages.js +1 -3
- package/dist/prompt.js +0 -5
- package/dist/scaffold.d.ts +1 -1
- package/dist/scaffold.js +1 -5
- package/dist/types.d.ts +0 -1
- package/dist/utils/parseCommandLineOptions.js +4 -11
- package/dist/versions.d.ts +3 -21
- package/dist/versions.js +3 -21
- package/package.json +1 -1
- package/dist/generators/project/scaffoldAgentic.d.ts +0 -7
- package/dist/generators/project/scaffoldAgentic.js +0 -181
- package/dist/questions/agentic.d.ts +0 -1
- package/dist/questions/agentic.js +0 -11
|
@@ -2,15 +2,13 @@ import { exit } from 'process';
|
|
|
2
2
|
import { spinner } from '@clack/prompts';
|
|
3
3
|
import { $ } from 'bun';
|
|
4
4
|
import { green, red } from 'picocolors';
|
|
5
|
-
import { formatCommands } from '../utils/commandMaps';
|
|
5
|
+
import { formatCommands, formatNoInstallCommands } from '../utils/commandMaps';
|
|
6
6
|
export const formatProject = async ({ projectName, packageManager, installDependenciesNow }) => {
|
|
7
|
-
// A no-install scaffold must be fully offline and must not assume a global
|
|
8
|
-
// formatter. Templates are already formatted in the published package.
|
|
9
|
-
if (!installDependenciesNow)
|
|
10
|
-
return;
|
|
11
7
|
const spin = spinner();
|
|
12
8
|
try {
|
|
13
|
-
const fmt =
|
|
9
|
+
const fmt = installDependenciesNow
|
|
10
|
+
? formatCommands[packageManager]
|
|
11
|
+
: formatNoInstallCommands[packageManager];
|
|
14
12
|
spin.start('Formatting files…');
|
|
15
13
|
const [bin, ...args] = fmt.split(' ');
|
|
16
14
|
await $ `${bin} ${args}`.cwd(projectName).quiet();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { CreateConfiguration } from '../../types';
|
|
2
|
-
type CreatePackageJsonProps = Pick<CreateConfiguration, 'authOption' | '
|
|
2
|
+
type CreatePackageJsonProps = Pick<CreateConfiguration, 'authOption' | 'useTailwind' | 'databaseEngine' | 'databaseHost' | 'plugins' | 'orm' | 'frontendDirectories' | 'codeQualityTool'> & {
|
|
3
3
|
projectName: string;
|
|
4
4
|
latest: boolean;
|
|
5
5
|
repositoryUrl: string | undefined;
|
|
6
6
|
};
|
|
7
|
-
export declare const createPackageJson: ({
|
|
7
|
+
export declare const createPackageJson: ({ projectName, authOption, plugins, databaseEngine, orm, databaseHost, useTailwind, latest, frontendDirectories, codeQualityTool, repositoryUrl }: CreatePackageJsonProps) => Promise<void>;
|
|
8
8
|
export {};
|
|
@@ -16,7 +16,7 @@ const dbClientCommands = {
|
|
|
16
16
|
postgresql: 'psql -h localhost -U user -d database',
|
|
17
17
|
singlestore: 'singlestore -u root -ppassword -D database'
|
|
18
18
|
};
|
|
19
|
-
export const createPackageJson = async ({
|
|
19
|
+
export const createPackageJson = async ({ projectName, authOption, plugins, databaseEngine, orm, databaseHost, useTailwind, latest, frontendDirectories, codeQualityTool, repositoryUrl }) => {
|
|
20
20
|
const flags = computeFlags(frontendDirectories);
|
|
21
21
|
const isLocal = !databaseHost || databaseHost === 'none';
|
|
22
22
|
/* ── Collect all package names that need versions ─────────── */
|
|
@@ -28,27 +28,6 @@ export const createPackageJson = async ({ agentic, projectName, authOption, plug
|
|
|
28
28
|
packageNames.add(dep.value);
|
|
29
29
|
if (authOption === 'abs')
|
|
30
30
|
packageNames.add(absoluteAuthPlugin.value);
|
|
31
|
-
if (agentic) {
|
|
32
|
-
packageNames.add('@absolutejs/a2a');
|
|
33
|
-
packageNames.add('@absolutejs/agency');
|
|
34
|
-
packageNames.add('@absolutejs/agent-conformance');
|
|
35
|
-
packageNames.add('@absolutejs/agent-discovery');
|
|
36
|
-
packageNames.add('@absolutejs/agent-inbox');
|
|
37
|
-
packageNames.add('@absolutejs/agent-memory');
|
|
38
|
-
packageNames.add('@absolutejs/agent-runtime');
|
|
39
|
-
packageNames.add('@absolutejs/agent-sandbox');
|
|
40
|
-
packageNames.add('@absolutejs/agent-trust');
|
|
41
|
-
packageNames.add('@absolutejs/agent-control');
|
|
42
|
-
packageNames.add('@absolutejs/auth');
|
|
43
|
-
packageNames.add('@absolutejs/egress');
|
|
44
|
-
packageNames.add('@absolutejs/execution');
|
|
45
|
-
packageNames.add('@absolutejs/manifest');
|
|
46
|
-
packageNames.add('@absolutejs/mcp');
|
|
47
|
-
packageNames.add('@absolutejs/policy');
|
|
48
|
-
packageNames.add('@absolutejs/secrets');
|
|
49
|
-
packageNames.add('@absolutejs/sync-bus-pg');
|
|
50
|
-
packageNames.add('@absolutejs/wallet');
|
|
51
|
-
}
|
|
52
31
|
for (const pluginValue of plugins) {
|
|
53
32
|
const meta = availablePlugins.find((p) => p.value === pluginValue);
|
|
54
33
|
if (meta)
|
|
@@ -143,31 +122,6 @@ export const createPackageJson = async ({ agentic, projectName, authOption, plug
|
|
|
143
122
|
if (authOption === 'abs') {
|
|
144
123
|
dependencies[absoluteAuthPlugin.value] = resolveVersion(absoluteAuthPlugin.value, absoluteAuthPlugin.latestVersion);
|
|
145
124
|
}
|
|
146
|
-
if (agentic) {
|
|
147
|
-
for (const name of [
|
|
148
|
-
'@absolutejs/a2a',
|
|
149
|
-
'@absolutejs/agency',
|
|
150
|
-
'@absolutejs/agent-discovery',
|
|
151
|
-
'@absolutejs/agent-inbox',
|
|
152
|
-
'@absolutejs/agent-memory',
|
|
153
|
-
'@absolutejs/agent-runtime',
|
|
154
|
-
'@absolutejs/agent-sandbox',
|
|
155
|
-
'@absolutejs/agent-trust',
|
|
156
|
-
'@absolutejs/agent-control',
|
|
157
|
-
'@absolutejs/auth',
|
|
158
|
-
'@absolutejs/egress',
|
|
159
|
-
'@absolutejs/execution',
|
|
160
|
-
'@absolutejs/manifest',
|
|
161
|
-
'@absolutejs/mcp',
|
|
162
|
-
'@absolutejs/policy',
|
|
163
|
-
'@absolutejs/secrets',
|
|
164
|
-
'@absolutejs/sync-bus-pg',
|
|
165
|
-
'@absolutejs/wallet'
|
|
166
|
-
]) {
|
|
167
|
-
dependencies[name] = resolveVersion(name, versions[name]);
|
|
168
|
-
}
|
|
169
|
-
devDependencies['@absolutejs/agent-conformance'] = resolveVersion('@absolutejs/agent-conformance', versions['@absolutejs/agent-conformance']);
|
|
170
|
-
}
|
|
171
125
|
for (const pluginValue of plugins) {
|
|
172
126
|
const meta = availablePlugins.find((p) => p.value === pluginValue);
|
|
173
127
|
if (!meta)
|
package/dist/messages.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ type DebugMessageProps = {
|
|
|
10
10
|
response: CreateConfiguration;
|
|
11
11
|
packageManager: string;
|
|
12
12
|
};
|
|
13
|
-
export declare const getDebugMessage: ({ response: {
|
|
13
|
+
export declare const getDebugMessage: ({ response: { projectName, codeQualityTool, directoryConfig, useTailwind, tailwind, frontends, includeExamples, useHTMLScripts, frontendDirectories, buildDirectory, assetsDirectory, databaseEngine, databaseHost, databaseDirectory, orm, authOption, plugins, initializeGitNow, installDependenciesNow }, packageManager }: DebugMessageProps) => string;
|
|
14
14
|
export {};
|
package/dist/messages.js
CHANGED
|
@@ -12,7 +12,6 @@ Options:
|
|
|
12
12
|
${cyan('--debug, -d')} Display a summary of the project configuration after creation
|
|
13
13
|
|
|
14
14
|
${cyan('--abs-provider')} A provider for Absolute-Auth (eg. 'google', 'github', 'discord') the full list is available at https://absolutejs.com/documentation/absolute-auth
|
|
15
|
-
${cyan('--agentic')} Add provider-neutral agent auth, actions, MCP, wallet, credential, and conformance scaffolding
|
|
16
15
|
${cyan('--angular')} Include an Angular frontend
|
|
17
16
|
${cyan('--angular-dir')} ${dim(cyan('<directory>'))} Specify the directory for and use the Angular frontend
|
|
18
17
|
${cyan('--assets')} ${dim(cyan('<directory>'))} Directory name for your static assets
|
|
@@ -50,7 +49,7 @@ export const getOutroMessage = ({ projectName, packageManager, installDependenci
|
|
|
50
49
|
`${cyan('cd')} ${projectName}\n` +
|
|
51
50
|
`${installDependenciesNow ? '' : `${cyan(`${packageManager} install`)}\n`}` +
|
|
52
51
|
`${cyan(`${packageManager} dev`)}`; // TODO: Some package managers need run
|
|
53
|
-
export const getDebugMessage = ({ response: {
|
|
52
|
+
export const getDebugMessage = ({ response: { projectName, codeQualityTool, directoryConfig, useTailwind, tailwind, frontends, includeExamples, useHTMLScripts, frontendDirectories, buildDirectory, assetsDirectory, databaseEngine, databaseHost, databaseDirectory, orm, authOption, plugins, initializeGitNow, installDependenciesNow }, packageManager }) => {
|
|
54
53
|
const htmlScriptingValue = useHTMLScripts
|
|
55
54
|
? blueBright('TypeScript')
|
|
56
55
|
: dim('None');
|
|
@@ -64,7 +63,6 @@ export const getDebugMessage = ({ response: { agentic, projectName, codeQualityT
|
|
|
64
63
|
/* prettier-ignore */
|
|
65
64
|
const lines = [
|
|
66
65
|
['Project Name', projectName],
|
|
67
|
-
['Agent-first Stack', agentic ? green('Yes') : dim('No')],
|
|
68
66
|
['Package Manager', packageManager],
|
|
69
67
|
['Config Type', isCustomConfig ? green('Custom') : dim('Default')],
|
|
70
68
|
['Linting', codeQualityTool === 'eslint+prettier' ? 'ESLint + Prettier' : 'Biome'],
|
package/dist/prompt.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { getAuthOption } from './questions/authOption';
|
|
2
|
-
import { getAgentic } from './questions/agentic';
|
|
3
2
|
import { getCodeQualityTool } from './questions/codeQualityTool';
|
|
4
3
|
import { getConfigurationType } from './questions/configurationType';
|
|
5
4
|
import { getDatabaseEngine } from './questions/databaseEngine';
|
|
@@ -58,9 +57,6 @@ export const prompt = async (argumentConfiguration) => {
|
|
|
58
57
|
directoryConfig = 'custom';
|
|
59
58
|
// 12. Auth provider
|
|
60
59
|
const authOption = argumentConfiguration.authOption ?? (await orPrompt('--auth', getAuthOption));
|
|
61
|
-
// 12b. Agent-first action/auth/MCP/wallet/credential stack
|
|
62
|
-
const agentic = argumentConfiguration.agentic ??
|
|
63
|
-
(await orPrompt('--agentic/--no-agentic', getAgentic));
|
|
64
60
|
// 13. Additional plugins
|
|
65
61
|
const plugins = argumentConfiguration.plugins?.filter((plugin) => plugin !== undefined) ?? (await orPrompt('--plugin', getPlugins));
|
|
66
62
|
// 14. Initialize Git repository
|
|
@@ -88,7 +84,6 @@ export const prompt = async (argumentConfiguration) => {
|
|
|
88
84
|
const installDependenciesNow = argumentConfiguration.installDependenciesNow ??
|
|
89
85
|
(await orPrompt('--install/--no-install', getInstallDependencies));
|
|
90
86
|
const values = {
|
|
91
|
-
agentic,
|
|
92
87
|
absProviders: argumentConfiguration.absProviders?.filter((provider) => provider !== undefined),
|
|
93
88
|
assetsDirectory,
|
|
94
89
|
authOption,
|
package/dist/scaffold.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ type ScaffoldProps = {
|
|
|
5
5
|
latest: boolean;
|
|
6
6
|
envVariables: string[] | undefined;
|
|
7
7
|
};
|
|
8
|
-
export declare const scaffold: ({ response: {
|
|
8
|
+
export declare const scaffold: ({ response: { projectName, codeQualityTool, initializeGitNow, githubLink, githubRepoUrl, githubVisibility, databaseEngine, databaseHost, useHTMLScripts, useTailwind, databaseDirectory, absProviders, includeExamples, orm, frontends, plugins, authOption, buildDirectory, assetsDirectory, tailwind, installDependenciesNow, frontendDirectories }, latest, envVariables, packageManager }: ScaffoldProps) => Promise<{
|
|
9
9
|
dockerFreshInstall: boolean;
|
|
10
10
|
}>;
|
|
11
11
|
export {};
|
package/dist/scaffold.js
CHANGED
|
@@ -10,8 +10,7 @@ import { scaffoldConfigurationFiles } from './generators/configurations/scaffold
|
|
|
10
10
|
import { scaffoldDatabase } from './generators/db/scaffoldDatabase';
|
|
11
11
|
import { scaffoldBackend } from './generators/project/scaffoldBackend';
|
|
12
12
|
import { scaffoldFrontends } from './generators/project/scaffoldFrontends';
|
|
13
|
-
|
|
14
|
-
export const scaffold = async ({ response: { agentic, projectName, codeQualityTool, initializeGitNow, githubLink, githubRepoUrl, githubVisibility, databaseEngine, databaseHost, useHTMLScripts, useTailwind, databaseDirectory, absProviders, includeExamples, orm, frontends, plugins, authOption, buildDirectory, assetsDirectory, tailwind, installDependenciesNow, frontendDirectories }, latest, envVariables, packageManager }) => {
|
|
13
|
+
export const scaffold = async ({ response: { projectName, codeQualityTool, initializeGitNow, githubLink, githubRepoUrl, githubVisibility, databaseEngine, databaseHost, useHTMLScripts, useTailwind, databaseDirectory, absProviders, includeExamples, orm, frontends, plugins, authOption, buildDirectory, assetsDirectory, tailwind, installDependenciesNow, frontendDirectories }, latest, envVariables, packageManager }) => {
|
|
15
14
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
16
15
|
const templatesDirectory = join(__dirname, '/templates');
|
|
17
16
|
const { frontendDirectory, backendDirectory, projectAssetsDirectory, typesDirectory } = initalizeRoot(projectName, templatesDirectory);
|
|
@@ -28,7 +27,6 @@ export const scaffold = async ({ response: { agentic, projectName, codeQualityTo
|
|
|
28
27
|
templatesDirectory
|
|
29
28
|
});
|
|
30
29
|
await createPackageJson({
|
|
31
|
-
agentic,
|
|
32
30
|
authOption,
|
|
33
31
|
codeQualityTool,
|
|
34
32
|
databaseEngine,
|
|
@@ -55,8 +53,6 @@ export const scaffold = async ({ response: { agentic, projectName, codeQualityTo
|
|
|
55
53
|
publicDirectory: 'public',
|
|
56
54
|
tailwind
|
|
57
55
|
});
|
|
58
|
-
if (agentic)
|
|
59
|
-
scaffoldAgentic({ backendDirectory, projectName });
|
|
60
56
|
let dockerFreshInstall = false;
|
|
61
57
|
if (databaseDirectory !== undefined &&
|
|
62
58
|
databaseEngine !== 'none' &&
|
package/dist/types.d.ts
CHANGED
|
@@ -43,7 +43,6 @@ export type TailwindConfig = {
|
|
|
43
43
|
} | undefined;
|
|
44
44
|
export type GithubLinkOption = 'existing' | 'create' | 'skip';
|
|
45
45
|
export type CreateConfiguration = {
|
|
46
|
-
agentic: boolean;
|
|
47
46
|
absProviders: ProviderOption[] | undefined;
|
|
48
47
|
assetsDirectory: string;
|
|
49
48
|
authOption: AuthOption;
|
|
@@ -12,7 +12,6 @@ export const parseCommandLineOptions = () => {
|
|
|
12
12
|
args: argv.slice(DEFAULT_ARG_LENGTH),
|
|
13
13
|
options: {
|
|
14
14
|
'abs-provider': { multiple: true, type: 'string' },
|
|
15
|
-
agentic: { type: 'boolean' },
|
|
16
15
|
angular: { type: 'boolean' },
|
|
17
16
|
'angular-dir': { type: 'string' },
|
|
18
17
|
assets: { type: 'string' },
|
|
@@ -223,8 +222,7 @@ export const parseCommandLineOptions = () => {
|
|
|
223
222
|
let tailwind = hasTailwindFiles
|
|
224
223
|
? { input: values['tailwind-input'], output: values['tailwind-output'] }
|
|
225
224
|
: undefined;
|
|
226
|
-
const useTailwind = values.tailwind ??
|
|
227
|
-
(hasTailwindFiles ? true : values.skip ? false : undefined);
|
|
225
|
+
const useTailwind = values.tailwind ?? (hasTailwindFiles ? true : undefined);
|
|
228
226
|
if (useTailwind === false && hasTailwindFiles) {
|
|
229
227
|
console.warn('Warning: Tailwind CSS input/output files are specified but Tailwind is disabled.');
|
|
230
228
|
tailwind = undefined;
|
|
@@ -252,7 +250,6 @@ export const parseCommandLineOptions = () => {
|
|
|
252
250
|
? repoVisibility
|
|
253
251
|
: undefined;
|
|
254
252
|
const argumentConfiguration = {
|
|
255
|
-
agentic: values.agentic ?? (values.skip ? false : undefined),
|
|
256
253
|
absProviders: absProviders.length ? absProviders : undefined,
|
|
257
254
|
assetsDirectory: values.assets,
|
|
258
255
|
authOption,
|
|
@@ -263,19 +260,15 @@ export const parseCommandLineOptions = () => {
|
|
|
263
260
|
databaseHost,
|
|
264
261
|
directoryConfig,
|
|
265
262
|
frontendDirectories,
|
|
266
|
-
frontends: selectedFrontends.length
|
|
267
|
-
? selectedFrontends
|
|
268
|
-
: values.skip
|
|
269
|
-
? []
|
|
270
|
-
: undefined,
|
|
263
|
+
frontends: selectedFrontends.length ? selectedFrontends : undefined,
|
|
271
264
|
githubLink: isGithubLinkOption(values.github)
|
|
272
265
|
? values.github
|
|
273
266
|
: undefined,
|
|
274
267
|
githubRepoUrl: normalizeRepoInput(values.repo)?.httpsUrl,
|
|
275
268
|
githubVisibility,
|
|
276
269
|
includeExamples,
|
|
277
|
-
initializeGitNow: values.git
|
|
278
|
-
installDependenciesNow: values.install
|
|
270
|
+
initializeGitNow: values.git,
|
|
271
|
+
installDependenciesNow: values.install,
|
|
279
272
|
orm,
|
|
280
273
|
plugins,
|
|
281
274
|
projectName,
|
package/dist/versions.d.ts
CHANGED
|
@@ -5,25 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const versions: {
|
|
7
7
|
readonly '@absolutejs/absolute': "0.19.0-beta.1081";
|
|
8
|
-
readonly '@absolutejs/
|
|
9
|
-
readonly '@absolutejs/agency': "0.4.0";
|
|
10
|
-
readonly '@absolutejs/agent-conformance': "0.3.0";
|
|
11
|
-
readonly '@absolutejs/agent-discovery': "0.1.0";
|
|
12
|
-
readonly '@absolutejs/agent-inbox': "0.1.0";
|
|
13
|
-
readonly '@absolutejs/agent-memory': "0.1.0";
|
|
14
|
-
readonly '@absolutejs/agent-runtime': "0.1.0";
|
|
15
|
-
readonly '@absolutejs/agent-sandbox': "0.1.0";
|
|
16
|
-
readonly '@absolutejs/agent-trust': "0.1.0";
|
|
17
|
-
readonly '@absolutejs/agent-control': "0.1.0";
|
|
18
|
-
readonly '@absolutejs/auth': "0.54.9";
|
|
19
|
-
readonly '@absolutejs/egress': "0.1.0";
|
|
20
|
-
readonly '@absolutejs/execution': "0.2.0";
|
|
21
|
-
readonly '@absolutejs/manifest': "0.3.0";
|
|
22
|
-
readonly '@absolutejs/mcp': "0.9.0";
|
|
23
|
-
readonly '@absolutejs/policy': "0.2.0";
|
|
24
|
-
readonly '@absolutejs/secrets': "0.7.0";
|
|
25
|
-
readonly '@absolutejs/sync-bus-pg': "0.2.0";
|
|
26
|
-
readonly '@absolutejs/wallet': "0.3.0";
|
|
8
|
+
readonly '@absolutejs/auth': "0.22.7";
|
|
27
9
|
readonly '@angular/common': "21.2.0";
|
|
28
10
|
readonly '@angular/compiler': "21.2.0";
|
|
29
11
|
readonly '@angular/compiler-cli': "21.2.0";
|
|
@@ -36,7 +18,7 @@ export declare const versions: {
|
|
|
36
18
|
readonly '@elysiajs/static': "1.4.7";
|
|
37
19
|
readonly '@elysiajs/swagger': "1.3.1";
|
|
38
20
|
readonly '@eslint/compat': "2.0.2";
|
|
39
|
-
readonly '@eslint/js': "
|
|
21
|
+
readonly '@eslint/js': "10.0.1";
|
|
40
22
|
readonly '@libsql/client': "0.17.0";
|
|
41
23
|
readonly '@neondatabase/serverless': "1.0.2";
|
|
42
24
|
readonly '@planetscale/database': "1.19.0";
|
|
@@ -51,7 +33,7 @@ export declare const versions: {
|
|
|
51
33
|
readonly elysia: "1.4.28";
|
|
52
34
|
readonly 'elysia-rate-limit': "4.5.0";
|
|
53
35
|
readonly 'elysia-scoped-state': "0.1.1";
|
|
54
|
-
readonly eslint: "
|
|
36
|
+
readonly eslint: "10.0.0";
|
|
55
37
|
readonly 'eslint-plugin-absolute': "0.11.13";
|
|
56
38
|
readonly 'eslint-plugin-import': "2.32.0";
|
|
57
39
|
readonly 'eslint-plugin-jsx-a11y': "6.10.2";
|
package/dist/versions.js
CHANGED
|
@@ -6,25 +6,7 @@
|
|
|
6
6
|
export const versions = {
|
|
7
7
|
/* ── Core ─────────────────────────────────────────────── */
|
|
8
8
|
'@absolutejs/absolute': '0.19.0-beta.1081',
|
|
9
|
-
'@absolutejs/
|
|
10
|
-
'@absolutejs/agency': '0.4.0',
|
|
11
|
-
'@absolutejs/agent-conformance': '0.3.0',
|
|
12
|
-
'@absolutejs/agent-discovery': '0.1.0',
|
|
13
|
-
'@absolutejs/agent-inbox': '0.1.0',
|
|
14
|
-
'@absolutejs/agent-memory': '0.1.0',
|
|
15
|
-
'@absolutejs/agent-runtime': '0.1.0',
|
|
16
|
-
'@absolutejs/agent-sandbox': '0.1.0',
|
|
17
|
-
'@absolutejs/agent-trust': '0.1.0',
|
|
18
|
-
'@absolutejs/agent-control': '0.1.0',
|
|
19
|
-
'@absolutejs/auth': '0.54.9',
|
|
20
|
-
'@absolutejs/egress': '0.1.0',
|
|
21
|
-
'@absolutejs/execution': '0.2.0',
|
|
22
|
-
'@absolutejs/manifest': '0.3.0',
|
|
23
|
-
'@absolutejs/mcp': '0.9.0',
|
|
24
|
-
'@absolutejs/policy': '0.2.0',
|
|
25
|
-
'@absolutejs/secrets': '0.7.0',
|
|
26
|
-
'@absolutejs/sync-bus-pg': '0.2.0',
|
|
27
|
-
'@absolutejs/wallet': '0.3.0',
|
|
9
|
+
'@absolutejs/auth': '0.22.7',
|
|
28
10
|
/* ── Angular ─────────────────────────────────────────── */
|
|
29
11
|
'@angular/common': '21.2.0',
|
|
30
12
|
'@angular/compiler': '21.2.0',
|
|
@@ -40,7 +22,7 @@ export const versions = {
|
|
|
40
22
|
'@elysiajs/swagger': '1.3.1',
|
|
41
23
|
/* ── ESLint + Prettier ────────────────────────────────── */
|
|
42
24
|
'@eslint/compat': '2.0.2',
|
|
43
|
-
'@eslint/js': '
|
|
25
|
+
'@eslint/js': '10.0.1',
|
|
44
26
|
/* ── Database Hosts ───────────────────────────────────── */
|
|
45
27
|
'@libsql/client': '0.17.0',
|
|
46
28
|
'@neondatabase/serverless': '1.0.2',
|
|
@@ -60,7 +42,7 @@ export const versions = {
|
|
|
60
42
|
elysia: '1.4.28',
|
|
61
43
|
'elysia-rate-limit': '4.5.0',
|
|
62
44
|
'elysia-scoped-state': '0.1.1',
|
|
63
|
-
eslint: '
|
|
45
|
+
eslint: '10.0.0',
|
|
64
46
|
'eslint-plugin-absolute': '0.11.13',
|
|
65
47
|
'eslint-plugin-import': '2.32.0',
|
|
66
48
|
/* ── ESLint React ─────────────────────────────────────── */
|
package/package.json
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const agentRuntimeSource = "import {\n\tcreateAgency,\n\tcreateAgentControlPlane,\n\tcreateMemoryAgencyStore,\n\tcreateMemoryAgentControlStore,\n\tdenyAllPolicy\n} from '@absolutejs/agency'\nimport {\n\tcreateAgentRuntime,\n\tcreateMemoryAgentRuntimeStore\n} from '@absolutejs/agent-runtime'\n\n// Memory stores are development defaults. Replace them with durable stores\n// before running more than one process or accepting production actions.\nexport const agentControl = createAgentControlPlane({\n\tsources: [],\n\tstore: createMemoryAgentControlStore()\n})\n\n// Intentionally deny-by-default. Replace denyAllPolicy() with your policy\n// decision point only after declaring each action's effects and scopes.\nexport const agency = createAgency({\n\tcontrol: agentControl,\n\tpolicy: denyAllPolicy(),\n\tstore: createMemoryAgencyStore()\n})\n\n// Durable run semantics are available from the first commit. The placeholder\n// driver fails closed until the application supplies its model/tool loop.\nexport const agentRuntime = createAgentRuntime({\n\tstore: createMemoryAgentRuntimeStore(),\n\tdriver: {\n\t\tnext: async () => ({\n\t\t\ttype: 'fail',\n\t\t\tcode: 'agent_not_configured',\n\t\t\tmessage: 'Configure the agent driver before accepting runs'\n\t\t})\n\t},\n\teffects: {\n\t\texecute: async () => {\n\t\t\tthrow new Error('Agent effects are not configured')\n\t\t}\n\t}\n})\n";
|
|
2
|
-
export declare const agentDiscoverySource = "import {\n\tABSOLUTE_AGENT_SCHEMA,\n\tcreateAgentDiscoveryHandler,\n\tsignAgentDocument,\n\ttype AgentDiscoveryDocument,\n\ttype DiscoverySigner\n} from '@absolutejs/agent-discovery'\n\n// Keep this document specific and keyword-rich: registries rank declared\n// capabilities, effects, scopes, interfaces, examples, and publisher trust.\nexport const createAgentDocument = ({\n\torigin,\n\tpublishedAt,\n\tversion\n}: {\n\torigin: string\n\tpublishedAt: string\n\tversion: string\n}): AgentDiscoveryDocument => ({\n\t$schema: ABSOLUTE_AGENT_SCHEMA,\n\tid: `${origin}/agents/main`,\n\tname: 'Replace with your agent name',\n\tdescription: 'Replace with a precise description of the outcomes this agent delivers.',\n\tversion,\n\turl: origin,\n\tpublisher: {\n\t\tid: origin,\n\t\tname: 'Replace with your organization',\n\t\tjwksUri: `${origin}/.well-known/jwks.json`\n\t},\n\tcapabilities: [{\n\t\tid: 'status.read',\n\t\ttitle: 'Read service status',\n\t\tdescription: 'Returns the public health and readiness status of this agent.',\n\t\ttags: ['status', 'health', 'readiness'],\n\t\teffects: ['read'],\n\t\tapproval: 'never'\n\t}],\n\tinterfaces: [{\n\t\ttype: 'http',\n\t\turl: `${origin}/api/agents/main`,\n\t\tcontentTypes: ['application/json']\n\t}],\n\tcategories: ['replace-with-domain-category'],\n\ttags: ['replace-with-user-intent', 'replace-with-outcome'],\n\tlanguages: ['en'],\n\tdocumentationUrl: `${origin}/docs/agents/main`,\n\texamples: [{\n\t\ttitle: 'Check whether the agent is ready',\n\t\tprompt: 'Check the agent service status.',\n\t\tcapabilityId: 'status.read'\n\t}],\n\tcreatedAt: publishedAt,\n\tupdatedAt: publishedAt\n})\n\n// Use a KMS/HSM-backed signer in production. Mount the returned fetch handler\n// at the origin root so all well-known, A2A, JSON-LD, agents.txt, and sitemap\n// discovery surfaces are served from one signed descriptor.\nexport const createAgentDiscovery = async ({\n\tsigner,\n\torigin,\n\tpublishedAt,\n\tversion\n}: {\n\tsigner: DiscoverySigner\n\torigin: string\n\tpublishedAt: string\n\tversion: string\n}) =>\n\tcreateAgentDiscoveryHandler({\n\t\tdocuments: [await signAgentDocument(\n\t\t\tcreateAgentDocument({ origin, publishedAt, version }),\n\t\t\tsigner\n\t\t)]\n\t})\n";
|
|
3
|
-
export declare const agentsGuide = "# Agent execution contract\n\nThis project uses the AbsoluteJS provider-neutral agent stack.\n\n- Authenticate agents and bind every delegation to a user with\n `@absolutejs/auth`. Never treat model-provided identity as authenticated.\n- Route every effectful tool through `agency` in `src/backend/agent.ts`.\n Approval is exact-input-bound; execution requires a fresh single-use lease.\n- Declare tool effects, scopes, approval policy, idempotency keys,\n reversibility, destinations, and spend fields in manifest contract 2.\n- Keep raw credentials host-side with `@absolutejs/secrets` credential\n operations. Agents receive operation results, never secret values.\n- Give agents bounded wallet allowances and signed mandates. The host resolves\n ledger destinations; an agent never supplies the recipient account id.\n- Bind MCP task handles to the authenticated actor on get, update, and cancel.\n- Use `@absolutejs/execution` for idempotent effects and its transactional\n PostgreSQL outbox before handing work to a durable queue.\n- Publish and consume remote agents with `@absolutejs/a2a` using A2A 1.0;\n preserve the authenticated tenant and actor binding at every task boundary.\n- Route outbound HTTP through `@absolutejs/egress`. Authorize host, method,\n resolved public IP, redirects, byte limits, and injected credentials host-side.\n- Store immutable, digest-addressed policy revisions with `@absolutejs/policy`\n and atomically activate only reviewed versions.\n- Publish the signed descriptor in `src/backend/agent-discovery.ts` through\n `@absolutejs/agent-discovery`. Keep capabilities, examples, tags, effects,\n scopes, A2A/MCP interfaces, JSON-LD, agents.txt, and sitemap surfaces current.\n- Run long-lived work through `@absolutejs/agent-runtime`; use its leases,\n checkpoints, timers, budgets, cancellation, and crash-safe effect recovery.\n- Authorize all HTTP/filesystem/process access with expiring\n `@absolutejs/agent-sandbox` grants. There is no ambient agent authority.\n- Preserve instruction/data separation and provenance taints with\n `@absolutejs/agent-trust`; external content never becomes an instruction.\n- Store scoped, expiring, provenance-bearing data with\n `@absolutejs/agent-memory`, and validate writes against memory poisoning.\n- Receive only verified events through `@absolutejs/agent-inbox`; durable\n leases, retries, dead letters, and schedules do not require Redis.\n- Use OpenID AuthZEN AARP for requestable approvals and COAZ mappings for\n parameter-level MCP authorization. Approval always triggers re-evaluation.\n- Protect operator actions with `@absolutejs/agent-control` scopes, a\n kill-switch-first check, and leased idempotency records.\n- Use `@absolutejs/sync-bus-pg` for durable framework channels. Redis is an\n optional at-most-once fanout adapter, not a source of truth or work queue.\n- Run `@absolutejs/agent-conformance` suites for every new action, capability,\n credential, wallet, egress, execution, control, and task adapter.\n- Use the control plane kill switch for incident response. It blocks new\n requests, lease issuance, and execution before downstream revocation fans out.\n\nMemory stores are for local development only. Production stores must be\ndurable and enforce lease/capability consumption atomically. Apply each\npackage's exported PostgreSQL schema in a migration before enabling traffic.\n";
|
|
4
|
-
export declare const scaffoldAgentic: ({ backendDirectory, projectName }: {
|
|
5
|
-
backendDirectory: string;
|
|
6
|
-
projectName: string;
|
|
7
|
-
}) => void;
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
import { mkdirSync, writeFileSync } from 'fs';
|
|
2
|
-
import { join } from 'path';
|
|
3
|
-
export const agentRuntimeSource = `import {
|
|
4
|
-
createAgency,
|
|
5
|
-
createAgentControlPlane,
|
|
6
|
-
createMemoryAgencyStore,
|
|
7
|
-
createMemoryAgentControlStore,
|
|
8
|
-
denyAllPolicy
|
|
9
|
-
} from '@absolutejs/agency'
|
|
10
|
-
import {
|
|
11
|
-
createAgentRuntime,
|
|
12
|
-
createMemoryAgentRuntimeStore
|
|
13
|
-
} from '@absolutejs/agent-runtime'
|
|
14
|
-
|
|
15
|
-
// Memory stores are development defaults. Replace them with durable stores
|
|
16
|
-
// before running more than one process or accepting production actions.
|
|
17
|
-
export const agentControl = createAgentControlPlane({
|
|
18
|
-
sources: [],
|
|
19
|
-
store: createMemoryAgentControlStore()
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
// Intentionally deny-by-default. Replace denyAllPolicy() with your policy
|
|
23
|
-
// decision point only after declaring each action's effects and scopes.
|
|
24
|
-
export const agency = createAgency({
|
|
25
|
-
control: agentControl,
|
|
26
|
-
policy: denyAllPolicy(),
|
|
27
|
-
store: createMemoryAgencyStore()
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
// Durable run semantics are available from the first commit. The placeholder
|
|
31
|
-
// driver fails closed until the application supplies its model/tool loop.
|
|
32
|
-
export const agentRuntime = createAgentRuntime({
|
|
33
|
-
store: createMemoryAgentRuntimeStore(),
|
|
34
|
-
driver: {
|
|
35
|
-
next: async () => ({
|
|
36
|
-
type: 'fail',
|
|
37
|
-
code: 'agent_not_configured',
|
|
38
|
-
message: 'Configure the agent driver before accepting runs'
|
|
39
|
-
})
|
|
40
|
-
},
|
|
41
|
-
effects: {
|
|
42
|
-
execute: async () => {
|
|
43
|
-
throw new Error('Agent effects are not configured')
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
})
|
|
47
|
-
`;
|
|
48
|
-
export const agentDiscoverySource = `import {
|
|
49
|
-
ABSOLUTE_AGENT_SCHEMA,
|
|
50
|
-
createAgentDiscoveryHandler,
|
|
51
|
-
signAgentDocument,
|
|
52
|
-
type AgentDiscoveryDocument,
|
|
53
|
-
type DiscoverySigner
|
|
54
|
-
} from '@absolutejs/agent-discovery'
|
|
55
|
-
|
|
56
|
-
// Keep this document specific and keyword-rich: registries rank declared
|
|
57
|
-
// capabilities, effects, scopes, interfaces, examples, and publisher trust.
|
|
58
|
-
export const createAgentDocument = ({
|
|
59
|
-
origin,
|
|
60
|
-
publishedAt,
|
|
61
|
-
version
|
|
62
|
-
}: {
|
|
63
|
-
origin: string
|
|
64
|
-
publishedAt: string
|
|
65
|
-
version: string
|
|
66
|
-
}): AgentDiscoveryDocument => ({
|
|
67
|
-
$schema: ABSOLUTE_AGENT_SCHEMA,
|
|
68
|
-
id: \`\${origin}/agents/main\`,
|
|
69
|
-
name: 'Replace with your agent name',
|
|
70
|
-
description: 'Replace with a precise description of the outcomes this agent delivers.',
|
|
71
|
-
version,
|
|
72
|
-
url: origin,
|
|
73
|
-
publisher: {
|
|
74
|
-
id: origin,
|
|
75
|
-
name: 'Replace with your organization',
|
|
76
|
-
jwksUri: \`\${origin}/.well-known/jwks.json\`
|
|
77
|
-
},
|
|
78
|
-
capabilities: [{
|
|
79
|
-
id: 'status.read',
|
|
80
|
-
title: 'Read service status',
|
|
81
|
-
description: 'Returns the public health and readiness status of this agent.',
|
|
82
|
-
tags: ['status', 'health', 'readiness'],
|
|
83
|
-
effects: ['read'],
|
|
84
|
-
approval: 'never'
|
|
85
|
-
}],
|
|
86
|
-
interfaces: [{
|
|
87
|
-
type: 'http',
|
|
88
|
-
url: \`\${origin}/api/agents/main\`,
|
|
89
|
-
contentTypes: ['application/json']
|
|
90
|
-
}],
|
|
91
|
-
categories: ['replace-with-domain-category'],
|
|
92
|
-
tags: ['replace-with-user-intent', 'replace-with-outcome'],
|
|
93
|
-
languages: ['en'],
|
|
94
|
-
documentationUrl: \`\${origin}/docs/agents/main\`,
|
|
95
|
-
examples: [{
|
|
96
|
-
title: 'Check whether the agent is ready',
|
|
97
|
-
prompt: 'Check the agent service status.',
|
|
98
|
-
capabilityId: 'status.read'
|
|
99
|
-
}],
|
|
100
|
-
createdAt: publishedAt,
|
|
101
|
-
updatedAt: publishedAt
|
|
102
|
-
})
|
|
103
|
-
|
|
104
|
-
// Use a KMS/HSM-backed signer in production. Mount the returned fetch handler
|
|
105
|
-
// at the origin root so all well-known, A2A, JSON-LD, agents.txt, and sitemap
|
|
106
|
-
// discovery surfaces are served from one signed descriptor.
|
|
107
|
-
export const createAgentDiscovery = async ({
|
|
108
|
-
signer,
|
|
109
|
-
origin,
|
|
110
|
-
publishedAt,
|
|
111
|
-
version
|
|
112
|
-
}: {
|
|
113
|
-
signer: DiscoverySigner
|
|
114
|
-
origin: string
|
|
115
|
-
publishedAt: string
|
|
116
|
-
version: string
|
|
117
|
-
}) =>
|
|
118
|
-
createAgentDiscoveryHandler({
|
|
119
|
-
documents: [await signAgentDocument(
|
|
120
|
-
createAgentDocument({ origin, publishedAt, version }),
|
|
121
|
-
signer
|
|
122
|
-
)]
|
|
123
|
-
})
|
|
124
|
-
`;
|
|
125
|
-
export const agentsGuide = `# Agent execution contract
|
|
126
|
-
|
|
127
|
-
This project uses the AbsoluteJS provider-neutral agent stack.
|
|
128
|
-
|
|
129
|
-
- Authenticate agents and bind every delegation to a user with
|
|
130
|
-
\`@absolutejs/auth\`. Never treat model-provided identity as authenticated.
|
|
131
|
-
- Route every effectful tool through \`agency\` in \`src/backend/agent.ts\`.
|
|
132
|
-
Approval is exact-input-bound; execution requires a fresh single-use lease.
|
|
133
|
-
- Declare tool effects, scopes, approval policy, idempotency keys,
|
|
134
|
-
reversibility, destinations, and spend fields in manifest contract 2.
|
|
135
|
-
- Keep raw credentials host-side with \`@absolutejs/secrets\` credential
|
|
136
|
-
operations. Agents receive operation results, never secret values.
|
|
137
|
-
- Give agents bounded wallet allowances and signed mandates. The host resolves
|
|
138
|
-
ledger destinations; an agent never supplies the recipient account id.
|
|
139
|
-
- Bind MCP task handles to the authenticated actor on get, update, and cancel.
|
|
140
|
-
- Use \`@absolutejs/execution\` for idempotent effects and its transactional
|
|
141
|
-
PostgreSQL outbox before handing work to a durable queue.
|
|
142
|
-
- Publish and consume remote agents with \`@absolutejs/a2a\` using A2A 1.0;
|
|
143
|
-
preserve the authenticated tenant and actor binding at every task boundary.
|
|
144
|
-
- Route outbound HTTP through \`@absolutejs/egress\`. Authorize host, method,
|
|
145
|
-
resolved public IP, redirects, byte limits, and injected credentials host-side.
|
|
146
|
-
- Store immutable, digest-addressed policy revisions with \`@absolutejs/policy\`
|
|
147
|
-
and atomically activate only reviewed versions.
|
|
148
|
-
- Publish the signed descriptor in \`src/backend/agent-discovery.ts\` through
|
|
149
|
-
\`@absolutejs/agent-discovery\`. Keep capabilities, examples, tags, effects,
|
|
150
|
-
scopes, A2A/MCP interfaces, JSON-LD, agents.txt, and sitemap surfaces current.
|
|
151
|
-
- Run long-lived work through \`@absolutejs/agent-runtime\`; use its leases,
|
|
152
|
-
checkpoints, timers, budgets, cancellation, and crash-safe effect recovery.
|
|
153
|
-
- Authorize all HTTP/filesystem/process access with expiring
|
|
154
|
-
\`@absolutejs/agent-sandbox\` grants. There is no ambient agent authority.
|
|
155
|
-
- Preserve instruction/data separation and provenance taints with
|
|
156
|
-
\`@absolutejs/agent-trust\`; external content never becomes an instruction.
|
|
157
|
-
- Store scoped, expiring, provenance-bearing data with
|
|
158
|
-
\`@absolutejs/agent-memory\`, and validate writes against memory poisoning.
|
|
159
|
-
- Receive only verified events through \`@absolutejs/agent-inbox\`; durable
|
|
160
|
-
leases, retries, dead letters, and schedules do not require Redis.
|
|
161
|
-
- Use OpenID AuthZEN AARP for requestable approvals and COAZ mappings for
|
|
162
|
-
parameter-level MCP authorization. Approval always triggers re-evaluation.
|
|
163
|
-
- Protect operator actions with \`@absolutejs/agent-control\` scopes, a
|
|
164
|
-
kill-switch-first check, and leased idempotency records.
|
|
165
|
-
- Use \`@absolutejs/sync-bus-pg\` for durable framework channels. Redis is an
|
|
166
|
-
optional at-most-once fanout adapter, not a source of truth or work queue.
|
|
167
|
-
- Run \`@absolutejs/agent-conformance\` suites for every new action, capability,
|
|
168
|
-
credential, wallet, egress, execution, control, and task adapter.
|
|
169
|
-
- Use the control plane kill switch for incident response. It blocks new
|
|
170
|
-
requests, lease issuance, and execution before downstream revocation fans out.
|
|
171
|
-
|
|
172
|
-
Memory stores are for local development only. Production stores must be
|
|
173
|
-
durable and enforce lease/capability consumption atomically. Apply each
|
|
174
|
-
package's exported PostgreSQL schema in a migration before enabling traffic.
|
|
175
|
-
`;
|
|
176
|
-
export const scaffoldAgentic = ({ backendDirectory, projectName }) => {
|
|
177
|
-
mkdirSync(backendDirectory, { recursive: true });
|
|
178
|
-
writeFileSync(join(backendDirectory, 'agent.ts'), agentRuntimeSource);
|
|
179
|
-
writeFileSync(join(backendDirectory, 'agent-discovery.ts'), agentDiscoverySource);
|
|
180
|
-
writeFileSync(join(projectName, 'AGENTS.md'), agentsGuide);
|
|
181
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getAgentic: () => Promise<boolean>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { confirm, isCancel } from '@clack/prompts';
|
|
2
|
-
import { abort } from '../utils/abort';
|
|
3
|
-
export const getAgentic = async () => {
|
|
4
|
-
const agentic = await confirm({
|
|
5
|
-
initialValue: false,
|
|
6
|
-
message: 'Add the agent-first stack (auth, actions, MCP, wallet, credentials, and conformance)?'
|
|
7
|
-
});
|
|
8
|
-
if (isCancel(agentic))
|
|
9
|
-
abort();
|
|
10
|
-
return agentic;
|
|
11
|
-
};
|