@webship.co/workspace-azure 1.0.8 → 1.0.10
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 +40 -0
- package/ai/agents/azure-deployer.md +84 -0
- package/ai/commands/azure-status.md +48 -0
- package/ai/prompts/azure-test-then-deploy.md +27 -0
- package/ai/skills/azure-hosting/SKILL.md +96 -0
- package/dist/src/index.d.ts +5 -0
- package/dist/src/index.js +6 -1
- package/dist/src/index.js.map +1 -1
- package/docs/plugin-items-pattern.md +14 -0
- package/features/azure.feature +16 -0
- package/package.json +40 -3
- package/scripts/args/arg-azure.sh +2 -2
package/README.md
CHANGED
|
@@ -20,6 +20,41 @@ bash core/scripts/plugins.sh --configure azure # core/config/plugin.azure.s
|
|
|
20
20
|
|
|
21
21
|
The same four steps are buttons on the dashboard's **Settings → Plugins** page.
|
|
22
22
|
|
|
23
|
+
## The items it carries
|
|
24
|
+
|
|
25
|
+
The workspace is container-based (DDEV by default). Each item lands in the folder of its kind, when
|
|
26
|
+
that folder is an active workspace folder, is listed there like any other item, and is installed
|
|
27
|
+
into Claude Code from there:
|
|
28
|
+
|
|
29
|
+
| What | Lands in | What it is for |
|
|
30
|
+
| --- | --- | --- |
|
|
31
|
+
| The agent `azure-deployer` | `ai-agents/` | Says whether a site is linked to Azure and to what, reads its environments and its log, tests it before a deploy, and hands over the deploy line |
|
|
32
|
+
| The skill `azure-hosting` | `ai-skills/` | Every entry of the AZURE menu and the command behind it, each option of `cmd-tools-azure.sh`, the link, the keys of `plugin.azure.settings.yml` |
|
|
33
|
+
| The command `/azure-status` | `ai-commands/` | `/azure-status <project>`: the link and the environments. Read-only |
|
|
34
|
+
| The prompt `azure-test-then-deploy` | `ai-prompts/` | The launch command of a session that checks a site, runs its webship-js suite when it has one, and gives the deploy line |
|
|
35
|
+
|
|
36
|
+
The plugin keeps its one command, `cmd-tools-azure.sh`; no other was added. The item bodies are plain Markdown any AI command-line assistant can follow; Claude Code is the default shape (frontmatter, the launch command of the prompt). A site that carries a webship-js suite is tested by the workspace's own `cmd-tools-testing.sh <project> --run` before a deploy, when it is there.
|
|
37
|
+
|
|
38
|
+
How the items are laid out and checked: [docs/plugin-items-pattern.md](docs/plugin-items-pattern.md).
|
|
39
|
+
|
|
40
|
+
## What it needs
|
|
41
|
+
|
|
42
|
+
A workspace starts empty, so the manifest says what else this plugin needs (`needs`):
|
|
43
|
+
|
|
44
|
+
- one sites folder: `dev`, `test`, `demos`, `sandboxes`, `projects` (`dev` is the one added when none is there). `cmd-tools-azure.sh`, which the menu's verbs run, is placed in it, and the menu is on its project rows.
|
|
45
|
+
- on the machine: `az`, the provider's CLI (https://learn.microsoft.com/cli/azure/install-azure-cli).
|
|
46
|
+
|
|
47
|
+
`--require` says so, `--activate` and `--install` stop until the workspace has a sites folder, and `--with-needs` adds it first. A missing command is said and never added:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
bash core/scripts/plugins.sh --activate azure --with-needs
|
|
51
|
+
bash core/scripts/plugins.sh --check azure # each command: found, with its version, or missing, with how to install it
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
A workspace that knows none of this (Webship Workspace 1.0.8 and older) ignores the keys: add a sites folder yourself, then `--install azure` again.
|
|
55
|
+
|
|
56
|
+
It also needs the AI folders its items are placed in (`needs.plugins`): `ai-agents`, `ai-skills`, `ai-commands` and `ai-prompts`, beside the sites folder. `--with-needs` adds what is missing first. A kind whose folder is not an active workspace folder is skipped, and the install says so.
|
|
57
|
+
|
|
23
58
|
## The command
|
|
24
59
|
|
|
25
60
|
```bash
|
|
@@ -54,5 +89,10 @@ the project is linked and which environment it works against.
|
|
|
54
89
|
| `scripts/args/arg-azure.sh` | Its argparse |
|
|
55
90
|
| `scripts/host-install.sh` | The host side: the CLI and the credential check |
|
|
56
91
|
| `config/plugin.azure.settings.yml` | The settings template |
|
|
92
|
+
| `ai/agents/azure-deployer.md` | The agent `azure-deployer` |
|
|
93
|
+
| `ai/skills/azure-hosting/` | The skill `azure-hosting` |
|
|
94
|
+
| `ai/commands/azure-status.md` | The command `/azure-status` |
|
|
95
|
+
| `ai/prompts/azure-test-then-deploy.md` | The prompt `azure-test-then-deploy` |
|
|
96
|
+
| `tests/items.test.ts` | The shape of every item, and that it names nothing the plugin does not have |
|
|
57
97
|
|
|
58
98
|
The `workspacePlugin` block in `package.json` is the manifest the installer reads.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: azure-deployer
|
|
3
|
+
description: Use this agent to look after a Webship Workspace site on Azure with the command of the Azure plugin (`@webship.co/workspace-azure`), `cmd-tools-azure.sh` — say whether the project is linked and to what, list its environments, read its last activities and its log, test the site before a deploy when it carries a webship-js suite, and hand the person the deploy line. It never deploys on its own — a deploy is outward-facing and asks for a confirmation in a terminal. It never prints a token or a key, never relinks a project and never skips the safety backup unless the person said so. Invoke for "is this site linked to Azure", "which environments does it have", "what was deployed last", "is it ready to deploy", or "give me the deploy command".
|
|
4
|
+
model: fable
|
|
5
|
+
tools:
|
|
6
|
+
- Bash
|
|
7
|
+
- Read
|
|
8
|
+
- Glob
|
|
9
|
+
- Grep
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# azure-deployer
|
|
13
|
+
|
|
14
|
+
You look after the sites of a Webship Workspace (`~/workspace`), a container-based workspace
|
|
15
|
+
(DDEV by default), on Azure. You come with the Azure plugin (`@webship.co/workspace-azure`), a provider of the hosting
|
|
16
|
+
family (`@webship.co/workspace-hosting`), and you work with its command, `cmd-tools-azure.sh`, which is
|
|
17
|
+
placed in the sites folders of the workspace. Every entry of the AZURE menu of a project row runs
|
|
18
|
+
that same command.
|
|
19
|
+
|
|
20
|
+
## Before anything else
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
cd ~/workspace
|
|
24
|
+
bash core/scripts/plugins.sh --check azure # the commands it needs on the machine: found, or missing with how to install them
|
|
25
|
+
cd ~/workspace/<folder>
|
|
26
|
+
ls cmd-tools-azure.sh # not there: the plugin is not installed for this folder; stop and say so
|
|
27
|
+
bash cmd-tools-azure.sh <project> # linked or not, and to what
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
- "not linked": say so, with the line it prints. Linking is done once, by the person or when they
|
|
31
|
+
give you the id: `bash cmd-tools-azure.sh <project> --link <resource-group>/<web-app>`. Find web apps with `az webapp list`.
|
|
32
|
+
- A command that is missing on the machine: stop and say which, with where to get it.
|
|
33
|
+
- The credential is the host ~/.azure login, or the service principal in core/config/plugin.azure.settings.yml. Never read it, print it or copy it. When the provider
|
|
34
|
+
refuses it, say that this is where it is set.
|
|
35
|
+
|
|
36
|
+
## Read
|
|
37
|
+
|
|
38
|
+
These change nothing, here or on Azure:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
bash cmd-tools-azure.sh <project> --environments
|
|
42
|
+
bash cmd-tools-azure.sh <project> --activities
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
This one follows a log until it is interrupted: give the person the line, do not run it.
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
bash cmd-tools-azure.sh <project> --logs
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## The live data
|
|
52
|
+
|
|
53
|
+
The command of this provider pulls no database and no files, and the menu says so ("No database or files pull: Azure Database and App Service storage are not reached from here"). Say so when asked; do not look for another way in.
|
|
54
|
+
|
|
55
|
+
## Before a deploy
|
|
56
|
+
|
|
57
|
+
A deploy sends what the project holds to Azure. Look first, and say what you found:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
cd ~/workspace/<folder>/<project> && git status --short && git branch --show-current
|
|
61
|
+
cd ~/workspace/<folder>
|
|
62
|
+
ls cmd-tools-testing.sh <project>/cucumber.js # a webship-js suite? both must be there; if not, say so and go on
|
|
63
|
+
bash cmd-tools-testing.sh <project> --run
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Uncommitted changes, the branch, the environment the project works against, and the totals of the
|
|
67
|
+
suite when there is one. A suite that fails is said before anything else: the person decides.
|
|
68
|
+
|
|
69
|
+
## Hand over, never run
|
|
70
|
+
|
|
71
|
+
The deploy asks for a confirmation in a terminal, and it is the person's to give. Give them the
|
|
72
|
+
line, with `cd ~/workspace/<folder> &&` in front, and stop there:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
bash cmd-tools-azure.sh <project> --push
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Rules
|
|
79
|
+
|
|
80
|
+
- Never `--push` on your own, and never answer its question for the person.
|
|
81
|
+
- Never `--link` to an id the person did not give, and never `--force`: it relinks a project that already points somewhere else.
|
|
82
|
+
- One project at a time, named by the person.
|
|
83
|
+
- What the command prints about a refused credential is a finding: report it, do not work around it.
|
|
84
|
+
- Say what was not run. A deploy you did not see end is not deployed.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Say where a Webship Workspace site stands on Azure — whether it is linked and to what, and its environments, and its last activities — with the read-only options of the plugin's command. Nothing is linked, pulled or deployed.
|
|
3
|
+
argument-hint: '<project>'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /azure-status
|
|
7
|
+
|
|
8
|
+
Say where this site stands on Azure: `$ARGUMENTS`
|
|
9
|
+
|
|
10
|
+
The argument is one word: the project, which is its folder name in a sites folder of the
|
|
11
|
+
workspace. With no project, stop and ask for one.
|
|
12
|
+
|
|
13
|
+
The workspace is container-based (DDEV by default); the command of the Azure plugin (`@webship.co/workspace-azure`) runs
|
|
14
|
+
on the machine, from the sites folder. This command only reads: never run `cmd-tools-azure.sh` with
|
|
15
|
+
`--push`, `--link`, `--select` here, and never print a token or a key.
|
|
16
|
+
|
|
17
|
+
## 1. Find the project and the command
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
ls -d ~/workspace/*/<project>
|
|
21
|
+
cd ~/workspace/<folder>
|
|
22
|
+
ls cmd-tools-azure.sh
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
If the command is not there, stop: the plugin is not installed, or the folder is not a sites folder.
|
|
26
|
+
|
|
27
|
+
## 2. Is it linked
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
bash cmd-tools-azure.sh <project>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
If it says "not linked", say so with the line it prints for linking, and stop.
|
|
34
|
+
|
|
35
|
+
## 3. Read
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
bash cmd-tools-azure.sh <project> --environments
|
|
39
|
+
bash cmd-tools-azure.sh <project> --activities
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## 4. Report
|
|
43
|
+
|
|
44
|
+
What the project is linked to, the environments with their state and address, what happened last, and
|
|
45
|
+
anything the command said it could not do, in its own words (a missing command, a refused
|
|
46
|
+
credential).
|
|
47
|
+
|
|
48
|
+
For a deploy, hand over to the agent `azure-deployer`.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Check a site before it goes to Azure: its link, its environments, its webship-js suite, then the deploy line.
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
claude --permission-mode bypassPermissions """
|
|
5
|
+
Get the site <project> ready to deploy to Azure, and give me the deploy line
|
|
6
|
+
# ~/workspace/<folder> · container-based (DDEV by default) · <folder> is the sites folder of <project>
|
|
7
|
+
# do not deploy: the deploy asks for a confirmation in a terminal and that is mine to give
|
|
8
|
+
# never print a token or a key; link nothing, pull nothing
|
|
9
|
+
|
|
10
|
+
1. cd ~/workspace/<folder> ; bash cmd-tools-azure.sh <project>
|
|
11
|
+
stop if it is not linked, and show me the line it prints for linking
|
|
12
|
+
2. bash cmd-tools-azure.sh <project> --environments
|
|
13
|
+
tell me which environment the project works against
|
|
14
|
+
3. cd <project> ; git status --short ; git branch --show-current ; cd ..
|
|
15
|
+
tell me what is not committed
|
|
16
|
+
4. if cmd-tools-testing.sh and <project>/cucumber.js are both there:
|
|
17
|
+
bash cmd-tools-testing.sh <project> --run
|
|
18
|
+
and keep the totals it prints; if they are not there, say so and do not invent a test run
|
|
19
|
+
|
|
20
|
+
Then tell me: the link, the environment, what is not committed, and the totals of the suite or
|
|
21
|
+
that there is none. If the suite failed, say that first.
|
|
22
|
+
Last, the line for me to run, and nothing more:
|
|
23
|
+
cd ~/workspace/<folder> && bash cmd-tools-azure.sh <project> --push
|
|
24
|
+
"""
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The text between the triple quotes is plain: it can be given to another AI command-line assistant as it is.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: azure-hosting
|
|
3
|
+
description: Work with a Webship Workspace site on Azure through the Azure plugin (`@webship.co/workspace-azure`) — the AZURE menu of a project row and the command behind every entry, `cmd-tools-azure.sh`, with each of its options, how a project is linked, the keys of `plugin.azure.settings.yml` and the credential they hold, and what the command says when something is missing. Use when asked "is this site linked to Azure", "link this project", "list the environments", "what was deployed last", "deploy this site", "the menu says not linked", or "where does the Azure token go".
|
|
4
|
+
argument-hint: '<project>'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# azure-hosting
|
|
8
|
+
|
|
9
|
+
Azure for a site of a Webship Workspace (`~/workspace`, container-based, DDEV by default). It comes
|
|
10
|
+
with the Azure plugin (`@webship.co/workspace-azure`), a provider of the hosting family (`@webship.co/workspace-hosting`),
|
|
11
|
+
like the agent `azure-deployer`, the command `/azure-status` and the prompt `azure-test-then-deploy`.
|
|
12
|
+
|
|
13
|
+
## The AZURE menu
|
|
14
|
+
|
|
15
|
+
The AZURE menu is on the project rows of the sites folders. The caption beside it says `linked`
|
|
16
|
+
or `not linked`. A project that is not linked is shown how to link it; a linked one gets these
|
|
17
|
+
entries, and each of them runs the command of the plugin in a terminal session, from the sites
|
|
18
|
+
folder:
|
|
19
|
+
|
|
20
|
+
| Menu entry | The command |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| **Link and slots** | `bash cmd-tools-azure.sh <project>` |
|
|
23
|
+
| **Last 10 deployments** | `bash cmd-tools-azure.sh <project> --activities` |
|
|
24
|
+
| **Tail the slot logs** | `bash cmd-tools-azure.sh <project> --logs` |
|
|
25
|
+
| **Deploy (zip deploy to the slot)…** | `bash cmd-tools-azure.sh <project> --push` |
|
|
26
|
+
|
|
27
|
+
The menu ends with the note "No database or files pull: Azure Database and App Service storage are not reached from here".
|
|
28
|
+
|
|
29
|
+
## The command
|
|
30
|
+
|
|
31
|
+
`cmd-tools-azure.sh` is placed in every sites folder of the workspace. The first word after it is the
|
|
32
|
+
project; with nothing else it says whether the project is linked, and to what.
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
cd ~/workspace/<folder>
|
|
36
|
+
bash cmd-tools-azure.sh <project>
|
|
37
|
+
bash cmd-tools-azure.sh <project> --link <resource-group>/<web-app>
|
|
38
|
+
bash cmd-tools-azure.sh <project> --environments
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
| Option | What it does |
|
|
42
|
+
| --- | --- |
|
|
43
|
+
| `--link <value>` | Link the project to an App Service web app: resource-group/app-name (az webapp list). |
|
|
44
|
+
| `--push` | Deploy: zip the current code (git archive) and push it to the selected slot (az webapp deploy --type zip). Outward-facing: asks before deploying. |
|
|
45
|
+
| `--environment <value>` | Slot for THIS run: production, or a deployment slot's name. Default: the one remembered by --select. |
|
|
46
|
+
| `--environments` | List the web app and its deployment slots with their state and host name. |
|
|
47
|
+
| `--select <value>` | Remember which slot this project works against (in .azure/workspace.yml, git-excluded). Checked against the real list. |
|
|
48
|
+
| `--logs` | Tail the selected slot's logs (az webapp log tail). |
|
|
49
|
+
| `--activities` | List the last 10 deployments of the web app (az webapp log deployment list). |
|
|
50
|
+
| `--force` | Allow --link to relink a project that already points at a different web app. |
|
|
51
|
+
|
|
52
|
+
With no project the command says that `PROJECT_NAME` is required; with a project that is not in
|
|
53
|
+
the folder, "No such project"; with an option that needs a link on a project that has none, "Not
|
|
54
|
+
linked to Azure".
|
|
55
|
+
|
|
56
|
+
## Link a project
|
|
57
|
+
|
|
58
|
+
A project is linked to an App Service web app as `resource-group/app-name`. The link is written to `.azure/workspace.yml` in the project, which git does not track. An App Service link is resource-group/web-app-name (az webapp list).
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
bash cmd-tools-azure.sh <project> --link <resource-group>/<web-app>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## The settings: `core/config/plugin.azure.settings.yml`
|
|
65
|
+
|
|
66
|
+
| Key | What it is |
|
|
67
|
+
| --- | --- |
|
|
68
|
+
| `subscription:` | The subscription id or name the web apps live in (az account list). |
|
|
69
|
+
| `tenant_id:` | The Entra tenant of the service principal (optional when the host login is mounted). |
|
|
70
|
+
| `client_id:` | An app registration with Contributor on the resource groups (optional when the host login is mounted). Read as AZURE_CLIENT_ID. |
|
|
71
|
+
| `client_secret:` | Its secret. Read as AZURE_CLIENT_SECRET. |
|
|
72
|
+
|
|
73
|
+
The dashboard reaches Azure with the host ~/.azure login, or the service principal in core/config/plugin.azure.settings.yml. The file is created mode 600 and its secrets are
|
|
74
|
+
masked on the Settings page. Never print them, never copy them into another file, and never commit
|
|
75
|
+
the file.
|
|
76
|
+
|
|
77
|
+
## Turn it on, and check it
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
cd ~/workspace
|
|
81
|
+
bash core/scripts/plugins.sh --require @webship.co/workspace-azure
|
|
82
|
+
bash core/scripts/plugins.sh --activate azure --with-needs # adds a sites folder and the AI folders when they are missing
|
|
83
|
+
bash core/scripts/plugins.sh --install azure
|
|
84
|
+
bash core/scripts/plugins.sh --configure azure
|
|
85
|
+
bash core/scripts/plugins.sh --check azure # the commands it needs on the machine
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Traps
|
|
89
|
+
|
|
90
|
+
- **"Please run 'az login'" or an AADSTS error**: the dashboard reaches Azure with the login of the machine's `~/.azure`, or with the service principal in `tenant_id:`, `client_id:` and `client_secret:`.
|
|
91
|
+
- **No database pull and no files pull**: Azure Database and the storage of App Service are not reached from here, and the command has neither option.
|
|
92
|
+
- **An environment here is a slot**: `production`, or the name of a deployment slot.
|
|
93
|
+
- **The log entry follows**: it runs `az webapp log tail`, which goes on until it is interrupted. It is for a terminal.
|
|
94
|
+
- **A deploy is a zip deploy**: the current code is zipped with `git archive` and pushed to the selected slot (`az webapp deploy --type zip`). What is not committed is not in it. It asks before it deploys.
|
|
95
|
+
- **A deploy is outward-facing.** The command asks before it sends anything, in a terminal: it is
|
|
96
|
+
not a step for an AI assistant to take on its own.
|
package/dist/src/index.d.ts
CHANGED
|
@@ -13,4 +13,9 @@ import type { PluginApi } from '@webship.co/workspace-plugin-api';
|
|
|
13
13
|
import { azureProvider } from './lib/provider';
|
|
14
14
|
export { azureProvider };
|
|
15
15
|
export { azureLinkOf } from './lib/link';
|
|
16
|
+
/** The AI items the installer places: agents in ai-agents/, skills in ai-skills/, commands in ai-commands/, prompts in ai-prompts/. */
|
|
17
|
+
export declare const AGENTS: string[];
|
|
18
|
+
export declare const SKILLS: string[];
|
|
19
|
+
export declare const AI_COMMANDS: string[];
|
|
20
|
+
export declare const PROMPTS: string[];
|
|
16
21
|
export declare function register(api: PluginApi): void;
|
package/dist/src/index.js
CHANGED
|
@@ -11,13 +11,18 @@
|
|
|
11
11
|
* the dashboard's own files.
|
|
12
12
|
*/
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.azureLinkOf = exports.azureProvider = void 0;
|
|
14
|
+
exports.PROMPTS = exports.AI_COMMANDS = exports.SKILLS = exports.AGENTS = exports.azureLinkOf = exports.azureProvider = void 0;
|
|
15
15
|
exports.register = register;
|
|
16
16
|
const workspace_hosting_1 = require("@webship.co/workspace-hosting");
|
|
17
17
|
const provider_1 = require("./lib/provider");
|
|
18
18
|
Object.defineProperty(exports, "azureProvider", { enumerable: true, get: function () { return provider_1.azureProvider; } });
|
|
19
19
|
var link_1 = require("./lib/link");
|
|
20
20
|
Object.defineProperty(exports, "azureLinkOf", { enumerable: true, get: function () { return link_1.azureLinkOf; } });
|
|
21
|
+
/** The AI items the installer places: agents in ai-agents/, skills in ai-skills/, commands in ai-commands/, prompts in ai-prompts/. */
|
|
22
|
+
exports.AGENTS = ['azure-deployer'];
|
|
23
|
+
exports.SKILLS = ['azure-hosting'];
|
|
24
|
+
exports.AI_COMMANDS = ['azure-status'];
|
|
25
|
+
exports.PROMPTS = ['azure-test-then-deploy'];
|
|
21
26
|
function register(api) {
|
|
22
27
|
(0, workspace_hosting_1.registerHosting)(api, (0, provider_1.azureProvider)(api));
|
|
23
28
|
}
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAgBH,4BAEC;AAfD,qEAAgE;AAEhE,6CAA+C;AAEtC,8FAFA,wBAAa,OAEA;AACtB,mCAAyC;AAAhC,mGAAA,WAAW,OAAA;AAEpB,uIAAuI;AAC1H,QAAA,MAAM,GAAa,CAAC,gBAAgB,CAAC,CAAC;AACtC,QAAA,MAAM,GAAa,CAAC,eAAe,CAAC,CAAC;AACrC,QAAA,WAAW,GAAa,CAAC,cAAc,CAAC,CAAC;AACzC,QAAA,OAAO,GAAa,CAAC,wBAAwB,CAAC,CAAC;AAE5D,SAAgB,QAAQ,CAAC,GAAc;IACrC,IAAA,mCAAe,EAAC,GAAG,EAAE,IAAA,wBAAa,EAAC,GAAG,CAAC,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# A plugin carries its own items
|
|
2
|
+
|
|
3
|
+
Every `@webship.co/workspace-<name>` plugin manages what belongs to it: its `cmd-*.sh` commands and
|
|
4
|
+
its AI items (agents, skills, commands, prompts). The package holds them under `ai/`, one folder per
|
|
5
|
+
kind, the manifest names them (`ai`) and the AI folder each kind lands in (`needs`), and
|
|
6
|
+
`plugins.sh --install azure` lists each one in the workspace folder of its kind, when that folder is
|
|
7
|
+
an active workspace folder. `--uninstall` takes them away again.
|
|
8
|
+
|
|
9
|
+
The shape, what an item may say and how it is proven on a fresh workspace are described once, in
|
|
10
|
+
the reference for a plugin that is not a platform:
|
|
11
|
+
[`@webship.co/workspace-github`, docs/plugin-items-pattern.md](https://github.com/webship/workspace-github/blob/1.0.x/docs/plugin-items-pattern.md).
|
|
12
|
+
|
|
13
|
+
What is specific here is in `tests/items.test.ts`: the items of this plugin are held to what the
|
|
14
|
+
plugin itself draws, runs and reads — its menu entries, its settings keys, its commands and flags.
|
package/features/azure.feature
CHANGED
|
@@ -18,3 +18,19 @@ Feature: The Azure plugin on a project row
|
|
|
18
18
|
Given I am on "/settings/plugins"
|
|
19
19
|
Then I should see "Azure"
|
|
20
20
|
And I should see "@webship.co/workspace-azure"
|
|
21
|
+
|
|
22
|
+
Scenario: The AI Agents folder lists the agent the plugin ships
|
|
23
|
+
Given I am on "/ai-agents"
|
|
24
|
+
Then I should see "azure-deployer"
|
|
25
|
+
|
|
26
|
+
Scenario: The AI Skills folder lists the skill the plugin ships
|
|
27
|
+
Given I am on "/ai-skills"
|
|
28
|
+
Then I should see "azure-hosting"
|
|
29
|
+
|
|
30
|
+
Scenario: The AI Commands folder lists the command the plugin ships
|
|
31
|
+
Given I am on "/ai-commands"
|
|
32
|
+
Then I should see "azure-status"
|
|
33
|
+
|
|
34
|
+
Scenario: The AI Prompts folder lists the prompt the plugin ships
|
|
35
|
+
Given I am on "/ai-prompts"
|
|
36
|
+
Then I should see "azure-test-then-deploy"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webship.co/workspace-azure",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Azure App Service for Webship Workspace: the AZURE menu on every site row, the web app and its deployment slots with their URLs, zip deploy, log tail, deployment history. A provider of @webship.co/workspace-hosting.",
|
|
3
|
+
"version": "1.0.10",
|
|
4
|
+
"description": "Azure App Service for Webship Workspace: the AZURE menu on every site row, the web app and its deployment slots with their URLs, zip deploy, log tail, deployment history. It carries its AI items, each placed in the workspace folder of its kind: an agent, a skill, a command and a prompt. A provider of @webship.co/workspace-hosting.",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
7
7
|
"license": "ISC",
|
|
@@ -11,13 +11,15 @@
|
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
13
13
|
"dist/src",
|
|
14
|
+
"ai",
|
|
14
15
|
"commands",
|
|
15
16
|
"config",
|
|
16
17
|
"features",
|
|
17
18
|
"scripts",
|
|
18
19
|
"README.md",
|
|
19
20
|
"ddev",
|
|
20
|
-
"host-mounts.txt"
|
|
21
|
+
"host-mounts.txt",
|
|
22
|
+
"docs"
|
|
21
23
|
],
|
|
22
24
|
"scripts": {
|
|
23
25
|
"build": "tsc -p tsconfig.json",
|
|
@@ -28,6 +30,27 @@
|
|
|
28
30
|
"workspacePlugin": {
|
|
29
31
|
"name": "azure",
|
|
30
32
|
"label": "Azure",
|
|
33
|
+
"needs": {
|
|
34
|
+
"plugins": [
|
|
35
|
+
[
|
|
36
|
+
"dev",
|
|
37
|
+
"test",
|
|
38
|
+
"demos",
|
|
39
|
+
"sandboxes",
|
|
40
|
+
"projects"
|
|
41
|
+
],
|
|
42
|
+
"ai-agents",
|
|
43
|
+
"ai-skills",
|
|
44
|
+
"ai-commands",
|
|
45
|
+
"ai-prompts"
|
|
46
|
+
],
|
|
47
|
+
"commands": [
|
|
48
|
+
{
|
|
49
|
+
"command": "az",
|
|
50
|
+
"hint": "https://learn.microsoft.com/cli/azure/install-azure-cli"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
31
54
|
"settingsFile": "plugin.azure.settings.yml",
|
|
32
55
|
"settingsTemplate": "config/plugin.azure.settings.yml",
|
|
33
56
|
"labels": "config/settings.labels.yml",
|
|
@@ -62,6 +85,20 @@
|
|
|
62
85
|
],
|
|
63
86
|
"hostInstall": "scripts/host-install.sh"
|
|
64
87
|
},
|
|
88
|
+
"ai": {
|
|
89
|
+
"agents": [
|
|
90
|
+
"ai/agents/azure-deployer.md"
|
|
91
|
+
],
|
|
92
|
+
"skills": [
|
|
93
|
+
"ai/skills/azure-hosting"
|
|
94
|
+
],
|
|
95
|
+
"commands": [
|
|
96
|
+
"ai/commands/azure-status.md"
|
|
97
|
+
],
|
|
98
|
+
"prompts": [
|
|
99
|
+
"ai/prompts/azure-test-then-deploy.md"
|
|
100
|
+
]
|
|
101
|
+
},
|
|
65
102
|
"features": [
|
|
66
103
|
"features/azure.feature"
|
|
67
104
|
],
|
|
@@ -12,7 +12,7 @@ parser.add_argument('-p', '--push',
|
|
|
12
12
|
help='Deploy: zip the current code (git archive) and push it to the selected slot (az webapp deploy --type zip). Outward-facing: asks before deploying.')
|
|
13
13
|
parser.add_argument('-e', '--environment',
|
|
14
14
|
default="_none_",
|
|
15
|
-
help='Slot for THIS run: production, or a deployment slot's name. Default: the one remembered by --select.')
|
|
15
|
+
help='Slot for THIS run: production, or a deployment slot\'s name. Default: the one remembered by --select.')
|
|
16
16
|
parser.add_argument('-E', '--environments',
|
|
17
17
|
action='store_true',
|
|
18
18
|
default=False,
|
|
@@ -23,7 +23,7 @@ parser.add_argument('-s', '--select',
|
|
|
23
23
|
parser.add_argument('-g', '--logs',
|
|
24
24
|
action='store_true',
|
|
25
25
|
default=False,
|
|
26
|
-
help='Tail the selected slot's logs (az webapp log tail).')
|
|
26
|
+
help='Tail the selected slot\'s logs (az webapp log tail).')
|
|
27
27
|
parser.add_argument('-a', '--activities',
|
|
28
28
|
action='store_true',
|
|
29
29
|
default=False,
|