@kvman/kvcoder 0.1.1 → 0.1.3
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/api.d.ts +35 -1
- package/dist/api.d.ts.map +1 -1
- package/dist/connectors/delegate.d.ts.map +1 -1
- package/dist/connectors/delegate.js +1 -0
- package/dist/connectors/delegate.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/prompt/session-prompt.d.ts +1 -1
- package/dist/prompt/session-prompt.d.ts.map +1 -1
- package/dist/prompt/session-prompt.js +17 -2
- package/dist/prompt/session-prompt.js.map +1 -1
- package/dist/register-settings.d.ts +2 -2
- package/dist/register-settings.js +2 -2
- package/dist/register-settings.js.map +1 -1
- package/dist/registry/register-connectors.d.ts +1 -0
- package/dist/registry/register-connectors.d.ts.map +1 -1
- package/dist/registry/register-connectors.js +32 -4
- package/dist/registry/register-connectors.js.map +1 -1
- package/dist/registry/register-slash-commands.d.ts +6 -0
- package/dist/registry/register-slash-commands.d.ts.map +1 -0
- package/dist/registry/register-slash-commands.js +85 -0
- package/dist/registry/register-slash-commands.js.map +1 -0
- package/dist/schemas/records.d.ts +1 -0
- package/dist/schemas/records.d.ts.map +1 -1
- package/dist/schemas/records.js +2 -0
- package/dist/schemas/records.js.map +1 -1
- package/dist/schemas/registry.d.ts +32 -0
- package/dist/schemas/registry.d.ts.map +1 -1
- package/dist/schemas/registry.js +9 -2
- package/dist/schemas/registry.js.map +1 -1
- package/dist/sessions/new-session.d.ts.map +1 -1
- package/dist/sessions/new-session.js +1 -0
- package/dist/sessions/new-session.js.map +1 -1
- package/dist/store/collections.d.ts +18 -0
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/collections.js +5 -2
- package/dist/store/collections.js.map +1 -1
- package/dist/turns/settle-calls.d.ts +2 -2
- package/dist/turns/settle-calls.d.ts.map +1 -1
- package/dist/turns/settle-calls.js +1 -1
- package/dist/turns/settle-calls.js.map +1 -1
- package/dist/turns/start-turn.d.ts +1 -0
- package/dist/turns/start-turn.d.ts.map +1 -1
- package/dist/turns/step.js +1 -1
- package/dist/turns/step.js.map +1 -1
- package/dist/web/components/conversation.js +253 -181
- package/docs/connectors.md +21 -1
- package/locales/ar.json +5 -1
- package/locales/en.json +5 -1
- package/package.json +4 -4
package/docs/connectors.md
CHANGED
|
@@ -68,6 +68,26 @@ The agent calls a binary connector with two commands. `exec { args?, background?
|
|
|
68
68
|
|
|
69
69
|
`kvcoder.connector.unregister { name }` removes one of the caller's own connectors; a missing name does nothing. `kvcoder.connector.list` answers every registered connector and program, each with `enabled`. The setting `kvcoder.connectors.disabled` lists the names that are turned off, kvcoder's own seven included: such a connector is left out of the prompt and can't be called, from the next step.
|
|
70
70
|
|
|
71
|
+
## A connector that is off until enabled
|
|
72
|
+
|
|
73
|
+
Register a connector with `optIn: true`, the only value the field takes, when it belongs only in chats that asked for it.
|
|
74
|
+
|
|
75
|
+
- It is in no chat's connector index and no `run` enum, and a call to it gets the answer for a connector that doesn't exist.
|
|
76
|
+
- Its owner switches it on for one chat: `kvcoder.connector.enable { sessionId, names }`. Each name must be an `optIn` connector of the caller (`VALIDATION_FAILED`); an unknown session fails `kvcoder/SESSION_NOT_FOUND`, and a subagent's `VALIDATION_FAILED`.
|
|
77
|
+
- The chat keeps it across restarts. A subagent has it only when its chat enabled it and its worker lists it. A fork starts with none. Nothing switches one off again, and `kvcoder.connectors.disabled` still turns it off.
|
|
78
|
+
- `kvcoder.connector.list` rows have `optIn`.
|
|
79
|
+
|
|
80
|
+
## Slash commands
|
|
81
|
+
|
|
82
|
+
`kvcoder.slash.register { commands: [{ name, description, command, message? }] }` adds commands to the send box, after kvcoder's own six.
|
|
83
|
+
|
|
84
|
+
- `name`: lowercase kebab case; kvcoder's own names and another extension's fail `kvcoder/NAME_TAKEN`, and a name given twice `VALIDATION_FAILED`. All of a call's commands are stored, or none.
|
|
85
|
+
- `description` and `message`: translation keys of the caller's catalog.
|
|
86
|
+
- `command`: a public command of the caller (`VALIDATION_FAILED` otherwise). The send box calls it with `{ sessionId, argument }`, where `argument` is the text after the name, `''` when there is none.
|
|
87
|
+
- With `message`, a command that succeeded is followed by the person's message: the argument, or with none the text of `message`. A command that failed shows its Problem and sends nothing.
|
|
88
|
+
- `kvcoder.slash.unregister { name }` removes the caller's own; `kvcoder.slash.list` answers `[{ name, description, command, message?, owner }]`, by name.
|
|
89
|
+
- On the Chat page, with no chat yet, a registered command runs in a new chat that the send box creates and opens; kvcoder's own six are greyed there.
|
|
90
|
+
|
|
71
91
|
## Built-in connectors
|
|
72
92
|
|
|
73
93
|
kvcoder's own connectors are `shell` (one line in the real shell), `fs` (read, list, search, write, and edit files in the workspace folder), `artifact` (a document shown beside the chat), `background` (follow up on what was started with `background: true`), `ask` (a question that suspends the turn), `delegate` (`delegate run { worker, task, background? }` hands a task to a worker, which runs it in a helper session; the workers are the setting `kvcoder.delegate.workers`, and it is a connector of a session only while a worker is turned on), and `mcp` (the tools of the MCP servers the person added; it is a connector of a session only while the workspace has a server). Their names are taken: registering one fails `kvcoder/NAME_TAKEN`.
|
|
@@ -81,6 +101,6 @@ kvcoder's own connectors are `shell` (one line in the real shell), `fs` (read, l
|
|
|
81
101
|
|
|
82
102
|
## Lifetime
|
|
83
103
|
|
|
84
|
-
- Connectors last one run. kvcoder clears them in its own `kernel.started` handler, which runs first because registering extensions declare kvcoder as a dependency. Each extension registers its connectors again from its own `kernel.started` handler. A hot reload of kvcoder reruns its dependents' handlers too.
|
|
104
|
+
- Connectors and slash commands last one run. kvcoder clears them in its own `kernel.started` handler, which runs first because registering extensions declare kvcoder as a dependency. Each extension registers its connectors and slash commands again from its own `kernel.started` handler. A hot reload of kvcoder reruns its dependents' handlers too.
|
|
85
105
|
- Sections are stored until removed; see [Sections](sections.md).
|
|
86
106
|
- When kvcoder reads, it ignores any connector whose owner isn't loaded.
|
package/locales/ar.json
CHANGED
|
@@ -164,6 +164,10 @@
|
|
|
164
164
|
"kvcoder.connector.register.description": "يسجّل موصّلًا يستدعيه الوكيل بأداته run: أوامر المستدعي العامة، أو برنامجًا يعمل في الطرفية.",
|
|
165
165
|
"kvcoder.connector.unregister.description": "يزيل أحد موصّلات المستدعي.",
|
|
166
166
|
"kvcoder.connector.list.description": "يسرد الموصّلات التي يمكن للوكيل استخدامها.",
|
|
167
|
+
"kvcoder.connector.enable.description": "يشغّل موصّلات المستدعي الاختيارية (optIn) في محادثة واحدة.",
|
|
168
|
+
"kvcoder.slash.register.description": "يسجّل أوامر الشرطة المائلة في مربع الإرسال، وكلٌّ منها يشغّل أحد أوامر المستدعي العامة.",
|
|
169
|
+
"kvcoder.slash.unregister.description": "يزيل أحد أوامر الشرطة المائلة للمستدعي.",
|
|
170
|
+
"kvcoder.slash.list.description": "يسرد أوامر الشرطة المائلة التي أضافتها الإضافات إلى مربع الإرسال.",
|
|
167
171
|
"kvcoder.section.set.description": "يضبط أحد أقسام المستدعي في تعليمات النظام.",
|
|
168
172
|
"kvcoder.section.remove.description": "يزيل أحد أقسام المستدعي؛ ولا يفعل شيئًا إن لم يكن القسم موجودًا.",
|
|
169
173
|
"kvcoder.section.list.description": "يسرد الأقسام التي تدخل في تعليمات محادثة، أو أقسام مساحة العمل عند عدم تحديد محادثة.",
|
|
@@ -180,7 +184,7 @@
|
|
|
180
184
|
"kvcoder.thinking.title": "التفكير",
|
|
181
185
|
"kvcoder.thinking.description": "مقدار تفكير النموذج في المحادثة الجديدة.",
|
|
182
186
|
"kvcoder.maxSteps.title": "الخطوات في كل جولة",
|
|
183
|
-
"kvcoder.maxSteps.description": "أقصى عدد من الخطوات تنفّذه الجولة قبل أن تتوقف.",
|
|
187
|
+
"kvcoder.maxSteps.description": "أقصى عدد من الخطوات تنفّذه الجولة قبل أن تتوقف. اتركه فارغًا لتبقى الجولة بلا حدّ.",
|
|
184
188
|
"kvcoder.shell.approval.title": "الموافقة على الأوامر",
|
|
185
189
|
"kvcoder.shell.approval.description": "متى يطلب الوكيل موافقتك قبل تنفيذ أمر أو تعديل ملف.",
|
|
186
190
|
"kvcoder.shell.path.title": "برنامج الطرفية",
|
package/locales/en.json
CHANGED
|
@@ -164,6 +164,10 @@
|
|
|
164
164
|
"kvcoder.connector.register.description": "Registers a connector the agent calls with its run tool: the caller's public commands, or a program run in the shell.",
|
|
165
165
|
"kvcoder.connector.unregister.description": "Removes one of the caller's connectors.",
|
|
166
166
|
"kvcoder.connector.list.description": "Lists the connectors the agent may use.",
|
|
167
|
+
"kvcoder.connector.enable.description": "Switches the caller's own optIn connectors on for one chat.",
|
|
168
|
+
"kvcoder.slash.register.description": "Registers slash commands of the send box, each running one of the caller's public commands.",
|
|
169
|
+
"kvcoder.slash.unregister.description": "Removes one of the caller's slash commands.",
|
|
170
|
+
"kvcoder.slash.list.description": "Lists the slash commands that extensions added to the send box.",
|
|
167
171
|
"kvcoder.section.set.description": "Sets one of the caller's sections of the system prompt.",
|
|
168
172
|
"kvcoder.section.remove.description": "Removes one of the caller's sections; a missing one does nothing.",
|
|
169
173
|
"kvcoder.section.list.description": "Lists the sections a session's prompt reaches, or the workspace's without a session.",
|
|
@@ -180,7 +184,7 @@
|
|
|
180
184
|
"kvcoder.thinking.title": "Thinking",
|
|
181
185
|
"kvcoder.thinking.description": "How hard the model thinks in a new chat.",
|
|
182
186
|
"kvcoder.maxSteps.title": "Steps per turn",
|
|
183
|
-
"kvcoder.maxSteps.description": "The most steps a turn takes before it stops.",
|
|
187
|
+
"kvcoder.maxSteps.description": "The most steps a turn takes before it stops. Leave it empty for no limit.",
|
|
184
188
|
"kvcoder.shell.approval.title": "Shell approval",
|
|
185
189
|
"kvcoder.shell.approval.description": "When the agent asks you before it runs a command or changes a file.",
|
|
186
190
|
"kvcoder.shell.path.title": "Shell program",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kvman/kvcoder",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "kvcoder: the app-building harness, with one run tool over connectors, sections, and its conversation UI.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"vue": "3.5.43"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@kvman/kvwebui": "0.1.
|
|
47
|
-
"@kvman/sdk": "0.1.
|
|
48
|
-
"@kvman/testkit": "0.1.
|
|
46
|
+
"@kvman/kvwebui": "0.1.1",
|
|
47
|
+
"@kvman/sdk": "0.1.1",
|
|
48
|
+
"@kvman/testkit": "0.1.3",
|
|
49
49
|
"@types/cross-spawn": "6.0.6",
|
|
50
50
|
"@vitejs/plugin-vue": "6.0.9",
|
|
51
51
|
"@vue/test-utils": "2.5.1",
|