@vectros-ai/cli 0.6.5 → 0.6.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.
package/dist/cli.mjs CHANGED
@@ -481,10 +481,18 @@ var DocumentRequest;
481
481
  Text: "TEXT",
482
482
  None: "NONE"
483
483
  };
484
+ DocumentRequest2.Status = {
485
+ Active: "ACTIVE",
486
+ Archived: "ARCHIVED"
487
+ };
484
488
  })(DocumentRequest || (DocumentRequest = {}));
485
489
  var DocumentResponse;
486
490
  ((DocumentResponse2) => {
487
491
  DocumentResponse2.Status = {
492
+ Active: "ACTIVE",
493
+ Archived: "ARCHIVED"
494
+ };
495
+ DocumentResponse2.IndexStatus = {
488
496
  PendingUpload: "PENDING_UPLOAD",
489
497
  Uploaded: "UPLOADED",
490
498
  Extracting: "EXTRACTING",
@@ -5255,7 +5263,7 @@ var DocumentsClient = class {
5255
5263
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/documents/{id}/versions");
5256
5264
  }
5257
5265
  /**
5258
- * Starts a file-based document by returning a short-lived presigned S3 PUT URL. Upload the file bytes directly to `uploadUrl`; the document is then automatically queued for text extraction and asynchronous indexing. Supplying an `externalId` makes this idempotent — re-initiating an upload with the same `externalId` re-issues a fresh presigned URL to the SAME existing document/object (so a re-upload inherently replaces the file body) rather than creating a duplicate. The response's `created` field (and the HTTP status — 201 when a new document was minted, 200 when an existing one was matched) tells the two apart. With `?upsert=true`, the submitted `payload`/`title` are also applied to the matched document (file-body divergence cannot be diffed at upload-init — the bytes have not arrived yet — so the re-upload itself replaces the body; `?upsert=true` requires the `documents:u` scope). Requires the `documents:c` scope.
5266
+ * Starts a file-based document by returning a short-lived presigned S3 PUT URL. Upload the file bytes directly to `uploadUrl`; the document is then automatically queued for text extraction and asynchronous indexing. Supplying an `externalId` makes this idempotent — re-initiating an upload with the same `externalId` re-issues a fresh presigned URL to the SAME existing document/object (so a re-upload inherently replaces the file body) rather than creating a duplicate. The response's `created` field (and the HTTP status — 201 when a new document was minted, 200 when an existing one was matched) tells the two apart. With `?upsert=true`, the submitted `payload`/`title` are also applied to the matched document (file-body divergence cannot be diffed at upload-init — the bytes have not arrived yet — so the re-upload itself replaces the body). Creating a NEW document requires the `documents:c` scope. Re-uploading over an EXISTING document overwrites (and re-indexes) its body, so it is an update: it requires the `documents:u` scope (as does `?upsert=true` for the metadata).
5259
5267
  *
5260
5268
  * @param {Vectros.FileUploadRequest} request
5261
5269
  * @param {DocumentsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -9660,9 +9668,10 @@ var DATA_PLANE_ACTIONS = [
9660
9668
  "folders:r",
9661
9669
  "folders:c"
9662
9670
  ];
9671
+ var EDITOR_ACTIONS = [...DATA_PLANE_ACTIONS, "records:d", "documents:d", "folders:d"];
9663
9672
  var agenticSdlc = {
9664
9673
  name: "agentic-sdlc",
9665
- version: "1.0.0",
9674
+ version: "1.2.0",
9666
9675
  description: "A whole-SDLC system of record for an AI development team \u2014 decisions, designs, references, runbooks, post-mortems (as documents) plus controls, conventions, gotchas, and a glossary (as records), cross-linked and recalled by meaning.",
9667
9676
  contextId: "agentic-sdlc",
9668
9677
  contextName: "Agentic SDLC Knowledge Base",
@@ -10097,6 +10106,19 @@ var agenticSdlc = {
10097
10106
  fieldType: "date",
10098
10107
  description: "ISO-8601 last-reviewed date. Range-queryable.",
10099
10108
  renderHints: { label: "Reviewed on", widget: "date", order: 12 }
10109
+ },
10110
+ {
10111
+ // Provenance for sync: the source file this record was distilled from. A
10112
+ // record can't carry an in-file marker the way a document can (many records
10113
+ // come from one file), so it names its source instead — a change to that file
10114
+ // finds (equality lookup) and re-extracts exactly its records. Equality, not
10115
+ // range: file-level is the sync unit (re-extraction reprocesses the whole file),
10116
+ // and the schema keeps its single range lookup for the date row.
10117
+ fieldId: "sourceRef",
10118
+ fieldType: "string",
10119
+ filterable: true,
10120
+ description: "The source file (repo path) this record was extracted from \u2014 its provenance; a change to that file re-extracts its records. The specific section is encoded in the record externalId.",
10121
+ renderHints: { label: "Source ref", widget: "text", order: 13 }
10100
10122
  }
10101
10123
  ],
10102
10124
  lookupFields: [
@@ -10106,7 +10128,8 @@ var agenticSdlc = {
10106
10128
  "area",
10107
10129
  "verifiedBy",
10108
10130
  "relatedDecision",
10109
- { fieldName: "reviewedOn", rangeEnabled: true }
10131
+ { fieldName: "reviewedOn", rangeEnabled: true },
10132
+ "sourceRef"
10110
10133
  ]
10111
10134
  },
10112
10135
  {
@@ -10183,9 +10206,23 @@ var agenticSdlc = {
10183
10206
  fieldType: "date",
10184
10207
  description: "ISO-8601 \u2014 when last revised. Range-queryable.",
10185
10208
  renderHints: { label: "Updated on", widget: "date", order: 9 }
10209
+ },
10210
+ {
10211
+ // Provenance for sync — see the note on `control.sourceRef`.
10212
+ fieldId: "sourceRef",
10213
+ fieldType: "string",
10214
+ filterable: true,
10215
+ description: "The source file (repo path) this record was extracted from \u2014 its provenance; a change to that file re-extracts its records. The specific section is encoded in the record externalId.",
10216
+ renderHints: { label: "Source ref", widget: "text", order: 10 }
10186
10217
  }
10187
10218
  ],
10188
- lookupFields: ["area", "status", "establishedBy", { fieldName: "updatedOn", rangeEnabled: true }]
10219
+ lookupFields: [
10220
+ "area",
10221
+ "status",
10222
+ "establishedBy",
10223
+ { fieldName: "updatedOn", rangeEnabled: true },
10224
+ "sourceRef"
10225
+ ]
10189
10226
  },
10190
10227
  {
10191
10228
  // A GOTCHA / sharp edge: a symptom, its cause, and the fix. A tight typed
@@ -10239,9 +10276,22 @@ var agenticSdlc = {
10239
10276
  fieldType: "date",
10240
10277
  description: "ISO-8601 \u2014 when first hit. Range-queryable.",
10241
10278
  renderHints: { label: "Discovered on", widget: "date", order: 7 }
10279
+ },
10280
+ {
10281
+ // Provenance for sync — see the note on `control.sourceRef`.
10282
+ fieldId: "sourceRef",
10283
+ fieldType: "string",
10284
+ filterable: true,
10285
+ description: "The source file (repo path) this record was extracted from \u2014 its provenance; a change to that file re-extracts its records. The specific section is encoded in the record externalId.",
10286
+ renderHints: { label: "Source ref", widget: "text", order: 8 }
10242
10287
  }
10243
10288
  ],
10244
- lookupFields: ["area", "status", { fieldName: "discoveredOn", rangeEnabled: true }]
10289
+ lookupFields: [
10290
+ "area",
10291
+ "status",
10292
+ { fieldName: "discoveredOn", rangeEnabled: true },
10293
+ "sourceRef"
10294
+ ]
10245
10295
  },
10246
10296
  {
10247
10297
  // A glossary TERM — a definition keyed by the term itself. Structure-dominant:
@@ -10301,6 +10351,14 @@ var agenticSdlc = {
10301
10351
  fieldType: "date",
10302
10352
  description: "ISO-8601 \u2014 when last revised. Range-queryable.",
10303
10353
  renderHints: { label: "Updated on", widget: "date", order: 7 }
10354
+ },
10355
+ {
10356
+ // Provenance for sync — see the note on `control.sourceRef`.
10357
+ fieldId: "sourceRef",
10358
+ fieldType: "string",
10359
+ filterable: true,
10360
+ description: "The source file (repo path) this record was extracted from \u2014 its provenance; a change to that file re-extracts its records. The specific section is encoded in the record externalId.",
10361
+ renderHints: { label: "Source ref", widget: "text", order: 8 }
10304
10362
  }
10305
10363
  ],
10306
10364
  // `term` is a UNIQUE equality lookup — exact "define X" + a one-per-term
@@ -10309,7 +10367,8 @@ var agenticSdlc = {
10309
10367
  { fieldName: "term", unique: true },
10310
10368
  "area",
10311
10369
  "relatedDecision",
10312
- { fieldName: "updatedOn", rangeEnabled: true }
10370
+ { fieldName: "updatedOn", rangeEnabled: true },
10371
+ "sourceRef"
10313
10372
  ]
10314
10373
  }
10315
10374
  ],
@@ -10327,11 +10386,13 @@ var agenticSdlc = {
10327
10386
  // grants the human none by default. Bind it after bootstrap with:
10328
10387
  // vectros access grant --principal usr_<your-user-id> --context agentic-sdlc --role editor
10329
10388
  // (or the admin app's Access > Contexts > agentic-sdlc > Profiles > Create).
10330
- // Editor PARITY with the service key (same DATA_PLANE_ACTIONS) so a human
10331
- // curator can browse AND write/correct the KB; still no :d and no control-plane
10332
- // action, so the scope gate accepts it exactly like the accessProfile.
10389
+ // The editor gets the full data plane so a human curator can browse, write/correct,
10390
+ // AND hard-delete the KB (EDITOR_ACTIONS = the service key's set + delete). The
10391
+ // service key deliberately lacks delete and archives instead; the trusted human
10392
+ // owner may permanently remove genuine strays. Still no control-plane action, so
10393
+ // the scope gate accepts it as a data-plane-only role.
10333
10394
  roles: {
10334
- editor: [{ allowedActions: DATA_PLANE_ACTIONS }]
10395
+ editor: [{ allowedActions: EDITOR_ACTIONS }]
10335
10396
  },
10336
10397
  servicePrincipal: {
10337
10398
  externalId: "agentic-sdlc",
@@ -14010,9 +14071,9 @@ async function runBlueprintTest(fileOrName, opts, deps = {}) {
14010
14071
 
14011
14072
  // src/build-info.ts
14012
14073
  var BUILD_INFO = {
14013
- cli: true ? "0.6.5" : "dev",
14014
- sdk: true ? "0.31.0" : "dev",
14015
- blueprints: true ? "0.6.3" : "dev"
14074
+ cli: true ? "0.6.6" : "dev",
14075
+ sdk: true ? "0.32.0" : "dev",
14076
+ blueprints: true ? "0.6.4" : "dev"
14016
14077
  };
14017
14078
  function formatBuildInfo() {
14018
14079
  return `vectros ${BUILD_INFO.cli} (sdk ${BUILD_INFO.sdk}, blueprints ${BUILD_INFO.blueprints})`;