@picassohq/cli 1.0.6 → 1.0.8

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/package.json CHANGED
@@ -1,7 +1,28 @@
1
1
  {
2
2
  "name": "@picassohq/cli",
3
- "version": "1.0.6",
4
- "description": "Picasso command line interface.",
3
+ "version": "1.0.8",
4
+ "description": "Picasso, the coding agent for your terminal: plans, edits and verifies work in your repository with free managed models, your own key or a local model. Invite-only.",
5
+ "keywords": [
6
+ "picasso",
7
+ "coding-agent",
8
+ "ai",
9
+ "agent",
10
+ "llm",
11
+ "cli",
12
+ "tui",
13
+ "terminal",
14
+ "developer-tools",
15
+ "code-review",
16
+ "mcp",
17
+ "byok"
18
+ ],
19
+ "homepage": "https://picassohq.com",
20
+ "bugs": {
21
+ "url": "https://picassohq.com/status#report",
22
+ "email": "support@picassohq.com"
23
+ },
24
+ "license": "SEE LICENSE IN LICENSE",
25
+ "author": "AuraOne, Inc. (https://picassohq.com)",
5
26
  "type": "module",
6
27
  "bin": {
7
28
  "picasso": "./dist/index.js",
@@ -13,6 +34,8 @@
13
34
  }
14
35
  },
15
36
  "files": [
37
+ "LICENSE",
38
+ "README.md",
16
39
  "agents",
17
40
  "assets",
18
41
  "design",
@@ -42,10 +65,9 @@
42
65
  },
43
66
  "repository": {
44
67
  "type": "git",
45
- "url": "git+https://gitlab.com/chahal-foundation-group/github-auraoneai/picasso.git"
68
+ "url": "git+https://github.com/auraoneai/picasso.git"
46
69
  },
47
70
  "publishConfig": {
48
- "access": "public",
49
- "provenance": true
71
+ "access": "public"
50
72
  }
51
73
  }
@@ -64,6 +64,16 @@
64
64
  "package.json": "583d1ba4b57c31c497fb73cca8796efaa94e5a1608ab612b94f55b531c952f68"
65
65
  }
66
66
  },
67
+ "picasso-computer": {
68
+ "name": "@picasso/computer",
69
+ "version": "0.1.0",
70
+ "files": {
71
+ "index.js": "115a296c32f8ec986600e5b7c285413e19440f9f2bb0e1eaabd232f421d1f85e",
72
+ "package.json": "53dc8cc9c48f9e7a2a2ac7b6a5d7a5a9148d23b363b0211032007a35f6614822",
73
+ "native-anthropic.js": "a1674545dec01d61ee95f7c5411041b35ead8a0e60e2c99367dba2801dce3f47",
74
+ "support.js": "9409371ddf43cce0b5254e5868e9872e227a7a842bdf15bd959e4b17f811b65e"
75
+ }
76
+ },
67
77
  "picasso-checkpoints": {
68
78
  "name": "@picasso/checkpoints",
69
79
  "version": "0.1.0",
@@ -155,12 +165,12 @@
155
165
  "name": "@picasso/lean-context",
156
166
  "version": "0.1.0",
157
167
  "files": {
158
- "index.js": "9ea93bb5bab460b379c02fee54b54e90f88a77e2bf9b9dbed6b358dc89f72da6",
168
+ "index.js": "88648a4a99dda4f88fae5101096f0286e67b29574ad18ba65b4419813d7eec33",
159
169
  "package.json": "3f48eb73b4a3e92a2b4d6562a235f733db7368c6450ad6bc6323504109110c90",
160
170
  "argument-repair.js": "a300db7fb968401f2120bb0d20cf7b92fca2b47edcfb2a483123390281ccf73b",
161
171
  "glob-walk.js": "9f04ef3757fa7a5fa97f6c12273c5635b103e8a8f6c81bcfefb902b2d9735520",
162
172
  "read-image-recovery.js": "536a476dd842f8e647ebcd67fcc24d66c6f3b255a04cc932c07dcbd216ffdb50",
163
- "timeline.js": "ddde3cd2cb7dfa90877b9b80250c470983ec773711410200302d08c94e811eeb"
173
+ "timeline.js": "1c3635dda59a39dfc80599a456247c4456d9113d6148d35bc09837b363718484"
164
174
  }
165
175
  },
166
176
  "picasso-progress-reports": {
@@ -226,7 +236,7 @@
226
236
  "name": "@picasso/compaction",
227
237
  "version": "0.1.0",
228
238
  "files": {
229
- "index.js": "5259ba6bd322989fe2931c001054e8e246a23d8a50709a28a70596c0719e908d",
239
+ "index.js": "724d4befc7c612290bf536a496e4e841f8fd9266bb7ca3083cf91bbc4eb22194",
230
240
  "package.json": "33f04b41e913abfdc7fcccc6043bbe27b9660cd45125d62953e1fe8d0f95ee37"
231
241
  }
232
242
  },
@@ -102,6 +102,7 @@ const RULES = [
102
102
  '- Do NOT mention this summarization request or that the context was compacted.',
103
103
  '- Output only the checkpoint text: do not call any tool or take any other action.',
104
104
  '- A <compacted-summary> block in the material is an earlier checkpoint: keep its still-true facts, drop stale ones, and merge newer information into one consolidated summary.',
105
+ '- A <session-state> block is the session\'s live plan, goal and newest progress report: list every plan item with its exact status under Pending Jobs, and keep the goal and the progress percent in Critical Context.',
105
106
  ].join('\n');
106
107
 
107
108
  /** The instruction after the replayed history (single call: the engine's request shape). */
@@ -594,6 +595,119 @@ export function createSummarizer({ llm, stock, engineConfig = () => undefined, l
594
595
  };
595
596
  }
596
597
 
598
+ // ── Session state in the summary input ──────────────────────────────────────────────────────────────────────────
599
+ //
600
+ // Owner 2026-11-18 (session m0-d03430f0): neither compaction summary of a session with a 10-item plan named one item,
601
+ // so the model after `/compact` (and the models switched in after it) did not know a plan existed. The summarizer now
602
+ // gets the session's live state as one last user message after the history it condenses: the plan as last written
603
+ // with `todo_write` (every item and status), the active goal (and its contract file) and the newest progress report
604
+ // line, each folded from the session's durable log. It is appended after the replayed history, so the summary call
605
+ // keeps the conversation's cached prefix; it never reaches the conversation itself (only the summary does), and Tier 1
606
+ // is untouched. Lean-context re-states the plan after the compaction too (`plan-state`); this keeps it in the summary.
607
+
608
+ export const SESSION_STATE_SOURCE_KIND = 'picasso-session-state';
609
+ const SESSION_STATE_MAX_ITEMS = 60;
610
+ const SESSION_STATE_ITEM_MAX_CHARS = 400;
611
+ const SESSION_STATE_OBJECTIVE_MAX_CHARS = 2_000;
612
+ const TODO_DONE = new Set(['completed', 'cancelled', 'canceled', 'done', 'skipped']);
613
+ const PROGRESS_LINE_RE = /progress(?: report)?\b[^\n]*?\b\d{1,3}(?:\.\d+)?\s?%/iu;
614
+
615
+ const isObject = (value) => value !== null && typeof value === 'object' && !Array.isArray(value);
616
+ const oneLine = (value, max) => {
617
+ const flat = String(value ?? '').replace(/\s+/gu, ' ').trim();
618
+ return flat.length > max ? `${flat.slice(0, max - 1)}…` : flat;
619
+ };
620
+
621
+ /** The session's plan, active goal (with its contract) and newest progress line, folded from its durable log. */
622
+ export function sessionStateOf(session) {
623
+ const state = { todos: [], goal: undefined, contracts: [], report: undefined };
624
+ if (typeof session?.eventAt !== 'function' || !Number.isSafeInteger(session?.seq)) return state;
625
+ for (let seq = 0; seq < session.seq; seq += 1) {
626
+ let event;
627
+ try {
628
+ event = session.eventAt(seq);
629
+ } catch {
630
+ event = undefined;
631
+ }
632
+ if (!isObject(event)) continue;
633
+ const data = isObject(event.data) ? event.data : {};
634
+ switch (event.type) {
635
+ case 'todo/write':
636
+ state.todos = (Array.isArray(data.todos) ? data.todos : []).filter(isObject).map((todo) => ({
637
+ content: typeof todo.content === 'string' ? todo.content : '',
638
+ status: typeof todo.status === 'string' ? todo.status : 'pending',
639
+ }));
640
+ break;
641
+ case 'goal/change':
642
+ if (data.operation === 'clear') state.goal = undefined;
643
+ else if (isObject(data.goal) && typeof data.goal.objective === 'string') {
644
+ state.goal = { id: data.goal.id, objective: data.goal.objective, phase: data.goal.phase };
645
+ }
646
+ break;
647
+ case 'plugin:picasso/goal-contract': {
648
+ const approval = isObject(data.event) ? data.event : undefined;
649
+ if (approval && typeof approval.objective === 'string' && typeof approval.contractPath === 'string') state.contracts.push(approval);
650
+ break;
651
+ }
652
+ case 'assistant/message': {
653
+ const blocks = Array.isArray(data.message?.content) ? data.message.content : [];
654
+ const textOf = blocks.map((block) => (block?.type === 'text' && typeof block.text === 'string' ? block.text : '')).join('\n');
655
+ const first = textOf.split('\n').find((line) => line.trim().length > 0);
656
+ if (first !== undefined && PROGRESS_LINE_RE.test(first)) state.report = first;
657
+ break;
658
+ }
659
+ default:
660
+ break;
661
+ }
662
+ }
663
+ return state;
664
+ }
665
+
666
+ /** The `<session-state>` text for the summarizer, or undefined when the session has no plan, goal or report. */
667
+ export function renderSessionState(state) {
668
+ const lines = [];
669
+ const goal = isObject(state?.goal) && state.goal.phase !== 'complete' && state.goal.phase !== 'completed' ? state.goal : undefined;
670
+ if (goal !== undefined) {
671
+ lines.push(`Goal (${typeof goal.phase === 'string' ? goal.phase : 'set'}): ${oneLine(goal.objective, SESSION_STATE_OBJECTIVE_MAX_CHARS)}`);
672
+ const contracts = Array.isArray(state.contracts) ? state.contracts : [];
673
+ const contract = [...contracts].reverse().find((entry) => entry.goalId === goal.id || (entry.goalId === undefined && entry.objective === goal.objective));
674
+ if (contract !== undefined) lines.push(`Goal contract: ${contract.contractPath}`);
675
+ }
676
+ const todos = Array.isArray(state?.todos) ? state.todos : [];
677
+ if (todos.length > 0) {
678
+ const done = todos.filter((todo) => TODO_DONE.has(todo.status)).length;
679
+ lines.push(`Plan (last todo_write), ${done} of ${todos.length} done:`);
680
+ for (const todo of todos.slice(0, SESSION_STATE_MAX_ITEMS)) lines.push(`- [${oneLine(todo.status, 24)}] ${oneLine(todo.content, SESSION_STATE_ITEM_MAX_CHARS)}`);
681
+ if (todos.length > SESSION_STATE_MAX_ITEMS) lines.push(`- … ${todos.length - SESSION_STATE_MAX_ITEMS} more`);
682
+ }
683
+ if (typeof state?.report === 'string') lines.push(`Newest progress report: ${oneLine(state.report, SESSION_STATE_ITEM_MAX_CHARS)}`);
684
+ if (lines.length === 0) return undefined;
685
+ return [
686
+ '<session-state>',
687
+ 'The live state of this session as Picasso records it (not part of the conversation). Keep all of it in the checkpoint: every plan item with its exact status, the goal, the progress.',
688
+ ...lines,
689
+ '</session-state>',
690
+ ].join('\n');
691
+ }
692
+
693
+ /** `input` with the session's state appended as a last user message (unchanged when there is none). */
694
+ export function withSessionState(input, agent) {
695
+ let text;
696
+ try {
697
+ text = renderSessionState(sessionStateOf(agent?.session));
698
+ } catch {
699
+ text = undefined;
700
+ }
701
+ if (text === undefined || !isObject(input) || !Array.isArray(input.messages)) return input;
702
+ const message = {
703
+ id: `${SESSION_STATE_SOURCE_KIND}-${Number.isSafeInteger(agent?.session?.seq) ? agent.session.seq : 0}`,
704
+ role: 'user',
705
+ content: [{ type: 'text', text }],
706
+ source: { kind: SESSION_STATE_SOURCE_KIND, form: 'reminder' },
707
+ };
708
+ return { ...input, messages: [...input.messages, message] };
709
+ }
710
+
597
711
  /** The service object behind cordis's tracing proxy (its own `summarize` must be set on the real instance). */
598
712
  function rawService(service) {
599
713
  if (service === undefined || service === null) return undefined;
@@ -751,7 +865,8 @@ export function installSummarizer(compaction, llm, log = () => undefined, deps =
751
865
  const notice = createNoticeWriter({ engine, llm, log, appendRecord: deps.appendRecord });
752
866
  const override = async function summarize(input, agent, signal) {
753
867
  await notice(agent, reasons.get(agent));
754
- return summarizer.summarize(input, agent, signal);
868
+ // The plan, goal and newest progress line ride along so the summary keeps them (`withSessionState`).
869
+ return summarizer.summarize(withSessionState(input, agent), agent, signal);
755
870
  };
756
871
  const installed = { summarize: override };
757
872
  // Shortening starts near the window, not at 80% of it (PRESSURE_RATIO). The engine reads its config at every check.
@@ -0,0 +1,5 @@
1
+ # Picasso computer use — one bundle patch layer row (loader insert). dshBin and host are supplied by the relay's
2
+ # generated patch (host: mac on Picasso for Mac); without host the tools answer "Computer use needs Picasso for Mac."
3
+ - insert:
4
+ - id: picasso-computer
5
+ name: '@picasso/computer'