@link-assistant/router 0.0.0-stage → 1.25.6

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 (159) hide show
  1. package/README.md +35 -2
  2. package/catalog.json +68422 -0
  3. package/index.d.ts +5932 -0
  4. package/index.js +224 -0
  5. package/native.d.ts +106 -0
  6. package/package.json +61 -4
  7. package/portable/policy.mjs +117 -0
  8. package/schemas/accounts-list.v1.json +323 -0
  9. package/schemas/accounts-pause.v1.json +97 -0
  10. package/schemas/accounts-policy.v1.json +214 -0
  11. package/schemas/accounts-resume.v1.json +97 -0
  12. package/schemas/auth-claude.v1.json +97 -0
  13. package/schemas/auth-clear.v1.json +97 -0
  14. package/schemas/auth-codex.v1.json +97 -0
  15. package/schemas/auth-gh.v1.json +97 -0
  16. package/schemas/auth-import.v1.json +167 -0
  17. package/schemas/auth-status.v1.json +387 -0
  18. package/schemas/cli-error.v1.json +97 -0
  19. package/schemas/clients-backup-create.v1.json +97 -0
  20. package/schemas/clients-backup-list.v1.json +234 -0
  21. package/schemas/clients-backup-restore.v1.json +97 -0
  22. package/schemas/clients-backup-verify.v1.json +125 -0
  23. package/schemas/clients-doctor.v1.json +249 -0
  24. package/schemas/clients-install.v1.json +164 -0
  25. package/schemas/clients-list.v1.json +194 -0
  26. package/schemas/clients-reinstall.v1.json +164 -0
  27. package/schemas/clients-remove.v1.json +97 -0
  28. package/schemas/clients-repair.v1.json +109 -0
  29. package/schemas/clients-reset.v1.json +113 -0
  30. package/schemas/clients-setup.v1.json +97 -0
  31. package/schemas/clients-show.v1.json +191 -0
  32. package/schemas/clients-update.v1.json +164 -0
  33. package/schemas/configure.v1.json +97 -0
  34. package/schemas/contracts.v1.json +106 -0
  35. package/schemas/data-backup.v1.json +32 -0
  36. package/schemas/deploy.v1.json +546 -0
  37. package/schemas/doctor.v1.json +324 -0
  38. package/schemas/local-deployment.v1.json +364 -0
  39. package/schemas/logs-anomalies.v1.json +112 -0
  40. package/schemas/logs-show.v1.json +127 -0
  41. package/schemas/logs-summary.v1.json +129 -0
  42. package/schemas/model-catalog.v1.json +117 -0
  43. package/schemas/models-explain.v1.json +325 -0
  44. package/schemas/preservation.v1.json +47 -0
  45. package/schemas/providers-add.v1.json +185 -0
  46. package/schemas/providers-import.v1.json +97 -0
  47. package/schemas/providers-list.v1.json +182 -0
  48. package/schemas/providers-remove.v1.json +97 -0
  49. package/schemas/providers-show.v1.json +179 -0
  50. package/schemas/serve.v1.json +97 -0
  51. package/schemas/server-claim.v1.json +97 -0
  52. package/schemas/server-reap.v1.json +97 -0
  53. package/schemas/server-remove.v1.json +97 -0
  54. package/schemas/server-start.v1.json +97 -0
  55. package/schemas/server-status.v1.json +197 -0
  56. package/schemas/server-stop.v1.json +97 -0
  57. package/schemas/server-use.v1.json +97 -0
  58. package/schemas/staging.v1.json +47 -0
  59. package/schemas/tls-ca.v1.json +97 -0
  60. package/schemas/tls-generate.v1.json +97 -0
  61. package/schemas/tokens-expire.v1.json +97 -0
  62. package/schemas/tokens-import.v1.json +192 -0
  63. package/schemas/tokens-issue.v1.json +94 -0
  64. package/schemas/tokens-list.v1.json +272 -0
  65. package/schemas/tokens-recover-admin.v1.json +116 -0
  66. package/schemas/tokens-revoke.v1.json +97 -0
  67. package/schemas/tokens-rotate.v1.json +94 -0
  68. package/schemas/tokens-show.v1.json +269 -0
  69. package/schemas/tunnel-down.v1.json +97 -0
  70. package/schemas/tunnel-status.v1.json +165 -0
  71. package/schemas/tunnel-up.v1.json +97 -0
  72. package/schemas/usage.v1.json +621 -0
  73. package/schemas/verification.v1.json +254 -0
  74. package/schemas/verify.v1.json +338 -0
  75. package/schemas/version.v1.json +103 -0
  76. package/schemas/with.v1.json +105 -0
  77. package/src/accounts.mjs +233 -0
  78. package/src/activitypub.mjs +23 -0
  79. package/src/admin-assets.mjs +16 -0
  80. package/src/admin.mjs +108 -0
  81. package/src/affinities.mjs +180 -0
  82. package/src/affinity-schema-descriptor.mjs +2 -0
  83. package/src/affinity-schema.mjs +185 -0
  84. package/src/assets/admin/assets/app.js +1 -0
  85. package/src/assets/admin/assets/react.js +9 -0
  86. package/src/assets/admin/assets/rolldown-runtime.js +1 -0
  87. package/src/assets/admin/assets/ui-vendor.js +3 -0
  88. package/src/assets/admin/index.html +16 -0
  89. package/src/auth-service.mjs +149 -0
  90. package/src/claude-process-session.mjs +26 -0
  91. package/src/cli-output.mjs +21 -0
  92. package/src/cli.mjs +84 -0
  93. package/src/client-ca.mjs +8 -0
  94. package/src/client-catalog.mjs +52 -0
  95. package/src/client-codex-catalog.mjs +18 -0
  96. package/src/client-configure.mjs +72 -0
  97. package/src/client-files.mjs +82 -0
  98. package/src/client-global-repair.mjs +19 -0
  99. package/src/client-global-state.mjs +19 -0
  100. package/src/client-global.mjs +43 -0
  101. package/src/client-json.mjs +54 -0
  102. package/src/client-launch-plan.mjs +28 -0
  103. package/src/client-launch.mjs +35 -0
  104. package/src/client-persistent.mjs +66 -0
  105. package/src/client-process-profile.mjs +52 -0
  106. package/src/client-process-settings.mjs +36 -0
  107. package/src/client-process.mjs +44 -0
  108. package/src/client-profile-backup.mjs +29 -0
  109. package/src/client-remote-health.mjs +7 -0
  110. package/src/client-remote.mjs +55 -0
  111. package/src/client-run-credential.mjs +38 -0
  112. package/src/client-setup.mjs +97 -0
  113. package/src/client-status.mjs +102 -0
  114. package/src/client-toml-cst.mjs +71 -0
  115. package/src/client-transaction.mjs +48 -0
  116. package/src/codex-login.mjs +121 -0
  117. package/src/codex-loopback-transport.mjs +34 -0
  118. package/src/codex-loopback.mjs +60 -0
  119. package/src/config.mjs +198 -0
  120. package/src/core.mjs +198 -0
  121. package/src/credential-operations.mjs +119 -0
  122. package/src/doublets.mjs +157 -0
  123. package/src/emergency-auth.mjs +91 -0
  124. package/src/file-lock.mjs +107 -0
  125. package/src/gemini-protocol.mjs +133 -0
  126. package/src/geolocation.mjs +46 -0
  127. package/src/git-proxy.mjs +52 -0
  128. package/src/github-proxy.mjs +74 -0
  129. package/src/http-management.mjs +36 -0
  130. package/src/http-route-contract.mjs +479 -0
  131. package/src/index.mjs +4 -0
  132. package/src/local-router-discovery.mjs +31 -0
  133. package/src/managed-server.mjs +411 -0
  134. package/src/management-access.mjs +76 -0
  135. package/src/native-service.mjs +392 -0
  136. package/src/oauth.mjs +547 -0
  137. package/src/operation-input.mjs +20 -0
  138. package/src/operations.mjs +378 -0
  139. package/src/protocols.mjs +229 -0
  140. package/src/provider-manifest.mjs +46 -0
  141. package/src/provider-provision.mjs +24 -0
  142. package/src/remote-operations.mjs +166 -0
  143. package/src/request-log.mjs +99 -0
  144. package/src/resources.mjs +290 -0
  145. package/src/response-contracts.mjs +147 -0
  146. package/src/responses.mjs +103 -0
  147. package/src/routing.mjs +40 -0
  148. package/src/sensitive-data-sse.mjs +121 -0
  149. package/src/sensitive-data.mjs +254 -0
  150. package/src/server.mjs +552 -0
  151. package/src/storage.mjs +367 -0
  152. package/src/streams.mjs +232 -0
  153. package/src/token-import.mjs +68 -0
  154. package/src/token-reservation.mjs +8 -0
  155. package/src/tokens.mjs +172 -0
  156. package/src/usage.mjs +54 -0
  157. package/src/websocket-relay.mjs +131 -0
  158. package/testing.d.ts +7 -0
  159. package/testing.js +57 -0
@@ -0,0 +1,164 @@
1
+ {
2
+ "$defs": {
3
+ "MaintenancePlan": {
4
+ "additionalProperties": false,
5
+ "properties": {
6
+ "backup_id": {
7
+ "type": [
8
+ "string",
9
+ "null"
10
+ ]
11
+ },
12
+ "binary": {
13
+ "type": [
14
+ "string",
15
+ "null"
16
+ ]
17
+ },
18
+ "channel": {
19
+ "type": [
20
+ "string",
21
+ "null"
22
+ ]
23
+ },
24
+ "client": {
25
+ "type": "string"
26
+ },
27
+ "command": {
28
+ "items": {
29
+ "type": "string"
30
+ },
31
+ "type": "array"
32
+ },
33
+ "method": {
34
+ "type": "string"
35
+ },
36
+ "operation": {
37
+ "type": "string"
38
+ },
39
+ "preserved_profiles": {
40
+ "items": {
41
+ "type": "string"
42
+ },
43
+ "type": "array"
44
+ },
45
+ "reason": {
46
+ "type": [
47
+ "string",
48
+ "null"
49
+ ]
50
+ },
51
+ "status": {
52
+ "type": "string"
53
+ },
54
+ "version_after": {
55
+ "type": [
56
+ "string",
57
+ "null"
58
+ ]
59
+ },
60
+ "version_before": {
61
+ "type": [
62
+ "string",
63
+ "null"
64
+ ]
65
+ }
66
+ },
67
+ "required": [
68
+ "client",
69
+ "operation",
70
+ "status",
71
+ "method",
72
+ "command",
73
+ "preserved_profiles"
74
+ ],
75
+ "title": "Plan",
76
+ "type": "object"
77
+ }
78
+ },
79
+ "$id": "link-assistant-router/clients-install/v1",
80
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
81
+ "additionalProperties": false,
82
+ "allOf": [
83
+ {
84
+ "else": {
85
+ "properties": {
86
+ "exit_code": {
87
+ "minimum": 1,
88
+ "type": "integer"
89
+ }
90
+ }
91
+ },
92
+ "if": {
93
+ "properties": {
94
+ "success": {
95
+ "const": true
96
+ }
97
+ }
98
+ },
99
+ "then": {
100
+ "properties": {
101
+ "exit_code": {
102
+ "const": 0
103
+ }
104
+ }
105
+ }
106
+ }
107
+ ],
108
+ "properties": {
109
+ "data": {
110
+ "anyOf": [
111
+ {
112
+ "items": {
113
+ "$ref": "#/$defs/MaintenancePlan"
114
+ },
115
+ "type": "array"
116
+ },
117
+ {
118
+ "additionalProperties": false,
119
+ "properties": {
120
+ "output": {
121
+ "items": {
122
+ "type": "string"
123
+ },
124
+ "type": "array"
125
+ }
126
+ },
127
+ "required": [
128
+ "output"
129
+ ],
130
+ "type": "object"
131
+ }
132
+ ]
133
+ },
134
+ "diagnostics": {
135
+ "items": {
136
+ "type": "string"
137
+ },
138
+ "type": "array"
139
+ },
140
+ "exit_code": {
141
+ "maximum": 255,
142
+ "minimum": 0,
143
+ "type": "integer"
144
+ },
145
+ "operation": {
146
+ "const": "clients.install"
147
+ },
148
+ "schema": {
149
+ "const": "link-assistant-router/clients-install/v1"
150
+ },
151
+ "success": {
152
+ "type": "boolean"
153
+ }
154
+ },
155
+ "required": [
156
+ "schema",
157
+ "operation",
158
+ "success",
159
+ "exit_code",
160
+ "data",
161
+ "diagnostics"
162
+ ],
163
+ "type": "object"
164
+ }
@@ -0,0 +1,194 @@
1
+ {
2
+ "$defs": {
3
+ "ClientStatus": {
4
+ "additionalProperties": false,
5
+ "description": "Secret-free state returned by `clients list` and `clients show`.",
6
+ "properties": {
7
+ "base_url": {
8
+ "type": [
9
+ "string",
10
+ "null"
11
+ ]
12
+ },
13
+ "client": {
14
+ "type": "string"
15
+ },
16
+ "config_path": {
17
+ "type": "string"
18
+ },
19
+ "configured": {
20
+ "type": "boolean"
21
+ },
22
+ "conflicts": {
23
+ "description": "Routing-critical key names which disagree; values are never retained.",
24
+ "items": {
25
+ "type": "string"
26
+ },
27
+ "type": "array"
28
+ },
29
+ "dialect": {
30
+ "type": "string"
31
+ },
32
+ "effective_source": {
33
+ "anyOf": [
34
+ {
35
+ "$ref": "#/$defs/ClientStatus_ConfigSource"
36
+ },
37
+ {
38
+ "type": "null"
39
+ }
40
+ ],
41
+ "description": "Highest-precedence source which currently selects the endpoint."
42
+ },
43
+ "installed": {
44
+ "type": "boolean"
45
+ },
46
+ "ownership_state": {
47
+ "$ref": "#/$defs/ClientStatus_OwnershipState",
48
+ "description": "Router ownership of the effective routing configuration."
49
+ },
50
+ "token_env": {
51
+ "type": [
52
+ "string",
53
+ "null"
54
+ ]
55
+ },
56
+ "token_env_set": {
57
+ "type": "boolean"
58
+ },
59
+ "unreadable": {
60
+ "description": "Why this client's configuration could not be read, if it could not.\n\nA damaged file is a property of one row, not of the listing: propagating\nit ended the table at that client and silently hid every client after\nit, while the error named a *different* client than the one missing\n(issue #304).",
61
+ "type": [
62
+ "string",
63
+ "null"
64
+ ]
65
+ },
66
+ "unsupported": {
67
+ "description": "Why the router cannot manage this client at all, if it cannot.\n\n`configured: false` is indistinguishable from a real answer for a\nclient whose reader is a hardcoded `None` (issue #303).",
68
+ "type": [
69
+ "string",
70
+ "null"
71
+ ]
72
+ }
73
+ },
74
+ "required": [
75
+ "client",
76
+ "installed",
77
+ "configured",
78
+ "config_path",
79
+ "dialect",
80
+ "token_env_set",
81
+ "ownership_state",
82
+ "conflicts"
83
+ ],
84
+ "title": "ClientStatus",
85
+ "type": "object"
86
+ },
87
+ "ClientStatus_ConfigSource": {
88
+ "description": "Highest-precedence source selecting the endpoint.",
89
+ "enum": [
90
+ "ambient-environment",
91
+ "public-config",
92
+ "managed-environment",
93
+ "ownership-metadata"
94
+ ],
95
+ "type": "string"
96
+ },
97
+ "ClientStatus_OwnershipState": {
98
+ "description": "Who owns the routing configuration currently effective for a client.",
99
+ "enum": [
100
+ "unconfigured",
101
+ "foreign",
102
+ "managed-intact",
103
+ "managed-drifted",
104
+ "ambiguous"
105
+ ],
106
+ "type": "string"
107
+ }
108
+ },
109
+ "$id": "link-assistant-router/clients-list/v1",
110
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
111
+ "additionalProperties": false,
112
+ "allOf": [
113
+ {
114
+ "else": {
115
+ "properties": {
116
+ "exit_code": {
117
+ "minimum": 1,
118
+ "type": "integer"
119
+ }
120
+ }
121
+ },
122
+ "if": {
123
+ "properties": {
124
+ "success": {
125
+ "const": true
126
+ }
127
+ }
128
+ },
129
+ "then": {
130
+ "properties": {
131
+ "exit_code": {
132
+ "const": 0
133
+ }
134
+ }
135
+ }
136
+ }
137
+ ],
138
+ "properties": {
139
+ "data": {
140
+ "anyOf": [
141
+ {
142
+ "items": {
143
+ "$ref": "#/$defs/ClientStatus"
144
+ },
145
+ "type": "array"
146
+ },
147
+ {
148
+ "additionalProperties": false,
149
+ "properties": {
150
+ "output": {
151
+ "items": {
152
+ "type": "string"
153
+ },
154
+ "type": "array"
155
+ }
156
+ },
157
+ "required": [
158
+ "output"
159
+ ],
160
+ "type": "object"
161
+ }
162
+ ]
163
+ },
164
+ "diagnostics": {
165
+ "items": {
166
+ "type": "string"
167
+ },
168
+ "type": "array"
169
+ },
170
+ "exit_code": {
171
+ "maximum": 255,
172
+ "minimum": 0,
173
+ "type": "integer"
174
+ },
175
+ "operation": {
176
+ "const": "clients.list"
177
+ },
178
+ "schema": {
179
+ "const": "link-assistant-router/clients-list/v1"
180
+ },
181
+ "success": {
182
+ "type": "boolean"
183
+ }
184
+ },
185
+ "required": [
186
+ "schema",
187
+ "operation",
188
+ "success",
189
+ "exit_code",
190
+ "data",
191
+ "diagnostics"
192
+ ],
193
+ "type": "object"
194
+ }
@@ -0,0 +1,164 @@
1
+ {
2
+ "$defs": {
3
+ "MaintenancePlan": {
4
+ "additionalProperties": false,
5
+ "properties": {
6
+ "backup_id": {
7
+ "type": [
8
+ "string",
9
+ "null"
10
+ ]
11
+ },
12
+ "binary": {
13
+ "type": [
14
+ "string",
15
+ "null"
16
+ ]
17
+ },
18
+ "channel": {
19
+ "type": [
20
+ "string",
21
+ "null"
22
+ ]
23
+ },
24
+ "client": {
25
+ "type": "string"
26
+ },
27
+ "command": {
28
+ "items": {
29
+ "type": "string"
30
+ },
31
+ "type": "array"
32
+ },
33
+ "method": {
34
+ "type": "string"
35
+ },
36
+ "operation": {
37
+ "type": "string"
38
+ },
39
+ "preserved_profiles": {
40
+ "items": {
41
+ "type": "string"
42
+ },
43
+ "type": "array"
44
+ },
45
+ "reason": {
46
+ "type": [
47
+ "string",
48
+ "null"
49
+ ]
50
+ },
51
+ "status": {
52
+ "type": "string"
53
+ },
54
+ "version_after": {
55
+ "type": [
56
+ "string",
57
+ "null"
58
+ ]
59
+ },
60
+ "version_before": {
61
+ "type": [
62
+ "string",
63
+ "null"
64
+ ]
65
+ }
66
+ },
67
+ "required": [
68
+ "client",
69
+ "operation",
70
+ "status",
71
+ "method",
72
+ "command",
73
+ "preserved_profiles"
74
+ ],
75
+ "title": "Plan",
76
+ "type": "object"
77
+ }
78
+ },
79
+ "$id": "link-assistant-router/clients-reinstall/v1",
80
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
81
+ "additionalProperties": false,
82
+ "allOf": [
83
+ {
84
+ "else": {
85
+ "properties": {
86
+ "exit_code": {
87
+ "minimum": 1,
88
+ "type": "integer"
89
+ }
90
+ }
91
+ },
92
+ "if": {
93
+ "properties": {
94
+ "success": {
95
+ "const": true
96
+ }
97
+ }
98
+ },
99
+ "then": {
100
+ "properties": {
101
+ "exit_code": {
102
+ "const": 0
103
+ }
104
+ }
105
+ }
106
+ }
107
+ ],
108
+ "properties": {
109
+ "data": {
110
+ "anyOf": [
111
+ {
112
+ "items": {
113
+ "$ref": "#/$defs/MaintenancePlan"
114
+ },
115
+ "type": "array"
116
+ },
117
+ {
118
+ "additionalProperties": false,
119
+ "properties": {
120
+ "output": {
121
+ "items": {
122
+ "type": "string"
123
+ },
124
+ "type": "array"
125
+ }
126
+ },
127
+ "required": [
128
+ "output"
129
+ ],
130
+ "type": "object"
131
+ }
132
+ ]
133
+ },
134
+ "diagnostics": {
135
+ "items": {
136
+ "type": "string"
137
+ },
138
+ "type": "array"
139
+ },
140
+ "exit_code": {
141
+ "maximum": 255,
142
+ "minimum": 0,
143
+ "type": "integer"
144
+ },
145
+ "operation": {
146
+ "const": "clients.reinstall"
147
+ },
148
+ "schema": {
149
+ "const": "link-assistant-router/clients-reinstall/v1"
150
+ },
151
+ "success": {
152
+ "type": "boolean"
153
+ }
154
+ },
155
+ "required": [
156
+ "schema",
157
+ "operation",
158
+ "success",
159
+ "exit_code",
160
+ "data",
161
+ "diagnostics"
162
+ ],
163
+ "type": "object"
164
+ }
@@ -0,0 +1,97 @@
1
+ {
2
+ "$defs": {},
3
+ "$id": "link-assistant-router/clients-remove/v1",
4
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
5
+ "additionalProperties": false,
6
+ "allOf": [
7
+ {
8
+ "else": {
9
+ "properties": {
10
+ "exit_code": {
11
+ "minimum": 1,
12
+ "type": "integer"
13
+ }
14
+ }
15
+ },
16
+ "if": {
17
+ "properties": {
18
+ "success": {
19
+ "const": true
20
+ }
21
+ }
22
+ },
23
+ "then": {
24
+ "properties": {
25
+ "exit_code": {
26
+ "const": 0
27
+ }
28
+ }
29
+ }
30
+ }
31
+ ],
32
+ "properties": {
33
+ "data": {
34
+ "anyOf": [
35
+ {
36
+ "additionalProperties": false,
37
+ "properties": {
38
+ "output": {
39
+ "items": {
40
+ "type": "string"
41
+ },
42
+ "type": "array"
43
+ }
44
+ },
45
+ "required": [
46
+ "output"
47
+ ],
48
+ "type": "object"
49
+ },
50
+ {
51
+ "additionalProperties": false,
52
+ "properties": {
53
+ "output": {
54
+ "items": {
55
+ "type": "string"
56
+ },
57
+ "type": "array"
58
+ }
59
+ },
60
+ "required": [
61
+ "output"
62
+ ],
63
+ "type": "object"
64
+ }
65
+ ]
66
+ },
67
+ "diagnostics": {
68
+ "items": {
69
+ "type": "string"
70
+ },
71
+ "type": "array"
72
+ },
73
+ "exit_code": {
74
+ "maximum": 255,
75
+ "minimum": 0,
76
+ "type": "integer"
77
+ },
78
+ "operation": {
79
+ "const": "clients.remove"
80
+ },
81
+ "schema": {
82
+ "const": "link-assistant-router/clients-remove/v1"
83
+ },
84
+ "success": {
85
+ "type": "boolean"
86
+ }
87
+ },
88
+ "required": [
89
+ "schema",
90
+ "operation",
91
+ "success",
92
+ "exit_code",
93
+ "data",
94
+ "diagnostics"
95
+ ],
96
+ "type": "object"
97
+ }