@semiont/sdk 0.5.3 → 0.5.4

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 (79) hide show
  1. package/dist/awaitable.d.ts +103 -0
  2. package/dist/awaitable.d.ts.map +1 -0
  3. package/dist/bus-request.d.ts +18 -0
  4. package/dist/bus-request.d.ts.map +1 -0
  5. package/dist/cache.d.ts +57 -0
  6. package/dist/cache.d.ts.map +1 -0
  7. package/dist/client.d.ts +138 -0
  8. package/dist/client.d.ts.map +1 -0
  9. package/dist/index.d.ts +52 -1750
  10. package/dist/index.d.ts.map +1 -0
  11. package/dist/index.js +0 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/namespaces/admin.d.ts +27 -0
  14. package/dist/namespaces/admin.d.ts.map +1 -0
  15. package/dist/namespaces/auth.d.ts +26 -0
  16. package/dist/namespaces/auth.d.ts.map +1 -0
  17. package/dist/namespaces/beckon.d.ts +12 -0
  18. package/dist/namespaces/beckon.d.ts.map +1 -0
  19. package/dist/namespaces/bind.d.ts +11 -0
  20. package/dist/namespaces/bind.d.ts.map +1 -0
  21. package/dist/namespaces/browse.d.ts +111 -0
  22. package/dist/namespaces/browse.d.ts.map +1 -0
  23. package/dist/namespaces/frame.d.ts +29 -0
  24. package/dist/namespaces/frame.d.ts.map +1 -0
  25. package/dist/namespaces/gather.d.ts +16 -0
  26. package/dist/namespaces/gather.d.ts.map +1 -0
  27. package/dist/namespaces/job.d.ts +32 -0
  28. package/dist/namespaces/job.d.ts.map +1 -0
  29. package/dist/namespaces/mark.d.ts +27 -0
  30. package/dist/namespaces/mark.d.ts.map +1 -0
  31. package/dist/namespaces/match.d.ts +15 -0
  32. package/dist/namespaces/match.d.ts.map +1 -0
  33. package/dist/namespaces/types.d.ts +438 -0
  34. package/dist/namespaces/types.d.ts.map +1 -0
  35. package/dist/namespaces/yield.d.ts +23 -0
  36. package/dist/namespaces/yield.d.ts.map +1 -0
  37. package/dist/session/errors.d.ts +18 -0
  38. package/dist/session/errors.d.ts.map +1 -0
  39. package/dist/session/http-session-factory.d.ts +15 -0
  40. package/dist/session/http-session-factory.d.ts.map +1 -0
  41. package/dist/session/knowledge-base.d.ts +95 -0
  42. package/dist/session/knowledge-base.d.ts.map +1 -0
  43. package/dist/session/open-resource.d.ts +22 -0
  44. package/dist/session/open-resource.d.ts.map +1 -0
  45. package/dist/session/registry.d.ts +31 -0
  46. package/dist/session/registry.d.ts.map +1 -0
  47. package/dist/session/semiont-browser.d.ts +141 -0
  48. package/dist/session/semiont-browser.d.ts.map +1 -0
  49. package/dist/session/semiont-session.d.ts +210 -0
  50. package/dist/session/semiont-session.d.ts.map +1 -0
  51. package/dist/session/session-factory.d.ts +31 -0
  52. package/dist/session/session-factory.d.ts.map +1 -0
  53. package/dist/session/session-signals.d.ts +40 -0
  54. package/dist/session/session-signals.d.ts.map +1 -0
  55. package/dist/session/session-storage.d.ts +41 -0
  56. package/dist/session/session-storage.d.ts.map +1 -0
  57. package/dist/session/storage.d.ts +52 -0
  58. package/dist/session/storage.d.ts.map +1 -0
  59. package/dist/session/testing.d.ts +7 -0
  60. package/dist/session/testing.d.ts.map +1 -0
  61. package/dist/state/flows/beckon-state-unit.d.ts +22 -0
  62. package/dist/state/flows/beckon-state-unit.d.ts.map +1 -0
  63. package/dist/state/flows/gather-state-unit.d.ts +12 -0
  64. package/dist/state/flows/gather-state-unit.d.ts.map +1 -0
  65. package/dist/state/flows/mark-state-unit.d.ts +17 -0
  66. package/dist/state/flows/mark-state-unit.d.ts.map +1 -0
  67. package/dist/state/flows/match-state-unit.d.ts +7 -0
  68. package/dist/state/flows/match-state-unit.d.ts.map +1 -0
  69. package/dist/state/flows/yield-state-unit.d.ts +25 -0
  70. package/dist/state/flows/yield-state-unit.d.ts.map +1 -0
  71. package/dist/state/index.d.ts +10 -0
  72. package/dist/state/index.d.ts.map +1 -0
  73. package/dist/state/lib/search-pipeline.d.ts +38 -0
  74. package/dist/state/lib/search-pipeline.d.ts.map +1 -0
  75. package/dist/state/lib/state-unit.d.ts +33 -0
  76. package/dist/state/lib/state-unit.d.ts.map +1 -0
  77. package/dist/state/lib/worker-bus.d.ts +21 -0
  78. package/dist/state/lib/worker-bus.d.ts.map +1 -0
  79. package/package.json +3 -3
@@ -0,0 +1,27 @@
1
+ /**
2
+ * AdminNamespace — administration. Backend ops only; no bus.
3
+ */
4
+ import type { UserDID, ProgressEvent, components, paths } from '@semiont/core';
5
+ import type { BackendDownload, IBackendOperations } from '@semiont/core';
6
+ import { StreamObservable } from '../awaitable';
7
+ import type { AdminNamespace as IAdminNamespace, User, RequestContent, ResponseContent } from './types';
8
+ type AdminUserStatsResponse = components['schemas']['AdminUserStatsResponse'];
9
+ type OAuthConfigResponse = components['schemas']['OAuthConfigResponse'];
10
+ export declare class AdminNamespace implements IAdminNamespace {
11
+ private readonly backend;
12
+ constructor(backend: IBackendOperations);
13
+ users(): Promise<User[]>;
14
+ userStats(): Promise<AdminUserStatsResponse>;
15
+ updateUser(userId: UserDID, data: RequestContent<paths['/api/admin/users/{id}']['patch']>): Promise<User>;
16
+ oauthConfig(): Promise<OAuthConfigResponse>;
17
+ healthCheck(): Promise<ResponseContent<paths['/api/health']['get']>>;
18
+ status(): Promise<ResponseContent<paths['/api/status']['get']>>;
19
+ backup(): Promise<BackendDownload>;
20
+ restore(file: File): StreamObservable<ProgressEvent>;
21
+ exportKnowledgeBase(params?: {
22
+ includeArchived?: boolean;
23
+ }): Promise<BackendDownload>;
24
+ importKnowledgeBase(file: File): StreamObservable<ProgressEvent>;
25
+ }
26
+ export {};
27
+ //# sourceMappingURL=admin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../src/namespaces/admin.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,KAAK,EAAE,e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E"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * AuthNamespace — authentication. Backend ops only; no bus.
3
+ */
4
+ import type { ResourceId, components } from '@semiont/core';
5
+ import type { IBackendOperations } from '@semiont/core';
6
+ import type { AuthNamespace as IAuthNamespace, User } from './types';
7
+ type AuthResponse = components['schemas']['AuthResponse'];
8
+ type TokenRefreshResponse = components['schemas']['TokenRefreshResponse'];
9
+ export declare class AuthNamespace implements IAuthNamespace {
10
+ private readonly backend;
11
+ constructor(backend: IBackendOperations);
12
+ password(emailStr: string, passwordStr: string): Promise<AuthResponse>;
13
+ google(credential: string): Promise<AuthResponse>;
14
+ refresh(token: string): Promise<TokenRefreshResponse>;
15
+ logout(): Promise<void>;
16
+ me(): Promise<User>;
17
+ acceptTerms(): Promise<void>;
18
+ mcpToken(): Promise<{
19
+ token: string;
20
+ }>;
21
+ mediaToken(resourceId: ResourceId): Promise<{
22
+ token: string;
23
+ }>;
24
+ }
25
+ export {};
26
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/namespaces/auth.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,IAAI,cAAc,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAErE,KAAK,YAAY,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,cAAc,CAAC,CAAC;AAC1D,KAAK,oBAAoB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,sBAAsB,CAAC,CAAC;AAE1E,qBAAa,aAAc,YAAW,cAAc;IACtC,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,kBAAkB;IAElD,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAItE,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAIjD,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAIrD,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAIvB,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAInB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B,QAAQ,IAAI,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAItC,UAAU,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CAGrE"}
@@ -0,0 +1,12 @@
1
+ import type { AnnotationId, EventBus, ResourceId } from '@semiont/core';
2
+ import type { ITransport } from '@semiont/core';
3
+ import type { BeckonNamespace as IBeckonNamespace } from './types';
4
+ export declare class BeckonNamespace implements IBeckonNamespace {
5
+ private readonly transport;
6
+ private readonly bus;
7
+ constructor(transport: ITransport, bus: EventBus);
8
+ attention(resourceId: ResourceId, annotationId: AnnotationId): void;
9
+ hover(annotationId: AnnotationId | null): void;
10
+ sparkle(annotationId: AnnotationId): void;
11
+ }
12
+ //# sourceMappingURL=beckon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"beckon.d.ts","sourceRoot":"","sources":["../../src/namespaces/beckon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,IAAI,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEnE,qBAAa,eAAgB,YAAW,gBAAgB;IAEpD,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,GAAG;gBADH,SAAS,EAAE,UAAU,EACrB,GAAG,EAAE,QAAQ;IAGhC,SAAS,CAAC,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,GAAG,IAAI;IAInE,KAAK,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,GAAG,IAAI;IAK9C,OAAO,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI;CAG1C"}
@@ -0,0 +1,11 @@
1
+ import type { ResourceId, AnnotationId, BodyOperation, EventBus, EventMap } from '@semiont/core';
2
+ import type { ITransport } from '@semiont/core';
3
+ import type { BindNamespace as IBindNamespace } from './types';
4
+ export declare class BindNamespace implements IBindNamespace {
5
+ private readonly transport;
6
+ private readonly bus;
7
+ constructor(transport: ITransport, bus: EventBus);
8
+ body(resourceId: ResourceId, annotationId: AnnotationId, operations: BodyOperation[]): Promise<void>;
9
+ initiate(input: EventMap['bind:initiate']): void;
10
+ }
11
+ //# sourceMappingURL=bind.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bind.d.ts","sourceRoot":"","sources":["../../src/namespaces/bind.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACjG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,IAAI,cAAc,EAAE,MAAM,SAAS,CAAC;AAE/D,qBAAa,aAAc,YAAW,cAAc;IAEhD,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,GAAG;gBADH,SAAS,EAAE,UAAU,EACrB,GAAG,EAAE,QAAQ;IAG1B,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAS1G,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,eAAe,CAAC,GAAG,IAAI;CAIjD"}
@@ -0,0 +1,111 @@
1
+ import { CacheObservable } from '../awaitable';
2
+ import type { Annotation, EventBus, ResourceDescriptor, ResourceId, AnnotationId, GraphConnection, Motivation, TagSchema, components } from '@semiont/core';
3
+ import type { ITransport, IContentTransport } from '@semiont/core';
4
+ import type { BrowseNamespace as IBrowseNamespace, ReferencedByEntry, AnnotationHistoryResponse } from './types';
5
+ type StoredEventResponse = components['schemas']['StoredEventResponse'];
6
+ type ResourceListFilters = {
7
+ limit?: number;
8
+ archived?: boolean;
9
+ search?: string;
10
+ };
11
+ export declare class BrowseNamespace implements IBrowseNamespace {
12
+ private readonly transport;
13
+ private readonly bus;
14
+ private readonly content;
15
+ private readonly resourceCache;
16
+ private readonly resourceListCache;
17
+ private readonly annotationListCache;
18
+ /**
19
+ * Annotation-detail cache keyed by `annotationId` only — the resourceId
20
+ * is a routing hint for the backend fetch, not an identity component.
21
+ * We track the most recent resourceId per annotationId in a side-map
22
+ * so `mark:delete-ok` (which carries only `annotationId`) can reach
23
+ * the right cache entry. Aligns with the pre-refactor semantics.
24
+ */
25
+ private readonly annotationDetailCache;
26
+ private readonly annotationResources;
27
+ private readonly entityTypesCache;
28
+ private readonly tagSchemasCache;
29
+ private readonly referencedByCache;
30
+ private readonly resourceEventsCache;
31
+ /** Filter-blob memory so `invalidateResourceLists` can replay per-key. */
32
+ private readonly resourceListFilters;
33
+ /**
34
+ * Per-key memo for `annotations()` observables. The cache stores the
35
+ * full `AnnotationsListResponse`; the public shape is just the inner
36
+ * `Annotation[]`. Without this memo, every call to `annotations(rId)`
37
+ * would produce a fresh `.pipe(map(...))` observable, violating B4
38
+ * (per-key observable stability). Consumers that compare observable
39
+ * identity — React hooks depending on the observable reference,
40
+ * `distinctUntilChanged` at a higher level — would misbehave.
41
+ */
42
+ private readonly annotationListObs;
43
+ constructor(transport: ITransport, bus: EventBus, content: IContentTransport);
44
+ resource(resourceId: ResourceId): CacheObservable<ResourceDescriptor>;
45
+ resources(filters?: ResourceListFilters): CacheObservable<ResourceDescriptor[]>;
46
+ annotations(resourceId: ResourceId): CacheObservable<Annotation[]>;
47
+ annotation(resourceId: ResourceId, annotationId: AnnotationId): CacheObservable<Annotation>;
48
+ entityTypes(): CacheObservable<string[]>;
49
+ tagSchemas(): CacheObservable<TagSchema[]>;
50
+ referencedBy(resourceId: ResourceId): CacheObservable<ReferencedByEntry[]>;
51
+ events(resourceId: ResourceId): CacheObservable<StoredEventResponse[]>;
52
+ resourceContent(resourceId: ResourceId): Promise<string>;
53
+ resourceRepresentation(resourceId: ResourceId, options?: {
54
+ accept?: string;
55
+ }): Promise<{
56
+ data: ArrayBuffer;
57
+ contentType: string;
58
+ }>;
59
+ resourceRepresentationStream(resourceId: ResourceId, options?: {
60
+ accept?: string;
61
+ }): Promise<{
62
+ stream: ReadableStream<Uint8Array>;
63
+ contentType: string;
64
+ }>;
65
+ resourceEvents(resourceId: ResourceId): Promise<StoredEventResponse[]>;
66
+ annotationHistory(resourceId: ResourceId, annotationId: AnnotationId): Promise<AnnotationHistoryResponse>;
67
+ connections(_resourceId: ResourceId): Promise<GraphConnection[]>;
68
+ backlinks(_resourceId: ResourceId): Promise<Annotation[]>;
69
+ resourcesByName(_query: string, _limit?: number): Promise<ResourceDescriptor[]>;
70
+ files(dirPath?: string, sort?: 'name' | 'mtime' | 'annotationCount'): Promise<components['schemas']['BrowseFilesResponse']>;
71
+ click(annotationId: AnnotationId, motivation: Motivation): void;
72
+ navigateReference(resourceId: ResourceId): void;
73
+ invalidateAnnotationList(resourceId: ResourceId): void;
74
+ removeAnnotationDetail(annotationId: AnnotationId): void;
75
+ invalidateResourceDetail(id: ResourceId): void;
76
+ invalidateResourceLists(): void;
77
+ invalidateEntityTypes(): void;
78
+ invalidateTagSchemas(): void;
79
+ invalidateReferencedBy(resourceId: ResourceId): void;
80
+ invalidateResourceEvents(resourceId: ResourceId): void;
81
+ updateAnnotationInPlace(resourceId: ResourceId, annotation: Annotation): void;
82
+ /**
83
+ * Typed shorthand for `eventBus.get(channel).subscribe(handler)`.
84
+ * Preserves per-channel payload typing so handlers read
85
+ * `EventMap[K]` without any casts.
86
+ */
87
+ private on;
88
+ /**
89
+ * Handler shared by `mark:entity-tag-added` and `mark:entity-tag-removed`.
90
+ * Both events carry the same effect: the annotation list, the
91
+ * resource descriptor, and the event log for that resource all may
92
+ * now reflect different entity tagging, so invalidate all three.
93
+ */
94
+ private onEntityTagChanged;
95
+ /**
96
+ * Handler shared by `mark:archived` and `mark:unarchived`. Both
97
+ * change a resource's archived flag, which is stored on the resource
98
+ * descriptor and affects the resource-list filter.
99
+ */
100
+ private onArchiveToggled;
101
+ /**
102
+ * Handler shared by `yield:create-ok` and `yield:update-ok`. Both
103
+ * report a resource mutation with the resourceId as a string (not
104
+ * yet branded), so we brand and apply the same effect as
105
+ * `onArchiveToggled`.
106
+ */
107
+ private onYieldResourceMutated;
108
+ private subscribeToEvents;
109
+ }
110
+ export {};
111
+ //# sourceMappingURL=browse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browse.d.ts","sourceRoot":"","sources":["../../src/namespaces/browse.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EAER,kBAAkB,EAClB,UAAU,EACV,YAAY,EACZ,eAAe,EACf,UAAU,EACV,SAAS,EACT,UAAU,EACX,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGnE,OAAO,KAAK,EACV,eAAe,IAAI,gBAAgB,EACnC,iBAAiB,EACjB,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AACjB,KAAK,mBAAmB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,qBAAqB,CAAC,CAAC;AAMxE,KAAK,mBAAmB,GAAG;IAAE,KAAK,CAAC,EAA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GAAG,iBAAiB,GAC1C,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,qBAAqB,CAAC,CAAC;IAYxD,KAAK,CAAC,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI;IAI/D,iBAAiB,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI;IAW/C,wBAAwB,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI;IAItD,sBAAsB,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI;IAKxD,wBAAwB,CAAC,EAAE,EAAE,UAAU,GAAG,IAAI;IAI9C,uBAAuB,IAAI,IAAI;IAI/B,qBAAqB,IAAI,IAAI;IAI7B,oBAAoB,IAAI,IAAI;IAI5B,sBAAsB,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI;IAIpD,wBAAwB,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI;IAItD,uBAAuB,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,GAAG,IAAI;IAsB7E;;;;OAIG;IACH,OAAO,CAAC,EAAE;IAOV;;;;;OAKG;IACH,OAAO,CAAC,kBAAkB,CAKxB;IAEF;;;;OAIG;IACH,OAAO,CAAC,gBAAgB,CAItB;IAEF;;;;;OAKG;IACH,OAAO,CAAC,sBAAsB,CAI5B;IAEF,OAAO,CAAC,iBAAiB;CA+E1B"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * FrameNamespace — the eighth flow's surface.
3
+ *
4
+ * Frame operates on the KB's **schema layer** — the conceptual vocabulary
5
+ * the other seven flows are expressed in. Where yield/mark/match/bind/
6
+ * gather/browse/beckon act on content (resources, annotations, references,
7
+ * attention), Frame acts on what *kinds* of things exist: entity types,
8
+ * eventually tag schemas, relation/predicate types, ontology imports.
9
+ *
10
+ * The MVP owns a single primitive — entity-type vocabulary writes on the
11
+ * `frame:add-entity-type` channel. See `docs/protocol/flows/FRAME.md`
12
+ * for the per-flow contract.
13
+ *
14
+ * Live reads of the entity-type vocabulary stay on Browse
15
+ * (`browse.entityTypes()` is a `CacheObservable<string[]>`). Frame owns
16
+ * writes; Browse owns reads. The asymmetry is intentional — re-implementing
17
+ * Browse's cache primitives on Frame for a single read would duplicate
18
+ * machinery without benefit.
19
+ */
20
+ import type { ITransport, TagSchema } from '@semiont/core';
21
+ import type { FrameNamespace as IFrameNamespace } from './types';
22
+ export declare class FrameNamespace implements IFrameNamespace {
23
+ private readonly transport;
24
+ constructor(transport: ITransport);
25
+ addEntityType(type: string): Promise<void>;
26
+ addEntityTypes(types: string[]): Promise<void>;
27
+ addTagSchema(schema: TagSchema): Promise<void>;
28
+ }
29
+ //# sourceMappingURL=frame.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frame.d.ts","sourceRoot":"","sources":["../../src/namespaces/frame.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,IAAI,eAAe,EAAE,MAAM,SAAS,CAAC;AAEjE,qBAAa,cAAe,YAAW,eAAe;IACxC,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,UAAU;IAE5C,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI1C,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAM9C,YAAY,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;CAGrD"}
@@ -0,0 +1,16 @@
1
+ import type { AnnotationId, ResourceId, EventBus } from '@semiont/core';
2
+ import type { ITransport } from '@semiont/core';
3
+ import { StreamObservable } from '../awaitable';
4
+ import type { GatherNamespace as IGatherNamespace, GatherAnnotationProgress } from './types';
5
+ export declare class GatherNamespace implements IGatherNamespace {
6
+ private readonly transport;
7
+ private readonly bus;
8
+ constructor(transport: ITransport, bus: EventBus);
9
+ annotation(resourceId: ResourceId, annotationId: AnnotationId, options?: {
10
+ contextWindow?: number;
11
+ }): StreamObservable<GatherAnnotationProgress>;
12
+ resource(_resourceId: ResourceId, _options?: {
13
+ contextWindow?: number;
14
+ }): StreamObservable<GatherAnnotationProgress>;
15
+ }
16
+ //# sourceMappingURL=gather.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gather.d.ts","sourceRoot":"","sources":["../../src/namespaces/gather.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,IAAI,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAE7F,qBAAa,eAAgB,YAAW,gBAAgB;IAEpD,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,GAAG;gBADH,SAAS,EAAE,UAAU,EACrB,GAAG,EAAE,QAAQ;IAGhC,UAAU,CACR,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,EAC1B,OAAO,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE,GACnC,gBAAgB,CAAC,wBAAwB,CAAC;IAkD7C,QAAQ,CACN,WAAW,EAAE,UAAU,EACvB,QAAQ,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE,GACpC,gBAAgB,CAAC,wBAAwB,CAAC;CAG9C"}
@@ -0,0 +1,32 @@
1
+ import type { Observable } from 'rxjs';
2
+ import type { EventBus, EventMap, JobId, components } from '@semiont/core';
3
+ import type { ITransport } from '@semiont/core';
4
+ import type { JobNamespace as IJobNamespace } from './types';
5
+ type JobStatusResponse = components['schemas']['JobStatusResponse'];
6
+ export declare class JobNamespace implements IJobNamespace {
7
+ private readonly transport;
8
+ private readonly bus;
9
+ constructor(transport: ITransport, bus: EventBus);
10
+ /**
11
+ * Live stream of `job:queued` events. Surfaces a typed view onto the
12
+ * underlying bus channel for consumers (CLIs, MCP handlers, widgets)
13
+ * that orchestrate jobs and need to react to lifecycle transitions.
14
+ */
15
+ get queued$(): Observable<EventMap['job:queued']>;
16
+ /** Live stream of `job:report-progress` events. */
17
+ get progress$(): Observable<EventMap['job:report-progress']>;
18
+ /** Live stream of `job:complete` events. */
19
+ get complete$(): Observable<EventMap['job:complete']>;
20
+ /** Live stream of `job:fail` events. */
21
+ get fail$(): Observable<EventMap['job:fail']>;
22
+ status(jobId: JobId): Promise<JobStatusResponse>;
23
+ pollUntilComplete(jobId: JobId, options?: {
24
+ interval?: number;
25
+ timeout?: number;
26
+ onProgress?: (status: JobStatusResponse) => void;
27
+ }): Promise<JobStatusResponse>;
28
+ cancelByType(jobType: 'annotation' | 'generation'): Promise<void>;
29
+ cancelRequest(jobType: 'annotation' | 'generation'): void;
30
+ }
31
+ export {};
32
+ //# sourceMappingURL=job.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"job.d.ts","sourceRoot":"","sources":["../../src/namespaces/job.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,KAAK,EAAE,YAAY,IAAI,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7D,KAAK,iBAAiB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,mBAAmB,CAAC,CAAC;AAEpE,qBAAa,YAAa,YAAW,aAAa;IAE9C,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,GAAG;gBADH,SAAS,EAAE,UAAU,EACrB,GAAG,EAAE,QAAQ;IAGhC;;;;OAIG;IACH,IAAI,OAAO,IAAI,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAEhD;IAED,mDAAmD;IACnD,IAAI,SAAS,IAAI,UAAU,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC,CAE3D;IAED,4CAA4C;IAC5C,IAAI,SAAS,IAAI,UAAU,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAEpD;IAED,wCAAwC;IACxC,IAAI,KAAK,IAAI,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAE5C;IAEK,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAUhD,iBAAiB,CACrB,KAAK,EAAE,KAAK,EACZ,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAA;KAAE,GAClG,OAAO,CAAC,iBAAiB,CAAC;IAkBvB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAMvE,aAAa,CAAC,OAAO,EAAE,YAAY,GAAG,YAAY,GAAG,IAAI;CAK1D"}
@@ -0,0 +1,27 @@
1
+ import type { ResourceId, AnnotationId, Motivation, EventBus, components } from '@semiont/core';
2
+ import type { ITransport } from '@semiont/core';
3
+ import { StreamObservable } from '../awaitable';
4
+ import type { MarkNamespace as IMarkNamespace, CreateAnnotationInput, MarkAssistOptions, MarkAssistEvent } from './types';
5
+ export declare class MarkNamespace implements IMarkNamespace {
6
+ private readonly transport;
7
+ private readonly bus;
8
+ constructor(transport: ITransport, bus: EventBus);
9
+ annotation(input: CreateAnnotationInput): Promise<{
10
+ annotationId: AnnotationId;
11
+ }>;
12
+ delete(resourceId: ResourceId, annotationId: AnnotationId): Promise<void>;
13
+ archive(resourceId: ResourceId): Promise<void>;
14
+ unarchive(resourceId: ResourceId): Promise<void>;
15
+ assist(resourceId: ResourceId, motivation: Motivation, options: MarkAssistOptions): StreamObservable<MarkAssistEvent>;
16
+ request(selector: components['schemas']['MarkRequestedEvent']['selector'], motivation: Motivation): void;
17
+ requestAssist(motivation: Motivation, options: MarkAssistOptions, correlationId?: string): void;
18
+ submit(input: components['schemas']['MarkSubmitEvent']): void;
19
+ cancelPending(): void;
20
+ dismissProgress(): void;
21
+ changeSelection(motivation: Motivation | null): void;
22
+ changeClick(action: string): void;
23
+ changeShape(shape: string): void;
24
+ toggleMode(): void;
25
+ private dispatchAssist;
26
+ }
27
+ //# sourceMappingURL=mark.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mark.d.ts","sourceRoot":"","sources":["../../src/namespaces/mark.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,UAAU,EACX,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EACV,aAAa,IAAI,cAAc,EAC/B,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EAChB,MAAM,SAAS,CAAC;AAEjB,qBAAa,aAAc,YAAW,cAAc;IAEhD,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,GAAG;gBADH,SAAS,EAAE,UAAU,EACrB,GAAG,EAAE,QAAQ;IAG1B,UAAU,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC;QAAE,YAAY,EAAE,YAAY,CAAA;KAAE,CAAC;IAejF,MAAM,CAAC,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzE,OAAO,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAI9C,SAAS,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAItD,MAAM,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,iBAAiB,GAAG,gBAAgB,CAAC,eAAe,CAAC;IA+GrH,OAAO,CACL,QAAQ,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,oBAAoB,CAAC,CAAC,UAAU,CAAC,EACjE,UAAU,EAAE,UAAU,GACrB,IAAI;IAKP,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,iBAAiB,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI;IAQ/F,MAAM,CAAC,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,iBAAiB,CAAC,GAAG,IAAI;IAI7D,aAAa,IAAI,IAAI;IAIrB,eAAe,IAAI,IAAI;IAIvB,eAAe,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,GAAG,IAAI;IAIpD,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAIjC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAIhC,UAAU,IAAI,IAAI;YAIJ,cAAc;CAwC7B"}
@@ -0,0 +1,15 @@
1
+ import type { AnnotationId, ResourceId, GatheredContext, EventBus, components } from '@semiont/core';
2
+ import type { ITransport } from '@semiont/core';
3
+ import { StreamObservable } from '../awaitable';
4
+ import type { MatchNamespace as IMatchNamespace, MatchSearchProgress } from './types';
5
+ export declare class MatchNamespace implements IMatchNamespace {
6
+ private readonly transport;
7
+ private readonly bus;
8
+ constructor(transport: ITransport, bus: EventBus);
9
+ requestSearch(input: components['schemas']['MatchSearchRequest']): void;
10
+ search(resourceId: ResourceId, referenceId: AnnotationId, context: GatheredContext, options?: {
11
+ limit?: number;
12
+ useSemanticScoring?: boolean;
13
+ }): StreamObservable<MatchSearchProgress>;
14
+ }
15
+ //# sourceMappingURL=match.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"match.d.ts","sourceRoot":"","sources":["../../src/namespaces/match.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACrG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,IAAI,eAAe,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEtF,qBAAa,cAAe,YAAW,eAAe;IAElD,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,GAAG;gBADH,SAAS,EAAE,UAAU,EACrB,GAAG,EAAE,QAAQ;IAGhC,aAAa,CAAC,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,oBAAoB,CAAC,GAAG,IAAI;IAKvE,MAAM,CACJ,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,YAAY,EACzB,OAAO,EAAE,eAAe,EACxB,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,kBAAkB,CAAC,EAAE,OAAO,CAAA;KAAE,GACzD,gBAAgB,CAAC,mBAAmB,CAAC;CAqCzC"}