docs(skill): document sendNotification action (7 actions total) + CLI support

- skill: SKILL.md (7 actions in description + routing table entry), action-types.md
  (new section #4 sendNotification: config keys, variables, system-in-app semantics),
  automation-guide.md/cli-reference.md (--to-user/--title/--message/--severity/--path),
  development.md (7 actions), metadata.json abstract
- cli: action add --type sendNotification now builds config from granular flags
  (toUserId/title/message/severity/path); ACTION_TYPES includes sendNotification;
  live-verified via workflow create + action add + delete
This commit is contained in:
yeuimu
2026-08-17 07:50:15 +00:00
parent 3a03e0753c
commit 146d62c80b
8 changed files with 76 additions and 12 deletions
+19
View File
@@ -367,6 +367,7 @@ const ACTION_TYPES = [
'createRecord',
'updateRecord',
'getRecords',
'sendNotification',
];
function actionCommand() {
const cmd = new commander_1.Command('action');
@@ -390,6 +391,11 @@ function actionCommand() {
.option('--target-table <id>', 'Target table id (createRecord/updateRecord/getRecords)')
.option('--records <json>', 'Records JSON array (createRecord/updateRecord)')
.option('--query <json>', 'Query JSON (getRecords)')
.option('--to-user <id>', 'Recipient user id (sendNotification)')
.option('--title <s>', 'Notification title (sendNotification)')
.option('--message <s>', 'Notification message (sendNotification)')
.option('--severity <s>', 'Notification severity info|warning|critical (sendNotification)')
.option('--path <s>', 'Click-through path, e.g. /base/xx/table/yy (sendNotification)')
.option('--name <n>', 'Optional node display name')
.option('--base-id <id>', 'Base id (overrides default)')
.action((0, ctx_1.run)(async (ctx, args, o) => {
@@ -606,6 +612,19 @@ function buildActionConfig(opts) {
config.query = JSON.parse(opts.query);
break;
}
case 'sendNotification': {
if (opts.toUser)
config.toUserId = opts.toUser;
if (opts.title)
config.title = opts.title;
if (opts.message)
config.message = opts.message;
if (opts.severity)
config.severity = opts.severity;
if (opts.path)
config.path = opts.path;
break;
}
default:
break;
}