Skip to content

Commit 147aa5d

Browse files
julianna-ciqkriswest
authored andcommitted
Update docs
1 parent 30fe9bd commit 147aa5d

5 files changed

Lines changed: 27 additions & 18 deletions

File tree

website/docs/api/ref/Channel.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ interface Channel {
3333
displayMetadata?: DisplayMetadata;
3434

3535
// functions
36-
broadcast(context: Context): Promise<void>;
36+
broadcast(context: Context, metadata?: AppProvidableContextMetadata): Promise<void>;
3737
getCurrentContext(contextType?: string): Promise<Context|null>;
3838
addContextListener(contextType: string | null, handler: ContextHandler): Promise<Listener>;
3939
clearContext(contextType?: string): Promise<void>;
@@ -430,7 +430,7 @@ var listener = await myChannel.AddEventListener(null, (event) => {
430430
<TabItem value="ts" label="TypeScript/JavaScript">
431431

432432
```ts
433-
public broadcast(context: Context): Promise<void>;
433+
public broadcast(context: Context, metadata?: AppProvidableContextMetadata): Promise<void>;
434434
```
435435

436436
</TabItem>

website/docs/api/ref/DesktopAgent.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@ For details of how implementations of the `DesktopAgent` are made available to a
2222
```ts
2323
interface DesktopAgent {
2424
// apps
25-
open(app: AppIdentifier, context?: Context): Promise<AppIdentifier>;
25+
open(app: AppIdentifier, context?: Context, metadata?: AppProvidableContextMetadata): Promise<AppIdentifier>;
2626
findInstances(app: AppIdentifier): Promise<Array<AppIdentifier>>;
2727
getAppMetadata(app: AppIdentifier): Promise<AppMetadata>;
2828

2929
// context
30-
broadcast(context: Context): Promise<void>;
30+
broadcast(context: Context, metadata?: AppProvidableContextMetadata): Promise<void>;
3131
addContextListener(contextType: string | null, handler: ContextHandler): Promise<Listener>;
3232

3333
// intents
3434
findIntent(intent: string, context?: Context, resultType?: string): Promise<AppIntent>;
3535
findIntentsByContext(context: Context, resultType?: string): Promise<Array<AppIntent>>;
36-
raiseIntent(intent: string, context: Context, app?: AppIdentifier): Promise<IntentResolution>;
37-
raiseIntentForContext(context: Context, app?: AppIdentifier): Promise<IntentResolution>;
36+
raiseIntent(intent: string, context: Context, app?: AppIdentifier, metadata?: AppProvidableContextMetadata): Promise<IntentResolution>;
37+
raiseIntentForContext(context: Context, app?: AppIdentifier, metadata?: AppProvidableContextMetadata): Promise<IntentResolution>;
3838
addIntentListener(intent: string, handler: IntentHandler): Promise<Listener>;
3939

4040
// channels
@@ -190,7 +190,7 @@ Context broadcasts are primarily received from apps that are joined to the same
190190

191191
Context may also be received via this listener if the application was launched via a call to [`fdc3.open`](#open), where context was passed as an argument. In order to receive this, applications SHOULD add their context listener as quickly as possible after launch, or an error MAY be returned to the caller and the context may not be delivered. The exact timeout used is set by the Desktop Agent implementation, but MUST be at least 15 seconds.
192192

193-
Optional metadata about each context message received, including the app that originated the message, MUST be provided by the Desktop Agent implementation.
193+
Optional metadata about each context message received, including the app that originated the message, SHOULD be provided by the Desktop Agent implementation.
194194

195195
Adding multiple context listeners on the same or overlapping types (i.e. specific `contextType` and `null` type) MUST be allowed, and MUST trigger all ContextHandlers when a relevant context type is broadcast on the current user channel. Please note, that this behavior differs from [`fdc3.addIntentListener`](#addintentlistener) call; refer to the relevant documentation for more details.
196196

@@ -367,7 +367,7 @@ The Desktop Agent MUST reject the promise returned by the `getResult()` function
367367
368368
The [`PrivateChannel`](PrivateChannel) type is provided to support synchronization of data transmitted over returned channels, by allowing both parties to listen for events denoting subscription and unsubscription from the returned channel. `PrivateChannels` are only retrievable via raising an intent.
369369
370-
Optional metadata about each intent & context message received, including the app that originated the message, MUST be provided by the Desktop Agent implementation.
370+
Optional metadata about each intent & context message received, including the app that originated the message, SHOULD be provided by the Desktop Agent implementation.
371371
372372
Adding multiple intent listeners on the same type MUST be rejected with the [`ResolveError.IntentListenerConflict`](Errors#resolveerror), unless the previous listener was removed first though [`listener.unsubscribe`](Types#unsubscribe)
373373
@@ -482,7 +482,7 @@ listenerResult := <-desktopAgent.AddIntentListener("fdc3.contact", func(context
482482
<TabItem value="ts" label="TypeScript/JavaScript">
483483
484484
```ts
485-
broadcast(context: Context): Promise<void>;
485+
broadcast(context: Context, metadata?: AppProvidableContextMetadata): Promise<void>;
486486
```
487487
488488
</TabItem>
@@ -1683,7 +1683,7 @@ listenerResult := <-desktopAgent.AddContextListener("", func(context IContext, c
16831683
<TabItem value="ts" label="TypeScript/JavaScript">
16841684
16851685
```ts
1686-
open(app: AppIdentifier, context?: Context): Promise<AppIdentifier>;
1686+
open(app: AppIdentifier, context?: Context, metadata?: AppProvidableContextMetadata): Promise<AppIdentifier>;
16871687
```
16881688
16891689
</TabItem>
@@ -1771,7 +1771,7 @@ instanceIdentifierResult := <-desktopAgent.Open(appIdentifier, &context)
17711771
<TabItem value="ts" label="TypeScript/JavaScript">
17721772
17731773
```ts
1774-
raiseIntent(intent: string, context: Context, app?: AppIdentifier): Promise<IntentResolution>;
1774+
raiseIntent(intent: string, context: Context, app?: AppIdentifier, metadata?: AppProvidableContextMetadata): Promise<IntentResolution>;
17751775
```
17761776
17771777
</TabItem>
@@ -1909,7 +1909,7 @@ resolutionResult := <-desktopAgent.RaiseIntent("intentName", context, nil);
19091909
<TabItem value="ts" label="TypeScript/JavaScript">
19101910
19111911
```ts
1912-
raiseIntentForContext(context: Context, app?: AppIdentifier): Promise<IntentResolution>;
1912+
raiseIntentForContext(context: Context, app?: AppIdentifier, metadata?: AppProvidableContextMetadata): Promise<IntentResolution>;
19131913
```
19141914
19151915
</TabItem>

website/docs/api/ref/Metadata.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ type ContextMetadata struct {
263263
</TabItem>
264264
</Tabs>
265265

266-
Metadata relating to a context or intent & context received through the `addContextListener` and `addIntentListener` functions. Currently identifies the app that originated the context or intent message.
266+
Metadata relating to a context or intent and context received through the `addContextListener` and `addIntentListener` functions. Can include timestamp, security, observability, or other information.
267267

268268
[`@experimental`](../../fdc3-compliance#experimental-features) Introduced in FDC3 2.0 and may be refined by further changes outside the normal FDC3 versioning policy.
269269

website/docs/api/ref/Types.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ This means that it must at least have a `type` property that indicates what type
161161
<TabItem value="ts" label="TypeScript/JavaScript">
162162

163163
```ts
164-
type ContextHandler = (context: Context, metadata?: ContextMetadata) => void;
164+
type ContextHandler = (context: Context, metadata?: DesktopAgentProvidableContextMetadata) => void;
165165
```
166166

167167
</TabItem>
@@ -239,7 +239,7 @@ type DesktopAgentIdentifier struct {
239239
<TabItem value="ts" label="TypeScript/JavaScript">
240240

241241
```ts
242-
type IntentHandler = (context: Context, metadata?: ContextMetadata) => Promise<IntentResult> | void;
242+
type IntentHandler = (context: Context, metadata?: DesktopAgentProvidableContextMetadata) => Promise<IntentResult> | void;
243243
```
244244

245245
</TabItem>

website/docs/api/spec.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,8 @@ Registered listeners MUST receive:
882882

883883
Registered listeners MAY receive:
884884

885-
* `traceId` – Correlates related actions and messages.
885+
* `traceId` – A unique identifier for tracing the flow of context or intent messages across applications.
886+
* `signature` – A cryptographic signature that can be used to verify the authenticity and integrity of the context or intent message.
886887
* `custom` – Implementation-specific metadata.
887888

888889
<!-- TODO insert security/signature field names here -->
@@ -892,7 +893,7 @@ Registered listeners MAY receive:
892893
The Desktop Agent MAY provide a `traceId` to intent handlers.
893894

894895
* If the originating app provides a `traceId`, the Desktop Agent MUST forward it.
895-
* If not, the Desktop Agent MAY generate a UUID.
896+
* If no `traceId` is provided by the app, the Desktop Agent MAY generate a new one.
896897

897898
Apps MAY propagate `traceId` when performing actions as a result of another FDC3 action. This supports observability and correlation across workflows.
898899

@@ -925,12 +926,20 @@ fdc3.addIntentListener("ViewContact", (contactContext, metadata) => {
925926

926927
### Timestamp
927928

929+
The `timestamp` indicates when the context was broadcast or the intent was raised.
930+
This can be used for debugging, auditing, or ordering events.
931+
928932
The Desktop Agent MUST provide timestamp information.
929933
Apps SHOULD NOT provide timestamps; if they do, the Desktop Agent MUST ignore them.
930934

931935
### Source
932936

937+
The `source` identifies the app instance that originated the context or intent.
938+
933939
The Desktop Agent MUST provide source information in the form of an `AppIdentifier`.
934940
Apps SHOULD NOT provide source; if they do, the Desktop Agent MUST ignore it.
935941

936-
<!-- TODO insert security/signature field overviews here -->
942+
### Signature
943+
944+
The `signature` can be used to verify the authenticity and integrity of a context or intent message.
945+
If a signature is provided by an app, it MAY be verified by the Desktop Agent.

0 commit comments

Comments
 (0)