@sogni-ai/sogni-intelligence-client 2.1.0 → 2.2.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/dist/contracts/data/promptContracts.d.ts.map +1 -1
- package/dist/contracts/data/promptContracts.js +22 -0
- package/dist/contracts/data/promptContracts.js.map +1 -1
- package/dist/openai-tools/_manifests.generated.d.ts.map +1 -1
- package/dist/openai-tools/_manifests.generated.js.map +1 -1
- package/dist/public-skill-runtime/index.d.ts.map +1 -1
- package/dist/public-skill-runtime/index.js +52 -16
- package/dist/public-skill-runtime/index.js.map +1 -1
- package/dist/schemas/prompt-contract.schema.json +42 -0
- package/dist/schemas/tools/manage_memory.schema.json +28 -0
- package/dist/schemas/tools/resolve_personas.schema.json +15 -0
- package/dist/schemas/tools/set_content_filter.schema.json +14 -0
- package/dist/tools/definitions/generate-image/definition.js +1 -1
- package/dist/tools/definitions/generate-image/definition.js.map +1 -1
- package/dist-esm/contracts/data/promptContracts.js +22 -0
- package/dist-esm/contracts/data/promptContracts.js.map +1 -1
- package/dist-esm/openai-tools/_manifests.generated.js.map +1 -1
- package/dist-esm/public-skill-runtime/index.js +52 -16
- package/dist-esm/public-skill-runtime/index.js.map +1 -1
- package/dist-esm/schemas/prompt-contract.schema.json +42 -0
- package/dist-esm/schemas/tools/manage_memory.schema.json +28 -0
- package/dist-esm/schemas/tools/resolve_personas.schema.json +15 -0
- package/dist-esm/schemas/tools/set_content_filter.schema.json +14 -0
- package/dist-esm/tools/definitions/generate-image/definition.js +1 -1
- package/dist-esm/tools/definitions/generate-image/definition.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://sogni.ai/schemas/prompt-contract.schema.json",
|
|
4
|
+
"title": "PromptContract",
|
|
5
|
+
"description": "A PromptContract owns a tool's LLM-visible description and per-parameter docstrings. One contract per tool. Files in prompts/tools/*.json validate against this shape.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["contractId", "version", "toolName", "baseDescription", "parameterDocs"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"contractId": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Stable identifier for telemetry and registry lookup. Convention: <toolName>_v<n>."
|
|
13
|
+
},
|
|
14
|
+
"version": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "Semver string. Bumped when the contract's data shape changes."
|
|
17
|
+
},
|
|
18
|
+
"toolName": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Tool the contract describes. Must match a registered tool name from enums/tool-names.json."
|
|
21
|
+
},
|
|
22
|
+
"baseDescription": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Default description shown to the LLM when this tool is visible."
|
|
25
|
+
},
|
|
26
|
+
"parameterDocs": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"description": "Per-parameter docstrings keyed by parameter name.",
|
|
29
|
+
"additionalProperties": { "type": "string" }
|
|
30
|
+
},
|
|
31
|
+
"voiceExamples": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"items": { "type": "string" },
|
|
34
|
+
"description": "Tool-specific voice or style examples (e.g. screenplay format for video)."
|
|
35
|
+
},
|
|
36
|
+
"conditionalNotes": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"description": "Conditional description fragments keyed by signal name. Appended to the baked description when the corresponding signal is present in the turn policy.",
|
|
39
|
+
"additionalProperties": { "type": "string" }
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "manage_memory tool schema",
|
|
3
|
+
"schemaVersion": "2026-05-17.1",
|
|
4
|
+
"description": "Save, read, or delete user preferences and facts that persist across conversations. Call with action \"write\" when user states a preference (\"I like watercolor style\", \"always use 16:9\"). Call with action \"read\" to recall preferences before generating. Call with action \"delete\" to remove a preference. Do NOT save transient requests — only persistent preferences.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["action"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"action": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"enum": ["read", "write", "delete"],
|
|
12
|
+
"description": "Action to perform. \"read\": list all saved memories. \"write\": save or update a preference. \"delete\": remove a preference by key."
|
|
13
|
+
},
|
|
14
|
+
"key": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "Unique key for the memory (e.g. \"preferred_style\", \"aspect_ratio\", \"quality_preference\"). Required for write and delete."
|
|
17
|
+
},
|
|
18
|
+
"value": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Value to save. Required for write action. Be concise but specific."
|
|
21
|
+
},
|
|
22
|
+
"category": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"enum": ["preference", "fact", "context"],
|
|
25
|
+
"description": "Memory category. \"preference\": style/format preferences. \"fact\": user facts (name, location). \"context\": project context. Default: \"preference\"."
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "resolve_personas tool schema",
|
|
3
|
+
"schemaVersion": "2026-05-17.1",
|
|
4
|
+
"description": "Load persona reference photos AND voice clips for identity-preserving generation. Call this BEFORE edit_image when the user references a person from My Personas (e.g. \"make a picture of me\", \"draw Sarah and the kids\"). Also call this when the user explicitly asks to use a registered persona VOICE for video generation. Returns reference photos as numbered context images plus appearance descriptions. Voice clips are injected for animate_photo/generate_video, but you MUST set voicePersonaName on the video tool to use referenceAudioIdentity; do this only for explicit registered/reference voice requests, not ordinary dialogue or fictional character voices.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["names"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"names": {
|
|
10
|
+
"type": "array",
|
|
11
|
+
"items": { "type": "string" },
|
|
12
|
+
"description": "Names of personas to load (case-insensitive). Must match names from the user's people list provided in the system message. Example: [\"Alex\", \"Sam\"]."
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "set_content_filter tool schema",
|
|
3
|
+
"schemaVersion": "2026-05-17.1",
|
|
4
|
+
"description": "Enable or disable the Safe Content Filter. When enabled, generated images/videos are checked by the safety filter and blocked if flagged. When disabled, no safety filtering is applied. Only call this when the user explicitly asks to change the setting.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["enabled"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"enabled": {
|
|
10
|
+
"type": "boolean",
|
|
11
|
+
"description": "Set to true to enable the safe content filter (default), or false to disable it."
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -58,7 +58,7 @@ VIDEO KEYFRAMES: When generating images intended as first+last frames for video
|
|
|
58
58
|
},
|
|
59
59
|
numberOfVariations: {
|
|
60
60
|
type: 'number',
|
|
61
|
-
description: 'Number of variations (1-16).
|
|
61
|
+
description: 'Number of variations (1-16). Set to the user\'s exact requested count in ONE call whenever they ask for multiple images. Trigger phrasings: "draw N", "make N", "give me N", "show me N", "render N", "create N", "generate N", "N more", "another N", "N as separate", "N separate images", "N different images", "N options", "N takes", "N versions", "N variations", "N pictures of", "all at the same time", "in parallel", "side by side as separate". NEVER split into multiple serial generate_image calls to make N images one at a time. If the user previously got a composite "N subjects in one image" result and now says "draw N more as separate images" / "as separate" / "separately", set numberOfVariations=N for THIS call — the prior call\'s numberOfVariations does NOT carry forward when the user explicitly asks for separation. For screenplay/storyboard batches, this must equal the scene count AND the prompt must contain one Dynamic Prompt branch with one full scene prompt per scene; never set numberOfVariations=N with only one scene prompt. Default: 1 ONLY when the user clearly wants a single composite image (e.g. "draw 2 goats in a meadow" with no separation language, or explicit "in one image" / "single image" / "composite" / "sheet").',
|
|
62
62
|
minimum: 1,
|
|
63
63
|
maximum: 16,
|
|
64
64
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/generate-image/definition.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,MAAM,CAAC,MAAM,UAAU,GAAmB;IACxC,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE;QACR,IAAI,EAAE,gBAAgB;QACtB,WAAW,EACT,ywBAAywB;QAC3wB,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE;;EAErB,uBAAuB;;;;;;;;;;;;;;;;;;;;;;siBAsB6gB;iBAC7hB;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE;wBACJ,aAAa;wBACb,SAAS,EAAE,SAAS,EAAE,kBAAkB,EAAE,eAAe,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS;wBAC3F,WAAW,EAAE,qBAAqB;wBAClC,WAAW,EAAE,cAAc,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,eAAe;wBAClF,mBAAmB,EAAE,mBAAmB,EAAE,eAAe,EAAE,cAAc;wBACzE,eAAe,EAAE,gBAAgB,EAAE,gBAAgB;qBACpD;oBACD,WAAW,EACT,ouCAAouC;iBACvuC;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,2yBAA2yB;iBAC9yB;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,4yBAA4yB;iBAC/yB;gBACD,kBAAkB,EAAE;oBAClB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/generate-image/definition.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,MAAM,CAAC,MAAM,UAAU,GAAmB;IACxC,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE;QACR,IAAI,EAAE,gBAAgB;QACtB,WAAW,EACT,ywBAAywB;QAC3wB,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE;;EAErB,uBAAuB;;;;;;;;;;;;;;;;;;;;;;siBAsB6gB;iBAC7hB;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE;wBACJ,aAAa;wBACb,SAAS,EAAE,SAAS,EAAE,kBAAkB,EAAE,eAAe,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS;wBAC3F,WAAW,EAAE,qBAAqB;wBAClC,WAAW,EAAE,cAAc,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,eAAe;wBAClF,mBAAmB,EAAE,mBAAmB,EAAE,eAAe,EAAE,cAAc;wBACzE,eAAe,EAAE,gBAAgB,EAAE,gBAAgB;qBACpD;oBACD,WAAW,EACT,ouCAAouC;iBACvuC;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,2yBAA2yB;iBAC9yB;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,4yBAA4yB;iBAC/yB;gBACD,kBAAkB,EAAE;oBAClB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,guCAAguC;oBACluC,OAAO,EAAE,CAAC;oBACV,OAAO,EAAE,EAAE;iBACZ;gBACD,cAAc,EAAE;oBACd,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,oJAAoJ;iBACvJ;gBACD,uBAAuB,EAAE;oBACvB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,uXAAuX;iBAC1X;gBACD,gBAAgB,EAAE;oBAChB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,sLAAsL;iBACzL;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,SAAS;oBACf,WAAW,EACT,uIAAuI;iBAC1I;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,2KAA2K;iBAC9K;gBACD,eAAe,EAAE;oBACf,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;oBACvC,WAAW,EACT,kRAAkR;iBACrR;gBACD,YAAY,EAAE;oBACZ,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;oBACpC,WAAW,EACT,uLAAuL;iBAC1L;gBACD,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,GAAG,wBAAwB,glBAAglB;iBAC9mB;aACF;YACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;SACrB;KACF;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sogni-ai/sogni-intelligence-client",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Public Sogni Intelligence client — Node.js convenience wrapper for the Sogni SDK plus the public-safe subset of @sogni/creative-agent contracts (ContractRegistry, AssetManifest, RunRecord, tool envelopes). For agent builders, third-party integrations, and downstream SDKs.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -173,6 +173,7 @@
|
|
|
173
173
|
"homepage": "https://github.com/Sogni-AI/sogni-intelligence-client#readme",
|
|
174
174
|
"dependencies": {
|
|
175
175
|
"@sogni-ai/sogni-client": "5.0.0-alpha.6",
|
|
176
|
+
"@sogni-ai/sogni-protocol": "^1.0.0-alpha.2",
|
|
176
177
|
"sharp": "^0.34.5"
|
|
177
178
|
},
|
|
178
179
|
"devDependencies": {
|