@h1r-ai/croche 0.5.0 → 0.5.1
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 +21 -13
- package/dist/core-bindgen.js +18 -18
- package/dist/core-runtime.d.ts +1 -1
- package/dist/core-runtime.js +1 -1
- package/dist/core-wasm-bytes.d.ts +3 -3
- package/dist/core-wasm-bytes.js +3 -3
- package/dist/project-types.d.ts +2 -2
- package/dist/types.d.ts +5 -7
- package/docs/CODING-AGENT.md +11 -7
- package/docs/SKILL.md +307 -265
- package/docs/skills/croche/agents/openai.yaml +4 -0
- package/docs/skills/croche/references/agents.md +78 -0
- package/docs/skills/croche/references/first-turn.md +74 -0
- package/docs/skills/croche/references/tools.md +43 -0
- package/docs/skills/croche-cli/SKILL.md +158 -0
- package/docs/skills/croche-cli/agents/openai.yaml +4 -0
- package/docs/skills/croche-cli/references/powershell.md +47 -0
- package/docs/skills/croche-config/SKILL.md +152 -0
- package/docs/skills/croche-config/agents/openai.yaml +4 -0
- package/docs/skills/croche-config/references/models.md +12 -0
- package/docs/skills/croche-platforms/SKILL.md +55 -0
- package/docs/skills/croche-platforms/agents/openai.yaml +4 -0
- package/docs/skills/croche-platforms/references/android.md +185 -0
- package/docs/skills/croche-platforms/references/ios.md +165 -0
- package/docs/skills/croche-platforms/references/react-native.md +50 -0
- package/docs/skills/croche-platforms/references/web-backend.md +58 -0
- package/docs/skills/croche-troubleshoot/SKILL.md +72 -0
- package/docs/skills/croche-troubleshoot/agents/openai.yaml +4 -0
- package/docs/skills/croche-troubleshoot/references/recovery.md +31 -0
- package/package.json +1 -1
- package/src/core-bindgen.ts +18 -18
- package/src/core-runtime.ts +1 -1
- package/src/core-wasm-bytes.ts +3 -3
- package/src/project-types.ts +2 -2
- package/src/types.ts +5 -7
package/dist/project-types.d.ts
CHANGED
|
@@ -72,8 +72,8 @@ export interface ProjectUsageEvent extends RuntimeUsageEvent {
|
|
|
72
72
|
/** Host options never enter a remotely replaceable config. No host-set install/store identity. */
|
|
73
73
|
export interface OpenOptions extends Pick<HostOptions, 'cloudUrl' | 'projectKey' | 'storage' | 'secretStorage' | 'serverKey' | 'debugKey' | 'timeZone' | 'onDebugEvent' | 'debugVisibility' | 'backgroundSync' | 'maintenanceIntervalMs' | 'requestTimeoutMs' | 'maxPendingEvents' | 'archive' | 'imageCodec' | 'fetch' | 'clock' | 'syncIntervalMs' | 'maintenanceBackoffMs' | 'streaming'> {
|
|
74
74
|
user?: string;
|
|
75
|
-
/** The
|
|
76
|
-
* otherwise config.defaultLanguage ("en" when omitted). Never inferred from user text. */
|
|
75
|
+
/** The user's language; defaults to the device locale (browser navigator.language, React Native
|
|
76
|
+
* the device locale), otherwise config.defaultLanguage ("en" when omitted). Never inferred from user text. */
|
|
77
77
|
language?: string;
|
|
78
78
|
/** Host-only retention budget, copied unchanged; Core owns validation and defaults. */
|
|
79
79
|
retentionBytes?: number;
|
package/dist/types.d.ts
CHANGED
|
@@ -202,11 +202,8 @@ export interface HostOptions {
|
|
|
202
202
|
debugVisibility?: 'runtime';
|
|
203
203
|
}
|
|
204
204
|
/**
|
|
205
|
-
*
|
|
206
|
-
*
|
|
207
|
-
* former options `replyWithCommands`, `actionRecord`, `timeContext`, `contextDeltas`,
|
|
208
|
-
* `temperature` or `memory.recall` fails with `invalid_configuration`. App `reasoning` is
|
|
209
|
-
* accepted: `default`, `off`, `low`, `medium` or `high`.
|
|
205
|
+
* Single-agent app and host options. Unknown configuration properties fail with
|
|
206
|
+
* `invalid_configuration`. App `reasoning` accepts `default`, `off`, `low`, `medium` or `high`.
|
|
210
207
|
*/
|
|
211
208
|
export type RuntimeOptions = AppOptions & HostOptions;
|
|
212
209
|
export interface CrocheTools {
|
|
@@ -614,8 +611,9 @@ export interface RuntimeDebugEvent {
|
|
|
614
611
|
export type SendInput = {
|
|
615
612
|
/** Immutable application message identity, retained across delivery retries. */
|
|
616
613
|
id: string;
|
|
617
|
-
/**
|
|
618
|
-
*
|
|
614
|
+
/** Optional app state, separate from the person's words. Useful when the request needs it,
|
|
615
|
+
* such as a command or button acting on app data, or after that state changed. Without it,
|
|
616
|
+
* this input carries only the message; earlier states stay as sent until older turns are folded. */
|
|
619
617
|
context?: JsonValue;
|
|
620
618
|
} & ({
|
|
621
619
|
text: string;
|
package/docs/CODING-AGENT.md
CHANGED
|
@@ -24,10 +24,11 @@ Croche's Runtime owns two things. Leave both to it.
|
|
|
24
24
|
A few short paragraphs. Every character you add is paid on every call.
|
|
25
25
|
- Put stable content the model must quote (a menu, a price list) in the command result, not
|
|
26
26
|
in `instructions`, unless the model needs it on most turns.
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
- `context` is optional app state, separate from the person's words. Most turns contain
|
|
28
|
+
only a user message. It costs tokens each time and is useful when the request needs
|
|
29
|
+
app state: a command or button acting on app data, or after that state changed. Images
|
|
30
|
+
can share the same input. Without context, an input carries only the message; earlier
|
|
31
|
+
states stay as sent until older turns are folded. Tools check current app data themselves.
|
|
31
32
|
- Mark lookups (lists, status, search) with `reads: true`: their result is the answer, so the
|
|
32
33
|
agent always replies after seeing it. Do not tell the agent to "speak only after the
|
|
33
34
|
commands".
|
|
@@ -43,7 +44,7 @@ Croche's Runtime owns two things. Leave both to it.
|
|
|
43
44
|
|
|
44
45
|
Start with the package README. The distributable coding-agent skill/plugin is
|
|
45
46
|
`plugins/croche` in the release checkout. Use `croche --help` for account and local
|
|
46
|
-
Runtime control; authenticate account requests with `
|
|
47
|
+
Runtime control; authenticate account requests with `CROCHE_ACCOUNT_KEY` from
|
|
47
48
|
Studio, never with an app public key. Do not copy Croche Chat's model loop; the app has
|
|
48
49
|
none. Do not call a model provider, add an orchestration framework, or read SDK internals
|
|
49
50
|
to connect an ordinary character app.
|
|
@@ -61,8 +62,11 @@ to connect an ordinary character app.
|
|
|
61
62
|
so the model can correct its action. Any throw after a handler starts ends the
|
|
62
63
|
turn because effects may be unknown; a validation-related error code does not
|
|
63
64
|
authorize a retry.
|
|
64
|
-
4.
|
|
65
|
-
|
|
65
|
+
4. Input message IDs provide stable identities across delivery retries. Optional `context`
|
|
66
|
+
supplies app state (a JSON object or text), separate from the person's words. It is useful
|
|
67
|
+
when the request needs app state: a command or button, or after that state changed. Without
|
|
68
|
+
it, an input carries only the message; earlier states stay as sent until older turns are
|
|
69
|
+
folded. Tools check current app data themselves.
|
|
66
70
|
Append `text.delta.text` by `turnId` across model rounds and replace that same
|
|
67
71
|
assistant row with the final `TurnResult.text`. Render nonempty text even for
|
|
68
72
|
failed, cancelled and interrupted results. Check `status` separately for
|