@granular-software/sdk 0.4.76 → 0.4.78

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/README.md CHANGED
@@ -58,6 +58,54 @@ Projects created with `granular init` can include Markdown for coding agents (op
58
58
  - **`GRANULAR_SANDBOX.md`** — **This sandbox’s ontology** snapshot: ids, exact names/keys, effect schemas, snippets. Updated after each successful **`granular build`**, **`granular deploy`**, and **`granular dev`** rebuild, and on **`granular document`** (run `build` to record version/build metadata).
59
59
  - **`AGENTS.md`** — Two-step index: manifest guide first, then sandbox doc (merged idempotently with `<!-- granular-sdk:begin -->`).
60
60
 
61
+ ## Live ontology onboarding
62
+
63
+ Run the following from the customer product repository:
64
+
65
+ ```bash
66
+ granular onboard status --json
67
+ # When connected:
68
+ granular login
69
+ granular onboard resume --no-open
70
+ granular onboard next --json
71
+ # Only when status reports not_connected:
72
+ granular onboard start
73
+ ```
74
+
75
+ Startup is status-first. `onboard start` refuses to duplicate an active run for
76
+ the current repository and branch unless `--new` is explicitly supplied.
77
+ `onboard resume` renews the short-lived, run-scoped token in the gitignored
78
+ `.granularrc` and preserves the same artifacts, directives, and history; an
79
+ expired credential is never a reason to start over. `onboard heartbeat` reports
80
+ liveness during long work, `onboard next` returns the next safe action, and
81
+ `onboard watch --jsonl --duration 300` keeps Change, Remove, Require, and Protect
82
+ directives live in a bounded foreground stream.
83
+
84
+ A new run opens the focused companion and generates portable Codex, Cursor, and
85
+ Claude Code skills. As the coding agent
86
+ grounds each class, relationship, workflow, action, or role, it runs
87
+ `granular onboard propose <kind> --file granular-onboarding/blueprint.json --element <id>`
88
+ so the companion shows that element and its repository evidence immediately.
89
+ Structured discovery events can include the current file, symbol, and cumulative
90
+ counts in `--data`. The agent then publishes the completed blueprint, processes
91
+ element-level directives, reports each real build milestone, binds a synthetic
92
+ `dev` environment, creates recognizable example records, generates 30
93
+ persona-specific user queries, and publishes observed scenario answers and
94
+ evidence. Every passed result carries its runtime session, job, and subject ids
95
+ (plus effect invocation or policy-decision ids when relevant), which the server
96
+ checks against the bound dev build and environment. A generic successful effect
97
+ is not treated as proof that data changed without a durable mutation receipt.
98
+ The agent may publish the blueprint as proposed but cannot approve it;
99
+ approval belongs to the human in the companion. `granular onboard status` shows
100
+ the same readiness gates from the terminal, and `granular onboard open` returns
101
+ to the companion.
102
+
103
+ Use `granular check` before remote builds. It validates the local manifest,
104
+ permission profiles, and state-machine graph integrity: duplicate states,
105
+ transitions and edges; unknown or unreachable states; non-final dead ends;
106
+ outgoing transitions from final states; closed paths that cannot reach a final
107
+ state; and exact `stateField` enum synchronization.
108
+
61
109
  ## Quick Start
62
110
 
63
111
  ```typescript
@@ -1,4 +1,4 @@
1
- import { n as Prompt, h as RecordObjectOptions, i as ManifestContent, t as EnvironmentSession, m as SessionHeapSnapshot, T as ToolWithHandler, G as Granular, a_ as ConnectOptions, be as CreateEnvironmentData, aY as GranularOptions } from './client-BZtpnc8M.mjs';
1
+ import { n as Prompt, h as RecordObjectOptions, i as ManifestContent, H as EnvironmentSession, m as SessionHeapSnapshot, T as ToolWithHandler, G as Granular, bD as ConnectOptions, bT as CreateEnvironmentData, bB as GranularOptions } from './client-CHgTTLeV.mjs';
2
2
  import { GranularAgentToolInfo, GeneratedJobCodeIssue, BuildGranularAgentSystemPromptInput, HarnessRenderedPrompt, HarnessRenderedContinuation, HarnessControllerBudgets } from './agent-harness.mjs';
3
3
  import { G as GranularSpendContext, a as OpenAITokenSpend } from './spend-ZMtzJoMN.mjs';
4
4
  import '@automerge/automerge';
@@ -1,4 +1,4 @@
1
- import { n as Prompt, h as RecordObjectOptions, i as ManifestContent, t as EnvironmentSession, m as SessionHeapSnapshot, T as ToolWithHandler, G as Granular, a_ as ConnectOptions, be as CreateEnvironmentData, aY as GranularOptions } from './client-C7bj1UeD.js';
1
+ import { n as Prompt, h as RecordObjectOptions, i as ManifestContent, H as EnvironmentSession, m as SessionHeapSnapshot, T as ToolWithHandler, G as Granular, bD as ConnectOptions, bT as CreateEnvironmentData, bB as GranularOptions } from './client-Ci5dLxXW.js';
2
2
  import { GranularAgentToolInfo, GeneratedJobCodeIssue, BuildGranularAgentSystemPromptInput, HarnessRenderedPrompt, HarnessRenderedContinuation, HarnessControllerBudgets } from './agent-harness.js';
3
3
  import { G as GranularSpendContext, a as OpenAITokenSpend } from './spend-ZMtzJoMN.js';
4
4
  import '@automerge/automerge';