house-lights 1.1.0 → 1.2.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/README.md +7 -3
- package/cli.mjs +3 -2
- package/package.json +4 -3
- package/skills/cast-list/assets/VERSION +2 -0
- package/skills/cast-list/assets/lesson.html +182 -0
- package/skills/cast-list/assets/map.html +244 -0
- package/skills/cast-list/examples/LICENSE-microsoft-skills-for-copilot-studio +21 -0
- package/skills/cast-list/examples/NOTICE.md +27 -0
- package/skills/cast-list/examples/agents/bodega-cupons/actions/ConsultarCuponsAtivos.mcs.yml +34 -0
- package/skills/cast-list/examples/agents/bodega-cupons/actions/EnviarCupomEmail.mcs.yml +34 -0
- package/skills/cast-list/examples/agents/bodega-cupons/actions/PromocoesMCP.mcs.yml +20 -0
- package/skills/cast-list/examples/agents/bodega-cupons/agent.mcs.yml +27 -0
- package/skills/cast-list/examples/agents/bodega-cupons/connectionreferences.mcs.yml +17 -0
- package/skills/cast-list/examples/agents/bodega-cupons/knowledge/RegulamentoCupons.knowledge.mcs.yml +7 -0
- package/skills/cast-list/examples/agents/bodega-cupons/settings.mcs.yml +13 -0
- package/skills/cast-list/examples/agents/bodega-cupons/topics/ConsultarRegulamentoCupons.topic.mcs.yml +56 -0
- package/skills/cast-list/examples/agents/bodega-cupons/topics/Escalate.topic.mcs.yml +20 -0
- package/skills/cast-list/examples/agents/bodega-cupons/topics/Fallback.topic.mcs.yml +32 -0
- package/skills/cast-list/examples/agents/bodega-cupons/topics/Greeting.topic.mcs.yml +14 -0
- package/skills/cast-list/examples/agents/bodega-cupons/topics/OnError.topic.mcs.yml +48 -0
- package/skills/cast-list/examples/agents/bodega-cupons/topics/RecebimentoOrquestrador.topic.mcs.yml +16 -0
- package/skills/cast-list/examples/agents/bodega-cupons/variables/CategoriaSolicitacao.mcs.yml +10 -0
- package/skills/cast-list/examples/agents/bodega-devolucoes/actions/AbrirSolicitacaoDevolucao.mcs.yml +32 -0
- package/skills/cast-list/examples/agents/bodega-devolucoes/agent.mcs.yml +26 -0
- package/skills/cast-list/examples/agents/bodega-devolucoes/connectionreferences.mcs.yml +6 -0
- package/skills/cast-list/examples/agents/bodega-devolucoes/knowledge/PoliticaTrocasDevolucoes.knowledge.mcs.yml +7 -0
- package/skills/cast-list/examples/agents/bodega-devolucoes/settings.mcs.yml +13 -0
- package/skills/cast-list/examples/agents/bodega-devolucoes/topics/ConsultarPoliticaDevolucoes.topic.mcs.yml +56 -0
- package/skills/cast-list/examples/agents/bodega-devolucoes/topics/Escalate.topic.mcs.yml +20 -0
- package/skills/cast-list/examples/agents/bodega-devolucoes/topics/Fallback.topic.mcs.yml +32 -0
- package/skills/cast-list/examples/agents/bodega-devolucoes/topics/Greeting.topic.mcs.yml +14 -0
- package/skills/cast-list/examples/agents/bodega-devolucoes/topics/OnError.topic.mcs.yml +48 -0
- package/skills/cast-list/examples/agents/bodega-devolucoes/topics/RecebimentoOrquestrador.topic.mcs.yml +16 -0
- package/skills/cast-list/examples/agents/bodega-devolucoes/variables/CategoriaSolicitacao.mcs.yml +10 -0
- package/skills/cast-list/examples/agents/bodega-frete/actions/EnviarOpcoesFrete.mcs.yml +34 -0
- package/skills/cast-list/examples/agents/bodega-frete/agent.mcs.yml +26 -0
- package/skills/cast-list/examples/agents/bodega-frete/connectionreferences.mcs.yml +6 -0
- package/skills/cast-list/examples/agents/bodega-frete/knowledge/TabelaFreteEntregas.knowledge.mcs.yml +7 -0
- package/skills/cast-list/examples/agents/bodega-frete/settings.mcs.yml +13 -0
- package/skills/cast-list/examples/agents/bodega-frete/topics/ConsultarTabelaFrete.topic.mcs.yml +56 -0
- package/skills/cast-list/examples/agents/bodega-frete/topics/Fallback.topic.mcs.yml +31 -0
- package/skills/cast-list/examples/agents/bodega-frete/topics/Greeting.topic.mcs.yml +14 -0
- package/skills/cast-list/examples/agents/bodega-frete/topics/OnError.topic.mcs.yml +48 -0
- package/skills/cast-list/examples/agents/bodega-frete/topics/RecebimentoOrquestrador.topic.mcs.yml +16 -0
- package/skills/cast-list/examples/agents/bodega-frete/variables/CategoriaSolicitacao.mcs.yml +10 -0
- package/skills/cast-list/examples/agents/bodega-loja-fisica/actions/EnviarInstrucoesRetirada.mcs.yml +34 -0
- package/skills/cast-list/examples/agents/bodega-loja-fisica/agent.mcs.yml +27 -0
- package/skills/cast-list/examples/agents/bodega-loja-fisica/connectionreferences.mcs.yml +6 -0
- package/skills/cast-list/examples/agents/bodega-loja-fisica/knowledge/GuiaLojaFisica.knowledge.mcs.yml +8 -0
- package/skills/cast-list/examples/agents/bodega-loja-fisica/settings.mcs.yml +13 -0
- package/skills/cast-list/examples/agents/bodega-loja-fisica/topics/ConsultarGuiaLojaFisica.topic.mcs.yml +56 -0
- package/skills/cast-list/examples/agents/bodega-loja-fisica/topics/Escalate.topic.mcs.yml +20 -0
- package/skills/cast-list/examples/agents/bodega-loja-fisica/topics/Fallback.topic.mcs.yml +32 -0
- package/skills/cast-list/examples/agents/bodega-loja-fisica/topics/Greeting.topic.mcs.yml +14 -0
- package/skills/cast-list/examples/agents/bodega-loja-fisica/topics/OnError.topic.mcs.yml +43 -0
- package/skills/cast-list/examples/agents/bodega-loja-fisica/topics/RecebimentoOrquestrador.topic.mcs.yml +16 -0
- package/skills/cast-list/examples/agents/bodega-loja-fisica/variables/CategoriaSolicitacao.mcs.yml +10 -0
- package/skills/cast-list/examples/agents/bodega-orquestrador/actions/AgenteCupons.mcs.yml +24 -0
- package/skills/cast-list/examples/agents/bodega-orquestrador/actions/AgenteDevolucoes.mcs.yml +24 -0
- package/skills/cast-list/examples/agents/bodega-orquestrador/actions/AgenteFrete.mcs.yml +24 -0
- package/skills/cast-list/examples/agents/bodega-orquestrador/actions/AgenteLojaFisica.mcs.yml +24 -0
- package/skills/cast-list/examples/agents/bodega-orquestrador/actions/AgentePedidos.mcs.yml +24 -0
- package/skills/cast-list/examples/agents/bodega-orquestrador/agent.mcs.yml +35 -0
- package/skills/cast-list/examples/agents/bodega-orquestrador/agents/SobreBodegaAzul/agent.mcs.yml +32 -0
- package/skills/cast-list/examples/agents/bodega-orquestrador/settings.mcs.yml +12 -0
- package/skills/cast-list/examples/agents/bodega-orquestrador/topics/ClassificarSolicitacao.topic.mcs.yml +35 -0
- package/skills/cast-list/examples/agents/bodega-orquestrador/topics/Escalate.topic.mcs.yml +20 -0
- package/skills/cast-list/examples/agents/bodega-orquestrador/topics/Fallback.topic.mcs.yml +32 -0
- package/skills/cast-list/examples/agents/bodega-orquestrador/topics/Greeting.topic.mcs.yml +14 -0
- package/skills/cast-list/examples/agents/bodega-orquestrador/topics/OnError.topic.mcs.yml +48 -0
- package/skills/cast-list/examples/agents/bodega-orquestrador/variables/CategoriaSolicitacao.mcs.yml +9 -0
- package/skills/cast-list/examples/agents/bodega-pedidos/actions/EnviarResumoPedido.mcs.yml +34 -0
- package/skills/cast-list/examples/agents/bodega-pedidos/agent.mcs.yml +26 -0
- package/skills/cast-list/examples/agents/bodega-pedidos/connectionreferences.mcs.yml +6 -0
- package/skills/cast-list/examples/agents/bodega-pedidos/knowledge/PoliticasPedidos.knowledge.mcs.yml +7 -0
- package/skills/cast-list/examples/agents/bodega-pedidos/settings.mcs.yml +13 -0
- package/skills/cast-list/examples/agents/bodega-pedidos/topics/ConsultarPoliticasPedidos.topic.mcs.yml +56 -0
- package/skills/cast-list/examples/agents/bodega-pedidos/topics/Escalate.topic.mcs.yml +20 -0
- package/skills/cast-list/examples/agents/bodega-pedidos/topics/Fallback.topic.mcs.yml +32 -0
- package/skills/cast-list/examples/agents/bodega-pedidos/topics/Greeting.topic.mcs.yml +14 -0
- package/skills/cast-list/examples/agents/bodega-pedidos/topics/OnError.topic.mcs.yml +48 -0
- package/skills/cast-list/examples/agents/bodega-pedidos/topics/RecebimentoOrquestrador.topic.mcs.yml +16 -0
- package/skills/cast-list/examples/agents/bodega-pedidos/variables/CategoriaSolicitacao.mcs.yml +10 -0
- package/skills/cast-list/examples/demo.cast.yaml +10 -0
- package/skills/cast-list/examples/profile.cast.yaml +15 -0
- package/skills/cast-list/references/format.md +50 -0
- package/skills/cast-list/references/keys.md +107 -0
- package/skills/cast-list/references/profile.md +32 -0
- package/skills/cast-list/scripts/browser.mjs +198 -0
- package/skills/cast-list/scripts/build.mjs +179 -0
- package/skills/cast-list/scripts/engine.mjs +155 -0
- package/skills/cast-list/scripts/page.mjs +15 -0
- package/skills/cast-list/scripts/read-xlsx.mjs +67 -0
- package/skills/cast-list/vendor/microsoft/LICENSE +21 -0
- package/skills/cast-list/vendor/microsoft/NOTICE +9 -0
- package/skills/cast-list/vendor/microsoft/package.json +1 -0
- package/skills/cast-list/vendor/microsoft/reference/bot.schema.yaml-authoring.json +27605 -0
- package/skills/cast-list/vendor/microsoft/scripts/schema-lookup.bundle.js +3495 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Making the one HTML file a skill delivers: a value as JSON that can sit inside a <script> tag, and a page template
|
|
2
|
+
// with its {{KEYS}} filled. Part of the skills kit (chalk-talk/kit): copied into each skill by its tools/assets.mjs.
|
|
3
|
+
|
|
4
|
+
/** `value` as JSON, with "<" escaped so no text in it can end the <script> tag it goes in. */
|
|
5
|
+
export const inline = (value) => JSON.stringify(value).replace(/</g, '\\u003c')
|
|
6
|
+
|
|
7
|
+
/** `template` with each {{KEY}} replaced by its value (a function replacer, so `$` in a value is kept as it is). */
|
|
8
|
+
export function fill(template, values) {
|
|
9
|
+
let page = template
|
|
10
|
+
for (const [key, value] of Object.entries(values)) {
|
|
11
|
+
if (!page.includes(`{{${key}}}`)) throw new Error(`The page has no {{${key}}} to fill.`)
|
|
12
|
+
page = page.replace(`{{${key}}}`, () => value)
|
|
13
|
+
}
|
|
14
|
+
return page
|
|
15
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// Reads the sheets of an .xlsx as rows of text, with nothing but Node: the zip (stored or deflated, as Excel, Numbers
|
|
2
|
+
// and LibreOffice save it), the workbook's sheet names in order, the shared strings, and each cell by its reference (an
|
|
3
|
+
// empty cell is "", a number is its text, a formula its last value). Enough to read back what workbook.ts wrote.
|
|
4
|
+
import { inflateRawSync } from 'node:zlib'
|
|
5
|
+
|
|
6
|
+
/** The zip's files, by name. */
|
|
7
|
+
function unzip(buf) {
|
|
8
|
+
// the central directory: the end record is in the last 64 KB
|
|
9
|
+
let end = -1
|
|
10
|
+
for (let i = buf.length - 22; i >= Math.max(0, buf.length - 65557); i--) if (buf.readUInt32LE(i) === 0x06054b50) { end = i; break }
|
|
11
|
+
if (end < 0) throw new Error('not an .xlsx (no zip directory)')
|
|
12
|
+
const count = buf.readUInt16LE(end + 10)
|
|
13
|
+
let at = buf.readUInt32LE(end + 16)
|
|
14
|
+
const files = new Map()
|
|
15
|
+
for (let n = 0; n < count; n++) {
|
|
16
|
+
if (buf.readUInt32LE(at) !== 0x02014b50) throw new Error('not an .xlsx (a broken zip directory)')
|
|
17
|
+
const method = buf.readUInt16LE(at + 10)
|
|
18
|
+
const size = buf.readUInt32LE(at + 20)
|
|
19
|
+
const [nameLen, extraLen, commentLen] = [buf.readUInt16LE(at + 28), buf.readUInt16LE(at + 30), buf.readUInt16LE(at + 32)]
|
|
20
|
+
const local = buf.readUInt32LE(at + 42)
|
|
21
|
+
const name = buf.toString('utf8', at + 46, at + 46 + nameLen)
|
|
22
|
+
const start = local + 30 + buf.readUInt16LE(local + 26) + buf.readUInt16LE(local + 28)
|
|
23
|
+
const raw = buf.subarray(start, start + size)
|
|
24
|
+
if (method === 0) files.set(name, raw)
|
|
25
|
+
else if (method === 8) files.set(name, inflateRawSync(raw))
|
|
26
|
+
else throw new Error(`${name}: a zip method this reader does not know (${method})`)
|
|
27
|
+
at += 46 + nameLen + extraLen + commentLen
|
|
28
|
+
}
|
|
29
|
+
return files
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const ENTITIES = { amp: '&', lt: '<', gt: '>', quot: '"', apos: "'" }
|
|
33
|
+
const unescape = (s) => s.replace(/&(#x[0-9a-f]+|#\d+|\w+);/gi, (m, e) => (e[0] === '#' ? String.fromCodePoint(e[1] === 'x' || e[1] === 'X' ? parseInt(e.slice(2), 16) : Number(e.slice(1))) : (ENTITIES[e] ?? m)))
|
|
34
|
+
// The text of a string item: its <t> runs joined (a rich text has several), phonetic hints (<rPh>) left out.
|
|
35
|
+
const textOf = (xml) => unescape([...xml.replace(/<rPh\b[\s\S]*?<\/rPh>/g, '').matchAll(/<t(?:\s[^>]*)?>([\s\S]*?)<\/t>|<t(?:\s[^>]*)?\/>/g)].map((m) => m[1] ?? '').join(''))
|
|
36
|
+
const attr = (tag, name) => tag.match(new RegExp(`\\s${name}="([^"]*)"`))?.[1]
|
|
37
|
+
// A column's letters to its index (A → 0, AA → 26).
|
|
38
|
+
const columnIndex = (ref) => [...ref.replace(/\d+$/, '')].reduce((n, c) => n * 26 + c.charCodeAt(0) - 64, 0) - 1
|
|
39
|
+
|
|
40
|
+
/** The sheets of the .xlsx in `buf`, in the workbook's order: { name, rows: string[][] }. */
|
|
41
|
+
export function readXlsx(buf) {
|
|
42
|
+
const files = unzip(buf)
|
|
43
|
+
const text = (p) => files.get(p)?.toString('utf8')
|
|
44
|
+
const workbook = text('xl/workbook.xml')
|
|
45
|
+
if (!workbook) throw new Error('not an .xlsx (no xl/workbook.xml)')
|
|
46
|
+
const rels = new Map([...(text('xl/_rels/workbook.xml.rels') ?? '').matchAll(/<Relationship\b[^>]*>/g)].map(([t]) => [attr(t, 'Id'), attr(t, 'Target')]))
|
|
47
|
+
const shared = [...(text('xl/sharedStrings.xml') ?? '').matchAll(/<si>([\s\S]*?)<\/si>/g)].map((m) => textOf(m[1]))
|
|
48
|
+
return [...workbook.matchAll(/<sheet\b[^>]*>/g)].map(([tag]) => {
|
|
49
|
+
const target = rels.get(attr(tag, 'r:id')) ?? ''
|
|
50
|
+
const path = target.startsWith('/') ? target.slice(1) : `xl/${target.replace(/^\.\//, '')}`
|
|
51
|
+
const xml = text(path) ?? ''
|
|
52
|
+
const rows = []
|
|
53
|
+
for (const [, rowAttrs, body] of xml.matchAll(/<row\b([^>]*?)(?:\/>|>([\s\S]*?)<\/row>)/g)) {
|
|
54
|
+
const r = Number(attr(rowAttrs, 'r') ?? rows.length + 1) - 1
|
|
55
|
+
const cells = []
|
|
56
|
+
for (const [, cellAttrs, inner = ''] of (body ?? '').matchAll(/<c\b([^>]*?)(?:\/>|>([\s\S]*?)<\/c>)/g)) {
|
|
57
|
+
const ref = attr(cellAttrs, 'r')
|
|
58
|
+
const c = ref ? columnIndex(ref) : cells.length
|
|
59
|
+
const type = attr(cellAttrs, 't')
|
|
60
|
+
const v = inner.match(/<v>([\s\S]*?)<\/v>/)?.[1]
|
|
61
|
+
cells[c] = type === 's' ? (shared[Number(v)] ?? '') : type === 'inlineStr' ? textOf(inner.match(/<is>([\s\S]*?)<\/is>/)?.[1] ?? '') : type === 'b' ? (v === '1' ? 'TRUE' : 'FALSE') : unescape(v ?? '')
|
|
62
|
+
}
|
|
63
|
+
rows[r] = Array.from(cells, (x) => x ?? '')
|
|
64
|
+
}
|
|
65
|
+
return { name: unescape(attr(tag, 'name') ?? ''), rows: Array.from(rows, (x) => x ?? []) }
|
|
66
|
+
})
|
|
67
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Microsoft Corporation
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
These files are copied, unchanged, from microsoft/skills-for-copilot-studio
|
|
2
|
+
(https://github.com/microsoft/skills-for-copilot-studio), commit 9c42d3a612c6e06389b6e5b4eed579aaed1a8b63, under the MIT license in LICENSE
|
|
3
|
+
(Copyright Microsoft Corporation).
|
|
4
|
+
|
|
5
|
+
- reference/bot.schema.yaml-authoring.json
|
|
6
|
+
- scripts/schema-lookup.bundle.js (CommonJS: package.json here says so)
|
|
7
|
+
|
|
8
|
+
cast-list reads the schema to tell a real Copilot Studio kind from one it does not know. They are updated by
|
|
9
|
+
dev/cast-list/tools/vendor-microsoft.mjs, never by hand.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "type": "commonjs" }
|