log10x-mcp 1.30.9 → 1.30.12

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.
@@ -11,12 +11,19 @@
11
11
  * The advisor's job is to:
12
12
  * - Surface the AWS infra the Retriever expects (S3 input bucket,
13
13
  * index bucket, 4 SQS queues, IRSA role).
14
- * - Preflight-fail if any of the required AWS resources is missing
15
- * from the discovery snapshot.
14
+ * - List in `blockers` every input a complete plan is still missing,
15
+ * and emit no steps while that list is non-empty. The preflight
16
+ * table is the state report beside it: a `fail` row there is
17
+ * reported (and counted in the envelope's `preflight_summary`),
18
+ * not a gate, because the conditions it reads (kubectl unusable,
19
+ * a release already installed) are not answered by re-invoking
20
+ * with a different argument.
16
21
  * - Emit a values.yaml that wires the infra into the chart.
17
- * - Provide verify probes that prove indexing + querying work.
18
- * - Provide teardown (helm uninstall only — leaves AWS infra alone;
19
- * infra lifecycle is a Terraform concern).
22
+ * - Provide verify probes that prove indexing + querying work,
23
+ * each gated on the storage provider they belong to.
24
+ * - Provide teardown. On AWS, helm uninstall only: infra lifecycle is
25
+ * a Terraform concern. On Azure, the provisioning script's own
26
+ * `--destroy`, which deletes the resource group it created.
20
27
  *
21
28
  * Two storage providers. `aws` is the historical path: S3 buckets, four SQS
22
29
  * queues, an IRSA role. `azure` targets AKS with Azure Blob Storage and Azure
@@ -45,6 +52,13 @@ export interface RetrieverAdviseArgs {
45
52
  * install plan renders the JWT into the `apiKey` slot.
46
53
  */
47
54
  licenseJwt?: string;
55
+ /**
56
+ * Whether `licenseJwt` came from the caller. A JWT the wizard minted on the
57
+ * caller's behalf is used for nothing that lands on disk: `false` keeps the
58
+ * key out of every emitted values file. Defaults to `true`, so a direct
59
+ * caller that passes `licenseJwt` still gets it wired.
60
+ */
61
+ licenseSupplied?: boolean;
48
62
  /** Override: input S3 bucket name. Default: from snapshot. */
49
63
  inputBucket?: string;
50
64
  /** Override: index bucket (with prefix). Default: `<inputBucket>/indexing-results/`. */
@@ -59,8 +73,14 @@ export interface RetrieverAdviseArgs {
59
73
  storageProvider?: RetrieverStorageProvider;
60
74
  /** Azure storage account holding the containers. Required when storageProvider is `azure`. */
61
75
  storageAccount?: string;
62
- /** Azure resource group, for the provisioning command in the plan. */
76
+ /** Azure resource group, for the provisioning command and the teardown in the plan. */
63
77
  resourceGroup?: string;
78
+ /**
79
+ * AKS cluster the release installs into. Used both by the provisioning
80
+ * command and by the `az aks get-credentials` step that points kubectl at
81
+ * the cluster before any kubectl command runs.
82
+ */
83
+ aksCluster?: string;
64
84
  /** Azure region for the provisioning command (e.g. `eastus`). */
65
85
  location?: string;
66
86
  /** Client id of the user-assigned managed identity federated to the release ServiceAccount. */
@@ -98,6 +118,22 @@ export interface RetrieverAdviseArgs {
98
118
  }
99
119
  /** Object store behind the Retriever. */
100
120
  export type RetrieverStorageProvider = 'aws' | 'azure';
121
+ /**
122
+ * Blob containers the provisioning script creates, and the names it creates
123
+ * them under when the plan passes neither `--input-container` nor
124
+ * `--index-container` (which it does not). Read off
125
+ * `scripts/azure/provision-retriever.sh` in chart 1.0.24: the defaults are
126
+ * `logs` and `tenx-index`, and the BlobCreated event subscription the same run
127
+ * creates is filtered to `--subject-begins-with
128
+ * /blobServices/default/containers/<input container>/`.
129
+ *
130
+ * Both facts matter to the caller: a container name other than `logs` names
131
+ * something the script never created, and even once created by hand it carries
132
+ * no event subscription, so an upload into it raises no BlobCreated event and
133
+ * the indexer never hears about the blob.
134
+ */
135
+ export declare const AZURE_SCRIPT_INPUT_CONTAINER = "logs";
136
+ export declare const AZURE_SCRIPT_INDEX_CONTAINER = "tenx-index";
101
137
  /** Chart version carrying the Azure provisioning script this advisor quotes. */
102
138
  export declare const RETRIEVER_CHART_VERSION = "1.0.24";
103
139
  /** Engine image the Azure path documents and the provisioning script pins. */
@@ -106,8 +142,28 @@ export declare const RETRIEVER_IMAGE_TAG = "1.1.78";
106
142
  * Node size for a cluster the script creates. The Azure CLI default
107
143
  * (`Standard_D4d_v4`) is refused on subscriptions that do not carry that
108
144
  * family, which stops a first install dead, so the size is always passed.
145
+ *
146
+ * The value matches the provisioning script's own default. `Standard_D2s_v5`
147
+ * was refused on the subscription the Azure path was proved against, and the
148
+ * script moved to v7; an advisor that keeps passing v5 overrides the working
149
+ * default with the refused one.
109
150
  */
110
- export declare const AKS_NODE_SIZE = "Standard_D2s_v5";
151
+ export declare const AKS_NODE_SIZE = "Standard_D2s_v7";
152
+ /**
153
+ * What the chart labels a retriever pod, and what it names the container.
154
+ *
155
+ * From `retriever-10x` 1.0.24: `templates/deployment.yaml` stamps
156
+ * `app: {{ chart name }}` and `cluster: {{ cluster.name }}` on the pod, and
157
+ * names the container `{{ chart name }}-{{ cluster.name }}`. The default
158
+ * cluster in `values.yaml` is `all-in-one`. Nothing in the chart sets
159
+ * `app.kubernetes.io/instance`, so a selector on that key matches no pod and
160
+ * every probe built on it reports "No resources found" instead of the state
161
+ * it was asked about.
162
+ */
163
+ export declare const RETRIEVER_POD_SELECTOR = "app=retriever-10x";
164
+ export declare const RETRIEVER_CONTAINER = "retriever-10x-all-in-one";
165
+ /** Cluster entry the chart ships, and the suffix on every per-cluster object. */
166
+ export declare const RETRIEVER_CLUSTER_NAME = "all-in-one";
111
167
  /**
112
168
  * The provisioning script that ships with the retriever chart. One run creates
113
169
  * the account, the two containers, the four queues, the managed identity and
@@ -126,21 +182,88 @@ export declare const AZURE_PROVISION_SCRIPT = "retriever-10x/scripts/azure/provi
126
182
  * the script's `--index-path` (default `tenx`); the literal `tenx` segment
127
183
  * after it is the engine's own, and `<app>` is the first path segment of the
128
184
  * indexed blob, which is also what the query's `name` field must equal.
185
+ *
186
+ * One level below the queryId comes a slice segment, `<sliceFromMs>_<sliceToMs>`,
187
+ * because each scan task writes under the time slice it was dispatched for
188
+ * (`IndexObjectQueryResultsWriter`: `{queryId}/{sliceFrom}_{sliceTo}/{worker}.jsonl`).
189
+ * A listing that stops at the queryId prefix sees folders rather than objects,
190
+ * so every list in this plan is recursive.
129
191
  */
130
- export declare const AZURE_RESULT_PATH = "<index-container>/<index-path>/tenx/<app>/qr/<queryId>/*.jsonl";
192
+ export declare const AZURE_RESULT_PATH = "<index-container>/<index-path>/tenx/<app>/qr/<queryId>/<sliceFromMs>_<sliceToMs>/<hash>.jsonl";
193
+ /**
194
+ * How long a bounded poll of the results prefix runs before the answer comes
195
+ * from `_DONE.json` instead. Ten polls fifteen seconds apart is two and a half
196
+ * minutes, which covers a one-hour window sliced a minute at a time on a
197
+ * single-node cluster.
198
+ */
199
+ export declare const AZURE_RESULT_POLL_ATTEMPTS = 10;
200
+ export declare const AZURE_RESULT_POLL_INTERVAL_SEC = 15;
131
201
  /**
132
202
  * Two facts a first install needs and neither the chart nor the script states:
133
203
  * the operator's own data-plane access, and what `_DONE.json` is not.
134
204
  */
135
205
  export declare const AZURE_OPERATOR_ROLES_NOTE: string;
136
206
  export declare const AZURE_RESULTS_NOTE: string;
207
+ /**
208
+ * P1 from the second acceptance round. Indexing keys on the timestamp parsed
209
+ * out of the event, and the sample query asks for `now("-1h")` to `now()`, so
210
+ * a sample line stamped with a fixed hour matches its own query only during
211
+ * that hour. The line is therefore generated by the command, at the moment the
212
+ * operator runs it.
213
+ */
214
+ export declare const AZURE_SAMPLE_LOG_COMMAND = "printf '%s\\n' \"$(date -u +%Y-%m-%dT%H:%M:%SZ) ERROR checkout failed for order ORD-DEMO-1\" > ./test.log";
215
+ export declare const AZURE_EVENT_TIME_NOTE: string;
216
+ /**
217
+ * P7 from the second acceptance round. Every index run logs a 403 that reads
218
+ * as a failure and is the expected state on this path.
219
+ */
220
+ export declare const AZURE_FLAT_NAMESPACE_403_NOTE: string;
221
+ /**
222
+ * P6 from the second acceptance round. Storage account names live in one
223
+ * global namespace, which neither the question nor its example said.
224
+ */
225
+ export declare const AZURE_STORAGE_ACCOUNT_UNIQUE_NOTE: string;
226
+ /**
227
+ * P5 from the second acceptance round. `log10x_discover_env` probes kubectl
228
+ * and AWS. On the machine the acceptance run used it enumerated an unrelated
229
+ * AWS estate and stamped `estate=serverless` into a snapshot that then backed
230
+ * an Azure plan.
231
+ */
232
+ export declare const AZURE_SNAPSHOT_SCOPE_NOTE: string;
137
233
  export declare const AZURE_API_KEY_NOTE: string;
234
+ /**
235
+ * A licence the caller did not hand over is never written into an emitted
236
+ * values file. The file stays on the operator's disk and the plan tells them
237
+ * to keep it, so a key put there without being asked for is a key leaked into
238
+ * a file nobody agreed to hold.
239
+ */
240
+ export declare function licenseNotEmittedNote(storageProvider: RetrieverStorageProvider): string;
241
+ /** Node-size refusals stop a first install dead, so the retry path is stated up front. */
242
+ export declare const AZURE_NODE_SIZE_NOTE: string;
243
+ /**
244
+ * Azure teardown. The resource group holds the storage account, the queues,
245
+ * the managed identity, the Event Grid subscription and the AKS cluster, and
246
+ * the script's `--destroy` deletes the group and everything in it. No
247
+ * Terraform state exists on this path.
248
+ */
249
+ export declare function buildAzureTeardownCommand(resourceGroup: string): string;
250
+ /**
251
+ * The query body the provisioning script prints in its own runbook. `name`
252
+ * has to equal the first path segment of the uploaded blob, which the upload
253
+ * step below makes `app`.
254
+ */
255
+ export declare const AZURE_SAMPLE_QUERY_BODY = "{\"name\":\"app\",\"from\":\"now(\\\"-1h\\\")\",\"to\":\"now()\",\"search\":\"severity_level==\\\"ERROR\\\"\",\"writeResults\":true}";
138
256
  /**
139
257
  * The provisioning commands, in the order a customer runs them: add the repo,
140
258
  * pull and untar the chart, then run the script from the untarred directory.
141
259
  * `helm repo add` on a repo that is already present skips without refreshing
142
260
  * the index, so `helm repo update` runs before the pull or `--version` can
143
261
  * miss a freshly published chart.
262
+ *
263
+ * The script is invoked through `bash`. `helm package` writes every file in a
264
+ * chart tarball as mode 0644 whatever its mode in git, so the copy that comes
265
+ * out of `helm pull --untar` carries no exec bit and a direct invocation is
266
+ * refused with "permission denied".
144
267
  */
145
268
  export declare function buildAzureProvisionCommands(opts: {
146
269
  resourceGroup: string;