@nyte-ai/sdk 0.0.0-stage → 0.0.18

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.
Files changed (49) hide show
  1. package/LICENSE +21 -0
  2. package/THIRD-PARTY-NOTICES.md +800 -0
  3. package/dist/chunks/capability-2q3s96kg.js +57 -0
  4. package/dist/chunks/capability-2wk9ktc5.js +161 -0
  5. package/dist/chunks/capability-3qe1hz8t.js +78 -0
  6. package/dist/chunks/capability-591c8vr1.js +134 -0
  7. package/dist/chunks/capability-8hmez9nw.js +199 -0
  8. package/dist/chunks/capability-9747w1b1.js +55 -0
  9. package/dist/chunks/capability-artgq59v.js +232 -0
  10. package/dist/chunks/capability-b52hty54.js +17 -0
  11. package/dist/chunks/capability-cdz2rz6h.js +208 -0
  12. package/dist/chunks/capability-esdwn315.js +26 -0
  13. package/dist/chunks/capability-mr5m2wn2.js +6 -0
  14. package/dist/chunks/capability-nh422cp0.js +35 -0
  15. package/dist/chunks/capability-y1amted3.js +230 -0
  16. package/dist/src/capability.d.ts +2 -0
  17. package/dist/src/capability.js +6 -0
  18. package/dist/src/client.d.ts +14 -0
  19. package/dist/src/client.js +14 -0
  20. package/dist/src/connect.d.ts +2 -0
  21. package/dist/src/connect.js +15 -0
  22. package/dist/src/history.d.ts +14 -0
  23. package/dist/src/history.js +7 -0
  24. package/dist/src/index.client.d.ts +10 -0
  25. package/dist/src/index.client.js +57 -0
  26. package/dist/src/index.d.ts +9 -0
  27. package/dist/src/index.js +58 -0
  28. package/dist/src/index.web.d.ts +8 -0
  29. package/dist/src/index.web.js +63 -0
  30. package/dist/src/journal.d.ts +15 -0
  31. package/dist/src/journal.js +9 -0
  32. package/dist/src/login.d.ts +8 -0
  33. package/dist/src/login.js +6 -0
  34. package/dist/src/paint-spans.d.ts +11 -0
  35. package/dist/src/paint-spans.js +6 -0
  36. package/dist/src/part.d.ts +4 -0
  37. package/dist/src/part.js +6 -0
  38. package/dist/src/receipts.d.ts +9 -0
  39. package/dist/src/receipts.js +16 -0
  40. package/dist/src/rows.d.ts +37 -0
  41. package/dist/src/rows.js +12 -0
  42. package/dist/src/surface.d.ts +12 -0
  43. package/dist/src/surface.js +39 -0
  44. package/dist/src/watch.d.ts +30 -0
  45. package/dist/src/watch.js +14 -0
  46. package/dist/src/workspace.d.ts +4 -0
  47. package/dist/src/workspace.js +9 -0
  48. package/package.json +59 -3
  49. package/README.md +0 -3
@@ -0,0 +1,37 @@
1
+ import type { ByteReader, Disposer, HostView, Json, OutputFrame, RequestOptions } from "@nyte-ai/schema";
2
+ import type { ByteName, CallName, Declarations, FrameName, OperationInput, OperationName, OperationOutput, Transport } from "@nyte-ai/protocol";
3
+ type LinkState = HostView["link"];
4
+ type RetryName = {
5
+ [N in OperationName]: Declarations[N] extends {
6
+ readonly wait: true;
7
+ } ? N : Declarations[N] extends {
8
+ readonly recovery: "replay";
9
+ } ? OperationInput<N> extends {
10
+ readonly id: string;
11
+ } ? N : never : never;
12
+ }[OperationName];
13
+ export interface Link {
14
+ current(): LinkState;
15
+ lost(): void;
16
+ restored(): void;
17
+ close(reason: "client" | "revoked" | "host-gone"): void;
18
+ subscribe(listener: (state: LinkState) => void): Disposer;
19
+ readonly signal: AbortSignal;
20
+ }
21
+ export interface Rows {
22
+ readonly link: Link;
23
+ operations(): string | null;
24
+ call<N extends CallName>(name: N, input: OperationInput<N>, options?: RequestOptions): Promise<OperationOutput<N>>;
25
+ wait<N extends RetryName>(name: N, input: OperationInput<N>, options?: RequestOptions): Promise<OperationOutput<N>>;
26
+ upload<N extends CallName>(name: N, input: OperationInput<N>, body: Uint8Array | ReadableStream<Uint8Array>): Promise<OperationOutput<N>>;
27
+ bytes<N extends ByteName>(name: N, input: OperationInput<N>, options?: RequestOptions): Promise<ByteReader>;
28
+ frames<N extends FrameName>(name: N, input: OperationInput<N>): AsyncIterable<OperationOutput<N>>;
29
+ /** Frames that resume across link losses; `opened` is a stream of this watch already open, read before any is opened. */
30
+ watch<N extends FrameName>(name: N, input: OperationInput<N>, opened?: AsyncIterator<Json>): AsyncIterable<OperationOutput<N>>;
31
+ output(input: OperationInput<"job.output">): AsyncIterable<OutputFrame>;
32
+ }
33
+ export declare function createLink(): Link;
34
+ export declare function createRows(transport: Transport, link: Link): Rows;
35
+ export declare function retryDelay(attempts: number): number;
36
+ export declare function backoff(link: Link, ms: number, signal: AbortSignal): Promise<void>;
37
+ export {};
@@ -0,0 +1,12 @@
1
+ import {
2
+ createLink2,
3
+ createRows2,
4
+ retryDelay2,
5
+ backoff2
6
+ } from "../chunks/capability-artgq59v.js";
7
+ export {
8
+ backoff2 as backoff,
9
+ createLink2 as createLink,
10
+ createRows2 as createRows,
11
+ retryDelay2 as retryDelay
12
+ };
@@ -0,0 +1,12 @@
1
+ export type { ActionContext, ActionOutput, ActionSchemas, Agent, Available, BrowserApi, ClientApi, Command, ConnectOptions, Connection, ContributionTable, Decide, Declared, Durable, EnvironmentProvider, EnvironmentWrap, ExecutionEnv, FileBatch, FilesApi, GitApi, GitHubAccountApi, GitHubApi, Head, HookEntry, HookHandler, HookName, HookTable, Host, Job, Jobs, Keybinding, ListenOptions, Listener, Login, McpApi, ModelContextPolicy, ModelsApi, ObjectStore, Observe, OpenOptions, Page, Part, PartActions, PartDefinition, PartState, Plugin, PluginApi, PluginFile, PluginsApi, PluginStorage, PrincipalsApi, PromptSection, Receipt, RefStore, Registries, Registry, RegistryDraft, Renderer, RequestJournal, Resources, Row, Run, SendReceipt, Session, Sessions, Setting, SettingDefinition, SettingsApi, Side, SideTable, Skill, SnapshotsApi, Store, StoreConnection, ToolDefinition, ToolInvocation, Transform, Workspace, Workspaces, } from "@nyte-ai/core";
2
+ export type { ActOutcome, Activation, AddOutcome, AdvanceReport, AgentInfo, Authority, Availability, Awaitable, BackgroundItem, BatchOutcome, BlameView, BlobId, ByteReader, CallId, Capability, CatalogGeneration, ChangeSet, CommandCompletion, CommandInfo, CommandOutcome, CommitBody, CommitId, CompactionPlan, Configuration, ConfigurationPatch, ConfigureOutcome, ConsoleEntry, ContextView, CreateHeadOutcome, CredentialSource, Cursor, Decision, Declaration, DecodedObjectView, Delivery, DiffOptions, Disposer, DocumentRevision, DurableEvent, EndReason, EnvironmentIdentity, ExcerptSource, Execution, Failure, ExecutionCoverage, FileDocument, FileEntryView, FileEvent, FileStatus, FileVersion, ForgetOutcome, FormatOutcome, GitCommitId, GitOutcome, GitRefsView, GitRevision, GitScope, GitStatus, GitWrite, GitHubAccount, GitHubAccountState, GitHubCheck, GitHubDeviceCode, GitHubPullRequest, GitHubPullRequestContext, GitHubPullRequestInput, GitHubPullRequestOutcome, GitHubRepository, GitHubState, HeadInfo, HeadName, HostDescription, HostId, HostView, Hunk, Id, IdentityChallenge, Infer, IntegrityReport, JobEnd, JobId, JobKey, JobState, JobView, JournalEntry, Json, LineStat, LoginMethod, McpChange, McpExposure, McpExposureName, McpOAuthConfig, McpScope, McpServerConfig, McpServerState, McpServerView, McpToolView, McpView, MergeOutcome, Message, MessageId, MessageSource, ModelAccount, ModelCatalogView, ModelInfo, ModelRef, ModelRequest, ModelRequestInput, ModelRequestOutcome, MoveOptions, MoveOutcome, ObjectId, OutputFrame, Owned, PageId, PageOutcome, PageSnapshot, PageView, Paged, ParentFilter, PartId, PartStatus, PartView, PatchEntry, PatchEvent, PatchSet, Placement, PluginCheckReport, PluginLoadOutcome, PluginReplacementReport, Position, PrincipalId, PrincipalView, PromptOverride, ProviderUsage, ReceiptId, Ref, RefUpdate, RemoveHeadOutcome, RemoveSessionOutcome, RepairPage, RequestOptions, Revision, RunEnd, RunId, RunView, ScanFrame, Schedule, SdkErrorCode, Schema, SearchFrame, SearchInput, SendOptions, Seq, SessionCatalogView, SessionEvent, SessionId, SessionInfo, SessionView, SetOutcome, SettingInfo, SettingOutcome, SkillInfo, SnapshotId, StopOutcome, Submission, SubmitDraft, Thinking, ToolCall, ToolClass, ToolContent, ToolInfo, ToolOutcome, ToolPartState, ToolProgress, ToolResult, Transcript, TreeNode, TreeView, TurnId, TurnInfo, UpdateOutcome, Usage, UserContent, UserStatus, ValidationIssue, ViewOptions, WaitOutcome, WaitTarget, WorkspaceCatalogView, WorkspaceCommandOutcome, WorkspaceId, WorkspaceInfo, WorkspaceInspection, WorkspaceTarget, WriteOutcome, } from "@nyte-ai/schema";
3
+ export { dev, watchStore } from "@nyte-ai/core";
4
+ export type { WatchStore } from "@nyte-ai/core";
5
+ export { clearSpans, enableTracing, followTrace, followedTrace, readSpans, SPAN_NAMES, startSpan, traced, tracing, } from "@nyte-ai/core";
6
+ export type { EndSpan, Span, SpanDetail, SpanName } from "@nyte-ai/core";
7
+ export { SdkError } from "@nyte-ai/schema";
8
+ export { operationsDigest } from "@nyte-ai/protocol";
9
+ export { pagedViews } from "./history.ts";
10
+ export { tracePaints } from "./paint-spans.ts";
11
+ export type { PagedViews } from "./history.ts";
12
+ export type { DevRow } from "@nyte-ai/core";
@@ -0,0 +1,39 @@
1
+ import {
2
+ dev2,
3
+ watchStore2,
4
+ clearSpans2,
5
+ enableTracing2,
6
+ followTrace2,
7
+ followedTrace2,
8
+ readSpans2,
9
+ SPAN_NAMES2,
10
+ startSpan2,
11
+ traced2,
12
+ tracing2,
13
+ SdkError2,
14
+ operationsDigest2
15
+ } from "../chunks/capability-b52hty54.js";
16
+ import {
17
+ tracePaints2
18
+ } from "../chunks/capability-esdwn315.js";
19
+ import {
20
+ pagedViews2
21
+ } from "../chunks/capability-3qe1hz8t.js";
22
+ import"../chunks/capability-8hmez9nw.js";
23
+ export {
24
+ SPAN_NAMES2 as SPAN_NAMES,
25
+ SdkError2 as SdkError,
26
+ clearSpans2 as clearSpans,
27
+ dev2 as dev,
28
+ enableTracing2 as enableTracing,
29
+ followTrace2 as followTrace,
30
+ followedTrace2 as followedTrace,
31
+ operationsDigest2 as operationsDigest,
32
+ pagedViews2 as pagedViews,
33
+ readSpans2 as readSpans,
34
+ startSpan2 as startSpan,
35
+ tracePaints2 as tracePaints,
36
+ traced2 as traced,
37
+ tracing2 as tracing,
38
+ watchStore2 as watchStore
39
+ };
@@ -0,0 +1,30 @@
1
+ import type { Disposer, HeadName, HostView, Json, Message, SessionId, SessionView, ViewOptions } from "@nyte-ai/schema";
2
+ import type { JournalLoop } from "./journal.ts";
3
+ import type { Rows } from "./rows.ts";
4
+ export type Sink<T> = {
5
+ next(value: T): void;
6
+ end(): void;
7
+ fail(error: Error): void;
8
+ };
9
+ interface ViewHold {
10
+ view(): SessionView | null;
11
+ subscribe(sink: Sink<SessionView>): Disposer;
12
+ }
13
+ /** Returns the client's open `head.watch`es, one per head and tail, each closed when its last watcher leaves. */
14
+ export interface HeadViews {
15
+ acquire(session: SessionId, head: HeadName, options?: ViewOptions): ViewHold;
16
+ }
17
+ /** Returns the head watches of one client over `rows`: a hold applies the host's frames in order, a reconnect starting again from the whole view the host sends. */
18
+ export declare function createHeadViews(rows: Rows): HeadViews;
19
+ /** Returns a head's views from its shared hold, each with the journal's unsent messages for the head merged in. */
20
+ export declare function watchHead(views: HeadViews, journal: JournalLoop, input: {
21
+ readonly session: SessionId;
22
+ readonly head: HeadName;
23
+ readonly options?: ViewOptions;
24
+ }): AsyncIterable<SessionView>;
25
+ /** Returns the host's views, continuing `opened` when connecting left its `connection.watch` open. */
26
+ export declare function watchHost(rows: Rows, opened?: AsyncIterator<Json>): AsyncIterable<HostView>;
27
+ export declare function withUnsent(view: SessionView, unsent: readonly Message[], known: (id: Message["id"]) => boolean): SessionView;
28
+ /** Returns an iterable over what `start` pushes into its sink, the latest value kept while nobody pulls; its disposer runs when the iteration ends. */
29
+ export declare function pushed<T>(start: (sink: Sink<T>) => () => void): AsyncIterable<T>;
30
+ export {};
@@ -0,0 +1,14 @@
1
+ import {
2
+ createHeadViews2,
3
+ watchHead2,
4
+ watchHost2,
5
+ withUnsent2,
6
+ pushed2
7
+ } from "../chunks/capability-8hmez9nw.js";
8
+ export {
9
+ createHeadViews2 as createHeadViews,
10
+ pushed2 as pushed,
11
+ watchHead2 as watchHead,
12
+ watchHost2 as watchHost,
13
+ withUnsent2 as withUnsent
14
+ };
@@ -0,0 +1,4 @@
1
+ import type { WorkspaceId } from "@nyte-ai/schema";
2
+ import type { Workspace } from "@nyte-ai/core";
3
+ import type { Rows } from "./rows.ts";
4
+ export declare function workspaceHandle(rows: Rows, workspace: WorkspaceId): Workspace;
@@ -0,0 +1,9 @@
1
+ import {
2
+ workspaceHandle2
3
+ } from "../chunks/capability-y1amted3.js";
4
+ import"../chunks/capability-nh422cp0.js";
5
+ import"../chunks/capability-2q3s96kg.js";
6
+ import"../chunks/capability-mr5m2wn2.js";
7
+ export {
8
+ workspaceHandle2 as workspaceHandle
9
+ };
package/package.json CHANGED
@@ -1,6 +1,62 @@
1
1
  {
2
2
  "name": "@nyte-ai/sdk",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.0.18",
4
+ "private": false,
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/interfaces-lab/nyte.git",
9
+ "directory": "packages/sdk"
10
+ },
11
+ "files": [
12
+ "dist",
13
+ "LICENSE",
14
+ "THIRD-PARTY-NOTICES.md"
15
+ ],
16
+ "type": "module",
17
+ "exports": {
18
+ ".": {
19
+ "react-native": {
20
+ "types": "./dist/src/index.web.d.ts",
21
+ "import": "./dist/src/index.web.js"
22
+ },
23
+ "browser": {
24
+ "types": "./dist/src/index.web.d.ts",
25
+ "import": "./dist/src/index.web.js"
26
+ },
27
+ "default": {
28
+ "types": "./dist/src/index.d.ts",
29
+ "import": "./dist/src/index.js"
30
+ }
31
+ },
32
+ "./client": {
33
+ "types": "./dist/src/index.client.d.ts",
34
+ "import": "./dist/src/index.client.js"
35
+ }
36
+ },
37
+ "publishConfig": {
38
+ "access": "public",
39
+ "provenance": true
40
+ },
41
+ "dependencies": {
42
+ "@nyte-ai/core": "0.0.18",
43
+ "@nyte-ai/host": "0.0.18",
44
+ "@nyte-ai/protocol": "0.0.18",
45
+ "@nyte-ai/schema": "0.0.18"
46
+ },
47
+ "devDependencies": {
48
+ "@nyte-ai/bench": "0.0.0",
49
+ "@types/node": "^26.6.5",
50
+ "typescript": "6.0.3",
51
+ "vitest": "^5.0.5"
52
+ },
53
+ "engines": {
54
+ "node": ">=26.4.0"
55
+ },
56
+ "scripts": {
57
+ "clean": "rm -rf node_modules .turbo",
58
+ "typecheck": "tsgo --noEmit && tsgo --noEmit -p tsconfig.web.json",
59
+ "test": "vitest --run",
60
+ "build:package": "bun ../../scripts/sdk-packages.mjs build sdk"
61
+ }
6
62
  }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.