@kehto/paja 0.26.1 → 0.27.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 +1 -1
- package/dist/browser-host.js +369 -70
- package/dist/browser-host.js.map +1 -1
- package/dist/{chunk-EYSQOKVF.js → chunk-M5ZFET3T.js} +14 -10
- package/dist/{chunk-EYSQOKVF.js.map → chunk-M5ZFET3T.js.map} +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +17 -11
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { Filter } from 'nostr-tools/filter';
|
|
|
5
5
|
import { ResolvedNapplet } from '@kehto/nip/5d';
|
|
6
6
|
import { ShellCapabilities, NormalizedIntentUri } from '@kehto/shell';
|
|
7
7
|
export { NappletCspDirective, NappletCspDirectives, NappletCspOptions } from '@kehto/shell';
|
|
8
|
-
import { IntentCatalogEntry, IntentTargetController, IntentDispatchParams, IntentTargetAcceptance, LlmProviderProtocol, LlmCredentialHeader, LlmConnectionHost,
|
|
8
|
+
import { IntentCatalogEntry, IntentTargetController, IntentDispatchParams, IntentTargetAcceptance, LlmRequirements, LlmProviderProtocol, LlmCredentialHeader, LlmConnectionHost, HttpLlmProvider } from '@kehto/services';
|
|
9
9
|
import { NostrEvent as NostrEvent$1 } from '@napplet/core';
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -591,6 +591,8 @@ type PajaConfirmationRequest = ({
|
|
|
591
591
|
readonly description: string;
|
|
592
592
|
}) & {
|
|
593
593
|
readonly isCurrent?: () => boolean;
|
|
594
|
+
/** Withdraws the request: a queued prompt is dropped and an open dialog closes as denied. */
|
|
595
|
+
readonly signal?: AbortSignal;
|
|
594
596
|
};
|
|
595
597
|
|
|
596
598
|
/** Async-capable host policy callback for user-visible Paja operations. */
|
|
@@ -737,21 +739,25 @@ interface PajaLlmHostOptions {
|
|
|
737
739
|
vault: PajaLlmVault;
|
|
738
740
|
/** Host confirmation dialog shared with signer, upload and other operations. */
|
|
739
741
|
confirm: PajaConfirmationHandler;
|
|
740
|
-
/** Show the connection chooser; resolve null when the user declines. */
|
|
741
|
-
chooseConnection(candidates: readonly PajaLlmConnectionRecord[], context:
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
requirements: LlmRequirements;
|
|
745
|
-
}): Promise<PajaLlmConnectionRecord | null>;
|
|
746
|
-
/** Ask for the vault password; resolve null when the user cancels. */
|
|
747
|
-
requestUnlock(): Promise<boolean>;
|
|
742
|
+
/** Show the connection chooser; resolve null when the user declines or `context.signal` aborts. */
|
|
743
|
+
chooseConnection(candidates: readonly PajaLlmConnectionRecord[], context: PajaLlmChooserContext): Promise<PajaLlmConnectionRecord | null>;
|
|
744
|
+
/** Ask for the vault password; resolve false when the user cancels or `signal` aborts. */
|
|
745
|
+
requestUnlock(signal?: AbortSignal): Promise<boolean>;
|
|
748
746
|
/** Reveal and focus the Language models panel. */
|
|
749
747
|
openPanel(): void;
|
|
750
748
|
/** Resolve the napplet identity bound to a runtime window. */
|
|
751
749
|
getIdentity(windowId: string): PajaLlmRequestIdentity;
|
|
752
|
-
/** Provider transport; defaults to the fetch-based provider. */
|
|
750
|
+
/** Provider transport; defaults to the streaming fetch-based provider. */
|
|
753
751
|
provider?: HttpLlmProvider;
|
|
754
752
|
}
|
|
753
|
+
/** What the connection chooser shows for one `llm.select`. */
|
|
754
|
+
interface PajaLlmChooserContext {
|
|
755
|
+
readonly windowId: string;
|
|
756
|
+
readonly napplet: PajaLlmRequestIdentity;
|
|
757
|
+
readonly requirements: LlmRequirements;
|
|
758
|
+
/** Aborts when the selection settles without the user's answer; close the chooser. */
|
|
759
|
+
readonly signal?: AbortSignal;
|
|
760
|
+
}
|
|
755
761
|
/** Paja's NAP-LLM host plus the configuration probe the shell adapter needs. */
|
|
756
762
|
interface PajaLlmHost extends LlmConnectionHost {
|
|
757
763
|
/** True when at least one connection exists. */
|
|
@@ -842,4 +848,4 @@ type PajaTargetCorsFetch = (input: string, init: {
|
|
|
842
848
|
*/
|
|
843
849
|
declare function probeTargetCors(targetUrl: string, fetchImpl?: PajaTargetCorsFetch): Promise<PajaTargetCorsDiagnostic>;
|
|
844
850
|
|
|
845
|
-
export { BrowserIntentController, type BrowserIntentControllerOptions, type BrowserIntentGeneration, type BrowserIntentTerminalReason, InstalledNappletCatalog, type InstalledNappletCatalogListener, type InstalledNappletRecord, PAJA_ADVERTISED_DOMAINS, PAJA_COMPATIBILITY_ALIASES, PAJA_HANDSHAKE_DOMAINS, PAJA_LLM_CONNECTIONS_STORAGE_KEY, PAJA_LLM_VAULT_MIN_PASSWORD_LENGTH, PAJA_LLM_VAULT_STORAGE_KEY, PAJA_LOCAL_SINGLE_FILE_HINT, PAJA_NAPPLET_MANIFEST_KIND, PAJA_NAPPLET_MANIFEST_KINDS, PAJA_REQUIRED_SERVICES, PAJA_TARGET_CORS_HINT, PAJA_UPSTREAM_WEB_DOMAINS, type PajaConfirmationHandler, type PajaConfirmationRequest, type PajaDecodedPointer, PajaHostConfig, type PajaIntentLauncherMessage, type PajaIntentLinkDescriptor, type PajaLlmConnectionRecord, type PajaLlmConnectionStore, type PajaLlmCredentialStorage, type PajaLlmHost, type PajaLlmHostOptions, type PajaLlmRequestIdentity, type PajaLlmVault, type PajaLlmVaultCrypto, type PajaLlmVaultOptions, type PajaLocalFileInput, type PajaLocalTarget, type PajaPointerRelayPool, PajaRawOptions, type PajaResolvedPointer, type PajaRuntimeTarget, type PajaSignerRequestContext, type PajaSignerSource, type PajaTargetCorsDiagnostic, type PajaTargetCorsFetch, type PajaTargetCorsStatus, type ParsedPajaIntentLink, type ResolvePajaPointerOptions, classifyTargetCors, createPajaIntentLink, createPajaLlmConnectionStore, createPajaLlmHost, createPajaLlmVault, createPajaLocalTarget, decodePajaPointer, describePajaLlmRoute, findRelativeAssetReferences, getMissingAdvertisedDomains, getMissingServices, injectPajaRuntimeCsp, isPajaLocalHtmlFile, isPajaLocalTarget, loadPajaConfigFile, mergePajaRawOptions, normalizePajaLlmBaseUrl, parsePajaIntentLink, postPajaIntentLauncherMessage, probeTargetCors, readNappletIdMeta, renderPajaHtml, resolvePajaIntentLauncher, resolvePajaPointer, resolvePajaRawOptions, validatePajaLlmVaultPassword };
|
|
851
|
+
export { BrowserIntentController, type BrowserIntentControllerOptions, type BrowserIntentGeneration, type BrowserIntentTerminalReason, InstalledNappletCatalog, type InstalledNappletCatalogListener, type InstalledNappletRecord, PAJA_ADVERTISED_DOMAINS, PAJA_COMPATIBILITY_ALIASES, PAJA_HANDSHAKE_DOMAINS, PAJA_LLM_CONNECTIONS_STORAGE_KEY, PAJA_LLM_VAULT_MIN_PASSWORD_LENGTH, PAJA_LLM_VAULT_STORAGE_KEY, PAJA_LOCAL_SINGLE_FILE_HINT, PAJA_NAPPLET_MANIFEST_KIND, PAJA_NAPPLET_MANIFEST_KINDS, PAJA_REQUIRED_SERVICES, PAJA_TARGET_CORS_HINT, PAJA_UPSTREAM_WEB_DOMAINS, type PajaConfirmationHandler, type PajaConfirmationRequest, type PajaDecodedPointer, PajaHostConfig, type PajaIntentLauncherMessage, type PajaIntentLinkDescriptor, type PajaLlmChooserContext, type PajaLlmConnectionRecord, type PajaLlmConnectionStore, type PajaLlmCredentialStorage, type PajaLlmHost, type PajaLlmHostOptions, type PajaLlmRequestIdentity, type PajaLlmVault, type PajaLlmVaultCrypto, type PajaLlmVaultOptions, type PajaLocalFileInput, type PajaLocalTarget, type PajaPointerRelayPool, PajaRawOptions, type PajaResolvedPointer, type PajaRuntimeTarget, type PajaSignerRequestContext, type PajaSignerSource, type PajaTargetCorsDiagnostic, type PajaTargetCorsFetch, type PajaTargetCorsStatus, type ParsedPajaIntentLink, type ResolvePajaPointerOptions, classifyTargetCors, createPajaIntentLink, createPajaLlmConnectionStore, createPajaLlmHost, createPajaLlmVault, createPajaLocalTarget, decodePajaPointer, describePajaLlmRoute, findRelativeAssetReferences, getMissingAdvertisedDomains, getMissingServices, injectPajaRuntimeCsp, isPajaLocalHtmlFile, isPajaLocalTarget, loadPajaConfigFile, mergePajaRawOptions, normalizePajaLlmBaseUrl, parsePajaIntentLink, postPajaIntentLauncherMessage, probeTargetCors, readNappletIdMeta, renderPajaHtml, resolvePajaIntentLauncher, resolvePajaPointer, resolvePajaRawOptions, validatePajaLlmVaultPassword };
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kehto/paja",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"description": "Paja local authoring workshop for hosting napplets in a real Kehto iframe during development",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@kehto/firewall": "^0.6.2",
|
|
30
30
|
"@kehto/nip": "^0.8.0",
|
|
31
31
|
"@kehto/runtime": "^0.27.1",
|
|
32
|
-
"@kehto/services": "^0.
|
|
32
|
+
"@kehto/services": "^0.28.0",
|
|
33
33
|
"@kehto/shell": "^0.26.1",
|
|
34
34
|
"@kehto/wm": "^0.0.2"
|
|
35
35
|
},
|