octwin-cli 0.8.16 → 0.9.0
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/CHANGELOG.md +1129 -1028
- package/README.md +39 -31
- package/dist/cli.js +1209 -573
- package/dist/lib/base.js +85 -0
- package/dist/lib/init-id.js +13 -0
- package/dist/lib/journey-check.js +119 -0
- package/dist/lib/kb-index.js +142 -18
- package/dist/lib/recipe.js +190 -0
- package/dist/lib/refusal.js +56 -0
- package/dist/lib/rename.js +1 -1
- package/dist/lib/rules.js +36 -0
- package/package.json +46 -46
- package/templates/starter/automation.yaml +10 -0
- package/templates/starter/commands.yaml +11 -12
- package/templates/starter/flows/tools/home.flow.yaml +34 -32
- package/templates/starter/flows/tools/home.locale.ar.yaml +8 -9
- package/templates/starter/flows/tools/home.locale.en.yaml +8 -0
- package/templates/starter/flows/tools/request.flow.yaml +95 -0
- package/templates/starter/flows/tools/request.locale.ar.yaml +14 -0
- package/templates/starter/flows/tools/request.locale.en.yaml +14 -0
- package/templates/starter/journeys/request.journey.yaml +12 -0
- package/templates/starter/locale.ar.yaml +6 -10
- package/templates/starter/locale.en.yaml +9 -0
- package/templates/starter/manifest.yaml +44 -45
- package/templates/starter/messages.ar.yaml +3 -10
- package/templates/starter/messages.en.yaml +19 -0
- package/templates/starter/prompts/identity.md +7 -5
- package/templates/starter/xrm.yaml +28 -0
- package/templates/starter/flows/tools/browse.flow.yaml +0 -31
- package/templates/starter/flows/tools/browse.locale.ar.yaml +0 -6
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# Two blocks, both auto-loaded by definePack (lang from default_settings.locale):
|
|
4
|
-
# • errors: copy the PLATFORM emits on failure paths (tool throw, workflow
|
|
5
|
-
# plumbing). Optional, but worth having so users never sit in
|
|
6
|
-
# silence. Schema: src/platform/manifest/messages.ts.
|
|
7
|
-
# • agents: per-agent loop copy, keyed by the manifest agent id. OPTIONAL —
|
|
8
|
-
# the platform ships default copy; resolveMessages merges this block
|
|
9
|
-
# (whole or partial) over it at turn start. Shown here as an example.
|
|
1
|
+
# Words the PLATFORM says for this pack in Arabic — when something fails, or the AI Agent cannot
|
|
2
|
+
# answer. Optional: the platform has its own; these replace them in your voice. Guide: `craft-language`.
|
|
10
3
|
|
|
11
4
|
errors:
|
|
12
5
|
failed:
|
|
@@ -14,7 +7,7 @@ errors:
|
|
|
14
7
|
unhandled_tool_error:
|
|
15
8
|
failure: { body: 'عذراً، حدث خطأ غير متوقع. حاول مرة أخرى بعد لحظة. 🙏' }
|
|
16
9
|
|
|
17
|
-
#
|
|
10
|
+
# Keyed by the manifest agent id (`assistant`).
|
|
18
11
|
agents:
|
|
19
12
|
assistant:
|
|
20
13
|
agentDisabled: 'الخدمة الذكية غير متاحة مؤقتاً. حاول مرة أخرى لاحقاً. 🙏'
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Words the PLATFORM says for this pack in English — when something fails, or the AI Agent cannot
|
|
2
|
+
# answer. Optional: the platform has its own; these replace them in your voice. Guide: `craft-language`.
|
|
3
|
+
|
|
4
|
+
errors:
|
|
5
|
+
failed:
|
|
6
|
+
failure: { body: 'Sorry, something went wrong. Please try again.' }
|
|
7
|
+
unhandled_tool_error:
|
|
8
|
+
failure: { body: 'Sorry, something went wrong. Please try again in a moment. 🙏' }
|
|
9
|
+
|
|
10
|
+
# Keyed by the manifest agent id (`assistant`).
|
|
11
|
+
agents:
|
|
12
|
+
assistant:
|
|
13
|
+
agentDisabled: 'The assistant is not available right now. Please try again later. 🙏'
|
|
14
|
+
transientError: 'Sorry, a temporary error. Please try again in a moment. 🙏'
|
|
15
|
+
workflowExpired: 'Sorry, that session ended. Please start again.'
|
|
16
|
+
workflowError: 'Sorry, something went wrong finishing that. Please try again.'
|
|
17
|
+
workflowDisabled: 'This feature is not turned on right now.'
|
|
18
|
+
toolDisabled: 'This feature is not turned on right now.'
|
|
19
|
+
directTapError: 'Sorry, something went wrong. Please try again.'
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
You are the
|
|
2
|
-
|
|
3
|
-
On a greeting, an unclear or off-topic message, or "what can you do?", call the `home` tool — it shows the menu
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
You are the Assistant for this business. Keep replies short, warm and in the customer's language.
|
|
2
|
+
|
|
3
|
+
On a greeting, an unclear or off-topic message, or "what can you do?", call the `home` tool — it shows the menu. Pass a short one-line greeting as `message` when you can personalise it (for example, greet the customer by name); otherwise call `home` with no arguments.
|
|
4
|
+
|
|
5
|
+
When the customer reports a problem at home or asks for a visit, call `request`. Pass `issue` only when they named it in their own words.
|
|
6
|
+
|
|
7
|
+
Never promise what no tool did: a request exists only when the tool says it was saved.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Your data — records the platform stores, lists and shows operators in the console. A pack has no
|
|
2
|
+
# database of its own; everything lives here. Guide: `craft-records`.
|
|
3
|
+
entities:
|
|
4
|
+
area:
|
|
5
|
+
title_field: name
|
|
6
|
+
fields:
|
|
7
|
+
name: { type: text, required: true, unique: true } # unique = identity: a repeat save updates
|
|
8
|
+
request:
|
|
9
|
+
title_field: phone
|
|
10
|
+
fields:
|
|
11
|
+
area: { type: record, entity: area, required: true }
|
|
12
|
+
issue: { type: text, required: true }
|
|
13
|
+
phone: { type: text, required: true }
|
|
14
|
+
floor: { type: number }
|
|
15
|
+
notes: { type: textarea }
|
|
16
|
+
pipeline:
|
|
17
|
+
stages: [new, scheduled, done, cancelled]
|
|
18
|
+
terminal: [done, cancelled]
|
|
19
|
+
# What happens by itself when a request is made, moves or goes quiet is a rule — `automation.yaml`.
|
|
20
|
+
|
|
21
|
+
# Rows every new project starts with (`octwin deploy --seed`) — a customer may see them.
|
|
22
|
+
demo:
|
|
23
|
+
- entity: area
|
|
24
|
+
fields: { name: 'Nasr City' }
|
|
25
|
+
- entity: area
|
|
26
|
+
fields: { name: 'Maadi' }
|
|
27
|
+
- entity: area
|
|
28
|
+
fields: { name: 'Heliopolis' }
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# EXAMPLE — replace it or delete it; do not leave it behind.
|
|
2
|
-
# An example capability the home hub invokes. Replace this with your real tool
|
|
3
|
-
# (record_list + a carousel, a collect: intake, a case_open, …). Kept trivial here
|
|
4
|
-
# so the scaffold is chattable end-to-end: home menu → tap "browse" → this renders.
|
|
5
|
-
#
|
|
6
|
-
# If you do not keep it, delete THREE things together: this file, every
|
|
7
|
-
# `browse.locale.<lang>.yaml` beside it, and the `browse` line in manifest.yaml
|
|
8
|
-
# `flows:` (plus the home menu row that invokes it). A file left here with its
|
|
9
|
-
# manifest line removed never loads — but its copy is still checked, so a pack that
|
|
10
|
-
# adds a second language fails validation over a flow nobody uses.
|
|
11
|
-
flow_id: browse
|
|
12
|
-
version: 1
|
|
13
|
-
description: An example capability, reached from the home menu. Replace with your real tool.
|
|
14
|
-
|
|
15
|
-
input:
|
|
16
|
-
message:
|
|
17
|
-
type: string
|
|
18
|
-
optional: true
|
|
19
|
-
describe: 'Optional note from the user.'
|
|
20
|
-
|
|
21
|
-
entry:
|
|
22
|
-
- else: true
|
|
23
|
-
goto: show
|
|
24
|
-
|
|
25
|
-
steps:
|
|
26
|
-
show:
|
|
27
|
-
- render:
|
|
28
|
-
render_intent: text_card
|
|
29
|
-
body: '{$t("browse.body")}'
|
|
30
|
-
memory_note: '{$t("browse.memory_note")}'
|
|
31
|
-
- end: applied
|