@amistio/cli 0.1.19 → 0.1.20

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 CHANGED
@@ -9,7 +9,7 @@ npm install -g @amistio/cli
9
9
  amistio --help
10
10
  ```
11
11
 
12
- The package install only installs the `amistio` command. Repository cloning, project pairing, credential storage, sync watching, and runner execution happen only when the user explicitly runs commands such as `amistio bootstrap`, `amistio pair`, `amistio sync watch`, or `amistio run --watch`.
12
+ The package install only installs the `amistio` command. Repository cloning, project pairing, credential storage, sync watching, and runner execution happen only when the user explicitly runs commands such as `amistio bootstrap`, `amistio import`, `amistio pair`, `amistio sync watch`, or `amistio run --watch`. When the app copies a personal project into an organization, the CLI command syntax stays the same; create the org-scoped code and run `amistio import <code>` from the intended local checkout.
13
13
 
14
14
  Runner lifecycle controls in the web app, such as update, restart, and remove, apply only to the runner paired by that user unless the active organization role is an admin role. The runner API binds command polling, command status, logs, activity, and tool sessions to the local runner credential that produced them.
15
15
 
package/dist/index.js CHANGED
@@ -129,6 +129,7 @@ var activityEventTypeSchema = z.enum([
129
129
  "documentGenerated",
130
130
  "documentReview",
131
131
  "documentSync",
132
+ "projectTransferred",
132
133
  "workQueued",
133
134
  "workClaimed",
134
135
  "workStatusChanged",
@@ -347,7 +348,11 @@ var projectItemSchema = baseItemSchema.extend({
347
348
  status: projectStatusSchema.default("active"),
348
349
  archivedAt: isoDateTimeSchema.optional(),
349
350
  archivedByUserId: z.string().min(1).optional(),
350
- archiveReason: z.string().min(1).optional()
351
+ archiveReason: z.string().min(1).optional(),
352
+ transferredFromAccountId: z.string().min(1).optional(),
353
+ transferredFromProjectId: z.string().min(1).optional(),
354
+ transferredByUserId: z.string().min(1).optional(),
355
+ transferredAt: isoDateTimeSchema.optional()
351
356
  });
352
357
  var repositoryLinkItemSchema = baseItemSchema.extend({
353
358
  type: z.literal("repositoryLink"),
@@ -4558,6 +4563,10 @@ var projectContextRefreshStart = "AMISTIO_PROJECT_CONTEXT_REFRESH_START";
4558
4563
  var projectContextRefreshEnd = "AMISTIO_PROJECT_CONTEXT_REFRESH_END";
4559
4564
  var implementationVerificationStart = "AMISTIO_IMPLEMENTATION_VERIFICATION_START";
4560
4565
  var implementationVerificationEnd = "AMISTIO_IMPLEMENTATION_VERIFICATION_END";
4566
+ var projectContextMissingAreaMaxLength = 160;
4567
+ var projectContextCoverageWarningMaxLength = 300;
4568
+ var projectContextVerificationPlanMaxLength = 300;
4569
+ var projectContextTopLevelWarningMaxLength = 600;
4561
4570
  var validProjectContextSliceKinds = /* @__PURE__ */ new Set(["overview", "architecture", "domain", "data", "api", "frontend", "backend", "cli", "workflow", "operations", "security", "testing", "unknown"]);
4562
4571
  var validProjectContextEntityTypes = /* @__PURE__ */ new Set(["project", "system", "component", "domain", "tool", "decision", "feature", "risk", "team", "workflow", "unknown"]);
4563
4572
  var validProjectContextRelationTypes = /* @__PURE__ */ new Set(["uses", "depends_on", "decides", "supersedes", "touches", "blocks", "implements", "mentions"]);
@@ -4719,6 +4728,8 @@ function createProjectContextRefreshPrompt(workItem, context) {
4719
4728
  "- Capture entities and relations that explain how the app is put together and where future work should look first.",
4720
4729
  "- Prefer summaries, repository-relative paths, short citations, tags, and freshness status over raw source excerpts.",
4721
4730
  "- Mark stale or missing areas explicitly instead of guessing.",
4731
+ "- Keep coverage.missingAreas entries concise noun phrases under 160 characters.",
4732
+ "- Keep coverage.warnings and verificationPlan entries under 300 characters; keep top-level warnings under 600 characters.",
4722
4733
  "- Keep repoPaths repository-relative; never include /absolute paths or ../ traversal.",
4723
4734
  "- If local inspection prints a path inside this checkout, convert it to the repository-relative path before returning JSON.",
4724
4735
  "",
@@ -5186,7 +5197,7 @@ function parseProjectContextRefreshResult(output, options = {}) {
5186
5197
  }
5187
5198
  const payload = output.slice(start + projectContextRefreshStart.length, end).trim();
5188
5199
  const parsed = JSON.parse(stripJsonFence(payload));
5189
- const normalized = normalizeProjectContextRefreshPaths(normalizeProjectContextRefreshEnums(parsed), options);
5200
+ const normalized = normalizeProjectContextRefreshBoundedText(normalizeProjectContextRefreshPaths(normalizeProjectContextRefreshEnums(parsed), options));
5190
5201
  return projectContextRefreshResultSchema.parse(normalized);
5191
5202
  }
5192
5203
  function parseImplementationVerificationResult(output) {
@@ -5316,6 +5327,42 @@ function normalizeProjectContextSliceKind(value) {
5316
5327
  }
5317
5328
  return "unknown";
5318
5329
  }
5330
+ function normalizeProjectContextRefreshBoundedText(value) {
5331
+ if (!isObjectRecord(value)) {
5332
+ return value;
5333
+ }
5334
+ const normalized = { ...value };
5335
+ if (isObjectRecord(normalized.coverage)) {
5336
+ const coverage = { ...normalized.coverage };
5337
+ coverage.missingAreas = normalizeBoundedStringArray(coverage.missingAreas, projectContextMissingAreaMaxLength);
5338
+ coverage.warnings = normalizeBoundedStringArray(coverage.warnings, projectContextCoverageWarningMaxLength);
5339
+ normalized.coverage = coverage;
5340
+ }
5341
+ normalized.verificationPlan = normalizeBoundedStringArray(normalized.verificationPlan, projectContextVerificationPlanMaxLength);
5342
+ normalized.warnings = normalizeBoundedStringArray(normalized.warnings, projectContextTopLevelWarningMaxLength);
5343
+ return normalized;
5344
+ }
5345
+ function normalizeBoundedStringArray(value, maxLength) {
5346
+ if (!Array.isArray(value)) {
5347
+ return value;
5348
+ }
5349
+ return value.flatMap((entry) => {
5350
+ if (typeof entry !== "string") {
5351
+ return [entry];
5352
+ }
5353
+ const trimmed = entry.trim();
5354
+ return trimmed ? [shortenBoundedString(trimmed, maxLength)] : [];
5355
+ });
5356
+ }
5357
+ function shortenBoundedString(value, maxLength) {
5358
+ if (value.length <= maxLength) {
5359
+ return value;
5360
+ }
5361
+ if (maxLength <= 3) {
5362
+ return value.slice(0, maxLength);
5363
+ }
5364
+ return `${value.slice(0, maxLength - 3).trimEnd()}...`;
5365
+ }
5319
5366
  function normalizeProjectContextRefreshPaths(value, options) {
5320
5367
  if (!isObjectRecord(value)) {
5321
5368
  return value;