@databricks/appkit 0.83.0 → 0.84.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/CLAUDE.md +15 -1
- package/dist/agents/databricks.d.ts +15 -3
- package/dist/agents/databricks.d.ts.map +1 -1
- package/dist/agents/databricks.js +25 -8
- package/dist/agents/databricks.js.map +1 -1
- package/dist/appkit/package.js +1 -1
- package/dist/beta.d.ts +2 -2
- package/dist/cache/index.d.ts.map +1 -1
- package/dist/cache/index.js +6 -1
- package/dist/cache/index.js.map +1 -1
- package/dist/cli/commands/agent/eval.js +1 -1
- package/dist/cli/commands/generate-types.js +1 -1
- package/dist/cli/commands/plugin/sync/sync.js +28 -15
- package/dist/cli/commands/plugin/sync/sync.js.map +1 -1
- package/dist/cli/commands/registry/add.js +3 -11
- package/dist/cli/commands/registry/add.js.map +1 -1
- package/dist/cli/commands/registry/config-writer.js +1 -1
- package/dist/connectors/lakebase/routing-pool.d.ts.map +1 -1
- package/dist/connectors/lakebase/routing-pool.js +4 -10
- package/dist/connectors/lakebase/routing-pool.js.map +1 -1
- package/dist/context/caller-context.d.ts +4 -1
- package/dist/context/caller-context.d.ts.map +1 -1
- package/dist/context/caller-context.js.map +1 -1
- package/dist/context/execution-context.d.ts +29 -1
- package/dist/context/execution-context.d.ts.map +1 -1
- package/dist/context/execution-context.js +60 -8
- package/dist/context/execution-context.js.map +1 -1
- package/dist/context/index.d.ts +2 -2
- package/dist/context/index.js +2 -1
- package/dist/context/request-scope.d.ts +2 -0
- package/dist/context/request-scope.js +39 -0
- package/dist/context/request-scope.js.map +1 -0
- package/dist/context/resource-capabilities.js +59 -0
- package/dist/context/resource-capabilities.js.map +1 -0
- package/dist/context/scoped-api.js +104 -0
- package/dist/context/scoped-api.js.map +1 -0
- package/dist/context/service-context.d.ts.map +1 -1
- package/dist/context/service-context.js +1 -1
- package/dist/context/service-context.js.map +1 -1
- package/dist/context/user-context.d.ts +16 -19
- package/dist/context/user-context.d.ts.map +1 -1
- package/dist/context/user-context.js +30 -3
- package/dist/context/user-context.js.map +1 -1
- package/dist/core/agent/load-agents.d.ts.map +1 -1
- package/dist/core/agent/load-agents.js +5 -2
- package/dist/core/agent/load-agents.js.map +1 -1
- package/dist/core/agent/run-agent.d.ts +19 -6
- package/dist/core/agent/run-agent.d.ts.map +1 -1
- package/dist/core/agent/run-agent.js +53 -17
- package/dist/core/agent/run-agent.js.map +1 -1
- package/dist/core/agent/types.d.ts +18 -1
- package/dist/core/agent/types.d.ts.map +1 -1
- package/dist/core/agent/types.js.map +1 -1
- package/dist/core/appkit.d.ts +4 -3
- package/dist/core/appkit.d.ts.map +1 -1
- package/dist/core/appkit.js +30 -9
- package/dist/core/appkit.js.map +1 -1
- package/dist/core/plugin-context.d.ts +14 -15
- package/dist/core/plugin-context.d.ts.map +1 -1
- package/dist/core/plugin-context.js +24 -14
- package/dist/core/plugin-context.js.map +1 -1
- package/dist/errors/base.d.ts +2 -2
- package/dist/errors/base.js +2 -2
- package/dist/errors/base.js.map +1 -1
- package/dist/errors/identity-expired.d.ts +14 -0
- package/dist/errors/identity-expired.d.ts.map +1 -0
- package/dist/errors/identity-expired.js +33 -0
- package/dist/errors/identity-expired.js.map +1 -0
- package/dist/errors/index.js +1 -0
- package/dist/index.d.ts +8 -5
- package/dist/index.js +5 -2
- package/dist/logging/logger.js +1 -1
- package/dist/plugin/execution-result.d.ts +4 -1
- package/dist/plugin/execution-result.d.ts.map +1 -1
- package/dist/plugin/interceptors/telemetry.js +6 -4
- package/dist/plugin/interceptors/telemetry.js.map +1 -1
- package/dist/plugin/plugin.d.ts +13 -21
- package/dist/plugin/plugin.d.ts.map +1 -1
- package/dist/plugin/plugin.js +41 -122
- package/dist/plugin/plugin.js.map +1 -1
- package/dist/plugins/agents/agents.d.ts +12 -0
- package/dist/plugins/agents/agents.d.ts.map +1 -1
- package/dist/plugins/agents/agents.js +65 -15
- package/dist/plugins/agents/agents.js.map +1 -1
- package/dist/plugins/agents/auth-mode.js +42 -0
- package/dist/plugins/agents/auth-mode.js.map +1 -0
- package/dist/plugins/agents/index.d.ts +1 -1
- package/dist/plugins/agents/mlflow.js +11 -3
- package/dist/plugins/agents/mlflow.js.map +1 -1
- package/dist/plugins/agents/tool-dispatch.js +9 -1
- package/dist/plugins/agents/tool-dispatch.js.map +1 -1
- package/dist/plugins/ai-search/ai-search.d.ts.map +1 -1
- package/dist/plugins/ai-search/ai-search.js +4 -4
- package/dist/plugins/ai-search/ai-search.js.map +1 -1
- package/dist/plugins/analytics/analytics.d.ts +2 -2
- package/dist/plugins/analytics/analytics.js +6 -6
- package/dist/plugins/analytics/analytics.js.map +1 -1
- package/dist/plugins/database/crud/contract.js +2 -2
- package/dist/plugins/database/crud/contract.js.map +1 -1
- package/dist/plugins/files/plugin.d.ts +10 -4
- package/dist/plugins/files/plugin.d.ts.map +1 -1
- package/dist/plugins/files/plugin.js +34 -13
- package/dist/plugins/files/plugin.js.map +1 -1
- package/dist/plugins/genie/genie.d.ts +9 -0
- package/dist/plugins/genie/genie.d.ts.map +1 -1
- package/dist/plugins/genie/genie.js +12 -3
- package/dist/plugins/genie/genie.js.map +1 -1
- package/dist/plugins/genie/manifest.js +1 -0
- package/dist/plugins/jobs/plugin.js +2 -2
- package/dist/plugins/jobs/plugin.js.map +1 -1
- package/dist/plugins/lakebase/lakebase.d.ts +10 -17
- package/dist/plugins/lakebase/lakebase.d.ts.map +1 -1
- package/dist/plugins/lakebase/lakebase.js +12 -17
- package/dist/plugins/lakebase/lakebase.js.map +1 -1
- package/dist/plugins/server/client-config-sanitizer.js +1 -4
- package/dist/plugins/server/client-config-sanitizer.js.map +1 -1
- package/dist/plugins/server/dev-obo-middleware.js +60 -0
- package/dist/plugins/server/dev-obo-middleware.js.map +1 -0
- package/dist/plugins/server/index.d.ts.map +1 -1
- package/dist/plugins/server/index.js +5 -2
- package/dist/plugins/server/index.js.map +1 -1
- package/dist/plugins/server/remote-tunnel/remote-tunnel-manager.js +3 -3
- package/dist/plugins/server/remote-tunnel/remote-tunnel-manager.js.map +1 -1
- package/dist/plugins/server/static-server.js +3 -3
- package/dist/plugins/server/static-server.js.map +1 -1
- package/dist/plugins/server/utils.js +3 -3
- package/dist/plugins/server/utils.js.map +1 -1
- package/dist/plugins/server/vite-dev-server.js +4 -4
- package/dist/plugins/server/vite-dev-server.js.map +1 -1
- package/dist/plugins/serving/manifest.js +1 -0
- package/dist/plugins/serving/serving.js +6 -6
- package/dist/plugins/serving/serving.js.map +1 -1
- package/dist/schemas/manifest.d.ts +35 -1
- package/dist/schemas/manifest.d.ts.map +1 -1
- package/dist/schemas/manifest.js +112 -4
- package/dist/schemas/manifest.js.map +1 -1
- package/dist/shared/src/dev-obo.js +86 -0
- package/dist/shared/src/dev-obo.js.map +1 -0
- package/dist/shared/src/index.d.ts +1 -1
- package/dist/shared/src/plugin.d.ts +12 -1
- package/dist/shared/src/plugin.d.ts.map +1 -1
- package/dist/shared/src/schemas/manifest.d.ts +41 -33
- package/dist/shared/src/schemas/manifest.d.ts.map +1 -1
- package/dist/shared/src/schemas/manifest.js +43 -4
- package/dist/shared/src/schemas/manifest.js.map +1 -1
- package/dist/stream/stream-manager.d.ts.map +1 -1
- package/dist/stream/stream-manager.js +5 -2
- package/dist/stream/stream-manager.js.map +1 -1
- package/dist/telemetry/execution-span-processor.js +21 -0
- package/dist/telemetry/execution-span-processor.js.map +1 -0
- package/dist/telemetry/telemetry-manager.js +2 -1
- package/dist/telemetry/telemetry-manager.js.map +1 -1
- package/dist/testing/create-test-app.d.ts +2 -2
- package/dist/testing/create-test-app.js.map +1 -1
- package/dist/testing/test-plugin-context.d.ts +3 -12
- package/dist/testing/test-plugin-context.d.ts.map +1 -1
- package/dist/testing/test-plugin-context.js +24 -16
- package/dist/testing/test-plugin-context.js.map +1 -1
- package/dist/type-generator/database/generate.js +3 -3
- package/dist/type-generator/database/generate.js.map +1 -1
- package/dist/type-generator/migration.js +2 -2
- package/dist/type-generator/migration.js.map +1 -1
- package/dist/type-generator/serving/server-file-extractor.js +3 -3
- package/dist/type-generator/serving/server-file-extractor.js.map +1 -1
- package/dist/utils/is-plain-object.js +11 -0
- package/dist/utils/is-plain-object.js.map +1 -0
- package/docs/api/appkit/Class.AppKitError.md +2 -1
- package/docs/api/appkit/Class.AuthenticationError.md +1 -1
- package/docs/api/appkit/Class.ConfigurationError.md +1 -1
- package/docs/api/appkit/Class.ConnectionError.md +1 -1
- package/docs/api/appkit/Class.DatabaseValidationError.md +1 -1
- package/docs/api/appkit/Class.ExecutionError.md +1 -1
- package/docs/api/appkit/Class.IdentityExpiredError.md +190 -0
- package/docs/api/appkit/Class.InitializationError.md +1 -1
- package/docs/api/appkit/Class.Plugin.md +8 -12
- package/docs/api/appkit/Class.ServerError.md +1 -1
- package/docs/api/appkit/Class.ServiceContext.md +169 -0
- package/docs/api/appkit/Class.TunnelError.md +1 -1
- package/docs/api/appkit/Class.ValidationError.md +1 -1
- package/docs/api/appkit/Function.createApp.md +12 -12
- package/docs/api/appkit/Function.getCallerContext.md +12 -0
- package/docs/api/appkit/Function.getCurrentUserId.md +14 -0
- package/docs/api/appkit/Function.getExecutionContext.md +1 -1
- package/docs/api/appkit/Function.getUserContext.md +16 -0
- package/docs/api/appkit/Function.isInUserContext.md +12 -0
- package/docs/api/appkit/Function.isUserContext.md +20 -0
- package/docs/api/appkit/Function.runAgent.md +1 -1
- package/docs/api/appkit/Function.runInCallerContext.md +27 -0
- package/docs/api/appkit/Function.runInUserContext.md +29 -0
- package/docs/api/appkit/Interface.AgentDefinition.md +11 -0
- package/docs/api/appkit/Interface.AgentsPluginConfig.md +11 -0
- package/docs/api/appkit/Interface.CallerContext.md +13 -0
- package/docs/api/appkit/Interface.IndexConfig.md +1 -1
- package/docs/api/appkit/Interface.PluginManifest.md +9 -1
- package/docs/api/appkit/Interface.RegisteredAgent.md +11 -0
- package/docs/api/appkit/Interface.RunAgentInput.md +45 -1
- package/docs/api/appkit/TypeAlias.AgentAuth.md +8 -0
- package/docs/api/appkit/TypeAlias.AppKitApi.md +35 -0
- package/docs/api/appkit/TypeAlias.ExecutionContext.md +4 -1
- package/docs/api/appkit/TypeAlias.ExecutionResult.md +65 -0
- package/docs/api/appkit/TypeAlias.ScopedPluginMap.md +12 -0
- package/docs/api/appkit/TypeAlias.UserContext.md +109 -0
- package/docs/api/appkit/TypeAlias.UserScopedApp.md +39 -0
- package/docs/api/appkit.md +14 -0
- package/docs/plugins/agents.md +45 -0
- package/docs/plugins/execution-context.md +101 -50
- package/docs/plugins/lakebase.md +6 -82
- package/llms.txt +15 -1
- package/package.json +1 -1
- package/sbom.cdx.json +1 -1
|
@@ -54,7 +54,7 @@ protected readonly optional _clientMessage: string;
|
|
|
54
54
|
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
Client-safe error message. When set, callers serializing the error to a client (SSE, HTTP body) MUST prefer `clientMessage` over `message
|
|
57
|
+
Client-safe error message. When set, callers serializing the error to a client (SSE, HTTP body) MUST prefer `clientMessage` over `message`. `message` may contain raw upstream / SDK text including statement fragments, internal object names, and correlation IDs.
|
|
58
58
|
|
|
59
59
|
Subclasses can set this in their constructor for a fixed sanitized string. When unset, `clientMessage` defaults to a generic per-code string (see the getter), and the raw `message` is kept server-side only.
|
|
60
60
|
|
|
@@ -54,7 +54,7 @@ protected readonly optional _clientMessage: string;
|
|
|
54
54
|
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
Client-safe error message. When set, callers serializing the error to a client (SSE, HTTP body) MUST prefer `clientMessage` over `message
|
|
57
|
+
Client-safe error message. When set, callers serializing the error to a client (SSE, HTTP body) MUST prefer `clientMessage` over `message`. `message` may contain raw upstream / SDK text including statement fragments, internal object names, and correlation IDs.
|
|
58
58
|
|
|
59
59
|
Subclasses can set this in their constructor for a fixed sanitized string. When unset, `clientMessage` defaults to a generic per-code string (see the getter), and the raw `message` is kept server-side only.
|
|
60
60
|
|
|
@@ -54,7 +54,7 @@ protected readonly optional _clientMessage: string;
|
|
|
54
54
|
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
Client-safe error message. When set, callers serializing the error to a client (SSE, HTTP body) MUST prefer `clientMessage` over `message
|
|
57
|
+
Client-safe error message. When set, callers serializing the error to a client (SSE, HTTP body) MUST prefer `clientMessage` over `message`. `message` may contain raw upstream / SDK text including statement fragments, internal object names, and correlation IDs.
|
|
58
58
|
|
|
59
59
|
Subclasses can set this in their constructor for a fixed sanitized string. When unset, `clientMessage` defaults to a generic per-code string (see the getter), and the raw `message` is kept server-side only.
|
|
60
60
|
|
|
@@ -39,7 +39,7 @@ protected readonly optional _clientMessage: string;
|
|
|
39
39
|
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
Client-safe error message. When set, callers serializing the error to a client (SSE, HTTP body) MUST prefer `clientMessage` over `message
|
|
42
|
+
Client-safe error message. When set, callers serializing the error to a client (SSE, HTTP body) MUST prefer `clientMessage` over `message`. `message` may contain raw upstream / SDK text including statement fragments, internal object names, and correlation IDs.
|
|
43
43
|
|
|
44
44
|
Subclasses can set this in their constructor for a fixed sanitized string. When unset, `clientMessage` defaults to a generic per-code string (see the getter), and the raw `message` is kept server-side only.
|
|
45
45
|
|
|
@@ -56,7 +56,7 @@ protected readonly optional _clientMessage: string;
|
|
|
56
56
|
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
Client-safe error message. When set, callers serializing the error to a client (SSE, HTTP body) MUST prefer `clientMessage` over `message
|
|
59
|
+
Client-safe error message. When set, callers serializing the error to a client (SSE, HTTP body) MUST prefer `clientMessage` over `message`. `message` may contain raw upstream / SDK text including statement fragments, internal object names, and correlation IDs.
|
|
60
60
|
|
|
61
61
|
Subclasses can set this in their constructor for a fixed sanitized string. When unset, `clientMessage` defaults to a generic per-code string (see the getter), and the raw `message` is kept server-side only.
|
|
62
62
|
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# Class: IdentityExpiredError
|
|
2
|
+
|
|
3
|
+
The downstream service rejected the active caller's credentials.
|
|
4
|
+
|
|
5
|
+
## Extends[](#extends "Direct link to Extends")
|
|
6
|
+
|
|
7
|
+
* [`AppKitError`](./docs/api/appkit/Class.AppKitError.md)
|
|
8
|
+
|
|
9
|
+
## Constructors[](#constructors "Direct link to Constructors")
|
|
10
|
+
|
|
11
|
+
### Constructor[](#constructor "Direct link to Constructor")
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
new IdentityExpiredError(tokenFingerprint?: string): IdentityExpiredError;
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
#### Parameters[](#parameters "Direct link to Parameters")
|
|
19
|
+
|
|
20
|
+
| Parameter | Type |
|
|
21
|
+
| ------------------- | -------- |
|
|
22
|
+
| `tokenFingerprint?` | `string` |
|
|
23
|
+
|
|
24
|
+
#### Returns[](#returns "Direct link to Returns")
|
|
25
|
+
|
|
26
|
+
`IdentityExpiredError`
|
|
27
|
+
|
|
28
|
+
#### Overrides[](#overrides "Direct link to Overrides")
|
|
29
|
+
|
|
30
|
+
[`AppKitError`](./docs/api/appkit/Class.AppKitError.md).[`constructor`](./docs/api/appkit/Class.AppKitError.md#constructor)
|
|
31
|
+
|
|
32
|
+
## Properties[](#properties "Direct link to Properties")
|
|
33
|
+
|
|
34
|
+
### \_clientMessage?[](#_clientmessage "Direct link to _clientMessage?")
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
protected readonly optional _clientMessage: string;
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Client-safe error message. When set, callers serializing the error to a client (SSE, HTTP body) MUST prefer `clientMessage` over `message`. `message` may contain raw upstream / SDK text including statement fragments, internal object names, and correlation IDs.
|
|
42
|
+
|
|
43
|
+
Subclasses can set this in their constructor for a fixed sanitized string. When unset, `clientMessage` defaults to a generic per-code string (see the getter), and the raw `message` is kept server-side only.
|
|
44
|
+
|
|
45
|
+
#### Inherited from[](#inherited-from "Direct link to Inherited from")
|
|
46
|
+
|
|
47
|
+
[`AppKitError`](./docs/api/appkit/Class.AppKitError.md).[`_clientMessage`](./docs/api/appkit/Class.AppKitError.md#_clientmessage)
|
|
48
|
+
|
|
49
|
+
***
|
|
50
|
+
|
|
51
|
+
### cause?[](#cause "Direct link to cause?")
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
readonly optional cause: Error;
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Optional cause of the error
|
|
59
|
+
|
|
60
|
+
#### Inherited from[](#inherited-from-1 "Direct link to Inherited from")
|
|
61
|
+
|
|
62
|
+
[`AppKitError`](./docs/api/appkit/Class.AppKitError.md).[`cause`](./docs/api/appkit/Class.AppKitError.md#cause)
|
|
63
|
+
|
|
64
|
+
***
|
|
65
|
+
|
|
66
|
+
### code[](#code "Direct link to code")
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
readonly code: "IDENTITY_EXPIRED" = "IDENTITY_EXPIRED";
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Error code for programmatic error handling
|
|
74
|
+
|
|
75
|
+
#### Overrides[](#overrides-1 "Direct link to Overrides")
|
|
76
|
+
|
|
77
|
+
[`AppKitError`](./docs/api/appkit/Class.AppKitError.md).[`code`](./docs/api/appkit/Class.AppKitError.md#code)
|
|
78
|
+
|
|
79
|
+
***
|
|
80
|
+
|
|
81
|
+
### context?[](#context "Direct link to context?")
|
|
82
|
+
|
|
83
|
+
```ts
|
|
84
|
+
readonly optional context: Record<string, unknown>;
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Additional context for the error
|
|
89
|
+
|
|
90
|
+
#### Inherited from[](#inherited-from-2 "Direct link to Inherited from")
|
|
91
|
+
|
|
92
|
+
[`AppKitError`](./docs/api/appkit/Class.AppKitError.md).[`context`](./docs/api/appkit/Class.AppKitError.md#context)
|
|
93
|
+
|
|
94
|
+
***
|
|
95
|
+
|
|
96
|
+
### isRetryable[](#isretryable "Direct link to isRetryable")
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
readonly isRetryable: false = false;
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Whether this error type is generally safe to retry
|
|
104
|
+
|
|
105
|
+
#### Overrides[](#overrides-2 "Direct link to Overrides")
|
|
106
|
+
|
|
107
|
+
[`AppKitError`](./docs/api/appkit/Class.AppKitError.md).[`isRetryable`](./docs/api/appkit/Class.AppKitError.md#isretryable)
|
|
108
|
+
|
|
109
|
+
***
|
|
110
|
+
|
|
111
|
+
### statusCode[](#statuscode "Direct link to statusCode")
|
|
112
|
+
|
|
113
|
+
```ts
|
|
114
|
+
readonly statusCode: 401 = 401;
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
HTTP status code suggestion (can be overridden)
|
|
119
|
+
|
|
120
|
+
#### Overrides[](#overrides-3 "Direct link to Overrides")
|
|
121
|
+
|
|
122
|
+
[`AppKitError`](./docs/api/appkit/Class.AppKitError.md).[`statusCode`](./docs/api/appkit/Class.AppKitError.md#statuscode)
|
|
123
|
+
|
|
124
|
+
***
|
|
125
|
+
|
|
126
|
+
### tokenFingerprint?[](#tokenfingerprint "Direct link to tokenFingerprint?")
|
|
127
|
+
|
|
128
|
+
```ts
|
|
129
|
+
readonly optional tokenFingerprint: string;
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Accessors[](#accessors "Direct link to Accessors")
|
|
134
|
+
|
|
135
|
+
### clientMessage[](#clientmessage "Direct link to clientMessage")
|
|
136
|
+
|
|
137
|
+
#### Get Signature[](#get-signature "Direct link to Get Signature")
|
|
138
|
+
|
|
139
|
+
```ts
|
|
140
|
+
get clientMessage(): string;
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Sanitized message safe to forward to clients. Override in subclasses if a more specific default is appropriate.
|
|
145
|
+
|
|
146
|
+
##### Returns[](#returns-1 "Direct link to Returns")
|
|
147
|
+
|
|
148
|
+
`string`
|
|
149
|
+
|
|
150
|
+
#### Inherited from[](#inherited-from-3 "Direct link to Inherited from")
|
|
151
|
+
|
|
152
|
+
[`AppKitError`](./docs/api/appkit/Class.AppKitError.md).[`clientMessage`](./docs/api/appkit/Class.AppKitError.md#clientmessage)
|
|
153
|
+
|
|
154
|
+
## Methods[](#methods "Direct link to Methods")
|
|
155
|
+
|
|
156
|
+
### toJSON()[](#tojson "Direct link to toJSON()")
|
|
157
|
+
|
|
158
|
+
```ts
|
|
159
|
+
toJSON(): Record<string, unknown>;
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Convert error to JSON for logging/serialization. Sensitive values in context are automatically redacted.
|
|
164
|
+
|
|
165
|
+
#### Returns[](#returns-2 "Direct link to Returns")
|
|
166
|
+
|
|
167
|
+
`Record`<`string`, `unknown`>
|
|
168
|
+
|
|
169
|
+
#### Inherited from[](#inherited-from-4 "Direct link to Inherited from")
|
|
170
|
+
|
|
171
|
+
[`AppKitError`](./docs/api/appkit/Class.AppKitError.md).[`toJSON`](./docs/api/appkit/Class.AppKitError.md#tojson)
|
|
172
|
+
|
|
173
|
+
***
|
|
174
|
+
|
|
175
|
+
### toString()[](#tostring "Direct link to toString()")
|
|
176
|
+
|
|
177
|
+
```ts
|
|
178
|
+
toString(): string;
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Create a human-readable string representation
|
|
183
|
+
|
|
184
|
+
#### Returns[](#returns-3 "Direct link to Returns")
|
|
185
|
+
|
|
186
|
+
`string`
|
|
187
|
+
|
|
188
|
+
#### Inherited from[](#inherited-from-5 "Direct link to Inherited from")
|
|
189
|
+
|
|
190
|
+
[`AppKitError`](./docs/api/appkit/Class.AppKitError.md).[`toString`](./docs/api/appkit/Class.AppKitError.md#tostring)
|
|
@@ -54,7 +54,7 @@ protected readonly optional _clientMessage: string;
|
|
|
54
54
|
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
Client-safe error message. When set, callers serializing the error to a client (SSE, HTTP body) MUST prefer `clientMessage` over `message
|
|
57
|
+
Client-safe error message. When set, callers serializing the error to a client (SSE, HTTP body) MUST prefer `clientMessage` over `message`. `message` may contain raw upstream / SDK text including statement fragments, internal object names, and correlation IDs.
|
|
58
58
|
|
|
59
59
|
Subclasses can set this in their constructor for a fixed sanitized string. When unset, `clientMessage` defaults to a generic per-code string (see the getter), and the raw `message` is kept server-side only.
|
|
60
60
|
|
|
@@ -239,30 +239,26 @@ BasePlugin.abortActiveOperations
|
|
|
239
239
|
|
|
240
240
|
***
|
|
241
241
|
|
|
242
|
-
### asUser()[](#asuser "Direct link to
|
|
242
|
+
### ~~asUser()~~[](#asuser "Direct link to asuser")
|
|
243
243
|
|
|
244
244
|
```ts
|
|
245
245
|
asUser(req: Request): this;
|
|
246
246
|
|
|
247
247
|
```
|
|
248
248
|
|
|
249
|
-
Execute operations using the user's identity from the request. Returns a proxy of this plugin where all method calls execute with the user's Databricks credentials instead of the service principal.
|
|
250
|
-
|
|
251
249
|
#### Parameters[](#parameters-1 "Direct link to Parameters")
|
|
252
250
|
|
|
253
|
-
| Parameter | Type |
|
|
254
|
-
| --------- | --------- |
|
|
255
|
-
| `req` | `Request` |
|
|
251
|
+
| Parameter | Type |
|
|
252
|
+
| --------- | --------- |
|
|
253
|
+
| `req` | `Request` |
|
|
256
254
|
|
|
257
255
|
#### Returns[](#returns-2 "Direct link to Returns")
|
|
258
256
|
|
|
259
257
|
`this`
|
|
260
258
|
|
|
261
|
-
|
|
259
|
+
#### Deprecated[](#deprecated "Direct link to Deprecated")
|
|
262
260
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
AuthenticationError if user token is not available in request headers (production only). In development mode (`NODE_ENV=development`), skips user impersonation instead of throwing.
|
|
261
|
+
Use appkit.asUser(req) to scope the whole app.
|
|
266
262
|
|
|
267
263
|
***
|
|
268
264
|
|
|
@@ -374,7 +370,7 @@ Returns an [ExecutionResult](./docs/api/appkit/TypeAlias.ExecutionResult.md) dis
|
|
|
374
370
|
* `{ ok: true, data: T }` on success
|
|
375
371
|
* `{ ok: false, status: number, message: string }` on failure
|
|
376
372
|
|
|
377
|
-
|
|
373
|
+
Caller credential expiration retains the failure result and additionally exposes a typed error, preserving existing result-based callers.
|
|
378
374
|
|
|
379
375
|
#### Type Parameters[](#type-parameters-1 "Direct link to Type Parameters")
|
|
380
376
|
|
|
@@ -576,7 +572,7 @@ Returns the `x-forwarded-user` header when present. In development mode (`NODE_E
|
|
|
576
572
|
|
|
577
573
|
`string`
|
|
578
574
|
|
|
579
|
-
#### Throws[](#throws
|
|
575
|
+
#### Throws[](#throws "Direct link to Throws")
|
|
580
576
|
|
|
581
577
|
AuthenticationError in production when no user header is present.
|
|
582
578
|
|
|
@@ -53,7 +53,7 @@ protected readonly optional _clientMessage: string;
|
|
|
53
53
|
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
Client-safe error message. When set, callers serializing the error to a client (SSE, HTTP body) MUST prefer `clientMessage` over `message
|
|
56
|
+
Client-safe error message. When set, callers serializing the error to a client (SSE, HTTP body) MUST prefer `clientMessage` over `message`. `message` may contain raw upstream / SDK text including statement fragments, internal object names, and correlation IDs.
|
|
57
57
|
|
|
58
58
|
Subclasses can set this in their constructor for a fixed sanitized string. When unset, `clientMessage` defaults to a generic per-code string (see the getter), and the raw `message` is kept server-side only.
|
|
59
59
|
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# Class: ServiceContext
|
|
2
|
+
|
|
3
|
+
ServiceContext is a singleton that manages the service principal's WorkspaceClient and workspace ID. WarehouseResource owns warehouse bindings.
|
|
4
|
+
|
|
5
|
+
It's initialized once at app startup and provides the foundation for both service principal and user context execution.
|
|
6
|
+
|
|
7
|
+
## Constructors[](#constructors "Direct link to Constructors")
|
|
8
|
+
|
|
9
|
+
### Constructor[](#constructor "Direct link to Constructor")
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
new ServiceContext(): ServiceContext;
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
#### Returns[](#returns "Direct link to Returns")
|
|
17
|
+
|
|
18
|
+
`ServiceContext`
|
|
19
|
+
|
|
20
|
+
## Methods[](#methods "Direct link to Methods")
|
|
21
|
+
|
|
22
|
+
### createCallerContext()[](#createcallercontext "Direct link to createCallerContext()")
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
static createCallerContext(
|
|
26
|
+
token: string,
|
|
27
|
+
userId: string,
|
|
28
|
+
userName?: string,
|
|
29
|
+
userEmail?: string): CallerContext;
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Create an immutable caller context from the existing user request headers.
|
|
34
|
+
|
|
35
|
+
#### Parameters[](#parameters "Direct link to Parameters")
|
|
36
|
+
|
|
37
|
+
| Parameter | Type | Description |
|
|
38
|
+
| ------------ | -------- | ------------------------------------------------------------ |
|
|
39
|
+
| `token` | `string` | The user's access token from x-forwarded-access-token header |
|
|
40
|
+
| `userId` | `string` | The user's ID from x-forwarded-user header |
|
|
41
|
+
| `userName?` | `string` | Optional user name |
|
|
42
|
+
| `userEmail?` | `string` | Optional email from x-forwarded-email |
|
|
43
|
+
|
|
44
|
+
#### Returns[](#returns-1 "Direct link to Returns")
|
|
45
|
+
|
|
46
|
+
[`CallerContext`](./docs/api/appkit/Interface.CallerContext.md)
|
|
47
|
+
|
|
48
|
+
#### Throws[](#throws "Direct link to Throws")
|
|
49
|
+
|
|
50
|
+
Error if token is not provided
|
|
51
|
+
|
|
52
|
+
***
|
|
53
|
+
|
|
54
|
+
### ~~createUserContext()~~[](#createusercontext "Direct link to createusercontext")
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
static createUserContext(
|
|
58
|
+
token: string,
|
|
59
|
+
userId: string,
|
|
60
|
+
userName?: string,
|
|
61
|
+
userEmail?: string): CallerContext & UserContext;
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
#### Parameters[](#parameters-1 "Direct link to Parameters")
|
|
66
|
+
|
|
67
|
+
| Parameter | Type |
|
|
68
|
+
| ------------ | -------- |
|
|
69
|
+
| `token` | `string` |
|
|
70
|
+
| `userId` | `string` |
|
|
71
|
+
| `userName?` | `string` |
|
|
72
|
+
| `userEmail?` | `string` |
|
|
73
|
+
|
|
74
|
+
#### Returns[](#returns-2 "Direct link to Returns")
|
|
75
|
+
|
|
76
|
+
[`CallerContext`](./docs/api/appkit/Interface.CallerContext.md) & [`UserContext`](./docs/api/appkit/TypeAlias.UserContext.md)
|
|
77
|
+
|
|
78
|
+
#### Deprecated[](#deprecated "Direct link to Deprecated")
|
|
79
|
+
|
|
80
|
+
Use ServiceContext.createCallerContext.
|
|
81
|
+
|
|
82
|
+
***
|
|
83
|
+
|
|
84
|
+
### get()[](#get "Direct link to get()")
|
|
85
|
+
|
|
86
|
+
```ts
|
|
87
|
+
static get(): ServiceContextState;
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Get the initialized service context.
|
|
92
|
+
|
|
93
|
+
#### Returns[](#returns-3 "Direct link to Returns")
|
|
94
|
+
|
|
95
|
+
`ServiceContextState`
|
|
96
|
+
|
|
97
|
+
#### Throws[](#throws-1 "Direct link to Throws")
|
|
98
|
+
|
|
99
|
+
Error if not initialized
|
|
100
|
+
|
|
101
|
+
***
|
|
102
|
+
|
|
103
|
+
### getClientOptions()[](#getclientoptions "Direct link to getClientOptions()")
|
|
104
|
+
|
|
105
|
+
```ts
|
|
106
|
+
static getClientOptions(): ClientOptions;
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Get the client options for WorkspaceClient. Exposed for testing purposes.
|
|
111
|
+
|
|
112
|
+
#### Returns[](#returns-4 "Direct link to Returns")
|
|
113
|
+
|
|
114
|
+
`ClientOptions`
|
|
115
|
+
|
|
116
|
+
***
|
|
117
|
+
|
|
118
|
+
### initialize()[](#initialize "Direct link to initialize()")
|
|
119
|
+
|
|
120
|
+
```ts
|
|
121
|
+
static initialize(options?: {
|
|
122
|
+
warehouseId?: string | boolean;
|
|
123
|
+
}, client?: WorkspaceClient): Promise<ServiceContextState>;
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Initialize the service context. Should be called once at app startup. Safe to call multiple times - will return the same instance.
|
|
128
|
+
|
|
129
|
+
#### Parameters[](#parameters-2 "Direct link to Parameters")
|
|
130
|
+
|
|
131
|
+
| Parameter | Type | Description |
|
|
132
|
+
| ---------------------- | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
|
|
133
|
+
| `options?` | { `warehouseId?`: `string` \| `boolean`; } | A resolved warehouse ID, or a boolean enabling discovery. |
|
|
134
|
+
| `options.warehouseId?` | `string` \| `boolean` | - |
|
|
135
|
+
| `client?` | [`WorkspaceClient`](./docs/api/appkit/Interface.WorkspaceClient.md) | Optional pre-configured WorkspaceClient to use instead of creating one from environment credentials. |
|
|
136
|
+
|
|
137
|
+
#### Returns[](#returns-5 "Direct link to Returns")
|
|
138
|
+
|
|
139
|
+
`Promise`<`ServiceContextState`>
|
|
140
|
+
|
|
141
|
+
***
|
|
142
|
+
|
|
143
|
+
### isInitialized()[](#isinitialized "Direct link to isInitialized()")
|
|
144
|
+
|
|
145
|
+
```ts
|
|
146
|
+
static isInitialized(): boolean;
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Check if the service context has been initialized.
|
|
151
|
+
|
|
152
|
+
#### Returns[](#returns-6 "Direct link to Returns")
|
|
153
|
+
|
|
154
|
+
`boolean`
|
|
155
|
+
|
|
156
|
+
***
|
|
157
|
+
|
|
158
|
+
### reset()[](#reset "Direct link to reset()")
|
|
159
|
+
|
|
160
|
+
```ts
|
|
161
|
+
static reset(): void;
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Reset the service context. Only for testing purposes.
|
|
166
|
+
|
|
167
|
+
#### Returns[](#returns-7 "Direct link to Returns")
|
|
168
|
+
|
|
169
|
+
`void`
|
|
@@ -54,7 +54,7 @@ protected readonly optional _clientMessage: string;
|
|
|
54
54
|
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
Client-safe error message. When set, callers serializing the error to a client (SSE, HTTP body) MUST prefer `clientMessage` over `message
|
|
57
|
+
Client-safe error message. When set, callers serializing the error to a client (SSE, HTTP body) MUST prefer `clientMessage` over `message`. `message` may contain raw upstream / SDK text including statement fragments, internal object names, and correlation IDs.
|
|
58
58
|
|
|
59
59
|
Subclasses can set this in their constructor for a fixed sanitized string. When unset, `clientMessage` defaults to a generic per-code string (see the getter), and the raw `message` is kept server-side only.
|
|
60
60
|
|
|
@@ -54,7 +54,7 @@ protected readonly optional _clientMessage: string;
|
|
|
54
54
|
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
Client-safe error message. When set, callers serializing the error to a client (SSE, HTTP body) MUST prefer `clientMessage` over `message
|
|
57
|
+
Client-safe error message. When set, callers serializing the error to a client (SSE, HTTP body) MUST prefer `clientMessage` over `message`. `message` may contain raw upstream / SDK text including statement fragments, internal object names, and correlation IDs.
|
|
58
58
|
|
|
59
59
|
Subclasses can set this in their constructor for a fixed sanitized string. When unset, `clientMessage` defaults to a generic per-code string (see the getter), and the raw `message` is kept server-side only.
|
|
60
60
|
|
|
@@ -5,10 +5,10 @@ function createApp<T>(config: {
|
|
|
5
5
|
cache?: CacheConfig;
|
|
6
6
|
client?: WorkspaceClient;
|
|
7
7
|
disableInternalTelemetry?: boolean;
|
|
8
|
-
onPluginsReady?: (appkit:
|
|
8
|
+
onPluginsReady?: (appkit: AppKitApi<T>) => void | Promise<void>;
|
|
9
9
|
plugins?: T;
|
|
10
10
|
telemetry?: TelemetryConfig;
|
|
11
|
-
}): Promise<
|
|
11
|
+
}): Promise<AppKitApi<T>>;
|
|
12
12
|
|
|
13
13
|
```
|
|
14
14
|
|
|
@@ -24,19 +24,19 @@ Initializes telemetry, cache, and service context, then registers plugins in pha
|
|
|
24
24
|
|
|
25
25
|
## Parameters[](#parameters "Direct link to Parameters")
|
|
26
26
|
|
|
27
|
-
| Parameter | Type
|
|
28
|
-
| ---------------------------------- |
|
|
29
|
-
| `config` | { `cache?`: [`CacheConfig`](./docs/api/appkit/Interface.CacheConfig.md); `client?`: [`WorkspaceClient`](./docs/api/appkit/Interface.WorkspaceClient.md); `disableInternalTelemetry?`: `boolean`; `onPluginsReady?`: (`appkit`: `
|
|
30
|
-
| `config.cache?` | [`CacheConfig`](./docs/api/appkit/Interface.CacheConfig.md)
|
|
31
|
-
| `config.client?` | [`WorkspaceClient`](./docs/api/appkit/Interface.WorkspaceClient.md)
|
|
32
|
-
| `config.disableInternalTelemetry?` | `boolean`
|
|
33
|
-
| `config.onPluginsReady?` | (`appkit`: `
|
|
34
|
-
| `config.plugins?` | `T`
|
|
35
|
-
| `config.telemetry?` | [`TelemetryConfig`](./docs/api/appkit/Interface.TelemetryConfig.md)
|
|
27
|
+
| Parameter | Type | Description |
|
|
28
|
+
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
|
|
29
|
+
| `config` | { `cache?`: [`CacheConfig`](./docs/api/appkit/Interface.CacheConfig.md); `client?`: [`WorkspaceClient`](./docs/api/appkit/Interface.WorkspaceClient.md); `disableInternalTelemetry?`: `boolean`; `onPluginsReady?`: (`appkit`: [`AppKitApi`](./docs/api/appkit/TypeAlias.AppKitApi.md)<`T`>) => `void` \| `Promise`<`void`>; `plugins?`: `T`; `telemetry?`: [`TelemetryConfig`](./docs/api/appkit/Interface.TelemetryConfig.md); } | - |
|
|
30
|
+
| `config.cache?` | [`CacheConfig`](./docs/api/appkit/Interface.CacheConfig.md) | - |
|
|
31
|
+
| `config.client?` | [`WorkspaceClient`](./docs/api/appkit/Interface.WorkspaceClient.md) | - |
|
|
32
|
+
| `config.disableInternalTelemetry?` | `boolean` | - |
|
|
33
|
+
| `config.onPluginsReady?` | (`appkit`: [`AppKitApi`](./docs/api/appkit/TypeAlias.AppKitApi.md)<`T`>) => `void` \| `Promise`<`void`> | Runs after plugin setup but **before** the server starts. |
|
|
34
|
+
| `config.plugins?` | `T` | - |
|
|
35
|
+
| `config.telemetry?` | [`TelemetryConfig`](./docs/api/appkit/Interface.TelemetryConfig.md) | - |
|
|
36
36
|
|
|
37
37
|
## Returns[](#returns "Direct link to Returns")
|
|
38
38
|
|
|
39
|
-
`Promise
|
|
39
|
+
`Promise`<[`AppKitApi`](./docs/api/appkit/TypeAlias.AppKitApi.md)<`T`>>
|
|
40
40
|
|
|
41
41
|
A `PluginMap` keyed by plugin name with typed exports
|
|
42
42
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Function: getCallerContext()
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
function getCallerContext(): CallerContext | undefined;
|
|
5
|
+
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
Get the caller context if one is active, otherwise `undefined`. Unlike `getExecutionContext()`, this does not require `ServiceContext` to be initialized and never throws.
|
|
9
|
+
|
|
10
|
+
## Returns[](#returns "Direct link to Returns")
|
|
11
|
+
|
|
12
|
+
[`CallerContext`](./docs/api/appkit/Interface.CallerContext.md) | `undefined`
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# ~~Function: getCurrentUserId()~~
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
function getCurrentUserId(): string;
|
|
5
|
+
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
## Returns[](#returns "Direct link to Returns")
|
|
9
|
+
|
|
10
|
+
`string`
|
|
11
|
+
|
|
12
|
+
## Deprecated[](#deprecated "Direct link to Deprecated")
|
|
13
|
+
|
|
14
|
+
Use getCurrentPrincipalKey for new cache keys or getCurrentActorId for audit. Preserves the bare user or service ID for existing callers.
|
|
@@ -14,7 +14,7 @@ Get the current execution context.
|
|
|
14
14
|
|
|
15
15
|
## Returns[](#returns "Direct link to Returns")
|
|
16
16
|
|
|
17
|
-
\| `ServiceContextState` | [`CallerContext`](./docs/api/appkit/Interface.CallerContext.md) & `UserContext`
|
|
17
|
+
\| `ServiceContextState` | [`CallerContext`](./docs/api/appkit/Interface.CallerContext.md) & [`UserContext`](./docs/api/appkit/TypeAlias.UserContext.md)
|
|
18
18
|
|
|
19
19
|
## Throws[](#throws "Direct link to Throws")
|
|
20
20
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# ~~Function: getUserContext()~~
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
function getUserContext():
|
|
5
|
+
| CallerContext & UserContext
|
|
6
|
+
| undefined;
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Returns[](#returns "Direct link to Returns")
|
|
11
|
+
|
|
12
|
+
\| [`CallerContext`](./docs/api/appkit/Interface.CallerContext.md) & [`UserContext`](./docs/api/appkit/TypeAlias.UserContext.md) | `undefined`
|
|
13
|
+
|
|
14
|
+
## Deprecated[](#deprecated "Direct link to Deprecated")
|
|
15
|
+
|
|
16
|
+
Use getCallerContext and its principal field.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# ~~Function: isUserContext()~~
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
function isUserContext(ctx: ExecutionContext): ctx is UserContext & Partial<CallerContext>;
|
|
5
|
+
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
## Parameters[](#parameters "Direct link to Parameters")
|
|
9
|
+
|
|
10
|
+
| Parameter | Type |
|
|
11
|
+
| --------- | --------------------------------------------------------------------------- |
|
|
12
|
+
| `ctx` | [`ExecutionContext`](./docs/api/appkit/TypeAlias.ExecutionContext.md) |
|
|
13
|
+
|
|
14
|
+
## Returns[](#returns "Direct link to Returns")
|
|
15
|
+
|
|
16
|
+
`ctx is UserContext & Partial<CallerContext>`
|
|
17
|
+
|
|
18
|
+
## Deprecated[](#deprecated "Direct link to Deprecated")
|
|
19
|
+
|
|
20
|
+
Use isCallerContext. Active caller contexts retain the legacy identity accessors for callers narrowed by this guard.
|