overlane 0.1.125 → 0.1.127
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 +354 -5
- package/package.json +1 -1
- package/plugins/claude/plugins/mvrx-harness/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/plugins/mvrx-harness/scripts/harness-context.mjs +36 -35
- package/plugins/claude/plugins/mvrx-harness/scripts/harness-guard.mjs +35 -34
- package/plugins/claude/plugins/mvrx-harness/scripts/harness-intake.mjs +39 -38
- package/plugins/claude/plugins/mvrx-harness/scripts/harness-quota.mjs +37 -36
- package/plugins/claude/plugins/mvrx-harness/scripts/harness-statusline.mjs +33 -32
- package/plugins/claude/plugins/mvrx-harness/scripts/harness-stop.mjs +40 -39
- package/plugins/codex/plugins/mvrx-harness/.codex-plugin/plugin.json +1 -1
- package/plugins/codex/plugins/mvrx-harness/scripts/harness-context.mjs +36 -35
- package/plugins/codex/plugins/mvrx-harness/scripts/harness-guard.mjs +35 -34
- package/plugins/codex/plugins/mvrx-harness/scripts/harness-intake.mjs +39 -38
- package/plugins/codex/plugins/mvrx-harness/scripts/harness-quota.mjs +37 -36
- package/plugins/codex/plugins/mvrx-harness/scripts/harness-statusline.mjs +33 -32
- package/plugins/codex/plugins/mvrx-harness/scripts/harness-stop.mjs +40 -39
- package/plugins/release-manifest.json +20 -20
package/dist/overlane.mjs
CHANGED
|
@@ -22378,6 +22378,208 @@ var init_onboarding = __esm({
|
|
|
22378
22378
|
}
|
|
22379
22379
|
});
|
|
22380
22380
|
|
|
22381
|
+
// ../contracts/src/audit.ts
|
|
22382
|
+
function canonicalJson(value) {
|
|
22383
|
+
if (value === null || typeof value !== "object") return JSON.stringify(value) ?? "null";
|
|
22384
|
+
if (Array.isArray(value)) return `[${value.map(canonicalJson).join(",")}]`;
|
|
22385
|
+
const entries = Object.entries(value).filter(([, v]) => v !== void 0).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0);
|
|
22386
|
+
return `{${entries.map(([k, v]) => `${JSON.stringify(k)}:${canonicalJson(v)}`).join(",")}}`;
|
|
22387
|
+
}
|
|
22388
|
+
function sha256Hex(text) {
|
|
22389
|
+
const data = new TextEncoder().encode(text);
|
|
22390
|
+
const bitLength = data.length * 8;
|
|
22391
|
+
const padded = new Uint8Array(Math.ceil((data.length + 9) / 64) * 64);
|
|
22392
|
+
padded.set(data);
|
|
22393
|
+
padded[data.length] = 128;
|
|
22394
|
+
const view = new DataView(padded.buffer);
|
|
22395
|
+
view.setUint32(padded.length - 8, Math.floor(bitLength / 2 ** 32));
|
|
22396
|
+
view.setUint32(padded.length - 4, bitLength >>> 0);
|
|
22397
|
+
const h = new Uint32Array([1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225]);
|
|
22398
|
+
const w = new Uint32Array(64);
|
|
22399
|
+
const rotr = (x, n) => x >>> n | x << 32 - n;
|
|
22400
|
+
for (let offset = 0; offset < padded.length; offset += 64) {
|
|
22401
|
+
for (let i2 = 0; i2 < 16; i2 += 1) w[i2] = view.getUint32(offset + i2 * 4);
|
|
22402
|
+
for (let i2 = 16; i2 < 64; i2 += 1) {
|
|
22403
|
+
const a2 = w[i2 - 15];
|
|
22404
|
+
const b2 = w[i2 - 2];
|
|
22405
|
+
const s0 = rotr(a2, 7) ^ rotr(a2, 18) ^ a2 >>> 3;
|
|
22406
|
+
const s1 = rotr(b2, 17) ^ rotr(b2, 19) ^ b2 >>> 10;
|
|
22407
|
+
w[i2] = w[i2 - 16] + s0 + w[i2 - 7] + s1 >>> 0;
|
|
22408
|
+
}
|
|
22409
|
+
let [a, b, c, d, e, f, g, hh] = h;
|
|
22410
|
+
for (let i2 = 0; i2 < 64; i2 += 1) {
|
|
22411
|
+
const t1 = hh + (rotr(e, 6) ^ rotr(e, 11) ^ rotr(e, 25)) + (e & f ^ ~e & g) + K[i2] + w[i2] >>> 0;
|
|
22412
|
+
const t2 = (rotr(a, 2) ^ rotr(a, 13) ^ rotr(a, 22)) + (a & b ^ a & c ^ b & c) >>> 0;
|
|
22413
|
+
hh = g;
|
|
22414
|
+
g = f;
|
|
22415
|
+
f = e;
|
|
22416
|
+
e = d + t1 >>> 0;
|
|
22417
|
+
d = c;
|
|
22418
|
+
c = b;
|
|
22419
|
+
b = a;
|
|
22420
|
+
a = t1 + t2 >>> 0;
|
|
22421
|
+
}
|
|
22422
|
+
const sums = [a, b, c, d, e, f, g, hh];
|
|
22423
|
+
for (let i2 = 0; i2 < 8; i2 += 1) h[i2] = h[i2] + sums[i2] >>> 0;
|
|
22424
|
+
}
|
|
22425
|
+
return [...h].map((n) => n.toString(16).padStart(8, "0")).join("");
|
|
22426
|
+
}
|
|
22427
|
+
function auditHash(prevHash, body2) {
|
|
22428
|
+
return sha256Hex(`${prevHash}
|
|
22429
|
+
${canonicalJson(AuditEventBody.parse(body2))}`);
|
|
22430
|
+
}
|
|
22431
|
+
function chainAuditEvent(prevHash, body2) {
|
|
22432
|
+
const previous = prevHash ?? AUDIT_GENESIS_HASH;
|
|
22433
|
+
return AuditEvent.parse({ ...body2, prevHash: previous, hash: auditHash(previous, body2) });
|
|
22434
|
+
}
|
|
22435
|
+
var AUDIT_CATEGORIES, AuditCategory, AUDIT_ACTIONS, AUDIT_ACTION_NAMES, AuditActionName, AUDIT_RESULTS, AuditResult, AuditPrincipalType, AuditTarget, Hash, AUDIT_GENESIS_HASH, AuditEventBody, AuditEvent, AuditList, AuditVerification, K, FIXTURE_AT, fixtureBodies, AUDIT_FIXTURE;
|
|
22436
|
+
var init_audit = __esm({
|
|
22437
|
+
"../contracts/src/audit.ts"() {
|
|
22438
|
+
"use strict";
|
|
22439
|
+
init_zod();
|
|
22440
|
+
init_common();
|
|
22441
|
+
AUDIT_CATEGORIES = ["admin", "policy", "token"];
|
|
22442
|
+
AuditCategory = external_exports.enum(AUDIT_CATEGORIES);
|
|
22443
|
+
AUDIT_ACTIONS = {
|
|
22444
|
+
"member.removed": "admin",
|
|
22445
|
+
"member.role_changed": "admin",
|
|
22446
|
+
"invitation.created": "admin",
|
|
22447
|
+
"invitation.revoked": "admin",
|
|
22448
|
+
"run_policy.updated": "policy",
|
|
22449
|
+
"project.updated": "policy",
|
|
22450
|
+
"release.published": "policy",
|
|
22451
|
+
"release.promoted": "policy",
|
|
22452
|
+
"release.withdrawn": "policy",
|
|
22453
|
+
"release.pinned": "policy",
|
|
22454
|
+
"release.rolled_back": "policy",
|
|
22455
|
+
"memory_settings.updated": "policy",
|
|
22456
|
+
"issue_sync.updated": "policy",
|
|
22457
|
+
"loop.created": "policy",
|
|
22458
|
+
"loop.updated": "policy",
|
|
22459
|
+
"loop.deleted": "policy",
|
|
22460
|
+
"bot.registered": "policy",
|
|
22461
|
+
"bot.revoked": "policy",
|
|
22462
|
+
"bot.key_rotated": "policy",
|
|
22463
|
+
"token.created": "token",
|
|
22464
|
+
"token.revoked": "token"
|
|
22465
|
+
};
|
|
22466
|
+
AUDIT_ACTION_NAMES = Object.keys(AUDIT_ACTIONS);
|
|
22467
|
+
AuditActionName = external_exports.enum(Object.keys(AUDIT_ACTIONS));
|
|
22468
|
+
AUDIT_RESULTS = ["success", "denied", "failure"];
|
|
22469
|
+
AuditResult = external_exports.enum(AUDIT_RESULTS);
|
|
22470
|
+
AuditPrincipalType = external_exports.enum(["user", "agent", "system"]);
|
|
22471
|
+
AuditTarget = external_exports.object({ type: external_exports.string().min(1).max(40), id: external_exports.string().max(200) }).strict();
|
|
22472
|
+
Hash = external_exports.string().regex(/^[0-9a-f]{64}$/, "must be 64 lowercase hex characters");
|
|
22473
|
+
AUDIT_GENESIS_HASH = "0".repeat(64);
|
|
22474
|
+
AuditEventBody = external_exports.object({
|
|
22475
|
+
tenantId: TenantId,
|
|
22476
|
+
/** 1, 2, 3 ... per tenant, with no gaps. */
|
|
22477
|
+
seq: external_exports.number().int().positive(),
|
|
22478
|
+
eventId: external_exports.string().min(1).max(64),
|
|
22479
|
+
at: Timestamp,
|
|
22480
|
+
/** User ID, agent token ID or `system`. */
|
|
22481
|
+
actor: external_exports.string().min(1).max(200),
|
|
22482
|
+
principalType: AuditPrincipalType,
|
|
22483
|
+
role: external_exports.string().min(1).max(40).nullable(),
|
|
22484
|
+
action: AuditActionName,
|
|
22485
|
+
category: AuditCategory,
|
|
22486
|
+
target: AuditTarget,
|
|
22487
|
+
result: AuditResult
|
|
22488
|
+
}).strict();
|
|
22489
|
+
AuditEvent = AuditEventBody.extend({ prevHash: Hash, hash: Hash }).strict().refine((event) => AUDIT_ACTIONS[event.action] === event.category, { message: "category does not match the action", path: ["category"] });
|
|
22490
|
+
AuditList = external_exports.object({
|
|
22491
|
+
tenantId: TenantId,
|
|
22492
|
+
events: external_exports.array(AuditEvent),
|
|
22493
|
+
/** Pass as `after` to read the next page; null when this is the last page. */
|
|
22494
|
+
nextAfter: external_exports.number().int().nonnegative().nullable(),
|
|
22495
|
+
/** Hash of the newest row of the tenant's chain (null for an empty log). */
|
|
22496
|
+
head: Hash.nullable()
|
|
22497
|
+
}).strict();
|
|
22498
|
+
AuditVerification = external_exports.object({
|
|
22499
|
+
tenantId: TenantId,
|
|
22500
|
+
ok: external_exports.boolean(),
|
|
22501
|
+
checked: external_exports.number().int().nonnegative(),
|
|
22502
|
+
head: Hash.nullable(),
|
|
22503
|
+
/** The first row that fails (its seq) and why. */
|
|
22504
|
+
brokenAt: external_exports.number().int().positive().optional(),
|
|
22505
|
+
reason: external_exports.enum(["bad_hash", "bad_link", "bad_sequence", "wrong_tenant", "bad_category"]).optional()
|
|
22506
|
+
}).strict();
|
|
22507
|
+
K = new Uint32Array([
|
|
22508
|
+
1116352408,
|
|
22509
|
+
1899447441,
|
|
22510
|
+
3049323471,
|
|
22511
|
+
3921009573,
|
|
22512
|
+
961987163,
|
|
22513
|
+
1508970993,
|
|
22514
|
+
2453635748,
|
|
22515
|
+
2870763221,
|
|
22516
|
+
3624381080,
|
|
22517
|
+
310598401,
|
|
22518
|
+
607225278,
|
|
22519
|
+
1426881987,
|
|
22520
|
+
1925078388,
|
|
22521
|
+
2162078206,
|
|
22522
|
+
2614888103,
|
|
22523
|
+
3248222580,
|
|
22524
|
+
3835390401,
|
|
22525
|
+
4022224774,
|
|
22526
|
+
264347078,
|
|
22527
|
+
604807628,
|
|
22528
|
+
770255983,
|
|
22529
|
+
1249150122,
|
|
22530
|
+
1555081692,
|
|
22531
|
+
1996064986,
|
|
22532
|
+
2554220882,
|
|
22533
|
+
2821834349,
|
|
22534
|
+
2952996808,
|
|
22535
|
+
3210313671,
|
|
22536
|
+
3336571891,
|
|
22537
|
+
3584528711,
|
|
22538
|
+
113926993,
|
|
22539
|
+
338241895,
|
|
22540
|
+
666307205,
|
|
22541
|
+
773529912,
|
|
22542
|
+
1294757372,
|
|
22543
|
+
1396182291,
|
|
22544
|
+
1695183700,
|
|
22545
|
+
1986661051,
|
|
22546
|
+
2177026350,
|
|
22547
|
+
2456956037,
|
|
22548
|
+
2730485921,
|
|
22549
|
+
2820302411,
|
|
22550
|
+
3259730800,
|
|
22551
|
+
3345764771,
|
|
22552
|
+
3516065817,
|
|
22553
|
+
3600352804,
|
|
22554
|
+
4094571909,
|
|
22555
|
+
275423344,
|
|
22556
|
+
430227734,
|
|
22557
|
+
506948616,
|
|
22558
|
+
659060556,
|
|
22559
|
+
883997877,
|
|
22560
|
+
958139571,
|
|
22561
|
+
1322822218,
|
|
22562
|
+
1537002063,
|
|
22563
|
+
1747873779,
|
|
22564
|
+
1955562222,
|
|
22565
|
+
2024104815,
|
|
22566
|
+
2227730452,
|
|
22567
|
+
2361852424,
|
|
22568
|
+
2428436474,
|
|
22569
|
+
2756734187,
|
|
22570
|
+
3204031479,
|
|
22571
|
+
3329325298
|
|
22572
|
+
]);
|
|
22573
|
+
FIXTURE_AT = "2026-10-09T00:00:00.000Z";
|
|
22574
|
+
fixtureBodies = [
|
|
22575
|
+
{ tenantId: "tm-1", seq: 1, eventId: "aud_1", at: FIXTURE_AT, actor: "u-owner", principalType: "user", role: "owner", action: "invitation.created", category: "admin", target: { type: "invitation", id: "inv_1" }, result: "success" },
|
|
22576
|
+
{ tenantId: "tm-1", seq: 2, eventId: "aud_2", at: "2026-10-09T00:05:00.000Z", actor: "u-admin", principalType: "user", role: "admin", action: "run_policy.updated", category: "policy", target: { type: "project", id: "prj-demo" }, result: "success" },
|
|
22577
|
+
{ tenantId: "tm-1", seq: 3, eventId: "aud_3", at: "2026-10-09T00:10:00.000Z", actor: "u-viewer", principalType: "user", role: "viewer", action: "token.created", category: "token", target: { type: "token", id: "" }, result: "denied" }
|
|
22578
|
+
];
|
|
22579
|
+
AUDIT_FIXTURE = fixtureBodies.reduce((rows, body2) => [...rows, chainAuditEvent(rows.at(-1)?.hash ?? null, body2)], []);
|
|
22580
|
+
}
|
|
22581
|
+
});
|
|
22582
|
+
|
|
22381
22583
|
// ../contracts/src/docs-service.ts
|
|
22382
22584
|
function scoped(shape2) {
|
|
22383
22585
|
return external_exports.discriminatedUnion("visibility", [external_exports.object({ ...shape2, ...PublicScope }).strict(), external_exports.object({ ...shape2, ...PrivateScope }).strict()]);
|
|
@@ -23156,6 +23358,151 @@ var init_code_map = __esm({
|
|
|
23156
23358
|
}
|
|
23157
23359
|
});
|
|
23158
23360
|
|
|
23361
|
+
// ../contracts/src/agent.ts
|
|
23362
|
+
function classifyMethod(method) {
|
|
23363
|
+
const m = method.toUpperCase();
|
|
23364
|
+
return m === "GET" || m === "HEAD" || m === "OPTIONS" ? "read" : "write";
|
|
23365
|
+
}
|
|
23366
|
+
function blockedClassFor(op) {
|
|
23367
|
+
const words = op.operationId.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
23368
|
+
const text = `${op.path.toLowerCase()} ${words}`;
|
|
23369
|
+
if (op.method.toUpperCase() === "DELETE" || DESTRUCTIVE.test(text)) return "destructive";
|
|
23370
|
+
if (BILLING.test(text)) return "billing";
|
|
23371
|
+
if (SECRETS.test(text)) return "secrets";
|
|
23372
|
+
return null;
|
|
23373
|
+
}
|
|
23374
|
+
var AGENT_PLANS, AgentPlan, AGENT_PROVIDERS, AgentProvider, TOOL_CLASSES, AgentToolClass, BLOCKED_CLASSES, BlockedClass, BILLING, SECRETS, DESTRUCTIVE, AgentOperation, AgentToolDefinition, AGENT_REFUSAL_CODES, AgentRefusalCode, AgentRefusal, AgentDiffEntry, APPROVAL_STATES, AgentApprovalState, AgentInverseChange, AgentApproval, AgentWriteToolResult, AgentReadToolResult, AgentToolResult, AgentCitation, MESSAGE_ORIGINS, AgentMessageOrigin, AgentMessage, AgentChatRequest, AgentFeedback, AGENT_AUDIT_RESULTS, AgentAuditResult, AgentAuditEvent, AgentReadOnlyMode, RouteIndexEntry, RouteIndex, AgentRouteHit;
|
|
23375
|
+
var init_agent = __esm({
|
|
23376
|
+
"../contracts/src/agent.ts"() {
|
|
23377
|
+
"use strict";
|
|
23378
|
+
init_zod();
|
|
23379
|
+
init_common();
|
|
23380
|
+
init_identity();
|
|
23381
|
+
AGENT_PLANS = ["free", "pro", "team", "business", "enterprise"];
|
|
23382
|
+
AgentPlan = external_exports.enum(AGENT_PLANS);
|
|
23383
|
+
AGENT_PROVIDERS = ["overlane", "github", "gitlab", "linear", "jira"];
|
|
23384
|
+
AgentProvider = external_exports.enum(AGENT_PROVIDERS);
|
|
23385
|
+
TOOL_CLASSES = ["read", "write"];
|
|
23386
|
+
AgentToolClass = external_exports.enum(TOOL_CLASSES);
|
|
23387
|
+
BLOCKED_CLASSES = ["billing", "secrets", "destructive"];
|
|
23388
|
+
BlockedClass = external_exports.enum(BLOCKED_CLASSES);
|
|
23389
|
+
BILLING = /(^|[\s\/_.-])(billing|invoices?|payments?|subscriptions?|checkout|seats|plan-change)([\s\/_.-]|$)/i;
|
|
23390
|
+
SECRETS = /(^|[\s\/_.-])(secrets?|tokens?|api-?keys?|credentials?|keys|signing|sso|scim)([\s\/_.-]|$)/i;
|
|
23391
|
+
DESTRUCTIVE = /(^|[\s\/_.-])(purge|delete|destroy|erase|wipe|drop|revoke|remove|truncate|reset)([\s\/_.-]|$)/i;
|
|
23392
|
+
AgentOperation = external_exports.object({
|
|
23393
|
+
operationId: external_exports.string().min(1).max(100),
|
|
23394
|
+
method: external_exports.enum(["GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH", "DELETE"]),
|
|
23395
|
+
path: external_exports.string().min(1).max(300).startsWith("/"),
|
|
23396
|
+
/** Where the operation is defined: the OpenAPI document, a contract fixture until the API route exists (REQ-WEB-11), or local code that makes no API call (docs search, navigation). */
|
|
23397
|
+
source: external_exports.enum(["openapi", "contract-fixture", "local"])
|
|
23398
|
+
}).strict();
|
|
23399
|
+
AgentToolDefinition = external_exports.object({
|
|
23400
|
+
tenantId: TenantId,
|
|
23401
|
+
name: external_exports.string().regex(/^[a-z][A-Za-z0-9]{1,48}$/),
|
|
23402
|
+
description: external_exports.string().min(1).max(300),
|
|
23403
|
+
class: AgentToolClass,
|
|
23404
|
+
operation: AgentOperation,
|
|
23405
|
+
/** Lowest role that may call the tool (REQ-AGT-05). The role table in identity.ts still decides per action. */
|
|
23406
|
+
minRole: Role,
|
|
23407
|
+
/** JSON-schema-like description of the arguments, property name to a short hint. */
|
|
23408
|
+
arguments: external_exports.record(external_exports.string().min(1).max(64), external_exports.string().max(200))
|
|
23409
|
+
}).strict().refine((t) => t.class === classifyMethod(t.operation.method), { message: "class must match the HTTP method (REQ-AGT-09)", path: ["class"] }).refine((t) => blockedClassFor(t.operation) === null, { message: "billing, secrets and destructive operations are never tools (REQ-AGT-08)", path: ["operation"] });
|
|
23410
|
+
AGENT_REFUSAL_CODES = [
|
|
23411
|
+
"role_forbidden",
|
|
23412
|
+
"read_only_mode",
|
|
23413
|
+
"blocked_class",
|
|
23414
|
+
"unknown_tool",
|
|
23415
|
+
"invalid_arguments",
|
|
23416
|
+
"approval_required",
|
|
23417
|
+
"approval_expired",
|
|
23418
|
+
"approval_not_pending",
|
|
23419
|
+
"rate_limited",
|
|
23420
|
+
"unavailable"
|
|
23421
|
+
];
|
|
23422
|
+
AgentRefusalCode = external_exports.enum(AGENT_REFUSAL_CODES);
|
|
23423
|
+
AgentRefusal = external_exports.object({ kind: external_exports.literal("refusal"), tenantId: TenantId, code: AgentRefusalCode, tool: external_exports.string().max(100).optional(), reason: external_exports.string().min(1).max(300) }).strict();
|
|
23424
|
+
AgentDiffEntry = external_exports.object({ field: external_exports.string().min(1).max(200), before: external_exports.string().max(2e3).nullable(), after: external_exports.string().max(2e3).nullable() }).strict();
|
|
23425
|
+
APPROVAL_STATES = ["pending", "approved", "executed", "rejected", "expired", "failed"];
|
|
23426
|
+
AgentApprovalState = external_exports.enum(APPROVAL_STATES);
|
|
23427
|
+
AgentInverseChange = external_exports.object({
|
|
23428
|
+
tenantId: TenantId,
|
|
23429
|
+
approvalId: external_exports.string().min(1).max(128),
|
|
23430
|
+
tool: external_exports.string().min(1).max(100),
|
|
23431
|
+
arguments: external_exports.record(external_exports.string(), external_exports.unknown()),
|
|
23432
|
+
summary: external_exports.string().min(1).max(500)
|
|
23433
|
+
}).strict();
|
|
23434
|
+
AgentApproval = external_exports.object({
|
|
23435
|
+
tenantId: TenantId,
|
|
23436
|
+
id: external_exports.string().min(1).max(128),
|
|
23437
|
+
conversationId: external_exports.string().min(1).max(128),
|
|
23438
|
+
requestedBy: UserId,
|
|
23439
|
+
tool: external_exports.string().min(1).max(100),
|
|
23440
|
+
summary: external_exports.string().min(1).max(500),
|
|
23441
|
+
diff: external_exports.array(AgentDiffEntry).max(50),
|
|
23442
|
+
argumentsDigest: Sha256Digest,
|
|
23443
|
+
state: AgentApprovalState,
|
|
23444
|
+
createdAt: Timestamp,
|
|
23445
|
+
expiresAt: Timestamp,
|
|
23446
|
+
decidedAt: Timestamp.optional(),
|
|
23447
|
+
/** Present once executed, when the tool has an inverse. */
|
|
23448
|
+
inverse: AgentInverseChange.optional(),
|
|
23449
|
+
/** Set when this approval is itself the undo of another. */
|
|
23450
|
+
undoOf: external_exports.string().min(1).max(128).optional()
|
|
23451
|
+
}).strict();
|
|
23452
|
+
AgentWriteToolResult = external_exports.object({ kind: external_exports.literal("approval"), tenantId: TenantId, approval: AgentApproval }).strict();
|
|
23453
|
+
AgentReadToolResult = external_exports.object({ kind: external_exports.literal("result"), tenantId: TenantId, tool: external_exports.string().min(1).max(100), data: external_exports.unknown() }).strict();
|
|
23454
|
+
AgentToolResult = external_exports.discriminatedUnion("kind", [AgentWriteToolResult, AgentReadToolResult, AgentRefusal]);
|
|
23455
|
+
AgentCitation = external_exports.object({
|
|
23456
|
+
tenantId: TenantId,
|
|
23457
|
+
sourceId: external_exports.string().min(1).max(200),
|
|
23458
|
+
title: external_exports.string().min(1).max(200),
|
|
23459
|
+
/** Docs page or app route. Always a path on an Overlane host; checked by the route index. */
|
|
23460
|
+
url: external_exports.string().min(1).max(500),
|
|
23461
|
+
snippet: external_exports.string().max(600).optional()
|
|
23462
|
+
}).strict();
|
|
23463
|
+
MESSAGE_ORIGINS = ["user", "assistant", "retrieved", "tool"];
|
|
23464
|
+
AgentMessageOrigin = external_exports.enum(MESSAGE_ORIGINS);
|
|
23465
|
+
AgentMessage = external_exports.object({
|
|
23466
|
+
tenantId: TenantId,
|
|
23467
|
+
id: external_exports.string().min(1).max(128),
|
|
23468
|
+
conversationId: external_exports.string().min(1).max(128),
|
|
23469
|
+
origin: AgentMessageOrigin,
|
|
23470
|
+
content: external_exports.string().max(8e3),
|
|
23471
|
+
citations: external_exports.array(AgentCitation).max(10).default([]),
|
|
23472
|
+
/** "not_found" when the answer is the deterministic below-threshold reply. */
|
|
23473
|
+
outcome: external_exports.enum(["answer", "not_found", "navigation", "tool_result", "approval", "refusal", "info"]).optional(),
|
|
23474
|
+
createdAt: Timestamp
|
|
23475
|
+
}).strict();
|
|
23476
|
+
AgentChatRequest = external_exports.object({ tenantId: TenantId, conversationId: external_exports.string().min(1).max(128), text: external_exports.string().min(1).max(4e3), currentPath: external_exports.string().max(300).optional(), escalate: external_exports.boolean().optional() }).strict();
|
|
23477
|
+
AgentFeedback = external_exports.object({ tenantId: TenantId, messageId: external_exports.string().min(1).max(128), rating: external_exports.enum(["up", "down"]), note: external_exports.string().max(500).optional(), at: Timestamp }).strict();
|
|
23478
|
+
AGENT_AUDIT_RESULTS = ["ok", "refused", "error", "approval_proposed", "approval_decided"];
|
|
23479
|
+
AgentAuditResult = external_exports.enum(AGENT_AUDIT_RESULTS);
|
|
23480
|
+
AgentAuditEvent = external_exports.object({
|
|
23481
|
+
tenantId: TenantId,
|
|
23482
|
+
id: external_exports.string().min(1).max(128),
|
|
23483
|
+
at: Timestamp,
|
|
23484
|
+
actor: external_exports.object({ userId: UserId, role: Role }).strict(),
|
|
23485
|
+
conversationId: external_exports.string().min(1).max(128),
|
|
23486
|
+
tool: external_exports.string().min(1).max(100),
|
|
23487
|
+
argumentsDigest: Sha256Digest,
|
|
23488
|
+
result: AgentAuditResult,
|
|
23489
|
+
detail: external_exports.string().max(300).optional(),
|
|
23490
|
+
approvalId: external_exports.string().min(1).max(128).optional()
|
|
23491
|
+
}).strict();
|
|
23492
|
+
AgentReadOnlyMode = external_exports.object({ tenantId: TenantId, enabled: external_exports.boolean(), setBy: UserId, setAt: Timestamp }).strict();
|
|
23493
|
+
RouteIndexEntry = external_exports.object({
|
|
23494
|
+
path: external_exports.string().regex(/^\/[A-Za-z0-9\/_.-]*$/),
|
|
23495
|
+
title: external_exports.string().min(1).max(120),
|
|
23496
|
+
description: external_exports.string().min(1).max(300),
|
|
23497
|
+
keywords: external_exports.array(external_exports.string().min(1).max(40)).max(20).default([]),
|
|
23498
|
+
roles: external_exports.array(Role).min(1),
|
|
23499
|
+
plan: AgentPlan
|
|
23500
|
+
}).strict();
|
|
23501
|
+
RouteIndex = external_exports.object({ version: external_exports.literal("1"), routes: external_exports.array(RouteIndexEntry).min(1) }).strict();
|
|
23502
|
+
AgentRouteHit = external_exports.object({ tenantId: TenantId, path: external_exports.string().startsWith("/"), title: external_exports.string().min(1).max(120), score: external_exports.number().nonnegative() }).strict();
|
|
23503
|
+
}
|
|
23504
|
+
});
|
|
23505
|
+
|
|
23159
23506
|
// ../contracts/src/plans.ts
|
|
23160
23507
|
var PLAN_IDS, BillingPlanId, CHECKOUT_PLANS, CheckoutPlanId, METERS, Meter, AllowanceValue, PlanAllowances, PlanData, OverageRates, FreeTierControls, PlanCatalog, TenantPlanLimits;
|
|
23161
23508
|
var init_plans = __esm({
|
|
@@ -23551,10 +23898,12 @@ var init_src = __esm({
|
|
|
23551
23898
|
init_memory();
|
|
23552
23899
|
init_issues();
|
|
23553
23900
|
init_onboarding();
|
|
23901
|
+
init_audit();
|
|
23554
23902
|
init_docs_service();
|
|
23555
23903
|
init_review();
|
|
23556
23904
|
init_guardrails();
|
|
23557
23905
|
init_code_map();
|
|
23906
|
+
init_agent();
|
|
23558
23907
|
init_plans();
|
|
23559
23908
|
init_billing();
|
|
23560
23909
|
}
|
|
@@ -30909,7 +31258,7 @@ var VERSION;
|
|
|
30909
31258
|
var init_assets = __esm({
|
|
30910
31259
|
"src/assets.ts"() {
|
|
30911
31260
|
"use strict";
|
|
30912
|
-
VERSION = true ? "0.1.
|
|
31261
|
+
VERSION = true ? "0.1.127" : "0.0.0-dev";
|
|
30913
31262
|
}
|
|
30914
31263
|
});
|
|
30915
31264
|
|
|
@@ -38841,9 +39190,9 @@ import { lstat, readFile as readFile4 } from "node:fs/promises";
|
|
|
38841
39190
|
import { join as join25 } from "node:path";
|
|
38842
39191
|
import { promisify } from "node:util";
|
|
38843
39192
|
function shardKeyOf(shard) {
|
|
38844
|
-
return `sha256:${
|
|
39193
|
+
return `sha256:${sha256Hex2(Buffer.from(`${shard.path}\0${shard.contentHash}\0${shard.precision}`, "utf8"))}`;
|
|
38845
39194
|
}
|
|
38846
|
-
function
|
|
39195
|
+
function sha256Hex2(bytes) {
|
|
38847
39196
|
return createHash6("sha256").update(bytes).digest("hex");
|
|
38848
39197
|
}
|
|
38849
39198
|
async function listTrackedFiles(repoRoot) {
|
|
@@ -38869,7 +39218,7 @@ async function hashRegularFile(repoRoot, path) {
|
|
|
38869
39218
|
try {
|
|
38870
39219
|
const stats = await lstat(absolute);
|
|
38871
39220
|
if (!stats.isFile()) return null;
|
|
38872
|
-
return `sha256:${
|
|
39221
|
+
return `sha256:${sha256Hex2(await readFile4(absolute))}`;
|
|
38873
39222
|
} catch (error62) {
|
|
38874
39223
|
if (error62 instanceof Error && "code" in error62 && error62.code === "ENOENT") return null;
|
|
38875
39224
|
throw error62;
|
|
@@ -38905,7 +39254,7 @@ async function buildSnapshot(options) {
|
|
|
38905
39254
|
if (languageForPath(path) === null) return { path, shard: null };
|
|
38906
39255
|
const bytes = await readFile4(join25(options.repoRoot, path));
|
|
38907
39256
|
if (bytes.byteLength > MAX_PARSE_BYTES) return { path, shard: null };
|
|
38908
|
-
const hash2 = `sha256:${
|
|
39257
|
+
const hash2 = `sha256:${sha256Hex2(bytes)}`;
|
|
38909
39258
|
if (hash2 !== hashes.get(path)) throw new Error(`${path} changed while the snapshot was being built`);
|
|
38910
39259
|
const shard = await parseDeclarations(path, bytes.toString("utf8"));
|
|
38911
39260
|
return { path, shard: shard ? { ...shard, contentHash: hash2 } : null };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "overlane",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.127",
|
|
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",
|