@7k-inari/api-client 0.7.0-d5a9ea1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/gen/ts/proto/inari/extensions/v1/agent_gateway_pb.ts +56 -0
- package/gen/ts/rest/client.ts +8365 -2492
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -11,6 +11,7 @@ Canonical architecture & development plan: [inari-docs/docs/architecture/inari-p
|
|
|
11
11
|
|
|
12
12
|
- `proto/inari/agent/v1/` — agent EventStream protocol (bidirectional gRPC stream, CloudEvents-style envelope)
|
|
13
13
|
- `proto/inari/plugin/v1/` — versioned plugin contract (hashicorp go-plugin model)
|
|
14
|
+
- `proto/inari/extensions/v1/` — extension-to-control-plane AgentGateway contract (Connect RPC; see `docs/extension-gateway.md`)
|
|
14
15
|
- `openapi/openapi.yaml` — REST surface for console/CLI (OpenAPI 3.0)
|
|
15
16
|
- `gen/go/`, `gen/ts/` — generated Go and TypeScript clients, **committed to the repo** (see below)
|
|
16
17
|
|
|
@@ -25,6 +26,8 @@ Prerequisites: `buf`, Go, Node.js, `oapi-codegen`, `yq` (v4, for `import-openapi
|
|
|
25
26
|
- `make build` / `make test` — compile and smoke-test both clients
|
|
26
27
|
- `make ci` — the full local gate
|
|
27
28
|
|
|
29
|
+
AgentGateway uses the normal Connect generators; gRPC stubs remain limited to the plugin contract. Its non-protobuf routing metadata constants are maintained in `gen/go/inari/extensions/v1/metadata.go`, a hand-written companion that code generation does not overwrite.
|
|
30
|
+
|
|
28
31
|
Note: `npm ci` must run with dev dependencies (`npm ci --include=dev`, or unset `NODE_ENV=production`); Orval and TypeScript are devDependencies.
|
|
29
32
|
|
|
30
33
|
## Generated code policy
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v2.16.0 with parameter "target=ts"
|
|
2
|
+
// @generated from file inari/extensions/v1/agent_gateway.proto (package inari.extensions.v1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
import type { GenFile, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
6
|
+
import { fileDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
|
|
7
|
+
import type { CommandAckSchema, InvokeActionSchema } from "../../agent/v1/commands_pb";
|
|
8
|
+
import { file_inari_agent_v1_commands } from "../../agent/v1/commands_pb";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Describes the file inari/extensions/v1/agent_gateway.proto.
|
|
12
|
+
*/
|
|
13
|
+
export const file_inari_extensions_v1_agent_gateway: GenFile = /*@__PURE__*/
|
|
14
|
+
fileDesc("CidpbmFyaS9leHRlbnNpb25zL3YxL2FnZW50X2dhdGV3YXkucHJvdG8SE2luYXJpLmV4dGVuc2lvbnMudjEyWAoMQWdlbnRHYXRld2F5EkgKDEludm9rZUFjdGlvbhIcLmluYXJpLmFnZW50LnYxLkludm9rZUFjdGlvbhoaLmluYXJpLmFnZW50LnYxLkNvbW1hbmRBY2tCR1pFZ2l0aHViLmNvbS83Sy1JbmFyaS9pbmFyaS1hcGkvZ2VuL2dvL2luYXJpL2V4dGVuc2lvbnMvdjE7ZXh0ZW5zaW9uc3YxYgZwcm90bzM", [file_inari_agent_v1_commands]);
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* AgentGateway accepts an imperative operation from an authenticated backend
|
|
18
|
+
* extension and returns the tenant agent's acknowledgement. The existing
|
|
19
|
+
* procedure is preserved for wire compatibility:
|
|
20
|
+
* /inari.extensions.v1.AgentGateway/InvokeAction.
|
|
21
|
+
*
|
|
22
|
+
* Routing and credentials travel in request metadata rather than in the
|
|
23
|
+
* persisted command payload:
|
|
24
|
+
* - Authorization: Bearer <per-extension client_credentials JWT>
|
|
25
|
+
* - x-inari-tenant: authenticated organization ID
|
|
26
|
+
* - x-inari-cluster: target cluster ID
|
|
27
|
+
* - x-inari-user-credential: optional in-memory downstream user credential
|
|
28
|
+
* - x-inari-user-credential-ref: optional opaque control-plane vault ref
|
|
29
|
+
*
|
|
30
|
+
* The raw credential and credential reference are mutually exclusive. Raw user
|
|
31
|
+
* credentials are never persisted or sent to the agent; only a vault reference
|
|
32
|
+
* reaches InvokeAction.user_credential_ref. The control plane owns command_id,
|
|
33
|
+
* journaling, tenant/cluster authorization, and idempotency. Implementations
|
|
34
|
+
* fail closed with UNAVAILABLE when no live agent can accept the command.
|
|
35
|
+
* The established service and message names are retained for wire compatibility;
|
|
36
|
+
* introducing conventional suffixes or wrapper messages would break consumers.
|
|
37
|
+
* buf:lint:ignore SERVICE_SUFFIX
|
|
38
|
+
*
|
|
39
|
+
* @generated from service inari.extensions.v1.AgentGateway
|
|
40
|
+
*/
|
|
41
|
+
export const AgentGateway: GenService<{
|
|
42
|
+
/**
|
|
43
|
+
* buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
|
|
44
|
+
* buf:lint:ignore RPC_REQUEST_STANDARD_NAME
|
|
45
|
+
* buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
|
|
46
|
+
*
|
|
47
|
+
* @generated from rpc inari.extensions.v1.AgentGateway.InvokeAction
|
|
48
|
+
*/
|
|
49
|
+
invokeAction: {
|
|
50
|
+
methodKind: "unary";
|
|
51
|
+
input: typeof InvokeActionSchema;
|
|
52
|
+
output: typeof CommandAckSchema;
|
|
53
|
+
},
|
|
54
|
+
}> = /*@__PURE__*/
|
|
55
|
+
serviceDesc(file_inari_extensions_v1_agent_gateway, 0);
|
|
56
|
+
|