@agentage/extension 0.21.0 → 0.22.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
CHANGED
|
@@ -8,6 +8,7 @@ correlation id, the response envelope, the store pool, the scheduler and argumen
|
|
|
8
8
|
schemas. The host document has the optional key `program { version, commit }` since 0.20.4: a cloud
|
|
9
9
|
app host fills it with its program; the daemon leaves it out.
|
|
10
10
|
The route `GET /api/{id}/caller` (the caller's own token facts) exists since 0.21.0.
|
|
11
|
+
The app kit has `setNavSection` since 0.22.0: an open app gives the shell a titled nav section.
|
|
11
12
|
`@agentage/extension/logs` is the event line (`EventSchema`, `parseLine`, `createLogger`,
|
|
12
13
|
`createEventsClient`, `KINDS`, `LEVELS`, `USER_TYPES`), built into the kit's own tarball.
|
|
13
14
|
`@agentage/extension/core` is the one client of the core's services (see "The core client").
|
|
@@ -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,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 = () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentage/extension",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.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",
|