@kilogent/runner 0.1.5 → 0.1.7

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.
Files changed (2) hide show
  1. package/dist/cli.js +102 -19
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -200,6 +200,22 @@ function effectiveAgentTools(agent) {
200
200
  };
201
201
  }
202
202
 
203
+ // ../shared/dist/agentProposal.js
204
+ var DRAFT_FIELDS = {
205
+ name: true,
206
+ emoji: true,
207
+ persona: true,
208
+ engine: true,
209
+ model: true,
210
+ credentialId: true,
211
+ contract: true,
212
+ tools: true,
213
+ autonomy: true,
214
+ riskyActions: true,
215
+ playbooks: true
216
+ };
217
+ var PROPOSAL_DRAFT_FIELDS = Object.keys(DRAFT_FIELDS);
218
+
203
219
  // ../shared/dist/assistant.js
204
220
  var ASSISTANT_ACTOR_ID = "assistant";
205
221
  var ASSISTANT_NAME = "Workspace assistant";
@@ -272,7 +288,18 @@ var CONFIG_DOCS = {
272
288
  * installs, and keeping them out of a package the app also reads keeps a surface a captain can
273
289
  * edit from ever naming a version.
274
290
  */
275
- engines: "engines"
291
+ engines: "engines",
292
+ /**
293
+ * `crewConfig/launch` — whether the product is open, and what the front gate says while it is
294
+ * not. Defaults live in `@lumi/crew-shared/launch.ts`.
295
+ *
296
+ * THE ONLY `crewConfig` DOCUMENT A SIGNED-OUT BROWSER MAY READ, and the rule is written for
297
+ * this id alone (packages/crew/firestore.rules). The login page has to say the right thing
298
+ * BEFORE the Google button is pressed and there is no session at that point — so `assistant`,
299
+ * which holds the shipped prompt, and `engines`, which holds the fleet's versions, stay closed
300
+ * beside it rather than a collection-wide read being opened for one boolean.
301
+ */
302
+ launch: "launch"
276
303
  };
277
304
  var DEFAULT_ASSISTANT_MODEL = "gemini-3.1-flash-lite";
278
305
  var DEFAULT_DAILY_CAP_USD = 0.1;
@@ -341,24 +368,46 @@ var DEFAULT_FREE_CONTRACT = `# Finish in one reply
341
368
  You get a small budget per message and only a person's message starts you. Your own reply does not
342
369
  wake you again, so finish your thought rather than promising to continue.
343
370
 
344
- # When somebody describes their business
345
- This is the most useful conversation you will have with a new workspace. Give them a real answer,
346
- not a questionnaire.
371
+ # When somebody describes their business, or asks who to hire
372
+ "Who should I hire", "what crew should I start with", "who would help here" and anyone describing
373
+ what their company does are all the SAME REQUEST, and it is the most useful conversation you will
374
+ have with a new workspace.
347
375
 
348
- Propose a crew: three to five agents, each with a name, one line on what it would own, and how work
376
+ THEY ARE ASKING ABOUT AI AGENTS ON THIS WORKSPACE, NOT ABOUT PEOPLE. Never answer with advice on
377
+ writing a job advert, hiring a contractor or finding a person, and never suggest putting a role on
378
+ the board as a task. An agent here is a thing they can switch on this afternoon.
379
+
380
+ Sketch the crew: three to five agents, each with a name, one line on what it would own, and how work
349
381
  passes between them. Use their words for their work, not ours. Be concrete enough that they can
350
382
  disagree with it.
351
383
 
352
- DO NOT CREATE THE AGENTS. Designing one properly is careful work and you are the light-weight half
353
- of this product; say what you would build and let the workspace's own crew-builder do it once it is
354
- set up. Never claim you have created something you have not.
384
+ YOU CANNOT CREATE AN AGENT HERE, AND YOU CANNOT OFFER TO. There is no tool on this path that makes
385
+ one, so both of these are false and the second is worse:
386
+
387
+ reporting \u2014 "I have created", "I have added", "I have set up", "these are now on your workspace"
388
+ offering \u2014 "I can set them up now", "shall I create them", "say the word and I will", "which one
389
+ would you like me to start with"
390
+
391
+ The first sends somebody to the Agents page to look for crew that is not there. The second gets a
392
+ "yes please" you cannot act on, which is the same lie with a delay on it.
393
+
394
+ NEVER SAY A SEAT, A PLAN OR A BILL HAS CHANGED OR WILL CHANGE. "This adds three paid seats" is a
395
+ statement about something happening; nothing in this conversation touches billing at all. If seats
396
+ are worth mentioning, they are what a crew WOULD cost once somebody adds it.
355
397
 
356
- Write the proposal into the library with knowledge_write so it survives \u2014 this conversation scrolls
357
- out of view, and whoever builds the crew later needs to read it back. Say that you saved it, and
358
- name the slug.
398
+ Speak conditionally throughout \u2014 "I would start with", "this one would own", "you could add".
359
399
 
360
- Then say plainly what is still missing before any of it can run, and stop. One clear sentence beats
361
- a sales pitch, and the person is already looking at the buttons.
400
+ THEN END BY SAYING WHO DOES BUILD IT, and end there. Once this workspace has a machine online the
401
+ assistant runs on it instead \u2014 on their own AI credential, with time to read the repositories and
402
+ the board first \u2014 and puts each agent in front of them as a card they add with one press or open and
403
+ change. That is where a crew actually gets built, and it is why the sketch above is a sketch:
404
+ designing a persona, a contract with real boundaries, a tool whitelist and an autonomy level is
405
+ careful work, and you are the light-weight half of this product.
406
+
407
+ THE CARDS APPEAR IN THIS CONVERSATION, NOT ON ANOTHER PAGE. Never send somebody to the Agents page
408
+ to find them \u2014 there is nothing waiting there, and a person who goes looking finds an empty roster
409
+ and no way to tell what went wrong. The setup facts you were given above say which step is actually
410
+ outstanding; name that one, and stop there. Do not ask which agent to start with.
362
411
 
363
412
  # What you can promise
364
413
  Nothing runs on this workspace until it has a subscription and a machine. Never imply otherwise,
@@ -372,11 +421,29 @@ Nothing you do in this session is visible to anybody until you call chat_send. T
372
421
  person hears from you. End the session with run_report so the next run knows what happened.
373
422
 
374
423
  # Building the crew
375
- You can create agents, and on this path you should. If the library holds a crew proposal, read it
376
- back and build what it describes rather than asking for the description again.
424
+ THIS IS THE PATH WHERE CREW GETS DESIGNED, and you are the half of the product that can do it. Read
425
+ what the workspace actually holds first \u2014 its repositories, its board, its knowledge library, what
426
+ it has been asking for \u2014 and let that decide the crew rather than the paragraph you were given.
427
+
428
+ When somebody asks who to hire, or describes what their company does: call chat_send with your
429
+ answer, then call propose_agents with the messageId it returns. The cards land under that reply and
430
+ a captain adds each one with a press, or opens it and changes anything first.
431
+
432
+ A PERSONA AND A CONTRACT ARE NOT OPTIONAL, and the tool refuses a proposal without them. They are
433
+ what make the thing an agent rather than a job title: the persona is the line the roster shows,
434
+ written in its own first-person voice, and the contract is the markdown it reads before every run \u2014
435
+ Mission, Responsibilities, Boundaries. There is no workspace default for either, so leaving one out
436
+ is a hole rather than an inherited setting.
437
+
438
+ EVERYTHING ELSE: SET ONLY WHAT YOU HAVE A REASON FOR. Tools, autonomy, model, credential and
439
+ playbooks all have a workspace default, so a field you leave out is shown as "not proposed" and
440
+ takes it \u2014 which is honest, while a whitelist or a model id you guessed at is a wrong answer wearing
441
+ a confident face. What you DID go and read is worth setting, and that reading is the whole reason a
442
+ proposal from here beats one from the included model.
443
+
444
+ If the conversation already holds cards nobody answered, do not propose the same crew again.
377
445
 
378
- Say what each agent is for in one line, and say that every agent adds a paid seat to this
379
- workspace. Never create one nobody asked for.`;
446
+ Say that each agent adds a paid seat, and never create one nobody asked for.`;
380
447
  function text(value, cap = MAX_ASSISTANT_CONTRACT_CHARS) {
381
448
  if (typeof value !== "string")
382
449
  return void 0;
@@ -558,6 +625,22 @@ var COLLECTIONS = {
558
625
  * `messages`, and the path is only ever composed from `chats` above it.
559
626
  */
560
627
  chatMessages: "messages",
628
+ /**
629
+ * `ships/{shipId}/chats/{chatId}/proposals/{proposalId}` — crew the assistant has proposed in
630
+ * this conversation, and what the captain decided about each (PRD §15.86).
631
+ *
632
+ * UNDER THE CHAT, not under the Ship, and that placement carries three things for free. Its
633
+ * visibility is the chat's: `chatVisible()` already answers "may this person read this thread",
634
+ * and a proposal is a paragraph of that thread. Its lifetime is the chat's: `deleteChatDeep`
635
+ * drains it with the messages, so a deleted conversation leaves no crew nobody remembers being
636
+ * offered. And the app's listener is chat-scoped, which is the only scope any reader wants.
637
+ *
638
+ * THE DECISION LIVES HERE RATHER THAN ON THE MESSAGE because `messages` is `allow update: if
639
+ * false` and must stay so — the whole thread's integrity rests on it. A proposal is the opposite
640
+ * kind of thing: it is written once by the assistant and then answered, days later, by a person.
641
+ * Those are two documents, not one.
642
+ */
643
+ chatProposals: "proposals",
561
644
  /** `ships/{shipId}/agents/{agentId}` — the crew: one doc = one configured agent. */
562
645
  agents: "agents",
563
646
  /** `ships/{shipId}/agents/{agentId}/workflows/{workflowId}` — that agent's playbooks. */
@@ -1277,14 +1360,14 @@ import os from "node:os";
1277
1360
  import path from "node:path";
1278
1361
 
1279
1362
  // src/version.ts
1280
- var RUNNER_VERSION = true ? "0.1.5" : "0.0.0-dev";
1363
+ var RUNNER_VERSION = true ? "0.1.7" : "0.0.0-dev";
1281
1364
  var RUNNER_PACKAGE = true ? "@kilogent/runner" : "@kilogent/runner-dev";
1282
1365
  var RUNNER_BIN = true ? "kilogent-runner" : "kilogent-runner-dev";
1283
1366
 
1284
1367
  // src/config.ts
1285
1368
  var IS_DEV_BUILD = RUNNER_PACKAGE.endsWith("-dev");
1286
1369
  var DEFAULT_PROJECT_ID = IS_DEV_BUILD ? "lumi-afb7d" : "kilogent-crew-prod";
1287
- var DEFAULT_MCP_URL = IS_DEV_BUILD ? "https://dev.app.kilogent.com/mcp" : "https://app.kilogent.com/mcp";
1370
+ var DEFAULT_MCP_URL = IS_DEV_BUILD ? "https://dev-app-kilogent.web.app/mcp" : "https://app.kilogent.com/mcp";
1288
1371
  var LEGACY_DIR_NAME = ".crew-runner";
1289
1372
  var DIR_NAME = `.${RUNNER_BIN}`;
1290
1373
  var LUMI_DIR_NAME = ".lumi-runner";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kilogent/runner",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "type": "module",
5
5
  "description": "Lumi Crew runner daemon — claims jobs from your Ships and executes them as headless agent sessions (Claude Code today) on your own machine.",
6
6
  "//name": "The ONLY package in this monorepo published to the public registry, so it is the one that does not follow the internal @lumi/crew-* convention: `@lumi` is not a scope we own, `@lumi.ai` is (the npm org). The workspace DIRECTORY stays packages/crew/runner — renaming the package is not renaming the folder.",