ptbk 0.119.0-72 → 0.119.0-75
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/app/api/engine-api.d.ts +117 -0
- package/dist/app/api/engine-api.js +905 -0
- package/dist/app/api/engine-api.js.map +1 -0
- package/dist/app/api/state.d.ts +109 -0
- package/dist/app/api/state.js +168 -0
- package/dist/app/api/state.js.map +1 -0
- package/dist/app/build.d.ts +9 -0
- package/dist/app/build.js +10 -0
- package/dist/app/build.js.map +1 -0
- package/dist/app/connection.d.ts +134 -5
- package/dist/app/connection.js +271 -16
- package/dist/app/connection.js.map +1 -1
- package/dist/app/registration.d.ts +10 -0
- package/dist/app/registration.js +40 -3
- package/dist/app/registration.js.map +1 -1
- package/dist/app/settings.d.ts +16 -0
- package/dist/app/settings.js +23 -2
- package/dist/app/settings.js.map +1 -1
- package/dist/app/web/access.d.ts +221 -0
- package/dist/app/web/access.js +345 -0
- package/dist/app/web/access.js.map +1 -0
- package/dist/app/web/acme.d.ts +104 -0
- package/dist/app/web/acme.js +254 -0
- package/dist/app/web/acme.js.map +1 -0
- package/dist/app/web/certificates.d.ts +98 -0
- package/dist/app/web/certificates.js +231 -0
- package/dist/app/web/certificates.js.map +1 -0
- package/dist/app/web/documents.d.ts +12 -0
- package/dist/app/web/documents.js +40 -0
- package/dist/app/web/documents.js.map +1 -0
- package/dist/app/web/gateway.d.ts +126 -0
- package/dist/app/web/gateway.js +451 -0
- package/dist/app/web/gateway.js.map +1 -0
- package/dist/app/web/harness-terminal-browser.d.ts +1 -0
- package/dist/app/web/harness-terminal-browser.js +133 -0
- package/dist/app/web/harness-terminal-browser.js.map +1 -0
- package/dist/app/web/harness-terminal.d.ts +4 -0
- package/dist/app/web/harness-terminal.js +103 -0
- package/dist/app/web/harness-terminal.js.map +1 -0
- package/dist/app/web/onboarding-browser.d.ts +1 -0
- package/dist/app/web/onboarding-browser.js +161 -0
- package/dist/app/web/onboarding-browser.js.map +1 -0
- package/dist/app/web/onboarding-page.d.ts +7 -0
- package/dist/app/web/onboarding-page.js +25 -0
- package/dist/app/web/onboarding-page.js.map +1 -0
- package/dist/app/web/origin.d.ts +53 -0
- package/dist/app/web/origin.js +160 -0
- package/dist/app/web/origin.js.map +1 -0
- package/dist/app/web/tls.d.ts +96 -0
- package/dist/app/web/tls.js +209 -0
- package/dist/app/web/tls.js.map +1 -0
- package/dist/app/web/ui-loader.d.ts +118 -0
- package/dist/app/web/ui-loader.js +567 -0
- package/dist/app/web/ui-loader.js.map +1 -0
- package/dist/app/web/x509.d.ts +79 -0
- package/dist/app/web/x509.js +140 -0
- package/dist/app/web/x509.js.map +1 -0
- package/dist/app/web/xterm-LICENSE +21 -0
- package/dist/app/web/xterm.css +285 -0
- package/dist/app/web/xterm.js +2 -0
- package/dist/browser/browser.d.ts +6 -0
- package/dist/browser/browser.js +29 -4
- package/dist/browser/browser.js.map +1 -1
- package/dist/chats/service.d.ts +7 -0
- package/dist/chats/service.js +15 -0
- package/dist/chats/service.js.map +1 -1
- package/dist/cli/commands/connect.d.ts +15 -0
- package/dist/cli/commands/connect.js +144 -11
- package/dist/cli/commands/connect.js.map +1 -1
- package/dist/cli/commands/dashboard.js +2 -1
- package/dist/cli/commands/dashboard.js.map +1 -1
- package/dist/cli/commands/init.d.ts +7 -0
- package/dist/cli/commands/init.js +62 -19
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/onboarding.d.ts +10 -0
- package/dist/cli/commands/onboarding.js +413 -0
- package/dist/cli/commands/onboarding.js.map +1 -0
- package/dist/cli/registry.js +73 -4
- package/dist/cli/registry.js.map +1 -1
- package/dist/cli/sources.js +1 -1
- package/dist/cli/sources.js.map +1 -1
- package/dist/engine/agenda.d.ts +29 -0
- package/dist/engine/agenda.js +94 -3
- package/dist/engine/agenda.js.map +1 -1
- package/dist/engine/generated.js +2 -2
- package/dist/engine/generated.js.map +1 -1
- package/dist/engine/harnesses.d.ts +2 -2
- package/dist/engine/harnesses.js +13 -4
- package/dist/engine/harnesses.js.map +1 -1
- package/dist/engine/routing.js +2 -2
- package/dist/engine/routing.js.map +1 -1
- package/dist/engine/snapshot.d.ts +18 -1
- package/dist/expert/_main.md +2 -2
- package/dist/expert/app/connection.md +27 -13
- package/dist/expert/app/integration.md +2 -12
- package/dist/expert/app/onboarding.md +37 -0
- package/dist/expert/cli/global-dashboard.md +1 -1
- package/dist/expert/cli/harness-authentication.md +11 -4
- package/dist/expert/cli/releasing.md +4 -0
- package/dist/expert/cli/vps-onboarding.md +4 -0
- package/dist/expert/dictionary.md +3 -1
- package/dist/harness/maintenance.js +3 -1
- package/dist/harness/maintenance.js.map +1 -1
- package/dist/harness/plugins/claude-code/index.js +3 -0
- package/dist/harness/plugins/claude-code/index.js.map +1 -1
- package/dist/harness/plugins/gemini/index.js +22 -2
- package/dist/harness/plugins/gemini/index.js.map +1 -1
- package/dist/harness/plugins/github-copilot/index.js +36 -6
- package/dist/harness/plugins/github-copilot/index.js.map +1 -1
- package/dist/harness/plugins/openai-codex/index.js +10 -0
- package/dist/harness/plugins/openai-codex/index.js.map +1 -1
- package/dist/harness/plugins/opencode/index.js +18 -6
- package/dist/harness/plugins/opencode/index.js.map +1 -1
- package/dist/harness/plugins/qwen-code/index.js +12 -1
- package/dist/harness/plugins/qwen-code/index.js.map +1 -1
- package/dist/harness/presented-login.d.ts +21 -0
- package/dist/harness/presented-login.js +51 -0
- package/dist/harness/presented-login.js.map +1 -0
- package/dist/harness/types.d.ts +21 -0
- package/dist/onboarding/contract.d.ts +83 -0
- package/dist/onboarding/contract.js +6 -0
- package/dist/onboarding/contract.js.map +1 -0
- package/dist/onboarding/credentials.d.ts +20 -0
- package/dist/onboarding/credentials.js +43 -0
- package/dist/onboarding/credentials.js.map +1 -0
- package/dist/onboarding/draft.d.ts +38 -0
- package/dist/onboarding/draft.js +110 -0
- package/dist/onboarding/draft.js.map +1 -0
- package/dist/onboarding/finish.d.ts +18 -0
- package/dist/onboarding/finish.js +131 -0
- package/dist/onboarding/finish.js.map +1 -0
- package/dist/onboarding/local.d.ts +9 -0
- package/dist/onboarding/local.js +28 -0
- package/dist/onboarding/local.js.map +1 -0
- package/dist/onboarding/session.d.ts +95 -0
- package/dist/onboarding/session.js +466 -0
- package/dist/onboarding/session.js.map +1 -0
- package/dist/onboarding/terminal.d.ts +24 -0
- package/dist/onboarding/terminal.js +140 -0
- package/dist/onboarding/terminal.js.map +1 -0
- package/dist/onboarding/uploads.d.ts +43 -0
- package/dist/onboarding/uploads.js +115 -0
- package/dist/onboarding/uploads.js.map +1 -0
- package/dist/onboarding/worker.d.ts +9 -0
- package/dist/onboarding/worker.js +173 -0
- package/dist/onboarding/worker.js.map +1 -0
- package/dist/service/control.js +1 -1
- package/dist/service/control.js.map +1 -1
- package/dist/service/host.d.ts +7 -1
- package/dist/service/host.js +73 -4
- package/dist/service/host.js.map +1 -1
- package/dist/service/launcher.d.ts +2 -0
- package/dist/service/launcher.js +2 -1
- package/dist/service/launcher.js.map +1 -1
- package/dist/service/persistence.d.ts +1 -1
- package/dist/service/persistence.js +7 -4
- package/dist/service/persistence.js.map +1 -1
- package/dist/service/records.d.ts +2 -0
- package/dist/service/records.js.map +1 -1
- package/dist/service/spa/app.js +12 -1
- package/dist/service/supervisor.js +2 -1
- package/dist/service/supervisor.js.map +1 -1
- package/dist/service/worker.js +4 -0
- package/dist/service/worker.js.map +1 -1
- package/dist/ui/app-connection.d.ts +8 -1
- package/dist/ui/app-connection.js +20 -3
- package/dist/ui/app-connection.js.map +1 -1
- package/dist/ui/dashboard-pages.js +1 -1
- package/dist/ui/dashboard-pages.js.map +1 -1
- package/dist/ui/dashboard.js +24 -0
- package/dist/ui/dashboard.js.map +1 -1
- package/dist/ui/global-dashboard.d.ts +4 -0
- package/dist/ui/global-dashboard.js +6 -6
- package/dist/ui/global-dashboard.js.map +1 -1
- package/dist/ui/harness-sign-in.js +23 -2
- package/dist/ui/harness-sign-in.js.map +1 -1
- package/dist/ui/prompt-transport.d.ts +7 -2
- package/dist/ui/prompt-transport.js +6 -1
- package/dist/ui/prompt-transport.js.map +1 -1
- package/dist/vendor/PROVENANCE.json +181 -0
- package/dist/vendor/THIRD_PARTY_LICENSES.md +1467 -0
- package/dist/vendor/app-platform.js +44389 -0
- package/dist/vendor/gateway-pages/gateway.css +599 -0
- package/dist/vendor/gateway-pages/gateway.js +373 -0
- package/dist/vendor/gateway-pages/join.html +319 -0
- package/dist/vendor/gateway-pages/next-path.js +36 -0
- package/dist/vendor/gateway-pages/setup.html +376 -0
- package/dist/vendor/gateway-pages/sign-in.html +297 -0
- package/dist/vendor/gateway-pages/simplewebauthn-browser.umd.min.js +2 -0
- package/dist/vendor/gateway-pages/step-up.html +229 -0
- package/package.json +7 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import type { OnboardingSession } from '../../onboarding/session.js';
|
|
2
|
+
import type { Agenda } from '../../engine/agenda.js';
|
|
3
|
+
import { type ContractProblem } from '../../vendor/app-platform.js';
|
|
4
|
+
import type { AppSecurityFacts } from '../connection.js';
|
|
5
|
+
import type { AccessStore, Actor } from '../web/access.js';
|
|
6
|
+
/**
|
|
7
|
+
* Capabilities this engine advertises in `GET /engine` (every route of each works). The core API needs none.
|
|
8
|
+
*
|
|
9
|
+
* @private App engine API
|
|
10
|
+
*/
|
|
11
|
+
export declare const ADVERTISED_CAPABILITIES: readonly {
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly version: number;
|
|
14
|
+
}[];
|
|
15
|
+
/**
|
|
16
|
+
* What the engine API needs from the running engine.
|
|
17
|
+
*
|
|
18
|
+
* @private App engine API
|
|
19
|
+
*/
|
|
20
|
+
export type EngineApiDeps = {
|
|
21
|
+
readonly agenda?: Agenda;
|
|
22
|
+
readonly onboarding?: OnboardingSession;
|
|
23
|
+
readonly projectRoot: string;
|
|
24
|
+
/** The App data directory, where the API keeps its state beside the Books. */
|
|
25
|
+
readonly stateDirectory: string;
|
|
26
|
+
readonly engineId: () => string | undefined;
|
|
27
|
+
readonly hostname: () => string | undefined;
|
|
28
|
+
readonly dashboardUrl: () => string | undefined;
|
|
29
|
+
readonly security: () => AppSecurityFacts | undefined;
|
|
30
|
+
/** `GET /security` → `ui`: the served engine UI (a verified bundle, or the engine's own page) and its last check. */
|
|
31
|
+
readonly ui: () => Record<string, unknown>;
|
|
32
|
+
readonly log?: (text: string, level: 'info' | 'warning' | 'error') => void;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* A contract ID for an engine name: the name itself when it fits the opaque ID pattern, else a readable prefix and a
|
|
36
|
+
* digest.
|
|
37
|
+
*
|
|
38
|
+
* @private App engine API
|
|
39
|
+
*/
|
|
40
|
+
export declare function opaqueIdOf(name: string): string;
|
|
41
|
+
/**
|
|
42
|
+
* The Reborn engine API (`@ptbk/engine-api` v1) over the project's own domain operations: agents are the project's
|
|
43
|
+
* Books (with their origin), chats are its `CHAT` threads with real authors, and members, passkeys and sessions are
|
|
44
|
+
* the gateway's. Every request is validated with the route's strict schemas, authorized by permission (denials change
|
|
45
|
+
* nothing), held to step-up where the route asks for it, and answered with exactly the route's response schema.
|
|
46
|
+
*
|
|
47
|
+
* @private App engine API
|
|
48
|
+
*/
|
|
49
|
+
export declare class EngineApi {
|
|
50
|
+
private readonly deps;
|
|
51
|
+
private readonly startedAt;
|
|
52
|
+
private readonly agentNames;
|
|
53
|
+
private stateOpening?;
|
|
54
|
+
constructor(deps: EngineApiDeps);
|
|
55
|
+
/** Project operations exist only after the regular service takes ownership. */
|
|
56
|
+
private get agenda();
|
|
57
|
+
/** The capabilities available at this stage of the engine's lifecycle. */
|
|
58
|
+
private get capabilities();
|
|
59
|
+
/** Serves one `/api/v1/...` request of a signed-in member. */
|
|
60
|
+
handle(request: Request, actor: Actor, access: AccessStore): Promise<Response>;
|
|
61
|
+
/** The API state, opened on first use (a failed open is retried by the next request). */
|
|
62
|
+
private state;
|
|
63
|
+
/** Validates, authorizes and runs one operation. */
|
|
64
|
+
private dispatch;
|
|
65
|
+
/** A domain error as a contract problem (never with internal details). */
|
|
66
|
+
private problemOf;
|
|
67
|
+
/** The project's agents (content, core and the engine's own) as API agents. */
|
|
68
|
+
private agents;
|
|
69
|
+
/** One API agent from its engine view and Book. */
|
|
70
|
+
private agentOf;
|
|
71
|
+
/** One agent by ID. */
|
|
72
|
+
private agent;
|
|
73
|
+
/** An agent's activity as the contract's status. */
|
|
74
|
+
private agentStatus;
|
|
75
|
+
/** A chat participant from an engine reference. */
|
|
76
|
+
private participant;
|
|
77
|
+
/** A chat's members, the User first. */
|
|
78
|
+
private members;
|
|
79
|
+
/** When a chat's Book was created and last changed. */
|
|
80
|
+
private chatTimes;
|
|
81
|
+
/** A chat summary as the contract's `Chat` (questions from the detail when given, else the unseen pings). */
|
|
82
|
+
private chat;
|
|
83
|
+
/** A participant reference without its display name. */
|
|
84
|
+
private authorRef;
|
|
85
|
+
/** One chat by name with its detail. */
|
|
86
|
+
private chatByName;
|
|
87
|
+
/** One stored message as the contract's `Message`. */
|
|
88
|
+
private message;
|
|
89
|
+
/** A thread's entries, oldest first: every member joins before writing, and a reply in progress streams last. */
|
|
90
|
+
private entries;
|
|
91
|
+
/** The 1-based position of a message ID of a chat, if it is one. */
|
|
92
|
+
private position;
|
|
93
|
+
/** A reply as deterministic deltas, then exactly one `completed` or `failed`. */
|
|
94
|
+
private replyStream;
|
|
95
|
+
/** What the event stream compares between changes. */
|
|
96
|
+
private eventDigest;
|
|
97
|
+
/** Live changes as `agent.status`, `agent.changed` and `chat.changed` events until the client leaves. */
|
|
98
|
+
private eventStream;
|
|
99
|
+
/** The members list entry of the contract. */
|
|
100
|
+
private member;
|
|
101
|
+
/** A passkey as the contract lists it. */
|
|
102
|
+
private passkey;
|
|
103
|
+
/** A session as the contract lists it. */
|
|
104
|
+
private session;
|
|
105
|
+
/** The engine settings the API exposes. */
|
|
106
|
+
private settings;
|
|
107
|
+
/** The security overview: versions, update state, certificate, relays, hostnames, the last heartbeat. */
|
|
108
|
+
private security;
|
|
109
|
+
/** The handlers by route ID. */
|
|
110
|
+
private readonly handlers;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Problems are plain objects; this keeps the type importable for handlers elsewhere.
|
|
114
|
+
*
|
|
115
|
+
* @private App engine API
|
|
116
|
+
*/
|
|
117
|
+
export type EngineApiProblem = ContractProblem;
|