@agentage/extension 0.21.0 → 0.23.0
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/README.md +34 -73
- package/dist/core-client/core-client.js +1 -1
- package/dist/tool/app-build.d.ts +1 -1
- package/dist/tool/app-build.js +12 -15
- package/dist/tool/check.js +2 -2
- package/dist/tool/rules/app-deps.d.ts +1 -1
- package/dist/tool/rules/app-deps.js +20 -18
- package/dist/vendor/app/app.types.d.ts +10 -0
- package/dist/vendor/app/index.d.ts +1 -1
- package/dist/vendor/app/split.d.ts +3 -3
- package/dist/vendor/app/split.js +6 -6
- package/dist/vendor/app/test-host.d.ts +2 -1
- package/dist/vendor/app/test-host.js +2 -0
- package/dist/vendor/app/theme.css +9 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,84 +1,45 @@
|
|
|
1
1
|
# @agentage/extension
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
schemas. The host document has the optional key `program { version, commit }` since 0.20.4: a cloud
|
|
9
|
-
app host fills it with its program; the daemon leaves it out.
|
|
10
|
-
The route `GET /api/{id}/caller` (the caller's own token facts) exists since 0.21.0.
|
|
11
|
-
`@agentage/extension/logs` is the event line (`EventSchema`, `parseLine`, `createLogger`,
|
|
12
|
-
`createEventsClient`, `KINDS`, `LEVELS`, `USER_TYPES`), built into the kit's own tarball.
|
|
13
|
-
`@agentage/extension/core` is the one client of the core's services (see "The core client").
|
|
14
|
-
`@agentage/extension/app` is the app part: `useAppShell()` (route, regions, notices, state) and
|
|
15
|
-
`useAppHost()` (`user`, `scopes`, `api`, and since 0.18.2 `extension { id, version }` and
|
|
16
|
-
`host { kind, url }`, kind `local`, `desktop` or `cloud`).
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
The extension kit of agentage. You write each part of an extension as one `create(ctx)` function.
|
|
6
|
+
The kit owns the server, the port, `/health`, auth, the store and the images. It also holds the
|
|
7
|
+
build tool that the `agentage extension` commands run. It is for extension authors.
|
|
17
8
|
|
|
18
9
|
```bash
|
|
19
10
|
npm install @agentage/extension express zod
|
|
20
11
|
```
|
|
21
12
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
| `down.code` | `message` | When |
|
|
42
|
-
| ------------- | ------------------------- | ----------------------------------------------------------------- |
|
|
43
|
-
| `no_core` | `<service> not reachable` | no address, not a URL, or the `url` function threw (`cause`) |
|
|
44
|
-
| `unreachable` | `<service> not reachable` | no connection |
|
|
45
|
-
| `timeout` | `<service> not reachable` | no answer before the deadline, a stalled body |
|
|
46
|
-
| `failed` | `<service> not reachable` | not 2xx, a 404 that is not the market's, a redirect, over 1 MB |
|
|
47
|
-
| `not_json` | `<service> not reachable` | a market body that is not JSON |
|
|
48
|
-
| `refused` | `market answer refused` | a 2xx with no release or rows, or not an exact version of that id |
|
|
49
|
-
| `no_token` | `logs needs a token` | `logs.send` with no token |
|
|
50
|
-
|
|
51
|
-
The rules for a caller:
|
|
52
|
-
|
|
53
|
-
- A caller that needs the market, such as an install or an update with no version, treats
|
|
54
|
-
`down !== null` as an error and changes nothing. Only a list for a page shows the empty answer.
|
|
55
|
-
- A release loop reads `data: null` as "no release" only when `down` is null. It also skips a
|
|
56
|
-
prerelease version and a `commit` of `null`, and keeps its own origin on https.
|
|
57
|
-
- Pass `timeoutMs` for the work: about 10 s for an install or a list in a terminal; a worker
|
|
58
|
-
sets its own. The default suits a page or a start that must not wait.
|
|
59
|
-
|
|
60
|
-
`agentage extension check [dir] --json` prints the conformance report (exit 1 when `conforms` is
|
|
61
|
-
false); `file` and `line` are there only when a problem has them. `warnings` is there only when a
|
|
62
|
-
rule warned: an `engines.agentage` of an older kit minor from the floor `0.12` up conforms with a
|
|
63
|
-
warning; below the floor or above the running kit it is a problem:
|
|
64
|
-
|
|
65
|
-
```json
|
|
66
|
-
{
|
|
67
|
-
"id": "probe",
|
|
68
|
-
"version": "0.4.0",
|
|
69
|
-
"conforms": false,
|
|
70
|
-
"rules": ["manifest", "entries", "surface", "stack", "store", "sealing"],
|
|
71
|
-
"problems": [
|
|
72
|
-
{ "rule": "sealing", "file": "src/api/index.ts", "line": 7, "problem": "reads process.env" }
|
|
73
|
-
],
|
|
74
|
-
"skipped": {}
|
|
13
|
+
A part is one folder in `src/`. This MCP part, from the extension template, serves the tool
|
|
14
|
+
`{id}__echo` on `POST /mcp`:
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
import { type McpContext } from '@agentage/extension';
|
|
18
|
+
import { z } from 'zod';
|
|
19
|
+
|
|
20
|
+
export function create(ctx: McpContext) {
|
|
21
|
+
ctx.tool(
|
|
22
|
+
'echo',
|
|
23
|
+
{
|
|
24
|
+
description: 'Echo a message back',
|
|
25
|
+
scope: 'read',
|
|
26
|
+
input: z.object({ msg: z.string().min(1).max(200) }),
|
|
27
|
+
output: z.object({ msg: z.string() }),
|
|
28
|
+
},
|
|
29
|
+
async ({ msg }) => ({ msg: `pong ${msg}` })
|
|
30
|
+
);
|
|
75
31
|
}
|
|
76
32
|
```
|
|
77
33
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
34
|
+
Start a new extension with `npx @agentage/cli extension create my-ext`: it pins this kit for you.
|
|
35
|
+
|
|
36
|
+
Since 0.23.0, `check` asks an app part for `@agentage/components` ^0.21, the library that replaces
|
|
37
|
+
`@agentage/design-system`.
|
|
38
|
+
|
|
39
|
+
- The subpaths, the core client, the check report and secrets:
|
|
40
|
+
[docs/extension-package.md](https://github.com/agentage/kit/blob/master/docs/extension-package.md).
|
|
41
|
+
- Every part kind: [docs/parts.md](https://github.com/agentage/kit/blob/master/docs/parts.md). The tool:
|
|
42
|
+
[docs/tool.md](https://github.com/agentage/kit/blob/master/docs/tool.md). The whole kit: the
|
|
43
|
+
[kit README](https://github.com/agentage/kit#readme).
|
|
82
44
|
|
|
83
|
-
|
|
84
|
-
manifest, the tool and how a part image runs.
|
|
45
|
+
License: MIT
|
|
@@ -79,7 +79,7 @@ const logsOf = (s, o) => {
|
|
|
79
79
|
};
|
|
80
80
|
return { send, down: () => s.first.logs ?? null };
|
|
81
81
|
};
|
|
82
|
-
// Never throws
|
|
82
|
+
// Never throws, never waits past timeoutMs; caller rules: docs/extension-package.md "The core client".
|
|
83
83
|
export const createCoreClient = (o = {}) => {
|
|
84
84
|
const s = {
|
|
85
85
|
url: o.url ?? coreUrlOf(o.env ?? {}),
|
package/dist/tool/app-build.d.ts
CHANGED
|
@@ -8,6 +8,6 @@ export interface AppBuilder {
|
|
|
8
8
|
rebuild(): Promise<AppFiles>;
|
|
9
9
|
dispose(): Promise<void>;
|
|
10
10
|
}
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const libSources: (dir: string, metafile?: Esbuild.Metafile) => string[];
|
|
12
12
|
export declare const appBuilder: (at: string) => Promise<AppBuilder>;
|
|
13
13
|
export declare const buildApp: (dir: string) => Promise<AppFiles>;
|
package/dist/tool/app-build.js
CHANGED
|
@@ -38,28 +38,25 @@ const esbuildOptions = (dir, entry) => ({
|
|
|
38
38
|
metafile: true,
|
|
39
39
|
outfile: join(dir, APP_DIR, 'app.js'),
|
|
40
40
|
});
|
|
41
|
-
const
|
|
42
|
-
// The
|
|
43
|
-
export const
|
|
44
|
-
.filter((file) =>
|
|
41
|
+
const LIB = /(^|\/)node_modules\/@agentage\/components\//;
|
|
42
|
+
// The components files the app bundles: their classes are scanned too, or a Button has no style.
|
|
43
|
+
export const libSources = (dir, metafile) => Object.keys(metafile?.inputs ?? {})
|
|
44
|
+
.filter((file) => LIB.test(file))
|
|
45
45
|
.map((file) => resolve(dir, file));
|
|
46
|
-
// The
|
|
47
|
-
const
|
|
48
|
-
const file = resolveFrom(dir, '@agentage/
|
|
49
|
-
|
|
50
|
-
return [];
|
|
51
|
-
const blocks = (await readFile(file, 'utf8')).match(/@theme\s*\{[^{}]*\}/g) ?? [];
|
|
52
|
-
return blocks.map((b) => b.replace(/^@theme/, '@theme reference'));
|
|
46
|
+
// The components tokens as reference: names, @utility and keyframes; the shell gives the values.
|
|
47
|
+
const libTokens = (dir) => {
|
|
48
|
+
const file = resolveFrom(dir, '@agentage/components/styles/tokens.css');
|
|
49
|
+
return file ? [`@import "${file}" reference;`] : [];
|
|
53
50
|
};
|
|
54
51
|
// Utilities only, no preflight and no theme variables: the shell owns both.
|
|
55
52
|
// Token names only (reference): utilities like bg-primary exist; the shell gives the values.
|
|
56
|
-
const cssInput =
|
|
53
|
+
const cssInput = (dir, extra) => {
|
|
57
54
|
const tw = packageDir(dir, 'tailwindcss');
|
|
58
55
|
const tokens = resolveFrom(dir, '@agentage/extension/app/theme.css');
|
|
59
56
|
return [
|
|
60
57
|
'@layer theme, utilities;',
|
|
61
58
|
`@import "${join(tw, 'theme.css')}" layer(theme) theme(reference inline);`,
|
|
62
|
-
...(
|
|
59
|
+
...libTokens(dir),
|
|
63
60
|
...(tokens ? [`@import "${tokens}" layer(theme) theme(reference);`] : []),
|
|
64
61
|
`@import "${join(tw, 'utilities.css')}" layer(utilities) source(none);`,
|
|
65
62
|
`@source "${join(dir, 'src', 'app')}";`,
|
|
@@ -71,7 +68,7 @@ const compileCss = async (dir, extra) => {
|
|
|
71
68
|
const tailwind = await loadFrom(dir, '@tailwindcss/postcss');
|
|
72
69
|
const plugin = tailwind({ base: dir, optimize: { minify: true } });
|
|
73
70
|
const from = join(dir, 'src', 'app', 'app.css');
|
|
74
|
-
return (await postcss([plugin]).process(
|
|
71
|
+
return (await postcss([plugin]).process(cssInput(dir, extra), { from })).css;
|
|
75
72
|
};
|
|
76
73
|
const hashed = (code, ext) => `app-${createHash('sha256').update(code).digest('hex').slice(0, 10)}.${ext}`;
|
|
77
74
|
// Written then renamed: a reader sees the old file or the new one, never half of one.
|
|
@@ -110,7 +107,7 @@ export const appBuilder = async (at) => {
|
|
|
110
107
|
const rebuild = async () => {
|
|
111
108
|
const result = await ctx.rebuild();
|
|
112
109
|
const code = result.outputFiles?.[0]?.contents ?? new Uint8Array();
|
|
113
|
-
return writeApp(dir, code, await compileCss(dir,
|
|
110
|
+
return writeApp(dir, code, await compileCss(dir, libSources(dir, result.metafile)));
|
|
114
111
|
};
|
|
115
112
|
return { rebuild, dispose: () => ctx.dispose() };
|
|
116
113
|
};
|
package/dist/tool/check.js
CHANGED
|
@@ -10,7 +10,7 @@ import {} from '../manifest/primitives.schema.js';
|
|
|
10
10
|
import { formatIssues, readJsonIfExists } from '../manifest/read-manifest.js';
|
|
11
11
|
import { runCommand } from './exec.js';
|
|
12
12
|
import { problemLines, warningLines } from './format.js';
|
|
13
|
-
import {
|
|
13
|
+
import { componentsProblems } from './rules/app-deps.js';
|
|
14
14
|
import { exportedPartCode } from './rules/folders.js';
|
|
15
15
|
import { sealing } from './rules/sealing.js';
|
|
16
16
|
import { store } from './rules/store.js';
|
|
@@ -63,7 +63,7 @@ const appProblem = async ({ dir, pkg }) => {
|
|
|
63
63
|
if (!appOf(pkg))
|
|
64
64
|
return [];
|
|
65
65
|
const built = (await exists(join(dir, 'dist/app/index.js'))) ? [] : [{ problem: APP_BUILT }];
|
|
66
|
-
return [...built, ...
|
|
66
|
+
return [...built, ...componentsProblems(pkg)];
|
|
67
67
|
};
|
|
68
68
|
// Every part built and exporting only create; cli handlers = commands; exports hold no part code.
|
|
69
69
|
const entries = {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type ExtensionPackage } from '../../manifest/manifest.schema.js';
|
|
2
2
|
import { type Finding } from '../check.js';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const componentsProblems: (pkg: ExtensionPackage) => Finding[];
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
import semver from 'semver';
|
|
2
2
|
import {} from '../../manifest/manifest.schema.js';
|
|
3
3
|
import {} from '../check.js';
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
const LIB = '@agentage/components';
|
|
5
|
+
const OLD = '@agentage/design-system';
|
|
6
|
+
const NEEDED = '^0.21';
|
|
7
|
+
const specsOf = (pkg, name) => {
|
|
8
8
|
const declared = pkg;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
return [declared.dependencies, declared.devDependencies, declared.peerDependencies].flatMap((group) => (group?.[name] ?? []));
|
|
10
|
+
};
|
|
11
|
+
const finding = (problem) => [{ file: 'package.json', problem }];
|
|
12
|
+
// The kit's app code imports the components (resizable-split, 0.21+), so the app part must declare them.
|
|
13
|
+
export const componentsProblems = (pkg) => {
|
|
14
|
+
const old = specsOf(pkg, OLD).length > 0;
|
|
15
|
+
const specs = specsOf(pkg, LIB);
|
|
14
16
|
if (specs.length === 0)
|
|
15
|
-
return
|
|
16
|
-
{
|
|
17
|
-
|
|
18
|
-
problem: `the app part needs ${DS} ${NEEDED}: declare it in dependencies, devDependencies or peerDependencies`,
|
|
19
|
-
},
|
|
20
|
-
];
|
|
17
|
+
return finding(old
|
|
18
|
+
? `${OLD} is replaced: switch the app part to ${LIB} ${NEEDED}`
|
|
19
|
+
: `the app part needs ${LIB} ${NEEDED}: declare it in dependencies, devDependencies or peerDependencies`);
|
|
21
20
|
const bad = specs.find((spec) => !semver.validRange(spec) || !semver.subset(spec, NEEDED));
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
if (bad !== undefined)
|
|
22
|
+
return finding(`${LIB} ${bad}, the app part needs ${NEEDED}`);
|
|
23
|
+
// Both: a kit of 0.22 or older still imports the old library; remove it once no kit needs it.
|
|
24
|
+
return old
|
|
25
|
+
? [{ file: 'package.json', problem: `${OLD} is replaced by ${LIB}: remove it`, warning: true }]
|
|
26
|
+
: [];
|
|
25
27
|
};
|
|
@@ -16,12 +16,22 @@ export interface ShellPort {
|
|
|
16
16
|
closeAside: () => void;
|
|
17
17
|
navigate: (page: string) => void;
|
|
18
18
|
setPages: (pages: PageLink[]) => void;
|
|
19
|
+
setNavSection: (section: NavSection | null) => void;
|
|
19
20
|
setBottomBar: (bar: BottomBar | null) => void;
|
|
20
21
|
}
|
|
21
22
|
export interface PageLink {
|
|
22
23
|
title: string;
|
|
23
24
|
path: string;
|
|
24
25
|
}
|
|
26
|
+
export interface NavItem {
|
|
27
|
+
title: string;
|
|
28
|
+
path: string;
|
|
29
|
+
icon?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface NavSection {
|
|
32
|
+
title: string;
|
|
33
|
+
items: NavItem[];
|
|
34
|
+
}
|
|
25
35
|
export interface BottomBar {
|
|
26
36
|
title: string;
|
|
27
37
|
count?: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { AppContextValue, AppHost, AppRoute, AppShell, AppUser, AsideKey, HostAdapter, BottomBar, ExtensionInfo, HostInfo, HostKind, Notice, NoticeKind, RegionHost, RegionName, PageLink, ShellPort, StateStore, } from './app.types.js';
|
|
1
|
+
export type { AppContextValue, AppHost, AppRoute, AppShell, AppUser, AsideKey, HostAdapter, BottomBar, ExtensionInfo, HostInfo, HostKind, Notice, NoticeKind, RegionHost, RegionName, PageLink, NavItem, NavSection, ShellPort, StateStore, } from './app.types.js';
|
|
2
2
|
export { AppApiError, checkApiPath, newAgcid } from './api.js';
|
|
3
3
|
export { AppBoundary } from './boundary.js';
|
|
4
4
|
export { AppContext, useAppHost, useAppShell } from './context.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type ResizableSplitApi } from '@agentage/
|
|
1
|
+
import { type ResizableSplitApi } from '@agentage/components/resizable-split';
|
|
2
2
|
import { type ReactNode, type Ref } from 'react';
|
|
3
|
-
export { useResizableSplit as useSplit } from '@agentage/
|
|
4
|
-
export type { ResizableSplitApi as SplitApi } from '@agentage/
|
|
3
|
+
export { useResizableSplit as useSplit } from '@agentage/components/resizable-split';
|
|
4
|
+
export type { ResizableSplitApi as SplitApi } from '@agentage/components/resizable-split';
|
|
5
5
|
export declare const splitKey: (app: string, id: string) => string;
|
|
6
6
|
export declare const splitVar: (app: string, id: string) => string;
|
|
7
7
|
export declare const SPLIT_PREPAINT = "try{var d=document.documentElement,L=localStorage,E=function(k){return k.replace(/[^A-Za-z0-9-]/g,function(c){return '_'+c.charCodeAt(0).toString(16)+'_'})};for(var i=0;i<L.length;i++){var k=L.key(i),m=/^ag\\.split\\.[a-z0-9-]+\\.[a-z0-9-]+$/.test(k),n=parseInt(L.getItem(k),10);if(m&&n>0&&n<8000)d.style.setProperty('--split-'+E(k),n+'px');if(m&&L.getItem(k+'.collapsed')==='1')d.style.setProperty('--splitc-'+E(k),'0px')}}catch(e){}";
|
package/dist/vendor/app/split.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ResizableSplit } from '@agentage/
|
|
2
|
+
import { ResizableSplit } from '@agentage/components/resizable-split';
|
|
3
3
|
import { useEffect, useState } from 'react';
|
|
4
4
|
import { useAppContext } from './context.js';
|
|
5
|
-
export { useResizableSplit as useSplit } from '@agentage/
|
|
5
|
+
export { useResizableSplit as useSplit } from '@agentage/components/resizable-split';
|
|
6
6
|
const NAME = /^[a-z0-9-]+$/;
|
|
7
7
|
const PHONE = '(max-width: 759px)';
|
|
8
|
-
// The stored size key; the
|
|
8
|
+
// The stored size key; the components split names its CSS variables from it.
|
|
9
9
|
export const splitKey = (app, id) => `ag.split.${app}.${id}`;
|
|
10
|
-
// The
|
|
10
|
+
// The components encoding of a storage key in a CSS variable name (`.` -> `_2e_`).
|
|
11
11
|
const encode = (key) => key.replace(/[^A-Za-z0-9-]/g, (c) => `_${(c.codePointAt(0) ?? 0).toString(16)}_`);
|
|
12
12
|
export const splitVar = (app, id) => `--split-${encode(splitKey(app, id))}`;
|
|
13
13
|
// Runs in the page head before any module: every stored `ag.split.{app}.{id}` (size and collapsed)
|
|
14
|
-
// is registered by its key pattern and set as the
|
|
14
|
+
// is registered by its key pattern and set as the components split variables, so the first
|
|
15
15
|
// paint is final. A test holds the names equal to resizableSplitVar and resizableSplitCollapsedVar.
|
|
16
16
|
export const SPLIT_PREPAINT = `try{var d=document.documentElement,L=localStorage,E=function(k){return k.replace(/[^A-Za-z0-9-]/g,function(c){return '_'+c.charCodeAt(0).toString(16)+'_'})};for(var i=0;i<L.length;i++){var k=L.key(i),m=/^ag\\.split\\.[a-z0-9-]+\\.[a-z0-9-]+$/.test(k),n=parseInt(L.getItem(k),10);if(m&&n>0&&n<8000)d.style.setProperty('--split-'+E(k),n+'px');if(m&&L.getItem(k+'.collapsed')==='1')d.style.setProperty('--splitc-'+E(k),'0px')}}catch(e){}`;
|
|
17
17
|
const usePhone = () => {
|
|
@@ -25,7 +25,7 @@ const usePhone = () => {
|
|
|
25
25
|
}, []);
|
|
26
26
|
return phone;
|
|
27
27
|
};
|
|
28
|
-
// Two panes of an app on the
|
|
28
|
+
// Two panes of an app on the components ResizableSplit (px, pre-paint, collapsible).
|
|
29
29
|
export const Split = ({ id, pane = 1, children, ...rest }) => {
|
|
30
30
|
const { id: app } = useAppContext();
|
|
31
31
|
if (!NAME.test(id))
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import type { AppRoute, AppUser, AsideKey, BottomBar, HostInfo, Notice, PageLink, StateStore } from './app.types.js';
|
|
2
|
+
import type { AppRoute, AppUser, AsideKey, BottomBar, HostInfo, Notice, NavSection, PageLink, StateStore } from './app.types.js';
|
|
3
3
|
export interface TestCall {
|
|
4
4
|
id: string;
|
|
5
5
|
path: string;
|
|
@@ -13,6 +13,7 @@ export interface TestRecord {
|
|
|
13
13
|
aside: AsideKey | null;
|
|
14
14
|
pages: string[];
|
|
15
15
|
pageLinks: PageLink[];
|
|
16
|
+
navSection: NavSection | null;
|
|
16
17
|
bottomBar: BottomBar | null;
|
|
17
18
|
}
|
|
18
19
|
export interface TestHostProps {
|
|
@@ -14,6 +14,7 @@ export const createTestRecord = () => ({
|
|
|
14
14
|
aside: null,
|
|
15
15
|
pages: [],
|
|
16
16
|
pageLinks: [],
|
|
17
|
+
navSection: null,
|
|
17
18
|
bottomBar: null,
|
|
18
19
|
});
|
|
19
20
|
const testRequest = (record, reply) => async (id, path, init) => {
|
|
@@ -31,6 +32,7 @@ const testShell = (record) => ({
|
|
|
31
32
|
closeAside: () => void (record.aside = null),
|
|
32
33
|
navigate: (page) => void record.pages.push(page),
|
|
33
34
|
setPages: (pages) => void (record.pageLinks = pages),
|
|
35
|
+
setNavSection: (section) => void (record.navSection = section),
|
|
34
36
|
setBottomBar: (bar) => void (record.bottomBar = bar),
|
|
35
37
|
});
|
|
36
38
|
const useRegionHost = () => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* K11: the shell-samples/index.html hex values under the
|
|
1
|
+
/* K11: the shell-samples/index.html hex values under the @agentage/components token names, dark only. */
|
|
2
2
|
@theme {
|
|
3
3
|
--color-background: #1f2028;
|
|
4
4
|
--color-foreground: #ffffff;
|
|
@@ -22,8 +22,16 @@
|
|
|
22
22
|
--color-muted-foreground: #a9adc1;
|
|
23
23
|
--color-destructive: #f08a7e;
|
|
24
24
|
--color-destructive-foreground: #1f2028;
|
|
25
|
+
--color-destructive-solid: oklch(0.588 0.208 25.6);
|
|
25
26
|
--color-success: #5fd08f;
|
|
26
27
|
--color-success-foreground: #1f2028;
|
|
28
|
+
/* 4.9:1 on the kit accent; the library dark warning is 3.8:1 there. */
|
|
29
|
+
--color-warning: oklch(0.77 0.16 50);
|
|
30
|
+
--color-warning-foreground: oklch(0.085 0.013 277);
|
|
31
|
+
/* The prototype blue: the library dark info is 3.6:1 on the kit card. */
|
|
32
|
+
--color-info: #8fa8ff;
|
|
33
|
+
--color-info-foreground: #1f2028;
|
|
34
|
+
--color-status-offline: oklch(0.7 0.014 256);
|
|
27
35
|
--color-border: #3a3d4a;
|
|
28
36
|
--color-input: #3a3d4a;
|
|
29
37
|
--color-ring: #f5a623;
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentage/extension",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"description": "The agentage extension kit: create(ctx) per part (pages, ui, api, mcp, worker, cli), the store, /health, discovery, the envelope, and the build tool with up and token",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/agentage/
|
|
9
|
+
"url": "git+https://github.com/agentage/kit.git",
|
|
10
10
|
"directory": "packages/extension"
|
|
11
11
|
},
|
|
12
12
|
"homepage": "https://agentage.io",
|
|
13
13
|
"bugs": {
|
|
14
|
-
"url": "https://github.com/agentage/
|
|
14
|
+
"url": "https://github.com/agentage/kit/issues"
|
|
15
15
|
},
|
|
16
16
|
"publishConfig": {
|
|
17
17
|
"access": "public"
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"zod": "^4.2.0"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
|
-
"@agentage/
|
|
89
|
+
"@agentage/components": "^0.21",
|
|
90
90
|
"@electric-sql/pglite": "^0.5.0",
|
|
91
91
|
"@tailwindcss/postcss": "^4.3.0",
|
|
92
92
|
"esbuild": ">=0.25.0",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"tailwindcss": "^4.3.0"
|
|
98
98
|
},
|
|
99
99
|
"peerDependenciesMeta": {
|
|
100
|
-
"@agentage/
|
|
100
|
+
"@agentage/components": {
|
|
101
101
|
"optional": true
|
|
102
102
|
},
|
|
103
103
|
"@electric-sql/pglite": {
|