@agentage/extension 0.18.7 → 0.18.8
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/agcid/fetch.d.ts +0 -1
- package/dist/agcid/fetch.js +1 -1
- package/dist/api/files.d.ts +2 -5
- package/dist/api/files.js +3 -3
- package/dist/auth/verify-token.d.ts +2 -1
- package/dist/command/args.d.ts +1 -1
- package/dist/command/cli-context.d.ts +0 -1
- package/dist/command/cli-context.js +1 -1
- package/dist/command/out.d.ts +3 -2
- package/dist/envelope/envelope.d.ts +1 -1
- package/dist/health/health.d.ts +2 -1
- package/dist/host/app-bundle.d.ts +1 -2
- package/dist/host/app-bundle.js +1 -1
- package/dist/host/daemon/app-header.d.ts +0 -1
- package/dist/host/daemon/app-header.js +1 -1
- package/dist/host/daemon/installation.d.ts +0 -1
- package/dist/host/daemon/installation.js +1 -1
- package/dist/host/daemon/seal.js +17 -2
- package/dist/host/open-store.d.ts +2 -1
- package/dist/manifest/manifest.schema.d.ts +0 -6
- package/dist/manifest/parts.d.ts +1 -1
- package/dist/mcp/server.d.ts +2 -1
- package/dist/mcp/tools.d.ts +1 -1
- package/dist/server/api-routes.d.ts +2 -1
- package/dist/server/app.d.ts +2 -1
- package/dist/shell/dist/index.html +1 -1
- package/dist/shell/dist/shell.css +1 -1
- package/dist/shell/dist/shell.js +1 -1
- package/dist/store/clickhouse-http.d.ts +2 -1
- package/dist/store/clickhouse-store.d.ts +0 -1
- package/dist/store/clickhouse-store.js +1 -1
- package/dist/store/git-env.d.ts +0 -5
- package/dist/store/git-env.js +2 -2
- package/dist/store/migrations.d.ts +0 -2
- package/dist/store/migrations.js +2 -2
- package/dist/store/pglite-store.d.ts +0 -1
- package/dist/store/pglite-store.js +1 -1
- package/dist/store/store.d.ts +2 -2
- package/dist/store/store.js +1 -1
- package/dist/tool/record-extras.d.ts +0 -1
- package/dist/tool/record-extras.js +1 -1
- package/dist/tool/up/compose.d.ts +2 -1
- package/dist/tool/up/gateway.d.ts +1 -1
- package/dist/tool/up/store-line.d.ts +1 -1
- package/dist/worker/scheduler.d.ts +2 -1
- package/package.json +2 -2
package/dist/store/git-env.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { inspect } from 'node:util';
|
|
2
2
|
// The URL of the estate file holds user:password; git gets it as a header, never in a URL or argv.
|
|
3
|
-
|
|
3
|
+
const splitCredential = (url) => {
|
|
4
4
|
const parsed = new URL(url);
|
|
5
5
|
const user = decodeURIComponent(parsed.username);
|
|
6
6
|
const password = decodeURIComponent(parsed.password);
|
|
@@ -16,7 +16,7 @@ const configOf = (remote, header) => [
|
|
|
16
16
|
['core.hooksPath', '/dev/null'],
|
|
17
17
|
...(remote && header ? [[`http.${remote}.extraHeader`, header]] : []),
|
|
18
18
|
];
|
|
19
|
-
|
|
19
|
+
const gitEnvOf = (root, remote, header) => {
|
|
20
20
|
const config = configOf(remote, header);
|
|
21
21
|
const env = {
|
|
22
22
|
PATH: process.env['PATH'] ?? '/usr/bin:/bin',
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type Log } from '../log/log.js';
|
|
2
2
|
import { type Store } from './store.types.js';
|
|
3
|
-
export declare const SQL_FILE: RegExp;
|
|
4
3
|
export interface MigrateResult {
|
|
5
4
|
migrations: number;
|
|
6
5
|
applied: number;
|
|
@@ -8,5 +7,4 @@ export interface MigrateResult {
|
|
|
8
7
|
seedsBefore: number;
|
|
9
8
|
}
|
|
10
9
|
export declare const sqlFiles: (dir: string) => Promise<string[]>;
|
|
11
|
-
export declare const SEEDS_OWED = "seeds:owed";
|
|
12
10
|
export declare const migrate: (store: Store, dir: string, log: Log) => Promise<MigrateResult>;
|
package/dist/store/migrations.js
CHANGED
|
@@ -3,7 +3,7 @@ import { join } from 'node:path';
|
|
|
3
3
|
import { messageOf } from '../log/log.js';
|
|
4
4
|
import { KIT_MIGRATIONS, KIT_PREFIX, KIT_TABLES } from './kit-migrations.js';
|
|
5
5
|
import {} from './store.types.js';
|
|
6
|
-
|
|
6
|
+
const SQL_FILE = /^[0-9]{3}-[a-z0-9-]+\.sql$/;
|
|
7
7
|
// Filename order; anything else in the folder is refused, so a typo never silently skips a file.
|
|
8
8
|
export const sqlFiles = async (dir) => {
|
|
9
9
|
let names;
|
|
@@ -26,7 +26,7 @@ const LEDGER = `create table if not exists _migrations (
|
|
|
26
26
|
)`;
|
|
27
27
|
const SEED = 'seed:';
|
|
28
28
|
// Written by the first run on an empty store, removed once the seeds ran: a failed first run still seeds later.
|
|
29
|
-
|
|
29
|
+
const SEEDS_OWED = 'seeds:owed';
|
|
30
30
|
// Tables other than the kit's own: a store holding any (a restored dump) never gets the seeds.
|
|
31
31
|
const USER_TABLES = `select count(*)::int as n from information_schema.tables
|
|
32
32
|
where table_schema not in ('pg_catalog', 'information_schema')
|
|
@@ -18,7 +18,6 @@ export interface StoreAt {
|
|
|
18
18
|
type PGliteModule = {
|
|
19
19
|
PGlite: new (dataDir?: string) => PGliteLike;
|
|
20
20
|
};
|
|
21
|
-
export declare const PGLITE = "@electric-sql/pglite";
|
|
22
21
|
export declare const pgliteMissing: (tried: string[]) => string;
|
|
23
22
|
export declare const loadPglite: (from?: string, kitCopy?: () => Promise<unknown>) => Promise<PGliteModule>;
|
|
24
23
|
export declare const createPgliteStore: (prepare: (store: Store) => Promise<unknown>, at?: StoreAt) => PgliteStore;
|
|
@@ -2,7 +2,7 @@ import { createRequire } from 'node:module';
|
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { pathToFileURL } from 'node:url';
|
|
4
4
|
import {} from './store.types.js';
|
|
5
|
-
|
|
5
|
+
const PGLITE = '@electric-sql/pglite';
|
|
6
6
|
export const pgliteMissing = (tried) => `${PGLITE} is not installed (looked in ${tried.join(', then ')}): the host brings it, npm install ${PGLITE}`;
|
|
7
7
|
const notFound = (err) => ['ERR_MODULE_NOT_FOUND', 'MODULE_NOT_FOUND'].includes(String(err.code));
|
|
8
8
|
const fromPackage = async (from) => {
|
package/dist/store/store.d.ts
CHANGED
|
@@ -5,13 +5,13 @@ import { type Store } from './store.types.js';
|
|
|
5
5
|
export interface PoolStore extends Store {
|
|
6
6
|
end(): Promise<void>;
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
interface StoreTimeouts {
|
|
9
9
|
connectMs: number;
|
|
10
10
|
statementMs: number;
|
|
11
11
|
}
|
|
12
|
-
export declare const PART_TIMEOUTS: StoreTimeouts;
|
|
13
12
|
export declare const MIGRATE_TIMEOUTS: StoreTimeouts;
|
|
14
13
|
export declare const storeUrl: (env: Env, read?: (file: string) => string) => string | undefined;
|
|
15
14
|
export declare const isOutage: (err: unknown) => boolean;
|
|
16
15
|
export declare const createStore: (env: Env, log: Log, timeouts?: StoreTimeouts) => PoolStore;
|
|
17
16
|
export declare const storeCheck: (store: Store) => HealthCheck;
|
|
17
|
+
export {};
|
package/dist/store/store.js
CHANGED
|
@@ -6,7 +6,7 @@ import { messageOf } from '../log/log.js';
|
|
|
6
6
|
import {} from '../runtime/build-info.js';
|
|
7
7
|
import {} from './store.types.js';
|
|
8
8
|
// A part's query is bounded by the server and, if the network itself hangs, by the client too.
|
|
9
|
-
|
|
9
|
+
const PART_TIMEOUTS = { connectMs: 5_000, statementMs: 10_000 };
|
|
10
10
|
// A migration may rewrite a table: minutes, not a request's seconds.
|
|
11
11
|
export const MIGRATE_TIMEOUTS = { connectMs: 10_000, statementMs: 300_000 };
|
|
12
12
|
const CLIENT_SLACK_MS = 2_000;
|
|
@@ -2,7 +2,6 @@ import { type ApiContext } from '../api/routes.js';
|
|
|
2
2
|
import { type RecordExtras } from '../discovery/discovery.js';
|
|
3
3
|
import { type ExtensionPackage } from '../manifest/manifest.schema.js';
|
|
4
4
|
import { type McpContext } from '../mcp/tools.js';
|
|
5
|
-
export declare const recordingContext: (pkg: ExtensionPackage, part: "api" | "mcp") => import("../context/context.js").PartContext;
|
|
6
5
|
export declare const registeredTools: (create: (ctx: McpContext) => unknown, pkg: ExtensionPackage) => Promise<import("../mcp/tools.js").ToolEntry[]>;
|
|
7
6
|
export declare const registeredRoutes: (create: (ctx: ApiContext) => unknown, pkg: ExtensionPackage) => Promise<{
|
|
8
7
|
routes: import("../api/routes.js").RouteEntry[];
|
|
@@ -21,7 +21,7 @@ const noStore = {
|
|
|
21
21
|
};
|
|
22
22
|
const silent = createLog({ extension: 'build', part: 'check' }, () => undefined);
|
|
23
23
|
// The ctx part code gets when the tool runs its create(ctx) to read what it registers or routes.
|
|
24
|
-
|
|
24
|
+
const recordingContext = (pkg, part) => createContext({
|
|
25
25
|
pkg,
|
|
26
26
|
part,
|
|
27
27
|
origin: 'http://127.0.0.1',
|
|
@@ -2,7 +2,7 @@ import { type ExtensionPackage } from '../../manifest/manifest.schema.js';
|
|
|
2
2
|
export declare const STORE_IMAGE = "postgres:18-alpine";
|
|
3
3
|
export declare const CLICKHOUSE_IMAGE = "clickhouse/clickhouse-server:26.8@sha256:d426d2f612e1e189c90f9a3f8dcd85a03c6851273833817a296bb327e63aa7a7";
|
|
4
4
|
export declare const STORE_URL_SECRET = "store-url";
|
|
5
|
-
|
|
5
|
+
interface ComposeInput {
|
|
6
6
|
pkg: ExtensionPackage;
|
|
7
7
|
project: string;
|
|
8
8
|
tags: Record<string, string>;
|
|
@@ -36,3 +36,4 @@ export declare const composeFile: (input: ComposeInput) => {
|
|
|
36
36
|
store?: undefined;
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
|
+
export {};
|
|
@@ -5,7 +5,7 @@ declare const MigrateSummarySchema: z.ZodObject<{
|
|
|
5
5
|
seeds: z.ZodInt;
|
|
6
6
|
seedsBefore: z.ZodDefault<z.ZodInt>;
|
|
7
7
|
}, z.core.$strip>;
|
|
8
|
-
|
|
8
|
+
type MigrateSummary = z.infer<typeof MigrateSummarySchema>;
|
|
9
9
|
export declare const summaryOf: (out: string) => MigrateSummary;
|
|
10
10
|
export declare const storePhrase: (summary: MigrateSummary) => string;
|
|
11
11
|
export {};
|
|
@@ -4,7 +4,7 @@ import { type JobOptions } from './job-options.js';
|
|
|
4
4
|
import { type JobRun, type RunStore } from './runs.js';
|
|
5
5
|
export type Job = () => unknown;
|
|
6
6
|
export type Schedule = (name: string, cron: string, job: Job, options?: JobOptions) => void;
|
|
7
|
-
|
|
7
|
+
interface SchedulerDeps {
|
|
8
8
|
runs: RunStore;
|
|
9
9
|
log: Log;
|
|
10
10
|
now?: () => Date;
|
|
@@ -19,3 +19,4 @@ export interface Scheduler {
|
|
|
19
19
|
}
|
|
20
20
|
export declare const LATE_MS = 60000;
|
|
21
21
|
export declare const createScheduler: (deps: SchedulerDeps) => Scheduler;
|
|
22
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentage/extension",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.8",
|
|
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",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@modelcontextprotocol/server": "^2.4.0",
|
|
73
73
|
"cors": "^2.8.5",
|
|
74
74
|
"helmet": "^8.1.0",
|
|
75
|
-
"jose": "^6.2.
|
|
75
|
+
"jose": "^6.2.17",
|
|
76
76
|
"pg": "^8.23.1",
|
|
77
77
|
"semver": "^7.8.6",
|
|
78
78
|
"zod": "^4.2.0"
|