@kortix/ui 0.15.10 → 0.15.11
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/_vendor/kortix-shared.js +396 -2
- package/dist/_vendor/shared/app-config.d.ts +6 -30
- package/dist/_vendor/shared/channel-descriptors.d.ts +0 -34
- package/dist/_vendor/shared/channel-header.d.ts +2 -1
- package/dist/_vendor/shared/connector-sections.d.ts +0 -25
- package/dist/_vendor/shared/file-tags.d.ts +2 -1
- package/dist/_vendor/shared/pasted-content.d.ts +0 -4
- package/dist/_vendor/shared/pixel-mark.d.ts +0 -17
- package/dist/_vendor/shared/project-glyphs.d.ts +0 -1
- package/dist/customize/agents/agent-model-view.d.ts +11 -1
- package/dist/customize/agents/agent-model-view.js +12 -1
- package/dist/customize/agents/agent-page.js +19 -6
- package/dist/customize/agents/agent-tabs.d.ts +2 -0
- package/dist/customize/agents/agent-tabs.js +2 -0
- package/dist/customize/connectors/detail/connector-triggers.js +1 -1
- package/dist/customize/connectors/use-agent-access.d.ts +1 -0
- package/dist/customize/sections/component/teams-byo-wizard.js +4 -1
- package/dist/customize/triggers/runtime-triggers.js +13 -2
- package/dist/customize/triggers/schedule/event-trigger-copy.js +1 -1
- package/dist/customize/triggers/schedule/schedule-detail-sheet.js +5 -4
- package/dist/customize/triggers/schedule/then-fields.d.ts +5 -1
- package/dist/customize/triggers/schedule/then-fields.js +23 -3
- package/dist/customize/triggers/schedule/trigger-callouts.js +1 -1
- package/dist/customize/triggers/schedule/trigger-composer-logic.d.ts +27 -0
- package/dist/customize/triggers/schedule/trigger-composer-logic.js +51 -5
- package/dist/customize/triggers/schedule/trigger-composer.js +19 -13
- package/dist/customize/triggers/schedule/trigger-edit-logic.js +25 -5
- package/dist/customize/triggers/schedule/trigger-filter.d.ts +10 -3
- package/dist/customize/triggers/schedule/trigger-filter.js +7 -6
- package/dist/customize/triggers/schedule/trigger-readonly.js +1 -1
- package/dist/customize/triggers/schedule/trigger-runs-panel.js +1 -1
- package/dist/customize/triggers/schedule/when-event.js +1 -1
- package/dist/customize/triggers/schedule/when-schedule.d.ts +5 -1
- package/dist/customize/triggers/schedule/when-schedule.js +16 -1
- package/dist/customize/triggers/schedule-view.js +4 -2
- package/dist/i18n/en.d.ts +49 -0
- package/dist/i18n/en.js +57 -8
- package/dist/internal/layout/project-settings-nav.d.ts +17 -0
- package/dist/internal/layout/project-settings-nav.js +24 -0
- package/dist/internal/lib/capability-tab-routes.d.ts +8 -0
- package/dist/internal/lib/capability-tab-routes.js +11 -0
- package/dist/internal/stores/composer-prefill-store.d.ts +7 -0
- package/dist/internal/stores/composer-prefill-store.js +1 -0
- package/dist/session/actions/session-label.js +2 -2
- package/dist/session/agents/agent-strip.d.ts +10 -5
- package/dist/session/agents/agent-strip.js +40 -12
- package/dist/session/agents/held-messages.d.ts +6 -2
- package/dist/session/agents/held-messages.js +6 -3
- package/dist/session/composer/ComposerCard.js +4 -1
- package/dist/session/composer/agent-selector.d.ts +2 -0
- package/dist/session/composer/agent-selector.js +5 -0
- package/dist/session/composer/composer-chat-input.d.ts +1 -0
- package/dist/session/composer/composer-logic.d.ts +7 -0
- package/dist/session/composer/composer-logic.js +18 -0
- package/dist/session/composer/composer-reset.d.ts +8 -14
- package/dist/session/composer/composer-toolbar.d.ts +3 -1
- package/dist/session/composer/composer-toolbar.js +3 -3
- package/dist/session/composer/composer.d.ts +7 -0
- package/dist/session/composer/composer.js +17 -3
- package/dist/session/composer/editor/composer-editor.js +6 -4
- package/dist/session/header/session-site-header.d.ts +3 -1
- package/dist/session/header/session-site-header.js +3 -2
- package/dist/session/models/connect-model-step.d.ts +29 -0
- package/dist/session/models/connect-model-step.js +50 -0
- package/dist/session/models/use-workspace-model-gate.d.ts +11 -0
- package/dist/session/models/use-workspace-model-gate.js +62 -0
- package/dist/session/models/workspace-model-gate.d.ts +46 -0
- package/dist/session/models/workspace-model-gate.js +66 -0
- package/dist/session/prompts/session-connect-card.d.ts +63 -0
- package/dist/session/prompts/{session-connect-prompt.js → session-connect-card.js} +53 -42
- package/dist/session/thread/session-chat.js +294 -298
- package/dist/session/thread/transcript.d.ts +2 -1
- package/dist/session/thread/transcript.js +7 -3
- package/dist/session/tool/tool-part-renderer.js +7 -2
- package/dist/session/tool/tools/kortix-action-tool.js +10 -2
- package/dist/session/turn/turn-viewport.d.ts +66 -10
- package/dist/session/turn/turn-viewport.js +92 -12
- package/dist/session/turn/user-message.js +7 -5
- package/dist/styles.css +1 -1
- package/dist/test-utils/intl.d.ts +49 -0
- package/dist/workspace/admin/project-admin-dashboard.js +2 -4
- package/dist/workspace/home/existing-repo-setup-prompt.d.ts +5 -8
- package/dist/workspace/home/existing-repo-setup-prompt.js +16 -42
- package/dist/workspace/home/no-agent-home.d.ts +3 -1
- package/dist/workspace/home/no-agent-home.js +2 -2
- package/dist/workspace/layout/project-home.js +16 -9
- package/dist/workspace/sidebar/session-grouping.d.ts +1 -1
- package/dist/workspace/sidebar/session-grouping.js +1 -1
- package/dist/workspace/spaces/space-details-panel.js +2 -2
- package/dist/workspace/spaces/space-triggers.js +2 -2
- package/dist/workspace/spaces/space-view.js +11 -5
- package/package.json +15 -3
- package/dist/session/prompts/session-connect-prompt.d.ts +0 -40
|
@@ -210,6 +210,25 @@ function isEveryGrant(value) {
|
|
|
210
210
|
}
|
|
211
211
|
return Array.isArray(value) && value.some((item) => typeof item === "string" && item.trim() === "*");
|
|
212
212
|
}
|
|
213
|
+
var DURATION_RE = /^([1-9][0-9]*)(s|m|h|d)$/;
|
|
214
|
+
var DURATION_UNIT_SECONDS = {
|
|
215
|
+
s: 1,
|
|
216
|
+
m: 60,
|
|
217
|
+
h: 3600,
|
|
218
|
+
d: 86400
|
|
219
|
+
};
|
|
220
|
+
function parseDurationSeconds(raw) {
|
|
221
|
+
const match = DURATION_RE.exec(raw.trim());
|
|
222
|
+
if (!match) return null;
|
|
223
|
+
return Number(match[1]) * DURATION_UNIT_SECONDS[match[2]];
|
|
224
|
+
}
|
|
225
|
+
function formatDurationSeconds(seconds) {
|
|
226
|
+
if (!Number.isInteger(seconds) || seconds <= 0) return `${seconds}s`;
|
|
227
|
+
if (seconds % 86400 === 0) return `${seconds / 86400}d`;
|
|
228
|
+
if (seconds % 3600 === 0) return `${seconds / 3600}h`;
|
|
229
|
+
if (seconds % 60 === 0) return `${seconds / 60}m`;
|
|
230
|
+
return `${seconds}s`;
|
|
231
|
+
}
|
|
213
232
|
var CHANNEL_PLATFORMS = CHANNEL_PLATFORM_IDS;
|
|
214
233
|
({
|
|
215
234
|
...Object.fromEntries(CHANNEL_PLATFORMS.map((platform) => [channelConnectorSlug(platform), "channel"]))});
|
|
@@ -323,7 +342,7 @@ var DEPRECATIONS = [
|
|
|
323
342
|
since: "2026-10-27",
|
|
324
343
|
summary: 'an agent without `tools` gets every tool. Write `tools: "*"` (same meaning), or list the tools it needs.',
|
|
325
344
|
apply: (doc) => agentBlocks(doc).flatMap(([name, block]) => {
|
|
326
|
-
if (block.has("tools")) return [];
|
|
345
|
+
if (block.has("tools") || block.has("run")) return [];
|
|
327
346
|
block.set("tools", everyScalar());
|
|
328
347
|
return [`agents.${name}.tools`];
|
|
329
348
|
})
|
|
@@ -4372,6 +4391,381 @@ function dedentCommand(raw) {
|
|
|
4372
4391
|
return lines.map((line) => line.slice(min)).join("\n");
|
|
4373
4392
|
}
|
|
4374
4393
|
|
|
4394
|
+
// ../shared/src/setup-guide.ts
|
|
4395
|
+
var PROD_TARGET = { origin: "https://kortix.com", apiBase: "https://api.kortix.com" };
|
|
4396
|
+
var trim = (url) => {
|
|
4397
|
+
let out = url.trim();
|
|
4398
|
+
while (out.endsWith("/")) out = out.slice(0, -1);
|
|
4399
|
+
return out;
|
|
4400
|
+
};
|
|
4401
|
+
function setupTarget(origin, backendUrl) {
|
|
4402
|
+
const web = origin ? trim(origin) : PROD_TARGET.origin;
|
|
4403
|
+
if (web === PROD_TARGET.origin) return PROD_TARGET;
|
|
4404
|
+
const backend = backendUrl?.trim() ? trim(backendUrl) : "";
|
|
4405
|
+
const absolute = /^https?:\/\//.test(backend) ? backend : backend ? `${web}${backend.startsWith("/") ? "" : "/"}${backend}` : "";
|
|
4406
|
+
return { origin: web, apiBase: absolute ? absolute.replace(/\/v1$/, "") : PROD_TARGET.apiBase };
|
|
4407
|
+
}
|
|
4408
|
+
var isProd = (target) => target.origin === PROD_TARGET.origin && target.apiBase === PROD_TARGET.apiBase;
|
|
4409
|
+
function setupHostName(target) {
|
|
4410
|
+
return target.origin.replace(/^https?:\/\//, "").replace(/[^a-z0-9]+/gi, "-").replace(/^-|-$/g, "").toLowerCase();
|
|
4411
|
+
}
|
|
4412
|
+
var guideUrl = (target = PROD_TARGET) => `${target.origin}/setup.md`;
|
|
4413
|
+
guideUrl();
|
|
4414
|
+
`${PROD_TARGET.origin}/factory.md`;
|
|
4415
|
+
function installBlock(target) {
|
|
4416
|
+
if (isProd(target)) {
|
|
4417
|
+
return ["```bash", `command -v kortix || curl -fsSL ${target.origin}/install | bash`, "kortix --version", "```"].join("\n");
|
|
4418
|
+
}
|
|
4419
|
+
const host = setupHostName(target);
|
|
4420
|
+
return [
|
|
4421
|
+
`This guide is served by the Kortix deployment at ${target.origin} (API ${target.apiBase}),`,
|
|
4422
|
+
"not production. Point the CLI at it before anything else; every later",
|
|
4423
|
+
"command then talks to this deployment.",
|
|
4424
|
+
"",
|
|
4425
|
+
"```bash",
|
|
4426
|
+
`command -v kortix || curl -fsSL ${target.origin}/install | KORTIX_CHANNEL=dev bash`,
|
|
4427
|
+
"kortix --version",
|
|
4428
|
+
`kortix hosts info ${host} >/dev/null 2>&1 || kortix hosts add ${host} --url ${target.apiBase}`,
|
|
4429
|
+
`kortix hosts use ${host}`,
|
|
4430
|
+
"kortix hosts current # must print " + host,
|
|
4431
|
+
"```",
|
|
4432
|
+
"",
|
|
4433
|
+
"A test deployment may have no Kortix GitHub App. When step 6 asks the person",
|
|
4434
|
+
"to install the App and the link does not work, use their own token instead,",
|
|
4435
|
+
"with their yes: `gh auth token | kortix onboard --yes --json --github-token -`."
|
|
4436
|
+
].join("\n");
|
|
4437
|
+
}
|
|
4438
|
+
function agentBlock(target) {
|
|
4439
|
+
const url = `${target.apiBase}/v1/mcp`;
|
|
4440
|
+
return [
|
|
4441
|
+
"```bash",
|
|
4442
|
+
`command -v claude >/dev/null && claude mcp add --transport http kortix ${url}`,
|
|
4443
|
+
`command -v codex >/dev/null && codex mcp add kortix --url ${url} && codex mcp login kortix`,
|
|
4444
|
+
"kortix init --force",
|
|
4445
|
+
"```"
|
|
4446
|
+
].join("\n");
|
|
4447
|
+
}
|
|
4448
|
+
function setupPromptFor(target = PROD_TARGET) {
|
|
4449
|
+
const url = guideUrl(target);
|
|
4450
|
+
return `Set up Kortix cloud agents on this repository with me.
|
|
4451
|
+
Read ${url} (curl -fsSL ${url}) and follow it step by step.
|
|
4452
|
+
Ask all your questions in one message. Never print a secret value.`;
|
|
4453
|
+
}
|
|
4454
|
+
setupPromptFor();
|
|
4455
|
+
function setupPrompt(workspace, target = PROD_TARGET) {
|
|
4456
|
+
const prompt = setupPromptFor(target);
|
|
4457
|
+
const repository = workspace?.repository?.trim();
|
|
4458
|
+
if (!repository) return prompt;
|
|
4459
|
+
const branch = workspace?.branch?.trim() || "its default branch";
|
|
4460
|
+
return `${prompt}
|
|
4461
|
+
The Kortix workspace exists already: it reads kortix.yaml from ${repository} on ${branch}. Push the setup there.`;
|
|
4462
|
+
}
|
|
4463
|
+
function setupGuide(target = PROD_TARGET) {
|
|
4464
|
+
return `# Set up Kortix on this repository
|
|
4465
|
+
|
|
4466
|
+
The person pasted a prompt like "Add a Kortix software factory to this
|
|
4467
|
+
repository with me". You are the coding agent on their computer. From here you
|
|
4468
|
+
do everything: install the Kortix CLI, sign them in (one click in their
|
|
4469
|
+
browser), investigate their repositories and the software they use, ask
|
|
4470
|
+
every question in one message, write their \`kortix.yaml\` by adapting a
|
|
4471
|
+
reference repository, loop until \`kortix doctor --loops\` is green and one
|
|
4472
|
+
real run worked, and wire their local coding agents to Kortix. Their part is
|
|
4473
|
+
one reply to your questions and a few clicks only a person can make.
|
|
4474
|
+
|
|
4475
|
+
When you are done, agents run 24/7 in Kortix cloud sandboxes on a copy of their
|
|
4476
|
+
dev environment, on their Claude or Codex plan or an API key, started by the
|
|
4477
|
+
signals the plan named (GitHub issues, failing tests, errors, Slack, schedules).
|
|
4478
|
+
|
|
4479
|
+
\`kortix\` is your only tool for the platform. Use \`--json\` for everything you
|
|
4480
|
+
parse.
|
|
4481
|
+
|
|
4482
|
+
## Rules
|
|
4483
|
+
|
|
4484
|
+
1. **One message of questions, one reply.** Investigate first (step 2), then
|
|
4485
|
+
ask every question in one message (step 3). Each question carries your
|
|
4486
|
+
recommended answer. The person's one reply approves the whole plan. After
|
|
4487
|
+
it, do not ask again, unless a step fails in a way only the person can
|
|
4488
|
+
decide. Never ask what the repository, \`gh\` or \`kortix\` can answer.
|
|
4489
|
+
2. **Secrets.** Values move only through \`kortix\` (it reads them in-process).
|
|
4490
|
+
Never print a secret, never put one in a command argument, never paste one
|
|
4491
|
+
into a file. **Never open a file that may hold one**: no \`cat\`, \`head\`,
|
|
4492
|
+
\`grep\` with context, or your own file-read tool on \`.env*\`, \`*.keys\`,
|
|
4493
|
+
\`.envrc\` or credential files. Reading a file sends its values to your model
|
|
4494
|
+
provider. Use the names-only view: \`kortix plan --json\` (\`env\`: every key,
|
|
4495
|
+
classed \`local\`, \`remote\` or \`prod\`).
|
|
4496
|
+
3. **Never point agents at a shared backend.** A name classed \`remote\` or
|
|
4497
|
+
\`prod\` is not uploaded. The agents' dev environment runs locally and
|
|
4498
|
+
throwaway in the sandbox.
|
|
4499
|
+
4. **Adapt, never copy.** A reference repository is an example. The
|
|
4500
|
+
person's \`kortix.yaml\` fits their repository: their tracker, their
|
|
4501
|
+
commands, their channels.
|
|
4502
|
+
5. **Verify, don't assume.** A step is done when \`kortix doctor --loops\` or a
|
|
4503
|
+
real run proves it.
|
|
4504
|
+
6. **Be brief.** One line per step while you work. Do not print what you
|
|
4505
|
+
investigated: no map, no inventory, no list of ideas. A finding reaches the
|
|
4506
|
+
person only as one line of the step 3 message or of the final report. The
|
|
4507
|
+
step 3 message has at most 40 lines, the final report at most 15.
|
|
4508
|
+
|
|
4509
|
+
## 0. Install
|
|
4510
|
+
|
|
4511
|
+
${installBlock(target)}
|
|
4512
|
+
|
|
4513
|
+
## 1. Sign in and see the plan
|
|
4514
|
+
|
|
4515
|
+
\`\`\`bash
|
|
4516
|
+
kortix whoami # signed in? if not:
|
|
4517
|
+
kortix login # opens the browser: "click Authorize in the tab that just opened"
|
|
4518
|
+
kortix plan --json # the deterministic baseline, names only
|
|
4519
|
+
\`\`\`
|
|
4520
|
+
|
|
4521
|
+
\`kortix plan\` reports the repository (GitHub origin, default branch, monorepo
|
|
4522
|
+
layout, clean or dirty), the stack (runtimes, package managers, services, dev,
|
|
4523
|
+
test and end-to-end commands, CI), every env key by class, the software it
|
|
4524
|
+
found (\`integrations\`: each with a category and its evidence; about 90
|
|
4525
|
+
products are known), the credentials it could not name
|
|
4526
|
+
(\`unrecognized_services\`: a key prefix each), the MCP servers the repository's
|
|
4527
|
+
coding tools already use (\`mcp_servers\`, names only), the Kortix state
|
|
4528
|
+
(workspace, connectors, Slack, models), a dev-environment proposal and the
|
|
4529
|
+
reference repositories.
|
|
4530
|
+
|
|
4531
|
+
## 2. Investigate, without asking
|
|
4532
|
+
|
|
4533
|
+
The plan is the floor, not the ceiling. Investigate for minutes, not hours.
|
|
4534
|
+
Ask nothing and print nothing in this step: everything you find feeds the one
|
|
4535
|
+
message of step 3.
|
|
4536
|
+
|
|
4537
|
+
1. **This repository.** Read it the way a new engineer would: \`AGENTS.md\`,
|
|
4538
|
+
\`CLAUDE.md\`, \`CONTRIBUTING.md\`, the README, CI workflows, the scripts the
|
|
4539
|
+
team runs. Note every rule that conflicts with agents shipping work (for
|
|
4540
|
+
example "push to main"). For a monorepo, note which apps exist and how
|
|
4541
|
+
each one starts and tests.
|
|
4542
|
+
2. **The other repositories.** \`gh repo list <owner> --limit 100 --json name,description,pushedAt,isArchived\`
|
|
4543
|
+
for the owner of this repository's origin, plus the repositories this one
|
|
4544
|
+
names (submodules, workflow \`uses:\` of the same owner, links in the docs).
|
|
4545
|
+
Note the ones pushed in the last 90 days and what each one is.
|
|
4546
|
+
3. **The software.** Start from the plan's \`integrations\` (each has a
|
|
4547
|
+
category and its evidence), \`unrecognized_services\` and \`mcp_servers\`.
|
|
4548
|
+
Add what you find yourself: SDK imports, webhook handlers, secret names in
|
|
4549
|
+
CI workflows, deploy configs, links in the docs. For each one note the
|
|
4550
|
+
signal it gives (a new error, a new ticket, a signup) and the action it
|
|
4551
|
+
allows (a reply, a comment, a query).
|
|
4552
|
+
4. **Where context lives.** The docs folder or site, the wiki, ADRs and
|
|
4553
|
+
runbooks, the tracker and its labels, the changelog, and what the
|
|
4554
|
+
repository links to outside itself (Notion, Google Drive, Confluence,
|
|
4555
|
+
Figma).
|
|
4556
|
+
5. **The reference repositories.** \`recommendation.references\` in the plan
|
|
4557
|
+
lists them. Read each one's \`README.md\`, \`ADAPTING.md\`, \`kortix.yaml\` and
|
|
4558
|
+
\`.kortix/\` now. Every loop is a part you can take on its own. The Software
|
|
4559
|
+
Factory has intake from issues, errors, logs and feedback, a worker that
|
|
4560
|
+
opens pull requests with proof, and a reviewer. The Marketing Factory has
|
|
4561
|
+
the changelog from merged pull requests, blog and social drafts, search
|
|
4562
|
+
reports and a brand skill. When the prompt names one reference, that one
|
|
4563
|
+
is the starting point; the other is still a source of parts.
|
|
4564
|
+
6. **The template's questions.** \`ADAPTING.md\` and a template's own steps
|
|
4565
|
+
(printed above this guide by \`/factory.md\` and \`kortix templates
|
|
4566
|
+
onboard\`) mark questions with **Ask**. Collect every one now, with your
|
|
4567
|
+
recommended answer. Each one goes into the step 3 message; never ask it
|
|
4568
|
+
where it appears.
|
|
4569
|
+
7. **The loops to offer.** From what you found, pick 2 to 4 loops, most
|
|
4570
|
+
valuable first. Each one is a signal, what the agent ships, who approves
|
|
4571
|
+
it, and the evidence that it fits ("42 open issues labeled bug and a test
|
|
4572
|
+
suite: bug fixes as pull requests"). Keep the other good ideas for the
|
|
4573
|
+
final report, under "later".
|
|
4574
|
+
|
|
4575
|
+
## 3. One message of questions, one reply
|
|
4576
|
+
|
|
4577
|
+
Send the person one message in this shape. Write it as plain text, also in
|
|
4578
|
+
Claude Code: a question tool holds fewer questions and can hide the findings.
|
|
4579
|
+
|
|
4580
|
+
\`\`\`text
|
|
4581
|
+
Kortix setup for <owner>/<repo>
|
|
4582
|
+
|
|
4583
|
+
Found: <the stack, and how it runs and tests>
|
|
4584
|
+
<the software the loops would use>
|
|
4585
|
+
<anything that needs their eye: a production value in an env file,
|
|
4586
|
+
a rule that conflicts with the loops>
|
|
4587
|
+
|
|
4588
|
+
1. Loops to start (pick any):
|
|
4589
|
+
a) <name>: <signal> -> <output>, <approver> (recommended)
|
|
4590
|
+
b) <name>: <signal> -> <output>, <approver>
|
|
4591
|
+
2. <question>?
|
|
4592
|
+
a) <answer> (recommended) b) <answer> c) <answer>
|
|
4593
|
+
...
|
|
4594
|
+
Defaults: <every other decision, with the answer you will use>.
|
|
4595
|
+
|
|
4596
|
+
Reply "go" to take every recommended answer, or "go" with changes:
|
|
4597
|
+
"go, 1ab, 3c, 5: Linear".
|
|
4598
|
+
\`\`\`
|
|
4599
|
+
|
|
4600
|
+
The questions:
|
|
4601
|
+
|
|
4602
|
+
- **At most 8**, numbered. Each one fits in 3 lines and has a recommended
|
|
4603
|
+
answer. A free-text answer (a URL, competitor domains, an ICP, a rubric)
|
|
4604
|
+
gets your draft as its recommended answer; the person corrects it.
|
|
4605
|
+
- **Only decisions the person owns.** Pick from this list, in this order,
|
|
4606
|
+
and leave out a question the evidence settles:
|
|
4607
|
+
1. the loops to start: signal, output and approver of each;
|
|
4608
|
+
2. where work lands: the tracker or the system of record;
|
|
4609
|
+
3. the software to connect as Kortix connectors (one line: connect these,
|
|
4610
|
+
leave out those). When the plan shows a workspace, check each app first
|
|
4611
|
+
with \`kortix connectors catalog <name> --json\` and leave out an app
|
|
4612
|
+
with no entry;
|
|
4613
|
+
4. the models: the person's Claude plan, their ChatGPT plan, or an API
|
|
4614
|
+
key; the reviewer on the strongest model;
|
|
4615
|
+
5. where \`kortix.yaml\` lives (this repository, or its own private
|
|
4616
|
+
repository so the code gets no file) and the workspace name;
|
|
4617
|
+
6. the template's questions from step 2;
|
|
4618
|
+
7. a repository rule that conflicts with the loops: which one wins;
|
|
4619
|
+
8. the task for the real run in step 7, from what you found.
|
|
4620
|
+
- **More than 8:** keep the 8 with the largest effect. Put every other
|
|
4621
|
+
decision, with the answer you will use, on the \`Defaults:\` line: the env
|
|
4622
|
+
names to upload (only \`local\`), the Slack channels, the Kortix rule in
|
|
4623
|
+
\`AGENTS.md\` (default: add it).
|
|
4624
|
+
- **A gap is a question only when a chosen loop needs it.** An
|
|
4625
|
+
\`unrecognized_services\` prefix or an empty category becomes one question
|
|
4626
|
+
with likely answers ("Tickets: a) GitHub Issues (recommended) b) Linear
|
|
4627
|
+
c) Jira"). Otherwise leave it out.
|
|
4628
|
+
- **Never** ask one item at a time, an open "what else do you use?", or for a
|
|
4629
|
+
secret value.
|
|
4630
|
+
|
|
4631
|
+
After the reply:
|
|
4632
|
+
|
|
4633
|
+
- The reply approves the plan. Do not show the plan again and do not ask a
|
|
4634
|
+
second round.
|
|
4635
|
+
- A question the reply leaves open gets its recommended answer: say so in one
|
|
4636
|
+
line.
|
|
4637
|
+
- A new thing in the reply (a custom loop in their words, another tool): add
|
|
4638
|
+
it when it fits, else put it in the final report under "later".
|
|
4639
|
+
- From here the person only acts: a sign-in, an Authorize click, a token
|
|
4640
|
+
pasted into an intake link. Give each link once. Give the links that are
|
|
4641
|
+
ready at the same time in one message.
|
|
4642
|
+
|
|
4643
|
+
## 4. Write the configuration
|
|
4644
|
+
|
|
4645
|
+
Adapt the reference into this repository (or the config repository): write
|
|
4646
|
+
\`kortix.yaml\` with \`env.required\` and \`env.optional\` listing every secret the
|
|
4647
|
+
loops use, the \`.kortix/<factory>/\` folder, the sandbox \`Dockerfile\` (a
|
|
4648
|
+
Debian-family base, the repository's runtimes at their pinned versions, git and
|
|
4649
|
+
gh, no \`COPY\` from the repository), the template's \`cpu\`, \`memory\` and \`disk\`
|
|
4650
|
+
from the plan's \`dev_environment.resources\` (a sandbox too small for the dev
|
|
4651
|
+
stack crashes the tests), and the \`dev-environment\` skill. Then:
|
|
4652
|
+
|
|
4653
|
+
\`\`\`bash
|
|
4654
|
+
kortix validate
|
|
4655
|
+
\`\`\`
|
|
4656
|
+
|
|
4657
|
+
Fix every error and warning in the files you wrote. Two rules save a round:
|
|
4658
|
+
|
|
4659
|
+
- Give every agent you add a \`tools\` list (or \`"*"\`). An agent without one
|
|
4660
|
+
trips a deprecation warning.
|
|
4661
|
+
- When \`kortix.yaml\` lives in its own repository, add
|
|
4662
|
+
\`body.repository.full_name: <owner>/<repo>\` to the \`filter\` of every
|
|
4663
|
+
GitHub webhook trigger. It names the code repository in code: \`onboard\`
|
|
4664
|
+
and \`doctor\` then put the webhooks and labels there, and an event from any
|
|
4665
|
+
other repository never starts a run.
|
|
4666
|
+
|
|
4667
|
+
## 5. Connect the models
|
|
4668
|
+
|
|
4669
|
+
Connect what the person picked in step 3.
|
|
4670
|
+
|
|
4671
|
+
- **Claude Pro or Max:** \`kortix providers login claude --start --share workspace --json\`;
|
|
4672
|
+
give the person the \`authorize_url\`; they paste the code back;
|
|
4673
|
+
\`kortix providers login claude --flow <flow_id> --code <code> --share workspace\`.
|
|
4674
|
+
- **ChatGPT Plus or Pro:** \`kortix providers login openai\` in the background;
|
|
4675
|
+
give the person the link and the code it prints.
|
|
4676
|
+
- **An API key:** \`kortix providers set <provider>\`; the person types the key.
|
|
4677
|
+
|
|
4678
|
+
## 6. Do it
|
|
4679
|
+
|
|
4680
|
+
\`\`\`bash
|
|
4681
|
+
kortix onboard --yes --json \\
|
|
4682
|
+
[--env-file <file> --only <A,B>]... \\
|
|
4683
|
+
[--channels <a,b>] [--connect <slug,...>] \\
|
|
4684
|
+
[--name "<workspace name>"] [--repo <owner/repo>] [--github-token -]
|
|
4685
|
+
\`\`\`
|
|
4686
|
+
|
|
4687
|
+
The first run creates the workspace. \`--name\` is its display name (default:
|
|
4688
|
+
\`project.name\` in \`kortix.yaml\`, else the folder name): use the name from
|
|
4689
|
+
step 3, for example "Acme Loops". \`--repo\` is the code repository for the
|
|
4690
|
+
webhooks when \`kortix.yaml\` lives elsewhere and its triggers carry no
|
|
4691
|
+
\`body.repository.full_name\` filter.
|
|
4692
|
+
|
|
4693
|
+
It runs in phases, each skipping what is done: \`validate\`, \`ship\` (link and
|
|
4694
|
+
push; it refuses a dirty tree), \`secrets\` (approved names, generated webhook
|
|
4695
|
+
secrets, one intake link for the rest), \`webhooks\` (the GitHub repository
|
|
4696
|
+
webhooks and labels the triggers need, through the person's \`gh\`), \`slack\`
|
|
4697
|
+
(connect link, the bot joins the channels), \`connectors\` (a sign-in link each),
|
|
4698
|
+
\`sandbox\` (build every image and wait; a first build takes 5 to 10 minutes
|
|
4699
|
+
and prints nothing in \`--json\` mode: tell the person before you start),
|
|
4700
|
+
\`doctor\`.
|
|
4701
|
+
|
|
4702
|
+
A repository webhook that already sends the same event to another Kortix
|
|
4703
|
+
workspace is left in place and reported in the \`webhooks\` detail. Tell the
|
|
4704
|
+
person: two workspaces would act on the same event. They pick one; delete the
|
|
4705
|
+
other hook with the command \`kortix doctor --loops\` prints.
|
|
4706
|
+
|
|
4707
|
+
A source that is off needs nothing: a disabled Slack trigger asks for no Slack
|
|
4708
|
+
connection.
|
|
4709
|
+
|
|
4710
|
+
Exit 0 is done and green. Exit 4 means \`user_actions\` are left: give the person
|
|
4711
|
+
all of them in one message, each exactly once, with its link (install the GitHub App, Allow in Slack,
|
|
4712
|
+
sign in to a connector, paste a token, \`/invite\` the bot to a private channel).
|
|
4713
|
+
When they say it is done, run \`kortix onboard --yes --json\` again. Exit 1: read
|
|
4714
|
+
the failed phase's \`detail\`, fix it, run again.
|
|
4715
|
+
|
|
4716
|
+
## 7. Prove it, and loop until it works
|
|
4717
|
+
|
|
4718
|
+
\`\`\`bash
|
|
4719
|
+
kortix doctor --loops --json # every check of what kortix.yaml declares
|
|
4720
|
+
kortix doctor --loops --fix --json # re-runs the phase a red line names
|
|
4721
|
+
\`\`\`
|
|
4722
|
+
|
|
4723
|
+
Pass the same \`--repo <owner/repo>\` you gave \`onboard\`, if any.
|
|
4724
|
+
|
|
4725
|
+
Loop until \`ready: true\`. Then one real run, the cheapest one the factory has:
|
|
4726
|
+
for the Software Factory, file the task the person approved in step 3, label
|
|
4727
|
+
it, \`kortix triggers fire factory-intake --wait 300s\`, and wait for the pull
|
|
4728
|
+
request. Show it to the person: the summary, the commands with their real
|
|
4729
|
+
output, the demo when the change is visible. Nobody merges it but them.
|
|
4730
|
+
|
|
4731
|
+
## 8. Wire this computer's coding agents
|
|
4732
|
+
|
|
4733
|
+
So the person can run, change and add loops by talking to the agent they
|
|
4734
|
+
already use. Tell them each thing you add.
|
|
4735
|
+
|
|
4736
|
+
${agentBlock(target)}
|
|
4737
|
+
|
|
4738
|
+
- The MCP server lets a coding agent start Kortix sessions, read their
|
|
4739
|
+
progress, run commands in a session's sandbox and call the workspace's
|
|
4740
|
+
connectors, as the person, with their permissions. The first call opens a
|
|
4741
|
+
consent page in the browser. A coding agent loads a new MCP server at its
|
|
4742
|
+
next start: say so.
|
|
4743
|
+
- \`kortix init --force\` runs in the repository that holds \`kortix.yaml\`. It
|
|
4744
|
+
links every skill \`kortix.yaml\` registers where each local tool reads
|
|
4745
|
+
skills (never committed). An \`AGENTS.md\` the repository already has is
|
|
4746
|
+
kept: it gets one marked Kortix section at the end. A code repository
|
|
4747
|
+
without \`kortix.yaml\` gets the MCP server and the rule below, nothing else.
|
|
4748
|
+
- Unless the person said no in step 3, add this rule to the repository's \`AGENTS.md\` (and
|
|
4749
|
+
\`CLAUDE.md\` when it exists): "This repository runs Kortix loops, defined
|
|
4750
|
+
in \`kortix.yaml\`. To reach an outside tool, use the Kortix connectors
|
|
4751
|
+
(\`kortix connectors\` or the Kortix MCP server) before any local
|
|
4752
|
+
credential. To add or change a loop, edit \`kortix.yaml\`, run \`kortix
|
|
4753
|
+
validate\`, then \`kortix ship\`."
|
|
4754
|
+
- Use the CLI for setup and scripts, the MCP server in conversation. Both
|
|
4755
|
+
reach the same workspace.
|
|
4756
|
+
|
|
4757
|
+
## 9. Hand over
|
|
4758
|
+
|
|
4759
|
+
A report of at most 15 lines: the loops now running and what starts each,
|
|
4760
|
+
where tickets land, who merges, how to start work by hand (label an issue,
|
|
4761
|
+
\`kortix triggers fire <slug>\`), how to add the next loop (ask this agent: it
|
|
4762
|
+
edits \`kortix.yaml\` and ships it), what you wired on this computer (the MCP
|
|
4763
|
+
server, the skills), where to watch (the workspace link), the answers you
|
|
4764
|
+
took by default, the ideas kept for later, and anything still open.
|
|
4765
|
+
`;
|
|
4766
|
+
}
|
|
4767
|
+
setupGuide();
|
|
4768
|
+
|
|
4375
4769
|
// ../shared/src/tool-output/background-workers.ts
|
|
4376
4770
|
var COLON2 = 58;
|
|
4377
4771
|
function occurrences(text, needle, ignoreCase) {
|
|
@@ -5876,4 +6270,4 @@ function parseWorkspaceSettingsSection(raw) {
|
|
|
5876
6270
|
return Object.prototype.hasOwnProperty.call(WORKSPACE_SETTINGS_SECTION_ALIASES, value) ? WORKSPACE_SETTINGS_SECTION_ALIASES[value] : null;
|
|
5877
6271
|
}
|
|
5878
6272
|
|
|
5879
|
-
export { ARTIFACT_DOC_CSS, AVATAR_INK, CARD_TEXT_RATIO, CHANNELS, CHANNEL_PLATFORM_IDS, CHROME_LAUNCHED, COMMIT_CONFIRM_ATTEMPTS, COMMIT_CONFIRM_DELAY_MS, CREDITS_PER_DOLLAR, CURATED_SECTIONS, HUMAN_ONLY, KATEX_FENCE_LANGUAGES, LANGUAGE_ALIASES, LONG_NAME_THRESHOLD, MAX_PROMPT_ATTACHMENTS_BYTES, MAX_PROMPT_ATTACHMENT_BYTES, MAX_PROMPT_ATTACHMENT_FILES, MAX_PROMPT_UPLOAD_FILENAME_BYTES, MERMAID_DIAGRAM_STARTERS, MY_KORTIX_AGENT_NAME, MY_KORTIX_DISPLAY_NAME, MY_KORTIX_SANDBOX_SLUG, NAME_TAIL_CHARS, NOT_TURN_PROMPTER, OTHER, PASTED_INLINE_MAX_BYTES, PIXEL_KORTIX_ROWS, PIXEL_MARK_TONES, POLICY_SETS_UNSUPPORTED_PROVIDERS, POPULAR_SECTION, PREVIEW_BUILDING_STATES, PREVIEW_STATE_MESSAGE, PROJECT_GLYPH_COLORS, PROJECT_GLYPH_GROUPS, SPACE_POST_SUMMARY, STALE_RUNTIME_DELIVERY_ERROR, UNKNOWN_RATIO, UPLOAD_LIMITS, WORKSPACE_SETTINGS_GROUPS, agentDisplayName, appAdminsOnly, attachmentExtension, autoLinkUrls, avatarFill, bashRowTitle, buildWebhookSampleRequest, capitalizeWords, cardImageShape, cardListLayout, chalkColors, channelPromptTail, classifySessionStarter, confirmCommitted, countInSection, dedentCommand, dollarsToCredits, editConfigPrompt, errorCode, escapeCurrencyDollars, expandPastedContent, extractReadableHtml, fileTagBlocks, fixManifestText, formatFileSize, formatRelative, formatUsdAsCredits, gridApps, groupIntoSections, hasReferenceDefinitionOutsideFences, humanizeCategory, indexOfIgnoreCase, isAllowedWebPushHost, isAmbiguousCreateFailure, isChannelFileLabel, isChannelPlatform, isMermaidCode, isMyKortixAgentName, isPreviewableImage, isProjectGlyphColor, isProjectGlyphName, isProjectGlyphPaletteColor, languageLabel, looksLikeMarkdown, masonryColumns, neutralizePastedTags, newConfigPrompt, newPastedContentId, normalizeLanguage, normalizeLatexDelimiters, normalizeProjectGlyphColor, openMarkdownLinkAtEnd, parseBackgroundWorkers, parseBalanceUsd, parseChannelMessage, parseGrepOutput, parseManifestText, parseMemoryEntryOutput, parseMemorySearchOutput, parsePeerMessagePrompt, parseReminderPrompt, parseSessionGetOutput, parseSessionMessagesOutput, parseSessionMetadataOutput, parseSessionSearchHits, parseTriggerEvent, parseTriggerLines, parseWorkspaceSettingsSection, passesPixelMarkGate, peerHandleLabel, pixelMark, policySetNameError, prefersPreviewLink, prepareMarkdownForKatex, prepareMarkdownForMath, promptFileReferenceXml, ptyOutputBlock, ptySpawnedBody, pushTypeOf, referenceHeaders, removeSpans, replaceSpans, resolveRegisteredKey, safeHttpUrl, sandboxMediaPath, sanitizePromptUploadFilename, sectionKeyForCategory, sectionKeysForEntry, sectionTitle, selfClosingTags, serializePromptWithPastes, shouldTilePaste, skillDocumentBody, slackPlainText, slugifySlug, spaceDriveFolders, spaceSlug, splitFilenameForTile, splitPastedContent, stopRefusalMessage, stripBashMetadata, stripChatMentionMarkup, stripMarkupForToolOutput, tagBlocks, toolRegistryCandidates, trimPastedText, truncateString, utf8Bytes, withoutEdgeQuotes, xmlBlocks };
|
|
6273
|
+
export { ARTIFACT_DOC_CSS, AVATAR_INK, CARD_TEXT_RATIO, CHANNELS, CHANNEL_PLATFORM_IDS, CHROME_LAUNCHED, COMMIT_CONFIRM_ATTEMPTS, COMMIT_CONFIRM_DELAY_MS, CREDITS_PER_DOLLAR, CURATED_SECTIONS, HUMAN_ONLY, KATEX_FENCE_LANGUAGES, LANGUAGE_ALIASES, LONG_NAME_THRESHOLD, MAX_PROMPT_ATTACHMENTS_BYTES, MAX_PROMPT_ATTACHMENT_BYTES, MAX_PROMPT_ATTACHMENT_FILES, MAX_PROMPT_UPLOAD_FILENAME_BYTES, MERMAID_DIAGRAM_STARTERS, MY_KORTIX_AGENT_NAME, MY_KORTIX_DISPLAY_NAME, MY_KORTIX_SANDBOX_SLUG, NAME_TAIL_CHARS, NOT_TURN_PROMPTER, OTHER, PASTED_INLINE_MAX_BYTES, PIXEL_KORTIX_ROWS, PIXEL_MARK_TONES, POLICY_SETS_UNSUPPORTED_PROVIDERS, POPULAR_SECTION, PREVIEW_BUILDING_STATES, PREVIEW_STATE_MESSAGE, PROJECT_GLYPH_COLORS, PROJECT_GLYPH_GROUPS, SPACE_POST_SUMMARY, STALE_RUNTIME_DELIVERY_ERROR, UNKNOWN_RATIO, UPLOAD_LIMITS, WORKSPACE_SETTINGS_GROUPS, agentDisplayName, appAdminsOnly, attachmentExtension, autoLinkUrls, avatarFill, bashRowTitle, buildWebhookSampleRequest, capitalizeWords, cardImageShape, cardListLayout, chalkColors, channelPromptTail, classifySessionStarter, confirmCommitted, countInSection, dedentCommand, dollarsToCredits, editConfigPrompt, errorCode, escapeCurrencyDollars, expandPastedContent, extractReadableHtml, fileTagBlocks, fixManifestText, formatDurationSeconds, formatFileSize, formatRelative, formatUsdAsCredits, gridApps, groupIntoSections, hasReferenceDefinitionOutsideFences, humanizeCategory, indexOfIgnoreCase, isAllowedWebPushHost, isAmbiguousCreateFailure, isChannelFileLabel, isChannelPlatform, isMermaidCode, isMyKortixAgentName, isPreviewableImage, isProjectGlyphColor, isProjectGlyphName, isProjectGlyphPaletteColor, languageLabel, looksLikeMarkdown, masonryColumns, neutralizePastedTags, newConfigPrompt, newPastedContentId, normalizeLanguage, normalizeLatexDelimiters, normalizeProjectGlyphColor, openMarkdownLinkAtEnd, parseBackgroundWorkers, parseBalanceUsd, parseChannelMessage, parseDurationSeconds, parseGrepOutput, parseManifestText, parseMemoryEntryOutput, parseMemorySearchOutput, parsePeerMessagePrompt, parseReminderPrompt, parseSessionGetOutput, parseSessionMessagesOutput, parseSessionMetadataOutput, parseSessionSearchHits, parseTriggerEvent, parseTriggerLines, parseWorkspaceSettingsSection, passesPixelMarkGate, peerHandleLabel, pixelMark, policySetNameError, prefersPreviewLink, prepareMarkdownForKatex, prepareMarkdownForMath, promptFileReferenceXml, ptyOutputBlock, ptySpawnedBody, pushTypeOf, referenceHeaders, removeSpans, replaceSpans, resolveRegisteredKey, safeHttpUrl, sandboxMediaPath, sanitizePromptUploadFilename, sectionKeyForCategory, sectionKeysForEntry, sectionTitle, selfClosingTags, serializePromptWithPastes, setupPrompt, setupTarget, shouldTilePaste, skillDocumentBody, slackPlainText, slugifySlug, spaceDriveFolders, spaceSlug, splitFilenameForTile, splitPastedContent, stopRefusalMessage, stripBashMetadata, stripChatMentionMarkup, stripMarkupForToolOutput, tagBlocks, toolRegistryCandidates, trimPastedText, truncateString, utf8Bytes, withoutEdgeQuotes, xmlBlocks };
|
|
@@ -13,7 +13,7 @@ export type AppDeployStrategy = 'rolling' | 'immediate' | 'bluegreen' | 'canary'
|
|
|
13
13
|
export type AppAutoStop = 'off' | 'stop' | 'suspend';
|
|
14
14
|
/** `public`: no gate. `app`: the App's access policy and Kortix sign-in. `admins`: project admins only. */
|
|
15
15
|
export type AppServiceAccess = 'public' | 'app' | 'admins';
|
|
16
|
-
|
|
16
|
+
type AppServiceProtocol = 'http' | 'tcp';
|
|
17
17
|
export interface AppCheck {
|
|
18
18
|
type: 'http' | 'tcp';
|
|
19
19
|
/** Defaults to the service's `internal_port`. */
|
|
@@ -24,7 +24,7 @@ export interface AppCheck {
|
|
|
24
24
|
timeout_s: number;
|
|
25
25
|
grace_period_s: number;
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
interface AppService {
|
|
28
28
|
/** `http` is the primary service: it answers on the App's own host. */
|
|
29
29
|
name: string;
|
|
30
30
|
internal_port: number;
|
|
@@ -45,7 +45,7 @@ export interface AppMount {
|
|
|
45
45
|
snapshot_retention_days: number;
|
|
46
46
|
processes: string[];
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
interface AppVmSize {
|
|
49
49
|
cpu: number;
|
|
50
50
|
memory_gb: number;
|
|
51
51
|
/** Root disk; the data belongs on a mount. */
|
|
@@ -53,7 +53,7 @@ export interface AppVmSize {
|
|
|
53
53
|
/** Groups this size applies to; empty = every group without a more specific entry. */
|
|
54
54
|
processes: string[];
|
|
55
55
|
}
|
|
56
|
-
|
|
56
|
+
interface AppDeployConfig {
|
|
57
57
|
strategy: AppDeployStrategy;
|
|
58
58
|
/** Runs once per release in a temporary machine (new image, secrets, no mounts) before machines update. */
|
|
59
59
|
release_command: string | null;
|
|
@@ -93,31 +93,6 @@ export interface AppConfigIssue {
|
|
|
93
93
|
path: string;
|
|
94
94
|
message: string;
|
|
95
95
|
}
|
|
96
|
-
export declare const DEFAULT_PROCESS_GROUP = "app";
|
|
97
|
-
export declare const PRIMARY_SERVICE = "http";
|
|
98
|
-
/** Ports the App supervisor owns inside every machine. */
|
|
99
|
-
export declare const RESERVED_APP_PORTS: readonly [7331, 8080];
|
|
100
|
-
export declare const APP_VM_LIMITS: {
|
|
101
|
-
readonly cpu: {
|
|
102
|
-
readonly min: 1;
|
|
103
|
-
readonly max: 32;
|
|
104
|
-
};
|
|
105
|
-
readonly memory_gb: {
|
|
106
|
-
readonly min: 1;
|
|
107
|
-
readonly max: 128;
|
|
108
|
-
};
|
|
109
|
-
readonly disk_gb: {
|
|
110
|
-
readonly min: 1;
|
|
111
|
-
readonly max: 500;
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
export declare const DEFAULT_APP_VM: {
|
|
115
|
-
readonly cpu: 1;
|
|
116
|
-
readonly memory_gb: 2;
|
|
117
|
-
readonly disk_gb: 10;
|
|
118
|
-
};
|
|
119
|
-
export declare const DEFAULT_SNAPSHOT_RETENTION_DAYS = 5;
|
|
120
|
-
export declare const MAX_SNAPSHOT_RETENTION_DAYS = 60;
|
|
121
96
|
/** Platinum caps a volume at 100 GiB (its largest size class). */
|
|
122
97
|
export declare const MAX_VOLUME_GB = 100;
|
|
123
98
|
/**
|
|
@@ -153,7 +128,7 @@ export interface AppDisplay {
|
|
|
153
128
|
agent?: string | null;
|
|
154
129
|
}
|
|
155
130
|
/** What the Apps grid reads of an App: the web's `App` and the API's App JSON both fit. */
|
|
156
|
-
|
|
131
|
+
interface GridApp {
|
|
157
132
|
slug: string;
|
|
158
133
|
display?: AppDisplay | null;
|
|
159
134
|
services?: ReadonlyArray<{
|
|
@@ -181,3 +156,4 @@ export declare const SPACE_SLUG_RE: RegExp;
|
|
|
181
156
|
export declare const BINDING_AGENT_RE: RegExp;
|
|
182
157
|
/** What is wrong with an authored `display` block of the App `slug`. Paths are relative to the block. */
|
|
183
158
|
export declare function appDisplayIssues(display: unknown, slug: string): AppConfigIssue[];
|
|
159
|
+
export {};
|
|
@@ -9,40 +9,6 @@
|
|
|
9
9
|
/** The `platform` of a `channel` connector. The order is the manifest schema's enum order. */
|
|
10
10
|
export declare const CHANNEL_PLATFORM_IDS: readonly ["slack", "teams", "email", "telegram", "discord"];
|
|
11
11
|
export type ChannelPlatformId = (typeof CHANNEL_PLATFORM_IDS)[number];
|
|
12
|
-
export interface ChannelDescriptor {
|
|
13
|
-
/** The display name. */
|
|
14
|
-
label: string;
|
|
15
|
-
/** The platform word of a prompt header, `[<envelope> · …]`. Transcripts store it: never rename one. */
|
|
16
|
-
envelope: string;
|
|
17
|
-
/** The `native:<id>` catalog card. Its icon is `/connector-icons/<id>.svg`. */
|
|
18
|
-
catalog: {
|
|
19
|
-
domain: string;
|
|
20
|
-
description: string;
|
|
21
|
-
};
|
|
22
|
-
/** The most characters one message holds. */
|
|
23
|
-
messageChars?: number;
|
|
24
|
-
/**
|
|
25
|
-
* Up to `max` option buttons on one question: Teams posts more options as a
|
|
26
|
-
* form, Telegram turns pages of `max`. `dataBytes`: the platform's cap on a
|
|
27
|
-
* button's data.
|
|
28
|
-
*/
|
|
29
|
-
buttons?: {
|
|
30
|
-
max: number;
|
|
31
|
-
dataBytes?: number;
|
|
32
|
-
};
|
|
33
|
-
/** The token a person pastes to connect. */
|
|
34
|
-
connect?: {
|
|
35
|
-
tokenPattern: RegExp;
|
|
36
|
-
tokenPlaceholder: string;
|
|
37
|
-
};
|
|
38
|
-
/** Senders pass an allow-list of these user ids. */
|
|
39
|
-
access?: {
|
|
40
|
-
userId: RegExp;
|
|
41
|
-
idPlaceholder: string;
|
|
42
|
-
idsPlaceholder: string;
|
|
43
|
-
idInputMode: 'numeric' | 'text';
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
12
|
export declare const CHANNELS: {
|
|
47
13
|
readonly slack: {
|
|
48
14
|
readonly label: "Slack";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
interface LegacyChannelHeader {
|
|
2
2
|
/** The platform word as written, such as `Slack`. */
|
|
3
3
|
platform: string;
|
|
4
4
|
/** The channel or chat, trimmed. */
|
|
@@ -10,3 +10,4 @@ export interface LegacyChannelHeader {
|
|
|
10
10
|
}
|
|
11
11
|
/** The header at the start of `text`, or null when `text` does not start with one. */
|
|
12
12
|
export declare function readLegacyChannelHeader(text: string): LegacyChannelHeader | null;
|
|
13
|
+
export {};
|
|
@@ -124,31 +124,6 @@ export declare function groupIntoSections<T>(items: readonly T[], getCategories:
|
|
|
124
124
|
* Reached through `sectionTitle` for anything no curated section claimed.
|
|
125
125
|
*/
|
|
126
126
|
export declare function humanizeCategory(raw: string): string;
|
|
127
|
-
/**
|
|
128
|
-
* The tools a person browsing a category should meet first, in the order they
|
|
129
|
-
* should meet them.
|
|
130
|
-
*
|
|
131
|
-
* **Why a hand-written list.** The catalogue is ~5,758 apps and the feed's own
|
|
132
|
-
* order is not an editorial judgement — it is whatever the provider returns.
|
|
133
|
-
* Left alone, a category's first six cards are arbitrary, and someone who does
|
|
134
|
-
* not already know the space cannot tell a household name from a long-tail
|
|
135
|
-
* entry. These lists put the recognisable ones in front.
|
|
136
|
-
*
|
|
137
|
-
* **Keys are `CURATED_SECTIONS` keys**, not a second vocabulary — a key that
|
|
138
|
-
* is not a real section is a test failure, so this cannot drift into naming
|
|
139
|
-
* sections that no longer exist.
|
|
140
|
-
*
|
|
141
|
-
* **Entries are matched against an app's folded slug OR its folded name**, so
|
|
142
|
-
* one token covers both catalogues. An entry that matches nothing is inert: it
|
|
143
|
-
* pins nothing, hides nothing, and cannot duplicate a card. That is the whole
|
|
144
|
-
* safety story for a list written from product knowledge rather than from a
|
|
145
|
-
* catalogue dump — being wrong costs a pin, never a render.
|
|
146
|
-
*
|
|
147
|
-
* An app only reaches a section if the FEED puts it in that category, so
|
|
148
|
-
* pinning `slack` under both communication and productivity is not a conflict;
|
|
149
|
-
* whichever section Slack actually lands in is the one where its pin applies.
|
|
150
|
-
*/
|
|
151
|
-
export declare const CATEGORY_PICKS: Record<string, readonly string[]>;
|
|
152
127
|
/** Sorts after every pinned entry. `Number.MAX_SAFE_INTEGER` rather than
|
|
153
128
|
* `Infinity` so the subtraction in the comparator stays a real number —
|
|
154
129
|
* `Infinity - Infinity` is `NaN`, and a `NaN` comparator silently leaves the
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* non-overlapping, in order. `attrs` is the attribute text without its leading
|
|
18
18
|
* whitespace, as the regex's first group was.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
interface FileTagBlock {
|
|
21
21
|
/** Index of `<file`. */
|
|
22
22
|
index: number;
|
|
23
23
|
/** Index just past `</file>`. */
|
|
@@ -26,3 +26,4 @@ export interface FileTagBlock {
|
|
|
26
26
|
attrs: string;
|
|
27
27
|
}
|
|
28
28
|
export declare function fileTagBlocks(text: string): FileTagBlock[];
|
|
29
|
+
export {};
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/** Chat pastes at or above this length become a "Pasted text" tile. */
|
|
2
|
-
export declare const PASTE_TILE_MIN_CHARS = 1000;
|
|
3
|
-
/** Chat pastes with more lines than this become a tile. */
|
|
4
|
-
export declare const PASTE_TILE_MIN_LINES = 10;
|
|
5
1
|
/** Inline tiles may add at most this many UTF-8 bytes to a prompt; larger pastes go out as a file. */
|
|
6
2
|
export declare const PASTED_INLINE_MAX_BYTES = 100000;
|
|
7
3
|
export type PastedContent = {
|
|
@@ -9,24 +9,7 @@
|
|
|
9
9
|
* are plain text, the same width, and symmetric on both axes.
|
|
10
10
|
*/
|
|
11
11
|
export declare const PIXEL_KORTIX_ROWS: readonly ["## ## ##", "## ## ##", "+#+ ## +#+", " ##+ ## +## ", " ######## ", " ######## ", " ##+ ## +## ", "+#+ ## +#+", "## ## ##", "## ## ##"];
|
|
12
|
-
/**
|
|
13
|
-
* An agent's pixel mark: a 7×7 mirrored pixel figure derived from its slug.
|
|
14
|
-
*
|
|
15
|
-
* Same slug, same mark, on every surface and every device. Nothing is stored:
|
|
16
|
-
* the slug is hashed (FNV-1a), the hash seeds a PRNG (mulberry32), the PRNG
|
|
17
|
-
* fills the left half of the grid against a density mask, and the half is
|
|
18
|
-
* mirrored. A draw that fails the quality gate is redrawn from a salted seed,
|
|
19
|
-
* so retries stay deterministic. The tone comes from a second hash.
|
|
20
|
-
*
|
|
21
|
-
* This is the shape, one copy for every host: web (`@kortix/ui` `pixelMark`,
|
|
22
|
-
* which adds the tile tone) and mobile (`AgentPixelMark`, theme ink).
|
|
23
|
-
*
|
|
24
|
-
* Changing SIZE, MASK, the gate or PALETTES changes every agent's mark — the
|
|
25
|
-
* golden test in `pixel-mark.test.ts` exists to make that a deliberate act.
|
|
26
|
-
*/
|
|
27
|
-
export declare const PIXEL_MARK_SIZE = 7;
|
|
28
12
|
type Grid = boolean[][];
|
|
29
|
-
export declare function fnv1a(input: string): number;
|
|
30
13
|
/** Readable at 14px, fills the frame, one connected body. */
|
|
31
14
|
export declare function passesPixelMarkGate(grid: Grid): boolean;
|
|
32
15
|
export declare function pixelMarkShape(slug: string): {
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
* `KortixDither` the vector symbol through an 8 x 8 Bayer dither. The web
|
|
32
32
|
* registry draws them with its own components.
|
|
33
33
|
*/
|
|
34
|
-
export declare const KORTIX_GLYPH_NAMES: readonly ["KortixMark", "KortixPixel", "KortixDither"];
|
|
35
34
|
export declare const PROJECT_GLYPH_GROUPS: readonly [{
|
|
36
35
|
readonly label: "Kortix";
|
|
37
36
|
readonly names: readonly ["KortixMark", "KortixPixel", "KortixDither"];
|