overlane 0.1.118 → 0.1.119

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/overlane.mjs CHANGED
@@ -22189,6 +22189,101 @@ var init_issues = __esm({
22189
22189
  }
22190
22190
  });
22191
22191
 
22192
+ // ../contracts/src/onboarding.ts
22193
+ function initialSteps() {
22194
+ return STEP_NAMES.map((step2, i2) => ({ step: step2, status: i2 === 0 ? "done" : i2 === 1 ? "active" : "pending" }));
22195
+ }
22196
+ function newProgress(tenantId, userId, at) {
22197
+ return { tenantId, userId, step: "agents", steps: initialSteps(), data: {}, version: 0, complete: false, updatedAt: at };
22198
+ }
22199
+ var STEP_NAMES, StepName, StepStatus, RepairAction, FAILURE_REPAIRS, FAILURE_CODES, FailureCodeSchema, StepState, Slug, RepoChoice, OnboardingData, OnboardingProgress, AdvanceRequest, AdvanceResponse, OnboardingEvent, FirstReview, onboardingPaths, PROGRESS_FIXTURE;
22200
+ var init_onboarding = __esm({
22201
+ "../contracts/src/onboarding.ts"() {
22202
+ "use strict";
22203
+ init_zod();
22204
+ init_common();
22205
+ STEP_NAMES = ["sign-up", "agents", "repo", "first-task", "first-review", "invite"];
22206
+ StepName = external_exports.enum(STEP_NAMES);
22207
+ StepStatus = external_exports.enum(["pending", "active", "failed", "done"]);
22208
+ RepairAction = external_exports.object({ id: external_exports.string().regex(/^[a-z][a-z0-9-]{1,48}$/), text: external_exports.string().min(1).max(300) }).strict();
22209
+ FAILURE_REPAIRS = {
22210
+ "sign-in-cancelled": { id: "retry-sign-in", text: "Sign-in was cancelled. Try again, or use the email link." },
22211
+ "agent-not-connected": { id: "retry-connect", text: "The agent has not connected yet. Run the plugin command shown, then check again." },
22212
+ "agent-oauth-denied": { id: "reauthorise", text: "Access was denied in the agent's own sign-in. Approve it there, then check again." },
22213
+ "install-cancelled": { id: "retry-install", text: "The GitHub App install was cancelled. Retry the install, or use a native repository." },
22214
+ "repo-unreachable": { id: "pick-another-repo", text: "That repository could not be read. Pick another, or re-run the install to grant access." },
22215
+ "task-failed": { id: "retry-task", text: "The first task did not finish. Retry it, or pick a smaller template." },
22216
+ "review-unavailable": { id: "reload-review", text: "The review is not ready. Reload it, or open the task to see its evidence." },
22217
+ "invite-failed": { id: "retry-invite", text: "An invitation could not be sent. Check the address and try again, or skip this step." }
22218
+ };
22219
+ FAILURE_CODES = Object.keys(FAILURE_REPAIRS);
22220
+ FailureCodeSchema = external_exports.enum(FAILURE_CODES);
22221
+ StepState = external_exports.object({
22222
+ step: StepName,
22223
+ status: StepStatus,
22224
+ failure: FailureCodeSchema.optional(),
22225
+ repair: RepairAction.optional()
22226
+ }).strict().refine((s) => s.status === "failed" === (s.repair !== void 0 && s.failure !== void 0), { message: "a failed step carries a failure code and a repair action, and no other step does" });
22227
+ Slug = external_exports.string().regex(/^[a-z0-9][a-z0-9-]{0,39}$/);
22228
+ RepoChoice = external_exports.object({
22229
+ kind: external_exports.enum(["github", "native"]),
22230
+ owner: external_exports.string().regex(/^[A-Za-z0-9-]{1,39}$/),
22231
+ name: external_exports.string().regex(/^[A-Za-z0-9._-]{1,100}$/),
22232
+ /** The GitHub App installation number; absent for a native repository. */
22233
+ installationId: external_exports.number().int().positive().optional()
22234
+ }).strict();
22235
+ OnboardingData = external_exports.object({
22236
+ agents: external_exports.array(Slug).max(20).optional(),
22237
+ bots: external_exports.array(Slug).max(20).optional(),
22238
+ repo: RepoChoice.optional(),
22239
+ task: external_exports.object({ templateId: Slug, title: external_exports.string().min(1).max(200) }).strict().optional(),
22240
+ invited: external_exports.number().int().min(0).max(100).optional()
22241
+ }).strict();
22242
+ OnboardingProgress = external_exports.object({
22243
+ tenantId: TenantId,
22244
+ userId: external_exports.string().min(1).max(100),
22245
+ /** The current step: the first one not done, or the last when all are done. */
22246
+ step: StepName,
22247
+ steps: external_exports.array(StepState).length(STEP_NAMES.length),
22248
+ data: OnboardingData,
22249
+ /** Bumped by every transition; a client sends the one it read (optimistic concurrency). */
22250
+ version: external_exports.number().int().min(0),
22251
+ complete: external_exports.boolean(),
22252
+ updatedAt: external_exports.string()
22253
+ }).strict();
22254
+ AdvanceRequest = external_exports.object({
22255
+ step: StepName,
22256
+ expectedVersion: external_exports.number().int().min(0),
22257
+ outcome: external_exports.enum(["done", "failed"]),
22258
+ failure: FailureCodeSchema.optional(),
22259
+ data: OnboardingData.optional()
22260
+ }).strict().refine((r) => r.outcome === "failed" === (r.failure !== void 0), { message: "failure is required with outcome failed, and only then" });
22261
+ AdvanceResponse = external_exports.object({ applied: external_exports.boolean(), progress: OnboardingProgress }).strict();
22262
+ OnboardingEvent = external_exports.object({
22263
+ type: external_exports.enum(["onboarding.step_done", "onboarding.step_failed", "onboarding.resumed"]),
22264
+ tenantId: TenantId,
22265
+ userId: external_exports.string(),
22266
+ step: StepName,
22267
+ at: external_exports.string()
22268
+ }).strict();
22269
+ FirstReview = external_exports.object({
22270
+ /** `fixture` until the review service (MS-A5) is live; the UI says so. */
22271
+ source: external_exports.enum(["fixture", "live"]),
22272
+ taskTitle: external_exports.string(),
22273
+ verdict: external_exports.enum(["approve", "changes_requested"]),
22274
+ summary: external_exports.string(),
22275
+ findings: external_exports.array(external_exports.object({ severity: external_exports.enum(["blocker", "major", "minor", "nit"]), file: external_exports.string(), line: external_exports.number().int().positive(), message: external_exports.string() }).strict()),
22276
+ evidence: external_exports.array(external_exports.object({ check: external_exports.string(), level: external_exports.string(), result: external_exports.enum(["pass", "fail"]) }).strict())
22277
+ }).strict();
22278
+ onboardingPaths = {
22279
+ progress: (tenantId) => `/v1/tenants/${encodeURIComponent(tenantId)}/onboarding`,
22280
+ advance: (tenantId) => `/v1/tenants/${encodeURIComponent(tenantId)}/onboarding/advance`,
22281
+ firstReview: (tenantId) => `/v1/tenants/${encodeURIComponent(tenantId)}/onboarding/first-review`
22282
+ };
22283
+ PROGRESS_FIXTURE = newProgress("tm-fixture", "u-fixture", "2026-10-09T00:00:00.000Z");
22284
+ }
22285
+ });
22286
+
22192
22287
  // ../contracts/src/index.ts
22193
22288
  var init_src = __esm({
22194
22289
  "../contracts/src/index.ts"() {
@@ -22214,6 +22309,7 @@ var init_src = __esm({
22214
22309
  init_clients();
22215
22310
  init_memory();
22216
22311
  init_issues();
22312
+ init_onboarding();
22217
22313
  }
22218
22314
  });
22219
22315
 
@@ -29566,7 +29662,7 @@ var VERSION;
29566
29662
  var init_assets = __esm({
29567
29663
  "src/assets.ts"() {
29568
29664
  "use strict";
29569
- VERSION = true ? "0.1.118" : "0.0.0-dev";
29665
+ VERSION = true ? "0.1.119" : "0.0.0-dev";
29570
29666
  }
29571
29667
  });
29572
29668
 
@@ -54631,6 +54727,32 @@ async function probeService(deps, serviceUrl, token) {
54631
54727
 
54632
54728
  // ../cli/src/connect.ts
54633
54729
  var DEFAULT_SERVICE_URL = "https://api.overlane.dev";
54730
+ var CONNECT_STEPS = {
54731
+ "sign-up": "sign in through the browser (OAuth with PKCE), or use HARNESS_TOKEN",
54732
+ agents: "register the plugin with each agent's own commands (no vendor token is asked for)",
54733
+ repo: "bind this GitHub project to the service",
54734
+ "first-task": 'start your first task with `overlane task new "<title>"`',
54735
+ "first-review": "read the first review in the web app",
54736
+ invite: "invite teammates from the web app (optional, never blocks)"
54737
+ };
54738
+ async function reportStep(deps, serviceUrl, token, tenantId, step2, data) {
54739
+ try {
54740
+ const headers = { authorization: `Bearer ${token}`, accept: "application/json" };
54741
+ const read = await deps.fetch(`${serviceUrl}${onboardingPaths.progress(tenantId)}`, { headers });
54742
+ if (!read.ok) return null;
54743
+ const progress = OnboardingProgress.parse(await read.json());
54744
+ if (progress.step !== step2 || progress.complete) return progress.step;
54745
+ const write = await deps.fetch(`${serviceUrl}${onboardingPaths.advance(tenantId)}`, {
54746
+ method: "POST",
54747
+ headers: { ...headers, "content-type": "application/json" },
54748
+ body: JSON.stringify({ step: step2, expectedVersion: progress.version, outcome: "done", data })
54749
+ });
54750
+ if (!write.ok) return progress.step;
54751
+ return OnboardingProgress.parse((await write.json()).progress).step;
54752
+ } catch {
54753
+ return null;
54754
+ }
54755
+ }
54634
54756
  var MANIFESTS = {
54635
54757
  claude: join6(".claude-plugin", "marketplace.json"),
54636
54758
  codex: join6(".agents", "plugins", "marketplace.json")
@@ -54705,6 +54827,7 @@ async function connect(deps, options) {
54705
54827
  const bindingMissing = existing.kind !== "ok";
54706
54828
  const existingToken = await findToken(deps, serviceUrl);
54707
54829
  say(deps);
54830
+ say(deps, `Steps (the same names as the web onboarding): ${STEP_NAMES.join(", ")}`);
54708
54831
  say(deps, "Plan");
54709
54832
  say(deps, ` sign-in: ${existingToken === null ? `browser sign-in to ${serviceUrl} (OAuth with PKCE), token kept in the OS keychain or a 0600 file in your user config directory` : `${describeStore(deps, existingToken.source)}`}`);
54710
54833
  say(deps, ` service: GET ${serviceUrl}/v1/me, then create or look up the project for ${repository.owner}/${repository.name}`);
@@ -54759,6 +54882,7 @@ async function connect(deps, options) {
54759
54882
  }
54760
54883
  }
54761
54884
  const token = await ensureToken(deps, serviceUrl);
54885
+ say(deps, `[sign-up] ${CONNECT_STEPS["sign-up"]}: done`);
54762
54886
  say(deps, `Signed in; token source: ${describeStore(deps, token.source)}`);
54763
54887
  const wrote = [];
54764
54888
  const applied = [];
@@ -54793,6 +54917,8 @@ async function connect(deps, options) {
54793
54917
  entry.configLines = { text: codexEdit.block, createdFile: !codexEdit.fileExisted };
54794
54918
  }
54795
54919
  verify(deps, root, active);
54920
+ say(deps, `[agents] ${CONNECT_STEPS.agents}: done`);
54921
+ await reportStep(deps, serviceUrl, token.token, me.tenantId, "agents", { agents: active.map((info2) => info2.agent === "claude" ? "claude-code" : info2.agent) });
54796
54922
  if (writeIfDifferent(join6(root, BINDING_FILE), bindingText(binding))) {
54797
54923
  say(deps, `Wrote ${BINDING_FILE}`);
54798
54924
  wrote.push(BINDING_FILE);
@@ -54800,6 +54926,9 @@ async function connect(deps, options) {
54800
54926
  if (codexEdit !== null) wrote.push(CODEX_CONFIG_FILE);
54801
54927
  owned.binding = true;
54802
54928
  if (excludeNeeded && await addExclude(deps, root)) owned.excludeLine = true;
54929
+ say(deps, `[repo] ${CONNECT_STEPS.repo}: done`);
54930
+ const next = await reportStep(deps, serviceUrl, token.token, me.tenantId, "repo", { repo: { kind: "github", owner: repository.owner, name: repository.name } });
54931
+ if (next !== null) say(deps, `Next in onboarding: ${next === "repo" ? "first-task" : next} (${CONNECT_STEPS[next === "repo" ? "first-task" : next]})`);
54803
54932
  } finally {
54804
54933
  if (previousOwned !== null || owned.binding || owned.claude !== void 0 || owned.codex !== void 0) writeOwned(root, owned);
54805
54934
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "overlane",
3
- "version": "0.1.118",
3
+ "version": "0.1.119",
4
4
  "description": "Overlane: connect a GitHub project to your coding agents. One portable CLI with project memory, tasks, a code index, guardrails and the Claude Code and Codex plugin.",
5
5
  "keywords": [
6
6
  "overlane",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mvrx-harness",
3
- "version": "0.1.118",
3
+ "version": "0.1.119",
4
4
  "description": "Harness context at session start and the shared harness skills.",
5
5
  "author": {
6
6
  "name": "owenob1"